diff --git a/dist/react-bootstrap-table.js b/dist/react-bootstrap-table.js index 81b954190..8ab9c81ad 100644 --- a/dist/react-bootstrap-table.js +++ b/dist/react-bootstrap-table.js @@ -1825,7 +1825,6 @@ return /******/ (function(modules) { // webpackBootstrap afterSaveCell: _propTypes2.default.func, nonEditableRows: _propTypes2.default.func }), -<<<<<<< HEAD insertRow: _propTypes2.default.bool, deleteRow: _propTypes2.default.bool, search: _propTypes2.default.bool, @@ -1880,10 +1879,10 @@ return /******/ (function(modules) { // webpackBootstrap noDataText: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]), withoutNoDataText: _propTypes2.default.bool, handleConfirmDeleteRow: _propTypes2.default.func, - prePage: _propTypes2.default.string, - nextPage: _propTypes2.default.string, - firstPage: _propTypes2.default.string, - lastPage: _propTypes2.default.string, + prePage: _propTypes2.default.any, + nextPage: _propTypes2.default.any, + firstPage: _propTypes2.default.any, + lastPage: _propTypes2.default.any, prePageTitle: _propTypes2.default.string, nextPageTitle: _propTypes2.default.string, firstPageTitle: _propTypes2.default.string, @@ -1920,101 +1919,6 @@ return /******/ (function(modules) { // webpackBootstrap beforeShowError: _propTypes2.default.func, printToolBar: _propTypes2.default.bool, insertFailIndicator: _propTypes2.default.string -======= - insertRow: _react.PropTypes.bool, - deleteRow: _react.PropTypes.bool, - search: _react.PropTypes.bool, - multiColumnSearch: _react.PropTypes.bool, - strictSearch: _react.PropTypes.bool, - columnFilter: _react.PropTypes.bool, - trClassName: _react.PropTypes.any, - tableStyle: _react.PropTypes.object, - containerStyle: _react.PropTypes.object, - headerStyle: _react.PropTypes.object, - bodyStyle: _react.PropTypes.object, - containerClass: _react.PropTypes.string, - tableContainerClass: _react.PropTypes.string, - headerContainerClass: _react.PropTypes.string, - bodyContainerClass: _react.PropTypes.string, - tableHeaderClass: _react.PropTypes.string, - tableBodyClass: _react.PropTypes.string, - options: _react.PropTypes.shape({ - clearSearch: _react.PropTypes.bool, - sortName: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.array]), - sortOrder: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.array]), - defaultSortName: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.array]), - defaultSortOrder: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.array]), - sortIndicator: _react.PropTypes.bool, - afterTableComplete: _react.PropTypes.func, - afterDeleteRow: _react.PropTypes.func, - afterInsertRow: _react.PropTypes.func, - afterSearch: _react.PropTypes.func, - afterColumnFilter: _react.PropTypes.func, - onRowClick: _react.PropTypes.func, - onRowDoubleClick: _react.PropTypes.func, - page: _react.PropTypes.number, - pageStartIndex: _react.PropTypes.number, - paginationShowsTotal: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.func]), - sizePerPageList: _react.PropTypes.array, - sizePerPage: _react.PropTypes.number, - paginationSize: _react.PropTypes.number, - paginationPosition: _react.PropTypes.oneOf([_Const2.default.PAGINATION_POS_TOP, _Const2.default.PAGINATION_POS_BOTTOM, _Const2.default.PAGINATION_POS_BOTH]), - hideSizePerPage: _react.PropTypes.bool, - hidePageListOnlyOnePage: _react.PropTypes.bool, - alwaysShowAllBtns: _react.PropTypes.bool, - withFirstAndLast: _react.PropTypes.bool, - keepSizePerPageState: _react.PropTypes.bool, - onSortChange: _react.PropTypes.func, - onPageChange: _react.PropTypes.func, - onSizePerPageList: _react.PropTypes.func, - onFilterChange: _react2.default.PropTypes.func, - onSearchChange: _react2.default.PropTypes.func, - onAddRow: _react2.default.PropTypes.func, - onExportToCSV: _react2.default.PropTypes.func, - onCellEdit: _react2.default.PropTypes.func, - noDataText: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.object]), - withoutNoDataText: _react2.default.PropTypes.bool, - handleConfirmDeleteRow: _react.PropTypes.func, - prePage: _react.PropTypes.any, - nextPage: _react.PropTypes.any, - firstPage: _react.PropTypes.any, - lastPage: _react.PropTypes.any, - prePageTitle: _react.PropTypes.string, - nextPageTitle: _react.PropTypes.string, - firstPageTitle: _react.PropTypes.string, - lastPageTitle: _react.PropTypes.string, - searchDelayTime: _react.PropTypes.number, - exportCSVText: _react.PropTypes.string, - insertText: _react.PropTypes.string, - deleteText: _react.PropTypes.string, - saveText: _react.PropTypes.string, - closeText: _react.PropTypes.string, - ignoreEditable: _react.PropTypes.bool, - defaultSearch: _react.PropTypes.string, - insertModalHeader: _react.PropTypes.func, - insertModalBody: _react.PropTypes.func, - insertModalFooter: _react.PropTypes.func, - insertModal: _react.PropTypes.func, - insertBtn: _react.PropTypes.func, - deleteBtn: _react.PropTypes.func, - showSelectedOnlyBtn: _react.PropTypes.func, - exportCSVBtn: _react.PropTypes.func, - clearSearchBtn: _react.PropTypes.func, - searchField: _react.PropTypes.func, - searchPanel: _react.PropTypes.func, - btnGroup: _react.PropTypes.func, - toolBar: _react.PropTypes.func, - sizePerPageDropDown: _react.PropTypes.func, - paginationPanel: _react.PropTypes.func, - searchPosition: _react.PropTypes.string, - expandRowBgColor: _react.PropTypes.string, - expandBy: _react.PropTypes.string, - expanding: _react.PropTypes.array, - onExpand: _react.PropTypes.func, - onlyOneExpanding: _react.PropTypes.bool, - beforeShowError: _react.PropTypes.func, - printToolBar: _react.PropTypes.bool ->>>>>>> master }), fetchInfo: _propTypes2.default.shape({ dataTotalSize: _propTypes2.default.number @@ -6658,7 +6562,9 @@ return /******/ (function(modules) { // webpackBootstrap var keepSizePerPageState = this.props.keepSizePerPageState; if (!keepSizePerPageState) { - this.setState({ open: false }); + this.setState({ + open: false + }); } } }, { @@ -6688,7 +6594,9 @@ return /******/ (function(modules) { // webpackBootstrap } if (keepSizePerPageState) { - this.setState({ open: false }); + this.setState({ + open: false + }); } if (page !== currPage) { @@ -6710,7 +6618,9 @@ return /******/ (function(modules) { // webpackBootstrap this.props.onSizePerPageList(selectSize); } } - this.setState({ open: false }); + this.setState({ + open: false + }); } }, { key: '__toggleDropDown__REACT_HOT_LOADER__', @@ -7158,7 +7068,7 @@ return /******/ (function(modules) { // webpackBootstrap currSizePerPage = _props.currSizePerPage; - var openClass = open ? 'open' : ''; + var openClass = open ? 'open show' : ''; var dropDownStyle = { visibility: hidden ? 'hidden' : 'visible' }; return _react2.default.createElement( diff --git a/dist/react-bootstrap-table.js.map b/dist/react-bootstrap-table.js.map index d611574bf..ef9307f7c 100644 --- a/dist/react-bootstrap-table.js.map +++ b/dist/react-bootstrap-table.js.map @@ -1,5 +1 @@ -<<<<<<< HEAD -{"version":3,"file":"react-bootstrap-table.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 0c729544047a95e2d670","webpack:///src/index.js","webpack:///src/BootstrapTable.js","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","webpack:///./~/prop-types/index.js","webpack:///./~/prop-types/factory.js","webpack:///(webpack)/~/node-libs-browser/~/process/browser.js","webpack:///./~/prop-types/~/fbjs/lib/emptyFunction.js","webpack:///./~/prop-types/~/fbjs/lib/invariant.js","webpack:///./~/prop-types/~/fbjs/lib/warning.js","webpack:///./~/prop-types/lib/ReactPropTypesSecret.js","webpack:///./~/prop-types/checkPropTypes.js","webpack:///./~/classnames/index.js","webpack:///src/Const.js","webpack:///src/TableHeader.js","webpack:///external {\"root\":\"ReactDOM\",\"commonjs2\":\"react-dom\",\"commonjs\":\"react-dom\",\"amd\":\"react-dom\"}","webpack:///src/SelectRowHeaderColumn.js","webpack:///src/TableBody.js","webpack:///src/util.js","webpack:///src/TableRow.js","webpack:///src/TableColumn.js","webpack:///src/TableEditColumn.js","webpack:///src/Editor.js","webpack:///src/Notification.js","webpack:///./~/react-s-alert/index.js","webpack:///./~/react-s-alert/dist/SAlert.js","webpack:///./~/react-s-alert/dist/SAlertContent.js","webpack:///./~/react-s-alert/dist/s-alert-parts/s-alert-tools.js","webpack:///./~/react-s-alert/dist/s-alert-parts/s-alert-store.js","webpack:///./~/react-s-alert/dist/SAlertContentTmpl.js","webpack:///./~/react-s-alert/dist/s-alert-parts/s-alert-data-prep.js","webpack:///src/ExpandComponent.js","webpack:///src/pagination/PaginationList.js","webpack:///src/pagination/PageButton.js","webpack:///src/pagination/SizePerPageDropDown.js","webpack:///src/toolbar/ToolBar.js","webpack:///./~/react-modal/lib/index.js","webpack:///./~/react-modal/lib/components/Modal.js","webpack:///./~/react-modal/~/exenv/index.js","webpack:///./~/react-modal/lib/components/ModalPortal.js","webpack:///./~/react-modal/lib/helpers/focusManager.js","webpack:///./~/react-modal/lib/helpers/tabbable.js","webpack:///./~/react-modal/lib/helpers/scopeTab.js","webpack:///./~/react-modal/~/lodash.assign/index.js","webpack:///./~/react-modal/lib/helpers/ariaAppHider.js","webpack:///./~/react-modal/~/element-class/index.js","webpack:///src/toolbar/InsertModal.js","webpack:///src/toolbar/InsertModalHeader.js","webpack:///src/toolbar/InsertModalFooter.js","webpack:///src/toolbar/InsertModalBody.js","webpack:///src/toolbar/InsertButton.js","webpack:///src/toolbar/DeleteButton.js","webpack:///src/toolbar/ExportCSVButton.js","webpack:///src/toolbar/ShowSelectedOnlyButton.js","webpack:///src/toolbar/SearchField.js","webpack:///src/toolbar/ClearSearchButton.js","webpack:///src/TableFilter.js","webpack:///src/store/TableDataStore.js","webpack:///src/csv_export_util.js","webpack:///src/filesaver.js","webpack:///(webpack)/buildin/amd-define.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///src/Filter.js","webpack:///(webpack)/~/node-libs-browser/~/events/events.js","webpack:///src/TableHeaderColumn.js","webpack:///src/filters/Date.js","webpack:///src/filters/Text.js","webpack:///src/filters/Regex.js","webpack:///src/filters/Select.js","webpack:///src/filters/Number.js","webpack:///src/toolbar/ButtonGroup.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactBootstrapTable\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"ReactBootstrapTable\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_14__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0c729544047a95e2d670","import BootstrapTable from './BootstrapTable';\nimport TableHeaderColumn from './TableHeaderColumn';\nimport InsertModalHeader from './toolbar/InsertModalHeader';\nimport InsertModalBody from './toolbar/InsertModalBody';\nimport InsertModalFooter from './toolbar/InsertModalFooter';\nimport InsertButton from './toolbar/InsertButton';\nimport DeleteButton from './toolbar/DeleteButton';\nimport ExportCSVButton from './toolbar/ExportCSVButton';\nimport ShowSelectedOnlyButton from './toolbar/ShowSelectedOnlyButton';\nimport ClearSearchButton from './toolbar/ClearSearchButton';\nimport SearchField from './toolbar/SearchField';\nimport ButtonGroup from './toolbar/ButtonGroup';\nimport SizePerPageDropDown from './pagination/SizePerPageDropDown';\n\nif (typeof window !== 'undefined') {\n window.BootstrapTable = BootstrapTable;\n window.TableHeaderColumn = TableHeaderColumn;\n window.InsertModalHeader = InsertModalHeader;\n window.InsertModalBody = InsertModalBody;\n window.InsertModalFooter = InsertModalFooter;\n window.InsertButton = InsertButton;\n window.DeleteButton = DeleteButton;\n window.ShowSelectedOnlyButton = ShowSelectedOnlyButton;\n window.ExportCSVButton = ExportCSVButton;\n window.ClearSearchButton = ClearSearchButton;\n window.SearchField = SearchField;\n window.ButtonGroup = ButtonGroup;\n window.SizePerPageDropDown = SizePerPageDropDown;\n}\nexport {\n BootstrapTable,\n TableHeaderColumn,\n InsertModalHeader,\n InsertModalBody,\n InsertModalFooter,\n InsertButton,\n DeleteButton,\n ShowSelectedOnlyButton,\n ExportCSVButton,\n ClearSearchButton,\n SearchField,\n ButtonGroup,\n SizePerPageDropDown\n};\n\n\n\n// WEBPACK FOOTER //\n// src/index.js","/* eslint no-alert: 0 */\n/* eslint max-len: 0 */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport classSet from 'classnames';\nimport Const from './Const';\nimport TableHeader from './TableHeader';\nimport TableBody from './TableBody';\nimport PaginationList from './pagination/PaginationList';\nimport ToolBar from './toolbar/ToolBar';\nimport TableFilter from './TableFilter';\nimport { TableDataStore } from './store/TableDataStore';\nimport Util from './util';\nimport exportCSVUtil from './csv_export_util';\nimport { Filter } from './Filter';\nimport Alert from 'react-s-alert';\n\nclass BootstrapTable extends Component {\n\n constructor(props) {\n super(props);\n this.isIE = false;\n this._attachCellEditFunc();\n if (Util.canUseDOM()) {\n this.isIE = document.documentMode;\n }\n this.store = new TableDataStore(this.props.data ? this.props.data.slice() : []);\n this.isVerticalScroll = false;\n this.initTable(this.props);\n\n if (this.props.selectRow && this.props.selectRow.selected) {\n const copy = this.props.selectRow.selected.slice();\n this.store.setSelectedRowKey(copy);\n }\n let currPage = Const.PAGE_START_INDEX;\n if (typeof this.props.options.page !== 'undefined') {\n currPage = this.props.options.page;\n } else if (typeof this.props.options.pageStartIndex !== 'undefined') {\n currPage = this.props.options.pageStartIndex;\n }\n\n this._adjustHeaderWidth = this._adjustHeaderWidth.bind(this);\n this._adjustHeight = this._adjustHeight.bind(this);\n this._adjustTable = this._adjustTable.bind(this);\n\n this.state = {\n data: this.getTableData(),\n currPage: currPage,\n expanding: this.props.options.expanding || [],\n sizePerPage: this.props.options.sizePerPage || Const.SIZE_PER_PAGE_LIST[0],\n selectedRowKeys: this.store.getSelectedRowKeys(),\n reset: false,\n x: this.props.keyBoardNav ? 0 : -1,\n y: this.props.keyBoardNav ? 0 : -1\n };\n }\n\n initTable(props) {\n let { keyField } = props;\n\n const isKeyFieldDefined = typeof keyField === 'string' && keyField.length;\n React.Children.forEach(props.children, column => {\n if (column === null || column === undefined) {\n // Skip null and undefined value\n return;\n }\n if (column.props.isKey) {\n if (keyField) {\n throw new Error('Error. Multiple key column be detected in TableHeaderColumn.');\n }\n keyField = column.props.dataField;\n }\n if (column.props.filter) {\n // a column contains a filter\n if (!this.filter) {\n // first time create the filter on the BootstrapTable\n this.filter = new Filter();\n }\n // pass the filter to column with filter\n column.props.filter.emitter = this.filter;\n }\n });\n\n if (this.filter) {\n this.filter.removeAllListeners('onFilterChange');\n this.filter.on('onFilterChange', (currentFilter) => {\n this.handleFilterData(currentFilter);\n });\n }\n\n this.colInfos = this.getColumnsDescription(props).reduce(( prev, curr ) => {\n prev[curr.name] = curr;\n return prev;\n }, {});\n\n if (!isKeyFieldDefined && !keyField) {\n throw new Error(`Error. No any key column defined in TableHeaderColumn.\n Use 'isKey={true}' to specify a unique column after version 0.5.4.`);\n }\n\n this.store.setProps({\n isPagination: props.pagination,\n keyField: keyField,\n colInfos: this.colInfos,\n multiColumnSearch: props.multiColumnSearch,\n strictSearch: props.strictSearch,\n multiColumnSort: props.multiColumnSort,\n remote: this.props.remote\n });\n }\n\n getTableData() {\n let result = [];\n const { options, pagination } = this.props;\n const sortName = options.defaultSortName || options.sortName;\n const sortOrder = options.defaultSortOrder || options.sortOrder;\n const searchText = options.defaultSearch;\n\n if (sortName && sortOrder) {\n this.store.setSortInfo(sortOrder, sortName);\n if (!this.allowRemote(Const.REMOTE_SORT)) {\n this.store.sort();\n }\n }\n\n if (searchText) {\n this.store.search(searchText);\n }\n\n if (pagination) {\n let page;\n let sizePerPage;\n if (this.store.isChangedPage()) {\n sizePerPage = this.state.sizePerPage;\n page = this.state.currPage;\n } else {\n sizePerPage = options.sizePerPage || Const.SIZE_PER_PAGE_LIST[0];\n page = options.page || 1;\n }\n result = this.store.page(page, sizePerPage).get();\n } else {\n result = this.store.get();\n }\n return result;\n }\n\n getColumnsDescription({ children }) {\n let rowCount = 0;\n React.Children.forEach(children, (column) => {\n if (column === null || column === undefined) {\n // Skip null and undefined value\n return;\n }\n\n if (Number(column.props.row) > rowCount) {\n rowCount = Number(column.props.row);\n }\n });\n return React.Children.map(children, (column, i) => {\n if (column === null || column === undefined) {\n // Return null for empty objects\n return null;\n }\n\n const rowIndex = column.props.row ? Number(column.props.row) : 0;\n const rowSpan = column.props.rowSpan ? Number(column.props.rowSpan) : 1;\n if ((rowSpan + rowIndex) === (rowCount + 1)) {\n return {\n name: column.props.dataField,\n align: column.props.dataAlign,\n sort: column.props.dataSort,\n format: column.props.dataFormat,\n formatExtraData: column.props.formatExtraData,\n filterFormatted: column.props.filterFormatted,\n filterValue: column.props.filterValue,\n editable: column.props.editable,\n customEditor: column.props.customEditor,\n hidden: column.props.hidden,\n hiddenOnInsert: column.props.hiddenOnInsert,\n searchable: column.props.searchable,\n className: column.props.columnClassName,\n editClassName: column.props.editColumnClassName,\n invalidEditColumnClassName: column.props.invalidEditColumnClassName,\n columnTitle: column.props.columnTitle,\n width: column.props.width,\n text: column.props.headerText || column.props.children,\n sortFunc: column.props.sortFunc,\n sortFuncExtraData: column.props.sortFuncExtraData,\n export: column.props.export,\n expandable: column.props.expandable,\n index: i,\n attrs: column.props.tdAttr,\n style: column.props.tdStyle\n };\n }\n });\n }\n\n reset() {\n const { pageStartIndex } = this.props.options;\n this.store.clean();\n this.setState({\n data: this.getTableData(),\n currPage: Util.getFirstPage(pageStartIndex),\n expanding: [],\n sizePerPage: Const.SIZE_PER_PAGE_LIST[0],\n selectedRowKeys: this.store.getSelectedRowKeys(),\n reset: true\n });\n }\n\n componentWillReceiveProps(nextProps) {\n this.initTable(nextProps);\n const { options, selectRow } = nextProps;\n\n this.store.setData(nextProps.data.slice());\n\n // from #481\n let page = this.state.currPage;\n if (this.props.options.page !== options.page) {\n page = options.page;\n }\n // from #481\n let sizePerPage = this.state.sizePerPage;\n if (this.props.options.sizePerPage !== options.sizePerPage) {\n sizePerPage = options.sizePerPage;\n }\n\n if (this.isRemoteDataSource()) {\n let data = nextProps.data.slice();\n if (nextProps.pagination && !this.allowRemote(Const.REMOTE_PAGE)) {\n data = this.store.page(page, sizePerPage).get();\n }\n this.setState({\n data,\n currPage: page,\n sizePerPage,\n reset: false\n });\n } else {\n // #125\n // remove !options.page for #709\n if (page > Math.ceil(nextProps.data.length / sizePerPage)) {\n page = 1;\n }\n const sortList = this.store.getSortInfo();\n const sortField = options.sortName;\n const sortOrder = options.sortOrder;\n if (sortField && sortOrder) {\n this.store.setSortInfo(sortOrder, sortField);\n this.store.sort();\n } else if (sortList.length > 0) {\n this.store.sort();\n }\n const data = this.store.page(page, sizePerPage).get();\n this.setState({\n data,\n currPage: page,\n sizePerPage,\n reset: false\n });\n\n if (this.store.isSearching && options.afterSearch) {\n options.afterSearch(this.store.searchText, this.store.getDataIgnoringPagination());\n }\n\n if (this.store.isFiltering && options.afterColumnFilter) {\n options.afterColumnFilter(this.store.filterObj, this.store.getDataIgnoringPagination());\n }\n }\n\n // If setting the expanded rows is being handled externally\n // then overwrite the current expanded rows.\n if (this.props.options.expanding !== options.expanding) {\n this.setState({\n expanding: options.expanding || []\n });\n }\n\n if (selectRow && selectRow.selected) {\n // set default select rows to store.\n const copy = selectRow.selected.slice();\n this.store.setSelectedRowKey(copy);\n this.setState({\n selectedRowKeys: copy,\n reset: false\n });\n }\n }\n\n componentDidMount() {\n this._adjustTable();\n window.addEventListener('resize', this._adjustTable);\n this.refs.body.refs.container.addEventListener('scroll', this._scrollHeader);\n if (this.props.scrollTop) {\n this._scrollTop();\n }\n }\n\n componentWillUnmount() {\n window.removeEventListener('resize', this._adjustTable);\n if (this.refs && this.refs.body && this.refs.body.refs) {\n this.refs.body.refs.container.removeEventListener('scroll', this._scrollHeader);\n }\n if (this.filter) {\n this.filter.removeAllListeners('onFilterChange');\n }\n }\n\n componentDidUpdate() {\n this._adjustTable();\n this._attachCellEditFunc();\n if (this.props.options.afterTableComplete) {\n this.props.options.afterTableComplete();\n }\n }\n\n _attachCellEditFunc() {\n const { cellEdit } = this.props;\n if (cellEdit) {\n this.props.cellEdit.__onCompleteEdit__ = this.handleEditCell.bind(this);\n if (cellEdit.mode !== Const.CELL_EDIT_NONE) {\n this.props.selectRow.clickToSelect = false;\n }\n }\n }\n\n /**\n * Returns true if in the current configuration,\n * the datagrid should load its data remotely.\n *\n * @param {Object} [props] Optional. If not given, this.props will be used\n * @return {Boolean}\n */\n isRemoteDataSource(props) {\n const { remote } = (props || this.props);\n return remote === true || typeof remote === 'function';\n }\n\n /**\n * Returns true if this action can be handled remote store\n * From #990, Sometimes, we need some actions as remote, some actions are handled by default\n * so function will tell you the target action is can be handled as remote or not.\n * @param {String} [action] Required.\n * @param {Object} [props] Optional. If not given, this.props will be used\n * @return {Boolean}\n */\n allowRemote(action, props) {\n const { remote } = (props || this.props);\n if (typeof remote === 'function') {\n const remoteObj = remote(Const.REMOTE);\n return remoteObj[action];\n } else {\n return remote;\n }\n }\n\n render() {\n const style = {\n height: this.props.height,\n maxHeight: this.props.maxHeight\n };\n\n const columns = this.getColumnsDescription(this.props);\n const sortList = this.store.getSortInfo();\n const pagination = this.renderPagination();\n const toolBar = this.renderToolBar();\n const tableFilter = this.renderTableFilter(columns);\n const isSelectAll = this.isSelectAll();\n const expandColumnOptions = this.props.expandColumnOptions;\n if (typeof expandColumnOptions.expandColumnBeforeSelectColumn === 'undefined') {\n expandColumnOptions.expandColumnBeforeSelectColumn = true;\n }\n const colGroups = Util.renderColGroup(columns, this.props.selectRow, expandColumnOptions);\n let sortIndicator = this.props.options.sortIndicator;\n if (typeof this.props.options.sortIndicator === 'undefined') sortIndicator = true;\n const { paginationPosition = Const.PAGINATION_POS_BOTTOM } = this.props.options;\n const showPaginationOnTop = paginationPosition !== Const.PAGINATION_POS_BOTTOM;\n const showPaginationOnBottom = paginationPosition !== Const.PAGINATION_POS_TOP;\n\n return (\n
\n { toolBar }\n { showPaginationOnTop ? pagination : null }\n
\n \n { this.props.children }\n \n \n
\n { tableFilter }\n { showPaginationOnBottom ? pagination : null }\n \n
\n );\n }\n\n isSelectAll() {\n if (this.store.isEmpty()) return false;\n const { selectRow: { unselectable, onlyUnselectVisible } } = this.props;\n const keyField = this.store.getKeyField();\n const allRowKeys = onlyUnselectVisible ?\n this.store.get().map(r => r[keyField]) :\n this.store.getAllRowkey();\n let defaultSelectRowKeys = this.store.getSelectedRowKeys();\n\n if (onlyUnselectVisible) {\n defaultSelectRowKeys = defaultSelectRowKeys.filter(x => x !== allRowKeys);\n }\n\n if (defaultSelectRowKeys.length === 0) return false;\n let match = 0;\n let noFound = 0;\n let unSelectableCnt = 0;\n defaultSelectRowKeys.forEach(selected => {\n if (allRowKeys.indexOf(selected) !== -1) match++;\n else noFound++;\n if (unselectable &&\n unselectable.indexOf(selected) !== -1) unSelectableCnt++;\n });\n\n if (noFound === defaultSelectRowKeys.length) return false;\n if (match === allRowKeys.length) {\n return true;\n } else {\n if (unselectable && match <= unSelectableCnt &&\n unSelectableCnt === unselectable.length) return false;\n else return 'indeterminate';\n }\n // return (match === allRowKeys.length) ? true : 'indeterminate';\n }\n\n cleanSelected() {\n this.store.setSelectedRowKey([]);\n this.setState({\n selectedRowKeys: [],\n reset: false\n });\n }\n\n cleanSort() {\n this.store.cleanSortInfo();\n this.setState({\n reset: false\n });\n }\n\n handleSort = (order, sortField) => {\n if (this.props.options.onSortChange) {\n this.props.options.onSortChange(sortField, order, this.props);\n }\n this.store.setSortInfo(order, sortField);\n if (this.allowRemote(Const.REMOTE_SORT)) {\n return;\n }\n\n const result = this.store.sort().get();\n this.setState({\n data: result,\n reset: false\n });\n }\n\n handleExpandRow = (expanding, rowKey, isRowExpanding) => {\n const { onExpand } = this.props.options;\n if (onExpand) {\n onExpand(rowKey, !isRowExpanding);\n }\n this.setState({ expanding, reset: false }, () => {\n this._adjustHeaderWidth();\n });\n }\n\n handlePaginationData = (page, sizePerPage) => {\n const { onPageChange, pageStartIndex } = this.props.options;\n const emptyTable = this.store.isEmpty();\n if (onPageChange) {\n onPageChange(page, sizePerPage);\n }\n\n const state = {\n sizePerPage,\n reset: false\n };\n if (!emptyTable) state.currPage = page;\n this.setState(state);\n\n if (this.allowRemote(Const.REMOTE_PAGE) || emptyTable) {\n return;\n }\n\n const result = this.store.page(Util.getNormalizedPage(pageStartIndex, page), sizePerPage).get();\n this.setState({ data: result, reset: false });\n }\n\n handleMouseLeave = () => {\n if (this.props.options.onMouseLeave) {\n this.props.options.onMouseLeave();\n }\n }\n\n handleMouseEnter = () => {\n if (this.props.options.onMouseEnter) {\n this.props.options.onMouseEnter();\n }\n }\n\n handleRowMouseOut = (row, event) => {\n if (this.props.options.onRowMouseOut) {\n this.props.options.onRowMouseOut(row, event);\n }\n }\n\n handleRowMouseOver = (row, event) => {\n if (this.props.options.onRowMouseOver) {\n this.props.options.onRowMouseOver(row, event);\n }\n }\n\n handleNavigateCell = ({ x: offSetX, y: offSetY, lastEditCell }) => {\n const { pagination } = this.props;\n let { x, y, currPage } = this.state;\n x += offSetX;\n y += offSetY;\n\n const columns = this.store.getColInfos();\n const visibleRowSize = this.state.data.length;\n const visibleColumnSize = Object.keys(columns).filter(k => !columns[k].hidden).length;\n\n if (y >= visibleRowSize) {\n currPage++;\n const lastPage = pagination ? this.refs.pagination.getLastPage() : -1;\n if (currPage <= lastPage) {\n this.handlePaginationData(currPage, this.state.sizePerPage);\n } else {\n return;\n }\n y = 0;\n } else if (y < 0) {\n currPage--;\n if (currPage > 0) {\n this.handlePaginationData(currPage, this.state.sizePerPage);\n } else {\n return;\n }\n y = visibleRowSize - 1;\n } else if (x >= visibleColumnSize) {\n if ((y + 1) === visibleRowSize) {\n currPage++;\n const lastPage = pagination ? this.refs.pagination.getLastPage() : -1;\n if (currPage <= lastPage) {\n this.handlePaginationData(currPage, this.state.sizePerPage);\n } else {\n return;\n }\n y = 0;\n } else {\n y++;\n }\n x = lastEditCell ? 1 : 0;\n } else if (x < 0) {\n x = visibleColumnSize - 1;\n if (y === 0) {\n currPage--;\n if (currPage > 0) {\n this.handlePaginationData(currPage, this.state.sizePerPage);\n } else {\n return;\n }\n y = this.state.sizePerPage - 1;\n } else {\n y--;\n }\n }\n this.setState({\n x, y, currPage, reset: false\n });\n }\n\n handleRowClick = (row, rowIndex, cellIndex) => {\n const { options, keyBoardNav } = this.props;\n if (options.onRowClick) {\n options.onRowClick(row);\n }\n if (keyBoardNav) {\n let { clickToNav } = typeof keyBoardNav === 'object' ? keyBoardNav : {};\n clickToNav = clickToNav === false ? clickToNav : true;\n if (clickToNav) {\n this.setState({\n x: cellIndex,\n y: rowIndex,\n reset: false\n });\n }\n }\n }\n\n handleRowDoubleClick = row => {\n if (this.props.options.onRowDoubleClick) {\n this.props.options.onRowDoubleClick(row);\n }\n }\n\n handleSelectAllRow = e => {\n const isSelected = e.currentTarget.checked;\n const keyField = this.store.getKeyField();\n const { selectRow: { onSelectAll, unselectable, selected, onlyUnselectVisible } } = this.props;\n let selectedRowKeys = onlyUnselectVisible ? this.state.selectedRowKeys : [];\n let result = true;\n let rows = this.store.get();\n\n // onlyUnselectVisible default is false, #1276\n if (!isSelected && !onlyUnselectVisible) {\n rows = this.store.getRowByKey(this.state.selectedRowKeys);\n }\n\n if (unselectable && unselectable.length > 0) {\n if (isSelected) {\n rows = rows.filter(r => {\n return unselectable.indexOf(r[keyField]) === -1 ||\n (selected && selected.indexOf(r[keyField]) !== -1);\n });\n } else {\n rows = rows.filter(r => unselectable.indexOf(r[keyField]) === -1);\n }\n }\n\n if (onSelectAll) {\n result = this.props.selectRow.onSelectAll(isSelected, rows);\n }\n\n if (typeof result == 'undefined' || result !== false) {\n if (isSelected) {\n if (Array.isArray(result)) {\n selectedRowKeys = result;\n } else {\n const currentRowKeys = rows.map(r => r[keyField]);\n // onlyUnselectVisible default is false, #1276\n if (onlyUnselectVisible) {\n selectedRowKeys = selectedRowKeys.concat(currentRowKeys);\n } else {\n selectedRowKeys = currentRowKeys;\n }\n }\n } else {\n if (unselectable && selected) {\n selectedRowKeys = selected.filter(r => unselectable.indexOf(r) > -1);\n } else if (onlyUnselectVisible) {\n const currentRowKeys = rows.map(r => r[keyField]);\n selectedRowKeys = selectedRowKeys.filter(k => currentRowKeys.indexOf(k) === -1);\n }\n }\n\n this.store.setSelectedRowKey(selectedRowKeys);\n this.setState({ selectedRowKeys, reset: false });\n }\n }\n\n handleShowOnlySelected = () => {\n this.store.ignoreNonSelected();\n const { pageStartIndex } = this.props.options;\n let result;\n if (this.props.pagination) {\n result = this.store.page(Util.getNormalizedPage(pageStartIndex), this.state.sizePerPage).get();\n } else {\n result = this.store.get();\n }\n this.setState({\n data: result,\n reset: false,\n currPage: Util.getFirstPage(pageStartIndex)\n });\n }\n\n handleSelectRow = (row, isSelected, e) => {\n let result = true;\n let currSelected = this.store.getSelectedRowKeys();\n const rowKey = row[ this.store.getKeyField() ];\n const { selectRow } = this.props;\n if (selectRow.onSelect) {\n result = selectRow.onSelect(row, isSelected, e);\n }\n\n if (typeof result === 'undefined' || result !== false) {\n if (selectRow.mode === Const.ROW_SELECT_SINGLE) {\n currSelected = isSelected ? [ rowKey ] : [];\n } else {\n if (isSelected) {\n currSelected.push(rowKey);\n } else {\n currSelected = currSelected.filter(key => rowKey !== key);\n }\n }\n\n this.store.setSelectedRowKey(currSelected);\n this.setState({\n selectedRowKeys: currSelected,\n reset: false\n });\n }\n }\n\n handleEditCell(newVal, rowIndex, colIndex) {\n const { beforeSaveCell } = this.props.cellEdit;\n const columns = this.getColumnsDescription(this.props);\n const fieldName = columns[colIndex].name;\n\n const invalid = () => {\n this.setState({\n data: this.store.get(),\n reset: false\n });\n return;\n };\n\n if (beforeSaveCell) {\n const beforeSaveCellCB = result => {\n this.refs.body.cancelEditCell();\n if (result || result === undefined) {\n this.editCell(newVal, rowIndex, colIndex);\n } else {\n invalid();\n }\n };\n const isValid = beforeSaveCell(this.state.data[rowIndex], fieldName, newVal, beforeSaveCellCB);\n if (isValid === false && typeof isValid !== 'undefined') {\n return invalid();\n } else if (isValid === Const.AWAIT_BEFORE_CELL_EDIT) {\n /* eslint consistent-return: 0 */\n return isValid;\n }\n }\n this.editCell(newVal, rowIndex, colIndex);\n }\n\n editCell(newVal, rowIndex, colIndex) {\n const { onCellEdit } = this.props.options;\n const { afterSaveCell } = this.props.cellEdit;\n const columns = this.getColumnsDescription(this.props);\n const fieldName = columns[colIndex].name;\n if (onCellEdit) {\n newVal = onCellEdit(this.state.data[rowIndex], fieldName, newVal);\n }\n\n if (this.allowRemote(Const.REMOTE_CELL_EDIT)) {\n if (afterSaveCell) {\n afterSaveCell(this.state.data[rowIndex], fieldName, newVal);\n }\n return;\n }\n\n const result = this.store.edit(newVal, rowIndex, fieldName).get();\n this.setState({\n data: result,\n reset: false\n });\n\n if (afterSaveCell) {\n afterSaveCell(this.state.data[rowIndex], fieldName, newVal);\n }\n }\n\n handleAddRowAtBegin(newObj) {\n try {\n this.store.addAtBegin(newObj);\n } catch (e) {\n return e;\n }\n this._handleAfterAddingRow(newObj, true);\n }\n\n handleAddRow = newObj => {\n const { onAddRow } = this.props.options;\n if (onAddRow) {\n const colInfos = this.store.getColInfos();\n onAddRow(newObj, colInfos);\n }\n\n if (this.allowRemote(Const.REMOTE_INSERT_ROW)) {\n if (this.props.options.afterInsertRow) {\n this.props.options.afterInsertRow(newObj);\n }\n return null;\n }\n\n try {\n this.store.add(newObj);\n } catch (e) {\n return e.message;\n }\n this._handleAfterAddingRow(newObj, false);\n }\n\n getSizePerPage() {\n return this.state.sizePerPage;\n }\n\n getCurrentPage() {\n return this.state.currPage;\n }\n\n getTableDataIgnorePaging() {\n return this.store.getCurrentDisplayData();\n }\n\n getPageByRowKey = rowKey => {\n const { sizePerPage } = this.state;\n const currentData = this.store.getCurrentDisplayData();\n const keyField = this.store.getKeyField();\n const result = currentData.findIndex((x) => x[ keyField ] === rowKey);\n if (result > -1) {\n return parseInt((result / sizePerPage), 10) + 1;\n } else {\n return result;\n }\n }\n\n handleDropRow = rowKeys => {\n const dropRowKeys = rowKeys ? rowKeys : this.store.getSelectedRowKeys();\n // add confirm before the delete action if that option is set.\n if (dropRowKeys && dropRowKeys.length > 0) {\n if (this.props.options.handleConfirmDeleteRow) {\n this.props.options.handleConfirmDeleteRow(() => {\n this.deleteRow(dropRowKeys);\n }, dropRowKeys);\n } else if (confirm('Are you sure you want to delete?')) {\n this.deleteRow(dropRowKeys);\n }\n }\n }\n\n deleteRow(dropRowKeys) {\n const { onDeleteRow } = this.props.options;\n if (onDeleteRow) {\n onDeleteRow(dropRowKeys);\n }\n\n this.store.setSelectedRowKey([]); // clear selected row key\n\n if (this.allowRemote(Const.REMOTE_DROP_ROW)) {\n if (this.props.options.afterDeleteRow) {\n this.props.options.afterDeleteRow(dropRowKeys);\n }\n return;\n }\n\n this.store.remove(dropRowKeys); // remove selected Row\n let result;\n if (this.props.pagination) {\n const { sizePerPage } = this.state;\n const currLastPage = Math.ceil(this.store.getDataNum() / sizePerPage);\n let { currPage } = this.state;\n if (currPage > currLastPage) currPage = currLastPage;\n result = this.store.page(Util.getNormalizedPage(currPage), sizePerPage).get();\n this.setState({\n data: result,\n selectedRowKeys: this.store.getSelectedRowKeys(),\n currPage,\n reset: false\n });\n } else {\n result = this.store.get();\n this.setState({\n data: result,\n reset: false,\n selectedRowKeys: this.store.getSelectedRowKeys()\n });\n }\n if (this.props.options.afterDeleteRow) {\n this.props.options.afterDeleteRow(dropRowKeys);\n }\n }\n\n handleFilterData = filterObj => {\n const { onFilterChange, pageStartIndex } = this.props.options;\n if (onFilterChange) {\n const colInfos = this.store.getColInfos();\n onFilterChange(filterObj, colInfos);\n }\n\n this.setState({\n currPage: Util.getFirstPage(pageStartIndex),\n reset: false\n });\n\n if (this.allowRemote(Const.REMOTE_FILTER)) {\n if (this.props.options.afterColumnFilter) {\n this.props.options.afterColumnFilter(filterObj, this.store.getDataIgnoringPagination());\n }\n return;\n }\n\n this.store.filter(filterObj);\n\n const sortList = this.store.getSortInfo();\n\n if (sortList.length > 0) {\n this.store.sort();\n }\n\n let result;\n\n if (this.props.pagination) {\n const { sizePerPage } = this.state;\n result = this.store.page(Util.getNormalizedPage(pageStartIndex), sizePerPage).get();\n } else {\n result = this.store.get();\n }\n if (this.props.options.afterColumnFilter) {\n this.props.options.afterColumnFilter(filterObj,\n this.store.getDataIgnoringPagination());\n }\n this.setState({\n data: result,\n reset: false\n });\n }\n\n handleExportCSV = () => {\n let result = {};\n\n let { csvFileName } = this.props;\n const { onExportToCSV } = this.props.options;\n if (onExportToCSV) {\n result = onExportToCSV();\n } else {\n result = this.store.getDataIgnoringPagination();\n }\n\n const keys = [];\n this.props.children.filter(_ => _ != null).map(function(column) {\n if (column.props.export === true ||\n (typeof column.props.export === 'undefined' &&\n column.props.hidden === false)) {\n keys.push({\n field: column.props.dataField,\n format: column.props.csvFormat,\n extraData: column.props.csvFormatExtraData,\n header: column.props.csvHeader || column.props.dataField,\n row: Number(column.props.row) || 0,\n rowSpan: Number(column.props.rowSpan) || 1,\n colSpan: Number(column.props.colSpan) || 1\n });\n }\n });\n\n if (typeof csvFileName === 'function') {\n csvFileName = csvFileName();\n }\n\n exportCSVUtil(result, keys, csvFileName);\n }\n\n handleSearch = searchText => {\n // Set search field if this function being called outside\n // but it's not necessary if calling fron inside.\n if (this.refs.toolbar) {\n this.refs.toolbar.setSearchInput(searchText);\n }\n const { onSearchChange, pageStartIndex } = this.props.options;\n if (onSearchChange) {\n const colInfos = this.store.getColInfos();\n onSearchChange(searchText, colInfos, this.props.multiColumnSearch);\n }\n\n this.setState({\n currPage: Util.getFirstPage(pageStartIndex),\n reset: false\n });\n\n if (this.allowRemote(Const.REMOTE_SEARCH)) {\n if (this.props.options.afterSearch) {\n this.props.options.afterSearch(searchText, this.store.getDataIgnoringPagination());\n }\n return;\n }\n\n\n this.store.search(searchText);\n\n const sortList = this.store.getSortInfo();\n\n if (sortList.length > 0) {\n this.store.sort();\n }\n\n let result;\n if (this.props.pagination) {\n const { sizePerPage } = this.state;\n result = this.store.page(Util.getNormalizedPage(pageStartIndex), sizePerPage).get();\n } else {\n result = this.store.get();\n }\n if (this.props.options.afterSearch) {\n this.props.options.afterSearch(searchText,\n this.store.getDataIgnoringPagination());\n }\n this.setState({\n data: result,\n reset: false\n });\n }\n\n renderPagination() {\n if (this.props.pagination) {\n let dataSize;\n if (this.allowRemote(Const.REMOTE_PAGE)) {\n dataSize = this.props.fetchInfo.dataTotalSize;\n } else {\n dataSize = this.store.getDataNum();\n }\n const { options } = this.props;\n const withFirstAndLast = options.withFirstAndLast === undefined ? true : options.withFirstAndLast;\n if (Math.ceil(dataSize / this.state.sizePerPage) <= 1 &&\n this.props.ignoreSinglePage) return null;\n return (\n
\n \n
\n );\n }\n return null;\n }\n\n renderToolBar() {\n const { exportCSV, selectRow, insertRow, deleteRow, search, children, keyField } = this.props;\n const enableShowOnlySelected = selectRow && selectRow.showOnlySelected;\n const print = typeof this.props.options.printToolBar === 'undefined' ?\n true : this.props.options.printToolBar;\n if (enableShowOnlySelected\n || insertRow\n || deleteRow\n || search\n || exportCSV\n || this.props.options.searchPanel\n || this.props.options.btnGroup\n || this.props.options.toolBar) {\n let columns;\n if (Array.isArray(children)) {\n columns = children.filter(_ => _ != null).map((column, r) => {\n if (!column) return;\n const { props } = column;\n const isKey = props.isKey || keyField === props.dataField;\n return {\n isKey,\n name: props.headerText || props.children,\n field: props.dataField,\n hiddenOnInsert: props.hiddenOnInsert,\n keyValidator: props.keyValidator,\n customInsertEditor: props.customInsertEditor,\n // when you want same auto generate value and not allow edit, example ID field\n autoValue: props.autoValue || false,\n // for create editor, no params for column.editable() indicate that editor for new row\n editable: props.editable && (typeof props.editable === 'function') ? props.editable() : props.editable,\n format: props.dataFormat ? function(value) {\n return props.dataFormat(value, null, props.formatExtraData, r).replace(/<.*?>/g, '');\n } : false\n };\n });\n } else {\n columns = [ {\n name: children.props.headerText || children.props.children,\n field: children.props.dataField,\n editable: children.props.editable,\n customInsertEditor: children.props.customInsertEditor,\n hiddenOnInsert: children.props.hiddenOnInsert,\n keyValidator: children.props.keyValidator\n } ];\n }\n return (\n
\n \n
\n );\n } else {\n return null;\n }\n }\n\n renderTableFilter(columns) {\n if (this.props.columnFilter) {\n return (\n \n );\n } else {\n return null;\n }\n }\n\n _scrollTop = () => {\n const { scrollTop } = this.props;\n if (scrollTop === Const.SCROLL_TOP) {\n this.refs.body.refs.container.scrollTop = 0;\n } else if (scrollTop === Const.SCROLL_BOTTOM) {\n this.refs.body.refs.container.scrollTop = this.refs.body.refs.container.scrollHeight;\n } else if (typeof scrollTop === 'number' && !isNaN(scrollTop)) {\n this.refs.body.refs.container.scrollTop = scrollTop;\n }\n }\n _scrollHeader = (e) => {\n this.refs.header.refs.container.scrollLeft = e.currentTarget.scrollLeft;\n }\n\n _adjustTable() {\n this._adjustHeight();\n if (!this.props.printable) {\n this._adjustHeaderWidth();\n }\n }\n\n _adjustHeaderWidth() {\n const header = this.refs.header.getHeaderColGrouop();\n const tbody = this.refs.body.refs.tbody;\n const bodyHeader = this.refs.body.getHeaderColGrouop();\n const firstRow = tbody.childNodes[0];\n const isScroll = tbody.parentNode.getBoundingClientRect().height >\n tbody.parentNode.parentNode.getBoundingClientRect().height;\n\n const scrollBarWidth = isScroll ? Util.getScrollBarWidth() : 0;\n if (firstRow && this.store.getDataNum()) {\n if (isScroll || this.isVerticalScroll !== isScroll) {\n const cells = firstRow.childNodes;\n for (let i = 0; i < cells.length; i++) {\n const cell = cells[i];\n const computedStyle = window.getComputedStyle(cell);\n let width = parseFloat(computedStyle.width.replace('px', ''));\n if (this.isIE) {\n const paddingLeftWidth = parseFloat(computedStyle.paddingLeft.replace('px', ''));\n const paddingRightWidth = parseFloat(computedStyle.paddingRight.replace('px', ''));\n const borderRightWidth = parseFloat(computedStyle.borderRightWidth.replace('px', ''));\n const borderLeftWidth = parseFloat(computedStyle.borderLeftWidth.replace('px', ''));\n width = width + paddingLeftWidth + paddingRightWidth + borderRightWidth + borderLeftWidth;\n }\n const lastPadding = (cells.length - 1 === i ? scrollBarWidth : 0);\n if (width <= 0) {\n width = 120;\n cell.width = width + lastPadding + 'px';\n }\n const result = width + lastPadding + 'px';\n header[i].style.width = result;\n header[i].style.minWidth = result;\n if (cells.length - 1 === i) {\n bodyHeader[i].style.width = width + 'px';\n bodyHeader[i].style.minWidth = width + 'px';\n } else {\n bodyHeader[i].style.width = result;\n bodyHeader[i].style.minWidth = result;\n }\n }\n }\n } else {\n React.Children.forEach(this.props.children.filter(_ => !!_), (child, i) => {\n if (child.props.width) {\n header[i].style.width = `${child.props.width}px`;\n header[i].style.minWidth = `${child.props.width}px`;\n }\n });\n }\n this.isVerticalScroll = isScroll;\n }\n\n _adjustHeight() {\n const { height } = this.props;\n let { maxHeight } = this.props;\n if ((typeof height === 'number' && !isNaN(height)) || height.indexOf('%') === -1) {\n this.refs.body.refs.container.style.height =\n parseFloat(height, 10) - this.refs.header.refs.container.offsetHeight + 'px';\n }\n if (maxHeight) {\n maxHeight = typeof maxHeight === 'number' ?\n maxHeight :\n parseInt(maxHeight.replace('px', ''), 10);\n\n this.refs.body.refs.container.style.maxHeight =\n maxHeight - this.refs.header.refs.container.offsetHeight + 'px';\n }\n }\n\n _handleAfterAddingRow(newObj, atTheBeginning) {\n let result;\n if (this.props.pagination) {\n // if pagination is enabled and inserting row at the end,\n // change page to the last page\n // otherwise, change it to the first page\n const { sizePerPage } = this.state;\n\n if (atTheBeginning) {\n const { pageStartIndex } = this.props.options;\n result = this.store.page(Util.getNormalizedPage(pageStartIndex), sizePerPage).get();\n this.setState({\n data: result,\n currPage: Util.getFirstPage(pageStartIndex),\n reset: false\n });\n } else {\n const currLastPage = Math.ceil(this.store.getDataNum() / sizePerPage);\n result = this.store.page(currLastPage, sizePerPage).get();\n this.setState({\n data: result,\n currPage: currLastPage,\n reset: false\n });\n }\n } else {\n result = this.store.get();\n this.setState({\n data: result,\n reset: false\n });\n }\n\n if (this.props.options.afterInsertRow) {\n this.props.options.afterInsertRow(newObj);\n }\n }\n}\n\nBootstrapTable.propTypes = {\n keyField: PropTypes.string,\n height: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),\n maxHeight: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),\n data: PropTypes.oneOfType([ PropTypes.array, PropTypes.object ]),\n remote: PropTypes.oneOfType([ PropTypes.bool, PropTypes.func ]), // remote data, default is false\n scrollTop: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),\n striped: PropTypes.bool,\n bordered: PropTypes.bool,\n hover: PropTypes.bool,\n condensed: PropTypes.bool,\n pagination: PropTypes.bool,\n printable: PropTypes.bool,\n keyBoardNav: PropTypes.oneOfType([ PropTypes.bool, PropTypes.object ]),\n searchPlaceholder: PropTypes.string,\n selectRow: PropTypes.shape({\n mode: PropTypes.oneOf([\n Const.ROW_SELECT_NONE,\n Const.ROW_SELECT_SINGLE,\n Const.ROW_SELECT_MULTI\n ]),\n customComponent: PropTypes.func,\n bgColor: PropTypes.oneOfType([ PropTypes.string, PropTypes.func ]),\n selected: PropTypes.array,\n onSelect: PropTypes.func,\n onSelectAll: PropTypes.func,\n clickToSelect: PropTypes.bool,\n hideSelectColumn: PropTypes.bool,\n clickToSelectAndEditCell: PropTypes.bool,\n clickToExpand: PropTypes.bool,\n showOnlySelected: PropTypes.bool,\n unselectable: PropTypes.array,\n columnWidth: PropTypes.oneOfType([ PropTypes.number, PropTypes.string ]),\n onlyUnselectVisible: PropTypes.bool\n }),\n cellEdit: PropTypes.shape({\n mode: PropTypes.string,\n blurToSave: PropTypes.bool,\n beforeSaveCell: PropTypes.func,\n afterSaveCell: PropTypes.func,\n nonEditableRows: PropTypes.func\n }),\n insertRow: PropTypes.bool,\n deleteRow: PropTypes.bool,\n search: PropTypes.bool,\n multiColumnSearch: PropTypes.bool,\n strictSearch: PropTypes.bool,\n columnFilter: PropTypes.bool,\n trClassName: PropTypes.any,\n tableStyle: PropTypes.object,\n containerStyle: PropTypes.object,\n headerStyle: PropTypes.object,\n bodyStyle: PropTypes.object,\n containerClass: PropTypes.string,\n tableContainerClass: PropTypes.string,\n headerContainerClass: PropTypes.string,\n bodyContainerClass: PropTypes.string,\n tableHeaderClass: PropTypes.string,\n tableBodyClass: PropTypes.string,\n options: PropTypes.shape({\n clearSearch: PropTypes.bool,\n sortName: PropTypes.oneOfType([ PropTypes.string, PropTypes.array ]),\n sortOrder: PropTypes.oneOfType([ PropTypes.string, PropTypes.array ]),\n defaultSortName: PropTypes.oneOfType([ PropTypes.string, PropTypes.array ]),\n defaultSortOrder: PropTypes.oneOfType([ PropTypes.string, PropTypes.array ]),\n sortIndicator: PropTypes.bool,\n afterTableComplete: PropTypes.func,\n afterDeleteRow: PropTypes.func,\n afterInsertRow: PropTypes.func,\n afterSearch: PropTypes.func,\n afterColumnFilter: PropTypes.func,\n onRowClick: PropTypes.func,\n onRowDoubleClick: PropTypes.func,\n page: PropTypes.number,\n pageStartIndex: PropTypes.number,\n paginationShowsTotal: PropTypes.oneOfType([ PropTypes.bool, PropTypes.func ]),\n sizePerPageList: PropTypes.array,\n sizePerPage: PropTypes.number,\n paginationSize: PropTypes.number,\n paginationPosition: PropTypes.oneOf([\n Const.PAGINATION_POS_TOP,\n Const.PAGINATION_POS_BOTTOM,\n Const.PAGINATION_POS_BOTH\n ]),\n hideSizePerPage: PropTypes.bool,\n hidePageListOnlyOnePage: PropTypes.bool,\n alwaysShowAllBtns: PropTypes.bool,\n withFirstAndLast: PropTypes.bool,\n keepSizePerPageState: PropTypes.bool,\n onSortChange: PropTypes.func,\n onPageChange: PropTypes.func,\n onSizePerPageList: PropTypes.func,\n onFilterChange: PropTypes.func,\n onSearchChange: PropTypes.func,\n onAddRow: PropTypes.func,\n onExportToCSV: PropTypes.func,\n onCellEdit: PropTypes.func,\n noDataText: PropTypes.oneOfType([ PropTypes.string, PropTypes.object ]),\n withoutNoDataText: PropTypes.bool,\n handleConfirmDeleteRow: PropTypes.func,\n prePage: PropTypes.string,\n nextPage: PropTypes.string,\n firstPage: PropTypes.string,\n lastPage: PropTypes.string,\n prePageTitle: PropTypes.string,\n nextPageTitle: PropTypes.string,\n firstPageTitle: PropTypes.string,\n lastPageTitle: PropTypes.string,\n searchDelayTime: PropTypes.number,\n exportCSVText: PropTypes.string,\n insertText: PropTypes.string,\n deleteText: PropTypes.string,\n saveText: PropTypes.string,\n closeText: PropTypes.string,\n ignoreEditable: PropTypes.bool,\n defaultSearch: PropTypes.string,\n insertModalHeader: PropTypes.func,\n insertModalBody: PropTypes.func,\n insertModalFooter: PropTypes.func,\n insertModal: PropTypes.func,\n insertBtn: PropTypes.func,\n deleteBtn: PropTypes.func,\n showSelectedOnlyBtn: PropTypes.func,\n exportCSVBtn: PropTypes.func,\n clearSearchBtn: PropTypes.func,\n searchField: PropTypes.func,\n searchPanel: PropTypes.func,\n btnGroup: PropTypes.func,\n toolBar: PropTypes.func,\n sizePerPageDropDown: PropTypes.func,\n paginationPanel: PropTypes.func,\n searchPosition: PropTypes.string,\n expandRowBgColor: PropTypes.string,\n expandBy: PropTypes.string,\n expanding: PropTypes.array,\n onExpand: PropTypes.func,\n onlyOneExpanding: PropTypes.bool,\n beforeShowError: PropTypes.func,\n printToolBar: PropTypes.bool,\n insertFailIndicator: PropTypes.string\n }),\n fetchInfo: PropTypes.shape({\n dataTotalSize: PropTypes.number\n }),\n exportCSV: PropTypes.bool,\n csvFileName: PropTypes.oneOfType([ PropTypes.string, PropTypes.func ]),\n ignoreSinglePage: PropTypes.bool,\n expandableRow: PropTypes.func,\n expandComponent: PropTypes.func,\n expandColumnOptions: PropTypes.shape({\n columnWidth: PropTypes.oneOfType([ PropTypes.number, PropTypes.string ]),\n expandColumnVisible: PropTypes.bool,\n expandColumnComponent: PropTypes.func,\n expandColumnBeforeSelectColumn: PropTypes.bool\n })\n};\nBootstrapTable.defaultProps = {\n scrollTop: undefined,\n expandComponent: undefined,\n expandableRow: undefined,\n expandColumnOptions: {\n expandColumnVisible: false,\n expandColumnComponent: undefined,\n expandColumnBeforeSelectColumn: true\n },\n height: '100%',\n maxHeight: undefined,\n striped: false,\n bordered: true,\n hover: false,\n condensed: false,\n pagination: false,\n printable: false,\n keyBoardNav: false,\n searchPlaceholder: undefined,\n selectRow: {\n mode: Const.ROW_SELECT_NONE,\n bgColor: Const.ROW_SELECT_BG_COLOR,\n selected: [],\n onSelect: undefined,\n onSelectAll: undefined,\n clickToSelect: false,\n hideSelectColumn: false,\n clickToSelectAndEditCell: false,\n clickToExpand: false,\n showOnlySelected: false,\n unselectable: [],\n customComponent: undefined,\n onlyUnselectVisible: false\n },\n cellEdit: {\n mode: Const.CELL_EDIT_NONE,\n blurToSave: false,\n beforeSaveCell: undefined,\n afterSaveCell: undefined,\n nonEditableRows: undefined\n },\n insertRow: false,\n deleteRow: false,\n search: false,\n multiColumnSearch: false,\n strictSearch: undefined,\n multiColumnSort: 1,\n columnFilter: false,\n trClassName: '',\n tableStyle: undefined,\n containerStyle: undefined,\n headerStyle: undefined,\n bodyStyle: undefined,\n containerClass: null,\n tableContainerClass: null,\n headerContainerClass: null,\n bodyContainerClass: null,\n tableHeaderClass: null,\n tableBodyClass: null,\n options: {\n clearSearch: false,\n sortName: undefined,\n sortOrder: undefined,\n defaultSortName: undefined,\n defaultSortOrder: undefined,\n sortIndicator: true,\n afterTableComplete: undefined,\n afterDeleteRow: undefined,\n afterInsertRow: undefined,\n afterSearch: undefined,\n afterColumnFilter: undefined,\n onRowClick: undefined,\n onRowDoubleClick: undefined,\n onMouseLeave: undefined,\n onMouseEnter: undefined,\n onRowMouseOut: undefined,\n onRowMouseOver: undefined,\n page: undefined,\n paginationShowsTotal: false,\n sizePerPageList: Const.SIZE_PER_PAGE_LIST,\n sizePerPage: undefined,\n paginationSize: Const.PAGINATION_SIZE,\n paginationPosition: Const.PAGINATION_POS_BOTTOM,\n hideSizePerPage: false,\n hidePageListOnlyOnePage: false,\n alwaysShowAllBtns: false,\n withFirstAndLast: true,\n keepSizePerPageState: false,\n onSizePerPageList: undefined,\n noDataText: undefined,\n withoutNoDataText: false,\n handleConfirmDeleteRow: undefined,\n prePage: Const.PRE_PAGE,\n nextPage: Const.NEXT_PAGE,\n firstPage: Const.FIRST_PAGE,\n lastPage: Const.LAST_PAGE,\n prePageTitle: Const.PRE_PAGE_TITLE,\n nextPageTitle: Const.NEXT_PAGE_TITLE,\n firstPageTitle: Const.FIRST_PAGE_TITLE,\n lastPageTitle: Const.LAST_PAGE_TITLE,\n pageStartIndex: 1,\n searchDelayTime: undefined,\n exportCSVText: Const.EXPORT_CSV_TEXT,\n insertText: Const.INSERT_BTN_TEXT,\n deleteText: Const.DELETE_BTN_TEXT,\n saveText: Const.SAVE_BTN_TEXT,\n closeText: Const.CLOSE_BTN_TEXT,\n ignoreEditable: false,\n defaultSearch: '',\n insertModalHeader: undefined,\n insertModalBody: undefined,\n insertModalFooter: undefined,\n insertModal: undefined,\n insertBtn: undefined,\n deleteBtn: undefined,\n showSelectedOnlyBtn: undefined,\n exportCSVBtn: undefined,\n clearSearchBtn: undefined,\n searchField: undefined,\n searchPanel: undefined,\n btnGroup: undefined,\n toolBar: undefined,\n sizePerPageDropDown: undefined,\n paginationPanel: undefined,\n searchPosition: 'right',\n expandRowBgColor: undefined,\n expandBy: Const.EXPAND_BY_ROW,\n expanding: [],\n onExpand: undefined,\n onlyOneExpanding: false,\n beforeShowError: undefined,\n printToolBar: true,\n insertFailIndicator: Const.INSERT_FAIL_INDICATOR\n },\n fetchInfo: {\n dataTotalSize: 0\n },\n exportCSV: false,\n csvFileName: 'spreadsheet.csv',\n ignoreSinglePage: false\n};\n\nexport default BootstrapTable;\n\n\n\n// WEBPACK FOOTER //\n// src/BootstrapTable.js","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}\n// module id = 2\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\nvar factory = require('./factory');\n\nvar REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\nfunction isValidElement(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nmodule.exports = factory(isValidElement);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/prop-types/index.js\n// module id = 3\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function (isValidElement) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n var ReactPropTypes;\n\n if (process.env.NODE_ENV !== 'production') {\n // Keep in sync with production version below\n ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker\n };\n } else {\n var productionTypeChecker = function () {\n invariant(false, 'React.PropTypes type checking code is stripped in production.');\n };\n productionTypeChecker.isRequired = productionTypeChecker;\n var getProductionTypeChecker = function () {\n return productionTypeChecker;\n };\n // Keep in sync with development version above\n ReactPropTypes = {\n array: productionTypeChecker,\n bool: productionTypeChecker,\n func: productionTypeChecker,\n number: productionTypeChecker,\n object: productionTypeChecker,\n string: productionTypeChecker,\n symbol: productionTypeChecker,\n\n any: productionTypeChecker,\n arrayOf: getProductionTypeChecker,\n element: productionTypeChecker,\n instanceOf: getProductionTypeChecker,\n node: productionTypeChecker,\n objectOf: getProductionTypeChecker,\n oneOf: getProductionTypeChecker,\n oneOfType: getProductionTypeChecker,\n shape: getProductionTypeChecker\n };\n }\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n if (process.env.NODE_ENV !== 'production') {\n if (secret !== ReactPropTypesSecret && typeof console !== 'undefined') {\n var cacheKey = componentName + ':' + propName;\n if (!manualPropTypeCallCache[cacheKey]) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will not work in production with the next major version. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName) : void 0;\n manualPropTypeCallCache[cacheKey] = true;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/prop-types/factory.js\n// module id = 4\n// module chunks = 0","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/~/node-libs-browser/~/process/browser.js\n// module id = 5\n// module chunks = 0","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/prop-types/~/fbjs/lib/emptyFunction.js\n// module id = 6\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/prop-types/~/fbjs/lib/invariant.js\n// module id = 7\n// module chunks = 0","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n (function () {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n })();\n}\n\nmodule.exports = warning;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/prop-types/~/fbjs/lib/warning.js\n// module id = 8\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/prop-types/lib/ReactPropTypesSecret.js\n// module id = 9\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nvar loggedTypeFailures = {};\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error) : void 0;\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '') : void 0;\n }\n }\n }\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/prop-types/checkPropTypes.js\n// module id = 10\n// module chunks = 0","/*!\n Copyright (c) 2016 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses.push(classNames.apply(null, arg));\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/classnames/index.js\n// module id = 11\n// module chunks = 0","const CONST_VAR = {\n SORT_DESC: 'desc',\n SORT_ASC: 'asc',\n AWAIT_BEFORE_CELL_EDIT: 1,\n SIZE_PER_PAGE: 10,\n NEXT_PAGE: '>',\n NEXT_PAGE_TITLE: 'next page',\n LAST_PAGE: '>>',\n LAST_PAGE_TITLE: 'last page',\n PRE_PAGE: '<',\n PRE_PAGE_TITLE: 'previous page',\n FIRST_PAGE: '<<',\n FIRST_PAGE_TITLE: 'first page',\n PAGE_START_INDEX: 1,\n ROW_SELECT_BG_COLOR: '',\n ROW_SELECT_NONE: 'none',\n ROW_SELECT_SINGLE: 'radio',\n ROW_SELECT_MULTI: 'checkbox',\n CELL_EDIT_NONE: 'none',\n CELL_EDIT_CLICK: 'click',\n CELL_EDIT_DBCLICK: 'dbclick',\n SIZE_PER_PAGE_LIST: [ 10, 25, 30, 50 ],\n PAGINATION_SIZE: 5,\n PAGINATION_POS_TOP: 'top',\n PAGINATION_POS_BOTTOM: 'bottom',\n PAGINATION_POS_BOTH: 'both',\n NO_DATA_TEXT: 'There is no data to display',\n SHOW_ONLY_SELECT: 'Show Selected Only',\n SHOW_ALL: 'Show All',\n EXPORT_CSV_TEXT: 'Export to CSV',\n INSERT_BTN_TEXT: 'New',\n DELETE_BTN_TEXT: 'Delete',\n SAVE_BTN_TEXT: 'Save',\n CLOSE_BTN_TEXT: 'Close',\n FILTER_DELAY: 500,\n SCROLL_TOP: 'Top',\n SCROLL_BOTTOM: 'Bottom',\n FILTER_TYPE: {\n TEXT: 'TextFilter',\n REGEX: 'RegexFilter',\n SELECT: 'SelectFilter',\n NUMBER: 'NumberFilter',\n DATE: 'DateFilter',\n CUSTOM: 'CustomFilter'\n },\n FILTER_COND_EQ: 'eq',\n FILTER_COND_LIKE: 'like',\n EXPAND_BY_ROW: 'row',\n EXPAND_BY_COL: 'column',\n REMOTE_SORT: 'sort',\n REMOTE_PAGE: 'pagination',\n REMOTE_CELL_EDIT: 'cellEdit',\n REMOTE_INSERT_ROW: 'insertRow',\n REMOTE_DROP_ROW: 'dropRow',\n REMOTE_FILTER: 'filter',\n REMOTE_SEARCH: 'search',\n REMOTE_EXPORT_CSV: 'exportCSV',\n INSERT_FAIL_INDICATOR: 'Validation errors, please check!'\n};\n\nCONST_VAR.REMOTE = {};\nCONST_VAR.REMOTE[CONST_VAR.REMOTE_SORT] = false;\nCONST_VAR.REMOTE[CONST_VAR.REMOTE_PAGE] = false;\nCONST_VAR.REMOTE[CONST_VAR.REMOTE_CELL_EDIT] = false;\nCONST_VAR.REMOTE[CONST_VAR.REMOTE_INSERT_ROW] = false;\nCONST_VAR.REMOTE[CONST_VAR.REMOTE_DROP_ROW] = false;\nCONST_VAR.REMOTE[CONST_VAR.REMOTE_FILTER] = false;\nCONST_VAR.REMOTE[CONST_VAR.REMOTE_SEARCH] = false;\nCONST_VAR.REMOTE[CONST_VAR.REMOTE_EXPORT_CSV] = false;\n\nexport default CONST_VAR;\n\n\n\n// WEBPACK FOOTER //\n// src/Const.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport Const from './Const';\nimport classSet from 'classnames';\nimport SelectRowHeaderColumn from './SelectRowHeaderColumn';\n\nclass Checkbox extends Component {\n componentDidMount() { this.update(this.props.checked); }\n componentWillReceiveProps(props) { this.update(props.checked); }\n update(checked) {\n ReactDOM.findDOMNode(this).indeterminate = checked === 'indeterminate';\n }\n render() {\n return (\n \n );\n }\n}\n\nfunction getSortOrder(sortList, field, enableSort) {\n if (!enableSort) return undefined;\n const result = sortList.filter(sortObj => {\n return sortObj.sortField === field;\n });\n if (result.length > 0) {\n return result[0].order;\n } else {\n return undefined;\n }\n}\n\nclass TableHeader extends Component {\n\n render() {\n const containerClasses = classSet(\n 'react-bs-container-header',\n 'table-header-wrapper',\n this.props.headerContainerClass);\n const tableClasses = classSet('table', 'table-hover', {\n 'table-bordered': this.props.bordered,\n 'table-condensed': this.props.condensed\n }, this.props.tableHeaderClass);\n\n const rowCount = Math.max(...React.Children.map(this.props.children, elm =>\n (elm && elm.props.row) ? Number(elm.props.row) : 0\n ));\n\n const rows = [];\n let rowKey = 0;\n\n rows[0] = [];\n rows[0].push( [\n this.props.expandColumnVisible &&\n this.props.expandColumnBeforeSelectColumn &&\n \n ], [\n this.renderSelectRowHeader(rowCount + 1, rowKey++)\n ], [\n this.props.expandColumnVisible &&\n !this.props.expandColumnBeforeSelectColumn &&\n \n ]);\n const { sortIndicator, sortList, onSort, reset } = this.props;\n\n React.Children.forEach(this.props.children, (elm) => {\n if (elm === null || elm === undefined) {\n // Skip null or undefined elements.\n return;\n }\n const { dataField, dataSort } = elm.props;\n const sort = getSortOrder(sortList, dataField, dataSort);\n const rowIndex = elm.props.row ? Number(elm.props.row) : 0;\n const rowSpan = elm.props.rowSpan ? Number(elm.props.rowSpan) : 1;\n if (rows[rowIndex] === undefined) {\n rows[rowIndex] = [];\n }\n if ((rowSpan + rowIndex) === (rowCount + 1)) {\n rows[rowIndex].push(React.cloneElement(\n elm, { reset, key: rowKey++, onSort, sort, sortIndicator, isOnlyHead: false }\n ));\n } else {\n rows[rowIndex].push(React.cloneElement(\n elm, { key: rowKey++, isOnlyHead: true }\n ));\n }\n });\n\n const trs = rows.map((row, indexRow)=>{\n return (\n \n { row }\n \n );\n });\n\n return (\n
\n \n { React.cloneElement(this.props.colGroups, { ref: 'headerGrp' }) }\n \n { trs }\n \n
\n
\n );\n }\n\n getHeaderColGrouop = () => {\n return this.refs.headerGrp.childNodes;\n }\n\n renderSelectRowHeader(rowCount, rowKey) {\n if (this.props.hideSelectColumn) {\n return null;\n } else if (this.props.customComponent) {\n const CustomComponent = this.props.customComponent;\n return (\n \n \n \n );\n } else if (this.props.rowSelectType === Const.ROW_SELECT_SINGLE) {\n return ();\n } else if (this.props.rowSelectType === Const.ROW_SELECT_MULTI) {\n return (\n \n \n \n );\n } else {\n return null;\n }\n }\n}\nTableHeader.propTypes = {\n headerContainerClass: PropTypes.string,\n tableHeaderClass: PropTypes.string,\n style: PropTypes.object,\n rowSelectType: PropTypes.string,\n onSort: PropTypes.func,\n onSelectAllRow: PropTypes.func,\n sortList: PropTypes.array,\n hideSelectColumn: PropTypes.bool,\n bordered: PropTypes.bool,\n condensed: PropTypes.bool,\n isFiltered: PropTypes.bool,\n isSelectAll: PropTypes.oneOf([ true, 'indeterminate', false ]),\n sortIndicator: PropTypes.bool,\n customComponent: PropTypes.func,\n colGroups: PropTypes.element,\n reset: PropTypes.bool,\n expandColumnVisible: PropTypes.bool,\n expandColumnComponent: PropTypes.func,\n expandColumnBeforeSelectColumn: PropTypes.bool\n};\n\nexport default TableHeader;\n\n\n\n// WEBPACK FOOTER //\n// src/TableHeader.js","module.exports = __WEBPACK_EXTERNAL_MODULE_14__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"ReactDOM\",\"commonjs2\":\"react-dom\",\"commonjs\":\"react-dom\",\"amd\":\"react-dom\"}\n// module id = 14\n// module chunks = 0","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nclass SelectRowHeaderColumn extends Component {\n\n render() {\n return (\n \n { this.props.children }\n \n );\n }\n}\nSelectRowHeaderColumn.propTypes = {\n children: PropTypes.node,\n rowCount: PropTypes.number\n};\nexport default SelectRowHeaderColumn;\n\n\n\n// WEBPACK FOOTER //\n// src/SelectRowHeaderColumn.js","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Utils from './util';\nimport Const from './Const';\nimport TableRow from './TableRow';\nimport TableColumn from './TableColumn';\nimport TableEditColumn from './TableEditColumn';\nimport classSet from 'classnames';\nimport ExpandComponent from './ExpandComponent';\n\nconst isFun = function(obj) {\n return obj && (typeof obj === 'function');\n};\n\nclass TableBody extends Component {\n constructor(props) {\n super(props);\n this.state = {\n currEditCell: null\n };\n }\n\n render() {\n const { cellEdit, beforeShowError, x, y, keyBoardNav } = this.props;\n const tableClasses = classSet('table', {\n 'table-striped': this.props.striped,\n 'table-bordered': this.props.bordered,\n 'table-hover': this.props.hover,\n 'table-condensed': this.props.condensed\n }, this.props.tableBodyClass);\n\n const noneditableRows = (cellEdit.nonEditableRows && cellEdit.nonEditableRows()) || [];\n const unselectable = this.props.selectRow.unselectable || [];\n const isSelectRowDefined = this._isSelectRowDefined();\n const tableHeader = Utils.renderColGroup(this.props.columns,\n this.props.selectRow, this.props.expandColumnOptions);\n const inputType = this.props.selectRow.mode === Const.ROW_SELECT_SINGLE ? 'radio' : 'checkbox';\n const CustomComponent = this.props.selectRow.customComponent;\n const enableKeyBoardNav = (keyBoardNav === true || typeof keyBoardNav === 'object');\n const customEditAndNavStyle = typeof keyBoardNav === 'object' ?\n keyBoardNav.customStyleOnEditCell :\n null;\n const customNavStyle = typeof keyBoardNav === 'object' ?\n keyBoardNav.customStyle :\n null;\n const ExpandColumnCustomComponent = this.props.expandColumnOptions.expandColumnComponent;\n let expandColSpan = this.props.columns.filter(col => col && !col.hidden).length;\n if (isSelectRowDefined && !this.props.selectRow.hideSelectColumn) {\n expandColSpan += 1;\n }\n let tabIndex = 1;\n if (this.props.expandColumnOptions.expandColumnVisible) {\n expandColSpan += 1;\n }\n\n let tableRows = this.props.data.map(function(data, r) {\n const tableColumns = this.props.columns.filter(_ => _ != null).map(function(column, i) {\n const fieldValue = data[column.name];\n const isFocusCell = r === y && i === x;\n if (column.name !== this.props.keyField && // Key field can't be edit\n column.editable && // column is editable? default is true, user can set it false\n column.editable.readOnly !== true &&\n this.state.currEditCell !== null &&\n this.state.currEditCell.rid === r &&\n this.state.currEditCell.cid === i &&\n noneditableRows.indexOf(data[this.props.keyField]) === -1) {\n let editable = column.editable;\n const format = column.format ? function(value) {\n return column.format(value, data, column.formatExtraData, r).replace(/<.*?>/g, '');\n } : false;\n if (isFun(column.editable)) {\n editable = column.editable(fieldValue, data, r, i);\n }\n\n return (\n \n );\n } else {\n // add by bluespring for className customize\n let columnChild = fieldValue && fieldValue.toString();\n let columnTitle = null;\n let tdClassName = column.className;\n if (isFun(column.className)) {\n tdClassName = column.className(fieldValue, data, r, i);\n }\n\n if (typeof column.format !== 'undefined') {\n const formattedValue = column.format(fieldValue, data, column.formatExtraData, r);\n if (!React.isValidElement(formattedValue)) {\n columnChild = (\n
\n );\n } else {\n columnChild = formattedValue;\n columnTitle = column.columnTitle && formattedValue ? formattedValue.toString() : null;\n }\n } else {\n columnTitle = column.columnTitle && fieldValue ? fieldValue.toString() : null;\n }\n return (\n \n );\n }\n }, this);\n const key = data[this.props.keyField];\n const disable = unselectable.indexOf(key) !== -1;\n const selected = this.props.selectedRowKeys.indexOf(key) !== -1;\n const selectRowColumn = isSelectRowDefined && !this.props.selectRow.hideSelectColumn ?\n this.renderSelectRowColumn(selected, inputType, disable, CustomComponent, r, data) : null;\n const expandedRowColumn = this.renderExpandRowColumn(\n this.props.expandableRow && this.props.expandableRow(data),\n this.props.expanding.indexOf(key) > -1,\n ExpandColumnCustomComponent, r, data\n );\n // add by bluespring for className customize\n let trClassName = this.props.trClassName;\n if (isFun(this.props.trClassName)) {\n trClassName = this.props.trClassName(data, r);\n }\n const result = [ \n { this.props.expandColumnOptions.expandColumnVisible &&\n this.props.expandColumnOptions.expandColumnBeforeSelectColumn &&\n expandedRowColumn }\n { selectRowColumn }\n { this.props.expandColumnOptions.expandColumnVisible &&\n !this.props.expandColumnOptions.expandColumnBeforeSelectColumn &&\n expandedRowColumn }\n { tableColumns }\n ];\n\n if (this.props.expandableRow && this.props.expandableRow(data)) {\n result.push(\n