diff --git a/dist/ReactGrid.js b/dist/ReactGrid.js index 0af6f57..65364f1 100644 --- a/dist/ReactGrid.js +++ b/dist/ReactGrid.js @@ -11,41 +11,41 @@ return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; -/******/ + /******/ // The require function /******/ function __webpack_require__(moduleId) { -/******/ + /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; -/******/ + /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; -/******/ + /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ + /******/ // Flag the module as loaded /******/ module.loaded = true; -/******/ + /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ -/******/ + + /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; -/******/ + /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; -/******/ + /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; -/******/ + /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) @@ -82,22 +82,22 @@ return /******/ (function(modules) { // webpackBootstrap var React = __webpack_require__(10); var PropTypes = React.PropTypes; - var BaseGrid = __webpack_require__(16); - var ExcelCell = __webpack_require__(17); - var ExcelRow = __webpack_require__(18); - var merge = __webpack_require__(19); - var SelectableGridMixin = __webpack_require__(20); - var DraggableGridMixin = __webpack_require__(21); - var CopyPasteGridMixin = __webpack_require__(22); - var EditableGridMixin = __webpack_require__(23); - var SortableGridMixin = __webpack_require__(24); - var FilterableGridMixin = __webpack_require__(25); - var CheckboxEditor = __webpack_require__(26); - var MixinHelper = __webpack_require__(27); + var BaseGrid = __webpack_require__(12); + var ExcelCell = __webpack_require__(13); + var ExcelRow = __webpack_require__(14); + var merge = __webpack_require__(15); + var SelectableGridMixin = __webpack_require__(16); + var DraggableGridMixin = __webpack_require__(17); + var CopyPasteGridMixin = __webpack_require__(18); + var EditableGridMixin = __webpack_require__(19); + var SortableGridMixin = __webpack_require__(20); + var FilterableGridMixin = __webpack_require__(21); + var CheckboxEditor = __webpack_require__(22); + var MixinHelper = __webpack_require__(23); var cloneWithProps = React.addons.cloneWithProps; - var ExcelGrid = React.createClass({displayName: 'ExcelGrid', + var ExcelGrid = React.createClass({displayName: "ExcelGrid", mixins : [SelectableGridMixin, EditableGridMixin, DraggableGridMixin, CopyPasteGridMixin, SortableGridMixin, FilterableGridMixin], @@ -291,7 +291,7 @@ return /******/ (function(modules) { // webpackBootstrap var cloneWithProps = React.addons.cloneWithProps; var ColumnMetrics = __webpack_require__(11); - var Row = React.createClass({displayName: 'Row', + var Row = React.createClass({displayName: "Row", render:function() { var className = cx( @@ -428,7 +428,7 @@ return /******/ (function(modules) { // webpackBootstrap var cx = React.addons.classSet; var cloneWithProps = React.addons.cloneWithProps; - var Cell = React.createClass({displayName: 'Cell', + var Cell = React.createClass({displayName: "Cell", render:function() { var style = this.getStyle(); @@ -457,7 +457,7 @@ return /******/ (function(modules) { // webpackBootstrap renderCellContent:function(props) { var formatter = React.isValidElement(this.props.formatter) ? cloneWithProps(this.props.formatter, props) : this.props.formatter(props); return (React.createElement("div", { - className: "react-grid-Cell__value"}, formatter, " ", this.props.cellControls)) + className: "react-grid-Cell__value", title: this.props.value}, formatter, " ", this.props.cellControls)) }, @@ -506,7 +506,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var React = __webpack_require__(10); var cx = React.addons.classSet; - var isFunction = __webpack_require__(12); + var isFunction = __webpack_require__(24); var EditorMixin = { @@ -757,7 +757,7 @@ return /******/ (function(modules) { // webpackBootstrap var $__0= __webpack_require__(10),PropTypes=$__0.PropTypes,isValidElement=$__0.isValidElement; var shallowCloneObject = __webpack_require__(28); var DOMMetrics = __webpack_require__(29); - var merge = __webpack_require__(19); + var merge = __webpack_require__(15); /** * Update column metrics calculation. @@ -969,60 +969,6 @@ return /******/ (function(modules) { // webpackBootstrap /* 12 */ /***/ function(module, exports, __webpack_require__) { - - "use strict"; - - var isFunction = function(functionToCheck){ - var getType = {}; - return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]'; - } - - module.exports = isFunction; - - -/***/ }, -/* 13 */, -/* 14 */, -/* 15 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * @jsx React.DOM - * @copyright Prometheus Research, LLC 2014 - */ - 'use strict'; - - var React = __webpack_require__(10); - var cx = React.addons.classSet; - var MixinHelper = __webpack_require__(27); - var EditorMixin = __webpack_require__(5); - var TextInputMixin = __webpack_require__(6); - var keyboardHandlerMixin = __webpack_require__(9); - - var SimpleTextEditor = React.createClass({displayName: 'SimpleTextEditor', - - mixins : [keyboardHandlerMixin, EditorMixin, TextInputMixin], - - overrides : { - checkFocus : function(){ - this.setTextInputFocus(); - } - }, - - renderEditorNode:function(){ - return (React.createElement("input", {type: "text", onBlur: this.commit, className: "form-control", defaultValue: this.getDefaultValue(), style: this.getStyle(), onKeyDown: this.onKeyDown})); - } - - - }); - - module.exports = SimpleTextEditor; - - -/***/ }, -/* 16 */ -/***/ function(module, exports, __webpack_require__) { - /** * @jsx React.DOM * @copyright Prometheus Research, LLC 2014 @@ -1071,7 +1017,7 @@ return /******/ (function(modules) { // webpackBootstrap } }; - var Grid = React.createClass({displayName: 'Grid', + var Grid = React.createClass({displayName: "Grid", mixins: [ GridScrollMixin, ColumnMetrics.Mixin, @@ -1136,7 +1082,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 17 */ +/* 13 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1151,16 +1097,16 @@ return /******/ (function(modules) { // webpackBootstrap var EditableMixin = __webpack_require__(33); var CopyableMixin = __webpack_require__(34); var DraggableMixin = __webpack_require__(35); - var MixinHelper = __webpack_require__(27); + var MixinHelper = __webpack_require__(23); var KeyboardHandlerMixin = __webpack_require__(9); - var isFunction = __webpack_require__(12); + var isFunction = __webpack_require__(24); var PropTypes = React.PropTypes; var cx = React.addons.classSet; var cloneWithProps = React.addons.cloneWithProps; - var CellControls = React.createClass({displayName: 'CellControls', + var CellControls = React.createClass({displayName: "CellControls", onClickEdit : function(e){ e.stopPropagation(); @@ -1208,7 +1154,7 @@ return /******/ (function(modules) { // webpackBootstrap }) - var ExcelCell = React.createClass({displayName: 'ExcelCell', + var ExcelCell = React.createClass({displayName: "ExcelCell", mixins : [EditableMixin, CopyableMixin, DraggableMixin], @@ -1278,7 +1224,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 18 */ +/* 14 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1291,7 +1237,7 @@ return /******/ (function(modules) { // webpackBootstrap var cx = React.addons.classSet; var BaseRow = __webpack_require__(2); var ColumnMetrics = __webpack_require__(11); - var ExcelRow = React.createClass({displayName: 'ExcelRow', + var ExcelRow = React.createClass({displayName: "ExcelRow", render:function() { var row = React.addons.update(this.props.row, {$merge : {'select-row' : this.props.isSelected}}); @@ -1305,8 +1251,8 @@ return /******/ (function(modules) { // webpackBootstrap }, getRowHeight:function(props){ - if(props.expandedRows && props.expandedRows[props.key]){ - return props.expandedRows[props.key]; + if(props.expandedRows && props.expandedRows[props.idx]){ + return props.expandedRows[props.idx]; }else{ return props.height; } @@ -1314,8 +1260,8 @@ return /******/ (function(modules) { // webpackBootstrap hasRowHeightChanged:function(props){ if(props.expandedRows){ - if(typeof props.expandedRows[props.key] !== 'undefined'){ - return this.props.height !== props.expandedRows[props.key] + if(typeof props.expandedRows[props.idx] !== 'undefined'){ + return this.props.height !== props.expandedRows[props.idx] }else{ return false; } @@ -1380,7 +1326,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 19 */ +/* 15 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1432,7 +1378,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 20 */ +/* 16 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1484,7 +1430,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 21 */ +/* 17 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1495,8 +1441,8 @@ return /******/ (function(modules) { // webpackBootstrap var React = __webpack_require__(10); var PropTypes = React.PropTypes; - var MixinHelper = __webpack_require__(27); - var SelectableGridMixin = __webpack_require__(20); + var MixinHelper = __webpack_require__(23); + var SelectableGridMixin = __webpack_require__(16); MixinHelper.addAlias('SelectableGridMixin'); @@ -1553,7 +1499,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 22 */ +/* 18 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1595,7 +1541,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 23 */ +/* 19 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1606,7 +1552,7 @@ return /******/ (function(modules) { // webpackBootstrap var React = __webpack_require__(10); var PropTypes = React.PropTypes; - var merge = __webpack_require__(19); + var merge = __webpack_require__(15); var EditableGridMixin = { @@ -1636,7 +1582,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 24 */ +/* 20 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1720,7 +1666,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 25 */ +/* 21 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1815,7 +1761,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 26 */ +/* 22 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1827,7 +1773,7 @@ return /******/ (function(modules) { // webpackBootstrap var React = __webpack_require__(10); var cx = React.addons.classSet; - var CheckBoxEditor = React.createClass({displayName: 'CheckBoxEditor', + var CheckBoxEditor = React.createClass({displayName: "CheckBoxEditor", PropTypes : { @@ -1852,14 +1798,14 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 27 */ +/* 23 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var keyMirror = __webpack_require__(42); - var isFunction = __webpack_require__(12) + var keyMirror = __webpack_require__(41); + var isFunction = __webpack_require__(24) var React = __webpack_require__(10); if (!Object.assign) { Object.assign = __webpack_require__(38); @@ -2086,6 +2032,60 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = MixinHelper; +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + + "use strict"; + + var isFunction = function(functionToCheck){ + var getType = {}; + return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]'; + } + + module.exports = isFunction; + + +/***/ }, +/* 25 */, +/* 26 */, +/* 27 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * @jsx React.DOM + * @copyright Prometheus Research, LLC 2014 + */ + 'use strict'; + + var React = __webpack_require__(10); + var cx = React.addons.classSet; + var MixinHelper = __webpack_require__(23); + var EditorMixin = __webpack_require__(5); + var TextInputMixin = __webpack_require__(6); + var keyboardHandlerMixin = __webpack_require__(9); + + var SimpleTextEditor = React.createClass({displayName: "SimpleTextEditor", + + mixins : [keyboardHandlerMixin, EditorMixin, TextInputMixin], + + overrides : { + checkFocus : function(){ + this.setTextInputFocus(); + } + }, + + renderEditorNode:function(){ + return (React.createElement("input", {type: "text", onBlur: this.commit, className: "form-control", defaultValue: this.getDefaultValue(), style: this.getStyle(), onKeyDown: this.onKeyDown})); + } + + + }); + + module.exports = SimpleTextEditor; + + /***/ }, /* 28 */ /***/ function(module, exports, __webpack_require__) { @@ -2120,9 +2120,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var React = __webpack_require__(10); - var emptyFunction = __webpack_require__(40); + var emptyFunction = __webpack_require__(39); var shallowCloneObject = __webpack_require__(28); - var invariant = __webpack_require__(41); + var invariant = __webpack_require__(40); var contextTypes = { metricsComputator: React.PropTypes.object @@ -2293,10 +2293,10 @@ return /******/ (function(modules) { // webpackBootstrap var cx = React.addons.classSet; var shallowCloneObject = __webpack_require__(28); var ColumnMetrics = __webpack_require__(11); - var HeaderRow = __webpack_require__(45); + var HeaderRow = __webpack_require__(43); var ColumnMetrics = __webpack_require__(11); - var Header = React.createClass({displayName: 'Header', + var Header = React.createClass({displayName: "Header", propTypes: { columns: React.PropTypes.object.isRequired, @@ -2428,9 +2428,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var React = __webpack_require__(10); - var getWindowSize = __webpack_require__(43); + var getWindowSize = __webpack_require__(44); var DOMMetrics = __webpack_require__(29); - var Canvas = __webpack_require__(44); + var Canvas = __webpack_require__(45); var min = Math.min; var max = Math.max; @@ -2533,7 +2533,7 @@ return /******/ (function(modules) { // webpackBootstrap } }; - var Viewport = React.createClass({displayName: 'Viewport', + var Viewport = React.createClass({displayName: "Viewport", mixins: [ViewportScroll], render:function() { @@ -2542,7 +2542,7 @@ return /******/ (function(modules) { // webpackBootstrap bottom: 0, left: 0, right: 0, - overflow: 'hidden', + //overflow: 'hidden', position: 'absolute', top: this.props.rowOffsetHeight }; @@ -2615,7 +2615,7 @@ return /******/ (function(modules) { // webpackBootstrap var cx = React.addons.classSet; var cloneWithProps = React.addons.cloneWithProps; var KeyboardHandlerMixin = __webpack_require__(9); - var MixinHelper = __webpack_require__(27); + var MixinHelper = __webpack_require__(23); var SelectableMixin = MixinHelper.createDependency({KeyboardHandlerMixin : KeyboardHandlerMixin}).assignTo({ @@ -2713,9 +2713,9 @@ return /******/ (function(modules) { // webpackBootstrap var React = __webpack_require__(10); var cx = React.addons.classSet; var cloneWithProps = React.addons.cloneWithProps; - var SimpleTextEditor = __webpack_require__(15); + var SimpleTextEditor = __webpack_require__(27); var PropTypes = React.PropTypes; - var MixinHelper = __webpack_require__(27); + var MixinHelper = __webpack_require__(23); var SelectableMixin = __webpack_require__(32); var KeyboardHandlerMixin = __webpack_require__(9); @@ -2859,8 +2859,8 @@ return /******/ (function(modules) { // webpackBootstrap var cx = React.addons.classSet; var cloneWithProps = React.addons.cloneWithProps; var PropTypes = React.PropTypes; - var SimpleTextEditor = __webpack_require__(15); - var MixinHelper = __webpack_require__(27); + var SimpleTextEditor = __webpack_require__(27); + var MixinHelper = __webpack_require__(23); var SelectableMixin = __webpack_require__(32); var KeyboardHandlerMixin = __webpack_require__(9); @@ -2930,7 +2930,7 @@ return /******/ (function(modules) { // webpackBootstrap var cx = React.addons.classSet; var cloneWithProps = React.addons.cloneWithProps; var PropTypes = React.PropTypes; - var MixinHelper = __webpack_require__(27); + var MixinHelper = __webpack_require__(23); var SelectableMixin = __webpack_require__(32); var KeyboardHandlerMixin = __webpack_require__(9); @@ -3035,7 +3035,7 @@ return /******/ (function(modules) { // webpackBootstrap var React = __webpack_require__(10); var cx = React.addons.classSet; - var SortableHeaderCell = React.createClass({displayName: 'SortableHeaderCell', + var SortableHeaderCell = React.createClass({displayName: "SortableHeaderCell", onClick: function() { this.props.column.sortBy( @@ -3081,7 +3081,7 @@ return /******/ (function(modules) { // webpackBootstrap var React = __webpack_require__(10); var cx = React.addons.classSet; - var FilterableHeaderCell = React.createClass({displayName: 'FilterableHeaderCell', + var FilterableHeaderCell = React.createClass({displayName: "FilterableHeaderCell", getInitialState:function(){ return {filterTerm : ''} @@ -3154,8 +3154,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 39 */, -/* 40 */ +/* 39 */ /***/ function(module, exports, __webpack_require__) { /** @@ -3205,7 +3204,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 41 */ +/* 40 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -3268,11 +3267,11 @@ return /******/ (function(modules) { // webpackBootstrap }; module.exports = invariant; - + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(52))) /***/ }, -/* 42 */ +/* 41 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -3326,11 +3325,115 @@ return /******/ (function(modules) { // webpackBootstrap }; module.exports = keyMirror; - + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(52))) /***/ }, +/* 42 */, /* 43 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * @jsx React.DOM + * @copyright Prometheus Research, LLC 2014 + */ + "use strict"; + + var React = __webpack_require__(10); + var PropTypes = React.PropTypes; + var shallowEqual = __webpack_require__(47); + var HeaderCell = __webpack_require__(48); + var getScrollbarSize = __webpack_require__(49); + + var HeaderRow = React.createClass({displayName: "HeaderRow", + + propTypes: { + width: PropTypes.number, + height: PropTypes.number.isRequired, + columns: PropTypes.array.isRequired, + onColumnResize: PropTypes.func + }, + + render:function() { + var cellsStyle = { + width: this.props.width ? (this.props.width + getScrollbarSize()) : '100%', + height: this.props.height, + whiteSpace: 'nowrap', + overflowX: 'hidden', + overflowY: 'hidden' + }; + + var cells = this.getCells(); + return ( + React.createElement("div", React.__spread({}, this.props, {className: "react-grid-HeaderRow"}), + React.createElement("div", {style: cellsStyle}, + cells + ) + ) + ); + }, + + getCells:function() { + var cells = []; + var lockedCells = []; + + for (var i = 0, len = this.props.columns.length; i < len; i++) { + var column = this.props.columns[i]; + var cell = ( + React.createElement(HeaderCell, { + ref: i, + key: i, + height: this.props.height, + column: column, + renderer: this.props.headerCellRenderer || column.headerRenderer || this.props.cellRenderer, + resizing: this.props.resizing === column, + onResize: this.props.onColumnResize, + onResizeEnd: this.props.onColumnResizeEnd} + ) + ); + if (column.locked) { + lockedCells.push(cell); + } else { + cells.push(cell); + } + } + + return cells.concat(lockedCells); + }, + + setScrollLeft:function(scrollLeft) { + for (var i = 0, len = this.props.columns.length; i < len; i++) { + if (this.props.columns[i].locked) { + this.refs[i].setScrollLeft(scrollLeft); + } + } + }, + + shouldComponentUpdate:function(nextProps) { + return ( + nextProps.width !== this.props.width + || nextProps.height !== this.props.height + || nextProps.columns !== this.props.columns + || !shallowEqual(nextProps.style, this.props.style) + ); + }, + + getStyle:function() { + return { + overflow: 'hidden', + width: '100%', + height: this.props.height, + position: 'absolute' + }; + } + + }); + + module.exports = HeaderRow; + + +/***/ }, +/* 44 */ /***/ function(module, exports, __webpack_require__) { /** @@ -3365,7 +3468,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 44 */ +/* 45 */ /***/ function(module, exports, __webpack_require__) { /** @@ -3379,11 +3482,11 @@ return /******/ (function(modules) { // webpackBootstrap var PropTypes = React.PropTypes; var cloneWithProps = React.addons.cloneWithProps; var shallowEqual = __webpack_require__(47); - var emptyFunction = __webpack_require__(40); - var ScrollShim = __webpack_require__(48); + var emptyFunction = __webpack_require__(39); + var ScrollShim = __webpack_require__(50); var Row = __webpack_require__(2); - var Canvas = React.createClass({displayName: 'Canvas', + var Canvas = React.createClass({displayName: "Canvas", mixins: [ScrollShim], propTypes: { @@ -3435,8 +3538,8 @@ return /******/ (function(modules) { // webpackBootstrap position: 'absolute', top: 0, left: 0, - overflowX: 'auto', - overflowY: 'scroll', + //overflowX: 'auto', + //overflowY: 'scroll', width: this.props.totalWidth, height: this.props.height, transform: 'translate3d(0, 0, 0)' @@ -3581,109 +3684,6 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Canvas; -/***/ }, -/* 45 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * @jsx React.DOM - * @copyright Prometheus Research, LLC 2014 - */ - "use strict"; - - var React = __webpack_require__(10); - var PropTypes = React.PropTypes; - var shallowEqual = __webpack_require__(47); - var HeaderCell = __webpack_require__(49); - var getScrollbarSize = __webpack_require__(50); - - var HeaderRow = React.createClass({displayName: 'HeaderRow', - - propTypes: { - width: PropTypes.number, - height: PropTypes.number.isRequired, - columns: PropTypes.array.isRequired, - onColumnResize: PropTypes.func - }, - - render:function() { - var cellsStyle = { - width: this.props.width ? (this.props.width + getScrollbarSize()) : '100%', - height: this.props.height, - whiteSpace: 'nowrap', - overflowX: 'hidden', - overflowY: 'hidden' - }; - - var cells = this.getCells(); - return ( - React.createElement("div", React.__spread({}, this.props, {className: "react-grid-HeaderRow"}), - React.createElement("div", {style: cellsStyle}, - cells - ) - ) - ); - }, - - getCells:function() { - var cells = []; - var lockedCells = []; - - for (var i = 0, len = this.props.columns.length; i < len; i++) { - var column = this.props.columns[i]; - var cell = ( - React.createElement(HeaderCell, { - ref: i, - key: i, - height: this.props.height, - column: column, - renderer: this.props.headerCellRenderer || column.headerRenderer || this.props.cellRenderer, - resizing: this.props.resizing === column, - onResize: this.props.onColumnResize, - onResizeEnd: this.props.onColumnResizeEnd} - ) - ); - if (column.locked) { - lockedCells.push(cell); - } else { - cells.push(cell); - } - } - - return cells.concat(lockedCells); - }, - - setScrollLeft:function(scrollLeft) { - for (var i = 0, len = this.props.columns.length; i < len; i++) { - if (this.props.columns[i].locked) { - this.refs[i].setScrollLeft(scrollLeft); - } - } - }, - - shouldComponentUpdate:function(nextProps) { - return ( - nextProps.width !== this.props.width - || nextProps.height !== this.props.height - || nextProps.columns !== this.props.columns - || !shallowEqual(nextProps.style, this.props.style) - ); - }, - - getStyle:function() { - return { - overflow: 'hidden', - width: '100%', - height: this.props.height, - position: 'absolute' - }; - } - - }); - - module.exports = HeaderRow; - - /***/ }, /* 46 */ /***/ function(module, exports, __webpack_require__) { @@ -3743,7 +3743,7 @@ return /******/ (function(modules) { // webpackBootstrap } module.exports = copyProperties; - + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(52))) /***/ }, @@ -3784,60 +3784,6 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, /* 48 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * @jsx React.DOM - * @copyright Prometheus Research, LLC 2014 - */ - 'use strict'; - - var ScrollShim = { - - appendScrollShim:function() { - if (!this._scrollShim) { - var size = this._scrollShimSize(); - var shim = document.createElement('div'); - shim.classList.add('react-grid-ScrollShim'); - shim.style.position = 'absolute'; - shim.style.top = 0; - shim.style.left = 0; - shim.style.width = (size.width + "px"); - shim.style.height = (size.height + "px"); - this.getDOMNode().appendChild(shim); - this._scrollShim = shim; - } - this._scheduleRemoveScrollShim(); - }, - - _scrollShimSize:function() { - return { - width: this.props.width, - height: this.props.length * this.props.rowHeight - }; - }, - - _scheduleRemoveScrollShim:function() { - if (this._scheduleRemoveScrollShimTimer) { - clearTimeout(this._scheduleRemoveScrollShimTimer); - } - this._scheduleRemoveScrollShimTimer = setTimeout( - this._removeScrollShim, 200); - }, - - _removeScrollShim:function() { - if (this._scrollShim) { - this._scrollShim.parentNode.removeChild(this._scrollShim); - this._scrollShim = undefined; - } - } - }; - - module.exports = ScrollShim; - - -/***/ }, -/* 49 */ /***/ function(module, exports, __webpack_require__) { /** @@ -3851,7 +3797,7 @@ return /******/ (function(modules) { // webpackBootstrap var Draggable = __webpack_require__(53); var PropTypes = React.PropTypes; - var ResizeHandle = React.createClass({displayName: 'ResizeHandle', + var ResizeHandle = React.createClass({displayName: "ResizeHandle", style: { position: 'absolute', @@ -3871,7 +3817,7 @@ return /******/ (function(modules) { // webpackBootstrap } }); - var HeaderCell = React.createClass({displayName: 'HeaderCell', + var HeaderCell = React.createClass({displayName: "HeaderCell", propTypes: { renderer: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).isRequired, @@ -3964,14 +3910,14 @@ return /******/ (function(modules) { // webpackBootstrap }); function simpleCellRenderer(props) { - return React.createElement("div", {className: "rex-widget-HeaderCell__value"}, props.column.name); + return React.createElement("div", {className: "rex-widget-HeaderCell__value", title: props.column.name}, props.column.name); } module.exports = HeaderCell; /***/ }, -/* 50 */ +/* 49 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -4010,6 +3956,60 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = getScrollbarSize; +/***/ }, +/* 50 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * @jsx React.DOM + * @copyright Prometheus Research, LLC 2014 + */ + 'use strict'; + + var ScrollShim = { + + appendScrollShim:function() { + if (!this._scrollShim) { + var size = this._scrollShimSize(); + var shim = document.createElement('div'); + shim.classList.add('react-grid-ScrollShim'); + shim.style.position = 'absolute'; + shim.style.top = 0; + shim.style.left = 0; + shim.style.width = (size.width + "px"); + shim.style.height = (size.height + "px"); + this.getDOMNode().appendChild(shim); + this._scrollShim = shim; + } + this._scheduleRemoveScrollShim(); + }, + + _scrollShimSize:function() { + return { + width: this.props.width, + height: this.props.length * this.props.rowHeight + }; + }, + + _scheduleRemoveScrollShim:function() { + if (this._scheduleRemoveScrollShimTimer) { + clearTimeout(this._scheduleRemoveScrollShimTimer); + } + this._scheduleRemoveScrollShimTimer = setTimeout( + this._removeScrollShim, 200); + }, + + _removeScrollShim:function() { + if (this._scrollShim) { + this._scrollShim.parentNode.removeChild(this._scrollShim); + this._scrollShim = undefined; + } + } + }; + + module.exports = ScrollShim; + + /***/ }, /* 51 */ /***/ function(module, exports, __webpack_require__) { @@ -4067,7 +4067,7 @@ return /******/ (function(modules) { // webpackBootstrap }; module.exports = invariant; - + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(52))) /***/ }, @@ -4077,69 +4077,40 @@ return /******/ (function(modules) { // webpackBootstrap // shim for using process in browser var process = module.exports = {}; + var queue = []; + var draining = false; - process.nextTick = (function () { - var canSetImmediate = typeof window !== 'undefined' - && window.setImmediate; - var canMutationObserver = typeof window !== 'undefined' - && window.MutationObserver; - var canPost = typeof window !== 'undefined' - && window.postMessage && window.addEventListener - ; - - if (canSetImmediate) { - return function (f) { return window.setImmediate(f) }; + function drainQueue() { + if (draining) { + return; } - - var queue = []; - - if (canMutationObserver) { - var hiddenDiv = document.createElement("div"); - var observer = new MutationObserver(function () { - var queueList = queue.slice(); - queue.length = 0; - queueList.forEach(function (fn) { - fn(); - }); - }); - - observer.observe(hiddenDiv, { attributes: true }); - - return function nextTick(fn) { - if (!queue.length) { - hiddenDiv.setAttribute('yes', 'no'); - } - queue.push(fn); - }; + draining = true; + var currentQueue; + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + var i = -1; + while (++i < len) { + currentQueue[i](); + } + len = queue.length; } - - if (canPost) { - window.addEventListener('message', function (ev) { - var source = ev.source; - if ((source === window || source === null) && ev.data === 'process-tick') { - ev.stopPropagation(); - if (queue.length > 0) { - var fn = queue.shift(); - fn(); - } - } - }, true); - - return function nextTick(fn) { - queue.push(fn); - window.postMessage('process-tick', '*'); - }; + draining = false; + } + process.nextTick = function (fun) { + queue.push(fun); + if (!draining) { + setTimeout(drainQueue, 0); } - - return function nextTick(fn) { - setTimeout(fn, 0); - }; - })(); + }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; + process.version = ''; // empty string to avoid regexp issues + process.versions = {}; function noop() {} @@ -4160,6 +4131,7 @@ return /******/ (function(modules) { // webpackBootstrap process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; + process.umask = function() { return 0; }; /***/ }, @@ -4174,9 +4146,9 @@ return /******/ (function(modules) { // webpackBootstrap var React = __webpack_require__(10); var PropTypes = React.PropTypes; - var emptyFunction = __webpack_require__(40); + var emptyFunction = __webpack_require__(39); - var Draggable = React.createClass({displayName: 'Draggable', + var Draggable = React.createClass({displayName: "Draggable", propTypes: { onDragStart: PropTypes.func, @@ -4258,3 +4230,4 @@ return /******/ (function(modules) { // webpackBootstrap /***/ } /******/ ]) }); +; \ No newline at end of file diff --git a/dist/ReactGrid.min.js b/dist/ReactGrid.min.js index 55c2c59..b2bc6d1 100644 --- a/dist/ReactGrid.min.js +++ b/dist/ReactGrid.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react/addons")):"function"==typeof define&&define.amd?define(["react/addons"],t):"object"==typeof exports?exports.ReactGrid=t(require("react/addons")):e.ReactGrid=t(e.React)}(this,function(e){return function(e){function t(r){if(s[r])return s[r].exports;var i=s[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var s={};return t.m=e,t.c=s,t.p="",t(0)}([function(e,t,s){"use strict";var r=s(1),i=s(2),o=s(3);e.exports=r,e.exports.Row=i,e.exports.Cell=o},function(e,t,s){"use strict";var r=s(10),i=(r.PropTypes,s(16)),o=s(17),n=s(18),l=(s(19),s(20)),a=s(21),c=s(22),p=s(23),h=s(24),d=s(25),u=s(26),f=(s(27),r.addons.cloneWithProps,r.createClass({displayName:"ExcelGrid",mixins:[l,p,a,c,h,d],getInitialState:function(){return{selectedRows:[],expandedRows:[]}},overrides:{onCellCommit:function(e){var t=e[0],s=Object.assign({},this.state.selected);s.active=!1,"Tab"===t.keyCode&&(s.idx+=1);var r=this.state.expandedRows;t.changed&&t.changed.expandedHeight&&(r=this.expandRow(t.rowIdx,t.changed.expandedHeight)),this.setState({selected:s,expandedRows:r}),this.props.onRowUpdated(t)},getColumns:function(){var e=this.getDecoratedColumns(this.props.columns);return this.props.enableRowSelect&&e.unshift({key:"select-row",name:"",formatter:r.createElement(u,null),onRowSelect:this.handleRowSelect,filterable:!1,headerRenderer:r.createElement("input",{type:"checkbox",onChange:this.handleCheckboxChange}),width:60}),e}},getDefaultProps:function(){return{rowHeight:35,enableRowSelect:!1,minHeight:350}},handleCheckboxChange:function(e){if(e.currentTarget.checked===!0){var t=this.props.rows.map(function(){return!0});this.setState({selectedRows:t})}else{var t=this.props.rows.map(function(){return!1});this.setState({selectedRows:t})}},handleRowSelect:function(e){var t=this.state.selectedRows;t[e]=null==t[e]||0==t[e]?!0:!1,this.setState({selectedRows:t})},expandRow:function(e,t){var s=this.state.expandedRows;return s[e]?(null==s[e]||s[e]<t)&&(s[e]=t):s[e]=t,s},addRow:function(){},handleShowMore:function(e,t){var s=this.expandRow(e,t);this.setState({expandedRows:s})},handleShowLess:function(e){var t=this.state.expandedRows;t[e]&&(t[e]=!1),this.setState({expandedRows:t})},expandAllRows:function(){},collapseAllRows:function(){},onAfterAddRow:function(e){this.setState({selected:{idx:1,rowIdx:e-2}}),this.refs.base.refs.viewport.refs.canvas.getDOMNode().scrollTop=e*this.props.rowHeight},componentWillReceiveProps:function(e){e.rows.length===this.props.rows.length+1&&this.onAfterAddRow(e.rows.length+1)},render:function(){var e=r.createElement(o,{selected:this.state.selected,copied:this.state.copied,dragged:this.state.dragged,onSelect:this.onSelect,onClick:this.onSelect,onSetActive:this.onSetActive,onCommit:this.onCellCommit,handleCopy:this.handleCopy,handlePaste:this.handlePaste,handleDragStart:this.handleDragStart,handleDragEnter:this.handleDragEnter,handleDragEnd:this.handleDragEnd,handleTerminateDrag:this.handleTerminateDrag,onShowMore:this.handleShowMore,onShowLess:this.handleShowLess,expandedRows:this.state.expandedRows}),t=this.filterRows(),s=this.renderToolbar();return r.createElement("div",{className:"react-grid-Container"},s,r.createElement("div",{className:"react-grid-Main"},r.createElement(i,r.__spread({ref:"base"},this.props,{length:this.props.rows.length,headerRows:this.getHeaderRows(),columns:this.getColumns(),rows:t,cellRenderer:e,rowRenderer:r.createElement(n,null),selectedRows:this.state.selectedRows,expandedRows:this.state.expandedRows,rowOffsetHeight:this.getRowOffsetHeight(),minHeight:this.props.minHeight}))))},renderToolbar:function(){var e=this.props.toolbar;return r.isValidElement(e)?r.addons.cloneWithProps(e,{onToggleFilter:this.onToggleFilter,rows:this.props.rows}):void 0}}));e.exports=f},function(e,t,s){"use strict";var r=s(10),i=r.addons.classSet,o=s(3),n=r.addons.cloneWithProps,l=s(11),a=r.createClass({displayName:"Row",render:function(){var e=i("react-grid-Row","react-grid-Row--"+(this.props.idx%2===0?"even":"odd")),t={height:this.getRowHeight(),overflow:"hidden"},s=this.getCells();return r.createElement("div",r.__spread({},this.props,{className:e,style:t}),r.isValidElement(this.props.row)?this.props.row:s)},getCells:function(){for(var e=[],t=[],s=0,r=this.props.columns.length;r>s;s++){var i=this.props.columns[s],o=this.renderCell({ref:s,key:s,idx:s,rowIdx:this.props.idx,filterRowIdx:this.props.row.key,value:this.getCellValue(i.key||s),column:i,height:this.getRowHeight(),formatter:i.formatter,rowData:this.props.row});i.locked?t.push(o):e.push(o)}return e.concat(t)},getRowHeight:function(){return this.props.expandedRows&&this.props.expandedRows[this.props.key]?this.props.expandedRows[this.props.key]:this.props.height},getCellValue:function(e){return"select-row"===e?this.props.isSelected:this.props.row[e]},renderCell:function(e){return r.isValidElement(this.props.cellRenderer)?n(this.props.cellRenderer,e):this.props.cellRenderer(e)},getDefaultProps:function(){return{cellRenderer:o}},shouldComponentUpdate:function(e){return!l.sameColumns(this.props.columns,e.columns,l.sameColumn)||this.doesRowContainSelectedCell()||this.doesRowContainSelectedCell(e)||this.willRowBeDraggedOver(e)||this.hasRowBeenCopied()||e.row!==this.props.row||e.height!==this.props.height},setScrollLeft:function(e){for(var t=0,s=this.props.columns.length;s>t;t++)this.props.columns[t].locked&&this.refs[t].setScrollLeft(e)},doesRowContainSelectedCell:function(e){var t=e||this.props,s=s||t.cellRenderer;return s.props.selected&&s.props.selected.rowIdx===t.idx?!0:!1},willRowBeDraggedOver:function(e){var t=e.cellRenderer.props.dragged;return null!=t&&(t.rowIdx||t.complete===!0)},hasRowBeenCopied:function(){var e=this.props.cellRenderer;return null!=e.props.copied&&e.props.copied.rowIdx===this.props.idx}});e.exports=a},function(e,t,s){"use strict";function r(e){return e.value}var i=s(10),o=i.addons.classSet,n=i.addons.cloneWithProps,l=i.createClass({displayName:"Cell",render:function(){var e=this.getStyle(),t=o("react-grid-Cell",this.props.className,this.props.column.locked?"react-grid-Cell--locked":null),s=this.renderCellContent({value:this.props.value,column:this.props.column,rowIdx:this.props.rowIdx,isExpanded:this.props.isExpanded});return i.createElement("div",i.__spread({},this.props,{className:t,style:e}),s,i.createElement("div",{className:"drag-handle",draggable:"true",onDragStart:this.props.handleDragStart}))},renderCellContent:function(e){var t=i.isValidElement(this.props.formatter)?n(this.props.formatter,e):this.props.formatter(e);return i.createElement("div",{className:"react-grid-Cell__value"},t," ",this.props.cellControls)},getDefaultProps:function(){return{formatter:r}},getStyle:function(){var e={position:"absolute",width:this.props.column.width,height:this.props.height,left:this.props.column.left};return e},setScrollLeft:function(e){if(this.isMounted()){var t=this.getDOMNode(),s="translate3d("+e+"px, 0px, 0px)";t.style.webkitTransform=s,t.style.transform=s}}});e.exports=l},,function(e,t,s){"use strict";var r=s(10),i=r.addons.classSet,o=s(12),n={propTypes:{onCommit:r.PropTypes.func.isRequired},getStyle:function(){return{height:this.props.height-1}},getInitialState:function(){return{isInvalid:!1}},onPressEnter:function(e){e.stopPropagation(),e.preventDefault(),this.commit({key:"Enter"})},onPressTab:function(e){e.stopPropagation(),e.preventDefault(),this.commit({key:"Tab"})},commit:function(e){var t=this.getValue(),s={};s[this.props.column.key]=t,this.isNewValueValid(t)&&this.props.onCommit({updated:s,key:e.key})},isNewValueValid:function(e){if(o(this.validate)){var t=this.validate(e);return this.setState({isInvalid:!t}),t}return!0},getValue:function(){return this.getInputNode().value},setValue:function(e){this.getInputNode().value=e},componentDidMount:function(){void 0!==this.getInputNode()&&(this.checkFocus(),this.getInputNode().className+=" editor-main")},checkFocus:function(){this.getInputNode().focus()},getInputNode:function(){return this.getDOMNode().getElementsByTagName("input")[0]},getContainerClass:function(){return i({"has-error":this.state.isInvalid===!0})},renderStatusIcon:function(){return this.state.isInvalid===!0?r.createElement("span",{className:"glyphicon glyphicon-remove form-control-feedback"}):void 0},render:function(){if(!o(this.renderEditorNode))throw"Editor Mixin Error : "+this.displayName+" component must implement method renderEditorNode";var e=this.renderEditorNode();return r.createElement("div",{className:this.getContainerClass()},e,this.renderStatusIcon())}};e.exports=n},function(e){"use strict";var t={onPressArrowLeft:function(e){e.stopPropagation()},onPressArrowRight:function(e){e.stopPropagation()},getDefaultValue:function(){var e=this.props.initialKeyCode;if("Delete"===e||"Backspace"===e)return"";if("Enter"===e)return this.props.value;var t=e?String.fromCharCode(e):this.props.value;return t},setCaretAtEndOfInput:function(){var e=this.getInputNode(),t=e.value.length;if(e.setSelectionRange)e.setSelectionRange(t,t);else if(e.createTextRange){var s=e.createTextRange();s.moveStart("character",txt.value.length),s.collapse(),s.select()}},setTextInputFocus:function(){this.isKeyPrintable(this.props.initialKeyCode)?this.getInputNode().select():(this.getInputNode().focus(),this.setCaretAtEndOfInput())}};e.exports=t},,,function(e,t,s){"use strict";var r=s(10),i=(r.addons.Perf,{onKeyDown:function(e){if(this.isCtrlKeyHeldDown(e))this.checkAndCall("onPressKeyWithCtrl",e);else if(this.isKeyIdentified(e.key)){var t="onPress"+e.key;this.checkAndCall(t,e)}else this.isKeyPrintable(e.keyCode)&&this.checkAndCall("onPressChar",e)},isKeyPrintable:function(e){var t=e>47&&58>e||32==e||13==e||e>64&&91>e||e>95&&112>e||e>185&&193>e||e>218&&223>e;return t},isKeyIdentified:function(e){return"Unidentified"!==e},isCtrlKeyHeldDown:function(e){return e.ctrlKey===!0&&"Control"!==e.key},checkAndCall:function(e,t){"function"==typeof this[e]&&this[e](t)}});e.exports=i},function(t){t.exports=e},function(e,t,s){"use strict";function r(e){var t,s,r,i=0,o=e.totalWidth,n=[],l=e.columns.map(p);for(t=0,s=l.length;s>t;t++)r=l[t],r.width?(/^([0-9]+)%$/.exec(r.width)&&(r.width=Math.floor(parseInt(r.width,10)/100*e.totalWidth)),o-=r.width,i+=r.width):n.push(r);for(t=0,s=n.length;s>t;t++)r=n[t],r.width=0>=o?e.minColumnWidth:Math.floor(o/n.length),i+=r.width;var a=0;for(t=0,s=l.length;s>t;t++)r=l[t],r.left=a,a+=r.width;return{columns:l,width:i,totalWidth:e.totalWidth,minColumnWidth:e.minColumnWidth}}function i(e,t,s){var i=e.columns[t];e=p(e),e.columns=e.columns.slice(0);var o=p(i);return o.width=Math.max(s,e.minColumnWidth),e.columns.splice(t,1,o),r(e)}function o(e,t,s){var r,i,o,n={},l={};if(e.length!==t.length)return!1;for(r=0,i=e.length;i>r;r++)o=e[r],n[o.key]=o;for(r=0,i=t.length;i>r;r++){o=t[r],l[o.key]=o;var a=n[o.key];if(void 0===a||!s(a,o))return!1}for(r=0,i=e.length;i>r;r++){o=e[r];var c=l[o.key];if(void 0===c)return!1}return!0}function n(e,t){var s;for(s in e)if(e.hasOwnProperty(s)){if("function"==typeof e[s]&&"function"==typeof t[s]||c(e[s])&&c(t[s]))continue;if(!t.hasOwnProperty(s)||e[s]!==t[s])return!1}for(s in t)if(t.hasOwnProperty(s)&&!e.hasOwnProperty(s))return!1;return!0}var l=s(10),a=l.PropTypes,c=l.isValidElement,p=s(28),h=s(29),d=s(19),u={mixins:[h.MetricsMixin],propTypes:{columns:a.array,minColumnWidth:a.number,columnEquality:a.func},DOMMetrics:{gridWidth:function(){return this.getDOMNode().offsetWidth-2}},getDefaultProps:function(){return{minColumnWidth:80,columnEquality:n}},getInitialState:function(){return this.getColumnMetrics(this.props,!0)},componentWillReceiveProps:function(e){if(e.columns)if(o(this.props.columns,e.columns,this.props.columnEquality)){var t={};this.state.columns.columns.forEach(function(e){t[e.key]={width:e.width,left:e.left}});var s=d(this.state.columns,{columns:e.columns.map(function(e){return d(e,t[e.key])})});this.setState({columns:s})}else this.setState(this.getColumnMetrics(e))},getColumnMetrics:function(e,t){var s=t?null:this.DOMMetrics.gridWidth();return{columns:r({columns:e.columns,width:null,totalWidth:s,minColumnWidth:e.minColumnWidth}),gridWidth:s}},metricsUpdated:function(){this.setState(this.getColumnMetrics(this.props))},onColumnResize:function(e,t){var s=i(this.state.columns,e,t);this.setState({columns:s})}};e.exports={Mixin:u,calculate:r,resizeColumn:i,sameColumns:o,sameColumn:n}},function(e){"use strict";var t=function(e){var t={};return e&&"[object Function]"===t.toString.call(e)};e.exports=t},,,function(e,t,s){"use strict";var r=s(10),i=(r.addons.classSet,s(27),s(5)),o=s(6),n=s(9),l=r.createClass({displayName:"SimpleTextEditor",mixins:[n,i,o],overrides:{checkFocus:function(){this.setTextInputFocus()}},renderEditorNode:function(){return r.createElement("input",{type:"text",onBlur:this.commit,className:"form-control",defaultValue:this.getDefaultValue(),style:this.getStyle(),onKeyDown:this.onKeyDown})}});e.exports=l},function(e,t,s){"use strict";var r=s(10),i=r.PropTypes,o=s(30),n=s(31),l=s(11),a=s(29),c={componentDidMount:function(){this._scrollLeft=this.refs.viewport.getScroll().scrollLeft,this._onScroll()},componentDidUpdate:function(){this._onScroll()},componentWillMount:function(){this._scrollLeft=void 0},componentWillUnmount:function(){this._scrollLeft=void 0},onScroll:function(e){var t=e.scrollLeft;this._scrollLeft!==t&&(this._scrollLeft=t,this._onScroll())},_onScroll:function(){void 0!==this._scrollLeft&&(this.refs.header.setScrollLeft(this._scrollLeft),this.refs.viewport.setScrollLeft(this._scrollLeft))}},p=r.createClass({displayName:"Grid",mixins:[c,l.Mixin,a.MetricsComputatorMixin],propTypes:{rows:i.oneOfType([i.array,i.func]).isRequired,columns:i.array.isRequired},getStyle:function(){return{overflow:"hidden",outline:0,position:"relative",minHeight:this.props.minHeight}},render:function(){var e=this.props.headerRows||[{ref:"row"}];return r.createElement("div",r.__spread({},this.props,{style:this.getStyle(),className:"react-grid-Grid"}),r.createElement(o,{ref:"header",columns:this.state.columns,onColumnResize:this.onColumnResize,height:this.props.rowHeight,totalWidth:this.DOMMetrics.gridWidth(),headerRows:e}),r.createElement(n,{ref:"viewport",width:this.state.columns.width,rowHeight:this.props.rowHeight,rowRenderer:this.props.rowRenderer,cellRenderer:this.props.cellRenderer,rows:this.props.rows,selectedRows:this.props.selectedRows,expandedRows:this.props.expandedRows,length:this.props.length,columns:this.state.columns,totalWidth:this.DOMMetrics.gridWidth(),onScroll:this.onScroll,onRows:this.props.onRows,rowOffsetHeight:this.props.rowOffsetHeight||this.props.rowHeight*e.length}))},getDefaultProps:function(){return{rowHeight:35,minHeight:350}}});e.exports=p},function(e,t,s){"use strict";var r=s(10),i=s(3),o=(s(32),s(33)),n=s(34),l=s(35),a=(s(27),s(9),s(12)),c=(r.PropTypes,r.addons.classSet),p=(r.addons.cloneWithProps,r.createClass({displayName:"CellControls",onClickEdit:function(e){e.stopPropagation(),e.preventDefault(),this.props.onClickEdit()},onShowMore:function(e){e.stopPropagation(),e.preventDefault();var t=this.props.column.getExpandedHeight(this.props.value);this.props.onShowMore(this.props.rowIdx,t)},onShowLess:function(e){e.stopPropagation(),e.preventDefault(),this.props.onShowLess(this.props.rowIdx)},shouldComponentUpdate:function(e){return this.props.height!=e.height},renderShowMoreButton:function(){if(a(this.props.column.getExpandedHeight)&&this.props.column.getExpandedHeight(this.props.value)>0){var e=this.props.column.getExpandedHeight(this.props.value);return e>this.props.height?r.createElement("button",{type:"button",className:"btn btn-link btn-xs",onClick:this.onShowMore},"Show More"):r.createElement("button",{type:"button",className:"btn btn-link btn-xs",onClick:this.onShowLess},"Show Less")}return null},render:function(){return r.createElement("div",{className:"pull-right btn-group"},this.renderShowMoreButton(),r.createElement("button",{onClick:this.onClickEdit,type:"button",className:"btn btn-link btn-xs"},"Edit"))}})),h=r.createClass({displayName:"ExcelCell",mixins:[o,n,l],overrides:{getCellClass:function(){return c({selected:this.isSelected()&&!this.isCopied()&&!this.isActive(),editing:this.isActive(),copied:this.isCopied(),"selected-draggable":this.isSelected()&&!this.isActive()&&this.canEdit(),"active-drag-cell":this.isActiveDragCell()&&this.canEdit(),"is-dragged-over-up":!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx<this.props.dragged.rowIdx,"is-dragged-over-down":!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx>this.props.dragged.rowIdx,"was-dragged-over":this.wasDraggedOver()&&this.canEdit()})}},isActiveDragCell:function(){return(this.isSelected()||this.isDraggedOver())&&!this.isActive()},isExpanded:function(){var e=!1;if(a(this.props.column.getExpandedHeight)&&this.props.column.getExpandedHeight(this.props.value)>0){var t=this.props.column.getExpandedHeight(this.props.value);e=this.props.height>=t?!0:!1}return e},shouldComponentUpdate:function(e){return this.props.column.width!==e.column.width||this.props.value!==e.value||this.props.height!==e.height||this.props.rowIdx!==e.rowIdx||this.isCellSelectionChanging(e)||this.isDraggedCellChanging(e)},render:function(){return r.createElement(i,r.__spread({},this.props,{className:this.getCellClass(),onKeyDown:this.onKeyDown,onClick:this.onClick,onDoubleClick:this.onDoubleClick,formatter:this.getFormatter(),handleDragStart:this.handleDragStart,onDragEnter:this.handleDragEnter,onDragEnd:this.props.handleDragEnd,cellControls:this.props.column.showCellControls&&!this.isActive()?r.createElement(p,{height:this.props.height,value:this.props.value,rowIdx:this.props.rowIdx,column:this.props.column,onShowMore:this.props.onShowMore,onShowLess:this.props.onShowLess,onClickEdit:this.setActive}):null,isExpanded:this.isExpanded()}))}});e.exports=h},function(e,t,s){"use strict";var r=s(10),i=(r.addons.classSet,s(2)),o=s(11),n=r.createClass({displayName:"ExcelRow",render:function(){var e=r.addons.update(this.props.row,{$merge:{"select-row":this.props.isSelected}});return r.createElement(i,r.__spread({},this.props,{row:e,height:this.getRowHeight(this.props)}))},getRowHeight:function(e){return e.expandedRows&&e.expandedRows[e.key]?e.expandedRows[e.key]:e.height},hasRowHeightChanged:function(e){return e.expandedRows&&"undefined"!=typeof e.expandedRows[e.key]?this.props.height!==e.expandedRows[e.key]:!1},shouldComponentUpdate:function(e){return!o.sameColumns(this.props.columns,e.columns,o.sameColumn)||this.doesRowContainSelectedCell()||this.doesRowContainSelectedCell(e)||this.willRowBeDraggedOver(e)||this.hasRowBeenCopied()||e.row!==this.props.row||this.props.isSelected!==e.isSelected||this.hasRowHeightChanged(e)},doesRowContainSelectedCell:function(e){var t=e||this.props,s=s||t.cellRenderer;return s.props&&s.props.selected&&s.props.selected.rowIdx===t.idx?!0:!1},willRowBeDraggedOver:function(e){if(e.cellRenderer.props){var t=e.cellRenderer.props.dragged;return null!=t&&(t.rowIdx||t.complete===!0)}return!1},hasRowBeenCopied:function(){if(this.props.cellRenderer.props){var e=this.props.cellRenderer;return null!=e.props.copied&&e.props.copied.rowIdx===this.props.idx}return!1},setScrollLeft:function(e){for(var t=0,s=this.props.columns.length;s>t;t++)this.props.columns[t].locked&&this.refs[t].setScrollLeft(e)}});e.exports=n},function(e){"use strict";function t(e,t){var s={};for(var r in e)s[r]=e[r];for(var r in t)s[r]=t[r];return s}var s=function(e,t){var s={};return null!=e&&Object.assign(s,e),null!=t&&Object.assign(s,t),s};e.exports=Object.assign?s:t},function(e){"use strict";var t={getDefaultProps:function(){return{enableCellSelect:!1}},getColumns:function(){return this.props.columns},getInitialState:function(){return this.props.enableCellSelect?{selected:{rowIdx:0,idx:0}}:{selected:{rowIdx:-1,idx:-1}}},onSelect:function(e){if(this.props.enableCellSelect){var t=e.idx,s=e.rowIdx;t>=0&&s>=0&&t<this.getColumns().length&&s<this.props.rows.length&&(this.props.onSelect&&this.props.onSelect({selected:e}),this.setState({selected:e}))}}};e.exports=t},function(e,t,s){"use strict";{var r=s(10),i=(r.PropTypes,s(27));s(20)}i.addAlias("SelectableGridMixin");var o={mixinDependencies:["SelectableGridMixin"],propTypes:{onCellsDragged:r.PropTypes.func},getInitialState:function(){return{dragged:null}},handleDragStart:function(e){var t=e.idx,s=e.rowIdx;t>=0&&s>=0&&t<this.getColumns().length&&s<this.props.rows.length&&this.setState({dragged:e})},handleDragEnter:function(e){var t=(this.state.selected,this.state.dragged);t.overRowIdx=e,this.setState({dragged:t})},handleDragEnd:function(){var e,t,s=this.state.selected,r=this.state.dragged,i=this.getColumns()[this.state.selected.idx].key;e=s.rowIdx<r.overRowIdx?s.rowIdx:r.overRowIdx,t=s.rowIdx>r.overRowIdx?s.rowIdx:r.overRowIdx,this.props.onCellsDragged({cellKey:i,fromRow:e,toRow:t,value:r.copiedText}),this.setState({dragged:{complete:!0}})},handleTerminateDrag:function(){this.setState({dragged:null})}};e.exports=o},function(e,t,s){"use strict";var r=s(10),i=(r.PropTypes,{propTypes:{onCellCopyPaste:r.PropTypes.func},getInitialState:function(){return{copied:null}},handleCopy:function(e){var t=e.value,s=this.state.selected,r={idx:s.idx,rowIdx:s.rowIdx};this.setState({textToCopy:t,copied:r})},handlePaste:function(){var e=this.state.selected,t=this.getColumns()[e.idx].key;this.props.onCellCopyPaste({cellKey:t,rowIdx:e.rowIdx,value:this.state.textToCopy,fromRow:this.state.copied.rowIdx,toRow:e.rowIdx}),this.setState({copied:null})}});e.exports=i},function(e,t,s){"use strict";var r=s(10),i=(r.PropTypes,s(19)),o={propTypes:{onRowUpdated:r.PropTypes.func},onCellCommit:function(e){var t=this.state.selected;t.active=!1,"Tab"===e.keyCode&&(t.idx+=1),this.setState({selected:t}),this.props.onRowUpdate(e)},onSetActive:function(e){var t=i(this.state.selected,e);this.setState({selected:t})}};e.exports=o},function(e,t,s){"use strict";var r=s(10),i=(r.PropTypes,s(36)),o=s(28),n={ASC:"ASC",DESC:"DESC"};Object.freeze(n);var l={getInitialState:function(){return{sortDirection:null,sortColumn:null}},getDecoratedColumns:function(){return this.props.columns.map(function(e){return e=o(e),e.sortable&&(e.headerRenderer=r.createElement(i,null),e.sortBy=this.sortBy,e.sorted=this.state.sortColumn===e.key?this.state.sortDirection:n.NONE),e},this)},sortBy:function(e,t){switch(t){case null:case void 0:t=n.ASC;break;case n.ASC:t=n.DESC;break;case n.DESC:t=null}this.setState({sortDirection:t,sortColumn:e.key})},sortRows:function(e){e=[].concat(e);var t=this.state.sortColumn,s=this.state.sortDirection;return null!=t&&null!==s?e.sort(function(e,r){var i=e[t],o=r[t];return s===n.ASC?i>o?1:o>i?-1:0:s===n.DESC?i>o?-1:o>i?1:0:void 0}):e}};e.exports=l},function(e,t,s){"use strict";var r=s(10),i=(r.PropTypes,s(37)),o={getInitialState:function(){return{canFilter:!1,columnFilters:{}}},filterRows:function(){var e=this.props.rows;return this.state.sortColumn&&(e=this.sortRows(e)),this.hasFilters()&&(e=e.map(function(e,t){return e.key=t,e}).filter(this.isRowDisplayed),this.props.onFilter&&this.props.onFilter(e)),e},hasFilters:function(){var e=!1;return Object.keys(this.state.columnFilters).every(function(t){var s=this.state.columnFilters[t];return null!=s&&void 0!=s&&""!=s?(e=!0,!1):!0},this),e},isRowDisplayed:function(e){var t=null;return Object.keys(this.state.columnFilters).every(function(s){var r=this.state.columnFilters[s].toLowerCase(),i=e[s].toString().toLowerCase();if(null!=r&&void 0!=r&&""!=r&&"string"==typeof i){if(!(i.indexOf(r)>-1))return t=!1,!1;t=!0}return!0},this),null==t?!1:t},onToggleFilter:function(){this.setState({canFilter:!this.state.canFilter})},handleAddFilter:function(e){var t=this.state.columnFilters;t[e.columnKey]=e.filterTerm,this.setState({columnFilters:t,selected:null})},getHeaderRows:function(){var e=[{ref:"row",height:this.props.rowHeight}];return this.state.canFilter===!0&&e.push({ref:"filterRow",headerCellRenderer:r.createElement(i,{onChange:this.handleAddFilter}),height:45}),e},getRowOffsetHeight:function(){var e=0;return this.getHeaderRows().forEach(function(t){return e+=t.height}),e}};e.exports=o},function(e,t,s){"use strict";var r=s(10),i=(r.addons.classSet,r.createClass({displayName:"CheckBoxEditor",PropTypes:{value:r.PropTypes.bool.isRequired},render:function(){return r.createElement("input",{className:"react-grid-CheckBox",type:"checkbox",checked:this.props.value,onChange:this.handleChange})},handleChange:function(){this.props.column.onRowSelect(this.props.rowIdx)},shouldComponentUpdate:function(e){return this.props.value!=e.value}}));e.exports=i},function(e,t,s){"use strict";var r=s(42),i=s(12),o=s(10);Object.assign||(Object.assign=s(38));var n=r({DEFINE_LIFE_CYCLE_METHOD:null,DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),l={getDefaultProps:n.DEFINE_LIFE_CYCLE_METHOD,propTypes:n.DEFINE_LIFE_CYCLE_METHOD,getInitialState:n.DEFINE_LIFE_CYCLE_METHOD,statics:n.DEFINE_LIFE_CYCLE_METHOD,displayName:n.DEFINE_LIFE_CYCLE_METHOD,componentWillMount:n.DEFINE_LIFE_CYCLE_METHOD,componentWillReceiveProps:n.DEFINE_LIFE_CYCLE_METHOD,shouldComponentUpdate:n.DEFINE_LIFE_CYCLE_METHOD,componentWillUpdate:n.DEFINE_LIFE_CYCLE_METHOD,componentDidUpdate:n.DEFINE_LIFE_CYCLE_METHOD,componentWillUnmount:n.DEFINE_LIFE_CYCLE_METHOD},a={},c=function(e,t){this.base=e,this.dependsOn=t},p=function(e){this.assignTo=function(t){return new c(t,e)}},h=function(e,t){Object.keys(e).forEach(function(s){if(f.isCustomProperty(s))i(e[s])&&(e[s]=f.wrapCustomMethod(s,e[s]));else{switch(l[s]){case n.DEFINE_LIFE_CYCLE_METHOD:var r={};r[s]=e[s],t.push(r);break;case n.DEFINE_MANY_MERGED:}delete e[s]}},this)},d={mix:function(e){var t=[],s={},r=f.getUniqueDependencies(e);for(var i in r)Object.assign(s,a[r[i]]);return h(s,t),e.forEach(function(e){var r={};e instanceof c?Object.assign(r,e.base):Object.assign(r,e),h(r,t),Object.assign(s,r)},this),t.push(s),t},createDependency:function(e){var t=[];for(var s in e)e[s]instanceof c?this.addAlias(s,e[s].base):this.addAlias(s,e[s]),t.push(s);var r=t.filter(function(e,t,s){return s.indexOf(e)===t});return new p(r)},addAlias:function(e,t){a[e]=t}},u=o.createClass;o.createClass=function(e){return e.mixins&&(e.mixins=d.mix(e.mixins)),u.apply(o,arguments)};var f={isCustomProperty:function(e){return!l[e]},wrapCustomMethod:function(e,t){return function(){return f.isMethodOverridden.call(this,e)?f.callOverriddenMethod.call(this,e,arguments):t.apply(this,arguments)}},checkMethodExtendedAndCall:function(e,t){return this.extended&&"function"==typeof this.extended[e]?this.extended[e].call(this,t):void 0},checkMethodImplementedAndCall:function(e,t){return this.implemented&&"function"==typeof this.implemented[e]?this.implemented[e].call(this,t):void 0},isMethodOverridden:function(e){return this.overrides&&"function"==typeof this.overrides[e]},callOverriddenMethod:function(e,t){return this.overrides[e].call(this,t)},getUniqueDependencies:function(e){var t=[];return e.forEach(function(e){e instanceof c&&(t=t.concat(e.dependsOn))},this),t.filter(function(e,t,s){return s.indexOf(e)===t})}};e.exports=d},function(e){"use strict";function t(e){var t={};for(var s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);return t}e.exports=t},function(e,t,s){"use strict";var r=s(10),i=s(40),o=s(28),n=s(41),l={metricsComputator:r.PropTypes.object},a={childContextTypes:l,getChildContext:function(){return{metricsComputator:this}},getMetricImpl:function(e){return this._DOMMetrics.metrics[e].value},registerMetricsImpl:function(e,t){var s={},r=this._DOMMetrics;for(var i in t)n(void 0===r.metrics[i],"DOM metric "+i+" is already defined"),r.metrics[i]={component:e,computator:t[i].bind(e)},s[i]=this.getMetricImpl.bind(null,i);return-1===r.components.indexOf(e)&&r.components.push(e),s},unregisterMetricsFor:function(e){var t=this._DOMMetrics,s=t.components.indexOf(e);if(s>-1){t.components.splice(s,1);var r,i={};for(r in t.metrics)t.metrics[r].component===e&&(i[r]=!0);for(r in i)delete t.metrics[r]}},updateMetrics:function(){var e=this._DOMMetrics,t=!1;for(var s in e.metrics){var r=e.metrics[s].computator();r!==e.metrics[s].value&&(t=!0),e.metrics[s].value=r}if(t)for(var i=0,o=e.components.length;o>i;i++)e.components[i].metricsUpdated&&e.components[i].metricsUpdated()},componentWillMount:function(){this._DOMMetrics={metrics:{},components:[]}},componentDidMount:function(){window.addEventListener?window.addEventListener("resize",this.updateMetrics):window.attachEvent("resize",this.updateMetrics),this.updateMetrics()},componentWillUnmount:function(){window.removeEventListener("resize",this.updateMetrics)}},c={contextTypes:l,componentWillMount:function(){if(this.DOMMetrics){this._DOMMetricsDefs=o(this.DOMMetrics),this.DOMMetrics={};for(var e in this._DOMMetricsDefs)this.DOMMetrics[e]=i}},componentDidMount:function(){this.DOMMetrics&&(this.DOMMetrics=this.registerMetrics(this._DOMMetricsDefs))},componentWillUnmount:function(){return this.registerMetricsImpl?void(this.hasOwnProperty("DOMMetrics")&&delete this.DOMMetrics):this.context.metricsComputator.unregisterMetricsFor(this)},registerMetrics:function(e){return this.registerMetricsImpl?this.registerMetricsImpl(this,e):this.context.metricsComputator.registerMetricsImpl(this,e)},getMetric:function(e){return this.getMetricImpl?this.getMetricImpl(e):this.context.metricsComputator.getMetricImpl(e)}};e.exports={MetricsComputatorMixin:a,MetricsMixin:c}},function(e,t,s){"use strict";var r=s(10),i=r.addons.classSet,o=s(28),n=s(11),l=s(45),n=s(11),a=r.createClass({displayName:"Header",propTypes:{columns:r.PropTypes.object.isRequired,totalWidth:r.PropTypes.number,height:r.PropTypes.number.isRequired,headerRows:r.PropTypes.array.isRequired},render:function(){var e=(this.state.resizing||this.props,i({"react-grid-Header":!0,"react-grid-Header--resizing":!!this.state.resizing})),t=this.getHeaderRows();return r.createElement("div",r.__spread({},this.props,{style:this.getStyle(),className:e}),t)},shouldComponentUpdate:function(e,t){return!n.sameColumns(this.props.columns.columns,e.columns.columns,n.sameColumn)||this.props.totalWidth!=e.totalWidth||this.props.headerRows.length!=e.headerRows.length||this.state.resizing!=t.resizing},getHeaderRows:function(){var e=this.state.resizing||this.props,t=[];return this.props.headerRows.forEach(function(s,i){var o={position:"absolute",top:this.props.height*i,left:0,width:this.props.totalWidth};t.push(r.createElement(l,{key:s.ref,ref:s.ref,style:o,onColumnResize:this.onColumnResize,onColumnResizeEnd:this.onColumnResizeEnd,width:e.columns.width,height:s.height||this.props.height,columns:e.columns.columns,resizing:e.column,headerCellRenderer:s.headerCellRenderer}))}.bind(this)),t},getInitialState:function(){return{resizing:null}},componentWillReceiveProps:function(){this.setState({resizing:null})},onColumnResize:function(e,t){var s=this.state.resizing||this.props,r=this.getColumnPosition(e);if(null!==r){var i={columns:o(s.columns)};i.columns=n.resizeColumn(i.columns,r,t),i.columns.width<s.columns.width&&(i.columns.width=s.columns.width),i.column=i.columns.columns[r],this.setState({resizing:i})}},getColumnPosition:function(e){var t=this.state.resizing||this.props,s=t.columns.columns.indexOf(e);return-1===s?null:s},onColumnResizeEnd:function(e,t){var s=this.getColumnPosition(e);null!==s&&this.props.onColumnResize&&this.props.onColumnResize(s,t||e.width)},setScrollLeft:function(e){var t=this.refs.row.getDOMNode();t.scrollLeft=e,this.refs.row.setScrollLeft(e)},getStyle:function(){return{position:"relative",height:this.props.height}}});e.exports=a},function(e,t,s){"use strict";var r=s(10),i=s(43),o=s(29),n=s(44),l=Math.min,a=Math.max,c=Math.floor,p=Math.ceil,h={mixins:[o.MetricsMixin],DOMMetrics:{viewportHeight:function(){return this.getDOMNode().offsetHeight}},propTypes:{rowHeight:r.PropTypes.number,length:r.PropTypes.number.isRequired},getDefaultProps:function(){return{rowHeight:30}},getInitialState:function(){return this.getGridState(this.props) -},getGridState:function(e){var t=this.state&&this.state.height?this.state.height:i().height,s=p(t/e.rowHeight);return{displayStart:0,displayEnd:2*s,height:t,scrollTop:0,scrollLeft:0}},updateScroll:function(e,t,s,r,i){var o=p(s/r),n=c(e/r),h=l(n+o,i),d=a(0,n-2*o),u=l(n+2*o,i),f={visibleStart:n,visibleEnd:h,displayStart:d,displayEnd:u,height:s,scrollTop:e,scrollLeft:t};this.setState(f)},metricsUpdated:function(){var e=this.DOMMetrics.viewportHeight();e&&this.updateScroll(this.state.scrollTop,this.state.scrollLeft,e,this.props.rowHeight,this.props.length)},componentWillReceiveProps:function(e){this.props.rowHeight!==e.rowHeight?this.setState(this.getGridState(e)):this.props.length!==e.length&&this.updateScroll(this.state.scrollTop,this.state.scrollLeft,this.state.height,e.rowHeight,e.length)}},d=r.createClass({displayName:"Viewport",mixins:[h],render:function(){var e={padding:0,bottom:0,left:0,right:0,overflow:"hidden",position:"absolute",top:this.props.rowOffsetHeight};return r.createElement("div",{className:"react-grid-Viewport",style:e},r.createElement(n,{ref:"canvas",totalWidth:this.props.totalWidth,width:this.props.columns.width,rows:this.props.rows,selectedRows:this.props.selectedRows,expandedRows:this.props.expandedRows,columns:this.props.columns.columns,cellRenderer:this.props.cellRenderer,rowRenderer:this.props.rowRenderer,visibleStart:this.state.visibleStart,visibleEnd:this.state.visibleEnd,displayStart:this.state.displayStart,displayEnd:this.state.displayEnd,length:this.props.length,height:this.state.height,rowHeight:this.props.rowHeight,onScroll:this.onScroll,onRows:this.props.onRows}))},getScroll:function(){return this.refs.canvas.getScroll()},onScroll:function(e){var t=e.scrollTop,s=e.scrollLeft;this.updateScroll(t,s,this.state.height,this.props.rowHeight,this.props.length),this.props.onScroll&&this.props.onScroll({scrollTop:t,scrollLeft:s})},setScrollLeft:function(e){this.refs.canvas.setScrollLeft(e)}});e.exports=d},function(e,t,s){"use strict";var r=s(10),i=(r.addons.classSet,r.addons.cloneWithProps,s(9)),o=s(27),n=o.createDependency({KeyboardHandlerMixin:i}).assignTo({getDefaultProps:function(){return{tabIndex:-1,ref:"cell"}},isSelected:function(){return this.props.selected&&this.props.selected.rowIdx===this.props.rowIdx&&this.props.selected.idx===this.props.idx},onClick:function(){var e=this.props.rowIdx,t=this.props.idx;this.props.onClick({rowIdx:e,idx:t})},onPressArrowUp:function(e){this.moveSelectedCell(e,-1,0)},onPressArrowDown:function(e){this.moveSelectedCell(e,1,0)},onPressArrowLeft:function(e){this.moveSelectedCell(e,0,-1)},onPressArrowRight:function(e){this.moveSelectedCell(e,0,1)},onPressTab:function(e){this.moveSelectedCell(e,0,1)},moveSelectedCell:function(e,t,s){e.stopPropagation(),e.preventDefault();var r=this.props.rowIdx+t,i=this.props.idx+s;this.props.onSelect({idx:i,rowIdx:r})},setScrollLeft:function(e){this.refs.row.setScrollLeft(e)},componentDidMount:function(){this.checkFocus()},componentDidUpdate:function(){this.checkFocus()},isCellSelectionChanging:function(e){return this.props.selected&&e.selected?this.props.idx===e.selected.idx||this.props.idx===this.props.selected.idx:!0},checkFocus:function(){this.isSelected()&&this.getDOMNode().focus()}});e.exports=n},function(e,t,s){"use strict";var r=s(10),i=(r.addons.classSet,r.addons.cloneWithProps),o=s(15),n=r.PropTypes,l=s(27),a=s(32),c=s(9),p=l.createDependency({KeyboardHandlerMixin:c,SelectableMixin:a}).assignTo({propTypes:{onCommit:n.func.isRequired},canEdit:function(){return null!=this.props.column.editor||this.props.column.editable},getEditor:function(){var e={height:this.props.height,onPressEscape:this.onPressEscape,onCommit:this.onCommit,initialKeyCode:this.props.selected.initialKeyCode,editorRowMetaData:this.getEditorRowMetaData()},t=this.props.column.editor;return t&&r.isValidElement(t)?i(t,e):i(o(),e)},getEditorRowMetaData:function(){this.props.column.ItemId;return"function"==typeof this.props.column.getEditorRowMetaData?this.props.column.getEditorRowMetaData(this.props.rowData):void 0},getFormatter:function(){this.props.column;return this.isActive()?this.getEditor():this.props.column.formatter},onCommit:function(e){var t=this.props.rowIdx,s=(this.props.idx,this.props.column.key);this.props.onCommit({cellKey:s,rowIdx:this.props.filterRowIdx||t,updated:e.updated,keyCode:e.key})},checkFocus:function(){this.isSelected()&&!this.isActive()&&this.getDOMNode().focus()},onClick:function(){if(!this.isActive()){var e=this.props.rowIdx,t=this.props.idx;this.props.onClick({rowIdx:e,idx:t})}},onDoubleClick:function(){var e=this.props.rowIdx,t=this.props.idx;this.props.onClick({rowIdx:e,idx:t,active:this.canEdit()})},setActive:function(e){var t=this.props.rowIdx,s=this.props.idx;"select-row"===this.props.column.key&&this.props.column.onRowSelect?this.props.column.onRowSelect(t):this.canEdit()&&!this.isActive()&&this.props.onSetActive({idx:s,rowIdx:t,active:!0,initialKeyCode:e})},setInactive:function(){if(this.canEdit()&&this.isActive()){var e=this.props.rowIdx,t=this.props.idx;this.props.onSetActive({idx:t,rowIdx:e,active:!1})}},isActive:function(){return this.isSelected()&&this.props.selected.active===!0},onPressEnter:function(e){this.setActive(e.key)},onPressDelete:function(e){this.setActive(e.key)},onPressEscape:function(e){this.setInactive(e.key)},onPressBackspace:function(e){this.setActive(e.key)},onPressChar:function(e){this.isKeyPrintable(e.keyCode)&&this.setActive(e.keyCode)}});e.exports=p},function(e,t,s){"use strict";var r=s(10),i=r.addons.classSet,o=(r.addons.cloneWithProps,r.PropTypes,s(15),s(27)),n=s(32),l=s(9),a=o.createDependency({KeyboardHandlerMixin:l,SelectableMixin:n}).assignTo({getCellClass:function(){return i({selected:this.isSelected()&&!this.isCopied(),copied:this.isCopied()})},KeyCode_c:"99",KeyCode_C:"67",KeyCode_V:"86",KeyCode_v:"118",propTypes:{handleCopy:r.PropTypes.func.isRequired,handlePaste:r.PropTypes.func.isRequired},isCopied:function(){return this.props.copied&&this.props.copied.rowIdx===this.props.rowIdx&&this.props.copied.idx===this.props.idx},onPressKeyWithCtrl:function(e){this.canEdit()&&(e.keyCode==this.KeyCode_c||e.keyCode==this.KeyCode_C?this.props.handleCopy({value:this.props.value}):(e.keyCode==this.KeyCode_v||e.keyCode==this.KeyCode_V)&&this.props.handlePaste({value:this.props.value}))}});e.exports=a},function(e,t,s){"use strict";var r=s(10),i=r.addons.classSet,o=(r.addons.cloneWithProps,r.PropTypes,s(27)),n=s(32),l=s(9),a=o.createDependency({KeyboardHandlerMixin:l,SelectableMixin:n}).assignTo({getCellClass:function(){return i({"selected-draggable":this.isSelected(),"active-drag-cell":this.isSelected()||this.isDraggedOver(),"is-dragged-over-up":!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx<this.props.dragged.rowIdx,"is-dragged-over-down":!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx>this.props.dragged.rowIdx,"was-dragged-over":this.wasDraggedOver()})},getDefaultProps:function(){return{handleDragStart:this.handleDragStart,onDragEnter:this.handleDragEnter,onDragEnd:this.handleDragEnd}},propTypes:{handleDragEnter:r.PropTypes.func.isRequired,handleDragStart:r.PropTypes.func.isRequired,handleDragEnd:r.PropTypes.func.isRequired,handleTerminateDrag:r.PropTypes.func.isRequired},isDraggedOver:function(){return this.props.dragged&&this.props.dragged.overRowIdx===this.props.rowIdx&&this.props.dragged.idx===this.props.idx},wasDraggedOver:function(){return this.props.dragged&&(this.props.dragged.overRowIdx<this.props.rowIdx&&this.props.rowIdx<this.props.dragged.rowIdx||this.props.dragged.overRowIdx>this.props.rowIdx&&this.props.rowIdx>this.props.dragged.rowIdx)&&this.props.dragged.idx===this.props.idx},handleDragStart:function(){var e=this.props.rowIdx,t=this.props.idx;this.props.handleDragStart({rowIdx:e,idx:t,copiedText:this.props.value})},handleDragEnter:function(){this.props.handleDragEnter(this.props.rowIdx)},handleDragEnd:function(){this.props.handleDragEnd()},isDraggedCellChanging:function(e){return this.props.dragged?e.dragged&&this.props.idx===e.dragged.idx||this.props.dragged&&this.props.idx===this.props.dragged.idx:!1},componentDidUpdate:function(){var e=this.props.dragged;e&&e.complete===!0&&this.props.handleTerminateDrag()}});e.exports=a},function(e,t,s){"use strict";var r=s(10),i=r.addons.classSet,o=r.createClass({displayName:"SortableHeaderCell",onClick:function(){this.props.column.sortBy(this.props.column,this.props.column.sorted)},getSortByClass:function(){var e=this.props.column.sorted;return i({"pull-right":!0,"glyphicon glyphicon-arrow-up":"ASC"===e,"glyphicon glyphicon-arrow-down":"DESC"===e})},render:function(){return r.createElement("div",{onClick:this.onClick,style:{cursor:"pointer"}},this.props.column.name,r.createElement("span",{className:this.getSortByClass()}))}});e.exports=o},function(e,t,s){"use strict";var r=s(10),i=(r.addons.classSet,r.createClass({displayName:"FilterableHeaderCell",getInitialState:function(){return{filterTerm:""}},handleChange:function(e){e.preventDefault(),e.stopPropagation(),this.setState({filterTerm:e.currentTarget.value}),this.props.onChange({filterTerm:e.currentTarget.value,columnKey:this.props.column.key})},componentDidUpdate:function(){this.getDOMNode().focus()},render:function(){return r.createElement("div",null,r.createElement("div",{className:"form-group"},r.createElement(this.renderInput,null)))},renderInput:function(){return this.props.column.filterable===!1?r.createElement("span",null):r.createElement("input",{type:"text",className:"form-control input-sm",placeholder:"Search",value:this.state.filterTerm,onChange:this.handleChange})}}));e.exports=i},function(e){"use strict";function t(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=Object.assign||function(e){for(var s,r,i=t(e),o=1;o<arguments.length;o++){s=arguments[o],r=Object.keys(Object(s));for(var n=0;n<r.length;n++)i[r[n]]=s[r[n]]}return i}},,function(e,t,s){"use strict";function r(e){return function(){return e}}function i(){}var o=s(46);o(i,{thatReturns:r,thatReturnsFalse:r(!1),thatReturnsTrue:r(!0),thatReturnsNull:r(null),thatReturnsThis:function(){return this},thatReturnsArgument:function(e){return e}}),e.exports=i},function(e,t,s){(function(t){"use strict";var s=function(e,s,r,i,o,n,l,a){if(t.env.NODE_ENV&&void 0===s)throw new Error("invariant requires an error message argument");if(!e){var c;if(void 0===s)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[r,i,o,n,l,a],h=0;c=new Error("Invariant Violation: "+s.replace(/%s/g,function(){return p[h++]}))}throw c.framesToPop=1,c}};e.exports=s}).call(t,s(52))},function(e,t,s){(function(t){"use strict";var r=s(51),i=function(e){var s,i={};"production"!==t.env.NODE_ENV?r(e instanceof Object&&!Array.isArray(e),"keyMirror(...): Argument must be an object."):r(e instanceof Object&&!Array.isArray(e));for(s in e)e.hasOwnProperty(s)&&(i[s]=s);return i};e.exports=i}).call(t,s(52))},function(e){"use strict";function t(){var e=window.innerWidth,t=window.innerHeight;return e&&t||(e=document.documentElement.clientWidth,t=document.documentElement.clientHeight),e&&t||(e=document.body.clientWidth,t=document.body.clientHeight),{width:e,height:t}}e.exports=t},function(e,t,s){"use strict";var r=s(10),i=r.addons.classSet,o=r.PropTypes,n=r.addons.cloneWithProps,l=s(47),a=s(40),c=s(48),p=s(2),h=r.createClass({displayName:"Canvas",mixins:[c],propTypes:{cellRenderer:o.element,rowRenderer:o.oneOfType([o.func,o.element]),rowHeight:o.number.isRequired,displayStart:o.number.isRequired,displayEnd:o.number.isRequired,length:o.number.isRequired,rows:o.oneOfType([o.func.isRequired,o.array.isRequired]),onRows:o.func},render:function(){var e=this.state.displayStart,t=this.state.displayEnd,s=this.props.rowHeight,o=this.props.length,n=this.getRows(e,t).map(function(t,r){return this.renderRow({key:e+r,ref:r,idx:e+r,row:t,height:s,columns:this.props.columns,cellRenderer:this.props.cellRenderer,isSelected:this.isRowSelected(e+r),expandedRows:this.props.expandedRows})}.bind(this));this._currentRowsLength=n.length,e>0&&n.unshift(this.renderPlaceholder("top",e*s)),o-t>0&&n.push(this.renderPlaceholder("bottom",(o-t)*s));var l={position:"absolute",top:0,left:0,overflowX:"auto",overflowY:"scroll",width:this.props.totalWidth,height:this.props.height,transform:"translate3d(0, 0, 0)"};return r.createElement("div",{style:l,onScroll:this.onScroll,className:i("react-grid-Canvas",this.props.className)},r.createElement("div",{style:{width:this.props.width,overflow:"hidden"}},n))},renderRow:function(e){return r.isValidElement(this.props.rowRenderer)?n(this.props.rowRenderer,e):this.props.rowRenderer(e)},renderPlaceholder:function(e,t){return r.createElement("div",{key:e,style:{height:t}},this.props.columns.map(function(e,t){return r.createElement("div",{style:{width:e.width},key:t})}))},getDefaultProps:function(){return{rowRenderer:r.createElement(p,null),onRows:a}},isRowSelected:function(e){return this.props.selectedRows&&this.props.selectedRows[e]===!0},getInitialState:function(){return{shouldUpdate:!0,displayStart:this.props.displayStart,displayEnd:this.props.displayEnd}},componentWillMount:function(){this._currentRowsLength=void 0,this._currentRowsRange=void 0,this._scroll=void 0},componentDidMount:function(){this.onRows()},componentDidUpdate:function(){void 0!==this._scroll&&this.setScrollLeft(this._scroll),this.onRows()},componentWillUnmount:function(){this._currentRowsLength=void 0,this._currentRowsRange=void 0,this._scroll=void 0},componentWillReceiveProps:function(e){var t=!(e.visibleStart>this.state.displayStart&&e.visibleEnd<this.state.displayEnd&&e.length===this.props.length&&e.rowHeight===this.props.rowHeight&&e.columns===this.props.columns&&e.width===this.props.width&&l(e.style,this.props.style));this.setState(t?{shouldUpdate:!0,displayStart:e.displayStart,displayEnd:e.displayEnd}:{shouldUpdate:!1})},shouldComponentUpdate:function(e,t){return t.shouldUpdate},onRows:function(){void 0!==this._currentRowsRange&&(this.props.onRows(this._currentRowsRange),this._currentRowsRange=void 0)},getRows:function(e,t){return this._currentRowsRange={start:e,end:t},Array.isArray(this.props.rows)?this.props.rows.slice(e,t):this.props.rows(e,t)},setScrollLeft:function(e){if(void 0!==this._currentRowsLength)for(var t=0,s=this._currentRowsLength;s>t;t++)this.refs[t]&&this.refs[t].setScrollLeft(e)},getScroll:function(){var e=this.getDOMNode(),t=e.scrollTop,s=e.scrollLeft;return{scrollTop:t,scrollLeft:s}},onScroll:function(e){this.appendScrollShim();var t=e.target,s=t.scrollTop,r=t.scrollLeft,i={scrollTop:s,scrollLeft:r};this._scroll=i,this.props.onScroll(i)}});e.exports=h},function(e,t,s){"use strict";var r=s(10),i=r.PropTypes,o=s(47),n=s(49),l=s(50),a=r.createClass({displayName:"HeaderRow",propTypes:{width:i.number,height:i.number.isRequired,columns:i.array.isRequired,onColumnResize:i.func},render:function(){var e={width:this.props.width?this.props.width+l():"100%",height:this.props.height,whiteSpace:"nowrap",overflowX:"hidden",overflowY:"hidden"},t=this.getCells();return r.createElement("div",r.__spread({},this.props,{className:"react-grid-HeaderRow"}),r.createElement("div",{style:e},t))},getCells:function(){for(var e=[],t=[],s=0,i=this.props.columns.length;i>s;s++){var o=this.props.columns[s],l=r.createElement(n,{ref:s,key:s,height:this.props.height,column:o,renderer:this.props.headerCellRenderer||o.headerRenderer||this.props.cellRenderer,resizing:this.props.resizing===o,onResize:this.props.onColumnResize,onResizeEnd:this.props.onColumnResizeEnd});o.locked?t.push(l):e.push(l)}return e.concat(t)},setScrollLeft:function(e){for(var t=0,s=this.props.columns.length;s>t;t++)this.props.columns[t].locked&&this.refs[t].setScrollLeft(e)},shouldComponentUpdate:function(e){return e.width!==this.props.width||e.height!==this.props.height||e.columns!==this.props.columns||!o(e.style,this.props.style)},getStyle:function(){return{overflow:"hidden",width:"100%",height:this.props.height,position:"absolute"}}});e.exports=a},function(e,t,s){(function(t){"use strict";function s(e,s,r,i,o,n,l){if(e=e||{},t.env.NODE_ENV&&l)throw new Error("Too many arguments passed to copyProperties");for(var a,c=[s,r,i,o,n],p=0;c[p];){a=c[p++];for(var h in a)e[h]=a[h];a.hasOwnProperty&&a.hasOwnProperty("toString")&&"undefined"!=typeof a.toString&&e.toString!==a.toString&&(e.toString=a.toString)}return e}e.exports=s}).call(t,s(52))},function(e){"use strict";function t(e,t){if(e===t)return!0;var s;for(s in e)if(e.hasOwnProperty(s)&&(!t.hasOwnProperty(s)||e[s]!==t[s]))return!1;for(s in t)if(t.hasOwnProperty(s)&&!e.hasOwnProperty(s))return!1;return!0}e.exports=t},function(e){"use strict";var t={appendScrollShim:function(){if(!this._scrollShim){var e=this._scrollShimSize(),t=document.createElement("div");t.classList.add("react-grid-ScrollShim"),t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.width=e.width+"px",t.style.height=e.height+"px",this.getDOMNode().appendChild(t),this._scrollShim=t}this._scheduleRemoveScrollShim()},_scrollShimSize:function(){return{width:this.props.width,height:this.props.length*this.props.rowHeight}},_scheduleRemoveScrollShim:function(){this._scheduleRemoveScrollShimTimer&&clearTimeout(this._scheduleRemoveScrollShimTimer),this._scheduleRemoveScrollShimTimer=setTimeout(this._removeScrollShim,200)},_removeScrollShim:function(){this._scrollShim&&(this._scrollShim.parentNode.removeChild(this._scrollShim),this._scrollShim=void 0)}};e.exports=t},function(e,t,s){"use strict";function r(e){return i.createElement("div",{className:"rex-widget-HeaderCell__value"},e.column.name)}var i=s(10),o=i.addons.classSet,n=s(53),l=i.PropTypes,a=i.createClass({displayName:"ResizeHandle",style:{position:"absolute",top:0,right:0,width:6,height:"100%"},render:function(){return i.createElement(n,i.__spread({},this.props,{className:"react-grid-HeaderCell__resizeHandle",style:this.style}))}}),c=i.createClass({displayName:"HeaderCell",propTypes:{renderer:l.oneOfType([l.func,l.element]).isRequired,column:l.object.isRequired,onResize:l.func},render:function(){var e=o({"react-grid-HeaderCell":!0,"react-grid-HeaderCell--resizing":this.state.resizing,"react-grid-HeaderCell--locked":this.props.column.locked});e=o(e,this.props.className);var t=this.getCell();return i.createElement("div",{className:e,style:this.getStyle()},t,this.props.column.resizeable?i.createElement(a,{onDrag:this.onDrag,onDragStart:this.onDragStart,onDragEnd:this.onDragEnd}):null)},getCell:function(){return i.isValidElement(this.props.renderer)?i.addons.cloneWithProps(this.props.renderer,{column:this.props.column}):this.props.renderer({column:this.props.column})},getDefaultProps:function(){return{renderer:r}},getInitialState:function(){return{resizing:!1}},setScrollLeft:function(e){var t=this.getDOMNode();t.style.webkitTransform="translate3d("+e+"px, 0px, 0px)",t.style.transform="translate3d("+e+"px, 0px, 0px)"},getStyle:function(){return{width:this.props.column.width,left:this.props.column.left,display:"inline-block",position:"absolute",overflow:"hidden",height:this.props.height,margin:0,textOverflow:"ellipsis",whiteSpace:"nowrap"}},onDragStart:function(){this.setState({resizing:!0})},onDrag:function(e){var t=this.getWidthFromMouseEvent(e);t>0&&this.props.onResize&&this.props.onResize(this.props.column,t)},onDragEnd:function(e){var t=this.getWidthFromMouseEvent(e);this.props.onResizeEnd(this.props.column,t),this.setState({resizing:!1})},getWidthFromMouseEvent:function(e){var t=e.pageX,s=this.getDOMNode().getBoundingClientRect().left;return t-s}});e.exports=c},function(e){"use strict";function t(){if(void 0===s){var e=document.createElement("div");e.style.width="50px",e.style.height="50px",e.style.overflowY="scroll",e.style.position="absolute",e.style.top="-200px",e.style.left="-200px";var t=document.createElement("div");t.style.height="100px",t.style.width="100%",e.appendChild(t),document.body.appendChild(e);var r=e.offsetWidth,i=t.offsetWidth;document.body.removeChild(e),s=r-i}return s}var s;e.exports=t},function(e,t,s){(function(t){"use strict";var s=function(e,s,r,i,o,n,l,a){if("production"!==t.env.NODE_ENV&&void 0===s)throw new Error("invariant requires an error message argument");if(!e){var c;if(void 0===s)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[r,i,o,n,l,a],h=0;c=new Error("Invariant Violation: "+s.replace(/%s/g,function(){return p[h++]}))}throw c.framesToPop=1,c}};e.exports=s}).call(t,s(52))},function(e){function t(){}var s=e.exports={};s.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.MutationObserver,s="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};var r=[];if(t){var i=document.createElement("div"),o=new MutationObserver(function(){var e=r.slice();r.length=0,e.forEach(function(e){e()})});return o.observe(i,{attributes:!0}),function(e){r.length||i.setAttribute("yes","no"),r.push(e)}}return s?(window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),r.length>0)){var s=r.shift();s()}},!0),function(e){r.push(e),window.postMessage("process-tick","*")}):function(e){setTimeout(e,0)}}(),s.title="browser",s.browser=!0,s.env={},s.argv=[],s.on=t,s.addListener=t,s.once=t,s.off=t,s.removeListener=t,s.removeAllListeners=t,s.emit=t,s.binding=function(){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(){throw new Error("process.chdir is not supported")}},function(e,t,s){"use strict";var r=s(10),i=r.PropTypes,o=s(40),n=r.createClass({displayName:"Draggable",propTypes:{onDragStart:i.func,onDragEnd:i.func,onDrag:i.func,component:i.oneOfType([i.func,i.constructor])},render:function(){var e=this.props.component;return r.createElement(e,r.__spread({},this.props,{onMouseDown:this.onMouseDown}))},getDefaultProps:function(){return{component:r.DOM.div,onDragStart:o.thatReturnsTrue,onDragEnd:o,onDrag:o}},getInitialState:function(){return{drag:null}},onMouseDown:function(e){var t=this.props.onDragStart(e);(null!==t||0===e.button)&&(window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("mousemove",this.onMouseMove),this.setState({drag:t}))},onMouseMove:function(e){null!==this.state.drag&&(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),this.props.onDrag(e))},onMouseUp:function(e){this.cleanUp(),this.props.onDragEnd(e,this.state.drag),this.setState({drag:null})},componentWillUnmount:function(){this.cleanUp()},cleanUp:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove)}});e.exports=n}])}); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react/addons")):"function"==typeof define&&define.amd?define(["react/addons"],t):"object"==typeof exports?exports.ReactGrid=t(require("react/addons")):e.ReactGrid=t(e.React)}(this,function(e){return function(e){function t(r){if(s[r])return s[r].exports;var i=s[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var s={};return t.m=e,t.c=s,t.p="",t(0)}([function(e,t,s){"use strict";var r=s(1),i=s(2),o=s(3);e.exports=r,e.exports.Row=i,e.exports.Cell=o},function(e,t,s){"use strict";var r=s(10),i=(r.PropTypes,s(12)),o=s(13),n=s(14),l=(s(15),s(16)),a=s(17),c=s(18),p=s(19),h=s(20),d=s(21),u=s(22),f=(s(23),r.addons.cloneWithProps,r.createClass({displayName:"ExcelGrid",mixins:[l,p,a,c,h,d],getInitialState:function(){return{selectedRows:[],expandedRows:[]}},overrides:{onCellCommit:function(e){var t=e[0],s=Object.assign({},this.state.selected);s.active=!1,"Tab"===t.keyCode&&(s.idx+=1);var r=this.state.expandedRows;t.changed&&t.changed.expandedHeight&&(r=this.expandRow(t.rowIdx,t.changed.expandedHeight)),this.setState({selected:s,expandedRows:r}),this.props.onRowUpdated(t)},getColumns:function(){var e=this.getDecoratedColumns(this.props.columns);return this.props.enableRowSelect&&e.unshift({key:"select-row",name:"",formatter:r.createElement(u,null),onRowSelect:this.handleRowSelect,filterable:!1,headerRenderer:r.createElement("input",{type:"checkbox",onChange:this.handleCheckboxChange}),width:60}),e}},getDefaultProps:function(){return{rowHeight:35,enableRowSelect:!1,minHeight:350}},handleCheckboxChange:function(e){if(e.currentTarget.checked===!0){var t=this.props.rows.map(function(){return!0});this.setState({selectedRows:t})}else{var t=this.props.rows.map(function(){return!1});this.setState({selectedRows:t})}},handleRowSelect:function(e){var t=this.state.selectedRows;t[e]=null==t[e]||0==t[e]?!0:!1,this.setState({selectedRows:t})},expandRow:function(e,t){var s=this.state.expandedRows;return s[e]?(null==s[e]||s[e]<t)&&(s[e]=t):s[e]=t,s},addRow:function(){},handleShowMore:function(e,t){var s=this.expandRow(e,t);this.setState({expandedRows:s})},handleShowLess:function(e){var t=this.state.expandedRows;t[e]&&(t[e]=!1),this.setState({expandedRows:t})},expandAllRows:function(){},collapseAllRows:function(){},onAfterAddRow:function(e){this.setState({selected:{idx:1,rowIdx:e-2}}),this.refs.base.refs.viewport.refs.canvas.getDOMNode().scrollTop=e*this.props.rowHeight},componentWillReceiveProps:function(e){e.rows.length===this.props.rows.length+1&&this.onAfterAddRow(e.rows.length+1)},render:function(){var e=r.createElement(o,{selected:this.state.selected,copied:this.state.copied,dragged:this.state.dragged,onSelect:this.onSelect,onClick:this.onSelect,onSetActive:this.onSetActive,onCommit:this.onCellCommit,handleCopy:this.handleCopy,handlePaste:this.handlePaste,handleDragStart:this.handleDragStart,handleDragEnter:this.handleDragEnter,handleDragEnd:this.handleDragEnd,handleTerminateDrag:this.handleTerminateDrag,onShowMore:this.handleShowMore,onShowLess:this.handleShowLess,expandedRows:this.state.expandedRows}),t=this.filterRows(),s=this.renderToolbar();return r.createElement("div",{className:"react-grid-Container"},s,r.createElement("div",{className:"react-grid-Main"},r.createElement(i,r.__spread({ref:"base"},this.props,{length:this.props.rows.length,headerRows:this.getHeaderRows(),columns:this.getColumns(),rows:t,cellRenderer:e,rowRenderer:r.createElement(n,null),selectedRows:this.state.selectedRows,expandedRows:this.state.expandedRows,rowOffsetHeight:this.getRowOffsetHeight(),minHeight:this.props.minHeight}))))},renderToolbar:function(){var e=this.props.toolbar;return r.isValidElement(e)?r.addons.cloneWithProps(e,{onToggleFilter:this.onToggleFilter,rows:this.props.rows}):void 0}}));e.exports=f},function(e,t,s){"use strict";var r=s(10),i=r.addons.classSet,o=s(3),n=r.addons.cloneWithProps,l=s(11),a=r.createClass({displayName:"Row",render:function(){var e=i("react-grid-Row","react-grid-Row--"+(this.props.idx%2===0?"even":"odd")),t={height:this.getRowHeight(),overflow:"hidden"},s=this.getCells();return r.createElement("div",r.__spread({},this.props,{className:e,style:t}),r.isValidElement(this.props.row)?this.props.row:s)},getCells:function(){for(var e=[],t=[],s=0,r=this.props.columns.length;r>s;s++){var i=this.props.columns[s],o=this.renderCell({ref:s,key:s,idx:s,rowIdx:this.props.idx,filterRowIdx:this.props.row.key,value:this.getCellValue(i.key||s),column:i,height:this.getRowHeight(),formatter:i.formatter,rowData:this.props.row});i.locked?t.push(o):e.push(o)}return e.concat(t)},getRowHeight:function(){return this.props.expandedRows&&this.props.expandedRows[this.props.key]?this.props.expandedRows[this.props.key]:this.props.height},getCellValue:function(e){return"select-row"===e?this.props.isSelected:this.props.row[e]},renderCell:function(e){return r.isValidElement(this.props.cellRenderer)?n(this.props.cellRenderer,e):this.props.cellRenderer(e)},getDefaultProps:function(){return{cellRenderer:o}},shouldComponentUpdate:function(e){return!l.sameColumns(this.props.columns,e.columns,l.sameColumn)||this.doesRowContainSelectedCell()||this.doesRowContainSelectedCell(e)||this.willRowBeDraggedOver(e)||this.hasRowBeenCopied()||e.row!==this.props.row||e.height!==this.props.height},setScrollLeft:function(e){for(var t=0,s=this.props.columns.length;s>t;t++)this.props.columns[t].locked&&this.refs[t].setScrollLeft(e)},doesRowContainSelectedCell:function(e){var t=e||this.props,s=s||t.cellRenderer;return s.props.selected&&s.props.selected.rowIdx===t.idx?!0:!1},willRowBeDraggedOver:function(e){var t=e.cellRenderer.props.dragged;return null!=t&&(t.rowIdx||t.complete===!0)},hasRowBeenCopied:function(){var e=this.props.cellRenderer;return null!=e.props.copied&&e.props.copied.rowIdx===this.props.idx}});e.exports=a},function(e,t,s){"use strict";function r(e){return e.value}var i=s(10),o=i.addons.classSet,n=i.addons.cloneWithProps,l=i.createClass({displayName:"Cell",render:function(){var e=this.getStyle(),t=o("react-grid-Cell",this.props.className,this.props.column.locked?"react-grid-Cell--locked":null),s=this.renderCellContent({value:this.props.value,column:this.props.column,rowIdx:this.props.rowIdx,isExpanded:this.props.isExpanded});return i.createElement("div",i.__spread({},this.props,{className:t,style:e}),s,i.createElement("div",{className:"drag-handle",draggable:"true",onDragStart:this.props.handleDragStart}))},renderCellContent:function(e){var t=i.isValidElement(this.props.formatter)?n(this.props.formatter,e):this.props.formatter(e);return i.createElement("div",{className:"react-grid-Cell__value",title:this.props.value},t," ",this.props.cellControls)},getDefaultProps:function(){return{formatter:r}},getStyle:function(){var e={position:"absolute",width:this.props.column.width,height:this.props.height,left:this.props.column.left};return e},setScrollLeft:function(e){if(this.isMounted()){var t=this.getDOMNode(),s="translate3d("+e+"px, 0px, 0px)";t.style.webkitTransform=s,t.style.transform=s}}});e.exports=l},,function(e,t,s){"use strict";var r=s(10),i=r.addons.classSet,o=s(24),n={propTypes:{onCommit:r.PropTypes.func.isRequired},getStyle:function(){return{height:this.props.height-1}},getInitialState:function(){return{isInvalid:!1}},onPressEnter:function(e){e.stopPropagation(),e.preventDefault(),this.commit({key:"Enter"})},onPressTab:function(e){e.stopPropagation(),e.preventDefault(),this.commit({key:"Tab"})},commit:function(e){var t=this.getValue(),s={};s[this.props.column.key]=t,this.isNewValueValid(t)&&this.props.onCommit({updated:s,key:e.key})},isNewValueValid:function(e){if(o(this.validate)){var t=this.validate(e);return this.setState({isInvalid:!t}),t}return!0},getValue:function(){return this.getInputNode().value},setValue:function(e){this.getInputNode().value=e},componentDidMount:function(){void 0!==this.getInputNode()&&(this.checkFocus(),this.getInputNode().className+=" editor-main")},checkFocus:function(){this.getInputNode().focus()},getInputNode:function(){return this.getDOMNode().getElementsByTagName("input")[0]},getContainerClass:function(){return i({"has-error":this.state.isInvalid===!0})},renderStatusIcon:function(){return this.state.isInvalid===!0?r.createElement("span",{className:"glyphicon glyphicon-remove form-control-feedback"}):void 0},render:function(){if(!o(this.renderEditorNode))throw"Editor Mixin Error : "+this.displayName+" component must implement method renderEditorNode";var e=this.renderEditorNode();return r.createElement("div",{className:this.getContainerClass()},e,this.renderStatusIcon())}};e.exports=n},function(e,t,s){"use strict";var r={onPressArrowLeft:function(e){e.stopPropagation()},onPressArrowRight:function(e){e.stopPropagation()},getDefaultValue:function(){var e=this.props.initialKeyCode;if("Delete"===e||"Backspace"===e)return"";if("Enter"===e)return this.props.value;var t=e?String.fromCharCode(e):this.props.value;return t},setCaretAtEndOfInput:function(){var e=this.getInputNode(),t=e.value.length;if(e.setSelectionRange)e.setSelectionRange(t,t);else if(e.createTextRange){var s=e.createTextRange();s.moveStart("character",txt.value.length),s.collapse(),s.select()}},setTextInputFocus:function(){this.isKeyPrintable(this.props.initialKeyCode)?this.getInputNode().select():(this.getInputNode().focus(),this.setCaretAtEndOfInput())}};e.exports=r},,,function(e,t,s){"use strict";var r=s(10),i=(r.addons.Perf,{onKeyDown:function(e){if(this.isCtrlKeyHeldDown(e))this.checkAndCall("onPressKeyWithCtrl",e);else if(this.isKeyIdentified(e.key)){var t="onPress"+e.key;this.checkAndCall(t,e)}else this.isKeyPrintable(e.keyCode)&&this.checkAndCall("onPressChar",e)},isKeyPrintable:function(e){var t=e>47&&58>e||32==e||13==e||e>64&&91>e||e>95&&112>e||e>185&&193>e||e>218&&223>e;return t},isKeyIdentified:function(e){return"Unidentified"!==e},isCtrlKeyHeldDown:function(e){return e.ctrlKey===!0&&"Control"!==e.key},checkAndCall:function(e,t){"function"==typeof this[e]&&this[e](t)}});e.exports=i},function(t,s,r){t.exports=e},function(e,t,s){"use strict";function r(e){var t,s,r,i=0,o=e.totalWidth,n=[],l=e.columns.map(p);for(t=0,s=l.length;s>t;t++)r=l[t],r.width?(/^([0-9]+)%$/.exec(r.width)&&(r.width=Math.floor(parseInt(r.width,10)/100*e.totalWidth)),o-=r.width,i+=r.width):n.push(r);for(t=0,s=n.length;s>t;t++)r=n[t],r.width=0>=o?e.minColumnWidth:Math.floor(o/n.length),i+=r.width;var a=0;for(t=0,s=l.length;s>t;t++)r=l[t],r.left=a,a+=r.width;return{columns:l,width:i,totalWidth:e.totalWidth,minColumnWidth:e.minColumnWidth}}function i(e,t,s){var i=e.columns[t];e=p(e),e.columns=e.columns.slice(0);var o=p(i);return o.width=Math.max(s,e.minColumnWidth),e.columns.splice(t,1,o),r(e)}function o(e,t,s){var r,i,o,n={},l={};if(e.length!==t.length)return!1;for(r=0,i=e.length;i>r;r++)o=e[r],n[o.key]=o;for(r=0,i=t.length;i>r;r++){o=t[r],l[o.key]=o;var a=n[o.key];if(void 0===a||!s(a,o))return!1}for(r=0,i=e.length;i>r;r++){o=e[r];var c=l[o.key];if(void 0===c)return!1}return!0}function n(e,t){var s;for(s in e)if(e.hasOwnProperty(s)){if("function"==typeof e[s]&&"function"==typeof t[s]||c(e[s])&&c(t[s]))continue;if(!t.hasOwnProperty(s)||e[s]!==t[s])return!1}for(s in t)if(t.hasOwnProperty(s)&&!e.hasOwnProperty(s))return!1;return!0}var l=s(10),a=l.PropTypes,c=l.isValidElement,p=s(28),h=s(29),d=s(15),u={mixins:[h.MetricsMixin],propTypes:{columns:a.array,minColumnWidth:a.number,columnEquality:a.func},DOMMetrics:{gridWidth:function(){return this.getDOMNode().offsetWidth-2}},getDefaultProps:function(){return{minColumnWidth:80,columnEquality:n}},getInitialState:function(){return this.getColumnMetrics(this.props,!0)},componentWillReceiveProps:function(e){if(e.columns)if(o(this.props.columns,e.columns,this.props.columnEquality)){var t={};this.state.columns.columns.forEach(function(e){t[e.key]={width:e.width,left:e.left}});var s=d(this.state.columns,{columns:e.columns.map(function(e){return d(e,t[e.key])})});this.setState({columns:s})}else this.setState(this.getColumnMetrics(e))},getColumnMetrics:function(e,t){var s=t?null:this.DOMMetrics.gridWidth();return{columns:r({columns:e.columns,width:null,totalWidth:s,minColumnWidth:e.minColumnWidth}),gridWidth:s}},metricsUpdated:function(){this.setState(this.getColumnMetrics(this.props))},onColumnResize:function(e,t){var s=i(this.state.columns,e,t);this.setState({columns:s})}};e.exports={Mixin:u,calculate:r,resizeColumn:i,sameColumns:o,sameColumn:n}},function(e,t,s){"use strict";var r=s(10),i=r.PropTypes,o=s(30),n=s(31),l=s(11),a=s(29),c={componentDidMount:function(){this._scrollLeft=this.refs.viewport.getScroll().scrollLeft,this._onScroll()},componentDidUpdate:function(){this._onScroll()},componentWillMount:function(){this._scrollLeft=void 0},componentWillUnmount:function(){this._scrollLeft=void 0},onScroll:function(e){var t=e.scrollLeft;this._scrollLeft!==t&&(this._scrollLeft=t,this._onScroll())},_onScroll:function(){void 0!==this._scrollLeft&&(this.refs.header.setScrollLeft(this._scrollLeft),this.refs.viewport.setScrollLeft(this._scrollLeft))}},p=r.createClass({displayName:"Grid",mixins:[c,l.Mixin,a.MetricsComputatorMixin],propTypes:{rows:i.oneOfType([i.array,i.func]).isRequired,columns:i.array.isRequired},getStyle:function(){return{overflow:"hidden",outline:0,position:"relative",minHeight:this.props.minHeight}},render:function(){var e=this.props.headerRows||[{ref:"row"}];return r.createElement("div",r.__spread({},this.props,{style:this.getStyle(),className:"react-grid-Grid"}),r.createElement(o,{ref:"header",columns:this.state.columns,onColumnResize:this.onColumnResize,height:this.props.rowHeight,totalWidth:this.DOMMetrics.gridWidth(),headerRows:e}),r.createElement(n,{ref:"viewport",width:this.state.columns.width,rowHeight:this.props.rowHeight,rowRenderer:this.props.rowRenderer,cellRenderer:this.props.cellRenderer,rows:this.props.rows,selectedRows:this.props.selectedRows,expandedRows:this.props.expandedRows,length:this.props.length,columns:this.state.columns,totalWidth:this.DOMMetrics.gridWidth(),onScroll:this.onScroll,onRows:this.props.onRows,rowOffsetHeight:this.props.rowOffsetHeight||this.props.rowHeight*e.length}))},getDefaultProps:function(){return{rowHeight:35,minHeight:350}}});e.exports=p},function(e,t,s){"use strict";var r=s(10),i=s(3),o=(s(32),s(33)),n=s(34),l=s(35),a=(s(23),s(9),s(24)),c=(r.PropTypes,r.addons.classSet),p=(r.addons.cloneWithProps,r.createClass({displayName:"CellControls",onClickEdit:function(e){e.stopPropagation(),e.preventDefault(),this.props.onClickEdit()},onShowMore:function(e){e.stopPropagation(),e.preventDefault();var t=this.props.column.getExpandedHeight(this.props.value);this.props.onShowMore(this.props.rowIdx,t)},onShowLess:function(e){e.stopPropagation(),e.preventDefault(),this.props.onShowLess(this.props.rowIdx)},shouldComponentUpdate:function(e,t){return this.props.height!=e.height},renderShowMoreButton:function(){if(a(this.props.column.getExpandedHeight)&&this.props.column.getExpandedHeight(this.props.value)>0){var e=this.props.column.getExpandedHeight(this.props.value);return e>this.props.height?r.createElement("button",{type:"button",className:"btn btn-link btn-xs",onClick:this.onShowMore},"Show More"):r.createElement("button",{type:"button",className:"btn btn-link btn-xs",onClick:this.onShowLess},"Show Less")}return null},render:function(){return r.createElement("div",{className:"pull-right btn-group"},this.renderShowMoreButton(),r.createElement("button",{onClick:this.onClickEdit,type:"button",className:"btn btn-link btn-xs"},"Edit"))}})),h=r.createClass({displayName:"ExcelCell",mixins:[o,n,l],overrides:{getCellClass:function(){return c({selected:this.isSelected()&&!this.isCopied()&&!this.isActive(),editing:this.isActive(),copied:this.isCopied(),"selected-draggable":this.isSelected()&&!this.isActive()&&this.canEdit(),"active-drag-cell":this.isActiveDragCell()&&this.canEdit(),"is-dragged-over-up":!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx<this.props.dragged.rowIdx,"is-dragged-over-down":!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx>this.props.dragged.rowIdx,"was-dragged-over":this.wasDraggedOver()&&this.canEdit()})}},isActiveDragCell:function(){return(this.isSelected()||this.isDraggedOver())&&!this.isActive()},isExpanded:function(){var e=!1;if(a(this.props.column.getExpandedHeight)&&this.props.column.getExpandedHeight(this.props.value)>0){var t=this.props.column.getExpandedHeight(this.props.value);e=this.props.height>=t?!0:!1}return e},shouldComponentUpdate:function(e,t){return this.props.column.width!==e.column.width||this.props.value!==e.value||this.props.height!==e.height||this.props.rowIdx!==e.rowIdx||this.isCellSelectionChanging(e)||this.isDraggedCellChanging(e)},render:function(){return r.createElement(i,r.__spread({},this.props,{className:this.getCellClass(),onKeyDown:this.onKeyDown,onClick:this.onClick,onDoubleClick:this.onDoubleClick,formatter:this.getFormatter(),handleDragStart:this.handleDragStart,onDragEnter:this.handleDragEnter,onDragEnd:this.props.handleDragEnd,cellControls:this.props.column.showCellControls&&!this.isActive()?r.createElement(p,{height:this.props.height,value:this.props.value,rowIdx:this.props.rowIdx,column:this.props.column,onShowMore:this.props.onShowMore,onShowLess:this.props.onShowLess,onClickEdit:this.setActive}):null,isExpanded:this.isExpanded()}))}});e.exports=h},function(e,t,s){"use strict";var r=s(10),i=(r.addons.classSet,s(2)),o=s(11),n=r.createClass({displayName:"ExcelRow",render:function(){var e=r.addons.update(this.props.row,{$merge:{"select-row":this.props.isSelected}});return r.createElement(i,r.__spread({},this.props,{row:e,height:this.getRowHeight(this.props)}))},getRowHeight:function(e){return e.expandedRows&&e.expandedRows[e.idx]?e.expandedRows[e.idx]:e.height},hasRowHeightChanged:function(e){return e.expandedRows&&"undefined"!=typeof e.expandedRows[e.idx]?this.props.height!==e.expandedRows[e.idx]:!1},shouldComponentUpdate:function(e){return!o.sameColumns(this.props.columns,e.columns,o.sameColumn)||this.doesRowContainSelectedCell()||this.doesRowContainSelectedCell(e)||this.willRowBeDraggedOver(e)||this.hasRowBeenCopied()||e.row!==this.props.row||this.props.isSelected!==e.isSelected||this.hasRowHeightChanged(e)},doesRowContainSelectedCell:function(e){var t=e||this.props,s=s||t.cellRenderer;return s.props&&s.props.selected&&s.props.selected.rowIdx===t.idx?!0:!1},willRowBeDraggedOver:function(e){if(e.cellRenderer.props){var t=e.cellRenderer.props.dragged;return null!=t&&(t.rowIdx||t.complete===!0)}return!1},hasRowBeenCopied:function(){if(this.props.cellRenderer.props){var e=this.props.cellRenderer;return null!=e.props.copied&&e.props.copied.rowIdx===this.props.idx}return!1},setScrollLeft:function(e){for(var t=0,s=this.props.columns.length;s>t;t++)this.props.columns[t].locked&&this.refs[t].setScrollLeft(e)}});e.exports=n},function(e,t,s){"use strict";function r(e,t){var s={};for(var r in e)s[r]=e[r];for(var r in t)s[r]=t[r];return s}var i=function(e,t){var s={};return null!=e&&Object.assign(s,e),null!=t&&Object.assign(s,t),s};e.exports=Object.assign?i:r},function(e,t,s){"use strict";var r={getDefaultProps:function(){return{enableCellSelect:!1}},getColumns:function(){return this.props.columns},getInitialState:function(){return this.props.enableCellSelect?{selected:{rowIdx:0,idx:0}}:{selected:{rowIdx:-1,idx:-1}}},onSelect:function(e){if(this.props.enableCellSelect){var t=e.idx,s=e.rowIdx;t>=0&&s>=0&&t<this.getColumns().length&&s<this.props.rows.length&&(this.props.onSelect&&this.props.onSelect({selected:e}),this.setState({selected:e}))}}};e.exports=r},function(e,t,s){"use strict";{var r=s(10),i=(r.PropTypes,s(23));s(16)}i.addAlias("SelectableGridMixin");var o={mixinDependencies:["SelectableGridMixin"],propTypes:{onCellsDragged:r.PropTypes.func},getInitialState:function(){return{dragged:null}},handleDragStart:function(e){var t=e.idx,s=e.rowIdx;t>=0&&s>=0&&t<this.getColumns().length&&s<this.props.rows.length&&this.setState({dragged:e})},handleDragEnter:function(e){var t=(this.state.selected,this.state.dragged);t.overRowIdx=e,this.setState({dragged:t})},handleDragEnd:function(){var e,t,s=this.state.selected,r=this.state.dragged,i=this.getColumns()[this.state.selected.idx].key;e=s.rowIdx<r.overRowIdx?s.rowIdx:r.overRowIdx,t=s.rowIdx>r.overRowIdx?s.rowIdx:r.overRowIdx,this.props.onCellsDragged({cellKey:i,fromRow:e,toRow:t,value:r.copiedText}),this.setState({dragged:{complete:!0}})},handleTerminateDrag:function(){this.setState({dragged:null})}};e.exports=o},function(e,t,s){"use strict";var r=s(10),i=(r.PropTypes,{propTypes:{onCellCopyPaste:r.PropTypes.func},getInitialState:function(){return{copied:null}},handleCopy:function(e){var t=e.value,s=this.state.selected,r={idx:s.idx,rowIdx:s.rowIdx};this.setState({textToCopy:t,copied:r})},handlePaste:function(){var e=this.state.selected,t=this.getColumns()[e.idx].key;this.props.onCellCopyPaste({cellKey:t,rowIdx:e.rowIdx,value:this.state.textToCopy,fromRow:this.state.copied.rowIdx,toRow:e.rowIdx}),this.setState({copied:null})}});e.exports=i},function(e,t,s){"use strict";var r=s(10),i=(r.PropTypes,s(15)),o={propTypes:{onRowUpdated:r.PropTypes.func},onCellCommit:function(e){var t=this.state.selected;t.active=!1,"Tab"===e.keyCode&&(t.idx+=1),this.setState({selected:t}),this.props.onRowUpdate(e)},onSetActive:function(e){var t=i(this.state.selected,e);this.setState({selected:t})}};e.exports=o},function(e,t,s){"use strict";var r=s(10),i=(r.PropTypes,s(36)),o=s(28),n={ASC:"ASC",DESC:"DESC"};Object.freeze(n);var l={getInitialState:function(){return{sortDirection:null,sortColumn:null}},getDecoratedColumns:function(e){return this.props.columns.map(function(e){return e=o(e),e.sortable&&(e.headerRenderer=r.createElement(i,null),e.sortBy=this.sortBy,e.sorted=this.state.sortColumn===e.key?this.state.sortDirection:n.NONE),e},this)},sortBy:function(e,t){switch(t){case null:case void 0:t=n.ASC;break;case n.ASC:t=n.DESC;break;case n.DESC:t=null}this.setState({sortDirection:t,sortColumn:e.key})},sortRows:function(e){e=[].concat(e);var t=this.state.sortColumn,s=this.state.sortDirection;return null!=t&&null!==s?e.sort(function(e,r){var i=e[t],o=r[t];return s===n.ASC?i>o?1:o>i?-1:0:s===n.DESC?i>o?-1:o>i?1:0:void 0}):e}};e.exports=l},function(e,t,s){"use strict";var r=s(10),i=(r.PropTypes,s(37)),o={getInitialState:function(){return{canFilter:!1,columnFilters:{}}},filterRows:function(){var e=this.props.rows;return this.state.sortColumn&&(e=this.sortRows(e)),this.hasFilters()&&(e=e.map(function(e,t){return e.key=t,e}).filter(this.isRowDisplayed),this.props.onFilter&&this.props.onFilter(e)),e},hasFilters:function(){var e=!1;return Object.keys(this.state.columnFilters).every(function(t){var s=this.state.columnFilters[t];return null!=s&&void 0!=s&&""!=s?(e=!0,!1):!0},this),e},isRowDisplayed:function(e){var t=null;return Object.keys(this.state.columnFilters).every(function(s){var r=this.state.columnFilters[s].toLowerCase(),i=e[s].toString().toLowerCase();if(null!=r&&void 0!=r&&""!=r&&"string"==typeof i){if(!(i.indexOf(r)>-1))return t=!1,!1;t=!0}return!0},this),null==t?!1:t},onToggleFilter:function(){this.setState({canFilter:!this.state.canFilter})},handleAddFilter:function(e){var t=this.state.columnFilters;t[e.columnKey]=e.filterTerm,this.setState({columnFilters:t,selected:null})},getHeaderRows:function(){var e=[{ref:"row",height:this.props.rowHeight}];return this.state.canFilter===!0&&e.push({ref:"filterRow",headerCellRenderer:r.createElement(i,{onChange:this.handleAddFilter}),height:45}),e},getRowOffsetHeight:function(){var e=0;return this.getHeaderRows().forEach(function(t){return e+=t.height}),e}};e.exports=o},function(e,t,s){"use strict";var r=s(10),i=(r.addons.classSet,r.createClass({displayName:"CheckBoxEditor",PropTypes:{value:r.PropTypes.bool.isRequired},render:function(){return r.createElement("input",{className:"react-grid-CheckBox",type:"checkbox",checked:this.props.value,onChange:this.handleChange})},handleChange:function(e){this.props.column.onRowSelect(this.props.rowIdx)},shouldComponentUpdate:function(e,t){return this.props.value!=e.value}}));e.exports=i},function(e,t,s){"use strict";var r=s(41),i=s(24),o=s(10);Object.assign||(Object.assign=s(38));var n=r({DEFINE_LIFE_CYCLE_METHOD:null,DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),l={getDefaultProps:n.DEFINE_LIFE_CYCLE_METHOD,propTypes:n.DEFINE_LIFE_CYCLE_METHOD,getInitialState:n.DEFINE_LIFE_CYCLE_METHOD,statics:n.DEFINE_LIFE_CYCLE_METHOD,displayName:n.DEFINE_LIFE_CYCLE_METHOD,componentWillMount:n.DEFINE_LIFE_CYCLE_METHOD,componentWillReceiveProps:n.DEFINE_LIFE_CYCLE_METHOD,shouldComponentUpdate:n.DEFINE_LIFE_CYCLE_METHOD,componentWillUpdate:n.DEFINE_LIFE_CYCLE_METHOD,componentDidUpdate:n.DEFINE_LIFE_CYCLE_METHOD,componentWillUnmount:n.DEFINE_LIFE_CYCLE_METHOD},a={},c=function(e,t){this.base=e,this.dependsOn=t},p=function(e){this.assignTo=function(t){return new c(t,e)}},h=function(e,t){Object.keys(e).forEach(function(s){if(f.isCustomProperty(s))i(e[s])&&(e[s]=f.wrapCustomMethod(s,e[s]));else{switch(l[s]){case n.DEFINE_LIFE_CYCLE_METHOD:var r={};r[s]=e[s],t.push(r);break;case n.DEFINE_MANY_MERGED:}delete e[s]}},this)},d={mix:function(e){var t=[],s={},r=f.getUniqueDependencies(e);for(var i in r)Object.assign(s,a[r[i]]);return h(s,t),e.forEach(function(e){var r={};e instanceof c?Object.assign(r,e.base):Object.assign(r,e),h(r,t),Object.assign(s,r)},this),t.push(s),t},createDependency:function(e){var t=[];for(var s in e)e[s]instanceof c?this.addAlias(s,e[s].base):this.addAlias(s,e[s]),t.push(s);var r=t.filter(function(e,t,s){return s.indexOf(e)===t});return new p(r)},addAlias:function(e,t){a[e]=t}},u=o.createClass;o.createClass=function(e){return e.mixins&&(e.mixins=d.mix(e.mixins)),u.apply(o,arguments)};var f={isCustomProperty:function(e){return!l[e]},wrapCustomMethod:function(e,t){return function(){return f.isMethodOverridden.call(this,e)?f.callOverriddenMethod.call(this,e,arguments):t.apply(this,arguments)}},checkMethodExtendedAndCall:function(e,t){return this.extended&&"function"==typeof this.extended[e]?this.extended[e].call(this,t):void 0},checkMethodImplementedAndCall:function(e,t){return this.implemented&&"function"==typeof this.implemented[e]?this.implemented[e].call(this,t):void 0},isMethodOverridden:function(e){return this.overrides&&"function"==typeof this.overrides[e]},callOverriddenMethod:function(e,t){return this.overrides[e].call(this,t)},getUniqueDependencies:function(e){var t=[];return e.forEach(function(e){e instanceof c&&(t=t.concat(e.dependsOn))},this),t.filter(function(e,t,s){return s.indexOf(e)===t})}};e.exports=d},function(e,t,s){"use strict";var r=function(e){var t={};return e&&"[object Function]"===t.toString.call(e)};e.exports=r},,,function(e,t,s){"use strict";var r=s(10),i=(r.addons.classSet,s(23),s(5)),o=s(6),n=s(9),l=r.createClass({displayName:"SimpleTextEditor",mixins:[n,i,o],overrides:{checkFocus:function(){this.setTextInputFocus()}},renderEditorNode:function(){return r.createElement("input",{type:"text",onBlur:this.commit,className:"form-control",defaultValue:this.getDefaultValue(),style:this.getStyle(),onKeyDown:this.onKeyDown})}});e.exports=l},function(e,t,s){"use strict";function r(e){var t={};for(var s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);return t}e.exports=r},function(e,t,s){"use strict";var r=s(10),i=s(39),o=s(28),n=s(40),l={metricsComputator:r.PropTypes.object},a={childContextTypes:l,getChildContext:function(){return{metricsComputator:this}},getMetricImpl:function(e){return this._DOMMetrics.metrics[e].value},registerMetricsImpl:function(e,t){var s={},r=this._DOMMetrics;for(var i in t)n(void 0===r.metrics[i],"DOM metric "+i+" is already defined"),r.metrics[i]={component:e,computator:t[i].bind(e)},s[i]=this.getMetricImpl.bind(null,i);return-1===r.components.indexOf(e)&&r.components.push(e),s},unregisterMetricsFor:function(e){var t=this._DOMMetrics,s=t.components.indexOf(e);if(s>-1){t.components.splice(s,1);var r,i={};for(r in t.metrics)t.metrics[r].component===e&&(i[r]=!0);for(r in i)delete t.metrics[r]}},updateMetrics:function(){var e=this._DOMMetrics,t=!1;for(var s in e.metrics){var r=e.metrics[s].computator();r!==e.metrics[s].value&&(t=!0),e.metrics[s].value=r}if(t)for(var i=0,o=e.components.length;o>i;i++)e.components[i].metricsUpdated&&e.components[i].metricsUpdated()},componentWillMount:function(){this._DOMMetrics={metrics:{},components:[]}},componentDidMount:function(){window.addEventListener?window.addEventListener("resize",this.updateMetrics):window.attachEvent("resize",this.updateMetrics),this.updateMetrics()},componentWillUnmount:function(){window.removeEventListener("resize",this.updateMetrics)}},c={contextTypes:l,componentWillMount:function(){if(this.DOMMetrics){this._DOMMetricsDefs=o(this.DOMMetrics),this.DOMMetrics={};for(var e in this._DOMMetricsDefs)this.DOMMetrics[e]=i}},componentDidMount:function(){this.DOMMetrics&&(this.DOMMetrics=this.registerMetrics(this._DOMMetricsDefs))},componentWillUnmount:function(){return this.registerMetricsImpl?void(this.hasOwnProperty("DOMMetrics")&&delete this.DOMMetrics):this.context.metricsComputator.unregisterMetricsFor(this)},registerMetrics:function(e){return this.registerMetricsImpl?this.registerMetricsImpl(this,e):this.context.metricsComputator.registerMetricsImpl(this,e)},getMetric:function(e){return this.getMetricImpl?this.getMetricImpl(e):this.context.metricsComputator.getMetricImpl(e)}};e.exports={MetricsComputatorMixin:a,MetricsMixin:c}},function(e,t,s){"use strict";var r=s(10),i=r.addons.classSet,o=s(28),n=s(11),l=s(43),n=s(11),a=r.createClass({displayName:"Header",propTypes:{columns:r.PropTypes.object.isRequired,totalWidth:r.PropTypes.number,height:r.PropTypes.number.isRequired,headerRows:r.PropTypes.array.isRequired},render:function(){var e=(this.state.resizing||this.props,i({"react-grid-Header":!0,"react-grid-Header--resizing":!!this.state.resizing})),t=this.getHeaderRows();return r.createElement("div",r.__spread({},this.props,{style:this.getStyle(),className:e}),t)},shouldComponentUpdate:function(e,t){return!n.sameColumns(this.props.columns.columns,e.columns.columns,n.sameColumn)||this.props.totalWidth!=e.totalWidth||this.props.headerRows.length!=e.headerRows.length||this.state.resizing!=t.resizing},getHeaderRows:function(){var e=this.state.resizing||this.props,t=[];return this.props.headerRows.forEach(function(s,i){var o={position:"absolute",top:this.props.height*i,left:0,width:this.props.totalWidth};t.push(r.createElement(l,{key:s.ref,ref:s.ref,style:o,onColumnResize:this.onColumnResize,onColumnResizeEnd:this.onColumnResizeEnd,width:e.columns.width,height:s.height||this.props.height,columns:e.columns.columns,resizing:e.column,headerCellRenderer:s.headerCellRenderer}))}.bind(this)),t},getInitialState:function(){return{resizing:null}},componentWillReceiveProps:function(){this.setState({resizing:null})},onColumnResize:function(e,t){var s=this.state.resizing||this.props,r=this.getColumnPosition(e);if(null!==r){var i={columns:o(s.columns)};i.columns=n.resizeColumn(i.columns,r,t),i.columns.width<s.columns.width&&(i.columns.width=s.columns.width),i.column=i.columns.columns[r],this.setState({resizing:i})}},getColumnPosition:function(e){var t=this.state.resizing||this.props,s=t.columns.columns.indexOf(e);return-1===s?null:s},onColumnResizeEnd:function(e,t){var s=this.getColumnPosition(e);null!==s&&this.props.onColumnResize&&this.props.onColumnResize(s,t||e.width)},setScrollLeft:function(e){var t=this.refs.row.getDOMNode();t.scrollLeft=e,this.refs.row.setScrollLeft(e)},getStyle:function(){return{position:"relative",height:this.props.height}}});e.exports=a},function(e,t,s){"use strict";var r=s(10),i=s(44),o=s(29),n=s(45),l=Math.min,a=Math.max,c=Math.floor,p=Math.ceil,h={mixins:[o.MetricsMixin],DOMMetrics:{viewportHeight:function(){return this.getDOMNode().offsetHeight}},propTypes:{rowHeight:r.PropTypes.number,length:r.PropTypes.number.isRequired},getDefaultProps:function(){return{rowHeight:30 +}},getInitialState:function(){return this.getGridState(this.props)},getGridState:function(e){var t=this.state&&this.state.height?this.state.height:i().height,s=p(t/e.rowHeight);return{displayStart:0,displayEnd:2*s,height:t,scrollTop:0,scrollLeft:0}},updateScroll:function(e,t,s,r,i){var o=p(s/r),n=c(e/r),h=l(n+o,i),d=a(0,n-2*o),u=l(n+2*o,i),f={visibleStart:n,visibleEnd:h,displayStart:d,displayEnd:u,height:s,scrollTop:e,scrollLeft:t};this.setState(f)},metricsUpdated:function(){var e=this.DOMMetrics.viewportHeight();e&&this.updateScroll(this.state.scrollTop,this.state.scrollLeft,e,this.props.rowHeight,this.props.length)},componentWillReceiveProps:function(e){this.props.rowHeight!==e.rowHeight?this.setState(this.getGridState(e)):this.props.length!==e.length&&this.updateScroll(this.state.scrollTop,this.state.scrollLeft,this.state.height,e.rowHeight,e.length)}},d=r.createClass({displayName:"Viewport",mixins:[h],render:function(){var e={padding:0,bottom:0,left:0,right:0,position:"absolute",top:this.props.rowOffsetHeight};return r.createElement("div",{className:"react-grid-Viewport",style:e},r.createElement(n,{ref:"canvas",totalWidth:this.props.totalWidth,width:this.props.columns.width,rows:this.props.rows,selectedRows:this.props.selectedRows,expandedRows:this.props.expandedRows,columns:this.props.columns.columns,cellRenderer:this.props.cellRenderer,rowRenderer:this.props.rowRenderer,visibleStart:this.state.visibleStart,visibleEnd:this.state.visibleEnd,displayStart:this.state.displayStart,displayEnd:this.state.displayEnd,length:this.props.length,height:this.state.height,rowHeight:this.props.rowHeight,onScroll:this.onScroll,onRows:this.props.onRows}))},getScroll:function(){return this.refs.canvas.getScroll()},onScroll:function(e){var t=e.scrollTop,s=e.scrollLeft;this.updateScroll(t,s,this.state.height,this.props.rowHeight,this.props.length),this.props.onScroll&&this.props.onScroll({scrollTop:t,scrollLeft:s})},setScrollLeft:function(e){this.refs.canvas.setScrollLeft(e)}});e.exports=d},function(e,t,s){"use strict";var r=s(10),i=(r.addons.classSet,r.addons.cloneWithProps,s(9)),o=s(23),n=o.createDependency({KeyboardHandlerMixin:i}).assignTo({getDefaultProps:function(){return{tabIndex:-1,ref:"cell"}},isSelected:function(){return this.props.selected&&this.props.selected.rowIdx===this.props.rowIdx&&this.props.selected.idx===this.props.idx},onClick:function(){var e=this.props.rowIdx,t=this.props.idx;this.props.onClick({rowIdx:e,idx:t})},onPressArrowUp:function(e){this.moveSelectedCell(e,-1,0)},onPressArrowDown:function(e){this.moveSelectedCell(e,1,0)},onPressArrowLeft:function(e){this.moveSelectedCell(e,0,-1)},onPressArrowRight:function(e){this.moveSelectedCell(e,0,1)},onPressTab:function(e){this.moveSelectedCell(e,0,1)},moveSelectedCell:function(e,t,s){e.stopPropagation(),e.preventDefault();var r=this.props.rowIdx+t,i=this.props.idx+s;this.props.onSelect({idx:i,rowIdx:r})},setScrollLeft:function(e){this.refs.row.setScrollLeft(e)},componentDidMount:function(){this.checkFocus()},componentDidUpdate:function(){this.checkFocus()},isCellSelectionChanging:function(e){return this.props.selected&&e.selected?this.props.idx===e.selected.idx||this.props.idx===this.props.selected.idx:!0},checkFocus:function(){this.isSelected()&&this.getDOMNode().focus()}});e.exports=n},function(e,t,s){"use strict";var r=s(10),i=(r.addons.classSet,r.addons.cloneWithProps),o=s(27),n=r.PropTypes,l=s(23),a=s(32),c=s(9),p=l.createDependency({KeyboardHandlerMixin:c,SelectableMixin:a}).assignTo({propTypes:{onCommit:n.func.isRequired},canEdit:function(){return null!=this.props.column.editor||this.props.column.editable},getEditor:function(){var e={height:this.props.height,onPressEscape:this.onPressEscape,onCommit:this.onCommit,initialKeyCode:this.props.selected.initialKeyCode,editorRowMetaData:this.getEditorRowMetaData()},t=this.props.column.editor;return t&&r.isValidElement(t)?i(t,e):i(o(),e)},getEditorRowMetaData:function(){this.props.column.ItemId;return"function"==typeof this.props.column.getEditorRowMetaData?this.props.column.getEditorRowMetaData(this.props.rowData):void 0},getFormatter:function(){this.props.column;return this.isActive()?this.getEditor():this.props.column.formatter},onCommit:function(e){var t=this.props.rowIdx,s=(this.props.idx,this.props.column.key);this.props.onCommit({cellKey:s,rowIdx:this.props.filterRowIdx||t,updated:e.updated,keyCode:e.key})},checkFocus:function(){this.isSelected()&&!this.isActive()&&this.getDOMNode().focus()},onClick:function(){if(!this.isActive()){var e=this.props.rowIdx,t=this.props.idx;this.props.onClick({rowIdx:e,idx:t})}},onDoubleClick:function(){var e=this.props.rowIdx,t=this.props.idx;this.props.onClick({rowIdx:e,idx:t,active:this.canEdit()})},setActive:function(e){var t=this.props.rowIdx,s=this.props.idx;"select-row"===this.props.column.key&&this.props.column.onRowSelect?this.props.column.onRowSelect(t):this.canEdit()&&!this.isActive()&&this.props.onSetActive({idx:s,rowIdx:t,active:!0,initialKeyCode:e})},setInactive:function(){if(this.canEdit()&&this.isActive()){var e=this.props.rowIdx,t=this.props.idx;this.props.onSetActive({idx:t,rowIdx:e,active:!1})}},isActive:function(){return this.isSelected()&&this.props.selected.active===!0},onPressEnter:function(e){this.setActive(e.key)},onPressDelete:function(e){this.setActive(e.key)},onPressEscape:function(e){this.setInactive(e.key)},onPressBackspace:function(e){this.setActive(e.key)},onPressChar:function(e){this.isKeyPrintable(e.keyCode)&&this.setActive(e.keyCode)}});e.exports=p},function(e,t,s){"use strict";var r=s(10),i=r.addons.classSet,o=(r.addons.cloneWithProps,r.PropTypes,s(27),s(23)),n=s(32),l=s(9),a=o.createDependency({KeyboardHandlerMixin:l,SelectableMixin:n}).assignTo({getCellClass:function(){return i({selected:this.isSelected()&&!this.isCopied(),copied:this.isCopied()})},KeyCode_c:"99",KeyCode_C:"67",KeyCode_V:"86",KeyCode_v:"118",propTypes:{handleCopy:r.PropTypes.func.isRequired,handlePaste:r.PropTypes.func.isRequired},isCopied:function(){return this.props.copied&&this.props.copied.rowIdx===this.props.rowIdx&&this.props.copied.idx===this.props.idx},onPressKeyWithCtrl:function(e){this.canEdit()&&(e.keyCode==this.KeyCode_c||e.keyCode==this.KeyCode_C?this.props.handleCopy({value:this.props.value}):(e.keyCode==this.KeyCode_v||e.keyCode==this.KeyCode_V)&&this.props.handlePaste({value:this.props.value}))}});e.exports=a},function(e,t,s){"use strict";var r=s(10),i=r.addons.classSet,o=(r.addons.cloneWithProps,r.PropTypes,s(23)),n=s(32),l=s(9),a=o.createDependency({KeyboardHandlerMixin:l,SelectableMixin:n}).assignTo({getCellClass:function(){return i({"selected-draggable":this.isSelected(),"active-drag-cell":this.isSelected()||this.isDraggedOver(),"is-dragged-over-up":!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx<this.props.dragged.rowIdx,"is-dragged-over-down":!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx>this.props.dragged.rowIdx,"was-dragged-over":this.wasDraggedOver()})},getDefaultProps:function(){return{handleDragStart:this.handleDragStart,onDragEnter:this.handleDragEnter,onDragEnd:this.handleDragEnd}},propTypes:{handleDragEnter:r.PropTypes.func.isRequired,handleDragStart:r.PropTypes.func.isRequired,handleDragEnd:r.PropTypes.func.isRequired,handleTerminateDrag:r.PropTypes.func.isRequired},isDraggedOver:function(){return this.props.dragged&&this.props.dragged.overRowIdx===this.props.rowIdx&&this.props.dragged.idx===this.props.idx},wasDraggedOver:function(){return this.props.dragged&&(this.props.dragged.overRowIdx<this.props.rowIdx&&this.props.rowIdx<this.props.dragged.rowIdx||this.props.dragged.overRowIdx>this.props.rowIdx&&this.props.rowIdx>this.props.dragged.rowIdx)&&this.props.dragged.idx===this.props.idx},handleDragStart:function(e){var t=this.props.rowIdx,s=this.props.idx;this.props.handleDragStart({rowIdx:t,idx:s,copiedText:this.props.value})},handleDragEnter:function(){this.props.handleDragEnter(this.props.rowIdx)},handleDragEnd:function(){this.props.handleDragEnd()},isDraggedCellChanging:function(e){return this.props.dragged?e.dragged&&this.props.idx===e.dragged.idx||this.props.dragged&&this.props.idx===this.props.dragged.idx:!1},componentDidUpdate:function(){var e=this.props.dragged;e&&e.complete===!0&&this.props.handleTerminateDrag()}});e.exports=a},function(e,t,s){"use strict";var r=s(10),i=r.addons.classSet,o=r.createClass({displayName:"SortableHeaderCell",onClick:function(){this.props.column.sortBy(this.props.column,this.props.column.sorted)},getSortByClass:function(){var e=this.props.column.sorted;return i({"pull-right":!0,"glyphicon glyphicon-arrow-up":"ASC"===e,"glyphicon glyphicon-arrow-down":"DESC"===e})},render:function(){return r.createElement("div",{onClick:this.onClick,style:{cursor:"pointer"}},this.props.column.name,r.createElement("span",{className:this.getSortByClass()}))}});e.exports=o},function(e,t,s){"use strict";var r=s(10),i=(r.addons.classSet,r.createClass({displayName:"FilterableHeaderCell",getInitialState:function(){return{filterTerm:""}},handleChange:function(e){e.preventDefault(),e.stopPropagation(),this.setState({filterTerm:e.currentTarget.value}),this.props.onChange({filterTerm:e.currentTarget.value,columnKey:this.props.column.key})},componentDidUpdate:function(){this.getDOMNode().focus()},render:function(){return r.createElement("div",null,r.createElement("div",{className:"form-group"},r.createElement(this.renderInput,null)))},renderInput:function(){return this.props.column.filterable===!1?r.createElement("span",null):r.createElement("input",{type:"text",className:"form-control input-sm",placeholder:"Search",value:this.state.filterTerm,onChange:this.handleChange})}}));e.exports=i},function(e,t,s){"use strict";function r(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=Object.assign||function(e,t){for(var s,i,o=r(e),n=1;n<arguments.length;n++){s=arguments[n],i=Object.keys(Object(s));for(var l=0;l<i.length;l++)o[i[l]]=s[i[l]]}return o}},function(e,t,s){"use strict";function r(e){return function(){return e}}function i(){}var o=s(46);o(i,{thatReturns:r,thatReturnsFalse:r(!1),thatReturnsTrue:r(!0),thatReturnsNull:r(null),thatReturnsThis:function(){return this},thatReturnsArgument:function(e){return e}}),e.exports=i},function(e,t,s){(function(t){"use strict";var s=function(e,s,r,i,o,n,l,a){if(t.env.NODE_ENV&&void 0===s)throw new Error("invariant requires an error message argument");if(!e){var c;if(void 0===s)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[r,i,o,n,l,a],h=0;c=new Error("Invariant Violation: "+s.replace(/%s/g,function(){return p[h++]}))}throw c.framesToPop=1,c}};e.exports=s}).call(t,s(52))},function(e,t,s){(function(t){"use strict";var r=s(51),i=function(e){var s,i={};"production"!==t.env.NODE_ENV?r(e instanceof Object&&!Array.isArray(e),"keyMirror(...): Argument must be an object."):r(e instanceof Object&&!Array.isArray(e));for(s in e)e.hasOwnProperty(s)&&(i[s]=s);return i};e.exports=i}).call(t,s(52))},,function(e,t,s){"use strict";var r=s(10),i=r.PropTypes,o=s(47),n=s(48),l=s(49),a=r.createClass({displayName:"HeaderRow",propTypes:{width:i.number,height:i.number.isRequired,columns:i.array.isRequired,onColumnResize:i.func},render:function(){var e={width:this.props.width?this.props.width+l():"100%",height:this.props.height,whiteSpace:"nowrap",overflowX:"hidden",overflowY:"hidden"},t=this.getCells();return r.createElement("div",r.__spread({},this.props,{className:"react-grid-HeaderRow"}),r.createElement("div",{style:e},t))},getCells:function(){for(var e=[],t=[],s=0,i=this.props.columns.length;i>s;s++){var o=this.props.columns[s],l=r.createElement(n,{ref:s,key:s,height:this.props.height,column:o,renderer:this.props.headerCellRenderer||o.headerRenderer||this.props.cellRenderer,resizing:this.props.resizing===o,onResize:this.props.onColumnResize,onResizeEnd:this.props.onColumnResizeEnd});o.locked?t.push(l):e.push(l)}return e.concat(t)},setScrollLeft:function(e){for(var t=0,s=this.props.columns.length;s>t;t++)this.props.columns[t].locked&&this.refs[t].setScrollLeft(e)},shouldComponentUpdate:function(e){return e.width!==this.props.width||e.height!==this.props.height||e.columns!==this.props.columns||!o(e.style,this.props.style)},getStyle:function(){return{overflow:"hidden",width:"100%",height:this.props.height,position:"absolute"}}});e.exports=a},function(e,t,s){"use strict";function r(){var e=window.innerWidth,t=window.innerHeight;return e&&t||(e=document.documentElement.clientWidth,t=document.documentElement.clientHeight),e&&t||(e=document.body.clientWidth,t=document.body.clientHeight),{width:e,height:t}}e.exports=r},function(e,t,s){"use strict";var r=s(10),i=r.addons.classSet,o=r.PropTypes,n=r.addons.cloneWithProps,l=s(47),a=s(39),c=s(50),p=s(2),h=r.createClass({displayName:"Canvas",mixins:[c],propTypes:{cellRenderer:o.element,rowRenderer:o.oneOfType([o.func,o.element]),rowHeight:o.number.isRequired,displayStart:o.number.isRequired,displayEnd:o.number.isRequired,length:o.number.isRequired,rows:o.oneOfType([o.func.isRequired,o.array.isRequired]),onRows:o.func},render:function(){var e=this.state.displayStart,t=this.state.displayEnd,s=this.props.rowHeight,o=this.props.length,n=this.getRows(e,t).map(function(t,r){return this.renderRow({key:e+r,ref:r,idx:e+r,row:t,height:s,columns:this.props.columns,cellRenderer:this.props.cellRenderer,isSelected:this.isRowSelected(e+r),expandedRows:this.props.expandedRows})}.bind(this));this._currentRowsLength=n.length,e>0&&n.unshift(this.renderPlaceholder("top",e*s)),o-t>0&&n.push(this.renderPlaceholder("bottom",(o-t)*s));var l={position:"absolute",top:0,left:0,width:this.props.totalWidth,height:this.props.height,transform:"translate3d(0, 0, 0)"};return r.createElement("div",{style:l,onScroll:this.onScroll,className:i("react-grid-Canvas",this.props.className)},r.createElement("div",{style:{width:this.props.width,overflow:"hidden"}},n))},renderRow:function(e){return r.isValidElement(this.props.rowRenderer)?n(this.props.rowRenderer,e):this.props.rowRenderer(e)},renderPlaceholder:function(e,t){return r.createElement("div",{key:e,style:{height:t}},this.props.columns.map(function(e,t){return r.createElement("div",{style:{width:e.width},key:t})}))},getDefaultProps:function(){return{rowRenderer:r.createElement(p,null),onRows:a}},isRowSelected:function(e){return this.props.selectedRows&&this.props.selectedRows[e]===!0},getInitialState:function(){return{shouldUpdate:!0,displayStart:this.props.displayStart,displayEnd:this.props.displayEnd}},componentWillMount:function(){this._currentRowsLength=void 0,this._currentRowsRange=void 0,this._scroll=void 0},componentDidMount:function(){this.onRows()},componentDidUpdate:function(){void 0!==this._scroll&&this.setScrollLeft(this._scroll),this.onRows()},componentWillUnmount:function(){this._currentRowsLength=void 0,this._currentRowsRange=void 0,this._scroll=void 0},componentWillReceiveProps:function(e){var t=!(e.visibleStart>this.state.displayStart&&e.visibleEnd<this.state.displayEnd&&e.length===this.props.length&&e.rowHeight===this.props.rowHeight&&e.columns===this.props.columns&&e.width===this.props.width&&l(e.style,this.props.style));this.setState(t?{shouldUpdate:!0,displayStart:e.displayStart,displayEnd:e.displayEnd}:{shouldUpdate:!1})},shouldComponentUpdate:function(e,t){return t.shouldUpdate},onRows:function(){void 0!==this._currentRowsRange&&(this.props.onRows(this._currentRowsRange),this._currentRowsRange=void 0)},getRows:function(e,t){return this._currentRowsRange={start:e,end:t},Array.isArray(this.props.rows)?this.props.rows.slice(e,t):this.props.rows(e,t)},setScrollLeft:function(e){if(void 0!==this._currentRowsLength)for(var t=0,s=this._currentRowsLength;s>t;t++)this.refs[t]&&this.refs[t].setScrollLeft(e)},getScroll:function(){var e=this.getDOMNode(),t=e.scrollTop,s=e.scrollLeft;return{scrollTop:t,scrollLeft:s}},onScroll:function(e){this.appendScrollShim();var t=e.target,s=t.scrollTop,r=t.scrollLeft,i={scrollTop:s,scrollLeft:r};this._scroll=i,this.props.onScroll(i)}});e.exports=h},function(e,t,s){(function(t){"use strict";function s(e,s,r,i,o,n,l){if(e=e||{},t.env.NODE_ENV&&l)throw new Error("Too many arguments passed to copyProperties");for(var a,c=[s,r,i,o,n],p=0;c[p];){a=c[p++];for(var h in a)e[h]=a[h];a.hasOwnProperty&&a.hasOwnProperty("toString")&&"undefined"!=typeof a.toString&&e.toString!==a.toString&&(e.toString=a.toString)}return e}e.exports=s}).call(t,s(52))},function(e,t,s){"use strict";function r(e,t){if(e===t)return!0;var s;for(s in e)if(e.hasOwnProperty(s)&&(!t.hasOwnProperty(s)||e[s]!==t[s]))return!1;for(s in t)if(t.hasOwnProperty(s)&&!e.hasOwnProperty(s))return!1;return!0}e.exports=r},function(e,t,s){"use strict";function r(e){return i.createElement("div",{className:"rex-widget-HeaderCell__value",title:e.column.name},e.column.name)}var i=s(10),o=i.addons.classSet,n=s(53),l=i.PropTypes,a=i.createClass({displayName:"ResizeHandle",style:{position:"absolute",top:0,right:0,width:6,height:"100%"},render:function(){return i.createElement(n,i.__spread({},this.props,{className:"react-grid-HeaderCell__resizeHandle",style:this.style}))}}),c=i.createClass({displayName:"HeaderCell",propTypes:{renderer:l.oneOfType([l.func,l.element]).isRequired,column:l.object.isRequired,onResize:l.func},render:function(){var e=o({"react-grid-HeaderCell":!0,"react-grid-HeaderCell--resizing":this.state.resizing,"react-grid-HeaderCell--locked":this.props.column.locked});e=o(e,this.props.className);var t=this.getCell();return i.createElement("div",{className:e,style:this.getStyle()},t,this.props.column.resizeable?i.createElement(a,{onDrag:this.onDrag,onDragStart:this.onDragStart,onDragEnd:this.onDragEnd}):null)},getCell:function(){return i.isValidElement(this.props.renderer)?i.addons.cloneWithProps(this.props.renderer,{column:this.props.column}):this.props.renderer({column:this.props.column})},getDefaultProps:function(){return{renderer:r}},getInitialState:function(){return{resizing:!1}},setScrollLeft:function(e){var t=this.getDOMNode();t.style.webkitTransform="translate3d("+e+"px, 0px, 0px)",t.style.transform="translate3d("+e+"px, 0px, 0px)"},getStyle:function(){return{width:this.props.column.width,left:this.props.column.left,display:"inline-block",position:"absolute",overflow:"hidden",height:this.props.height,margin:0,textOverflow:"ellipsis",whiteSpace:"nowrap"}},onDragStart:function(){this.setState({resizing:!0})},onDrag:function(e){var t=this.getWidthFromMouseEvent(e);t>0&&this.props.onResize&&this.props.onResize(this.props.column,t)},onDragEnd:function(e){var t=this.getWidthFromMouseEvent(e);this.props.onResizeEnd(this.props.column,t),this.setState({resizing:!1})},getWidthFromMouseEvent:function(e){var t=e.pageX,s=this.getDOMNode().getBoundingClientRect().left;return t-s}});e.exports=c},function(e,t,s){"use strict";function r(){if(void 0===i){var e=document.createElement("div");e.style.width="50px",e.style.height="50px",e.style.overflowY="scroll",e.style.position="absolute",e.style.top="-200px",e.style.left="-200px";var t=document.createElement("div");t.style.height="100px",t.style.width="100%",e.appendChild(t),document.body.appendChild(e);var s=e.offsetWidth,r=t.offsetWidth;document.body.removeChild(e),i=s-r}return i}var i;e.exports=r},function(e,t,s){"use strict";var r={appendScrollShim:function(){if(!this._scrollShim){var e=this._scrollShimSize(),t=document.createElement("div");t.classList.add("react-grid-ScrollShim"),t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.width=e.width+"px",t.style.height=e.height+"px",this.getDOMNode().appendChild(t),this._scrollShim=t}this._scheduleRemoveScrollShim()},_scrollShimSize:function(){return{width:this.props.width,height:this.props.length*this.props.rowHeight}},_scheduleRemoveScrollShim:function(){this._scheduleRemoveScrollShimTimer&&clearTimeout(this._scheduleRemoveScrollShimTimer),this._scheduleRemoveScrollShimTimer=setTimeout(this._removeScrollShim,200)},_removeScrollShim:function(){this._scrollShim&&(this._scrollShim.parentNode.removeChild(this._scrollShim),this._scrollShim=void 0)}};e.exports=r},function(e,t,s){(function(t){"use strict";var s=function(e,s,r,i,o,n,l,a){if("production"!==t.env.NODE_ENV&&void 0===s)throw new Error("invariant requires an error message argument");if(!e){var c;if(void 0===s)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[r,i,o,n,l,a],h=0;c=new Error("Invariant Violation: "+s.replace(/%s/g,function(){return p[h++]}))}throw c.framesToPop=1,c}};e.exports=s}).call(t,s(52))},function(e,t,s){function r(){if(!l){l=!0;for(var e,t=n.length;t;){e=n,n=[];for(var s=-1;++s<t;)e[s]();t=n.length}l=!1}}function i(){}var o=e.exports={},n=[],l=!1;o.nextTick=function(e){n.push(e),l||setTimeout(r,0)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=i,o.addListener=i,o.once=i,o.off=i,o.removeListener=i,o.removeAllListeners=i,o.emit=i,o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,s){"use strict";var r=s(10),i=r.PropTypes,o=s(39),n=r.createClass({displayName:"Draggable",propTypes:{onDragStart:i.func,onDragEnd:i.func,onDrag:i.func,component:i.oneOfType([i.func,i.constructor])},render:function(){var e=this.props.component;return r.createElement(e,r.__spread({},this.props,{onMouseDown:this.onMouseDown}))},getDefaultProps:function(){return{component:r.DOM.div,onDragStart:o.thatReturnsTrue,onDragEnd:o,onDrag:o}},getInitialState:function(){return{drag:null}},onMouseDown:function(e){var t=this.props.onDragStart(e);(null!==t||0===e.button)&&(window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("mousemove",this.onMouseMove),this.setState({drag:t}))},onMouseMove:function(e){null!==this.state.drag&&(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),this.props.onDrag(e))},onMouseUp:function(e){this.cleanUp(),this.props.onDragEnd(e,this.state.drag),this.setState({drag:null})},componentWillUnmount:function(){this.cleanUp()},cleanUp:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove)}});e.exports=n}])}); \ No newline at end of file diff --git a/dist/ReactGridWithAddons.js b/dist/ReactGridWithAddons.js index 5540953..5b9f081 100644 --- a/dist/ReactGridWithAddons.js +++ b/dist/ReactGridWithAddons.js @@ -11,41 +11,41 @@ return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; -/******/ + /******/ // The require function /******/ function __webpack_require__(moduleId) { -/******/ + /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; -/******/ + /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; -/******/ + /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ + /******/ // Flag the module as loaded /******/ module.loaded = true; -/******/ + /******/ // Return the exports of the module /******/ return module.exports; /******/ } -/******/ -/******/ + + /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; -/******/ + /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; -/******/ + /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; -/******/ + /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) @@ -80,22 +80,22 @@ return /******/ (function(modules) { // webpackBootstrap var React = __webpack_require__(10); var PropTypes = React.PropTypes; - var BaseGrid = __webpack_require__(16); - var ExcelCell = __webpack_require__(17); - var ExcelRow = __webpack_require__(18); - var merge = __webpack_require__(19); - var SelectableGridMixin = __webpack_require__(20); - var DraggableGridMixin = __webpack_require__(21); - var CopyPasteGridMixin = __webpack_require__(22); - var EditableGridMixin = __webpack_require__(23); - var SortableGridMixin = __webpack_require__(24); - var FilterableGridMixin = __webpack_require__(25); - var CheckboxEditor = __webpack_require__(26); - var MixinHelper = __webpack_require__(27); + var BaseGrid = __webpack_require__(12); + var ExcelCell = __webpack_require__(13); + var ExcelRow = __webpack_require__(14); + var merge = __webpack_require__(15); + var SelectableGridMixin = __webpack_require__(16); + var DraggableGridMixin = __webpack_require__(17); + var CopyPasteGridMixin = __webpack_require__(18); + var EditableGridMixin = __webpack_require__(19); + var SortableGridMixin = __webpack_require__(20); + var FilterableGridMixin = __webpack_require__(21); + var CheckboxEditor = __webpack_require__(22); + var MixinHelper = __webpack_require__(23); var cloneWithProps = React.addons.cloneWithProps; - var ExcelGrid = React.createClass({displayName: 'ExcelGrid', + var ExcelGrid = React.createClass({displayName: "ExcelGrid", mixins : [SelectableGridMixin, EditableGridMixin, DraggableGridMixin, CopyPasteGridMixin, SortableGridMixin, FilterableGridMixin], @@ -289,7 +289,7 @@ return /******/ (function(modules) { // webpackBootstrap var cloneWithProps = React.addons.cloneWithProps; var ColumnMetrics = __webpack_require__(11); - var Row = React.createClass({displayName: 'Row', + var Row = React.createClass({displayName: "Row", render:function() { var className = cx( @@ -426,7 +426,7 @@ return /******/ (function(modules) { // webpackBootstrap var cx = React.addons.classSet; var cloneWithProps = React.addons.cloneWithProps; - var Cell = React.createClass({displayName: 'Cell', + var Cell = React.createClass({displayName: "Cell", render:function() { var style = this.getStyle(); @@ -455,7 +455,7 @@ return /******/ (function(modules) { // webpackBootstrap renderCellContent:function(props) { var formatter = React.isValidElement(this.props.formatter) ? cloneWithProps(this.props.formatter, props) : this.props.formatter(props); return (React.createElement("div", { - className: "react-grid-Cell__value"}, formatter, " ", this.props.cellControls)) + className: "react-grid-Cell__value", title: this.props.value}, formatter, " ", this.props.cellControls)) }, @@ -503,7 +503,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var React = __webpack_require__(10); - var Toolbar = React.createClass({displayName: 'Toolbar', + var Toolbar = React.createClass({displayName: "Toolbar", onAddRow:function(){ if(this.props.onAddRow){ @@ -552,7 +552,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var React = __webpack_require__(10); var cx = React.addons.classSet; - var isFunction = __webpack_require__(12); + var isFunction = __webpack_require__(24); var EditorMixin = { @@ -722,9 +722,9 @@ return /******/ (function(modules) { // webpackBootstrap /***/ function(module, exports, __webpack_require__) { var Editors = { - AutoComplete : __webpack_require__(13), - DropDownEditor : __webpack_require__(14), - SimpleTextEditor : __webpack_require__(15) + AutoComplete : __webpack_require__(25), + DropDownEditor : __webpack_require__(26), + SimpleTextEditor : __webpack_require__(27) } @@ -826,7 +826,7 @@ return /******/ (function(modules) { // webpackBootstrap var $__0= __webpack_require__(10),PropTypes=$__0.PropTypes,isValidElement=$__0.isValidElement; var shallowCloneObject = __webpack_require__(28); var DOMMetrics = __webpack_require__(29); - var merge = __webpack_require__(19); + var merge = __webpack_require__(15); /** * Update column metrics calculation. @@ -1038,253 +1038,6 @@ return /******/ (function(modules) { // webpackBootstrap /* 12 */ /***/ function(module, exports, __webpack_require__) { - - "use strict"; - - var isFunction = function(functionToCheck){ - var getType = {}; - return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]'; - } - - module.exports = isFunction; - - -/***/ }, -/* 13 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * @jsx React.DOM - * @copyright Prometheus Research, LLC 2014 - */ - 'use strict'; - - var React = __webpack_require__(10); - var cx = React.addons.classSet; - var MixinHelper = __webpack_require__(27); - var EditorMixin = __webpack_require__(5); - var TextInputMixin = __webpack_require__(6); - var ReactAutocomplete = __webpack_require__(39); - var keyboardHandlerMixin = __webpack_require__(9); - - var optionPropType = React.PropTypes.shape({ - id : React.PropTypes.required, - title : React.PropTypes.string - }); - - var AutoCompleteEditor = React.createClass({displayName: 'AutoCompleteEditor', - - propTypes : { - options : React.PropTypes.arrayOf(optionPropType) - }, - - mixins : MixinHelper.mix([keyboardHandlerMixin, EditorMixin, TextInputMixin]), - - overrides : { - checkFocus : function(){ - this.setTextInputFocus(); - }, - getInputNode:function(){ - return this.getSearchComponent().getDOMNode(); - }, - onPressEnter:function(args){ - var e = args[0]; - this.handleEnter(e); - }, - onPressTab:function(args){ - var e = args[0]; - this.handleTab(e); - } - }, - - handleTab:function(e){ - e.stopPropagation(); - e.preventDefault(); - if(!this.isFocusedOnSuggestion()){ - this.handleChange(null, 'Tab'); - }else{ - this.handleChange(this.getFocusedSuggestion(), 'Tab'); - } - }, - - handleEnter:function(e){ - e.stopPropagation(); - e.preventDefault(); - if(!this.isFocusedOnSuggestion()){ - this.props.onCommit({value : this.refs.autoComplete.state.searchTerm, key : 'Enter'}); - } - }, - - getSearchComponent:function(){ - return this.refs.autoComplete.refs.search; - }, - - isFocusedOnSuggestion:function(){ - var autoComplete = this.refs.autoComplete; - return autoComplete.state.focusedValue != null; - }, - - getFocusedSuggestion:function(){ - return this.refs.autoComplete.state.focusedValue; - }, - - onPressArrowDown:function(e){ - //prevent event propogation. this disables downwards cell navigation - e.stopPropagation(); - e.preventDefault(); - }, - - onPressArrowUp:function(e){ - //prevent event propogation. this disables upwards cell navigation - e.stopPropagation(); - }, - - getLabel:function(result) { - var label = this.props.label != null ? this.props.label : 'title'; - if (typeof label === "function") { - return label(result); - } else if (typeof label === "string") { - return result[label]; - } - }, - - handleChange:function(item, key){ - var rowDataChanged = {}; - var value = this.props.value; - if(item!=null){ - value = this.getLabel(item); - if(this.props.valueParams){ - value = this.constuctValueFromParams(item, this.props.valueParams); - } - rowDataChanged[this.props.column.key] = value; - } - key = key ? key : 'Enter'; - this.props.onCommit({value : value, key : key, updated : rowDataChanged}); - }, - - constuctValueFromParams:function(obj, props) { - var ret = []; - for (var i = 0, ii = props.length; i < ii; i++) { - ret.push(obj[props[i]]); - } - return ret.join('|'); - }, - - renderEditorNode:function(){ - var val = {title : this.getDefaultValue()}; - var label = this.props.label != null ? this.props.label : 'title'; - return (React.createElement("div", {style: this.getStyle(), onKeyDown: this.onKeyDown}, - React.createElement(ReactAutocomplete, {search: this.props.search, ref: "autoComplete", label: label, resultIdentifier: this.props.resultIdentifier, options: this.props.options, value: val, onChange: this.handleChange}) - )); - } - - }); - - module.exports = AutoCompleteEditor; - - -/***/ }, -/* 14 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * @jsx React.DOM - * @copyright Prometheus Research, LLC 2014 - */ - 'use strict'; - - var React = __webpack_require__(10); - var cx = React.addons.classSet; - var MixinHelper = __webpack_require__(27); - var keyboardHandlerMixin = __webpack_require__(9); - var EditorMixin = __webpack_require__(5); - var cloneWithProps = React.addons.cloneWithProps; - - var DropDownEditor = React.createClass({displayName: 'DropDownEditor', - - mixins : [keyboardHandlerMixin, EditorMixin], - - overrides : { - getInputNode : function(){ - return this.refs.select.getDOMNode(); - } - }, - - propTypes : { - options : React.PropTypes.array.isRequired - }, - - renderEditorNode:function(){ - return ( - React.createElement("select", {ref: "select", style: this.getStyle(), defaultValue: this.props.value, onChange: this.onChange}, - this.renderOptions() - )); - }, - - renderOptions:function(){ - var options = []; - this.props.options.forEach(function(name){ - options.push(React.createElement("option", {key: name, value: name}, name)); - }, this); - return options; - }, - - - onChange:function(e){ - this.commit({key : 'Enter'}); - }, - - onClick:function(e){ - e.stopPropagation(); - e.preventDefault(); - } - - }); - - module.exports = DropDownEditor; - - -/***/ }, -/* 15 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * @jsx React.DOM - * @copyright Prometheus Research, LLC 2014 - */ - 'use strict'; - - var React = __webpack_require__(10); - var cx = React.addons.classSet; - var MixinHelper = __webpack_require__(27); - var EditorMixin = __webpack_require__(5); - var TextInputMixin = __webpack_require__(6); - var keyboardHandlerMixin = __webpack_require__(9); - - var SimpleTextEditor = React.createClass({displayName: 'SimpleTextEditor', - - mixins : [keyboardHandlerMixin, EditorMixin, TextInputMixin], - - overrides : { - checkFocus : function(){ - this.setTextInputFocus(); - } - }, - - renderEditorNode:function(){ - return (React.createElement("input", {type: "text", onBlur: this.commit, className: "form-control", defaultValue: this.getDefaultValue(), style: this.getStyle(), onKeyDown: this.onKeyDown})); - } - - - }); - - module.exports = SimpleTextEditor; - - -/***/ }, -/* 16 */ -/***/ function(module, exports, __webpack_require__) { - /** * @jsx React.DOM * @copyright Prometheus Research, LLC 2014 @@ -1333,7 +1086,7 @@ return /******/ (function(modules) { // webpackBootstrap } }; - var Grid = React.createClass({displayName: 'Grid', + var Grid = React.createClass({displayName: "Grid", mixins: [ GridScrollMixin, ColumnMetrics.Mixin, @@ -1398,7 +1151,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 17 */ +/* 13 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1413,16 +1166,16 @@ return /******/ (function(modules) { // webpackBootstrap var EditableMixin = __webpack_require__(33); var CopyableMixin = __webpack_require__(34); var DraggableMixin = __webpack_require__(35); - var MixinHelper = __webpack_require__(27); + var MixinHelper = __webpack_require__(23); var KeyboardHandlerMixin = __webpack_require__(9); - var isFunction = __webpack_require__(12); + var isFunction = __webpack_require__(24); var PropTypes = React.PropTypes; var cx = React.addons.classSet; var cloneWithProps = React.addons.cloneWithProps; - var CellControls = React.createClass({displayName: 'CellControls', + var CellControls = React.createClass({displayName: "CellControls", onClickEdit : function(e){ e.stopPropagation(); @@ -1470,7 +1223,7 @@ return /******/ (function(modules) { // webpackBootstrap }) - var ExcelCell = React.createClass({displayName: 'ExcelCell', + var ExcelCell = React.createClass({displayName: "ExcelCell", mixins : [EditableMixin, CopyableMixin, DraggableMixin], @@ -1540,7 +1293,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 18 */ +/* 14 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1553,7 +1306,7 @@ return /******/ (function(modules) { // webpackBootstrap var cx = React.addons.classSet; var BaseRow = __webpack_require__(2); var ColumnMetrics = __webpack_require__(11); - var ExcelRow = React.createClass({displayName: 'ExcelRow', + var ExcelRow = React.createClass({displayName: "ExcelRow", render:function() { var row = React.addons.update(this.props.row, {$merge : {'select-row' : this.props.isSelected}}); @@ -1567,8 +1320,8 @@ return /******/ (function(modules) { // webpackBootstrap }, getRowHeight:function(props){ - if(props.expandedRows && props.expandedRows[props.key]){ - return props.expandedRows[props.key]; + if(props.expandedRows && props.expandedRows[props.idx]){ + return props.expandedRows[props.idx]; }else{ return props.height; } @@ -1576,8 +1329,8 @@ return /******/ (function(modules) { // webpackBootstrap hasRowHeightChanged:function(props){ if(props.expandedRows){ - if(typeof props.expandedRows[props.key] !== 'undefined'){ - return this.props.height !== props.expandedRows[props.key] + if(typeof props.expandedRows[props.idx] !== 'undefined'){ + return this.props.height !== props.expandedRows[props.idx] }else{ return false; } @@ -1642,7 +1395,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 19 */ +/* 15 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1694,7 +1447,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 20 */ +/* 16 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1746,7 +1499,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 21 */ +/* 17 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1757,8 +1510,8 @@ return /******/ (function(modules) { // webpackBootstrap var React = __webpack_require__(10); var PropTypes = React.PropTypes; - var MixinHelper = __webpack_require__(27); - var SelectableGridMixin = __webpack_require__(20); + var MixinHelper = __webpack_require__(23); + var SelectableGridMixin = __webpack_require__(16); MixinHelper.addAlias('SelectableGridMixin'); @@ -1815,7 +1568,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 22 */ +/* 18 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1857,7 +1610,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 23 */ +/* 19 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1868,7 +1621,7 @@ return /******/ (function(modules) { // webpackBootstrap var React = __webpack_require__(10); var PropTypes = React.PropTypes; - var merge = __webpack_require__(19); + var merge = __webpack_require__(15); var EditableGridMixin = { @@ -1898,7 +1651,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 24 */ +/* 20 */ /***/ function(module, exports, __webpack_require__) { /** @@ -1982,7 +1735,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 25 */ +/* 21 */ /***/ function(module, exports, __webpack_require__) { /** @@ -2077,7 +1830,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 26 */ +/* 22 */ /***/ function(module, exports, __webpack_require__) { /** @@ -2089,7 +1842,7 @@ return /******/ (function(modules) { // webpackBootstrap var React = __webpack_require__(10); var cx = React.addons.classSet; - var CheckBoxEditor = React.createClass({displayName: 'CheckBoxEditor', + var CheckBoxEditor = React.createClass({displayName: "CheckBoxEditor", PropTypes : { @@ -2114,14 +1867,14 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 27 */ +/* 23 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var keyMirror = __webpack_require__(42); - var isFunction = __webpack_require__(12) + var keyMirror = __webpack_require__(41); + var isFunction = __webpack_require__(24) var React = __webpack_require__(10); if (!Object.assign) { Object.assign = __webpack_require__(38); @@ -2349,30 +2102,22 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 28 */ +/* 24 */ /***/ function(module, exports, __webpack_require__) { - /** - * @jsx React.DOM - * @copyright Prometheus Research, LLC 2014 - */ - 'use strict'; + + "use strict"; - function shallowCloneObject(obj) { - var result = {}; - for (var k in obj) { - if (obj.hasOwnProperty(k)) { - result[k] = obj[k]; - } - } - return result; + var isFunction = function(functionToCheck){ + var getType = {}; + return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]'; } - module.exports = shallowCloneObject; + module.exports = isFunction; /***/ }, -/* 29 */ +/* 25 */ /***/ function(module, exports, __webpack_require__) { /** @@ -2381,184 +2126,439 @@ return /******/ (function(modules) { // webpackBootstrap */ 'use strict'; - var React = __webpack_require__(10); - var emptyFunction = __webpack_require__(40); - var shallowCloneObject = __webpack_require__(28); - var invariant = __webpack_require__(41); - - var contextTypes = { - metricsComputator: React.PropTypes.object - }; - - var MetricsComputatorMixin = { - - childContextTypes: contextTypes, - - getChildContext:function() { - return {metricsComputator: this}; - }, - - getMetricImpl:function(name) { - return this._DOMMetrics.metrics[name].value; - }, - - registerMetricsImpl:function(component, metrics) { - var getters = {}; - var s = this._DOMMetrics; + var React = __webpack_require__(10); + var cx = React.addons.classSet; + var MixinHelper = __webpack_require__(23); + var EditorMixin = __webpack_require__(5); + var TextInputMixin = __webpack_require__(6); + var ReactAutocomplete = __webpack_require__(42); + var keyboardHandlerMixin = __webpack_require__(9); - for (var name in metrics) { - invariant( - s.metrics[name] === undefined, - 'DOM metric ' + name + ' is already defined' - ); - s.metrics[name] = {component:component, computator: metrics[name].bind(component)}; - getters[name] = this.getMetricImpl.bind(null, name); - } + var optionPropType = React.PropTypes.shape({ + id : React.PropTypes.required, + title : React.PropTypes.string + }); - if (s.components.indexOf(component) === -1) { - s.components.push(component); - } + var AutoCompleteEditor = React.createClass({displayName: "AutoCompleteEditor", - return getters; + propTypes : { + options : React.PropTypes.arrayOf(optionPropType) }, - unregisterMetricsFor:function(component) { - var s = this._DOMMetrics; - var idx = s.components.indexOf(component); - - if (idx > -1) { - s.components.splice(idx, 1); - - var name; - var metricsToDelete = {}; - - for (name in s.metrics) { - if (s.metrics[name].component === component) { - metricsToDelete[name] = true; - } - } + mixins : MixinHelper.mix([keyboardHandlerMixin, EditorMixin, TextInputMixin]), - for (name in metricsToDelete) { - delete s.metrics[name]; + overrides : { + checkFocus : function(){ + this.setTextInputFocus(); + }, + getInputNode:function(){ + return this.getSearchComponent().getDOMNode(); + }, + onPressEnter:function(args){ + var e = args[0]; + this.handleEnter(e); + }, + onPressTab:function(args){ + var e = args[0]; + this.handleTab(e); } - } }, - updateMetrics:function() { - var s = this._DOMMetrics; - - var needUpdate = false; - - for (var name in s.metrics) { - var newMetric = s.metrics[name].computator(); - if (newMetric !== s.metrics[name].value) { - needUpdate = true; - } - s.metrics[name].value = newMetric; + handleTab:function(e){ + e.stopPropagation(); + e.preventDefault(); + if(!this.isFocusedOnSuggestion()){ + this.handleChange(null, 'Tab'); + }else{ + this.handleChange(this.getFocusedSuggestion(), 'Tab'); } + }, - if (needUpdate) { - for (var i = 0, len = s.components.length; i < len; i++) { - if (s.components[i].metricsUpdated) { - s.components[i].metricsUpdated(); - } - } + handleEnter:function(e){ + e.stopPropagation(); + e.preventDefault(); + if(!this.isFocusedOnSuggestion()){ + this.props.onCommit({value : this.refs.autoComplete.state.searchTerm, key : 'Enter'}); } }, - componentWillMount:function() { - this._DOMMetrics = { - metrics: {}, - components: [] - }; + getSearchComponent:function(){ + return this.refs.autoComplete.refs.search; }, - componentDidMount:function() { - if(window.addEventListener){ - window.addEventListener('resize', this.updateMetrics); - }else{ - window.attachEvent('resize', this.updateMetrics); - } - this.updateMetrics(); + isFocusedOnSuggestion:function(){ + var autoComplete = this.refs.autoComplete; + return autoComplete.state.focusedValue != null; }, - componentWillUnmount:function() { - window.removeEventListener('resize', this.updateMetrics); - } - - }; - - var MetricsMixin = { - - contextTypes: contextTypes, + getFocusedSuggestion:function(){ + return this.refs.autoComplete.state.focusedValue; + }, - componentWillMount:function() { - if (this.DOMMetrics) { - this._DOMMetricsDefs = shallowCloneObject(this.DOMMetrics); + onPressArrowDown:function(e){ + //prevent event propogation. this disables downwards cell navigation + e.stopPropagation(); + e.preventDefault(); + }, - this.DOMMetrics = {}; - for (var name in this._DOMMetricsDefs) { - this.DOMMetrics[name] = emptyFunction; - } - } + onPressArrowUp:function(e){ + //prevent event propogation. this disables upwards cell navigation + e.stopPropagation(); }, - componentDidMount:function() { - if (this.DOMMetrics) { - this.DOMMetrics = this.registerMetrics(this._DOMMetricsDefs); + getLabel:function(result) { + var label = this.props.label != null ? this.props.label : 'title'; + if (typeof label === "function") { + return label(result); + } else if (typeof label === "string") { + return result[label]; } }, - componentWillUnmount:function() { - if (!this.registerMetricsImpl) { - return this.context.metricsComputator.unregisterMetricsFor(this); - } - if (this.hasOwnProperty('DOMMetrics')) { - delete this.DOMMetrics; + handleChange:function(item, key){ + var rowDataChanged = {}; + var value = this.props.value; + if(item!=null){ + value = this.getLabel(item); + if(this.props.valueParams){ + value = this.constuctValueFromParams(item, this.props.valueParams); + } + rowDataChanged[this.props.column.key] = value; } + key = key ? key : 'Enter'; + this.props.onCommit({value : value, key : key, updated : rowDataChanged}); }, - registerMetrics:function(metrics) { - if (this.registerMetricsImpl) { - return this.registerMetricsImpl(this, metrics); - } else { - return this.context.metricsComputator.registerMetricsImpl(this, metrics); + constuctValueFromParams:function(obj, props) { + var ret = []; + for (var i = 0, ii = props.length; i < ii; i++) { + ret.push(obj[props[i]]); } + return ret.join('|'); }, - getMetric:function(name) { - if (this.getMetricImpl) { - return this.getMetricImpl(name); - } else { - return this.context.metricsComputator.getMetricImpl(name); - } + renderEditorNode:function(){ + var val = {title : this.getDefaultValue()}; + var label = this.props.label != null ? this.props.label : 'title'; + return (React.createElement("div", {style: this.getStyle(), onKeyDown: this.onKeyDown}, + React.createElement(ReactAutocomplete, {search: this.props.search, ref: "autoComplete", label: label, resultIdentifier: this.props.resultIdentifier, options: this.props.options, value: val, onChange: this.handleChange}) + )); } - }; - module.exports = { - MetricsComputatorMixin:MetricsComputatorMixin, - MetricsMixin:MetricsMixin - }; + }); + + module.exports = AutoCompleteEditor; /***/ }, -/* 30 */ +/* 26 */ /***/ function(module, exports, __webpack_require__) { /** * @jsx React.DOM * @copyright Prometheus Research, LLC 2014 */ - "use strict"; + 'use strict'; - var React = __webpack_require__(10); - var cx = React.addons.classSet; + var React = __webpack_require__(10); + var cx = React.addons.classSet; + var MixinHelper = __webpack_require__(23); + var keyboardHandlerMixin = __webpack_require__(9); + var EditorMixin = __webpack_require__(5); + var cloneWithProps = React.addons.cloneWithProps; + + var DropDownEditor = React.createClass({displayName: "DropDownEditor", + + mixins : [keyboardHandlerMixin, EditorMixin], + + overrides : { + getInputNode : function(){ + return this.refs.select.getDOMNode(); + } + }, + + propTypes : { + options : React.PropTypes.array.isRequired + }, + + renderEditorNode:function(){ + return ( + React.createElement("select", {ref: "select", style: this.getStyle(), defaultValue: this.props.value, onChange: this.onChange}, + this.renderOptions() + )); + }, + + renderOptions:function(){ + var options = []; + this.props.options.forEach(function(name){ + options.push(React.createElement("option", {key: name, value: name}, name)); + }, this); + return options; + }, + + + onChange:function(e){ + this.commit({key : 'Enter'}); + }, + + onClick:function(e){ + e.stopPropagation(); + e.preventDefault(); + } + + }); + + module.exports = DropDownEditor; + + +/***/ }, +/* 27 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * @jsx React.DOM + * @copyright Prometheus Research, LLC 2014 + */ + 'use strict'; + + var React = __webpack_require__(10); + var cx = React.addons.classSet; + var MixinHelper = __webpack_require__(23); + var EditorMixin = __webpack_require__(5); + var TextInputMixin = __webpack_require__(6); + var keyboardHandlerMixin = __webpack_require__(9); + + var SimpleTextEditor = React.createClass({displayName: "SimpleTextEditor", + + mixins : [keyboardHandlerMixin, EditorMixin, TextInputMixin], + + overrides : { + checkFocus : function(){ + this.setTextInputFocus(); + } + }, + + renderEditorNode:function(){ + return (React.createElement("input", {type: "text", onBlur: this.commit, className: "form-control", defaultValue: this.getDefaultValue(), style: this.getStyle(), onKeyDown: this.onKeyDown})); + } + + + }); + + module.exports = SimpleTextEditor; + + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * @jsx React.DOM + * @copyright Prometheus Research, LLC 2014 + */ + 'use strict'; + + function shallowCloneObject(obj) { + var result = {}; + for (var k in obj) { + if (obj.hasOwnProperty(k)) { + result[k] = obj[k]; + } + } + return result; + } + + module.exports = shallowCloneObject; + + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * @jsx React.DOM + * @copyright Prometheus Research, LLC 2014 + */ + 'use strict'; + + var React = __webpack_require__(10); + var emptyFunction = __webpack_require__(39); + var shallowCloneObject = __webpack_require__(28); + var invariant = __webpack_require__(40); + + var contextTypes = { + metricsComputator: React.PropTypes.object + }; + + var MetricsComputatorMixin = { + + childContextTypes: contextTypes, + + getChildContext:function() { + return {metricsComputator: this}; + }, + + getMetricImpl:function(name) { + return this._DOMMetrics.metrics[name].value; + }, + + registerMetricsImpl:function(component, metrics) { + var getters = {}; + var s = this._DOMMetrics; + + for (var name in metrics) { + invariant( + s.metrics[name] === undefined, + 'DOM metric ' + name + ' is already defined' + ); + s.metrics[name] = {component:component, computator: metrics[name].bind(component)}; + getters[name] = this.getMetricImpl.bind(null, name); + } + + if (s.components.indexOf(component) === -1) { + s.components.push(component); + } + + return getters; + }, + + unregisterMetricsFor:function(component) { + var s = this._DOMMetrics; + var idx = s.components.indexOf(component); + + if (idx > -1) { + s.components.splice(idx, 1); + + var name; + var metricsToDelete = {}; + + for (name in s.metrics) { + if (s.metrics[name].component === component) { + metricsToDelete[name] = true; + } + } + + for (name in metricsToDelete) { + delete s.metrics[name]; + } + } + }, + + updateMetrics:function() { + var s = this._DOMMetrics; + + var needUpdate = false; + + for (var name in s.metrics) { + var newMetric = s.metrics[name].computator(); + if (newMetric !== s.metrics[name].value) { + needUpdate = true; + } + s.metrics[name].value = newMetric; + } + + if (needUpdate) { + for (var i = 0, len = s.components.length; i < len; i++) { + if (s.components[i].metricsUpdated) { + s.components[i].metricsUpdated(); + } + } + } + }, + + componentWillMount:function() { + this._DOMMetrics = { + metrics: {}, + components: [] + }; + }, + + componentDidMount:function() { + if(window.addEventListener){ + window.addEventListener('resize', this.updateMetrics); + }else{ + window.attachEvent('resize', this.updateMetrics); + } + this.updateMetrics(); + }, + + componentWillUnmount:function() { + window.removeEventListener('resize', this.updateMetrics); + } + + }; + + var MetricsMixin = { + + contextTypes: contextTypes, + + componentWillMount:function() { + if (this.DOMMetrics) { + this._DOMMetricsDefs = shallowCloneObject(this.DOMMetrics); + + this.DOMMetrics = {}; + for (var name in this._DOMMetricsDefs) { + this.DOMMetrics[name] = emptyFunction; + } + } + }, + + componentDidMount:function() { + if (this.DOMMetrics) { + this.DOMMetrics = this.registerMetrics(this._DOMMetricsDefs); + } + }, + + componentWillUnmount:function() { + if (!this.registerMetricsImpl) { + return this.context.metricsComputator.unregisterMetricsFor(this); + } + if (this.hasOwnProperty('DOMMetrics')) { + delete this.DOMMetrics; + } + }, + + registerMetrics:function(metrics) { + if (this.registerMetricsImpl) { + return this.registerMetricsImpl(this, metrics); + } else { + return this.context.metricsComputator.registerMetricsImpl(this, metrics); + } + }, + + getMetric:function(name) { + if (this.getMetricImpl) { + return this.getMetricImpl(name); + } else { + return this.context.metricsComputator.getMetricImpl(name); + } + } + }; + + module.exports = { + MetricsComputatorMixin:MetricsComputatorMixin, + MetricsMixin:MetricsMixin + }; + + +/***/ }, +/* 30 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * @jsx React.DOM + * @copyright Prometheus Research, LLC 2014 + */ + "use strict"; + + var React = __webpack_require__(10); + var cx = React.addons.classSet; var shallowCloneObject = __webpack_require__(28); var ColumnMetrics = __webpack_require__(11); - var HeaderRow = __webpack_require__(45); + var HeaderRow = __webpack_require__(43); var ColumnMetrics = __webpack_require__(11); - var Header = React.createClass({displayName: 'Header', + var Header = React.createClass({displayName: "Header", propTypes: { columns: React.PropTypes.object.isRequired, @@ -2690,9 +2690,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var React = __webpack_require__(10); - var getWindowSize = __webpack_require__(43); + var getWindowSize = __webpack_require__(44); var DOMMetrics = __webpack_require__(29); - var Canvas = __webpack_require__(44); + var Canvas = __webpack_require__(45); var min = Math.min; var max = Math.max; @@ -2795,7 +2795,7 @@ return /******/ (function(modules) { // webpackBootstrap } }; - var Viewport = React.createClass({displayName: 'Viewport', + var Viewport = React.createClass({displayName: "Viewport", mixins: [ViewportScroll], render:function() { @@ -2804,7 +2804,7 @@ return /******/ (function(modules) { // webpackBootstrap bottom: 0, left: 0, right: 0, - overflow: 'hidden', + //overflow: 'hidden', position: 'absolute', top: this.props.rowOffsetHeight }; @@ -2877,7 +2877,7 @@ return /******/ (function(modules) { // webpackBootstrap var cx = React.addons.classSet; var cloneWithProps = React.addons.cloneWithProps; var KeyboardHandlerMixin = __webpack_require__(9); - var MixinHelper = __webpack_require__(27); + var MixinHelper = __webpack_require__(23); var SelectableMixin = MixinHelper.createDependency({KeyboardHandlerMixin : KeyboardHandlerMixin}).assignTo({ @@ -2975,9 +2975,9 @@ return /******/ (function(modules) { // webpackBootstrap var React = __webpack_require__(10); var cx = React.addons.classSet; var cloneWithProps = React.addons.cloneWithProps; - var SimpleTextEditor = __webpack_require__(15); + var SimpleTextEditor = __webpack_require__(27); var PropTypes = React.PropTypes; - var MixinHelper = __webpack_require__(27); + var MixinHelper = __webpack_require__(23); var SelectableMixin = __webpack_require__(32); var KeyboardHandlerMixin = __webpack_require__(9); @@ -3121,8 +3121,8 @@ return /******/ (function(modules) { // webpackBootstrap var cx = React.addons.classSet; var cloneWithProps = React.addons.cloneWithProps; var PropTypes = React.PropTypes; - var SimpleTextEditor = __webpack_require__(15); - var MixinHelper = __webpack_require__(27); + var SimpleTextEditor = __webpack_require__(27); + var MixinHelper = __webpack_require__(23); var SelectableMixin = __webpack_require__(32); var KeyboardHandlerMixin = __webpack_require__(9); @@ -3192,7 +3192,7 @@ return /******/ (function(modules) { // webpackBootstrap var cx = React.addons.classSet; var cloneWithProps = React.addons.cloneWithProps; var PropTypes = React.PropTypes; - var MixinHelper = __webpack_require__(27); + var MixinHelper = __webpack_require__(23); var SelectableMixin = __webpack_require__(32); var KeyboardHandlerMixin = __webpack_require__(9); @@ -3297,7 +3297,7 @@ return /******/ (function(modules) { // webpackBootstrap var React = __webpack_require__(10); var cx = React.addons.classSet; - var SortableHeaderCell = React.createClass({displayName: 'SortableHeaderCell', + var SortableHeaderCell = React.createClass({displayName: "SortableHeaderCell", onClick: function() { this.props.column.sortBy( @@ -3343,7 +3343,7 @@ return /******/ (function(modules) { // webpackBootstrap var React = __webpack_require__(10); var cx = React.addons.classSet; - var FilterableHeaderCell = React.createClass({displayName: 'FilterableHeaderCell', + var FilterableHeaderCell = React.createClass({displayName: "FilterableHeaderCell", getInitialState:function(){ return {filterTerm : ''} @@ -3402,21 +3402,196 @@ return /******/ (function(modules) { // webpackBootstrap var keys; var to = ToObject(target); - for (var s = 1; s < arguments.length; s++) { - from = arguments[s]; - keys = Object.keys(Object(from)); + for (var s = 1; s < arguments.length; s++) { + from = arguments[s]; + keys = Object.keys(Object(from)); + + for (var i = 0; i < keys.length; i++) { + to[keys[i]] = from[keys[i]]; + } + } + + return to; + }; + + +/***/ }, +/* 39 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2013-2014 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @providesModule emptyFunction + */ + 'use strict'; + + var copyProperties = __webpack_require__(46); + + function makeEmptyFunction(arg) { + return function() { + return arg; + }; + } + + /** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ + function emptyFunction() {} + + copyProperties(emptyFunction, { + thatReturns: makeEmptyFunction, + thatReturnsFalse: makeEmptyFunction(false), + thatReturnsTrue: makeEmptyFunction(true), + thatReturnsNull: makeEmptyFunction(null), + thatReturnsThis: function() { return this; }, + thatReturnsArgument: function(arg) { return arg; } + }); + + module.exports = emptyFunction; + + +/***/ }, +/* 40 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-2014 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @providesModule invariant + */ + + "use strict"; + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var invariant = function(condition, format, a, b, c, d, e, f) { + if (process.env.NODE_ENV) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + 'Invariant Violation: ' + + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + }; + + module.exports = invariant; + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(52))) + +/***/ }, +/* 41 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-2014, 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 keyMirror + * @typechecks static-only + */ + + "use strict"; - for (var i = 0; i < keys.length; i++) { - to[keys[i]] = from[keys[i]]; - } - } + var invariant = __webpack_require__(51); - return to; + /** + * Constructs an enumeration with keys equal to their value. + * + * For example: + * + * var COLORS = keyMirror({blue: null, red: null}); + * var myColor = COLORS.blue; + * var isColorValid = !!COLORS[myColor]; + * + * The last line could not be performed if the values of the generated enum were + * not equal to their keys. + * + * Input: {key1: val1, key2: val2} + * Output: {key1: key1, key2: key2} + * + * @param {object} obj + * @return {object} + */ + var keyMirror = function(obj) { + var ret = {}; + var key; + ("production" !== process.env.NODE_ENV ? invariant( + obj instanceof Object && !Array.isArray(obj), + 'keyMirror(...): Argument must be an object.' + ) : invariant(obj instanceof Object && !Array.isArray(obj))); + for (key in obj) { + if (!obj.hasOwnProperty(key)) { + continue; + } + ret[key] = key; + } + return ret; }; + module.exports = keyMirror; + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(52))) /***/ }, -/* 39 */ +/* 42 */ /***/ function(module, exports, __webpack_require__) { (function webpackUniversalModuleDefinition(root, factory) { @@ -3475,8 +3650,8 @@ return /******/ (function(modules) { // webpackBootstrap /* 0 */ /***/ function(module, exports, __webpack_require__) { - /** - * @jsx React.DOM + /** + * @jsx React.DOM */ "use strict"; @@ -3559,12 +3734,12 @@ return /******/ (function(modules) { // webpackBootstrap this.blurTimer = null; }, - /** - * Show results for a search term value. - * - * This method doesn't update search term value itself. - * - * @param {Search} searchTerm + /** + * Show results for a search term value. + * + * This method doesn't update search term value itself. + * + * @param {Search} searchTerm */ showResults: function (searchTerm) { this.setState({ showResultsInProgress: true }); @@ -3834,13 +4009,13 @@ return /******/ (function(modules) { // webpackBootstrap } }); - /** - * Search options using specified search term treating options as an array - * of candidates. - * - * @param {Array.<Object>} options - * @param {String} searchTerm - * @param {Callback} cb + /** + * Search options using specified search term treating options as an array + * of candidates. + * + * @param {Array.<Object>} options + * @param {String} searchTerm + * @param {Callback} cb */ function searchArray(options, searchTerm, cb) { if (!options) { @@ -3875,182 +4050,110 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 40 */ +/* 43 */ /***/ function(module, exports, __webpack_require__) { /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @providesModule emptyFunction - */ - 'use strict'; - - var copyProperties = __webpack_require__(46); - - function makeEmptyFunction(arg) { - return function() { - return arg; - }; - } - - /** - * This function accepts and discards inputs; it has no side effects. This is - * primarily useful idiomatically for overridable function endpoints which - * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + * @jsx React.DOM + * @copyright Prometheus Research, LLC 2014 */ - function emptyFunction() {} - - copyProperties(emptyFunction, { - thatReturns: makeEmptyFunction, - thatReturnsFalse: makeEmptyFunction(false), - thatReturnsTrue: makeEmptyFunction(true), - thatReturnsNull: makeEmptyFunction(null), - thatReturnsThis: function() { return this; }, - thatReturnsArgument: function(arg) { return arg; } - }); - - module.exports = emptyFunction; + "use strict"; + var React = __webpack_require__(10); + var PropTypes = React.PropTypes; + var shallowEqual = __webpack_require__(47); + var HeaderCell = __webpack_require__(48); + var getScrollbarSize = __webpack_require__(49); -/***/ }, -/* 41 */ -/***/ function(module, exports, __webpack_require__) { + var HeaderRow = React.createClass({displayName: "HeaderRow", - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @providesModule invariant - */ + propTypes: { + width: PropTypes.number, + height: PropTypes.number.isRequired, + columns: PropTypes.array.isRequired, + onColumnResize: PropTypes.func + }, - "use strict"; + render:function() { + var cellsStyle = { + width: this.props.width ? (this.props.width + getScrollbarSize()) : '100%', + height: this.props.height, + whiteSpace: 'nowrap', + overflowX: 'hidden', + overflowY: 'hidden' + }; - /** - * Use invariant() to assert state which your program assumes to be true. - * - * Provide sprintf-style format (only %s is supported) and arguments - * to provide information about what broke and what you were - * expecting. - * - * The invariant message will be stripped in production, but the invariant - * will remain to ensure logic does not differ in production. - */ + var cells = this.getCells(); + return ( + React.createElement("div", React.__spread({}, this.props, {className: "react-grid-HeaderRow"}), + React.createElement("div", {style: cellsStyle}, + cells + ) + ) + ); + }, - var invariant = function(condition, format, a, b, c, d, e, f) { - if (process.env.NODE_ENV) { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - } + getCells:function() { + var cells = []; + var lockedCells = []; - if (!condition) { - var error; - if (format === undefined) { - error = new Error( - 'Minified exception occurred; use the non-minified dev environment ' + - 'for the full error message and additional helpful warnings.' - ); - } else { - var args = [a, b, c, d, e, f]; - var argIndex = 0; - error = new Error( - 'Invariant Violation: ' + - format.replace(/%s/g, function() { return args[argIndex++]; }) + for (var i = 0, len = this.props.columns.length; i < len; i++) { + var column = this.props.columns[i]; + var cell = ( + React.createElement(HeaderCell, { + ref: i, + key: i, + height: this.props.height, + column: column, + renderer: this.props.headerCellRenderer || column.headerRenderer || this.props.cellRenderer, + resizing: this.props.resizing === column, + onResize: this.props.onColumnResize, + onResizeEnd: this.props.onColumnResizeEnd} + ) ); + if (column.locked) { + lockedCells.push(cell); + } else { + cells.push(cell); + } } - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } - }; - - module.exports = invariant; - - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(52))) - -/***/ }, -/* 42 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-2014, 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 keyMirror - * @typechecks static-only - */ - - "use strict"; - - var invariant = __webpack_require__(51); + return cells.concat(lockedCells); + }, - /** - * Constructs an enumeration with keys equal to their value. - * - * For example: - * - * var COLORS = keyMirror({blue: null, red: null}); - * var myColor = COLORS.blue; - * var isColorValid = !!COLORS[myColor]; - * - * The last line could not be performed if the values of the generated enum were - * not equal to their keys. - * - * Input: {key1: val1, key2: val2} - * Output: {key1: key1, key2: key2} - * - * @param {object} obj - * @return {object} - */ - var keyMirror = function(obj) { - var ret = {}; - var key; - ("production" !== process.env.NODE_ENV ? invariant( - obj instanceof Object && !Array.isArray(obj), - 'keyMirror(...): Argument must be an object.' - ) : invariant(obj instanceof Object && !Array.isArray(obj))); - for (key in obj) { - if (!obj.hasOwnProperty(key)) { - continue; + setScrollLeft:function(scrollLeft) { + for (var i = 0, len = this.props.columns.length; i < len; i++) { + if (this.props.columns[i].locked) { + this.refs[i].setScrollLeft(scrollLeft); + } } - ret[key] = key; + }, + + shouldComponentUpdate:function(nextProps) { + return ( + nextProps.width !== this.props.width + || nextProps.height !== this.props.height + || nextProps.columns !== this.props.columns + || !shallowEqual(nextProps.style, this.props.style) + ); + }, + + getStyle:function() { + return { + overflow: 'hidden', + width: '100%', + height: this.props.height, + position: 'absolute' + }; } - return ret; - }; - module.exports = keyMirror; - - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(52))) + }); + + module.exports = HeaderRow; + /***/ }, -/* 43 */ +/* 44 */ /***/ function(module, exports, __webpack_require__) { /** @@ -4085,7 +4188,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 44 */ +/* 45 */ /***/ function(module, exports, __webpack_require__) { /** @@ -4099,11 +4202,11 @@ return /******/ (function(modules) { // webpackBootstrap var PropTypes = React.PropTypes; var cloneWithProps = React.addons.cloneWithProps; var shallowEqual = __webpack_require__(47); - var emptyFunction = __webpack_require__(40); - var ScrollShim = __webpack_require__(48); + var emptyFunction = __webpack_require__(39); + var ScrollShim = __webpack_require__(50); var Row = __webpack_require__(2); - var Canvas = React.createClass({displayName: 'Canvas', + var Canvas = React.createClass({displayName: "Canvas", mixins: [ScrollShim], propTypes: { @@ -4155,8 +4258,8 @@ return /******/ (function(modules) { // webpackBootstrap position: 'absolute', top: 0, left: 0, - overflowX: 'auto', - overflowY: 'scroll', + //overflowX: 'auto', + //overflowY: 'scroll', width: this.props.totalWidth, height: this.props.height, transform: 'translate3d(0, 0, 0)' @@ -4301,109 +4404,6 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Canvas; -/***/ }, -/* 45 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * @jsx React.DOM - * @copyright Prometheus Research, LLC 2014 - */ - "use strict"; - - var React = __webpack_require__(10); - var PropTypes = React.PropTypes; - var shallowEqual = __webpack_require__(47); - var HeaderCell = __webpack_require__(49); - var getScrollbarSize = __webpack_require__(50); - - var HeaderRow = React.createClass({displayName: 'HeaderRow', - - propTypes: { - width: PropTypes.number, - height: PropTypes.number.isRequired, - columns: PropTypes.array.isRequired, - onColumnResize: PropTypes.func - }, - - render:function() { - var cellsStyle = { - width: this.props.width ? (this.props.width + getScrollbarSize()) : '100%', - height: this.props.height, - whiteSpace: 'nowrap', - overflowX: 'hidden', - overflowY: 'hidden' - }; - - var cells = this.getCells(); - return ( - React.createElement("div", React.__spread({}, this.props, {className: "react-grid-HeaderRow"}), - React.createElement("div", {style: cellsStyle}, - cells - ) - ) - ); - }, - - getCells:function() { - var cells = []; - var lockedCells = []; - - for (var i = 0, len = this.props.columns.length; i < len; i++) { - var column = this.props.columns[i]; - var cell = ( - React.createElement(HeaderCell, { - ref: i, - key: i, - height: this.props.height, - column: column, - renderer: this.props.headerCellRenderer || column.headerRenderer || this.props.cellRenderer, - resizing: this.props.resizing === column, - onResize: this.props.onColumnResize, - onResizeEnd: this.props.onColumnResizeEnd} - ) - ); - if (column.locked) { - lockedCells.push(cell); - } else { - cells.push(cell); - } - } - - return cells.concat(lockedCells); - }, - - setScrollLeft:function(scrollLeft) { - for (var i = 0, len = this.props.columns.length; i < len; i++) { - if (this.props.columns[i].locked) { - this.refs[i].setScrollLeft(scrollLeft); - } - } - }, - - shouldComponentUpdate:function(nextProps) { - return ( - nextProps.width !== this.props.width - || nextProps.height !== this.props.height - || nextProps.columns !== this.props.columns - || !shallowEqual(nextProps.style, this.props.style) - ); - }, - - getStyle:function() { - return { - overflow: 'hidden', - width: '100%', - height: this.props.height, - position: 'absolute' - }; - } - - }); - - module.exports = HeaderRow; - - /***/ }, /* 46 */ /***/ function(module, exports, __webpack_require__) { @@ -4463,7 +4463,7 @@ return /******/ (function(modules) { // webpackBootstrap } module.exports = copyProperties; - + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(52))) /***/ }, @@ -4504,60 +4504,6 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, /* 48 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * @jsx React.DOM - * @copyright Prometheus Research, LLC 2014 - */ - 'use strict'; - - var ScrollShim = { - - appendScrollShim:function() { - if (!this._scrollShim) { - var size = this._scrollShimSize(); - var shim = document.createElement('div'); - shim.classList.add('react-grid-ScrollShim'); - shim.style.position = 'absolute'; - shim.style.top = 0; - shim.style.left = 0; - shim.style.width = (size.width + "px"); - shim.style.height = (size.height + "px"); - this.getDOMNode().appendChild(shim); - this._scrollShim = shim; - } - this._scheduleRemoveScrollShim(); - }, - - _scrollShimSize:function() { - return { - width: this.props.width, - height: this.props.length * this.props.rowHeight - }; - }, - - _scheduleRemoveScrollShim:function() { - if (this._scheduleRemoveScrollShimTimer) { - clearTimeout(this._scheduleRemoveScrollShimTimer); - } - this._scheduleRemoveScrollShimTimer = setTimeout( - this._removeScrollShim, 200); - }, - - _removeScrollShim:function() { - if (this._scrollShim) { - this._scrollShim.parentNode.removeChild(this._scrollShim); - this._scrollShim = undefined; - } - } - }; - - module.exports = ScrollShim; - - -/***/ }, -/* 49 */ /***/ function(module, exports, __webpack_require__) { /** @@ -4571,7 +4517,7 @@ return /******/ (function(modules) { // webpackBootstrap var Draggable = __webpack_require__(53); var PropTypes = React.PropTypes; - var ResizeHandle = React.createClass({displayName: 'ResizeHandle', + var ResizeHandle = React.createClass({displayName: "ResizeHandle", style: { position: 'absolute', @@ -4591,7 +4537,7 @@ return /******/ (function(modules) { // webpackBootstrap } }); - var HeaderCell = React.createClass({displayName: 'HeaderCell', + var HeaderCell = React.createClass({displayName: "HeaderCell", propTypes: { renderer: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).isRequired, @@ -4684,14 +4630,14 @@ return /******/ (function(modules) { // webpackBootstrap }); function simpleCellRenderer(props) { - return React.createElement("div", {className: "rex-widget-HeaderCell__value"}, props.column.name); + return React.createElement("div", {className: "rex-widget-HeaderCell__value", title: props.column.name}, props.column.name); } module.exports = HeaderCell; /***/ }, -/* 50 */ +/* 49 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -4730,6 +4676,60 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = getScrollbarSize; +/***/ }, +/* 50 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * @jsx React.DOM + * @copyright Prometheus Research, LLC 2014 + */ + 'use strict'; + + var ScrollShim = { + + appendScrollShim:function() { + if (!this._scrollShim) { + var size = this._scrollShimSize(); + var shim = document.createElement('div'); + shim.classList.add('react-grid-ScrollShim'); + shim.style.position = 'absolute'; + shim.style.top = 0; + shim.style.left = 0; + shim.style.width = (size.width + "px"); + shim.style.height = (size.height + "px"); + this.getDOMNode().appendChild(shim); + this._scrollShim = shim; + } + this._scheduleRemoveScrollShim(); + }, + + _scrollShimSize:function() { + return { + width: this.props.width, + height: this.props.length * this.props.rowHeight + }; + }, + + _scheduleRemoveScrollShim:function() { + if (this._scheduleRemoveScrollShimTimer) { + clearTimeout(this._scheduleRemoveScrollShimTimer); + } + this._scheduleRemoveScrollShimTimer = setTimeout( + this._removeScrollShim, 200); + }, + + _removeScrollShim:function() { + if (this._scrollShim) { + this._scrollShim.parentNode.removeChild(this._scrollShim); + this._scrollShim = undefined; + } + } + }; + + module.exports = ScrollShim; + + /***/ }, /* 51 */ /***/ function(module, exports, __webpack_require__) { @@ -4787,7 +4787,7 @@ return /******/ (function(modules) { // webpackBootstrap }; module.exports = invariant; - + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(52))) /***/ }, @@ -4797,69 +4797,40 @@ return /******/ (function(modules) { // webpackBootstrap // shim for using process in browser var process = module.exports = {}; - - process.nextTick = (function () { - var canSetImmediate = typeof window !== 'undefined' - && window.setImmediate; - var canMutationObserver = typeof window !== 'undefined' - && window.MutationObserver; - var canPost = typeof window !== 'undefined' - && window.postMessage && window.addEventListener - ; - - if (canSetImmediate) { - return function (f) { return window.setImmediate(f) }; - } - - var queue = []; - - if (canMutationObserver) { - var hiddenDiv = document.createElement("div"); - var observer = new MutationObserver(function () { - var queueList = queue.slice(); - queue.length = 0; - queueList.forEach(function (fn) { - fn(); - }); - }); - - observer.observe(hiddenDiv, { attributes: true }); - - return function nextTick(fn) { - if (!queue.length) { - hiddenDiv.setAttribute('yes', 'no'); - } - queue.push(fn); - }; + var queue = []; + var draining = false; + + function drainQueue() { + if (draining) { + return; + } + draining = true; + var currentQueue; + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + var i = -1; + while (++i < len) { + currentQueue[i](); + } + len = queue.length; } - - if (canPost) { - window.addEventListener('message', function (ev) { - var source = ev.source; - if ((source === window || source === null) && ev.data === 'process-tick') { - ev.stopPropagation(); - if (queue.length > 0) { - var fn = queue.shift(); - fn(); - } - } - }, true); - - return function nextTick(fn) { - queue.push(fn); - window.postMessage('process-tick', '*'); - }; + draining = false; + } + process.nextTick = function (fun) { + queue.push(fun); + if (!draining) { + setTimeout(drainQueue, 0); } - - return function nextTick(fn) { - setTimeout(fn, 0); - }; - })(); + }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; + process.version = ''; // empty string to avoid regexp issues + process.versions = {}; function noop() {} @@ -4880,6 +4851,7 @@ return /******/ (function(modules) { // webpackBootstrap process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; + process.umask = function() { return 0; }; /***/ }, @@ -4894,9 +4866,9 @@ return /******/ (function(modules) { // webpackBootstrap var React = __webpack_require__(10); var PropTypes = React.PropTypes; - var emptyFunction = __webpack_require__(40); + var emptyFunction = __webpack_require__(39); - var Draggable = React.createClass({displayName: 'Draggable', + var Draggable = React.createClass({displayName: "Draggable", propTypes: { onDragStart: PropTypes.func, @@ -4978,3 +4950,4 @@ return /******/ (function(modules) { // webpackBootstrap /***/ } /******/ ]) }); +; \ No newline at end of file diff --git a/dist/ReactGridWithAddons.min.js b/dist/ReactGridWithAddons.min.js index 599deed..deb1bb5 100644 --- a/dist/ReactGridWithAddons.min.js +++ b/dist/ReactGridWithAddons.min.js @@ -1,3 +1,5 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react/addons")):"function"==typeof define&&define.amd?define(["react/addons"],t):"object"==typeof exports?exports.ReactGrid=t(require("react/addons")):e.ReactGrid=t(e.React)}(this,function(e){return function(e){function t(o){if(s[o])return s[o].exports;var r=s[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var s={};return t.m=e,t.c=s,t.p="",t(0)}([function(e,t,s){e.exports={Grid:s(1),Editors:s(7),Formatters:s(8),Toolbar:s(4),Mixins:{EditorMixin:s(5),TextInputMixin:s(6),KeyboardHandlerMixin:s(9)}}},function(e,t,s){"use strict";var o=s(10),r=(o.PropTypes,s(16)),i=s(17),n=s(18),l=(s(19),s(20)),a=s(21),c=s(22),p=s(23),h=s(24),u=s(25),d=s(26),f=(s(27),o.addons.cloneWithProps,o.createClass({displayName:"ExcelGrid",mixins:[l,p,a,c,h,u],getInitialState:function(){return{selectedRows:[],expandedRows:[]}},overrides:{onCellCommit:function(e){var t=e[0],s=Object.assign({},this.state.selected);s.active=!1,"Tab"===t.keyCode&&(s.idx+=1);var o=this.state.expandedRows;t.changed&&t.changed.expandedHeight&&(o=this.expandRow(t.rowIdx,t.changed.expandedHeight)),this.setState({selected:s,expandedRows:o}),this.props.onRowUpdated(t)},getColumns:function(){var e=this.getDecoratedColumns(this.props.columns);return this.props.enableRowSelect&&e.unshift({key:"select-row",name:"",formatter:o.createElement(d,null),onRowSelect:this.handleRowSelect,filterable:!1,headerRenderer:o.createElement("input",{type:"checkbox",onChange:this.handleCheckboxChange}),width:60}),e}},getDefaultProps:function(){return{rowHeight:35,enableRowSelect:!1,minHeight:350}},handleCheckboxChange:function(e){if(e.currentTarget.checked===!0){var t=this.props.rows.map(function(){return!0});this.setState({selectedRows:t})}else{var t=this.props.rows.map(function(){return!1});this.setState({selectedRows:t})}},handleRowSelect:function(e){var t=this.state.selectedRows;t[e]=null==t[e]||0==t[e]?!0:!1,this.setState({selectedRows:t})},expandRow:function(e,t){var s=this.state.expandedRows;return s[e]?(null==s[e]||s[e]<t)&&(s[e]=t):s[e]=t,s},addRow:function(){},handleShowMore:function(e,t){var s=this.expandRow(e,t);this.setState({expandedRows:s})},handleShowLess:function(e){var t=this.state.expandedRows;t[e]&&(t[e]=!1),this.setState({expandedRows:t})},expandAllRows:function(){},collapseAllRows:function(){},onAfterAddRow:function(e){this.setState({selected:{idx:1,rowIdx:e-2}}),this.refs.base.refs.viewport.refs.canvas.getDOMNode().scrollTop=e*this.props.rowHeight},componentWillReceiveProps:function(e){e.rows.length===this.props.rows.length+1&&this.onAfterAddRow(e.rows.length+1)},render:function(){var e=o.createElement(i,{selected:this.state.selected,copied:this.state.copied,dragged:this.state.dragged,onSelect:this.onSelect,onClick:this.onSelect,onSetActive:this.onSetActive,onCommit:this.onCellCommit,handleCopy:this.handleCopy,handlePaste:this.handlePaste,handleDragStart:this.handleDragStart,handleDragEnter:this.handleDragEnter,handleDragEnd:this.handleDragEnd,handleTerminateDrag:this.handleTerminateDrag,onShowMore:this.handleShowMore,onShowLess:this.handleShowLess,expandedRows:this.state.expandedRows}),t=this.filterRows(),s=this.renderToolbar();return o.createElement("div",{className:"react-grid-Container"},s,o.createElement("div",{className:"react-grid-Main"},o.createElement(r,o.__spread({ref:"base"},this.props,{length:this.props.rows.length,headerRows:this.getHeaderRows(),columns:this.getColumns(),rows:t,cellRenderer:e,rowRenderer:o.createElement(n,null),selectedRows:this.state.selectedRows,expandedRows:this.state.expandedRows,rowOffsetHeight:this.getRowOffsetHeight(),minHeight:this.props.minHeight}))))},renderToolbar:function(){var e=this.props.toolbar;return o.isValidElement(e)?o.addons.cloneWithProps(e,{onToggleFilter:this.onToggleFilter,rows:this.props.rows}):void 0}}));e.exports=f},function(e,t,s){"use strict";var o=s(10),r=o.addons.classSet,i=s(3),n=o.addons.cloneWithProps,l=s(11),a=o.createClass({displayName:"Row",render:function(){var e=r("react-grid-Row","react-grid-Row--"+(this.props.idx%2===0?"even":"odd")),t={height:this.getRowHeight(),overflow:"hidden"},s=this.getCells();return o.createElement("div",o.__spread({},this.props,{className:e,style:t}),o.isValidElement(this.props.row)?this.props.row:s)},getCells:function(){for(var e=[],t=[],s=0,o=this.props.columns.length;o>s;s++){var r=this.props.columns[s],i=this.renderCell({ref:s,key:s,idx:s,rowIdx:this.props.idx,filterRowIdx:this.props.row.key,value:this.getCellValue(r.key||s),column:r,height:this.getRowHeight(),formatter:r.formatter,rowData:this.props.row});r.locked?t.push(i):e.push(i)}return e.concat(t)},getRowHeight:function(){return this.props.expandedRows&&this.props.expandedRows[this.props.key]?this.props.expandedRows[this.props.key]:this.props.height},getCellValue:function(e){return"select-row"===e?this.props.isSelected:this.props.row[e]},renderCell:function(e){return o.isValidElement(this.props.cellRenderer)?n(this.props.cellRenderer,e):this.props.cellRenderer(e)},getDefaultProps:function(){return{cellRenderer:i}},shouldComponentUpdate:function(e){return!l.sameColumns(this.props.columns,e.columns,l.sameColumn)||this.doesRowContainSelectedCell()||this.doesRowContainSelectedCell(e)||this.willRowBeDraggedOver(e)||this.hasRowBeenCopied()||e.row!==this.props.row||e.height!==this.props.height},setScrollLeft:function(e){for(var t=0,s=this.props.columns.length;s>t;t++)this.props.columns[t].locked&&this.refs[t].setScrollLeft(e)},doesRowContainSelectedCell:function(e){var t=e||this.props,s=s||t.cellRenderer;return s.props.selected&&s.props.selected.rowIdx===t.idx?!0:!1},willRowBeDraggedOver:function(e){var t=e.cellRenderer.props.dragged;return null!=t&&(t.rowIdx||t.complete===!0)},hasRowBeenCopied:function(){var e=this.props.cellRenderer;return null!=e.props.copied&&e.props.copied.rowIdx===this.props.idx}});e.exports=a},function(e,t,s){"use strict";function o(e){return e.value}var r=s(10),i=r.addons.classSet,n=r.addons.cloneWithProps,l=r.createClass({displayName:"Cell",render:function(){var e=this.getStyle(),t=i("react-grid-Cell",this.props.className,this.props.column.locked?"react-grid-Cell--locked":null),s=this.renderCellContent({value:this.props.value,column:this.props.column,rowIdx:this.props.rowIdx,isExpanded:this.props.isExpanded});return r.createElement("div",r.__spread({},this.props,{className:t,style:e}),s,r.createElement("div",{className:"drag-handle",draggable:"true",onDragStart:this.props.handleDragStart}))},renderCellContent:function(e){var t=r.isValidElement(this.props.formatter)?n(this.props.formatter,e):this.props.formatter(e);return r.createElement("div",{className:"react-grid-Cell__value"},t," ",this.props.cellControls)},getDefaultProps:function(){return{formatter:o}},getStyle:function(){var e={position:"absolute",width:this.props.column.width,height:this.props.height,left:this.props.column.left};return e},setScrollLeft:function(e){if(this.isMounted()){var t=this.getDOMNode(),s="translate3d("+e+"px, 0px, 0px)";t.style.webkitTransform=s,t.style.transform=s}}});e.exports=l},function(e,t,s){"use strict";var o=s(10),r=o.createClass({displayName:"Toolbar",onAddRow:function(){this.props.onAddRow&&this.props.onAddRow({newRowIndex:this.props.rows.length})},getDefaultProps:function(){return{enableAddRow:!0}},getAddRowButton:function(){return this.props.enableAddRow?o.createElement("button",{type:"button",className:"btn",onClick:this.onAddRow},"Add Row"):void 0},render:function(){return o.createElement("div",{className:"react-grid-Toolbar"},o.createElement("div",{className:"tools"},this.getAddRowButton(),o.createElement("button",{type:"button",className:"btn",onClick:this.props.onToggleFilter},"Filter Rows")))}});e.exports=r},function(e,t,s){"use strict";var o=s(10),r=o.addons.classSet,i=s(12),n={propTypes:{onCommit:o.PropTypes.func.isRequired},getStyle:function(){return{height:this.props.height-1}},getInitialState:function(){return{isInvalid:!1}},onPressEnter:function(e){e.stopPropagation(),e.preventDefault(),this.commit({key:"Enter"})},onPressTab:function(e){e.stopPropagation(),e.preventDefault(),this.commit({key:"Tab"})},commit:function(e){var t=this.getValue(),s={};s[this.props.column.key]=t,this.isNewValueValid(t)&&this.props.onCommit({updated:s,key:e.key})},isNewValueValid:function(e){if(i(this.validate)){var t=this.validate(e);return this.setState({isInvalid:!t}),t}return!0},getValue:function(){return this.getInputNode().value},setValue:function(e){this.getInputNode().value=e},componentDidMount:function(){void 0!==this.getInputNode()&&(this.checkFocus(),this.getInputNode().className+=" editor-main")},checkFocus:function(){this.getInputNode().focus()},getInputNode:function(){return this.getDOMNode().getElementsByTagName("input")[0]},getContainerClass:function(){return r({"has-error":this.state.isInvalid===!0})},renderStatusIcon:function(){return this.state.isInvalid===!0?o.createElement("span",{className:"glyphicon glyphicon-remove form-control-feedback"}):void 0},render:function(){if(!i(this.renderEditorNode))throw"Editor Mixin Error : "+this.displayName+" component must implement method renderEditorNode";var e=this.renderEditorNode();return o.createElement("div",{className:this.getContainerClass()},e,this.renderStatusIcon())}};e.exports=n},function(e){"use strict";var t={onPressArrowLeft:function(e){e.stopPropagation()},onPressArrowRight:function(e){e.stopPropagation()},getDefaultValue:function(){var e=this.props.initialKeyCode;if("Delete"===e||"Backspace"===e)return"";if("Enter"===e)return this.props.value;var t=e?String.fromCharCode(e):this.props.value;return t},setCaretAtEndOfInput:function(){var e=this.getInputNode(),t=e.value.length;if(e.setSelectionRange)e.setSelectionRange(t,t);else if(e.createTextRange){var s=e.createTextRange();s.moveStart("character",txt.value.length),s.collapse(),s.select()}},setTextInputFocus:function(){this.isKeyPrintable(this.props.initialKeyCode)?this.getInputNode().select():(this.getInputNode().focus(),this.setCaretAtEndOfInput())}};e.exports=t},function(e,t,s){var o={AutoComplete:s(13),DropDownEditor:s(14),SimpleTextEditor:s(15)};e.exports=o},function(e){var t={};e.exports=t},function(e,t,s){"use strict";var o=s(10),r=(o.addons.Perf,{onKeyDown:function(e){if(this.isCtrlKeyHeldDown(e))this.checkAndCall("onPressKeyWithCtrl",e);else if(this.isKeyIdentified(e.key)){var t="onPress"+e.key;this.checkAndCall(t,e)}else this.isKeyPrintable(e.keyCode)&&this.checkAndCall("onPressChar",e)},isKeyPrintable:function(e){var t=e>47&&58>e||32==e||13==e||e>64&&91>e||e>95&&112>e||e>185&&193>e||e>218&&223>e;return t},isKeyIdentified:function(e){return"Unidentified"!==e},isCtrlKeyHeldDown:function(e){return e.ctrlKey===!0&&"Control"!==e.key},checkAndCall:function(e,t){"function"==typeof this[e]&&this[e](t)}});e.exports=r},function(t){t.exports=e},function(e,t,s){"use strict";function o(e){var t,s,o,r=0,i=e.totalWidth,n=[],l=e.columns.map(p);for(t=0,s=l.length;s>t;t++)o=l[t],o.width?(/^([0-9]+)%$/.exec(o.width)&&(o.width=Math.floor(parseInt(o.width,10)/100*e.totalWidth)),i-=o.width,r+=o.width):n.push(o);for(t=0,s=n.length;s>t;t++)o=n[t],o.width=0>=i?e.minColumnWidth:Math.floor(i/n.length),r+=o.width;var a=0;for(t=0,s=l.length;s>t;t++)o=l[t],o.left=a,a+=o.width;return{columns:l,width:r,totalWidth:e.totalWidth,minColumnWidth:e.minColumnWidth}}function r(e,t,s){var r=e.columns[t];e=p(e),e.columns=e.columns.slice(0);var i=p(r);return i.width=Math.max(s,e.minColumnWidth),e.columns.splice(t,1,i),o(e)}function i(e,t,s){var o,r,i,n={},l={};if(e.length!==t.length)return!1;for(o=0,r=e.length;r>o;o++)i=e[o],n[i.key]=i;for(o=0,r=t.length;r>o;o++){i=t[o],l[i.key]=i;var a=n[i.key];if(void 0===a||!s(a,i))return!1}for(o=0,r=e.length;r>o;o++){i=e[o];var c=l[i.key];if(void 0===c)return!1}return!0}function n(e,t){var s;for(s in e)if(e.hasOwnProperty(s)){if("function"==typeof e[s]&&"function"==typeof t[s]||c(e[s])&&c(t[s]))continue;if(!t.hasOwnProperty(s)||e[s]!==t[s])return!1}for(s in t)if(t.hasOwnProperty(s)&&!e.hasOwnProperty(s))return!1;return!0}var l=s(10),a=l.PropTypes,c=l.isValidElement,p=s(28),h=s(29),u=s(19),d={mixins:[h.MetricsMixin],propTypes:{columns:a.array,minColumnWidth:a.number,columnEquality:a.func},DOMMetrics:{gridWidth:function(){return this.getDOMNode().offsetWidth-2}},getDefaultProps:function(){return{minColumnWidth:80,columnEquality:n}},getInitialState:function(){return this.getColumnMetrics(this.props,!0)},componentWillReceiveProps:function(e){if(e.columns)if(i(this.props.columns,e.columns,this.props.columnEquality)){var t={};this.state.columns.columns.forEach(function(e){t[e.key]={width:e.width,left:e.left}});var s=u(this.state.columns,{columns:e.columns.map(function(e){return u(e,t[e.key])})});this.setState({columns:s})}else this.setState(this.getColumnMetrics(e))},getColumnMetrics:function(e,t){var s=t?null:this.DOMMetrics.gridWidth();return{columns:o({columns:e.columns,width:null,totalWidth:s,minColumnWidth:e.minColumnWidth}),gridWidth:s}},metricsUpdated:function(){this.setState(this.getColumnMetrics(this.props))},onColumnResize:function(e,t){var s=r(this.state.columns,e,t);this.setState({columns:s})}};e.exports={Mixin:d,calculate:o,resizeColumn:r,sameColumns:i,sameColumn:n}},function(e){"use strict";var t=function(e){var t={};return e&&"[object Function]"===t.toString.call(e)};e.exports=t},function(e,t,s){"use strict";var o=s(10),r=(o.addons.classSet,s(27)),i=s(5),n=s(6),l=s(39),a=s(9),c=o.PropTypes.shape({id:o.PropTypes.required,title:o.PropTypes.string}),p=o.createClass({displayName:"AutoCompleteEditor",propTypes:{options:o.PropTypes.arrayOf(c)},mixins:r.mix([a,i,n]),overrides:{checkFocus:function(){this.setTextInputFocus()},getInputNode:function(){return this.getSearchComponent().getDOMNode()},onPressEnter:function(e){var t=e[0];this.handleEnter(t)},onPressTab:function(e){var t=e[0];this.handleTab(t)}},handleTab:function(e){e.stopPropagation(),e.preventDefault(),this.isFocusedOnSuggestion()?this.handleChange(this.getFocusedSuggestion(),"Tab"):this.handleChange(null,"Tab")},handleEnter:function(e){e.stopPropagation(),e.preventDefault(),this.isFocusedOnSuggestion()||this.props.onCommit({value:this.refs.autoComplete.state.searchTerm,key:"Enter"})},getSearchComponent:function(){return this.refs.autoComplete.refs.search},isFocusedOnSuggestion:function(){var e=this.refs.autoComplete;return null!=e.state.focusedValue},getFocusedSuggestion:function(){return this.refs.autoComplete.state.focusedValue},onPressArrowDown:function(e){e.stopPropagation(),e.preventDefault()},onPressArrowUp:function(e){e.stopPropagation()},getLabel:function(e){var t=null!=this.props.label?this.props.label:"title";return"function"==typeof t?t(e):"string"==typeof t?e[t]:void 0},handleChange:function(e,t){var s={},o=this.props.value;null!=e&&(o=this.getLabel(e),this.props.valueParams&&(o=this.constuctValueFromParams(e,this.props.valueParams)),s[this.props.column.key]=o),t=t?t:"Enter",this.props.onCommit({value:o,key:t,updated:s})},constuctValueFromParams:function(e,t){for(var s=[],o=0,r=t.length;r>o;o++)s.push(e[t[o]]);return s.join("|")},renderEditorNode:function(){var e={title:this.getDefaultValue()},t=null!=this.props.label?this.props.label:"title";return o.createElement("div",{style:this.getStyle(),onKeyDown:this.onKeyDown},o.createElement(l,{search:this.props.search,ref:"autoComplete",label:t,resultIdentifier:this.props.resultIdentifier,options:this.props.options,value:e,onChange:this.handleChange}))}});e.exports=p},function(e,t,s){"use strict";var o=s(10),r=(o.addons.classSet,s(27),s(9)),i=s(5),n=(o.addons.cloneWithProps,o.createClass({displayName:"DropDownEditor",mixins:[r,i],overrides:{getInputNode:function(){return this.refs.select.getDOMNode()}},propTypes:{options:o.PropTypes.array.isRequired},renderEditorNode:function(){return o.createElement("select",{ref:"select",style:this.getStyle(),defaultValue:this.props.value,onChange:this.onChange},this.renderOptions())},renderOptions:function(){var e=[];return this.props.options.forEach(function(t){e.push(o.createElement("option",{key:t,value:t},t))},this),e},onChange:function(){this.commit({key:"Enter"})},onClick:function(e){e.stopPropagation(),e.preventDefault()}}));e.exports=n},function(e,t,s){"use strict";var o=s(10),r=(o.addons.classSet,s(27),s(5)),i=s(6),n=s(9),l=o.createClass({displayName:"SimpleTextEditor",mixins:[n,r,i],overrides:{checkFocus:function(){this.setTextInputFocus()}},renderEditorNode:function(){return o.createElement("input",{type:"text",onBlur:this.commit,className:"form-control",defaultValue:this.getDefaultValue(),style:this.getStyle(),onKeyDown:this.onKeyDown})}});e.exports=l},function(e,t,s){"use strict";var o=s(10),r=o.PropTypes,i=s(30),n=s(31),l=s(11),a=s(29),c={componentDidMount:function(){this._scrollLeft=this.refs.viewport.getScroll().scrollLeft,this._onScroll()},componentDidUpdate:function(){this._onScroll()},componentWillMount:function(){this._scrollLeft=void 0},componentWillUnmount:function(){this._scrollLeft=void 0},onScroll:function(e){var t=e.scrollLeft;this._scrollLeft!==t&&(this._scrollLeft=t,this._onScroll())},_onScroll:function(){void 0!==this._scrollLeft&&(this.refs.header.setScrollLeft(this._scrollLeft),this.refs.viewport.setScrollLeft(this._scrollLeft))}},p=o.createClass({displayName:"Grid",mixins:[c,l.Mixin,a.MetricsComputatorMixin],propTypes:{rows:r.oneOfType([r.array,r.func]).isRequired,columns:r.array.isRequired},getStyle:function(){return{overflow:"hidden",outline:0,position:"relative",minHeight:this.props.minHeight}},render:function(){var e=this.props.headerRows||[{ref:"row"}];return o.createElement("div",o.__spread({},this.props,{style:this.getStyle(),className:"react-grid-Grid"}),o.createElement(i,{ref:"header",columns:this.state.columns,onColumnResize:this.onColumnResize,height:this.props.rowHeight,totalWidth:this.DOMMetrics.gridWidth(),headerRows:e}),o.createElement(n,{ref:"viewport",width:this.state.columns.width,rowHeight:this.props.rowHeight,rowRenderer:this.props.rowRenderer,cellRenderer:this.props.cellRenderer,rows:this.props.rows,selectedRows:this.props.selectedRows,expandedRows:this.props.expandedRows,length:this.props.length,columns:this.state.columns,totalWidth:this.DOMMetrics.gridWidth(),onScroll:this.onScroll,onRows:this.props.onRows,rowOffsetHeight:this.props.rowOffsetHeight||this.props.rowHeight*e.length}))},getDefaultProps:function(){return{rowHeight:35,minHeight:350}}});e.exports=p},function(e,t,s){"use strict";var o=s(10),r=s(3),i=(s(32),s(33)),n=s(34),l=s(35),a=(s(27),s(9),s(12)),c=(o.PropTypes,o.addons.classSet),p=(o.addons.cloneWithProps,o.createClass({displayName:"CellControls",onClickEdit:function(e){e.stopPropagation(),e.preventDefault(),this.props.onClickEdit()},onShowMore:function(e){e.stopPropagation(),e.preventDefault();var t=this.props.column.getExpandedHeight(this.props.value);this.props.onShowMore(this.props.rowIdx,t)},onShowLess:function(e){e.stopPropagation(),e.preventDefault(),this.props.onShowLess(this.props.rowIdx)},shouldComponentUpdate:function(e){return this.props.height!=e.height},renderShowMoreButton:function(){if(a(this.props.column.getExpandedHeight)&&this.props.column.getExpandedHeight(this.props.value)>0){var e=this.props.column.getExpandedHeight(this.props.value);return e>this.props.height?o.createElement("button",{type:"button",className:"btn btn-link btn-xs",onClick:this.onShowMore},"Show More"):o.createElement("button",{type:"button",className:"btn btn-link btn-xs",onClick:this.onShowLess},"Show Less")}return null},render:function(){return o.createElement("div",{className:"pull-right btn-group"},this.renderShowMoreButton(),o.createElement("button",{onClick:this.onClickEdit,type:"button",className:"btn btn-link btn-xs"},"Edit"))}})),h=o.createClass({displayName:"ExcelCell",mixins:[i,n,l],overrides:{getCellClass:function(){return c({selected:this.isSelected()&&!this.isCopied()&&!this.isActive(),editing:this.isActive(),copied:this.isCopied(),"selected-draggable":this.isSelected()&&!this.isActive()&&this.canEdit(),"active-drag-cell":this.isActiveDragCell()&&this.canEdit(),"is-dragged-over-up":!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx<this.props.dragged.rowIdx,"is-dragged-over-down":!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx>this.props.dragged.rowIdx,"was-dragged-over":this.wasDraggedOver()&&this.canEdit()})}},isActiveDragCell:function(){return(this.isSelected()||this.isDraggedOver())&&!this.isActive()},isExpanded:function(){var e=!1;if(a(this.props.column.getExpandedHeight)&&this.props.column.getExpandedHeight(this.props.value)>0){var t=this.props.column.getExpandedHeight(this.props.value);e=this.props.height>=t?!0:!1}return e},shouldComponentUpdate:function(e){return this.props.column.width!==e.column.width||this.props.value!==e.value||this.props.height!==e.height||this.props.rowIdx!==e.rowIdx||this.isCellSelectionChanging(e)||this.isDraggedCellChanging(e)},render:function(){return o.createElement(r,o.__spread({},this.props,{className:this.getCellClass(),onKeyDown:this.onKeyDown,onClick:this.onClick,onDoubleClick:this.onDoubleClick,formatter:this.getFormatter(),handleDragStart:this.handleDragStart,onDragEnter:this.handleDragEnter,onDragEnd:this.props.handleDragEnd,cellControls:this.props.column.showCellControls&&!this.isActive()?o.createElement(p,{height:this.props.height,value:this.props.value,rowIdx:this.props.rowIdx,column:this.props.column,onShowMore:this.props.onShowMore,onShowLess:this.props.onShowLess,onClickEdit:this.setActive}):null,isExpanded:this.isExpanded()}))}});e.exports=h},function(e,t,s){"use strict";var o=s(10),r=(o.addons.classSet,s(2)),i=s(11),n=o.createClass({displayName:"ExcelRow",render:function(){var e=o.addons.update(this.props.row,{$merge:{"select-row":this.props.isSelected}});return o.createElement(r,o.__spread({},this.props,{row:e,height:this.getRowHeight(this.props)}))},getRowHeight:function(e){return e.expandedRows&&e.expandedRows[e.key]?e.expandedRows[e.key]:e.height},hasRowHeightChanged:function(e){return e.expandedRows&&"undefined"!=typeof e.expandedRows[e.key]?this.props.height!==e.expandedRows[e.key]:!1},shouldComponentUpdate:function(e){return!i.sameColumns(this.props.columns,e.columns,i.sameColumn)||this.doesRowContainSelectedCell()||this.doesRowContainSelectedCell(e)||this.willRowBeDraggedOver(e)||this.hasRowBeenCopied()||e.row!==this.props.row||this.props.isSelected!==e.isSelected||this.hasRowHeightChanged(e)},doesRowContainSelectedCell:function(e){var t=e||this.props,s=s||t.cellRenderer;return s.props&&s.props.selected&&s.props.selected.rowIdx===t.idx?!0:!1},willRowBeDraggedOver:function(e){if(e.cellRenderer.props){var t=e.cellRenderer.props.dragged;return null!=t&&(t.rowIdx||t.complete===!0)}return!1},hasRowBeenCopied:function(){if(this.props.cellRenderer.props){var e=this.props.cellRenderer;return null!=e.props.copied&&e.props.copied.rowIdx===this.props.idx}return!1},setScrollLeft:function(e){for(var t=0,s=this.props.columns.length;s>t;t++)this.props.columns[t].locked&&this.refs[t].setScrollLeft(e)}});e.exports=n},function(e){"use strict";function t(e,t){var s={};for(var o in e)s[o]=e[o];for(var o in t)s[o]=t[o];return s}var s=function(e,t){var s={};return null!=e&&Object.assign(s,e),null!=t&&Object.assign(s,t),s};e.exports=Object.assign?s:t},function(e){"use strict";var t={getDefaultProps:function(){return{enableCellSelect:!1}},getColumns:function(){return this.props.columns},getInitialState:function(){return this.props.enableCellSelect?{selected:{rowIdx:0,idx:0}}:{selected:{rowIdx:-1,idx:-1}}},onSelect:function(e){if(this.props.enableCellSelect){var t=e.idx,s=e.rowIdx;t>=0&&s>=0&&t<this.getColumns().length&&s<this.props.rows.length&&(this.props.onSelect&&this.props.onSelect({selected:e}),this.setState({selected:e}))}}};e.exports=t},function(e,t,s){"use strict";{var o=s(10),r=(o.PropTypes,s(27));s(20)}r.addAlias("SelectableGridMixin");var i={mixinDependencies:["SelectableGridMixin"],propTypes:{onCellsDragged:o.PropTypes.func},getInitialState:function(){return{dragged:null}},handleDragStart:function(e){var t=e.idx,s=e.rowIdx;t>=0&&s>=0&&t<this.getColumns().length&&s<this.props.rows.length&&this.setState({dragged:e})},handleDragEnter:function(e){var t=(this.state.selected,this.state.dragged);t.overRowIdx=e,this.setState({dragged:t})},handleDragEnd:function(){var e,t,s=this.state.selected,o=this.state.dragged,r=this.getColumns()[this.state.selected.idx].key;e=s.rowIdx<o.overRowIdx?s.rowIdx:o.overRowIdx,t=s.rowIdx>o.overRowIdx?s.rowIdx:o.overRowIdx,this.props.onCellsDragged({cellKey:r,fromRow:e,toRow:t,value:o.copiedText}),this.setState({dragged:{complete:!0}})},handleTerminateDrag:function(){this.setState({dragged:null})}};e.exports=i},function(e,t,s){"use strict";var o=s(10),r=(o.PropTypes,{propTypes:{onCellCopyPaste:o.PropTypes.func},getInitialState:function(){return{copied:null}},handleCopy:function(e){var t=e.value,s=this.state.selected,o={idx:s.idx,rowIdx:s.rowIdx};this.setState({textToCopy:t,copied:o})},handlePaste:function(){var e=this.state.selected,t=this.getColumns()[e.idx].key;this.props.onCellCopyPaste({cellKey:t,rowIdx:e.rowIdx,value:this.state.textToCopy,fromRow:this.state.copied.rowIdx,toRow:e.rowIdx}),this.setState({copied:null})}});e.exports=r},function(e,t,s){"use strict";var o=s(10),r=(o.PropTypes,s(19)),i={propTypes:{onRowUpdated:o.PropTypes.func},onCellCommit:function(e){var t=this.state.selected;t.active=!1,"Tab"===e.keyCode&&(t.idx+=1),this.setState({selected:t}),this.props.onRowUpdate(e)},onSetActive:function(e){var t=r(this.state.selected,e);this.setState({selected:t})}};e.exports=i},function(e,t,s){"use strict";var o=s(10),r=(o.PropTypes,s(36)),i=s(28),n={ASC:"ASC",DESC:"DESC"};Object.freeze(n);var l={getInitialState:function(){return{sortDirection:null,sortColumn:null}},getDecoratedColumns:function(){return this.props.columns.map(function(e){return e=i(e),e.sortable&&(e.headerRenderer=o.createElement(r,null),e.sortBy=this.sortBy,e.sorted=this.state.sortColumn===e.key?this.state.sortDirection:n.NONE),e},this)},sortBy:function(e,t){switch(t){case null:case void 0:t=n.ASC;break;case n.ASC:t=n.DESC;break;case n.DESC:t=null}this.setState({sortDirection:t,sortColumn:e.key})},sortRows:function(e){e=[].concat(e);var t=this.state.sortColumn,s=this.state.sortDirection;return null!=t&&null!==s?e.sort(function(e,o){var r=e[t],i=o[t];return s===n.ASC?r>i?1:i>r?-1:0:s===n.DESC?r>i?-1:i>r?1:0:void 0}):e}};e.exports=l},function(e,t,s){"use strict";var o=s(10),r=(o.PropTypes,s(37)),i={getInitialState:function(){return{canFilter:!1,columnFilters:{}}},filterRows:function(){var e=this.props.rows;return this.state.sortColumn&&(e=this.sortRows(e)),this.hasFilters()&&(e=e.map(function(e,t){return e.key=t,e}).filter(this.isRowDisplayed),this.props.onFilter&&this.props.onFilter(e)),e},hasFilters:function(){var e=!1;return Object.keys(this.state.columnFilters).every(function(t){var s=this.state.columnFilters[t];return null!=s&&void 0!=s&&""!=s?(e=!0,!1):!0},this),e},isRowDisplayed:function(e){var t=null;return Object.keys(this.state.columnFilters).every(function(s){var o=this.state.columnFilters[s].toLowerCase(),r=e[s].toString().toLowerCase();if(null!=o&&void 0!=o&&""!=o&&"string"==typeof r){if(!(r.indexOf(o)>-1))return t=!1,!1;t=!0}return!0},this),null==t?!1:t},onToggleFilter:function(){this.setState({canFilter:!this.state.canFilter})},handleAddFilter:function(e){var t=this.state.columnFilters;t[e.columnKey]=e.filterTerm,this.setState({columnFilters:t,selected:null})},getHeaderRows:function(){var e=[{ref:"row",height:this.props.rowHeight}];return this.state.canFilter===!0&&e.push({ref:"filterRow",headerCellRenderer:o.createElement(r,{onChange:this.handleAddFilter}),height:45}),e},getRowOffsetHeight:function(){var e=0;return this.getHeaderRows().forEach(function(t){return e+=t.height}),e}};e.exports=i},function(e,t,s){"use strict";var o=s(10),r=(o.addons.classSet,o.createClass({displayName:"CheckBoxEditor",PropTypes:{value:o.PropTypes.bool.isRequired},render:function(){return o.createElement("input",{className:"react-grid-CheckBox",type:"checkbox",checked:this.props.value,onChange:this.handleChange})},handleChange:function(){this.props.column.onRowSelect(this.props.rowIdx)},shouldComponentUpdate:function(e){return this.props.value!=e.value}}));e.exports=r},function(e,t,s){"use strict";var o=s(42),r=s(12),i=s(10);Object.assign||(Object.assign=s(38));var n=o({DEFINE_LIFE_CYCLE_METHOD:null,DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),l={getDefaultProps:n.DEFINE_LIFE_CYCLE_METHOD,propTypes:n.DEFINE_LIFE_CYCLE_METHOD,getInitialState:n.DEFINE_LIFE_CYCLE_METHOD,statics:n.DEFINE_LIFE_CYCLE_METHOD,displayName:n.DEFINE_LIFE_CYCLE_METHOD,componentWillMount:n.DEFINE_LIFE_CYCLE_METHOD,componentWillReceiveProps:n.DEFINE_LIFE_CYCLE_METHOD,shouldComponentUpdate:n.DEFINE_LIFE_CYCLE_METHOD,componentWillUpdate:n.DEFINE_LIFE_CYCLE_METHOD,componentDidUpdate:n.DEFINE_LIFE_CYCLE_METHOD,componentWillUnmount:n.DEFINE_LIFE_CYCLE_METHOD},a={},c=function(e,t){this.base=e,this.dependsOn=t},p=function(e){this.assignTo=function(t){return new c(t,e)}},h=function(e,t){Object.keys(e).forEach(function(s){if(f.isCustomProperty(s))r(e[s])&&(e[s]=f.wrapCustomMethod(s,e[s]));else{switch(l[s]){case n.DEFINE_LIFE_CYCLE_METHOD:var o={};o[s]=e[s],t.push(o);break;case n.DEFINE_MANY_MERGED:}delete e[s]}},this)},u={mix:function(e){var t=[],s={},o=f.getUniqueDependencies(e);for(var r in o)Object.assign(s,a[o[r]]);return h(s,t),e.forEach(function(e){var o={};e instanceof c?Object.assign(o,e.base):Object.assign(o,e),h(o,t),Object.assign(s,o)},this),t.push(s),t},createDependency:function(e){var t=[];for(var s in e)e[s]instanceof c?this.addAlias(s,e[s].base):this.addAlias(s,e[s]),t.push(s);var o=t.filter(function(e,t,s){return s.indexOf(e)===t});return new p(o)},addAlias:function(e,t){a[e]=t}},d=i.createClass;i.createClass=function(e){return e.mixins&&(e.mixins=u.mix(e.mixins)),d.apply(i,arguments)};var f={isCustomProperty:function(e){return!l[e]},wrapCustomMethod:function(e,t){return function(){return f.isMethodOverridden.call(this,e)?f.callOverriddenMethod.call(this,e,arguments):t.apply(this,arguments)}},checkMethodExtendedAndCall:function(e,t){return this.extended&&"function"==typeof this.extended[e]?this.extended[e].call(this,t):void 0},checkMethodImplementedAndCall:function(e,t){return this.implemented&&"function"==typeof this.implemented[e]?this.implemented[e].call(this,t):void 0},isMethodOverridden:function(e){return this.overrides&&"function"==typeof this.overrides[e]},callOverriddenMethod:function(e,t){return this.overrides[e].call(this,t)},getUniqueDependencies:function(e){var t=[];return e.forEach(function(e){e instanceof c&&(t=t.concat(e.dependsOn))},this),t.filter(function(e,t,s){return s.indexOf(e)===t})}};e.exports=u},function(e){"use strict";function t(e){var t={};for(var s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);return t}e.exports=t},function(e,t,s){"use strict";var o=s(10),r=s(40),i=s(28),n=s(41),l={metricsComputator:o.PropTypes.object},a={childContextTypes:l,getChildContext:function(){return{metricsComputator:this}},getMetricImpl:function(e){return this._DOMMetrics.metrics[e].value},registerMetricsImpl:function(e,t){var s={},o=this._DOMMetrics;for(var r in t)n(void 0===o.metrics[r],"DOM metric "+r+" is already defined"),o.metrics[r]={component:e,computator:t[r].bind(e)},s[r]=this.getMetricImpl.bind(null,r);return-1===o.components.indexOf(e)&&o.components.push(e),s},unregisterMetricsFor:function(e){var t=this._DOMMetrics,s=t.components.indexOf(e);if(s>-1){t.components.splice(s,1);var o,r={};for(o in t.metrics)t.metrics[o].component===e&&(r[o]=!0);for(o in r)delete t.metrics[o]}},updateMetrics:function(){var e=this._DOMMetrics,t=!1;for(var s in e.metrics){var o=e.metrics[s].computator();o!==e.metrics[s].value&&(t=!0),e.metrics[s].value=o}if(t)for(var r=0,i=e.components.length;i>r;r++)e.components[r].metricsUpdated&&e.components[r].metricsUpdated() -},componentWillMount:function(){this._DOMMetrics={metrics:{},components:[]}},componentDidMount:function(){window.addEventListener?window.addEventListener("resize",this.updateMetrics):window.attachEvent("resize",this.updateMetrics),this.updateMetrics()},componentWillUnmount:function(){window.removeEventListener("resize",this.updateMetrics)}},c={contextTypes:l,componentWillMount:function(){if(this.DOMMetrics){this._DOMMetricsDefs=i(this.DOMMetrics),this.DOMMetrics={};for(var e in this._DOMMetricsDefs)this.DOMMetrics[e]=r}},componentDidMount:function(){this.DOMMetrics&&(this.DOMMetrics=this.registerMetrics(this._DOMMetricsDefs))},componentWillUnmount:function(){return this.registerMetricsImpl?void(this.hasOwnProperty("DOMMetrics")&&delete this.DOMMetrics):this.context.metricsComputator.unregisterMetricsFor(this)},registerMetrics:function(e){return this.registerMetricsImpl?this.registerMetricsImpl(this,e):this.context.metricsComputator.registerMetricsImpl(this,e)},getMetric:function(e){return this.getMetricImpl?this.getMetricImpl(e):this.context.metricsComputator.getMetricImpl(e)}};e.exports={MetricsComputatorMixin:a,MetricsMixin:c}},function(e,t,s){"use strict";var o=s(10),r=o.addons.classSet,i=s(28),n=s(11),l=s(45),n=s(11),a=o.createClass({displayName:"Header",propTypes:{columns:o.PropTypes.object.isRequired,totalWidth:o.PropTypes.number,height:o.PropTypes.number.isRequired,headerRows:o.PropTypes.array.isRequired},render:function(){var e=(this.state.resizing||this.props,r({"react-grid-Header":!0,"react-grid-Header--resizing":!!this.state.resizing})),t=this.getHeaderRows();return o.createElement("div",o.__spread({},this.props,{style:this.getStyle(),className:e}),t)},shouldComponentUpdate:function(e,t){return!n.sameColumns(this.props.columns.columns,e.columns.columns,n.sameColumn)||this.props.totalWidth!=e.totalWidth||this.props.headerRows.length!=e.headerRows.length||this.state.resizing!=t.resizing},getHeaderRows:function(){var e=this.state.resizing||this.props,t=[];return this.props.headerRows.forEach(function(s,r){var i={position:"absolute",top:this.props.height*r,left:0,width:this.props.totalWidth};t.push(o.createElement(l,{key:s.ref,ref:s.ref,style:i,onColumnResize:this.onColumnResize,onColumnResizeEnd:this.onColumnResizeEnd,width:e.columns.width,height:s.height||this.props.height,columns:e.columns.columns,resizing:e.column,headerCellRenderer:s.headerCellRenderer}))}.bind(this)),t},getInitialState:function(){return{resizing:null}},componentWillReceiveProps:function(){this.setState({resizing:null})},onColumnResize:function(e,t){var s=this.state.resizing||this.props,o=this.getColumnPosition(e);if(null!==o){var r={columns:i(s.columns)};r.columns=n.resizeColumn(r.columns,o,t),r.columns.width<s.columns.width&&(r.columns.width=s.columns.width),r.column=r.columns.columns[o],this.setState({resizing:r})}},getColumnPosition:function(e){var t=this.state.resizing||this.props,s=t.columns.columns.indexOf(e);return-1===s?null:s},onColumnResizeEnd:function(e,t){var s=this.getColumnPosition(e);null!==s&&this.props.onColumnResize&&this.props.onColumnResize(s,t||e.width)},setScrollLeft:function(e){var t=this.refs.row.getDOMNode();t.scrollLeft=e,this.refs.row.setScrollLeft(e)},getStyle:function(){return{position:"relative",height:this.props.height}}});e.exports=a},function(e,t,s){"use strict";var o=s(10),r=s(43),i=s(29),n=s(44),l=Math.min,a=Math.max,c=Math.floor,p=Math.ceil,h={mixins:[i.MetricsMixin],DOMMetrics:{viewportHeight:function(){return this.getDOMNode().offsetHeight}},propTypes:{rowHeight:o.PropTypes.number,length:o.PropTypes.number.isRequired},getDefaultProps:function(){return{rowHeight:30}},getInitialState:function(){return this.getGridState(this.props)},getGridState:function(e){var t=this.state&&this.state.height?this.state.height:r().height,s=p(t/e.rowHeight);return{displayStart:0,displayEnd:2*s,height:t,scrollTop:0,scrollLeft:0}},updateScroll:function(e,t,s,o,r){var i=p(s/o),n=c(e/o),h=l(n+i,r),u=a(0,n-2*i),d=l(n+2*i,r),f={visibleStart:n,visibleEnd:h,displayStart:u,displayEnd:d,height:s,scrollTop:e,scrollLeft:t};this.setState(f)},metricsUpdated:function(){var e=this.DOMMetrics.viewportHeight();e&&this.updateScroll(this.state.scrollTop,this.state.scrollLeft,e,this.props.rowHeight,this.props.length)},componentWillReceiveProps:function(e){this.props.rowHeight!==e.rowHeight?this.setState(this.getGridState(e)):this.props.length!==e.length&&this.updateScroll(this.state.scrollTop,this.state.scrollLeft,this.state.height,e.rowHeight,e.length)}},u=o.createClass({displayName:"Viewport",mixins:[h],render:function(){var e={padding:0,bottom:0,left:0,right:0,overflow:"hidden",position:"absolute",top:this.props.rowOffsetHeight};return o.createElement("div",{className:"react-grid-Viewport",style:e},o.createElement(n,{ref:"canvas",totalWidth:this.props.totalWidth,width:this.props.columns.width,rows:this.props.rows,selectedRows:this.props.selectedRows,expandedRows:this.props.expandedRows,columns:this.props.columns.columns,cellRenderer:this.props.cellRenderer,rowRenderer:this.props.rowRenderer,visibleStart:this.state.visibleStart,visibleEnd:this.state.visibleEnd,displayStart:this.state.displayStart,displayEnd:this.state.displayEnd,length:this.props.length,height:this.state.height,rowHeight:this.props.rowHeight,onScroll:this.onScroll,onRows:this.props.onRows}))},getScroll:function(){return this.refs.canvas.getScroll()},onScroll:function(e){var t=e.scrollTop,s=e.scrollLeft;this.updateScroll(t,s,this.state.height,this.props.rowHeight,this.props.length),this.props.onScroll&&this.props.onScroll({scrollTop:t,scrollLeft:s})},setScrollLeft:function(e){this.refs.canvas.setScrollLeft(e)}});e.exports=u},function(e,t,s){"use strict";var o=s(10),r=(o.addons.classSet,o.addons.cloneWithProps,s(9)),i=s(27),n=i.createDependency({KeyboardHandlerMixin:r}).assignTo({getDefaultProps:function(){return{tabIndex:-1,ref:"cell"}},isSelected:function(){return this.props.selected&&this.props.selected.rowIdx===this.props.rowIdx&&this.props.selected.idx===this.props.idx},onClick:function(){var e=this.props.rowIdx,t=this.props.idx;this.props.onClick({rowIdx:e,idx:t})},onPressArrowUp:function(e){this.moveSelectedCell(e,-1,0)},onPressArrowDown:function(e){this.moveSelectedCell(e,1,0)},onPressArrowLeft:function(e){this.moveSelectedCell(e,0,-1)},onPressArrowRight:function(e){this.moveSelectedCell(e,0,1)},onPressTab:function(e){this.moveSelectedCell(e,0,1)},moveSelectedCell:function(e,t,s){e.stopPropagation(),e.preventDefault();var o=this.props.rowIdx+t,r=this.props.idx+s;this.props.onSelect({idx:r,rowIdx:o})},setScrollLeft:function(e){this.refs.row.setScrollLeft(e)},componentDidMount:function(){this.checkFocus()},componentDidUpdate:function(){this.checkFocus()},isCellSelectionChanging:function(e){return this.props.selected&&e.selected?this.props.idx===e.selected.idx||this.props.idx===this.props.selected.idx:!0},checkFocus:function(){this.isSelected()&&this.getDOMNode().focus()}});e.exports=n},function(e,t,s){"use strict";var o=s(10),r=(o.addons.classSet,o.addons.cloneWithProps),i=s(15),n=o.PropTypes,l=s(27),a=s(32),c=s(9),p=l.createDependency({KeyboardHandlerMixin:c,SelectableMixin:a}).assignTo({propTypes:{onCommit:n.func.isRequired},canEdit:function(){return null!=this.props.column.editor||this.props.column.editable},getEditor:function(){var e={height:this.props.height,onPressEscape:this.onPressEscape,onCommit:this.onCommit,initialKeyCode:this.props.selected.initialKeyCode,editorRowMetaData:this.getEditorRowMetaData()},t=this.props.column.editor;return t&&o.isValidElement(t)?r(t,e):r(i(),e)},getEditorRowMetaData:function(){this.props.column.ItemId;return"function"==typeof this.props.column.getEditorRowMetaData?this.props.column.getEditorRowMetaData(this.props.rowData):void 0},getFormatter:function(){this.props.column;return this.isActive()?this.getEditor():this.props.column.formatter},onCommit:function(e){var t=this.props.rowIdx,s=(this.props.idx,this.props.column.key);this.props.onCommit({cellKey:s,rowIdx:this.props.filterRowIdx||t,updated:e.updated,keyCode:e.key})},checkFocus:function(){this.isSelected()&&!this.isActive()&&this.getDOMNode().focus()},onClick:function(){if(!this.isActive()){var e=this.props.rowIdx,t=this.props.idx;this.props.onClick({rowIdx:e,idx:t})}},onDoubleClick:function(){var e=this.props.rowIdx,t=this.props.idx;this.props.onClick({rowIdx:e,idx:t,active:this.canEdit()})},setActive:function(e){var t=this.props.rowIdx,s=this.props.idx;"select-row"===this.props.column.key&&this.props.column.onRowSelect?this.props.column.onRowSelect(t):this.canEdit()&&!this.isActive()&&this.props.onSetActive({idx:s,rowIdx:t,active:!0,initialKeyCode:e})},setInactive:function(){if(this.canEdit()&&this.isActive()){var e=this.props.rowIdx,t=this.props.idx;this.props.onSetActive({idx:t,rowIdx:e,active:!1})}},isActive:function(){return this.isSelected()&&this.props.selected.active===!0},onPressEnter:function(e){this.setActive(e.key)},onPressDelete:function(e){this.setActive(e.key)},onPressEscape:function(e){this.setInactive(e.key)},onPressBackspace:function(e){this.setActive(e.key)},onPressChar:function(e){this.isKeyPrintable(e.keyCode)&&this.setActive(e.keyCode)}});e.exports=p},function(e,t,s){"use strict";var o=s(10),r=o.addons.classSet,i=(o.addons.cloneWithProps,o.PropTypes,s(15),s(27)),n=s(32),l=s(9),a=i.createDependency({KeyboardHandlerMixin:l,SelectableMixin:n}).assignTo({getCellClass:function(){return r({selected:this.isSelected()&&!this.isCopied(),copied:this.isCopied()})},KeyCode_c:"99",KeyCode_C:"67",KeyCode_V:"86",KeyCode_v:"118",propTypes:{handleCopy:o.PropTypes.func.isRequired,handlePaste:o.PropTypes.func.isRequired},isCopied:function(){return this.props.copied&&this.props.copied.rowIdx===this.props.rowIdx&&this.props.copied.idx===this.props.idx},onPressKeyWithCtrl:function(e){this.canEdit()&&(e.keyCode==this.KeyCode_c||e.keyCode==this.KeyCode_C?this.props.handleCopy({value:this.props.value}):(e.keyCode==this.KeyCode_v||e.keyCode==this.KeyCode_V)&&this.props.handlePaste({value:this.props.value}))}});e.exports=a},function(e,t,s){"use strict";var o=s(10),r=o.addons.classSet,i=(o.addons.cloneWithProps,o.PropTypes,s(27)),n=s(32),l=s(9),a=i.createDependency({KeyboardHandlerMixin:l,SelectableMixin:n}).assignTo({getCellClass:function(){return r({"selected-draggable":this.isSelected(),"active-drag-cell":this.isSelected()||this.isDraggedOver(),"is-dragged-over-up":!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx<this.props.dragged.rowIdx,"is-dragged-over-down":!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx>this.props.dragged.rowIdx,"was-dragged-over":this.wasDraggedOver()})},getDefaultProps:function(){return{handleDragStart:this.handleDragStart,onDragEnter:this.handleDragEnter,onDragEnd:this.handleDragEnd}},propTypes:{handleDragEnter:o.PropTypes.func.isRequired,handleDragStart:o.PropTypes.func.isRequired,handleDragEnd:o.PropTypes.func.isRequired,handleTerminateDrag:o.PropTypes.func.isRequired},isDraggedOver:function(){return this.props.dragged&&this.props.dragged.overRowIdx===this.props.rowIdx&&this.props.dragged.idx===this.props.idx},wasDraggedOver:function(){return this.props.dragged&&(this.props.dragged.overRowIdx<this.props.rowIdx&&this.props.rowIdx<this.props.dragged.rowIdx||this.props.dragged.overRowIdx>this.props.rowIdx&&this.props.rowIdx>this.props.dragged.rowIdx)&&this.props.dragged.idx===this.props.idx},handleDragStart:function(){var e=this.props.rowIdx,t=this.props.idx;this.props.handleDragStart({rowIdx:e,idx:t,copiedText:this.props.value})},handleDragEnter:function(){this.props.handleDragEnter(this.props.rowIdx)},handleDragEnd:function(){this.props.handleDragEnd()},isDraggedCellChanging:function(e){return this.props.dragged?e.dragged&&this.props.idx===e.dragged.idx||this.props.dragged&&this.props.idx===this.props.dragged.idx:!1},componentDidUpdate:function(){var e=this.props.dragged;e&&e.complete===!0&&this.props.handleTerminateDrag()}});e.exports=a},function(e,t,s){"use strict";var o=s(10),r=o.addons.classSet,i=o.createClass({displayName:"SortableHeaderCell",onClick:function(){this.props.column.sortBy(this.props.column,this.props.column.sorted)},getSortByClass:function(){var e=this.props.column.sorted;return r({"pull-right":!0,"glyphicon glyphicon-arrow-up":"ASC"===e,"glyphicon glyphicon-arrow-down":"DESC"===e})},render:function(){return o.createElement("div",{onClick:this.onClick,style:{cursor:"pointer"}},this.props.column.name,o.createElement("span",{className:this.getSortByClass()}))}});e.exports=i},function(e,t,s){"use strict";var o=s(10),r=(o.addons.classSet,o.createClass({displayName:"FilterableHeaderCell",getInitialState:function(){return{filterTerm:""}},handleChange:function(e){e.preventDefault(),e.stopPropagation(),this.setState({filterTerm:e.currentTarget.value}),this.props.onChange({filterTerm:e.currentTarget.value,columnKey:this.props.column.key})},componentDidUpdate:function(){this.getDOMNode().focus()},render:function(){return o.createElement("div",null,o.createElement("div",{className:"form-group"},o.createElement(this.renderInput,null)))},renderInput:function(){return this.props.column.filterable===!1?o.createElement("span",null):o.createElement("input",{type:"text",className:"form-control input-sm",placeholder:"Search",value:this.state.filterTerm,onChange:this.handleChange})}}));e.exports=r},function(e){"use strict";function t(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=Object.assign||function(e){for(var s,o,r=t(e),i=1;i<arguments.length;i++){s=arguments[i],o=Object.keys(Object(s));for(var n=0;n<o.length;n++)r[o[n]]=s[o[n]]}return r}},function(e,t,s){!function(t,o){e.exports=o(s(10))}(this,function(e){return function(e){function t(o){if(s[o])return s[o].exports;var r=s[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var s={};return t.m=e,t.c=s,t.p="",t(0)}([function(e,t,s){"use strict";function o(e,t,s){if(!e)return s(null,[]);t=new RegExp(t,"i");for(var o=[],r=0,i=e.length;i>r;r++)t.exec(e[r].title)&&o.push(e[r]);s(null,o)}var r=s(1),i=r.addons.classSet,n=r.createClass({displayName:"Autocomplete",propTypes:{options:r.PropTypes.any,search:r.PropTypes.func,resultRenderer:r.PropTypes.oneOfType([r.PropTypes.component,r.PropTypes.func]),value:r.PropTypes.object,onChange:r.PropTypes.func,onError:r.PropTypes.func},getDefaultProps:function(){return{search:o}},getInitialState:function(){var e=this.props.searchTerm?this.props.searchTerm:this.props.value?this.props.value.title:"";return{results:[],showResults:!1,showResultsInProgress:!1,searchTerm:e,focusedValue:null}},getResultIdentifier:function(e){return void 0===this.props.resultIdentifier?e.id:e[this.props.resultIdentifier]},render:function(){var e=i(this.props.className,"react-autocomplete-Autocomplete",this.state.showResults?"react-autocomplete-Autocomplete--resultsShown":void 0),t={position:"relative",outline:"none"};return r.createElement("div",{tabIndex:"1",className:e,onFocus:this.onFocus,onBlur:this.onBlur,style:t},r.createElement("input",{ref:"search",className:"react-autocomplete-Autocomplete__search",style:{width:"100%"},onClick:this.showAllResults,onChange:this.onQueryChange,onFocus:this.showAllResults,onBlur:this.onQueryBlur,onKeyDown:this.onQueryKeyDown,value:this.state.searchTerm}),r.createElement(l,{className:"react-autocomplete-Autocomplete__results",onSelect:this.onValueChange,onFocus:this.onValueFocus,results:this.state.results,focusedValue:this.state.focusedValue,show:this.state.showResults,renderer:this.props.resultRenderer,label:this.props.label,resultIdentifier:this.props.resultIdentifier}))},componentWillReceiveProps:function(e){var t=e.searchTerm?e.searchTerm:e.value?e.value.title:"";this.setState({searchTerm:t})},componentWillMount:function(){this.blurTimer=null},showResults:function(e){this.setState({showResultsInProgress:!0}),this.props.search(this.props.options,e.trim(),this.onSearchComplete)},showAllResults:function(){this.state.showResultsInProgress||this.state.showResults||this.showResults("")},onValueChange:function(e){var t={value:e,showResults:!1};e&&(t.searchTerm=e.title),this.setState(t),this.props.onChange&&this.props.onChange(e)},onSearchComplete:function(e,t){if(e){if(!this.props.onError)throw e;this.props.onError(e)}this.setState({showResultsInProgress:!1,showResults:!0,results:t})},onValueFocus:function(e){this.setState({focusedValue:e})},onQueryChange:function(e){var t=e.target.value;this.setState({searchTerm:t,focusedValue:null}),this.showResults(t)},onFocus:function(){this.blurTimer&&(clearTimeout(this.blurTimer),this.blurTimer=null),this.refs.search.getDOMNode().focus()},onBlur:function(){this.blurTimer=setTimeout(function(){this.isMounted()&&this.setState({showResults:!1})}.bind(this),100)},onQueryKeyDown:function(e){if("Enter"===e.key)e.preventDefault(),this.state.focusedValue&&this.onValueChange(this.state.focusedValue);else if("ArrowUp"===e.key&&this.state.showResults){e.preventDefault();var t=Math.max(this.focusedValueIndex()-1,0);this.setState({focusedValue:this.state.results[t]})}else if("ArrowDown"===e.key)if(e.preventDefault(),this.state.showResults){var s=Math.min(this.focusedValueIndex()+(this.state.showResults?1:0),this.state.results.length-1);this.setState({showResults:!0,focusedValue:this.state.results[s]})}else this.showAllResults()},focusedValueIndex:function(){if(!this.state.focusedValue)return-1;for(var e=0,t=this.state.results.length;t>e;e++)if(this.getResultIdentifier(this.state.results[e])===this.getResultIdentifier(this.state.focusedValue))return e;return-1}}),l=r.createClass({displayName:"Results",getResultIdentifier:function(e){if(void 0===this.props.resultIdentifier){if(!e.id)throw"id property not found on result. You must specify a resultIdentifier and pass as props to autocomplete component";return e.id}return e[this.props.resultIdentifier]},render:function(){var e={display:this.props.show?"block":"none",position:"absolute",listStyleType:"none"},t=this.props,s=t.className,o=function(e,t){var s={},o=Object.prototype.hasOwnProperty;if(null==e)throw new TypeError;for(var r in e)o.call(e,r)&&!o.call(t,r)&&(s[r]=e[r]);return s}(t,{className:1});return r.createElement("ul",r.__spread({},o,{style:e,className:s+" react-autocomplete-Results"}),this.props.results.map(this.renderResult))},renderResult:function(e){var t=this.props.focusedValue&&this.getResultIdentifier(this.props.focusedValue)===this.getResultIdentifier(e),s=this.props.renderer||a;return s({ref:t?"focused":void 0,key:this.getResultIdentifier(e),result:e,focused:t,onMouseEnter:this.onMouseEnterResult,onClick:this.props.onSelect,label:this.props.label})},componentDidUpdate:function(){this.scrollToFocused()},componentDidMount:function(){this.scrollToFocused()},componentWillMount:function(){this.ignoreFocus=!1},scrollToFocused:function(){var e=this.refs&&this.refs.focused;if(e){var t=this.getDOMNode(),s=t.scrollTop,o=t.offsetHeight,r=e.getDOMNode(),i=r.offsetTop,n=i+r.offsetHeight;s>i?(this.ignoreFocus=!0,t.scrollTop=i):n-s>o&&(this.ignoreFocus=!0,t.scrollTop=n-o)}},onMouseEnterResult:function(e,t){if(this.ignoreFocus)this.ignoreFocus=!1;else{var s=this.getDOMNode(),o=s.scrollTop,r=s.offsetHeight,i=e.target,n=i.offsetTop,l=n+i.offsetHeight;l>o&&o+r>n&&this.props.onFocus(t)}}}),a=r.createClass({displayName:"Result",getDefaultProps:function(){return{label:function(e){return e.title}}},getLabel:function(e){return"function"==typeof this.props.label?this.props.label(e):"string"==typeof this.props.label?e[this.props.label]:void 0},render:function(){var e=i({"react-autocomplete-Result":!0,"react-autocomplete-Result--active":this.props.focused});return r.createElement("li",{style:{listStyleType:"none"},className:e,onClick:this.onClick,onMouseEnter:this.onMouseEnter},r.createElement("a",null,this.getLabel(this.props.result)))},onClick:function(){this.props.onClick(this.props.result)},onMouseEnter:function(e){this.props.onMouseEnter&&this.props.onMouseEnter(e,this.props.result)},shouldComponentUpdate:function(e){return e.result.id!==this.props.result.id||e.focused!==this.props.focused}});e.exports=n},function(t){t.exports=e}])})},function(e,t,s){"use strict";function o(e){return function(){return e}}function r(){}var i=s(46);i(r,{thatReturns:o,thatReturnsFalse:o(!1),thatReturnsTrue:o(!0),thatReturnsNull:o(null),thatReturnsThis:function(){return this},thatReturnsArgument:function(e){return e}}),e.exports=r},function(e,t,s){(function(t){"use strict";var s=function(e,s,o,r,i,n,l,a){if(t.env.NODE_ENV&&void 0===s)throw new Error("invariant requires an error message argument");if(!e){var c;if(void 0===s)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[o,r,i,n,l,a],h=0;c=new Error("Invariant Violation: "+s.replace(/%s/g,function(){return p[h++]}))}throw c.framesToPop=1,c}};e.exports=s}).call(t,s(52))},function(e,t,s){(function(t){"use strict";var o=s(51),r=function(e){var s,r={};"production"!==t.env.NODE_ENV?o(e instanceof Object&&!Array.isArray(e),"keyMirror(...): Argument must be an object."):o(e instanceof Object&&!Array.isArray(e));for(s in e)e.hasOwnProperty(s)&&(r[s]=s);return r};e.exports=r}).call(t,s(52))},function(e){"use strict";function t(){var e=window.innerWidth,t=window.innerHeight;return e&&t||(e=document.documentElement.clientWidth,t=document.documentElement.clientHeight),e&&t||(e=document.body.clientWidth,t=document.body.clientHeight),{width:e,height:t}}e.exports=t},function(e,t,s){"use strict";var o=s(10),r=o.addons.classSet,i=o.PropTypes,n=o.addons.cloneWithProps,l=s(47),a=s(40),c=s(48),p=s(2),h=o.createClass({displayName:"Canvas",mixins:[c],propTypes:{cellRenderer:i.element,rowRenderer:i.oneOfType([i.func,i.element]),rowHeight:i.number.isRequired,displayStart:i.number.isRequired,displayEnd:i.number.isRequired,length:i.number.isRequired,rows:i.oneOfType([i.func.isRequired,i.array.isRequired]),onRows:i.func},render:function(){var e=this.state.displayStart,t=this.state.displayEnd,s=this.props.rowHeight,i=this.props.length,n=this.getRows(e,t).map(function(t,o){return this.renderRow({key:e+o,ref:o,idx:e+o,row:t,height:s,columns:this.props.columns,cellRenderer:this.props.cellRenderer,isSelected:this.isRowSelected(e+o),expandedRows:this.props.expandedRows})}.bind(this));this._currentRowsLength=n.length,e>0&&n.unshift(this.renderPlaceholder("top",e*s)),i-t>0&&n.push(this.renderPlaceholder("bottom",(i-t)*s));var l={position:"absolute",top:0,left:0,overflowX:"auto",overflowY:"scroll",width:this.props.totalWidth,height:this.props.height,transform:"translate3d(0, 0, 0)"};return o.createElement("div",{style:l,onScroll:this.onScroll,className:r("react-grid-Canvas",this.props.className)},o.createElement("div",{style:{width:this.props.width,overflow:"hidden"}},n))},renderRow:function(e){return o.isValidElement(this.props.rowRenderer)?n(this.props.rowRenderer,e):this.props.rowRenderer(e)},renderPlaceholder:function(e,t){return o.createElement("div",{key:e,style:{height:t}},this.props.columns.map(function(e,t){return o.createElement("div",{style:{width:e.width},key:t})}))},getDefaultProps:function(){return{rowRenderer:o.createElement(p,null),onRows:a}},isRowSelected:function(e){return this.props.selectedRows&&this.props.selectedRows[e]===!0},getInitialState:function(){return{shouldUpdate:!0,displayStart:this.props.displayStart,displayEnd:this.props.displayEnd}},componentWillMount:function(){this._currentRowsLength=void 0,this._currentRowsRange=void 0,this._scroll=void 0},componentDidMount:function(){this.onRows()},componentDidUpdate:function(){void 0!==this._scroll&&this.setScrollLeft(this._scroll),this.onRows()},componentWillUnmount:function(){this._currentRowsLength=void 0,this._currentRowsRange=void 0,this._scroll=void 0},componentWillReceiveProps:function(e){var t=!(e.visibleStart>this.state.displayStart&&e.visibleEnd<this.state.displayEnd&&e.length===this.props.length&&e.rowHeight===this.props.rowHeight&&e.columns===this.props.columns&&e.width===this.props.width&&l(e.style,this.props.style));this.setState(t?{shouldUpdate:!0,displayStart:e.displayStart,displayEnd:e.displayEnd}:{shouldUpdate:!1})},shouldComponentUpdate:function(e,t){return t.shouldUpdate},onRows:function(){void 0!==this._currentRowsRange&&(this.props.onRows(this._currentRowsRange),this._currentRowsRange=void 0)},getRows:function(e,t){return this._currentRowsRange={start:e,end:t},Array.isArray(this.props.rows)?this.props.rows.slice(e,t):this.props.rows(e,t)},setScrollLeft:function(e){if(void 0!==this._currentRowsLength)for(var t=0,s=this._currentRowsLength;s>t;t++)this.refs[t]&&this.refs[t].setScrollLeft(e)},getScroll:function(){var e=this.getDOMNode(),t=e.scrollTop,s=e.scrollLeft;return{scrollTop:t,scrollLeft:s}},onScroll:function(e){this.appendScrollShim();var t=e.target,s=t.scrollTop,o=t.scrollLeft,r={scrollTop:s,scrollLeft:o};this._scroll=r,this.props.onScroll(r)}});e.exports=h},function(e,t,s){"use strict";var o=s(10),r=o.PropTypes,i=s(47),n=s(49),l=s(50),a=o.createClass({displayName:"HeaderRow",propTypes:{width:r.number,height:r.number.isRequired,columns:r.array.isRequired,onColumnResize:r.func},render:function(){var e={width:this.props.width?this.props.width+l():"100%",height:this.props.height,whiteSpace:"nowrap",overflowX:"hidden",overflowY:"hidden"},t=this.getCells();return o.createElement("div",o.__spread({},this.props,{className:"react-grid-HeaderRow"}),o.createElement("div",{style:e},t))},getCells:function(){for(var e=[],t=[],s=0,r=this.props.columns.length;r>s;s++){var i=this.props.columns[s],l=o.createElement(n,{ref:s,key:s,height:this.props.height,column:i,renderer:this.props.headerCellRenderer||i.headerRenderer||this.props.cellRenderer,resizing:this.props.resizing===i,onResize:this.props.onColumnResize,onResizeEnd:this.props.onColumnResizeEnd});i.locked?t.push(l):e.push(l)}return e.concat(t)},setScrollLeft:function(e){for(var t=0,s=this.props.columns.length;s>t;t++)this.props.columns[t].locked&&this.refs[t].setScrollLeft(e)},shouldComponentUpdate:function(e){return e.width!==this.props.width||e.height!==this.props.height||e.columns!==this.props.columns||!i(e.style,this.props.style)},getStyle:function(){return{overflow:"hidden",width:"100%",height:this.props.height,position:"absolute"}}});e.exports=a},function(e,t,s){(function(t){"use strict";function s(e,s,o,r,i,n,l){if(e=e||{},t.env.NODE_ENV&&l)throw new Error("Too many arguments passed to copyProperties");for(var a,c=[s,o,r,i,n],p=0;c[p];){a=c[p++];for(var h in a)e[h]=a[h];a.hasOwnProperty&&a.hasOwnProperty("toString")&&"undefined"!=typeof a.toString&&e.toString!==a.toString&&(e.toString=a.toString)}return e}e.exports=s}).call(t,s(52))},function(e){"use strict";function t(e,t){if(e===t)return!0;var s;for(s in e)if(e.hasOwnProperty(s)&&(!t.hasOwnProperty(s)||e[s]!==t[s]))return!1;for(s in t)if(t.hasOwnProperty(s)&&!e.hasOwnProperty(s))return!1;return!0}e.exports=t},function(e){"use strict";var t={appendScrollShim:function(){if(!this._scrollShim){var e=this._scrollShimSize(),t=document.createElement("div");t.classList.add("react-grid-ScrollShim"),t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.width=e.width+"px",t.style.height=e.height+"px",this.getDOMNode().appendChild(t),this._scrollShim=t}this._scheduleRemoveScrollShim()},_scrollShimSize:function(){return{width:this.props.width,height:this.props.length*this.props.rowHeight}},_scheduleRemoveScrollShim:function(){this._scheduleRemoveScrollShimTimer&&clearTimeout(this._scheduleRemoveScrollShimTimer),this._scheduleRemoveScrollShimTimer=setTimeout(this._removeScrollShim,200)},_removeScrollShim:function(){this._scrollShim&&(this._scrollShim.parentNode.removeChild(this._scrollShim),this._scrollShim=void 0)}};e.exports=t},function(e,t,s){"use strict";function o(e){return r.createElement("div",{className:"rex-widget-HeaderCell__value"},e.column.name)}var r=s(10),i=r.addons.classSet,n=s(53),l=r.PropTypes,a=r.createClass({displayName:"ResizeHandle",style:{position:"absolute",top:0,right:0,width:6,height:"100%"},render:function(){return r.createElement(n,r.__spread({},this.props,{className:"react-grid-HeaderCell__resizeHandle",style:this.style}))}}),c=r.createClass({displayName:"HeaderCell",propTypes:{renderer:l.oneOfType([l.func,l.element]).isRequired,column:l.object.isRequired,onResize:l.func},render:function(){var e=i({"react-grid-HeaderCell":!0,"react-grid-HeaderCell--resizing":this.state.resizing,"react-grid-HeaderCell--locked":this.props.column.locked});e=i(e,this.props.className);var t=this.getCell();return r.createElement("div",{className:e,style:this.getStyle()},t,this.props.column.resizeable?r.createElement(a,{onDrag:this.onDrag,onDragStart:this.onDragStart,onDragEnd:this.onDragEnd}):null)},getCell:function(){return r.isValidElement(this.props.renderer)?r.addons.cloneWithProps(this.props.renderer,{column:this.props.column}):this.props.renderer({column:this.props.column})},getDefaultProps:function(){return{renderer:o}},getInitialState:function(){return{resizing:!1}},setScrollLeft:function(e){var t=this.getDOMNode();t.style.webkitTransform="translate3d("+e+"px, 0px, 0px)",t.style.transform="translate3d("+e+"px, 0px, 0px)"},getStyle:function(){return{width:this.props.column.width,left:this.props.column.left,display:"inline-block",position:"absolute",overflow:"hidden",height:this.props.height,margin:0,textOverflow:"ellipsis",whiteSpace:"nowrap"}},onDragStart:function(){this.setState({resizing:!0})},onDrag:function(e){var t=this.getWidthFromMouseEvent(e);t>0&&this.props.onResize&&this.props.onResize(this.props.column,t)},onDragEnd:function(e){var t=this.getWidthFromMouseEvent(e);this.props.onResizeEnd(this.props.column,t),this.setState({resizing:!1})},getWidthFromMouseEvent:function(e){var t=e.pageX,s=this.getDOMNode().getBoundingClientRect().left;return t-s}});e.exports=c},function(e){"use strict";function t(){if(void 0===s){var e=document.createElement("div");e.style.width="50px",e.style.height="50px",e.style.overflowY="scroll",e.style.position="absolute",e.style.top="-200px",e.style.left="-200px";var t=document.createElement("div");t.style.height="100px",t.style.width="100%",e.appendChild(t),document.body.appendChild(e);var o=e.offsetWidth,r=t.offsetWidth;document.body.removeChild(e),s=o-r}return s}var s;e.exports=t},function(e,t,s){(function(t){"use strict";var s=function(e,s,o,r,i,n,l,a){if("production"!==t.env.NODE_ENV&&void 0===s)throw new Error("invariant requires an error message argument");if(!e){var c;if(void 0===s)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[o,r,i,n,l,a],h=0;c=new Error("Invariant Violation: "+s.replace(/%s/g,function(){return p[h++]}))}throw c.framesToPop=1,c}};e.exports=s}).call(t,s(52))},function(e){function t(){}var s=e.exports={};s.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.MutationObserver,s="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};var o=[];if(t){var r=document.createElement("div"),i=new MutationObserver(function(){var e=o.slice();o.length=0,e.forEach(function(e){e()})});return i.observe(r,{attributes:!0}),function(e){o.length||r.setAttribute("yes","no"),o.push(e)}}return s?(window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),o.length>0)){var s=o.shift();s()}},!0),function(e){o.push(e),window.postMessage("process-tick","*")}):function(e){setTimeout(e,0)}}(),s.title="browser",s.browser=!0,s.env={},s.argv=[],s.on=t,s.addListener=t,s.once=t,s.off=t,s.removeListener=t,s.removeAllListeners=t,s.emit=t,s.binding=function(){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(){throw new Error("process.chdir is not supported") -}},function(e,t,s){"use strict";var o=s(10),r=o.PropTypes,i=s(40),n=o.createClass({displayName:"Draggable",propTypes:{onDragStart:r.func,onDragEnd:r.func,onDrag:r.func,component:r.oneOfType([r.func,r.constructor])},render:function(){var e=this.props.component;return o.createElement(e,o.__spread({},this.props,{onMouseDown:this.onMouseDown}))},getDefaultProps:function(){return{component:o.DOM.div,onDragStart:i.thatReturnsTrue,onDragEnd:i,onDrag:i}},getInitialState:function(){return{drag:null}},onMouseDown:function(e){var t=this.props.onDragStart(e);(null!==t||0===e.button)&&(window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("mousemove",this.onMouseMove),this.setState({drag:t}))},onMouseMove:function(e){null!==this.state.drag&&(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),this.props.onDrag(e))},onMouseUp:function(e){this.cleanUp(),this.props.onDragEnd(e,this.state.drag),this.setState({drag:null})},componentWillUnmount:function(){this.cleanUp()},cleanUp:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove)}});e.exports=n}])}); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react/addons")):"function"==typeof define&&define.amd?define(["react/addons"],t):"object"==typeof exports?exports.ReactGrid=t(require("react/addons")):e.ReactGrid=t(e.React)}(this,function(e){return function(e){function t(o){if(s[o])return s[o].exports;var r=s[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var s={};return t.m=e,t.c=s,t.p="",t(0)}([function(e,t,s){e.exports={Grid:s(1),Editors:s(7),Formatters:s(8),Toolbar:s(4),Mixins:{EditorMixin:s(5),TextInputMixin:s(6),KeyboardHandlerMixin:s(9)}}},function(e,t,s){"use strict";var o=s(10),r=(o.PropTypes,s(12)),i=s(13),n=s(14),l=(s(15),s(16)),a=s(17),p=s(18),c=s(19),h=s(20),u=s(21),d=s(22),f=(s(23),o.addons.cloneWithProps,o.createClass({displayName:"ExcelGrid",mixins:[l,c,a,p,h,u],getInitialState:function(){return{selectedRows:[],expandedRows:[]}},overrides:{onCellCommit:function(e){var t=e[0],s=Object.assign({},this.state.selected);s.active=!1,"Tab"===t.keyCode&&(s.idx+=1);var o=this.state.expandedRows;t.changed&&t.changed.expandedHeight&&(o=this.expandRow(t.rowIdx,t.changed.expandedHeight)),this.setState({selected:s,expandedRows:o}),this.props.onRowUpdated(t)},getColumns:function(){var e=this.getDecoratedColumns(this.props.columns);return this.props.enableRowSelect&&e.unshift({key:"select-row",name:"",formatter:o.createElement(d,null),onRowSelect:this.handleRowSelect,filterable:!1,headerRenderer:o.createElement("input",{type:"checkbox",onChange:this.handleCheckboxChange}),width:60}),e}},getDefaultProps:function(){return{rowHeight:35,enableRowSelect:!1,minHeight:350}},handleCheckboxChange:function(e){if(e.currentTarget.checked===!0){var t=this.props.rows.map(function(){return!0});this.setState({selectedRows:t})}else{var t=this.props.rows.map(function(){return!1});this.setState({selectedRows:t})}},handleRowSelect:function(e){var t=this.state.selectedRows;t[e]=null==t[e]||0==t[e]?!0:!1,this.setState({selectedRows:t})},expandRow:function(e,t){var s=this.state.expandedRows;return s[e]?(null==s[e]||s[e]<t)&&(s[e]=t):s[e]=t,s},addRow:function(){},handleShowMore:function(e,t){var s=this.expandRow(e,t);this.setState({expandedRows:s})},handleShowLess:function(e){var t=this.state.expandedRows;t[e]&&(t[e]=!1),this.setState({expandedRows:t})},expandAllRows:function(){},collapseAllRows:function(){},onAfterAddRow:function(e){this.setState({selected:{idx:1,rowIdx:e-2}}),this.refs.base.refs.viewport.refs.canvas.getDOMNode().scrollTop=e*this.props.rowHeight},componentWillReceiveProps:function(e){e.rows.length===this.props.rows.length+1&&this.onAfterAddRow(e.rows.length+1)},render:function(){var e=o.createElement(i,{selected:this.state.selected,copied:this.state.copied,dragged:this.state.dragged,onSelect:this.onSelect,onClick:this.onSelect,onSetActive:this.onSetActive,onCommit:this.onCellCommit,handleCopy:this.handleCopy,handlePaste:this.handlePaste,handleDragStart:this.handleDragStart,handleDragEnter:this.handleDragEnter,handleDragEnd:this.handleDragEnd,handleTerminateDrag:this.handleTerminateDrag,onShowMore:this.handleShowMore,onShowLess:this.handleShowLess,expandedRows:this.state.expandedRows}),t=this.filterRows(),s=this.renderToolbar();return o.createElement("div",{className:"react-grid-Container"},s,o.createElement("div",{className:"react-grid-Main"},o.createElement(r,o.__spread({ref:"base"},this.props,{length:this.props.rows.length,headerRows:this.getHeaderRows(),columns:this.getColumns(),rows:t,cellRenderer:e,rowRenderer:o.createElement(n,null),selectedRows:this.state.selectedRows,expandedRows:this.state.expandedRows,rowOffsetHeight:this.getRowOffsetHeight(),minHeight:this.props.minHeight}))))},renderToolbar:function(){var e=this.props.toolbar;return o.isValidElement(e)?o.addons.cloneWithProps(e,{onToggleFilter:this.onToggleFilter,rows:this.props.rows}):void 0}}));e.exports=f},function(e,t,s){"use strict";var o=s(10),r=o.addons.classSet,i=s(3),n=o.addons.cloneWithProps,l=s(11),a=o.createClass({displayName:"Row",render:function(){var e=r("react-grid-Row","react-grid-Row--"+(this.props.idx%2===0?"even":"odd")),t={height:this.getRowHeight(),overflow:"hidden"},s=this.getCells();return o.createElement("div",o.__spread({},this.props,{className:e,style:t}),o.isValidElement(this.props.row)?this.props.row:s)},getCells:function(){for(var e=[],t=[],s=0,o=this.props.columns.length;o>s;s++){var r=this.props.columns[s],i=this.renderCell({ref:s,key:s,idx:s,rowIdx:this.props.idx,filterRowIdx:this.props.row.key,value:this.getCellValue(r.key||s),column:r,height:this.getRowHeight(),formatter:r.formatter,rowData:this.props.row});r.locked?t.push(i):e.push(i)}return e.concat(t)},getRowHeight:function(){return this.props.expandedRows&&this.props.expandedRows[this.props.key]?this.props.expandedRows[this.props.key]:this.props.height},getCellValue:function(e){return"select-row"===e?this.props.isSelected:this.props.row[e]},renderCell:function(e){return o.isValidElement(this.props.cellRenderer)?n(this.props.cellRenderer,e):this.props.cellRenderer(e)},getDefaultProps:function(){return{cellRenderer:i}},shouldComponentUpdate:function(e){return!l.sameColumns(this.props.columns,e.columns,l.sameColumn)||this.doesRowContainSelectedCell()||this.doesRowContainSelectedCell(e)||this.willRowBeDraggedOver(e)||this.hasRowBeenCopied()||e.row!==this.props.row||e.height!==this.props.height},setScrollLeft:function(e){for(var t=0,s=this.props.columns.length;s>t;t++)this.props.columns[t].locked&&this.refs[t].setScrollLeft(e)},doesRowContainSelectedCell:function(e){var t=e||this.props,s=s||t.cellRenderer;return s.props.selected&&s.props.selected.rowIdx===t.idx?!0:!1},willRowBeDraggedOver:function(e){var t=e.cellRenderer.props.dragged;return null!=t&&(t.rowIdx||t.complete===!0)},hasRowBeenCopied:function(){var e=this.props.cellRenderer;return null!=e.props.copied&&e.props.copied.rowIdx===this.props.idx}});e.exports=a},function(e,t,s){"use strict";function o(e){return e.value}var r=s(10),i=r.addons.classSet,n=r.addons.cloneWithProps,l=r.createClass({displayName:"Cell",render:function(){var e=this.getStyle(),t=i("react-grid-Cell",this.props.className,this.props.column.locked?"react-grid-Cell--locked":null),s=this.renderCellContent({value:this.props.value,column:this.props.column,rowIdx:this.props.rowIdx,isExpanded:this.props.isExpanded});return r.createElement("div",r.__spread({},this.props,{className:t,style:e}),s,r.createElement("div",{className:"drag-handle",draggable:"true",onDragStart:this.props.handleDragStart}))},renderCellContent:function(e){var t=r.isValidElement(this.props.formatter)?n(this.props.formatter,e):this.props.formatter(e);return r.createElement("div",{className:"react-grid-Cell__value",title:this.props.value},t," ",this.props.cellControls)},getDefaultProps:function(){return{formatter:o}},getStyle:function(){var e={position:"absolute",width:this.props.column.width,height:this.props.height,left:this.props.column.left};return e},setScrollLeft:function(e){if(this.isMounted()){var t=this.getDOMNode(),s="translate3d("+e+"px, 0px, 0px)";t.style.webkitTransform=s,t.style.transform=s}}});e.exports=l},function(e,t,s){"use strict";var o=s(10),r=o.createClass({displayName:"Toolbar",onAddRow:function(){this.props.onAddRow&&this.props.onAddRow({newRowIndex:this.props.rows.length})},getDefaultProps:function(){return{enableAddRow:!0}},getAddRowButton:function(){return this.props.enableAddRow?o.createElement("button",{type:"button",className:"btn",onClick:this.onAddRow},"Add Row"):void 0},render:function(){return o.createElement("div",{className:"react-grid-Toolbar"},o.createElement("div",{className:"tools"},this.getAddRowButton(),o.createElement("button",{type:"button",className:"btn",onClick:this.props.onToggleFilter},"Filter Rows")))}});e.exports=r},function(e,t,s){"use strict";var o=s(10),r=o.addons.classSet,i=s(24),n={propTypes:{onCommit:o.PropTypes.func.isRequired},getStyle:function(){return{height:this.props.height-1}},getInitialState:function(){return{isInvalid:!1}},onPressEnter:function(e){e.stopPropagation(),e.preventDefault(),this.commit({key:"Enter"})},onPressTab:function(e){e.stopPropagation(),e.preventDefault(),this.commit({key:"Tab"})},commit:function(e){var t=this.getValue(),s={};s[this.props.column.key]=t,this.isNewValueValid(t)&&this.props.onCommit({updated:s,key:e.key})},isNewValueValid:function(e){if(i(this.validate)){var t=this.validate(e);return this.setState({isInvalid:!t}),t}return!0},getValue:function(){return this.getInputNode().value},setValue:function(e){this.getInputNode().value=e},componentDidMount:function(){void 0!==this.getInputNode()&&(this.checkFocus(),this.getInputNode().className+=" editor-main")},checkFocus:function(){this.getInputNode().focus()},getInputNode:function(){return this.getDOMNode().getElementsByTagName("input")[0]},getContainerClass:function(){return r({"has-error":this.state.isInvalid===!0})},renderStatusIcon:function(){return this.state.isInvalid===!0?o.createElement("span",{className:"glyphicon glyphicon-remove form-control-feedback"}):void 0},render:function(){if(!i(this.renderEditorNode))throw"Editor Mixin Error : "+this.displayName+" component must implement method renderEditorNode";var e=this.renderEditorNode();return o.createElement("div",{className:this.getContainerClass()},e,this.renderStatusIcon())}};e.exports=n},function(e,t,s){"use strict";var o={onPressArrowLeft:function(e){e.stopPropagation()},onPressArrowRight:function(e){e.stopPropagation()},getDefaultValue:function(){var e=this.props.initialKeyCode;if("Delete"===e||"Backspace"===e)return"";if("Enter"===e)return this.props.value;var t=e?String.fromCharCode(e):this.props.value;return t},setCaretAtEndOfInput:function(){var e=this.getInputNode(),t=e.value.length;if(e.setSelectionRange)e.setSelectionRange(t,t);else if(e.createTextRange){var s=e.createTextRange();s.moveStart("character",txt.value.length),s.collapse(),s.select()}},setTextInputFocus:function(){this.isKeyPrintable(this.props.initialKeyCode)?this.getInputNode().select():(this.getInputNode().focus(),this.setCaretAtEndOfInput())}};e.exports=o},function(e,t,s){var o={AutoComplete:s(25),DropDownEditor:s(26),SimpleTextEditor:s(27)};e.exports=o},function(e,t,s){var o={};e.exports=o},function(e,t,s){"use strict";var o=s(10),r=(o.addons.Perf,{onKeyDown:function(e){if(this.isCtrlKeyHeldDown(e))this.checkAndCall("onPressKeyWithCtrl",e);else if(this.isKeyIdentified(e.key)){var t="onPress"+e.key;this.checkAndCall(t,e)}else this.isKeyPrintable(e.keyCode)&&this.checkAndCall("onPressChar",e)},isKeyPrintable:function(e){var t=e>47&&58>e||32==e||13==e||e>64&&91>e||e>95&&112>e||e>185&&193>e||e>218&&223>e;return t},isKeyIdentified:function(e){return"Unidentified"!==e},isCtrlKeyHeldDown:function(e){return e.ctrlKey===!0&&"Control"!==e.key},checkAndCall:function(e,t){"function"==typeof this[e]&&this[e](t)}});e.exports=r},function(t,s,o){t.exports=e},function(e,t,s){"use strict";function o(e){var t,s,o,r=0,i=e.totalWidth,n=[],l=e.columns.map(c);for(t=0,s=l.length;s>t;t++)o=l[t],o.width?(/^([0-9]+)%$/.exec(o.width)&&(o.width=Math.floor(parseInt(o.width,10)/100*e.totalWidth)),i-=o.width,r+=o.width):n.push(o);for(t=0,s=n.length;s>t;t++)o=n[t],o.width=0>=i?e.minColumnWidth:Math.floor(i/n.length),r+=o.width;var a=0;for(t=0,s=l.length;s>t;t++)o=l[t],o.left=a,a+=o.width;return{columns:l,width:r,totalWidth:e.totalWidth,minColumnWidth:e.minColumnWidth}}function r(e,t,s){var r=e.columns[t];e=c(e),e.columns=e.columns.slice(0);var i=c(r);return i.width=Math.max(s,e.minColumnWidth),e.columns.splice(t,1,i),o(e)}function i(e,t,s){var o,r,i,n={},l={};if(e.length!==t.length)return!1;for(o=0,r=e.length;r>o;o++)i=e[o],n[i.key]=i;for(o=0,r=t.length;r>o;o++){i=t[o],l[i.key]=i;var a=n[i.key];if(void 0===a||!s(a,i))return!1}for(o=0,r=e.length;r>o;o++){i=e[o];var p=l[i.key];if(void 0===p)return!1}return!0}function n(e,t){var s;for(s in e)if(e.hasOwnProperty(s)){if("function"==typeof e[s]&&"function"==typeof t[s]||p(e[s])&&p(t[s]))continue;if(!t.hasOwnProperty(s)||e[s]!==t[s])return!1}for(s in t)if(t.hasOwnProperty(s)&&!e.hasOwnProperty(s))return!1;return!0}var l=s(10),a=l.PropTypes,p=l.isValidElement,c=s(28),h=s(29),u=s(15),d={mixins:[h.MetricsMixin],propTypes:{columns:a.array,minColumnWidth:a.number,columnEquality:a.func},DOMMetrics:{gridWidth:function(){return this.getDOMNode().offsetWidth-2}},getDefaultProps:function(){return{minColumnWidth:80,columnEquality:n}},getInitialState:function(){return this.getColumnMetrics(this.props,!0)},componentWillReceiveProps:function(e){if(e.columns)if(i(this.props.columns,e.columns,this.props.columnEquality)){var t={};this.state.columns.columns.forEach(function(e){t[e.key]={width:e.width,left:e.left}});var s=u(this.state.columns,{columns:e.columns.map(function(e){return u(e,t[e.key])})});this.setState({columns:s})}else this.setState(this.getColumnMetrics(e))},getColumnMetrics:function(e,t){var s=t?null:this.DOMMetrics.gridWidth();return{columns:o({columns:e.columns,width:null,totalWidth:s,minColumnWidth:e.minColumnWidth}),gridWidth:s}},metricsUpdated:function(){this.setState(this.getColumnMetrics(this.props))},onColumnResize:function(e,t){var s=r(this.state.columns,e,t);this.setState({columns:s})}};e.exports={Mixin:d,calculate:o,resizeColumn:r,sameColumns:i,sameColumn:n}},function(e,t,s){"use strict";var o=s(10),r=o.PropTypes,i=s(30),n=s(31),l=s(11),a=s(29),p={componentDidMount:function(){this._scrollLeft=this.refs.viewport.getScroll().scrollLeft,this._onScroll()},componentDidUpdate:function(){this._onScroll()},componentWillMount:function(){this._scrollLeft=void 0},componentWillUnmount:function(){this._scrollLeft=void 0},onScroll:function(e){var t=e.scrollLeft;this._scrollLeft!==t&&(this._scrollLeft=t,this._onScroll())},_onScroll:function(){void 0!==this._scrollLeft&&(this.refs.header.setScrollLeft(this._scrollLeft),this.refs.viewport.setScrollLeft(this._scrollLeft))}},c=o.createClass({displayName:"Grid",mixins:[p,l.Mixin,a.MetricsComputatorMixin],propTypes:{rows:r.oneOfType([r.array,r.func]).isRequired,columns:r.array.isRequired},getStyle:function(){return{overflow:"hidden",outline:0,position:"relative",minHeight:this.props.minHeight}},render:function(){var e=this.props.headerRows||[{ref:"row"}];return o.createElement("div",o.__spread({},this.props,{style:this.getStyle(),className:"react-grid-Grid"}),o.createElement(i,{ref:"header",columns:this.state.columns,onColumnResize:this.onColumnResize,height:this.props.rowHeight,totalWidth:this.DOMMetrics.gridWidth(),headerRows:e}),o.createElement(n,{ref:"viewport",width:this.state.columns.width,rowHeight:this.props.rowHeight,rowRenderer:this.props.rowRenderer,cellRenderer:this.props.cellRenderer,rows:this.props.rows,selectedRows:this.props.selectedRows,expandedRows:this.props.expandedRows,length:this.props.length,columns:this.state.columns,totalWidth:this.DOMMetrics.gridWidth(),onScroll:this.onScroll,onRows:this.props.onRows,rowOffsetHeight:this.props.rowOffsetHeight||this.props.rowHeight*e.length}))},getDefaultProps:function(){return{rowHeight:35,minHeight:350}}});e.exports=c},function(e,t,s){"use strict";var o=s(10),r=s(3),i=(s(32),s(33)),n=s(34),l=s(35),a=(s(23),s(9),s(24)),p=(o.PropTypes,o.addons.classSet),c=(o.addons.cloneWithProps,o.createClass({displayName:"CellControls",onClickEdit:function(e){e.stopPropagation(),e.preventDefault(),this.props.onClickEdit()},onShowMore:function(e){e.stopPropagation(),e.preventDefault();var t=this.props.column.getExpandedHeight(this.props.value);this.props.onShowMore(this.props.rowIdx,t)},onShowLess:function(e){e.stopPropagation(),e.preventDefault(),this.props.onShowLess(this.props.rowIdx)},shouldComponentUpdate:function(e,t){return this.props.height!=e.height},renderShowMoreButton:function(){if(a(this.props.column.getExpandedHeight)&&this.props.column.getExpandedHeight(this.props.value)>0){var e=this.props.column.getExpandedHeight(this.props.value);return e>this.props.height?o.createElement("button",{type:"button",className:"btn btn-link btn-xs",onClick:this.onShowMore},"Show More"):o.createElement("button",{type:"button",className:"btn btn-link btn-xs",onClick:this.onShowLess},"Show Less")}return null},render:function(){return o.createElement("div",{className:"pull-right btn-group"},this.renderShowMoreButton(),o.createElement("button",{onClick:this.onClickEdit,type:"button",className:"btn btn-link btn-xs"},"Edit"))}})),h=o.createClass({displayName:"ExcelCell",mixins:[i,n,l],overrides:{getCellClass:function(){return p({selected:this.isSelected()&&!this.isCopied()&&!this.isActive(),editing:this.isActive(),copied:this.isCopied(),"selected-draggable":this.isSelected()&&!this.isActive()&&this.canEdit(),"active-drag-cell":this.isActiveDragCell()&&this.canEdit(),"is-dragged-over-up":!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx<this.props.dragged.rowIdx,"is-dragged-over-down":!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx>this.props.dragged.rowIdx,"was-dragged-over":this.wasDraggedOver()&&this.canEdit()})}},isActiveDragCell:function(){return(this.isSelected()||this.isDraggedOver())&&!this.isActive()},isExpanded:function(){var e=!1;if(a(this.props.column.getExpandedHeight)&&this.props.column.getExpandedHeight(this.props.value)>0){var t=this.props.column.getExpandedHeight(this.props.value);e=this.props.height>=t?!0:!1}return e},shouldComponentUpdate:function(e,t){return this.props.column.width!==e.column.width||this.props.value!==e.value||this.props.height!==e.height||this.props.rowIdx!==e.rowIdx||this.isCellSelectionChanging(e)||this.isDraggedCellChanging(e)},render:function(){return o.createElement(r,o.__spread({},this.props,{className:this.getCellClass(),onKeyDown:this.onKeyDown,onClick:this.onClick,onDoubleClick:this.onDoubleClick,formatter:this.getFormatter(),handleDragStart:this.handleDragStart,onDragEnter:this.handleDragEnter,onDragEnd:this.props.handleDragEnd,cellControls:this.props.column.showCellControls&&!this.isActive()?o.createElement(c,{height:this.props.height,value:this.props.value,rowIdx:this.props.rowIdx,column:this.props.column,onShowMore:this.props.onShowMore,onShowLess:this.props.onShowLess,onClickEdit:this.setActive}):null,isExpanded:this.isExpanded()}))}});e.exports=h},function(e,t,s){"use strict";var o=s(10),r=(o.addons.classSet,s(2)),i=s(11),n=o.createClass({displayName:"ExcelRow",render:function(){var e=o.addons.update(this.props.row,{$merge:{"select-row":this.props.isSelected}});return o.createElement(r,o.__spread({},this.props,{row:e,height:this.getRowHeight(this.props)}))},getRowHeight:function(e){return e.expandedRows&&e.expandedRows[e.idx]?e.expandedRows[e.idx]:e.height},hasRowHeightChanged:function(e){return e.expandedRows&&"undefined"!=typeof e.expandedRows[e.idx]?this.props.height!==e.expandedRows[e.idx]:!1},shouldComponentUpdate:function(e){return!i.sameColumns(this.props.columns,e.columns,i.sameColumn)||this.doesRowContainSelectedCell()||this.doesRowContainSelectedCell(e)||this.willRowBeDraggedOver(e)||this.hasRowBeenCopied()||e.row!==this.props.row||this.props.isSelected!==e.isSelected||this.hasRowHeightChanged(e)},doesRowContainSelectedCell:function(e){var t=e||this.props,s=s||t.cellRenderer;return s.props&&s.props.selected&&s.props.selected.rowIdx===t.idx?!0:!1},willRowBeDraggedOver:function(e){if(e.cellRenderer.props){var t=e.cellRenderer.props.dragged;return null!=t&&(t.rowIdx||t.complete===!0)}return!1},hasRowBeenCopied:function(){if(this.props.cellRenderer.props){var e=this.props.cellRenderer;return null!=e.props.copied&&e.props.copied.rowIdx===this.props.idx}return!1},setScrollLeft:function(e){for(var t=0,s=this.props.columns.length;s>t;t++)this.props.columns[t].locked&&this.refs[t].setScrollLeft(e)}});e.exports=n},function(e,t,s){"use strict";function o(e,t){var s={};for(var o in e)s[o]=e[o];for(var o in t)s[o]=t[o];return s}var r=function(e,t){var s={};return null!=e&&Object.assign(s,e),null!=t&&Object.assign(s,t),s};e.exports=Object.assign?r:o},function(e,t,s){"use strict";var o={getDefaultProps:function(){return{enableCellSelect:!1}},getColumns:function(){return this.props.columns},getInitialState:function(){return this.props.enableCellSelect?{selected:{rowIdx:0,idx:0}}:{selected:{rowIdx:-1,idx:-1}}},onSelect:function(e){if(this.props.enableCellSelect){var t=e.idx,s=e.rowIdx;t>=0&&s>=0&&t<this.getColumns().length&&s<this.props.rows.length&&(this.props.onSelect&&this.props.onSelect({selected:e}),this.setState({selected:e}))}}};e.exports=o},function(e,t,s){"use strict";{var o=s(10),r=(o.PropTypes,s(23));s(16)}r.addAlias("SelectableGridMixin");var i={mixinDependencies:["SelectableGridMixin"],propTypes:{onCellsDragged:o.PropTypes.func},getInitialState:function(){return{dragged:null}},handleDragStart:function(e){var t=e.idx,s=e.rowIdx;t>=0&&s>=0&&t<this.getColumns().length&&s<this.props.rows.length&&this.setState({dragged:e})},handleDragEnter:function(e){var t=(this.state.selected,this.state.dragged);t.overRowIdx=e,this.setState({dragged:t})},handleDragEnd:function(){var e,t,s=this.state.selected,o=this.state.dragged,r=this.getColumns()[this.state.selected.idx].key;e=s.rowIdx<o.overRowIdx?s.rowIdx:o.overRowIdx,t=s.rowIdx>o.overRowIdx?s.rowIdx:o.overRowIdx,this.props.onCellsDragged({cellKey:r,fromRow:e,toRow:t,value:o.copiedText}),this.setState({dragged:{complete:!0}})},handleTerminateDrag:function(){this.setState({dragged:null})}};e.exports=i},function(e,t,s){"use strict";var o=s(10),r=(o.PropTypes,{propTypes:{onCellCopyPaste:o.PropTypes.func},getInitialState:function(){return{copied:null}},handleCopy:function(e){var t=e.value,s=this.state.selected,o={idx:s.idx,rowIdx:s.rowIdx};this.setState({textToCopy:t,copied:o})},handlePaste:function(){var e=this.state.selected,t=this.getColumns()[e.idx].key;this.props.onCellCopyPaste({cellKey:t,rowIdx:e.rowIdx,value:this.state.textToCopy,fromRow:this.state.copied.rowIdx,toRow:e.rowIdx}),this.setState({copied:null})}});e.exports=r},function(e,t,s){"use strict";var o=s(10),r=(o.PropTypes,s(15)),i={propTypes:{onRowUpdated:o.PropTypes.func},onCellCommit:function(e){var t=this.state.selected;t.active=!1,"Tab"===e.keyCode&&(t.idx+=1),this.setState({selected:t}),this.props.onRowUpdate(e)},onSetActive:function(e){var t=r(this.state.selected,e);this.setState({selected:t})}};e.exports=i},function(e,t,s){"use strict";var o=s(10),r=(o.PropTypes,s(36)),i=s(28),n={ASC:"ASC",DESC:"DESC"};Object.freeze(n);var l={getInitialState:function(){return{sortDirection:null,sortColumn:null}},getDecoratedColumns:function(e){return this.props.columns.map(function(e){return e=i(e),e.sortable&&(e.headerRenderer=o.createElement(r,null),e.sortBy=this.sortBy,e.sorted=this.state.sortColumn===e.key?this.state.sortDirection:n.NONE),e},this)},sortBy:function(e,t){switch(t){case null:case void 0:t=n.ASC;break;case n.ASC:t=n.DESC;break;case n.DESC:t=null}this.setState({sortDirection:t,sortColumn:e.key})},sortRows:function(e){e=[].concat(e);var t=this.state.sortColumn,s=this.state.sortDirection;return null!=t&&null!==s?e.sort(function(e,o){var r=e[t],i=o[t];return s===n.ASC?r>i?1:i>r?-1:0:s===n.DESC?r>i?-1:i>r?1:0:void 0}):e}};e.exports=l},function(e,t,s){"use strict";var o=s(10),r=(o.PropTypes,s(37)),i={getInitialState:function(){return{canFilter:!1,columnFilters:{}}},filterRows:function(){var e=this.props.rows;return this.state.sortColumn&&(e=this.sortRows(e)),this.hasFilters()&&(e=e.map(function(e,t){return e.key=t,e}).filter(this.isRowDisplayed),this.props.onFilter&&this.props.onFilter(e)),e},hasFilters:function(){var e=!1;return Object.keys(this.state.columnFilters).every(function(t){var s=this.state.columnFilters[t];return null!=s&&void 0!=s&&""!=s?(e=!0,!1):!0},this),e},isRowDisplayed:function(e){var t=null;return Object.keys(this.state.columnFilters).every(function(s){var o=this.state.columnFilters[s].toLowerCase(),r=e[s].toString().toLowerCase();if(null!=o&&void 0!=o&&""!=o&&"string"==typeof r){if(!(r.indexOf(o)>-1))return t=!1,!1;t=!0}return!0},this),null==t?!1:t},onToggleFilter:function(){this.setState({canFilter:!this.state.canFilter})},handleAddFilter:function(e){var t=this.state.columnFilters;t[e.columnKey]=e.filterTerm,this.setState({columnFilters:t,selected:null})},getHeaderRows:function(){var e=[{ref:"row",height:this.props.rowHeight}];return this.state.canFilter===!0&&e.push({ref:"filterRow",headerCellRenderer:o.createElement(r,{onChange:this.handleAddFilter}),height:45}),e},getRowOffsetHeight:function(){var e=0;return this.getHeaderRows().forEach(function(t){return e+=t.height}),e}};e.exports=i},function(e,t,s){"use strict";var o=s(10),r=(o.addons.classSet,o.createClass({displayName:"CheckBoxEditor",PropTypes:{value:o.PropTypes.bool.isRequired},render:function(){return o.createElement("input",{className:"react-grid-CheckBox",type:"checkbox",checked:this.props.value,onChange:this.handleChange})},handleChange:function(e){this.props.column.onRowSelect(this.props.rowIdx)},shouldComponentUpdate:function(e,t){return this.props.value!=e.value}}));e.exports=r},function(e,t,s){"use strict";var o=s(41),r=s(24),i=s(10);Object.assign||(Object.assign=s(38));var n=o({DEFINE_LIFE_CYCLE_METHOD:null,DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),l={getDefaultProps:n.DEFINE_LIFE_CYCLE_METHOD,propTypes:n.DEFINE_LIFE_CYCLE_METHOD,getInitialState:n.DEFINE_LIFE_CYCLE_METHOD,statics:n.DEFINE_LIFE_CYCLE_METHOD,displayName:n.DEFINE_LIFE_CYCLE_METHOD,componentWillMount:n.DEFINE_LIFE_CYCLE_METHOD,componentWillReceiveProps:n.DEFINE_LIFE_CYCLE_METHOD,shouldComponentUpdate:n.DEFINE_LIFE_CYCLE_METHOD,componentWillUpdate:n.DEFINE_LIFE_CYCLE_METHOD,componentDidUpdate:n.DEFINE_LIFE_CYCLE_METHOD,componentWillUnmount:n.DEFINE_LIFE_CYCLE_METHOD},a={},p=function(e,t){this.base=e,this.dependsOn=t},c=function(e){this.assignTo=function(t){return new p(t,e)}},h=function(e,t){Object.keys(e).forEach(function(s){if(f.isCustomProperty(s))r(e[s])&&(e[s]=f.wrapCustomMethod(s,e[s]));else{switch(l[s]){case n.DEFINE_LIFE_CYCLE_METHOD:var o={};o[s]=e[s],t.push(o);break;case n.DEFINE_MANY_MERGED:}delete e[s]}},this)},u={mix:function(e){var t=[],s={},o=f.getUniqueDependencies(e);for(var r in o)Object.assign(s,a[o[r]]);return h(s,t),e.forEach(function(e){var o={};e instanceof p?Object.assign(o,e.base):Object.assign(o,e),h(o,t),Object.assign(s,o)},this),t.push(s),t},createDependency:function(e){var t=[];for(var s in e)e[s]instanceof p?this.addAlias(s,e[s].base):this.addAlias(s,e[s]),t.push(s);var o=t.filter(function(e,t,s){return s.indexOf(e)===t});return new c(o)},addAlias:function(e,t){a[e]=t}},d=i.createClass;i.createClass=function(e){return e.mixins&&(e.mixins=u.mix(e.mixins)),d.apply(i,arguments)};var f={isCustomProperty:function(e){return!l[e]},wrapCustomMethod:function(e,t){return function(){return f.isMethodOverridden.call(this,e)?f.callOverriddenMethod.call(this,e,arguments):t.apply(this,arguments)}},checkMethodExtendedAndCall:function(e,t){return this.extended&&"function"==typeof this.extended[e]?this.extended[e].call(this,t):void 0},checkMethodImplementedAndCall:function(e,t){return this.implemented&&"function"==typeof this.implemented[e]?this.implemented[e].call(this,t):void 0},isMethodOverridden:function(e){return this.overrides&&"function"==typeof this.overrides[e]},callOverriddenMethod:function(e,t){return this.overrides[e].call(this,t)},getUniqueDependencies:function(e){var t=[];return e.forEach(function(e){e instanceof p&&(t=t.concat(e.dependsOn))},this),t.filter(function(e,t,s){return s.indexOf(e)===t})}};e.exports=u},function(e,t,s){"use strict";var o=function(e){var t={};return e&&"[object Function]"===t.toString.call(e)};e.exports=o},function(e,t,s){"use strict";var o=s(10),r=(o.addons.classSet,s(23)),i=s(5),n=s(6),l=s(42),a=s(9),p=o.PropTypes.shape({id:o.PropTypes.required,title:o.PropTypes.string}),c=o.createClass({displayName:"AutoCompleteEditor",propTypes:{options:o.PropTypes.arrayOf(p)},mixins:r.mix([a,i,n]),overrides:{checkFocus:function(){this.setTextInputFocus()},getInputNode:function(){return this.getSearchComponent().getDOMNode()},onPressEnter:function(e){var t=e[0];this.handleEnter(t)},onPressTab:function(e){var t=e[0];this.handleTab(t)}},handleTab:function(e){e.stopPropagation(),e.preventDefault(),this.isFocusedOnSuggestion()?this.handleChange(this.getFocusedSuggestion(),"Tab"):this.handleChange(null,"Tab")},handleEnter:function(e){e.stopPropagation(),e.preventDefault(),this.isFocusedOnSuggestion()||this.props.onCommit({value:this.refs.autoComplete.state.searchTerm,key:"Enter"})},getSearchComponent:function(){return this.refs.autoComplete.refs.search},isFocusedOnSuggestion:function(){var e=this.refs.autoComplete;return null!=e.state.focusedValue},getFocusedSuggestion:function(){return this.refs.autoComplete.state.focusedValue},onPressArrowDown:function(e){e.stopPropagation(),e.preventDefault()},onPressArrowUp:function(e){e.stopPropagation()},getLabel:function(e){var t=null!=this.props.label?this.props.label:"title";return"function"==typeof t?t(e):"string"==typeof t?e[t]:void 0},handleChange:function(e,t){var s={},o=this.props.value;null!=e&&(o=this.getLabel(e),this.props.valueParams&&(o=this.constuctValueFromParams(e,this.props.valueParams)),s[this.props.column.key]=o),t=t?t:"Enter",this.props.onCommit({value:o,key:t,updated:s})},constuctValueFromParams:function(e,t){for(var s=[],o=0,r=t.length;r>o;o++)s.push(e[t[o]]);return s.join("|")},renderEditorNode:function(){var e={title:this.getDefaultValue()},t=null!=this.props.label?this.props.label:"title";return o.createElement("div",{style:this.getStyle(),onKeyDown:this.onKeyDown},o.createElement(l,{search:this.props.search,ref:"autoComplete",label:t,resultIdentifier:this.props.resultIdentifier,options:this.props.options,value:e,onChange:this.handleChange}))}});e.exports=c},function(e,t,s){"use strict";var o=s(10),r=(o.addons.classSet,s(23),s(9)),i=s(5),n=(o.addons.cloneWithProps,o.createClass({displayName:"DropDownEditor",mixins:[r,i],overrides:{getInputNode:function(){return this.refs.select.getDOMNode()}},propTypes:{options:o.PropTypes.array.isRequired},renderEditorNode:function(){return o.createElement("select",{ref:"select",style:this.getStyle(),defaultValue:this.props.value,onChange:this.onChange},this.renderOptions())},renderOptions:function(){var e=[];return this.props.options.forEach(function(t){e.push(o.createElement("option",{key:t,value:t},t))},this),e},onChange:function(e){this.commit({key:"Enter"})},onClick:function(e){e.stopPropagation(),e.preventDefault()}}));e.exports=n},function(e,t,s){"use strict";var o=s(10),r=(o.addons.classSet,s(23),s(5)),i=s(6),n=s(9),l=o.createClass({displayName:"SimpleTextEditor",mixins:[n,r,i],overrides:{checkFocus:function(){this.setTextInputFocus()}},renderEditorNode:function(){return o.createElement("input",{type:"text",onBlur:this.commit,className:"form-control",defaultValue:this.getDefaultValue(),style:this.getStyle(),onKeyDown:this.onKeyDown})}});e.exports=l},function(e,t,s){"use strict";function o(e){var t={};for(var s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);return t}e.exports=o},function(e,t,s){"use strict";var o=s(10),r=s(39),i=s(28),n=s(40),l={metricsComputator:o.PropTypes.object},a={childContextTypes:l,getChildContext:function(){return{metricsComputator:this}},getMetricImpl:function(e){return this._DOMMetrics.metrics[e].value},registerMetricsImpl:function(e,t){var s={},o=this._DOMMetrics;for(var r in t)n(void 0===o.metrics[r],"DOM metric "+r+" is already defined"),o.metrics[r]={component:e,computator:t[r].bind(e)},s[r]=this.getMetricImpl.bind(null,r);return-1===o.components.indexOf(e)&&o.components.push(e),s},unregisterMetricsFor:function(e){var t=this._DOMMetrics,s=t.components.indexOf(e);if(s>-1){t.components.splice(s,1);var o,r={};for(o in t.metrics)t.metrics[o].component===e&&(r[o]=!0);for(o in r)delete t.metrics[o]}},updateMetrics:function(){var e=this._DOMMetrics,t=!1;for(var s in e.metrics){var o=e.metrics[s].computator();o!==e.metrics[s].value&&(t=!0),e.metrics[s].value=o}if(t)for(var r=0,i=e.components.length;i>r;r++)e.components[r].metricsUpdated&&e.components[r].metricsUpdated(); + +},componentWillMount:function(){this._DOMMetrics={metrics:{},components:[]}},componentDidMount:function(){window.addEventListener?window.addEventListener("resize",this.updateMetrics):window.attachEvent("resize",this.updateMetrics),this.updateMetrics()},componentWillUnmount:function(){window.removeEventListener("resize",this.updateMetrics)}},p={contextTypes:l,componentWillMount:function(){if(this.DOMMetrics){this._DOMMetricsDefs=i(this.DOMMetrics),this.DOMMetrics={};for(var e in this._DOMMetricsDefs)this.DOMMetrics[e]=r}},componentDidMount:function(){this.DOMMetrics&&(this.DOMMetrics=this.registerMetrics(this._DOMMetricsDefs))},componentWillUnmount:function(){return this.registerMetricsImpl?void(this.hasOwnProperty("DOMMetrics")&&delete this.DOMMetrics):this.context.metricsComputator.unregisterMetricsFor(this)},registerMetrics:function(e){return this.registerMetricsImpl?this.registerMetricsImpl(this,e):this.context.metricsComputator.registerMetricsImpl(this,e)},getMetric:function(e){return this.getMetricImpl?this.getMetricImpl(e):this.context.metricsComputator.getMetricImpl(e)}};e.exports={MetricsComputatorMixin:a,MetricsMixin:p}},function(e,t,s){"use strict";var o=s(10),r=o.addons.classSet,i=s(28),n=s(11),l=s(43),n=s(11),a=o.createClass({displayName:"Header",propTypes:{columns:o.PropTypes.object.isRequired,totalWidth:o.PropTypes.number,height:o.PropTypes.number.isRequired,headerRows:o.PropTypes.array.isRequired},render:function(){var e=(this.state.resizing||this.props,r({"react-grid-Header":!0,"react-grid-Header--resizing":!!this.state.resizing})),t=this.getHeaderRows();return o.createElement("div",o.__spread({},this.props,{style:this.getStyle(),className:e}),t)},shouldComponentUpdate:function(e,t){return!n.sameColumns(this.props.columns.columns,e.columns.columns,n.sameColumn)||this.props.totalWidth!=e.totalWidth||this.props.headerRows.length!=e.headerRows.length||this.state.resizing!=t.resizing},getHeaderRows:function(){var e=this.state.resizing||this.props,t=[];return this.props.headerRows.forEach(function(s,r){var i={position:"absolute",top:this.props.height*r,left:0,width:this.props.totalWidth};t.push(o.createElement(l,{key:s.ref,ref:s.ref,style:i,onColumnResize:this.onColumnResize,onColumnResizeEnd:this.onColumnResizeEnd,width:e.columns.width,height:s.height||this.props.height,columns:e.columns.columns,resizing:e.column,headerCellRenderer:s.headerCellRenderer}))}.bind(this)),t},getInitialState:function(){return{resizing:null}},componentWillReceiveProps:function(){this.setState({resizing:null})},onColumnResize:function(e,t){var s=this.state.resizing||this.props,o=this.getColumnPosition(e);if(null!==o){var r={columns:i(s.columns)};r.columns=n.resizeColumn(r.columns,o,t),r.columns.width<s.columns.width&&(r.columns.width=s.columns.width),r.column=r.columns.columns[o],this.setState({resizing:r})}},getColumnPosition:function(e){var t=this.state.resizing||this.props,s=t.columns.columns.indexOf(e);return-1===s?null:s},onColumnResizeEnd:function(e,t){var s=this.getColumnPosition(e);null!==s&&this.props.onColumnResize&&this.props.onColumnResize(s,t||e.width)},setScrollLeft:function(e){var t=this.refs.row.getDOMNode();t.scrollLeft=e,this.refs.row.setScrollLeft(e)},getStyle:function(){return{position:"relative",height:this.props.height}}});e.exports=a},function(e,t,s){"use strict";var o=s(10),r=s(44),i=s(29),n=s(45),l=Math.min,a=Math.max,p=Math.floor,c=Math.ceil,h={mixins:[i.MetricsMixin],DOMMetrics:{viewportHeight:function(){return this.getDOMNode().offsetHeight}},propTypes:{rowHeight:o.PropTypes.number,length:o.PropTypes.number.isRequired},getDefaultProps:function(){return{rowHeight:30}},getInitialState:function(){return this.getGridState(this.props)},getGridState:function(e){var t=this.state&&this.state.height?this.state.height:r().height,s=c(t/e.rowHeight);return{displayStart:0,displayEnd:2*s,height:t,scrollTop:0,scrollLeft:0}},updateScroll:function(e,t,s,o,r){var i=c(s/o),n=p(e/o),h=l(n+i,r),u=a(0,n-2*i),d=l(n+2*i,r),f={visibleStart:n,visibleEnd:h,displayStart:u,displayEnd:d,height:s,scrollTop:e,scrollLeft:t};this.setState(f)},metricsUpdated:function(){var e=this.DOMMetrics.viewportHeight();e&&this.updateScroll(this.state.scrollTop,this.state.scrollLeft,e,this.props.rowHeight,this.props.length)},componentWillReceiveProps:function(e){this.props.rowHeight!==e.rowHeight?this.setState(this.getGridState(e)):this.props.length!==e.length&&this.updateScroll(this.state.scrollTop,this.state.scrollLeft,this.state.height,e.rowHeight,e.length)}},u=o.createClass({displayName:"Viewport",mixins:[h],render:function(){var e={padding:0,bottom:0,left:0,right:0,position:"absolute",top:this.props.rowOffsetHeight};return o.createElement("div",{className:"react-grid-Viewport",style:e},o.createElement(n,{ref:"canvas",totalWidth:this.props.totalWidth,width:this.props.columns.width,rows:this.props.rows,selectedRows:this.props.selectedRows,expandedRows:this.props.expandedRows,columns:this.props.columns.columns,cellRenderer:this.props.cellRenderer,rowRenderer:this.props.rowRenderer,visibleStart:this.state.visibleStart,visibleEnd:this.state.visibleEnd,displayStart:this.state.displayStart,displayEnd:this.state.displayEnd,length:this.props.length,height:this.state.height,rowHeight:this.props.rowHeight,onScroll:this.onScroll,onRows:this.props.onRows}))},getScroll:function(){return this.refs.canvas.getScroll()},onScroll:function(e){var t=e.scrollTop,s=e.scrollLeft;this.updateScroll(t,s,this.state.height,this.props.rowHeight,this.props.length),this.props.onScroll&&this.props.onScroll({scrollTop:t,scrollLeft:s})},setScrollLeft:function(e){this.refs.canvas.setScrollLeft(e)}});e.exports=u},function(e,t,s){"use strict";var o=s(10),r=(o.addons.classSet,o.addons.cloneWithProps,s(9)),i=s(23),n=i.createDependency({KeyboardHandlerMixin:r}).assignTo({getDefaultProps:function(){return{tabIndex:-1,ref:"cell"}},isSelected:function(){return this.props.selected&&this.props.selected.rowIdx===this.props.rowIdx&&this.props.selected.idx===this.props.idx},onClick:function(){var e=this.props.rowIdx,t=this.props.idx;this.props.onClick({rowIdx:e,idx:t})},onPressArrowUp:function(e){this.moveSelectedCell(e,-1,0)},onPressArrowDown:function(e){this.moveSelectedCell(e,1,0)},onPressArrowLeft:function(e){this.moveSelectedCell(e,0,-1)},onPressArrowRight:function(e){this.moveSelectedCell(e,0,1)},onPressTab:function(e){this.moveSelectedCell(e,0,1)},moveSelectedCell:function(e,t,s){e.stopPropagation(),e.preventDefault();var o=this.props.rowIdx+t,r=this.props.idx+s;this.props.onSelect({idx:r,rowIdx:o})},setScrollLeft:function(e){this.refs.row.setScrollLeft(e)},componentDidMount:function(){this.checkFocus()},componentDidUpdate:function(){this.checkFocus()},isCellSelectionChanging:function(e){return this.props.selected&&e.selected?this.props.idx===e.selected.idx||this.props.idx===this.props.selected.idx:!0},checkFocus:function(){this.isSelected()&&this.getDOMNode().focus()}});e.exports=n},function(e,t,s){"use strict";var o=s(10),r=(o.addons.classSet,o.addons.cloneWithProps),i=s(27),n=o.PropTypes,l=s(23),a=s(32),p=s(9),c=l.createDependency({KeyboardHandlerMixin:p,SelectableMixin:a}).assignTo({propTypes:{onCommit:n.func.isRequired},canEdit:function(){return null!=this.props.column.editor||this.props.column.editable},getEditor:function(){var e={height:this.props.height,onPressEscape:this.onPressEscape,onCommit:this.onCommit,initialKeyCode:this.props.selected.initialKeyCode,editorRowMetaData:this.getEditorRowMetaData()},t=this.props.column.editor;return t&&o.isValidElement(t)?r(t,e):r(i(),e)},getEditorRowMetaData:function(){this.props.column.ItemId;return"function"==typeof this.props.column.getEditorRowMetaData?this.props.column.getEditorRowMetaData(this.props.rowData):void 0},getFormatter:function(){this.props.column;return this.isActive()?this.getEditor():this.props.column.formatter},onCommit:function(e){var t=this.props.rowIdx,s=(this.props.idx,this.props.column.key);this.props.onCommit({cellKey:s,rowIdx:this.props.filterRowIdx||t,updated:e.updated,keyCode:e.key})},checkFocus:function(){this.isSelected()&&!this.isActive()&&this.getDOMNode().focus()},onClick:function(){if(!this.isActive()){var e=this.props.rowIdx,t=this.props.idx;this.props.onClick({rowIdx:e,idx:t})}},onDoubleClick:function(){var e=this.props.rowIdx,t=this.props.idx;this.props.onClick({rowIdx:e,idx:t,active:this.canEdit()})},setActive:function(e){var t=this.props.rowIdx,s=this.props.idx;"select-row"===this.props.column.key&&this.props.column.onRowSelect?this.props.column.onRowSelect(t):this.canEdit()&&!this.isActive()&&this.props.onSetActive({idx:s,rowIdx:t,active:!0,initialKeyCode:e})},setInactive:function(){if(this.canEdit()&&this.isActive()){var e=this.props.rowIdx,t=this.props.idx;this.props.onSetActive({idx:t,rowIdx:e,active:!1})}},isActive:function(){return this.isSelected()&&this.props.selected.active===!0},onPressEnter:function(e){this.setActive(e.key)},onPressDelete:function(e){this.setActive(e.key)},onPressEscape:function(e){this.setInactive(e.key)},onPressBackspace:function(e){this.setActive(e.key)},onPressChar:function(e){this.isKeyPrintable(e.keyCode)&&this.setActive(e.keyCode)}});e.exports=c},function(e,t,s){"use strict";var o=s(10),r=o.addons.classSet,i=(o.addons.cloneWithProps,o.PropTypes,s(27),s(23)),n=s(32),l=s(9),a=i.createDependency({KeyboardHandlerMixin:l,SelectableMixin:n}).assignTo({getCellClass:function(){return r({selected:this.isSelected()&&!this.isCopied(),copied:this.isCopied()})},KeyCode_c:"99",KeyCode_C:"67",KeyCode_V:"86",KeyCode_v:"118",propTypes:{handleCopy:o.PropTypes.func.isRequired,handlePaste:o.PropTypes.func.isRequired},isCopied:function(){return this.props.copied&&this.props.copied.rowIdx===this.props.rowIdx&&this.props.copied.idx===this.props.idx},onPressKeyWithCtrl:function(e){this.canEdit()&&(e.keyCode==this.KeyCode_c||e.keyCode==this.KeyCode_C?this.props.handleCopy({value:this.props.value}):(e.keyCode==this.KeyCode_v||e.keyCode==this.KeyCode_V)&&this.props.handlePaste({value:this.props.value}))}});e.exports=a},function(e,t,s){"use strict";var o=s(10),r=o.addons.classSet,i=(o.addons.cloneWithProps,o.PropTypes,s(23)),n=s(32),l=s(9),a=i.createDependency({KeyboardHandlerMixin:l,SelectableMixin:n}).assignTo({getCellClass:function(){return r({"selected-draggable":this.isSelected(),"active-drag-cell":this.isSelected()||this.isDraggedOver(),"is-dragged-over-up":!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx<this.props.dragged.rowIdx,"is-dragged-over-down":!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx>this.props.dragged.rowIdx,"was-dragged-over":this.wasDraggedOver()})},getDefaultProps:function(){return{handleDragStart:this.handleDragStart,onDragEnter:this.handleDragEnter,onDragEnd:this.handleDragEnd}},propTypes:{handleDragEnter:o.PropTypes.func.isRequired,handleDragStart:o.PropTypes.func.isRequired,handleDragEnd:o.PropTypes.func.isRequired,handleTerminateDrag:o.PropTypes.func.isRequired},isDraggedOver:function(){return this.props.dragged&&this.props.dragged.overRowIdx===this.props.rowIdx&&this.props.dragged.idx===this.props.idx},wasDraggedOver:function(){return this.props.dragged&&(this.props.dragged.overRowIdx<this.props.rowIdx&&this.props.rowIdx<this.props.dragged.rowIdx||this.props.dragged.overRowIdx>this.props.rowIdx&&this.props.rowIdx>this.props.dragged.rowIdx)&&this.props.dragged.idx===this.props.idx},handleDragStart:function(e){var t=this.props.rowIdx,s=this.props.idx;this.props.handleDragStart({rowIdx:t,idx:s,copiedText:this.props.value})},handleDragEnter:function(){this.props.handleDragEnter(this.props.rowIdx)},handleDragEnd:function(){this.props.handleDragEnd()},isDraggedCellChanging:function(e){return this.props.dragged?e.dragged&&this.props.idx===e.dragged.idx||this.props.dragged&&this.props.idx===this.props.dragged.idx:!1},componentDidUpdate:function(){var e=this.props.dragged;e&&e.complete===!0&&this.props.handleTerminateDrag()}});e.exports=a},function(e,t,s){"use strict";var o=s(10),r=o.addons.classSet,i=o.createClass({displayName:"SortableHeaderCell",onClick:function(){this.props.column.sortBy(this.props.column,this.props.column.sorted)},getSortByClass:function(){var e=this.props.column.sorted;return r({"pull-right":!0,"glyphicon glyphicon-arrow-up":"ASC"===e,"glyphicon glyphicon-arrow-down":"DESC"===e})},render:function(){return o.createElement("div",{onClick:this.onClick,style:{cursor:"pointer"}},this.props.column.name,o.createElement("span",{className:this.getSortByClass()}))}});e.exports=i},function(e,t,s){"use strict";var o=s(10),r=(o.addons.classSet,o.createClass({displayName:"FilterableHeaderCell",getInitialState:function(){return{filterTerm:""}},handleChange:function(e){e.preventDefault(),e.stopPropagation(),this.setState({filterTerm:e.currentTarget.value}),this.props.onChange({filterTerm:e.currentTarget.value,columnKey:this.props.column.key})},componentDidUpdate:function(){this.getDOMNode().focus()},render:function(){return o.createElement("div",null,o.createElement("div",{className:"form-group"},o.createElement(this.renderInput,null)))},renderInput:function(){return this.props.column.filterable===!1?o.createElement("span",null):o.createElement("input",{type:"text",className:"form-control input-sm",placeholder:"Search",value:this.state.filterTerm,onChange:this.handleChange})}}));e.exports=r},function(e,t,s){"use strict";function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=Object.assign||function(e,t){for(var s,r,i=o(e),n=1;n<arguments.length;n++){s=arguments[n],r=Object.keys(Object(s));for(var l=0;l<r.length;l++)i[r[l]]=s[r[l]]}return i}},function(e,t,s){"use strict";function o(e){return function(){return e}}function r(){}var i=s(46);i(r,{thatReturns:o,thatReturnsFalse:o(!1),thatReturnsTrue:o(!0),thatReturnsNull:o(null),thatReturnsThis:function(){return this},thatReturnsArgument:function(e){return e}}),e.exports=r},function(e,t,s){(function(t){"use strict";var s=function(e,s,o,r,i,n,l,a){if(t.env.NODE_ENV&&void 0===s)throw new Error("invariant requires an error message argument");if(!e){var p;if(void 0===s)p=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[o,r,i,n,l,a],h=0;p=new Error("Invariant Violation: "+s.replace(/%s/g,function(){return c[h++]}))}throw p.framesToPop=1,p}};e.exports=s}).call(t,s(52))},function(e,t,s){(function(t){"use strict";var o=s(51),r=function(e){var s,r={};"production"!==t.env.NODE_ENV?o(e instanceof Object&&!Array.isArray(e),"keyMirror(...): Argument must be an object."):o(e instanceof Object&&!Array.isArray(e));for(s in e)e.hasOwnProperty(s)&&(r[s]=s);return r};e.exports=r}).call(t,s(52))},function(e,t,s){!function(t,o){e.exports=o(s(10))}(this,function(e){return function(e){function t(o){if(s[o])return s[o].exports;var r=s[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var s={};return t.m=e,t.c=s,t.p="",t(0)}([function(e,t,s){"use strict";function o(e,t,s){if(!e)return s(null,[]);t=new RegExp(t,"i");for(var o=[],r=0,i=e.length;i>r;r++)t.exec(e[r].title)&&o.push(e[r]);s(null,o)}var r=s(1),i=r.addons.classSet,n=r.createClass({displayName:"Autocomplete",propTypes:{options:r.PropTypes.any,search:r.PropTypes.func,resultRenderer:r.PropTypes.oneOfType([r.PropTypes.component,r.PropTypes.func]),value:r.PropTypes.object,onChange:r.PropTypes.func,onError:r.PropTypes.func},getDefaultProps:function(){return{search:o}},getInitialState:function(){var e=this.props.searchTerm?this.props.searchTerm:this.props.value?this.props.value.title:"";return{results:[],showResults:!1,showResultsInProgress:!1,searchTerm:e,focusedValue:null}},getResultIdentifier:function(e){return void 0===this.props.resultIdentifier?e.id:e[this.props.resultIdentifier]},render:function(){var e=i(this.props.className,"react-autocomplete-Autocomplete",this.state.showResults?"react-autocomplete-Autocomplete--resultsShown":void 0),t={position:"relative",outline:"none"};return r.createElement("div",{tabIndex:"1",className:e,onFocus:this.onFocus,onBlur:this.onBlur,style:t},r.createElement("input",{ref:"search",className:"react-autocomplete-Autocomplete__search",style:{width:"100%"},onClick:this.showAllResults,onChange:this.onQueryChange,onFocus:this.showAllResults,onBlur:this.onQueryBlur,onKeyDown:this.onQueryKeyDown,value:this.state.searchTerm}),r.createElement(l,{className:"react-autocomplete-Autocomplete__results",onSelect:this.onValueChange,onFocus:this.onValueFocus,results:this.state.results,focusedValue:this.state.focusedValue,show:this.state.showResults,renderer:this.props.resultRenderer,label:this.props.label,resultIdentifier:this.props.resultIdentifier}))},componentWillReceiveProps:function(e){var t=e.searchTerm?e.searchTerm:e.value?e.value.title:"";this.setState({searchTerm:t})},componentWillMount:function(){this.blurTimer=null},showResults:function(e){this.setState({showResultsInProgress:!0}),this.props.search(this.props.options,e.trim(),this.onSearchComplete)},showAllResults:function(){this.state.showResultsInProgress||this.state.showResults||this.showResults("")},onValueChange:function(e){var t={value:e,showResults:!1};e&&(t.searchTerm=e.title),this.setState(t),this.props.onChange&&this.props.onChange(e)},onSearchComplete:function(e,t){if(e){if(!this.props.onError)throw e;this.props.onError(e)}this.setState({showResultsInProgress:!1,showResults:!0,results:t})},onValueFocus:function(e){this.setState({focusedValue:e})},onQueryChange:function(e){var t=e.target.value;this.setState({searchTerm:t,focusedValue:null}),this.showResults(t)},onFocus:function(){this.blurTimer&&(clearTimeout(this.blurTimer),this.blurTimer=null),this.refs.search.getDOMNode().focus()},onBlur:function(){this.blurTimer=setTimeout(function(){this.isMounted()&&this.setState({showResults:!1})}.bind(this),100)},onQueryKeyDown:function(e){if("Enter"===e.key)e.preventDefault(),this.state.focusedValue&&this.onValueChange(this.state.focusedValue);else if("ArrowUp"===e.key&&this.state.showResults){e.preventDefault();var t=Math.max(this.focusedValueIndex()-1,0);this.setState({focusedValue:this.state.results[t]})}else if("ArrowDown"===e.key)if(e.preventDefault(),this.state.showResults){var s=Math.min(this.focusedValueIndex()+(this.state.showResults?1:0),this.state.results.length-1);this.setState({showResults:!0,focusedValue:this.state.results[s]})}else this.showAllResults()},focusedValueIndex:function(){if(!this.state.focusedValue)return-1;for(var e=0,t=this.state.results.length;t>e;e++)if(this.getResultIdentifier(this.state.results[e])===this.getResultIdentifier(this.state.focusedValue))return e;return-1}}),l=r.createClass({displayName:"Results",getResultIdentifier:function(e){if(void 0===this.props.resultIdentifier){if(!e.id)throw"id property not found on result. You must specify a resultIdentifier and pass as props to autocomplete component";return e.id}return e[this.props.resultIdentifier]},render:function(){var e={display:this.props.show?"block":"none",position:"absolute",listStyleType:"none"},t=this.props,s=t.className,o=function(e,t){var s={},o=Object.prototype.hasOwnProperty;if(null==e)throw new TypeError;for(var r in e)o.call(e,r)&&!o.call(t,r)&&(s[r]=e[r]);return s}(t,{className:1});return r.createElement("ul",r.__spread({},o,{style:e,className:s+" react-autocomplete-Results"}),this.props.results.map(this.renderResult))},renderResult:function(e){var t=this.props.focusedValue&&this.getResultIdentifier(this.props.focusedValue)===this.getResultIdentifier(e),s=this.props.renderer||a;return s({ref:t?"focused":void 0,key:this.getResultIdentifier(e),result:e,focused:t,onMouseEnter:this.onMouseEnterResult,onClick:this.props.onSelect,label:this.props.label})},componentDidUpdate:function(){this.scrollToFocused()},componentDidMount:function(){this.scrollToFocused()},componentWillMount:function(){this.ignoreFocus=!1},scrollToFocused:function(){var e=this.refs&&this.refs.focused;if(e){var t=this.getDOMNode(),s=t.scrollTop,o=t.offsetHeight,r=e.getDOMNode(),i=r.offsetTop,n=i+r.offsetHeight;s>i?(this.ignoreFocus=!0,t.scrollTop=i):n-s>o&&(this.ignoreFocus=!0,t.scrollTop=n-o)}},onMouseEnterResult:function(e,t){if(this.ignoreFocus)this.ignoreFocus=!1;else{var s=this.getDOMNode(),o=s.scrollTop,r=s.offsetHeight,i=e.target,n=i.offsetTop,l=n+i.offsetHeight;l>o&&o+r>n&&this.props.onFocus(t)}}}),a=r.createClass({displayName:"Result",getDefaultProps:function(){return{label:function(e){return e.title}}},getLabel:function(e){return"function"==typeof this.props.label?this.props.label(e):"string"==typeof this.props.label?e[this.props.label]:void 0},render:function(){var e=i({"react-autocomplete-Result":!0,"react-autocomplete-Result--active":this.props.focused});return r.createElement("li",{style:{listStyleType:"none"},className:e,onClick:this.onClick,onMouseEnter:this.onMouseEnter},r.createElement("a",null,this.getLabel(this.props.result)))},onClick:function(){this.props.onClick(this.props.result)},onMouseEnter:function(e){this.props.onMouseEnter&&this.props.onMouseEnter(e,this.props.result)},shouldComponentUpdate:function(e){return e.result.id!==this.props.result.id||e.focused!==this.props.focused}});e.exports=n},function(t,s,o){t.exports=e}])})},function(e,t,s){"use strict";var o=s(10),r=o.PropTypes,i=s(47),n=s(48),l=s(49),a=o.createClass({displayName:"HeaderRow",propTypes:{width:r.number,height:r.number.isRequired,columns:r.array.isRequired,onColumnResize:r.func},render:function(){var e={width:this.props.width?this.props.width+l():"100%",height:this.props.height,whiteSpace:"nowrap",overflowX:"hidden",overflowY:"hidden"},t=this.getCells();return o.createElement("div",o.__spread({},this.props,{className:"react-grid-HeaderRow"}),o.createElement("div",{style:e},t))},getCells:function(){for(var e=[],t=[],s=0,r=this.props.columns.length;r>s;s++){var i=this.props.columns[s],l=o.createElement(n,{ref:s,key:s,height:this.props.height,column:i,renderer:this.props.headerCellRenderer||i.headerRenderer||this.props.cellRenderer,resizing:this.props.resizing===i,onResize:this.props.onColumnResize,onResizeEnd:this.props.onColumnResizeEnd});i.locked?t.push(l):e.push(l)}return e.concat(t)},setScrollLeft:function(e){for(var t=0,s=this.props.columns.length;s>t;t++)this.props.columns[t].locked&&this.refs[t].setScrollLeft(e)},shouldComponentUpdate:function(e){return e.width!==this.props.width||e.height!==this.props.height||e.columns!==this.props.columns||!i(e.style,this.props.style)},getStyle:function(){return{overflow:"hidden",width:"100%",height:this.props.height,position:"absolute"}}});e.exports=a},function(e,t,s){"use strict";function o(){var e=window.innerWidth,t=window.innerHeight;return e&&t||(e=document.documentElement.clientWidth,t=document.documentElement.clientHeight),e&&t||(e=document.body.clientWidth,t=document.body.clientHeight),{width:e,height:t}}e.exports=o},function(e,t,s){"use strict";var o=s(10),r=o.addons.classSet,i=o.PropTypes,n=o.addons.cloneWithProps,l=s(47),a=s(39),p=s(50),c=s(2),h=o.createClass({displayName:"Canvas",mixins:[p],propTypes:{cellRenderer:i.element,rowRenderer:i.oneOfType([i.func,i.element]),rowHeight:i.number.isRequired,displayStart:i.number.isRequired,displayEnd:i.number.isRequired,length:i.number.isRequired,rows:i.oneOfType([i.func.isRequired,i.array.isRequired]),onRows:i.func},render:function(){var e=this.state.displayStart,t=this.state.displayEnd,s=this.props.rowHeight,i=this.props.length,n=this.getRows(e,t).map(function(t,o){return this.renderRow({key:e+o,ref:o,idx:e+o,row:t,height:s,columns:this.props.columns,cellRenderer:this.props.cellRenderer,isSelected:this.isRowSelected(e+o),expandedRows:this.props.expandedRows})}.bind(this));this._currentRowsLength=n.length,e>0&&n.unshift(this.renderPlaceholder("top",e*s)),i-t>0&&n.push(this.renderPlaceholder("bottom",(i-t)*s));var l={position:"absolute",top:0,left:0,width:this.props.totalWidth,height:this.props.height,transform:"translate3d(0, 0, 0)"};return o.createElement("div",{style:l,onScroll:this.onScroll,className:r("react-grid-Canvas",this.props.className)},o.createElement("div",{style:{width:this.props.width,overflow:"hidden"}},n))},renderRow:function(e){return o.isValidElement(this.props.rowRenderer)?n(this.props.rowRenderer,e):this.props.rowRenderer(e)},renderPlaceholder:function(e,t){return o.createElement("div",{key:e,style:{height:t}},this.props.columns.map(function(e,t){return o.createElement("div",{style:{width:e.width},key:t})}))},getDefaultProps:function(){return{rowRenderer:o.createElement(c,null),onRows:a}},isRowSelected:function(e){return this.props.selectedRows&&this.props.selectedRows[e]===!0},getInitialState:function(){return{shouldUpdate:!0,displayStart:this.props.displayStart,displayEnd:this.props.displayEnd}},componentWillMount:function(){this._currentRowsLength=void 0,this._currentRowsRange=void 0,this._scroll=void 0},componentDidMount:function(){this.onRows()},componentDidUpdate:function(){void 0!==this._scroll&&this.setScrollLeft(this._scroll),this.onRows()},componentWillUnmount:function(){this._currentRowsLength=void 0,this._currentRowsRange=void 0,this._scroll=void 0},componentWillReceiveProps:function(e){var t=!(e.visibleStart>this.state.displayStart&&e.visibleEnd<this.state.displayEnd&&e.length===this.props.length&&e.rowHeight===this.props.rowHeight&&e.columns===this.props.columns&&e.width===this.props.width&&l(e.style,this.props.style));this.setState(t?{shouldUpdate:!0,displayStart:e.displayStart,displayEnd:e.displayEnd}:{shouldUpdate:!1})},shouldComponentUpdate:function(e,t){return t.shouldUpdate},onRows:function(){void 0!==this._currentRowsRange&&(this.props.onRows(this._currentRowsRange),this._currentRowsRange=void 0)},getRows:function(e,t){return this._currentRowsRange={start:e,end:t},Array.isArray(this.props.rows)?this.props.rows.slice(e,t):this.props.rows(e,t)},setScrollLeft:function(e){if(void 0!==this._currentRowsLength)for(var t=0,s=this._currentRowsLength;s>t;t++)this.refs[t]&&this.refs[t].setScrollLeft(e)},getScroll:function(){var e=this.getDOMNode(),t=e.scrollTop,s=e.scrollLeft;return{scrollTop:t,scrollLeft:s}},onScroll:function(e){this.appendScrollShim();var t=e.target,s=t.scrollTop,o=t.scrollLeft,r={scrollTop:s,scrollLeft:o};this._scroll=r,this.props.onScroll(r)}});e.exports=h},function(e,t,s){(function(t){"use strict";function s(e,s,o,r,i,n,l){if(e=e||{},t.env.NODE_ENV&&l)throw new Error("Too many arguments passed to copyProperties");for(var a,p=[s,o,r,i,n],c=0;p[c];){a=p[c++];for(var h in a)e[h]=a[h];a.hasOwnProperty&&a.hasOwnProperty("toString")&&"undefined"!=typeof a.toString&&e.toString!==a.toString&&(e.toString=a.toString)}return e}e.exports=s}).call(t,s(52))},function(e,t,s){"use strict";function o(e,t){if(e===t)return!0;var s;for(s in e)if(e.hasOwnProperty(s)&&(!t.hasOwnProperty(s)||e[s]!==t[s]))return!1;for(s in t)if(t.hasOwnProperty(s)&&!e.hasOwnProperty(s))return!1;return!0}e.exports=o},function(e,t,s){"use strict";function o(e){return r.createElement("div",{className:"rex-widget-HeaderCell__value",title:e.column.name},e.column.name)}var r=s(10),i=r.addons.classSet,n=s(53),l=r.PropTypes,a=r.createClass({displayName:"ResizeHandle",style:{position:"absolute",top:0,right:0,width:6,height:"100%"},render:function(){return r.createElement(n,r.__spread({},this.props,{className:"react-grid-HeaderCell__resizeHandle",style:this.style}))}}),p=r.createClass({displayName:"HeaderCell",propTypes:{renderer:l.oneOfType([l.func,l.element]).isRequired,column:l.object.isRequired,onResize:l.func},render:function(){var e=i({"react-grid-HeaderCell":!0,"react-grid-HeaderCell--resizing":this.state.resizing,"react-grid-HeaderCell--locked":this.props.column.locked});e=i(e,this.props.className);var t=this.getCell();return r.createElement("div",{className:e,style:this.getStyle()},t,this.props.column.resizeable?r.createElement(a,{onDrag:this.onDrag,onDragStart:this.onDragStart,onDragEnd:this.onDragEnd}):null)},getCell:function(){return r.isValidElement(this.props.renderer)?r.addons.cloneWithProps(this.props.renderer,{column:this.props.column}):this.props.renderer({column:this.props.column})},getDefaultProps:function(){return{renderer:o}},getInitialState:function(){return{resizing:!1}},setScrollLeft:function(e){var t=this.getDOMNode();t.style.webkitTransform="translate3d("+e+"px, 0px, 0px)",t.style.transform="translate3d("+e+"px, 0px, 0px)"},getStyle:function(){return{width:this.props.column.width,left:this.props.column.left,display:"inline-block",position:"absolute",overflow:"hidden",height:this.props.height,margin:0,textOverflow:"ellipsis",whiteSpace:"nowrap"}},onDragStart:function(){this.setState({resizing:!0})},onDrag:function(e){var t=this.getWidthFromMouseEvent(e);t>0&&this.props.onResize&&this.props.onResize(this.props.column,t)},onDragEnd:function(e){var t=this.getWidthFromMouseEvent(e);this.props.onResizeEnd(this.props.column,t),this.setState({resizing:!1})},getWidthFromMouseEvent:function(e){var t=e.pageX,s=this.getDOMNode().getBoundingClientRect().left;return t-s}});e.exports=p},function(e,t,s){"use strict";function o(){if(void 0===r){var e=document.createElement("div");e.style.width="50px",e.style.height="50px",e.style.overflowY="scroll",e.style.position="absolute",e.style.top="-200px",e.style.left="-200px";var t=document.createElement("div");t.style.height="100px",t.style.width="100%",e.appendChild(t),document.body.appendChild(e);var s=e.offsetWidth,o=t.offsetWidth;document.body.removeChild(e),r=s-o}return r}var r;e.exports=o},function(e,t,s){"use strict";var o={appendScrollShim:function(){if(!this._scrollShim){var e=this._scrollShimSize(),t=document.createElement("div");t.classList.add("react-grid-ScrollShim"),t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.width=e.width+"px",t.style.height=e.height+"px",this.getDOMNode().appendChild(t),this._scrollShim=t}this._scheduleRemoveScrollShim()},_scrollShimSize:function(){return{width:this.props.width,height:this.props.length*this.props.rowHeight}},_scheduleRemoveScrollShim:function(){this._scheduleRemoveScrollShimTimer&&clearTimeout(this._scheduleRemoveScrollShimTimer),this._scheduleRemoveScrollShimTimer=setTimeout(this._removeScrollShim,200)},_removeScrollShim:function(){this._scrollShim&&(this._scrollShim.parentNode.removeChild(this._scrollShim),this._scrollShim=void 0)}};e.exports=o},function(e,t,s){(function(t){"use strict";var s=function(e,s,o,r,i,n,l,a){if("production"!==t.env.NODE_ENV&&void 0===s)throw new Error("invariant requires an error message argument");if(!e){var p;if(void 0===s)p=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[o,r,i,n,l,a],h=0;p=new Error("Invariant Violation: "+s.replace(/%s/g,function(){return c[h++]}))}throw p.framesToPop=1,p}};e.exports=s}).call(t,s(52))},function(e,t,s){function o(){if(!l){l=!0;for(var e,t=n.length;t;){e=n,n=[];for(var s=-1;++s<t;)e[s]();t=n.length}l=!1}}function r(){}var i=e.exports={},n=[],l=!1;i.nextTick=function(e){n.push(e),l||setTimeout(o,0)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=r,i.addListener=r,i.once=r,i.off=r,i.removeListener=r,i.removeAllListeners=r,i.emit=r,i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,s){"use strict";var o=s(10),r=o.PropTypes,i=s(39),n=o.createClass({displayName:"Draggable",propTypes:{onDragStart:r.func,onDragEnd:r.func,onDrag:r.func,component:r.oneOfType([r.func,r.constructor])},render:function(){var e=this.props.component;return o.createElement(e,o.__spread({},this.props,{onMouseDown:this.onMouseDown}))},getDefaultProps:function(){return{component:o.DOM.div,onDragStart:i.thatReturnsTrue,onDragEnd:i,onDrag:i}},getInitialState:function(){return{drag:null}},onMouseDown:function(e){var t=this.props.onDragStart(e); + +(null!==t||0===e.button)&&(window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("mousemove",this.onMouseMove),this.setState({drag:t}))},onMouseMove:function(e){null!==this.state.drag&&(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),this.props.onDrag(e))},onMouseUp:function(e){this.cleanUp(),this.props.onDragEnd(e,this.state.drag),this.setState({drag:null})},componentWillUnmount:function(){this.cleanUp()},cleanUp:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove)}});e.exports=n}])}); \ No newline at end of file diff --git a/package.json b/package.json index e840150..90166dc 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "es5-shim": "^4.0.1", "es6-shim": "^0.15.0", "eslint-jsx": "git+https://github.com/andreypopp/eslint#jsx", + "gh-pages": "~0.2.0", "gulp": "^3.8.7", "gulp-changed": "^0.4.1", "gulp-clean": "^0.3.1", @@ -53,7 +54,7 @@ "gulp-util": "^3.0.0", "istanbul-instrumenter-loader": "^0.1.2", "jasmine-react": "^1.0.7", - "jsx-loader": "^0.12.2", + "jsx-loader": "^0.13.1", "karma": "^0.12.28", "karma-chrome-launcher": "^0.1.4", "karma-cli": "0.0.4", @@ -73,8 +74,7 @@ "rewire-webpack": "^1.0.0", "sinon": "^1.9.1", "vinyl-source-stream": "^0.1.1", - "webpack": "^1.5.3", - "gh-pages": "~0.2.0" + "webpack": "^1.5.3" }, "author": "Adazzle", "license": "MIT",