From 213b512a40bcceae52dc687d0361c9380736edbb Mon Sep 17 00:00:00 2001 From: staminaloops Date: Thu, 31 Dec 2015 19:34:17 +0000 Subject: [PATCH 1/3] updated react-router version and locked history version to 1.17.0 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9668af18d..c4a6141f3 100644 --- a/package.json +++ b/package.json @@ -41,14 +41,14 @@ "gulp-babel": "^5.3.0", "gulp-concat-css": "^2.2.0", "gulp-cssmin": "^0.1.7", - "history": "1.12.5", + "history": "1.17.0", "jquery": "^2.1.4", "jsx-loader": "^0.13.2", "react": "^0.14.0", "react-bootstrap": "^0.27.2", "react-dom": "^0.14.0", "react-hot-loader": "^1.3.0", - "react-router": "^1.0.0-rc3", + "react-router": "^1.0.2", "react-router-bootstrap": "^0.19.2", "style-loader": "^0.13.0", "toastr": "^2.1.2", From c57639140abd6750f0cf7e079614bb7de6feb8e0 Mon Sep 17 00:00:00 2001 From: staminaloops Date: Sun, 3 Jan 2016 16:12:54 +0000 Subject: [PATCH 2/3] updated react-toastr --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c4a6141f3..9b9c1d64b 100644 --- a/package.json +++ b/package.json @@ -58,8 +58,8 @@ "webpack-dev-server": "^1.12.1" }, "dependencies": { - "react-toastr": "^2.2.2", - "classnames": "^2.1.2" + "classnames": "^2.1.2", + "react-toastr": "^2.3.0" }, "peerDependencies": { "react": "^0.14.0" From 36c5ba354eba95c9fd30a315c687760c8a7df16e Mon Sep 17 00:00:00 2001 From: staminaloops Date: Sun, 3 Jan 2016 16:14:25 +0000 Subject: [PATCH 3/3] prod bundle --- dist/react-bootstrap-table.min.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/react-bootstrap-table.min.js b/dist/react-bootstrap-table.min.js index d1efe743d..927cfecc5 100644 --- a/dist/react-bootstrap-table.min.js +++ b/dist/react-bootstrap-table.min.js @@ -1,8 +1,8 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ReactBootstrapTable=t(require("react"),require("react-dom")):e.ReactBootstrapTable=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),i=n(o),a=r(39),s=n(a),l=r(33);"undefined"!=typeof window&&(window.BootstrapTable=i["default"],window.TableHeaderColumn=s["default"],window.TableDataSet=l.TableDataSet),t["default"]={BootstrapTable:i["default"],TableHeaderColumn:s["default"],TableDataSet:l.TableDataSet},e.exports=t["default"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;rr.refs.body.refs.container.clientHeight)},this._attachCellEditFunc(),Array.isArray(this.props.data)?this.store=new T.TableDataStore(this.props.data):(this.store=new T.TableDataStore(this.props.data.getData()),this.props.data.clear(),this.props.data.on("change",function(e){r.store.setData(e),r.setState({data:r.getTableData(r.props)})})),this.initTable(this.props),this.props.selectRow&&this.props.selectRow.selected&&this.store.setSelectedRowKey(this.props.selectRow.selected),this.state={data:this.getTableData(this.props),selectedRowKeys:this.store.getSelectedRowKeys()}}return i(t,e),a(t,[{key:"initTable",value:function(e){var t=e.keyField,r={};if("string"==typeof t&&t.length||u["default"].Children.forEach(e.children,function(e){if(e.props.isKey){if(null!=t)throw"Error. Multiple key column be detected in TableHeaderColumn.";t=e.props.dataField}},this),u["default"].Children.forEach(e.children,function(e){e.props.sortFunc&&(r[e.props.dataField]=e.props.sortFunc)},this),null==t)throw"Error. No any key column defined in TableHeaderColumn.Use 'isKey={true}' to specify an unique column after version 0.5.4.";this.store.setProps({isPagination:e.pagination,keyField:t,customSortFuncMap:r,multiColumnSearch:e.multiColumnSearch,remote:this.isRemoteDataSource()})}},{key:"getTableData",value:function(e){var t=[];if(e.pagination){var r=e.options.page,n=e.options.sizePerPage;r||(r=this.refs.pagination?this.refs.pagination.getCurrentPage():1),n||(n=this.refs.pagination?this.refs.pagination.getSizePerPage():f["default"].SIZE_PER_PAGE),r>=e.data.length/n&&(r=1),t=this.store.page(r,n).get()}else t=this.store.get();return t}},{key:"componentWillReceiveProps",value:function(e){if(this.initTable(e),Array.isArray(e.data)){this.store.setData(e.data);var t=this.getTableData(e);this.setState({data:t})}e.selectRow&&e.selectRow.selected&&(this.store.setSelectedRowKey(e.selectRow.selected),this.setState({selectedRowKeys:e.selectRow.selected}))}},{key:"componentDidMount",value:function(){this._adjustHeaderWidth(),window.addEventListener("resize",this._adjustHeaderWidth),this.refs.body.refs.container.addEventListener("scroll",this._scrollHeader)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this._adjustHeaderWidth),this.refs.body.refs.container.removeEventListener("scroll",this._scrollHeader)}},{key:"componentDidUpdate",value:function(){this._adjustHeaderWidth(),this._attachCellEditFunc(),this.props.options.afterTableComplete&&this.props.options.afterTableComplete()}},{key:"_attachCellEditFunc",value:function(){this.props.cellEdit&&(this.props.cellEdit.__onCompleteEdit__=this.handleEditCell.bind(this),this.props.cellEdit.mode!==f["default"].CELL_EDIT_NONE&&(this.props.selectRow.clickToSelect=!1))}},{key:"isRemoteDataSource",value:function(e){return(e||this.props).remote}},{key:"render",value:function(){var e=(d["default"]("react-bs-table"),this.props.children),t={height:this.props.height};Array.isArray(this.props.children)||(e=[this.props.children]);var r=e.map(function(e,t){return{name:e.props.dataField,align:e.props.dataAlign,sort:e.props.dataSort,format:e.props.dataFormat,editable:e.props.editable,hidden:e.props.hidden,className:e.props.columnClassName,width:e.props.width,text:e.props.children,index:t}},this),n=this.renderPagination(),o=this.renderToolBar(),i=this.renderTableFilter(r),a=this.isSelectAll();return u["default"].createElement("div",{className:"react-bs-container",ref:"table"},o,u["default"].createElement("div",{className:"react-bs-table-container",style:t},u["default"].createElement(v["default"],{ref:"header",rowSelectType:this.props.selectRow.mode,hideSelectColumn:this.props.selectRow.hideSelectColumn,sortName:this.props.options.sortName,sortOrder:this.props.options.sortOrder,onSort:this.handleSort.bind(this),onSelectAllRow:this.handleSelectAllRow.bind(this),bordered:this.props.bordered,condensed:this.props.condensed,isSelectAll:a},this.props.children),u["default"].createElement(m["default"],{height:this.props.height,ref:"body",data:this.state.data,columns:r,trClassName:this.props.trClassName,striped:this.props.striped,bordered:this.props.bordered,hover:this.props.hover,keyField:this.store.getKeyField(),condensed:this.props.condensed,selectRow:this.props.selectRow,cellEdit:this.props.cellEdit,selectedRowKeys:this.state.selectedRowKeys,onRowClick:this.handleRowClick.bind(this),onSelectRow:this.handleSelectRow.bind(this),noDataText:this.props.options.noDataText})),i,n)}},{key:"isSelectAll",value:function(){var e=this.store.getSelectedRowKeys(),t=this.store.getAllRowkey();return e.length!==t.length?0===e.length?!1:"indeterminate":!0}},{key:"handleSort",value:function(e,t){if(this.props.options.onSortChange&&this.props.options.onSortChange(t,e,this.props),!this.isRemoteDataSource()){var r=this.store.sort(e,t).get();this.setState({data:r})}}},{key:"handlePaginationData",value:function(e,t){var r=this.props.options.onPageChange;if(r&&r(e,t),!this.isRemoteDataSource()){var n=this.store.page(e,t).get();this.setState({data:n})}}},{key:"handleRowClick",value:function(e){this.props.options.onRowClick&&this.props.options.onRowClick(e)}},{key:"handleSelectAllRow",value:function(e){var t=e.currentTarget.checked,r=[],n=!0;this.props.selectRow.onSelectAll&&(n=this.props.selectRow.onSelectAll(t,t?this.store.get():[])),("undefined"==typeof n||n!==!1)&&(t&&(r=this.store.getAllRowkey()),this.store.setSelectedRowKey(r),this.setState({selectedRowKeys:r}))}},{key:"handleSelectRow",value:function(e,t){var r=this.store.getSelectedRowKeys(),n=e[this.store.getKeyField()],o=!0;this.props.selectRow.onSelect&&(o=this.props.selectRow.onSelect(e,t)),("undefined"==typeof o||o!==!1)&&(this.props.selectRow.mode===f["default"].ROW_SELECT_SINGLE?r=t?[n]:[]:t?r.push(n):r=r.filter(function(e){return n!==e}),this.store.setSelectedRowKey(r),this.setState({selectedRowKeys:r}))}},{key:"handleEditCell",value:function(e,t,r){var n=void 0;u["default"].Children.forEach(this.props.children,function(e,t){return t==r?(n=e.props.dataField,!1):void 0});var o=this.store.edit(e,t,n).get();this.setState({data:o}),this.props.cellEdit.afterSaveCell&&this.props.cellEdit.afterSaveCell(this.state.data[t],n,e)}},{key:"handleAddRowBegin",value:function(){this.refs.body}},{key:"handleAddRow",value:function(e){var t=void 0;try{this.store.add(e)}catch(r){return r}if(this.props.pagination){var n=this.refs.pagination.getSizePerPage(),o=Math.ceil(this.store.getDataNum()/n);t=this.store.page(o,n).get(),this.setState({data:t}),this.refs.pagination.changePage(o)}else t=this.store.get(),this.setState({data:t});this.props.options.afterInsertRow&&this.props.options.afterInsertRow(e)}},{key:"getSizePerPage",value:function(){return this.props.pagination?this.refs.pagination.getSizePerPage():void 0}},{key:"getCurrentPage",value:function(){return this.props.pagination?this.refs.pagination.getCurrentPage():void 0}},{key:"handleDropRow",value:function(e){var t=void 0,r=e?e:this.store.getSelectedRowKeys();if(!(r&&r.length>0)||confirm("Are you sure want delete?")){if(this.store.remove(r),this.store.setSelectedRowKey([]),this.props.pagination){var n=this.refs.pagination.getSizePerPage(),o=Math.ceil(this.store.getDataNum()/n),i=this.refs.pagination.getCurrentPage();i>o&&(i=o),t=this.store.page(i,n).get(),this.setState({data:t,selectedRowKeys:this.store.getSelectedRowKeys()}),this.refs.pagination.changePage(i)}else t=this.store.get(),this.setState({data:t,selectedRowKeys:this.store.getSelectedRowKeys()});this.props.options.afterDeleteRow&&this.props.options.afterDeleteRow(r)}}},{key:"handleFilterData",value:function(e){this.store.filter(e);var t=void 0;if(this.props.pagination){var r=this.refs.pagination.getSizePerPage();t=this.store.page(1,r).get(),this.refs.pagination.changePage(1)}else t=this.store.get();this.props.options.afterColumnFilter&&this.props.options.afterColumnFilter(e,this.store.getDataIgnoringPagination()),this.setState({data:t})}},{key:"handleExportCSV",value:function(){var e=this.store.getDataIgnoringPagination(),t=[];this.props.children.map(function(e){e.props.hidden===!1&&t.push(e.props.dataField)}),O["default"](e,t,this.props.csvFileName)}},{key:"handleSearch",value:function(e){this.store.search(e);var t=void 0;if(this.props.pagination){var r=this.refs.pagination.getSizePerPage();t=this.store.page(1,r).get(),this.refs.pagination.changePage(1)}else t=this.store.get();this.props.options.afterSearch&&this.props.options.afterSearch(e,this.store.getDataIgnoringPagination()),this.setState({data:t})}},{key:"renderPagination",value:function(){if(this.props.pagination){var e=void 0;return e=this.isRemoteDataSource()?this.props.fetchInfo.dataTotalSize:this.store.getDataNum(),u["default"].createElement("div",null,u["default"].createElement(b["default"],{ref:"pagination",currPage:this.props.options.page||1,changePage:this.handlePaginationData.bind(this),sizePerPage:this.props.options.sizePerPage||f["default"].SIZE_PER_PAGE_LIST[0],sizePerPageList:this.props.options.sizePerPageList||f["default"].SIZE_PER_PAGE_LIST,paginationSize:this.props.options.paginationSize||f["default"].PAGINATION_SIZE,remote:this.isRemoteDataSource(),dataSize:e,onSizePerPageList:this.props.options.onSizePerPageList}))}return null}},{key:"renderToolBar",value:function(){var e=void 0;return e=Array.isArray(this.props.children)?this.props.children.map(function(e){var t=e.props;return{name:t.children,field:t.dataField,autoValue:t.autoValue||!1,editable:t.editable&&"function"==typeof t.editable?t.editable():t.editable,format:t.format?format:!1}}):[{name:this.props.children.props.children,field:this.props.children.props.dataField,editable:this.props.children.props.editable}],this.props.insertRow||this.props.deleteRow||this.props.search||this.props.exportCSV?u["default"].createElement("div",{className:"tool-bar"},u["default"].createElement(E["default"],{enableInsert:this.props.insertRow,enableDelete:this.props.deleteRow,enableSearch:this.props.search,enableExportCSV:this.props.exportCSV,columns:e,searchPlaceholder:this.props.searchPlaceholder,onAddRow:this.handleAddRow.bind(this),onAddRowBegin:this.handleAddRowBegin.bind(this),onDropRow:this.handleDropRow.bind(this),onSearch:this.handleSearch.bind(this),onExportCSV:this.handleExportCSV.bind(this)})):null}},{key:"renderTableFilter",value:function(e){return this.props.columnFilter?u["default"].createElement(P["default"],{columns:e,rowSelectType:this.props.selectRow.mode,onFilter:this.handleFilterData.bind(this)}):null}}]),t}(u["default"].Component);C.propTypes={keyField:u["default"].PropTypes.string,height:u["default"].PropTypes.string,data:u["default"].PropTypes.oneOfType([u["default"].PropTypes.array,u["default"].PropTypes.object]),remote:u["default"].PropTypes.bool,striped:u["default"].PropTypes.bool,bordered:u["default"].PropTypes.bool,hover:u["default"].PropTypes.bool,condensed:u["default"].PropTypes.bool,pagination:u["default"].PropTypes.bool,searchPlaceholder:u["default"].PropTypes.string,selectRow:u["default"].PropTypes.shape({mode:u["default"].PropTypes.string,bgColor:u["default"].PropTypes.string,selected:u["default"].PropTypes.array,onSelect:u["default"].PropTypes.func,onSelectAll:u["default"].PropTypes.func,clickToSelect:u["default"].PropTypes.bool,hideSelectColumn:u["default"].PropTypes.bool,clickToSelectAndEditCell:u["default"].PropTypes.bool}),cellEdit:u["default"].PropTypes.shape({mode:u["default"].PropTypes.string,blurToSave:u["default"].PropTypes.bool,afterSaveCell:u["default"].PropTypes.func}),insertRow:u["default"].PropTypes.bool,deleteRow:u["default"].PropTypes.bool,search:u["default"].PropTypes.bool,columnFilter:u["default"].PropTypes.bool,trClassName:u["default"].PropTypes.any,options:u["default"].PropTypes.shape({sortName:u["default"].PropTypes.string,sortOrder:u["default"].PropTypes.string,afterTableComplete:u["default"].PropTypes.func,afterDeleteRow:u["default"].PropTypes.func,afterInsertRow:u["default"].PropTypes.func,afterSearch:u["default"].PropTypes.func,afterColumnFilter:u["default"].PropTypes.func,onRowClick:u["default"].PropTypes.func,page:u["default"].PropTypes.number,sizePerPageList:u["default"].PropTypes.array,sizePerPage:u["default"].PropTypes.number,paginationSize:u["default"].PropTypes.number,onSortChange:u["default"].PropTypes.func,onPageChange:u["default"].PropTypes.func,onSizePerPageList:u["default"].PropTypes.func,noDataText:u["default"].PropTypes.string}),fetchInfo:u["default"].PropTypes.shape({dataTotalSize:u["default"].PropTypes.number}),exportCSV:u["default"].PropTypes.bool,csvFileName:u["default"].PropTypes.string},C.defaultProps={height:"100%",striped:!1,bordered:!0,hover:!1,condensed:!1,pagination:!1,searchPlaceholder:void 0,selectRow:{mode:f["default"].ROW_SELECT_NONE,bgColor:f["default"].ROW_SELECT_BG_COLOR,selected:[],onSelect:void 0,onSelectAll:void 0,clickToSelect:!1,hideSelectColumn:!1,clickToSelectAndEditCell:!1},cellEdit:{mode:f["default"].CELL_EDIT_NONE,blurToSave:!1,afterSaveCell:void 0},insertRow:!1,deleteRow:!1,search:!1,multiColumnSearch:!1,columnFilter:!1,trClassName:"",options:{sortName:void 0,sortOrder:f["default"].SORT_DESC,afterTableComplete:void 0,afterDeleteRow:void 0,afterInsertRow:void 0,afterSearch:void 0,afterColumnFilter:void 0,onRowClick:void 0,page:void 0,sizePerPageList:f["default"].SIZE_PER_PAGE_LIST,sizePerPage:void 0,paginationSize:f["default"].PAGINATION_SIZE,onSizePerPageList:void 0,noDataText:void 0},fetchInfo:{dataTotalSize:0},exportCSV:!1,csvFileName:void 0},t["default"]=C,e.exports=t["default"]},function(t,r){t.exports=e},function(e,t,r){var n;/*! +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ReactBootstrapTable=t(require("react"),require("react-dom")):e.ReactBootstrapTable=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),i=n(o),a=r(39),s=n(a),l=r(33);"undefined"!=typeof window&&(window.BootstrapTable=i["default"],window.TableHeaderColumn=s["default"],window.TableDataSet=l.TableDataSet),t["default"]={BootstrapTable:i["default"],TableHeaderColumn:s["default"],TableDataSet:l.TableDataSet},e.exports=t["default"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;rr.refs.body.refs.container.clientHeight)},this._attachCellEditFunc(),Array.isArray(this.props.data)?this.store=new T.TableDataStore(this.props.data):(this.store=new T.TableDataStore(this.props.data.getData()),this.props.data.clear(),this.props.data.on("change",function(e){r.store.setData(e),r.setState({data:r.getTableData(r.props)})})),this.initTable(this.props),this.props.selectRow&&this.props.selectRow.selected&&this.store.setSelectedRowKey(this.props.selectRow.selected),this.state={data:this.getTableData(this.props),selectedRowKeys:this.store.getSelectedRowKeys()}}return i(t,e),a(t,[{key:"initTable",value:function(e){var t=e.keyField,r={};if("string"==typeof t&&t.length||u["default"].Children.forEach(e.children,function(e){if(e.props.isKey){if(null!=t)throw"Error. Multiple key column be detected in TableHeaderColumn.";t=e.props.dataField}},this),u["default"].Children.forEach(e.children,function(e){e.props.sortFunc&&(r[e.props.dataField]=e.props.sortFunc)},this),null==t)throw"Error. No any key column defined in TableHeaderColumn.Use 'isKey={true}' to specify an unique column after version 0.5.4.";this.store.setProps({isPagination:e.pagination,keyField:t,customSortFuncMap:r,multiColumnSearch:e.multiColumnSearch,remote:this.isRemoteDataSource()})}},{key:"getTableData",value:function(e){var t=[];if(e.pagination){var r=e.options.page,n=e.options.sizePerPage;r||(r=this.refs.pagination?this.refs.pagination.getCurrentPage():1),n||(n=this.refs.pagination?this.refs.pagination.getSizePerPage():f["default"].SIZE_PER_PAGE),r>=e.data.length/n&&(r=1),t=this.store.page(r,n).get()}else t=this.store.get();return t}},{key:"componentWillReceiveProps",value:function(e){if(this.initTable(e),Array.isArray(e.data)){this.store.setData(e.data);var t=this.getTableData(e);this.setState({data:t})}e.selectRow&&e.selectRow.selected&&(this.store.setSelectedRowKey(e.selectRow.selected),this.setState({selectedRowKeys:e.selectRow.selected}))}},{key:"componentDidMount",value:function(){this._adjustHeaderWidth(),window.addEventListener("resize",this._adjustHeaderWidth),this.refs.body.refs.container.addEventListener("scroll",this._scrollHeader)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this._adjustHeaderWidth),this.refs.body.refs.container.removeEventListener("scroll",this._scrollHeader)}},{key:"componentDidUpdate",value:function(){this._adjustHeaderWidth(),this._attachCellEditFunc(),this.props.options.afterTableComplete&&this.props.options.afterTableComplete()}},{key:"_attachCellEditFunc",value:function(){this.props.cellEdit&&(this.props.cellEdit.__onCompleteEdit__=this.handleEditCell.bind(this),this.props.cellEdit.mode!==f["default"].CELL_EDIT_NONE&&(this.props.selectRow.clickToSelect=!1))}},{key:"isRemoteDataSource",value:function(e){return(e||this.props).remote}},{key:"render",value:function(){var e=((0,d["default"])("react-bs-table"),this.props.children),t={height:this.props.height};Array.isArray(this.props.children)||(e=[this.props.children]);var r=e.map(function(e,t){return{name:e.props.dataField,align:e.props.dataAlign,sort:e.props.dataSort,format:e.props.dataFormat,editable:e.props.editable,hidden:e.props.hidden,className:e.props.columnClassName,width:e.props.width,text:e.props.children,index:t}},this),n=this.renderPagination(),o=this.renderToolBar(),i=this.renderTableFilter(r),a=this.isSelectAll();return u["default"].createElement("div",{className:"react-bs-container",ref:"table"},o,u["default"].createElement("div",{className:"react-bs-table-container",style:t},u["default"].createElement(v["default"],{ref:"header",rowSelectType:this.props.selectRow.mode,hideSelectColumn:this.props.selectRow.hideSelectColumn,sortName:this.props.options.sortName,sortOrder:this.props.options.sortOrder,onSort:this.handleSort.bind(this),onSelectAllRow:this.handleSelectAllRow.bind(this),bordered:this.props.bordered,condensed:this.props.condensed,isSelectAll:a},this.props.children),u["default"].createElement(m["default"],{height:this.props.height,ref:"body",data:this.state.data,columns:r,trClassName:this.props.trClassName,striped:this.props.striped,bordered:this.props.bordered,hover:this.props.hover,keyField:this.store.getKeyField(),condensed:this.props.condensed,selectRow:this.props.selectRow,cellEdit:this.props.cellEdit,selectedRowKeys:this.state.selectedRowKeys,onRowClick:this.handleRowClick.bind(this),onSelectRow:this.handleSelectRow.bind(this),noDataText:this.props.options.noDataText})),i,n)}},{key:"isSelectAll",value:function(){var e=this.store.getSelectedRowKeys(),t=this.store.getAllRowkey();return e.length!==t.length?0===e.length?!1:"indeterminate":!0}},{key:"handleSort",value:function(e,t){if(this.props.options.onSortChange&&this.props.options.onSortChange(t,e,this.props),!this.isRemoteDataSource()){var r=this.store.sort(e,t).get();this.setState({data:r})}}},{key:"handlePaginationData",value:function(e,t){var r=this.props.options.onPageChange;if(r&&r(e,t),!this.isRemoteDataSource()){var n=this.store.page(e,t).get();this.setState({data:n})}}},{key:"handleRowClick",value:function(e){this.props.options.onRowClick&&this.props.options.onRowClick(e)}},{key:"handleSelectAllRow",value:function(e){var t=e.currentTarget.checked,r=[],n=!0;this.props.selectRow.onSelectAll&&(n=this.props.selectRow.onSelectAll(t,t?this.store.get():[])),("undefined"==typeof n||n!==!1)&&(t&&(r=this.store.getAllRowkey()),this.store.setSelectedRowKey(r),this.setState({selectedRowKeys:r}))}},{key:"handleSelectRow",value:function(e,t){var r=this.store.getSelectedRowKeys(),n=e[this.store.getKeyField()],o=!0;this.props.selectRow.onSelect&&(o=this.props.selectRow.onSelect(e,t)),("undefined"==typeof o||o!==!1)&&(this.props.selectRow.mode===f["default"].ROW_SELECT_SINGLE?r=t?[n]:[]:t?r.push(n):r=r.filter(function(e){return n!==e}),this.store.setSelectedRowKey(r),this.setState({selectedRowKeys:r}))}},{key:"handleEditCell",value:function(e,t,r){var n=void 0;u["default"].Children.forEach(this.props.children,function(e,t){return t==r?(n=e.props.dataField,!1):void 0});var o=this.store.edit(e,t,n).get();this.setState({data:o}),this.props.cellEdit.afterSaveCell&&this.props.cellEdit.afterSaveCell(this.state.data[t],n,e)}},{key:"handleAddRowBegin",value:function(){this.refs.body}},{key:"handleAddRow",value:function(e){var t=void 0;try{this.store.add(e)}catch(r){return r}if(this.props.pagination){var n=this.refs.pagination.getSizePerPage(),o=Math.ceil(this.store.getDataNum()/n);t=this.store.page(o,n).get(),this.setState({data:t}),this.refs.pagination.changePage(o)}else t=this.store.get(),this.setState({data:t});this.props.options.afterInsertRow&&this.props.options.afterInsertRow(e)}},{key:"getSizePerPage",value:function(){return this.props.pagination?this.refs.pagination.getSizePerPage():void 0}},{key:"getCurrentPage",value:function(){return this.props.pagination?this.refs.pagination.getCurrentPage():void 0}},{key:"handleDropRow",value:function(e){var t=void 0,r=e?e:this.store.getSelectedRowKeys();if(!(r&&r.length>0)||confirm("Are you sure want delete?")){if(this.store.remove(r),this.store.setSelectedRowKey([]),this.props.pagination){var n=this.refs.pagination.getSizePerPage(),o=Math.ceil(this.store.getDataNum()/n),i=this.refs.pagination.getCurrentPage();i>o&&(i=o),t=this.store.page(i,n).get(),this.setState({data:t,selectedRowKeys:this.store.getSelectedRowKeys()}),this.refs.pagination.changePage(i)}else t=this.store.get(),this.setState({data:t,selectedRowKeys:this.store.getSelectedRowKeys()});this.props.options.afterDeleteRow&&this.props.options.afterDeleteRow(r)}}},{key:"handleFilterData",value:function(e){this.store.filter(e);var t=void 0;if(this.props.pagination){var r=this.refs.pagination.getSizePerPage();t=this.store.page(1,r).get(),this.refs.pagination.changePage(1)}else t=this.store.get();this.props.options.afterColumnFilter&&this.props.options.afterColumnFilter(e,this.store.getDataIgnoringPagination()),this.setState({data:t})}},{key:"handleExportCSV",value:function(){var e=this.store.getDataIgnoringPagination(),t=[];this.props.children.map(function(e){e.props.hidden===!1&&t.push(e.props.dataField)}),(0,O["default"])(e,t,this.props.csvFileName)}},{key:"handleSearch",value:function(e){this.store.search(e);var t=void 0;if(this.props.pagination){var r=this.refs.pagination.getSizePerPage();t=this.store.page(1,r).get(),this.refs.pagination.changePage(1)}else t=this.store.get();this.props.options.afterSearch&&this.props.options.afterSearch(e,this.store.getDataIgnoringPagination()),this.setState({data:t})}},{key:"renderPagination",value:function(){if(this.props.pagination){var e=void 0;return e=this.isRemoteDataSource()?this.props.fetchInfo.dataTotalSize:this.store.getDataNum(),u["default"].createElement("div",null,u["default"].createElement(b["default"],{ref:"pagination",currPage:this.props.options.page||1,changePage:this.handlePaginationData.bind(this),sizePerPage:this.props.options.sizePerPage||f["default"].SIZE_PER_PAGE_LIST[0],sizePerPageList:this.props.options.sizePerPageList||f["default"].SIZE_PER_PAGE_LIST,paginationSize:this.props.options.paginationSize||f["default"].PAGINATION_SIZE,remote:this.isRemoteDataSource(),dataSize:e,onSizePerPageList:this.props.options.onSizePerPageList}))}return null}},{key:"renderToolBar",value:function(){var e=void 0;return e=Array.isArray(this.props.children)?this.props.children.map(function(e){var t=e.props;return{name:t.children,field:t.dataField,autoValue:t.autoValue||!1,editable:t.editable&&"function"==typeof t.editable?t.editable():t.editable,format:t.format?format:!1}}):[{name:this.props.children.props.children,field:this.props.children.props.dataField,editable:this.props.children.props.editable}],this.props.insertRow||this.props.deleteRow||this.props.search||this.props.exportCSV?u["default"].createElement("div",{className:"tool-bar"},u["default"].createElement(E["default"],{enableInsert:this.props.insertRow,enableDelete:this.props.deleteRow,enableSearch:this.props.search,enableExportCSV:this.props.exportCSV,columns:e,searchPlaceholder:this.props.searchPlaceholder,onAddRow:this.handleAddRow.bind(this),onAddRowBegin:this.handleAddRowBegin.bind(this),onDropRow:this.handleDropRow.bind(this),onSearch:this.handleSearch.bind(this),onExportCSV:this.handleExportCSV.bind(this)})):null}},{key:"renderTableFilter",value:function(e){return this.props.columnFilter?u["default"].createElement(P["default"],{columns:e,rowSelectType:this.props.selectRow.mode,onFilter:this.handleFilterData.bind(this)}):null}}]),t}(u["default"].Component);C.propTypes={keyField:u["default"].PropTypes.string,height:u["default"].PropTypes.string,data:u["default"].PropTypes.oneOfType([u["default"].PropTypes.array,u["default"].PropTypes.object]),remote:u["default"].PropTypes.bool,striped:u["default"].PropTypes.bool,bordered:u["default"].PropTypes.bool,hover:u["default"].PropTypes.bool,condensed:u["default"].PropTypes.bool,pagination:u["default"].PropTypes.bool,searchPlaceholder:u["default"].PropTypes.string,selectRow:u["default"].PropTypes.shape({mode:u["default"].PropTypes.string,bgColor:u["default"].PropTypes.string,selected:u["default"].PropTypes.array,onSelect:u["default"].PropTypes.func,onSelectAll:u["default"].PropTypes.func,clickToSelect:u["default"].PropTypes.bool,hideSelectColumn:u["default"].PropTypes.bool,clickToSelectAndEditCell:u["default"].PropTypes.bool}),cellEdit:u["default"].PropTypes.shape({mode:u["default"].PropTypes.string,blurToSave:u["default"].PropTypes.bool,afterSaveCell:u["default"].PropTypes.func}),insertRow:u["default"].PropTypes.bool,deleteRow:u["default"].PropTypes.bool,search:u["default"].PropTypes.bool,columnFilter:u["default"].PropTypes.bool,trClassName:u["default"].PropTypes.any,options:u["default"].PropTypes.shape({sortName:u["default"].PropTypes.string,sortOrder:u["default"].PropTypes.string,afterTableComplete:u["default"].PropTypes.func,afterDeleteRow:u["default"].PropTypes.func,afterInsertRow:u["default"].PropTypes.func,afterSearch:u["default"].PropTypes.func,afterColumnFilter:u["default"].PropTypes.func,onRowClick:u["default"].PropTypes.func,page:u["default"].PropTypes.number,sizePerPageList:u["default"].PropTypes.array,sizePerPage:u["default"].PropTypes.number,paginationSize:u["default"].PropTypes.number,onSortChange:u["default"].PropTypes.func,onPageChange:u["default"].PropTypes.func,onSizePerPageList:u["default"].PropTypes.func,noDataText:u["default"].PropTypes.string}),fetchInfo:u["default"].PropTypes.shape({dataTotalSize:u["default"].PropTypes.number}),exportCSV:u["default"].PropTypes.bool,csvFileName:u["default"].PropTypes.string},C.defaultProps={height:"100%",striped:!1,bordered:!0,hover:!1,condensed:!1,pagination:!1,searchPlaceholder:void 0,selectRow:{mode:f["default"].ROW_SELECT_NONE,bgColor:f["default"].ROW_SELECT_BG_COLOR,selected:[],onSelect:void 0,onSelectAll:void 0,clickToSelect:!1,hideSelectColumn:!1,clickToSelectAndEditCell:!1},cellEdit:{mode:f["default"].CELL_EDIT_NONE,blurToSave:!1,afterSaveCell:void 0},insertRow:!1,deleteRow:!1,search:!1,multiColumnSearch:!1,columnFilter:!1,trClassName:"",options:{sortName:void 0,sortOrder:f["default"].SORT_DESC,afterTableComplete:void 0,afterDeleteRow:void 0,afterInsertRow:void 0,afterSearch:void 0,afterColumnFilter:void 0,onRowClick:void 0,page:void 0,sizePerPageList:f["default"].SIZE_PER_PAGE_LIST,sizePerPage:void 0,paginationSize:f["default"].PAGINATION_SIZE,onSizePerPageList:void 0,noDataText:void 0},fetchInfo:{dataTotalSize:0},exportCSV:!1,csvFileName:void 0},t["default"]=C,e.exports=t["default"]},function(t,r){t.exports=e},function(e,t,r){var n,o;/*! Copyright (c) 2015 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ -!function(){"use strict";function o(){for(var e="",t=0;t",LAST_PAGE:">>",PRE_PAGE:"<",FIRST_PAGE:"<<",ROW_SELECT_BG_COLOR:"",ROW_SELECT_NONE:"none",ROW_SELECT_SINGLE:"radio",ROW_SELECT_MULTI:"checkbox",CELL_EDIT_NONE:"none",CELL_EDIT_CLICK:"click",CELL_EDIT_DBCLICK:"dbclick",SIZE_PER_PAGE_LIST:[10,25,30,50],PAGINATION_SIZE:5,NO_DATA_TEXT:"There is no data to display"},e.exports=t["default"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r0&&o.removeChild(o.getElementsByClassName("order")[0])}this.props.onSort(e,t)}},{key:"componentDidMount",value:function(){if(this.props.sortName){this.clearSortCaret(this.props.sortOrder,this.props.sortName);for(var e=this.refs.header,t=0;t/g,"")}:!1;return u["default"].createElement(b["default"],{completeEdit:this.handleCompleteEditCell.bind(this),editable:w(r.editable)?r.editable(o,e,t,n):r.editable,format:r.format?i:!1,key:n,blurToSave:this.props.cellEdit.blurToSave,rowIndex:t,colIndex:n},o)}var a=w(r.className)?r.className(o,e,t,n):r.className;if("undefined"!=typeof r.format){var s=r.format(o,e);return u["default"].isValidElement(s)||(s=u["default"].createElement("div",{dangerouslySetInnerHTML:{__html:s}})),u["default"].createElement(m["default"],{dataAlign:r.align,key:n,className:a,cellEdit:this.props.cellEdit,onEdit:this.handleEditCell.bind(this),width:r.width},s)}return u["default"].createElement(m["default"],{dataAlign:r.align,key:n,className:a,cellEdit:this.props.cellEdit,hidden:r.hidden,onEdit:this.handleEditCell.bind(this),width:r.width},o)},this),o=-1!=this.props.selectedRowKeys.indexOf(e[this.props.keyField]),i=r&&!this.props.selectRow.hideSelectColumn?this.renderSelectRowColumn(o):null,a=w(this.props.trClassName)?this.props.trClassName(e,t):this.props.trClassName;return u["default"].createElement(v["default"],{isSelected:o,key:t,className:a,selectRow:r?this.props.selectRow:void 0,enableCellEdit:this.props.cellEdit.mode!==d["default"].CELL_EDIT_NONE,onRowClick:this.handleRowClick.bind(this),onSelectRow:this.handleSelectRow.bind(this)},i,n)},this);0===o.length&&o.push(u["default"].createElement(v["default"],{key:"##table-empty##"},u["default"].createElement("td",{colSpan:this.props.columns.length+(r?1:0),style:{textAlign:"center"}},this.props.noDataText||d["default"].NO_DATA_TEXT))),this.editing=!1;var i=this.calculateContainerHeight().toString();return u["default"].createElement("div",{ref:"container",className:e,style:{height:i}},u["default"].createElement("table",{className:t},n,u["default"].createElement("tbody",null,o)))}},{key:"renderTableHeader",value:function(e){var t=null;if(e){var r={width:35,minWidth:35};t=this.props.selectRow.hideSelectColumn?null:u["default"].createElement("th",{style:r,key:-1})}var n=this.props.columns.map(function(e,t){var r=null==e.width?e.width:parseInt(e.width),n={display:e.hidden?"none":null,width:r,maxWidth:r},o=e.sort?f["default"].renderReactSortCaret(d["default"].SORT_DESC):null;return u["default"].createElement("th",{style:n,key:t,className:e.className},e.text,o)});return u["default"].createElement("thead",{ref:"header"},u["default"].createElement("tr",null,t,n))}},{key:"handleRowClick",value:function(e){var t,r;this.props.data.forEach(function(n,o){o==e-1&&(t=n[this.props.keyField],r=n)},this),this.props.onRowClick(r)}},{key:"handleSelectRow",value:function(e,t){var r,n;this.props.data.forEach(function(t,o){o==e-1&&(r=t[this.props.keyField],n=t)},this),this.props.onSelectRow(n,t)}},{key:"handleSelectRowColumChange",value:function(e){this.props.selectRow.clickToSelect&&this.props.selectRow.clickToSelectAndEditCell||this.handleSelectRow(e.currentTarget.parentElement.parentElement.rowIndex,e.currentTarget.checked)}},{key:"handleEditCell",value:function(e,t){this.editing=!0,this._isSelectRowDefined()&&(t--,this.props.selectRow.hideSelectColumn&&t++),e--;var r={currEditCell:{rid:e,cid:t}};if(this.props.selectRow.clickToSelectAndEditCell){var n=-1!=this.props.selectedRowKeys.indexOf(this.props.data[e][this.props.keyField]);this.handleSelectRow(e+1,!n)}this.setState(r)}},{key:"cancelEdit",value:function(){var e=this.state.currEditCell;e&&this.handleCompleteEditCell(null,e.rid,e.cid)}},{key:"handleCompleteEditCell",value:function(e,t,r){this.setState({currEditCell:null}),null!=e&&this.props.cellEdit.__onCompleteEdit__(e,t,r)}},{key:"renderSelectRowColumn",value:function(e){return this.props.selectRow.mode==d["default"].ROW_SELECT_SINGLE?u["default"].createElement(m["default"],null,u["default"].createElement("input",{type:"radio",name:"selection",checked:e,onChange:this.handleSelectRowColumChange.bind(this)})):u["default"].createElement(m["default"],null,u["default"].createElement("input",{type:"checkbox",checked:e,onChange:this.handleSelectRowColumChange.bind(this)}))}},{key:"getBodyHeaderDomProp",value:function(){for(var e=this.refs.header.childNodes[0].childNodes,t=[],r=0;r1)for(var r=1;r-1}};e.exports=o}).call(t,r(19))},function(e,t,r){"use strict";function n(){var e=document.createElement("div"),t=e.style;"AnimationEvent"in window||delete s.animationend.animation,"TransitionEvent"in window||delete s.transitionend.transition;for(var r in s){var n=s[r];for(var o in n)if(o in t){l.push(n[o]);break}}}function o(e,t,r){e.addEventListener(t,r,!1)}function i(e,t,r){e.removeEventListener(t,r,!1)}var a=r(27),s={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},l=[];a.canUseDOM&&n();var u={addEndEventListener:function(e,t){return 0===l.length?void window.setTimeout(t,0):void l.forEach(function(r){o(e,r,t)})},removeEndEventListener:function(e,t){0!==l.length&&l.forEach(function(r){i(e,r,t)})}};e.exports=u},function(e,t){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=n},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){e[t.showMethod]({duration:t.showDuration,easing:t.showEasing})}var i=r(6),a=n(i);e.exports={getDefaultProps:function(){return{style:{display:"none"},showMethod:"fadeIn",showDuration:300,showEasing:"swing",hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",timeOut:5e3,extendedTimeOut:1e3}},getInitialState:function(){return{intervalId:null,isHiding:!1}},componentDidMount:function(){var e=this.props;o(this._get_$_node(),e),0this.totalPages?this.totalPages:this.state.currentPage+1:e==f["default"].LAST_PAGE?this.totalPages:e==f["default"].FIRST_PAGE?1:parseInt(e),e!=this.state.currentPage&&(this.setState({currentPage:e}),this.props.changePage(e,this.state.sizePerPage))}},{key:"componentWillReceiveProps",value:function(e){this.props.remote&&(e.currPage||e.sizePerPage)&&this.setState({currentPage:e.currPage,sizePerPage:e.sizePerPage})}},{key:"changeSizePerPage",value:function(e){e.preventDefault();var t=parseInt(e.currentTarget.text);t!=this.state.sizePerPage&&(this.totalPages=Math.ceil(this.props.dataSize/t),this.state.currentPage>this.totalPages&&(this.state.currentPage=this.totalPages),this.setState({sizePerPage:t,currentPage:this.state.currentPage}),this.props.changePage(this.state.currentPage,t),this.props.onSizePerPageList&&this.props.onSizePerPageList(t))}},{key:"render",value:function(){var e=this;this.totalPages=Math.ceil(this.props.dataSize/this.state.sizePerPage);var t=this.makePage(),r={marginTop:"0px"},n=this.props.sizePerPageList.map(function(t){return u["default"].createElement("li",{key:t,role:"presentation"},u["default"].createElement("a",{role:"menuitem",tabIndex:"-1",href:"#",onClick:e.changeSizePerPage.bind(e)},t))});return u["default"].createElement("div",{className:"row"},u["default"].createElement("div",{className:"col-md-6"},this.props.sizePerPageList.length>1?u["default"].createElement("div",{className:"dropdown"},u["default"].createElement("button",{className:"btn btn-default dropdown-toggle",type:"button",id:"pageDropDown","data-toggle":"dropdown","aria-expanded":"true"},this.state.sizePerPage,u["default"].createElement("span",{className:"caret"})),u["default"].createElement("ul",{className:"dropdown-menu",role:"menu","aria-labelledby":"pageDropDown"},n)):""),u["default"].createElement("div",{className:"col-md-6"},u["default"].createElement("ul",{className:"pagination",style:r},t)))}},{key:"makePage",value:function(){var e=this.getPages();return e.map(function(e){var t=e===this.state.currentPage,r=!1;return 1!=this.state.currentPage||e!==f["default"].FIRST_PAGE&&e!==f["default"].PRE_PAGE||(r=!0),this.state.currentPage!=this.totalPages||e!==f["default"].NEXT_PAGE&&e!==f["default"].LAST_PAGE||(r=!0),u["default"].createElement(d["default"],{changePage:this.changePage.bind(this),active:t,disable:r,key:e},e)},this)}},{key:"getPages",value:function(){var e=1,t=this.totalPages;e=Math.max(this.state.currentPage-Math.floor(this.props.paginationSize/2),1),t=e+this.props.paginationSize-1,t>this.totalPages&&(t=this.totalPages,e=t-this.props.paginationSize+1);for(var r=[f["default"].FIRST_PAGE,f["default"].PRE_PAGE],n=e;t>=n;n++)n>0&&r.push(n);return r.push(f["default"].NEXT_PAGE),r.push(f["default"].LAST_PAGE),r}},{key:"getCurrentPage",value:function(){return this.state.currentPage}},{key:"getSizePerPage",value:function(){return this.state.sizePerPage}}]),t}(u["default"].Component);h.propTypes={currPage:u["default"].PropTypes.number,sizePerPage:u["default"].PropTypes.number,dataSize:u["default"].PropTypes.number,changePage:u["default"].PropTypes.func,sizePerPageList:u["default"].PropTypes.array,paginationSize:u["default"].PropTypes.number,remote:u["default"].PropTypes.bool,onSizePerPageList:u["default"].PropTypes.func},h.defaultProps={sizePerPage:f["default"].SIZE_PER_PAGE},t["default"]=h,e.exports=t["default"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;ro[t]?-1:e[t]o[t]?1:0}),e}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var r=0;re||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,o,s,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[e],a(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(o=arguments.length,s=new Array(o-1),l=1;o>l;l++)s[l-1]=arguments[l];r.apply(this,s)}else if(i(r)){for(o=arguments.length,s=new Array(o-1),l=1;o>l;l++)s[l-1]=arguments[l];for(u=r.slice(),o=u.length,l=0;o>l;l++)u[l].apply(this,s)}return!0},r.prototype.addListener=function(e,t){var o;if(!n(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned){var o;o=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,o&&o>0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),o||(o=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var o=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var r,o,a,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],a=r.length,o=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(s=a;s-->0;)if(r[s]===t||r[s].listener&&r[s].listener===t){o=s;break}if(0>o)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.listenerCount=function(e,t){var r;return r=e._events&&e._events[t]?n(e._events[t])?1:e._events[t].length:0}},function(e,t,r){"use strict";function n(e,t){var r="";return 0===e.length?r:(r+=t.join(",")+"\n",e.map(function(e){t.map(function(t){var n=e[t]?'"'+e[t]+'"':"";r+=n+","}),r+="\n"}),r)}if(Object.defineProperty(t,"__esModule",{value:!0}),"undefined"!=typeof window)var o=r(36),i=o.saveAs;var a=function(e,t,r){var o=n(e,t);"undefined"!=typeof window&&i(new Blob([o],{type:"text/plain;charset=utf-8"}),r||"spreadsheet.csv")};t["default"]=a,e.exports=t["default"]},function(e,t,r){var n,o,i=i||function(e){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,r=function(){return e.URL||e.webkitURL||e},n=t.createElementNS("http://www.w3.org/1999/xhtml","a"),o="download"in n,i=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},a=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),s=e.webkitRequestFileSystem,l=e.requestFileSystem||s||e.mozRequestFileSystem,u=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},c="application/octet-stream",d=0,p=500,f=function(t){var n=function(){"string"==typeof t?r().revokeObjectURL(t):t.remove()};e.chrome?n():setTimeout(n,p)},h=function(e,t,r){t=[].concat(t);for(var n=t.length;n--;){var o=e["on"+t[n]];if("function"==typeof o)try{o.call(e,r||e)}catch(i){u(i)}}},v=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e},y=function(t,u,p){p||(t=v(t));var y,m,g,b=this,_=t.type,E=!1,w=function(){h(b,"writestart progress write writeend".split(" "))},P=function(){if(m&&a&&"undefined"!=typeof FileReader){var n=new FileReader;return n.onloadend=function(){var e=n.result;m.location.href="data:attachment/file"+e.slice(e.search(/[,;]/)),b.readyState=b.DONE,w()},n.readAsDataURL(t),void(b.readyState=b.INIT)}if((E||!y)&&(y=r().createObjectURL(t)),m)m.location.href=y;else{var o=e.open(y,"_blank");void 0==o&&a&&(e.location.href=y)}b.readyState=b.DONE,w(),f(y)},T=function(e){return function(){return b.readyState!==b.DONE?e.apply(this,arguments):void 0}},S={create:!0,exclusive:!1};return b.readyState=b.INIT,u||(u="download"),o?(y=r().createObjectURL(t),n.href=y,n.download=u,void setTimeout(function(){i(n),w(),f(y),b.readyState=b.DONE})):(e.chrome&&_&&_!==c&&(g=t.slice||t.webkitSlice,t=g.call(t,0,t.size,c),E=!0),s&&"download"!==u&&(u+=".download"),(_===c||s)&&(m=e),l?(d+=t.size,void l(e.TEMPORARY,d,T(function(e){e.root.getDirectory("saved",S,T(function(e){var r=function(){e.getFile(u,S,T(function(e){e.createWriter(T(function(r){r.onwriteend=function(t){m.location.href=e.toURL(),b.readyState=b.DONE,h(b,"writeend",t),f(e)},r.onerror=function(){var e=r.error;e.code!==e.ABORT_ERR&&P()},"writestart progress write abort".split(" ").forEach(function(e){r["on"+e]=b["on"+e]}),r.write(t),b.abort=function(){r.abort(),b.readyState=b.DONE},b.readyState=b.WRITING}),P)}),P)};e.getFile(u,{create:!1},T(function(e){e.remove(),r()}),T(function(e){e.code===e.NOT_FOUND_ERR?r():P()}))}),P)}),P)):void P())},m=y.prototype,g=function(e,t,r){return new y(e,t,r)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,r){return r||(e=v(e)),navigator.msSaveOrOpenBlob(e,t||"download")}:(m.abort=function(){var e=this;e.readyState=e.DONE,h(e,"abort")},m.readyState=m.INIT=0,m.WRITING=1,m.DONE=2,m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null,g)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||(void 0).content);"undefined"!=typeof e&&e.exports?e.exports.saveAs=i:null!==r(37)&&null!=r(38)&&(n=[],o=function(){return i}.apply(t,n),!(void 0!==o&&(e.exports=o)))},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r",LAST_PAGE:">>",PRE_PAGE:"<",FIRST_PAGE:"<<",ROW_SELECT_BG_COLOR:"",ROW_SELECT_NONE:"none",ROW_SELECT_SINGLE:"radio",ROW_SELECT_MULTI:"checkbox",CELL_EDIT_NONE:"none",CELL_EDIT_CLICK:"click",CELL_EDIT_DBCLICK:"dbclick",SIZE_PER_PAGE_LIST:[10,25,30,50],PAGINATION_SIZE:5,NO_DATA_TEXT:"There is no data to display"},e.exports=t["default"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r0&&o.removeChild(o.getElementsByClassName("order")[0])}this.props.onSort(e,t)}},{key:"componentDidMount",value:function(){if(this.props.sortName){this.clearSortCaret(this.props.sortOrder,this.props.sortName);for(var e=this.refs.header,t=0;t/g,"")}:!1;return u["default"].createElement(b["default"],{completeEdit:this.handleCompleteEditCell.bind(this),editable:w(r.editable)?r.editable(o,e,t,n):r.editable,format:r.format?i:!1,key:n,blurToSave:this.props.cellEdit.blurToSave,rowIndex:t,colIndex:n},o)}var a=w(r.className)?r.className(o,e,t,n):r.className;if("undefined"!=typeof r.format){var s=r.format(o,e);return u["default"].isValidElement(s)||(s=u["default"].createElement("div",{dangerouslySetInnerHTML:{__html:s}})),u["default"].createElement(m["default"],{dataAlign:r.align,key:n,className:a,cellEdit:this.props.cellEdit,onEdit:this.handleEditCell.bind(this),width:r.width},s)}return u["default"].createElement(m["default"],{dataAlign:r.align,key:n,className:a,cellEdit:this.props.cellEdit,hidden:r.hidden,onEdit:this.handleEditCell.bind(this),width:r.width},o)},this),o=-1!=this.props.selectedRowKeys.indexOf(e[this.props.keyField]),i=r&&!this.props.selectRow.hideSelectColumn?this.renderSelectRowColumn(o):null,a=w(this.props.trClassName)?this.props.trClassName(e,t):this.props.trClassName;return u["default"].createElement(v["default"],{isSelected:o,key:t,className:a,selectRow:r?this.props.selectRow:void 0,enableCellEdit:this.props.cellEdit.mode!==d["default"].CELL_EDIT_NONE,onRowClick:this.handleRowClick.bind(this),onSelectRow:this.handleSelectRow.bind(this)},i,n)},this);0===o.length&&o.push(u["default"].createElement(v["default"],{key:"##table-empty##"},u["default"].createElement("td",{colSpan:this.props.columns.length+(r?1:0),style:{textAlign:"center"}},this.props.noDataText||d["default"].NO_DATA_TEXT))),this.editing=!1;var i=this.calculateContainerHeight().toString();return u["default"].createElement("div",{ref:"container",className:e,style:{height:i}},u["default"].createElement("table",{className:t},n,u["default"].createElement("tbody",null,o)))}},{key:"renderTableHeader",value:function(e){var t=null;if(e){var r={width:35,minWidth:35};t=this.props.selectRow.hideSelectColumn?null:u["default"].createElement("th",{style:r,key:-1})}var n=this.props.columns.map(function(e,t){var r=null==e.width?e.width:parseInt(e.width),n={display:e.hidden?"none":null,width:r,maxWidth:r},o=e.sort?f["default"].renderReactSortCaret(d["default"].SORT_DESC):null;return u["default"].createElement("th",{style:n,key:t,className:e.className},e.text,o)});return u["default"].createElement("thead",{ref:"header"},u["default"].createElement("tr",null,t,n))}},{key:"handleRowClick",value:function(e){var t,r;this.props.data.forEach(function(n,o){o==e-1&&(t=n[this.props.keyField],r=n)},this),this.props.onRowClick(r)}},{key:"handleSelectRow",value:function(e,t){var r,n;this.props.data.forEach(function(t,o){o==e-1&&(r=t[this.props.keyField],n=t)},this),this.props.onSelectRow(n,t)}},{key:"handleSelectRowColumChange",value:function(e){this.props.selectRow.clickToSelect&&this.props.selectRow.clickToSelectAndEditCell||this.handleSelectRow(e.currentTarget.parentElement.parentElement.rowIndex,e.currentTarget.checked)}},{key:"handleEditCell",value:function(e,t){this.editing=!0,this._isSelectRowDefined()&&(t--,this.props.selectRow.hideSelectColumn&&t++),e--;var r={currEditCell:{rid:e,cid:t}};if(this.props.selectRow.clickToSelectAndEditCell){var n=-1!=this.props.selectedRowKeys.indexOf(this.props.data[e][this.props.keyField]);this.handleSelectRow(e+1,!n)}this.setState(r)}},{key:"cancelEdit",value:function(){var e=this.state.currEditCell;e&&this.handleCompleteEditCell(null,e.rid,e.cid)}},{key:"handleCompleteEditCell",value:function(e,t,r){this.setState({currEditCell:null}),null!=e&&this.props.cellEdit.__onCompleteEdit__(e,t,r)}},{key:"renderSelectRowColumn",value:function(e){return this.props.selectRow.mode==d["default"].ROW_SELECT_SINGLE?u["default"].createElement(m["default"],null,u["default"].createElement("input",{type:"radio",name:"selection",checked:e,onChange:this.handleSelectRowColumChange.bind(this)})):u["default"].createElement(m["default"],null,u["default"].createElement("input",{type:"checkbox",checked:e,onChange:this.handleSelectRowColumChange.bind(this)}))}},{key:"getBodyHeaderDomProp",value:function(){for(var e=this.refs.header.childNodes[0].childNodes,t=[],r=0;r1)for(var r=1;r-1}};e.exports=o}).call(t,r(19))},function(e,t,r){"use strict";function n(){var e=document.createElement("div"),t=e.style;"AnimationEvent"in window||delete s.animationend.animation,"TransitionEvent"in window||delete s.transitionend.transition;for(var r in s){var n=s[r];for(var o in n)if(o in t){l.push(n[o]);break}}}function o(e,t,r){e.addEventListener(t,r,!1)}function i(e,t,r){e.removeEventListener(t,r,!1)}var a=r(27),s={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},l=[];a.canUseDOM&&n();var u={addEndEventListener:function(e,t){return 0===l.length?void window.setTimeout(t,0):void l.forEach(function(r){o(e,r,t)})},removeEndEventListener:function(e,t){0!==l.length&&l.forEach(function(r){i(e,r,t)})}};e.exports=u},function(e,t){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=n},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){e[t.showMethod]({duration:t.showDuration,easing:t.showEasing})}var i=r(6),a=n(i);e.exports={getDefaultProps:function(){return{style:{display:"none"},showMethod:"fadeIn",showDuration:300,showEasing:"swing",hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",timeOut:5e3,extendedTimeOut:1e3}},getInitialState:function(){return{intervalId:null,isHiding:!1}},componentDidMount:function(){var e=this.props;o(this._get_$_node(),e),0this.totalPages?this.totalPages:this.state.currentPage+1:e==f["default"].LAST_PAGE?this.totalPages:e==f["default"].FIRST_PAGE?1:parseInt(e),e!=this.state.currentPage&&(this.setState({currentPage:e}),this.props.changePage(e,this.state.sizePerPage))}},{key:"componentWillReceiveProps",value:function(e){this.props.remote&&(e.currPage||e.sizePerPage)&&this.setState({currentPage:e.currPage,sizePerPage:e.sizePerPage})}},{key:"changeSizePerPage",value:function(e){e.preventDefault();var t=parseInt(e.currentTarget.text);t!=this.state.sizePerPage&&(this.totalPages=Math.ceil(this.props.dataSize/t),this.state.currentPage>this.totalPages&&(this.state.currentPage=this.totalPages),this.setState({sizePerPage:t,currentPage:this.state.currentPage}),this.props.changePage(this.state.currentPage,t),this.props.onSizePerPageList&&this.props.onSizePerPageList(t))}},{key:"render",value:function(){var e=this;this.totalPages=Math.ceil(this.props.dataSize/this.state.sizePerPage);var t=this.makePage(),r={marginTop:"0px"},n=this.props.sizePerPageList.map(function(t){return u["default"].createElement("li",{key:t,role:"presentation"},u["default"].createElement("a",{role:"menuitem",tabIndex:"-1",href:"#",onClick:e.changeSizePerPage.bind(e)},t))});return u["default"].createElement("div",{className:"row"},u["default"].createElement("div",{className:"col-md-6"},this.props.sizePerPageList.length>1?u["default"].createElement("div",{className:"dropdown"},u["default"].createElement("button",{className:"btn btn-default dropdown-toggle",type:"button",id:"pageDropDown","data-toggle":"dropdown","aria-expanded":"true"},this.state.sizePerPage,u["default"].createElement("span",{className:"caret"})),u["default"].createElement("ul",{className:"dropdown-menu",role:"menu","aria-labelledby":"pageDropDown"},n)):""),u["default"].createElement("div",{className:"col-md-6"},u["default"].createElement("ul",{className:"pagination",style:r},t)))}},{key:"makePage",value:function(){var e=this.getPages();return e.map(function(e){var t=e===this.state.currentPage,r=!1;return 1!=this.state.currentPage||e!==f["default"].FIRST_PAGE&&e!==f["default"].PRE_PAGE||(r=!0),this.state.currentPage!=this.totalPages||e!==f["default"].NEXT_PAGE&&e!==f["default"].LAST_PAGE||(r=!0),u["default"].createElement(d["default"],{changePage:this.changePage.bind(this),active:t,disable:r,key:e},e)},this)}},{key:"getPages",value:function(){var e=1,t=this.totalPages;e=Math.max(this.state.currentPage-Math.floor(this.props.paginationSize/2),1),t=e+this.props.paginationSize-1,t>this.totalPages&&(t=this.totalPages,e=t-this.props.paginationSize+1);for(var r=[f["default"].FIRST_PAGE,f["default"].PRE_PAGE],n=e;t>=n;n++)n>0&&r.push(n);return r.push(f["default"].NEXT_PAGE),r.push(f["default"].LAST_PAGE),r}},{key:"getCurrentPage",value:function(){return this.state.currentPage}},{key:"getSizePerPage",value:function(){return this.state.sizePerPage}}]),t}(u["default"].Component);h.propTypes={currPage:u["default"].PropTypes.number,sizePerPage:u["default"].PropTypes.number,dataSize:u["default"].PropTypes.number,changePage:u["default"].PropTypes.func,sizePerPageList:u["default"].PropTypes.array,paginationSize:u["default"].PropTypes.number,remote:u["default"].PropTypes.bool,onSizePerPageList:u["default"].PropTypes.func},h.defaultProps={sizePerPage:f["default"].SIZE_PER_PAGE},t["default"]=h,e.exports=t["default"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;ro[t]?-1:e[t]o[t]?1:0}),e}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var r=0;re||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,o,s,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[e],a(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(o=arguments.length,s=new Array(o-1),l=1;o>l;l++)s[l-1]=arguments[l];r.apply(this,s)}else if(i(r)){for(o=arguments.length,s=new Array(o-1),l=1;o>l;l++)s[l-1]=arguments[l];for(u=r.slice(),o=u.length,l=0;o>l;l++)u[l].apply(this,s)}return!0},r.prototype.addListener=function(e,t){var o;if(!n(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned){var o;o=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,o&&o>0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),o||(o=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var o=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var r,o,a,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],a=r.length,o=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(s=a;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){o=s;break}if(0>o)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.listenerCount=function(e,t){var r;return r=e._events&&e._events[t]?n(e._events[t])?1:e._events[t].length:0}},function(e,t,r){"use strict";function n(e,t){var r="";return 0===e.length?r:(r+=t.join(",")+"\n",e.map(function(e){t.map(function(t){var n=e[t]?'"'+e[t]+'"':"";r+=n+","}),r+="\n"}),r)}if(Object.defineProperty(t,"__esModule",{value:!0}),"undefined"!=typeof window)var o=r(36),i=o.saveAs;var a=function(e,t,r){var o=n(e,t);"undefined"!=typeof window&&i(new Blob([o],{type:"text/plain;charset=utf-8"}),r||"spreadsheet.csv")};t["default"]=a,e.exports=t["default"]},function(e,t,r){var n,o,i=i||function(e){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,r=function(){return e.URL||e.webkitURL||e},n=t.createElementNS("http://www.w3.org/1999/xhtml","a"),o="download"in n,i=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},a=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),s=e.webkitRequestFileSystem,l=e.requestFileSystem||s||e.mozRequestFileSystem,u=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},c="application/octet-stream",d=0,p=500,f=function(t){var n=function(){"string"==typeof t?r().revokeObjectURL(t):t.remove()};e.chrome?n():setTimeout(n,p)},h=function(e,t,r){t=[].concat(t);for(var n=t.length;n--;){var o=e["on"+t[n]];if("function"==typeof o)try{o.call(e,r||e)}catch(i){u(i)}}},v=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e},y=function(t,u,p){p||(t=v(t));var y,m,g,b=this,_=t.type,E=!1,w=function(){h(b,"writestart progress write writeend".split(" "))},P=function(){if(m&&a&&"undefined"!=typeof FileReader){var n=new FileReader;return n.onloadend=function(){var e=n.result;m.location.href="data:attachment/file"+e.slice(e.search(/[,;]/)),b.readyState=b.DONE,w()},n.readAsDataURL(t),void(b.readyState=b.INIT)}if((E||!y)&&(y=r().createObjectURL(t)),m)m.location.href=y;else{var o=e.open(y,"_blank");void 0==o&&a&&(e.location.href=y)}b.readyState=b.DONE,w(),f(y)},T=function(e){return function(){return b.readyState!==b.DONE?e.apply(this,arguments):void 0}},S={create:!0,exclusive:!1};return b.readyState=b.INIT,u||(u="download"),o?(y=r().createObjectURL(t),n.href=y,n.download=u,void setTimeout(function(){i(n),w(),f(y),b.readyState=b.DONE})):(e.chrome&&_&&_!==c&&(g=t.slice||t.webkitSlice,t=g.call(t,0,t.size,c),E=!0),s&&"download"!==u&&(u+=".download"),(_===c||s)&&(m=e),l?(d+=t.size,void l(e.TEMPORARY,d,T(function(e){e.root.getDirectory("saved",S,T(function(e){var r=function(){e.getFile(u,S,T(function(e){e.createWriter(T(function(r){r.onwriteend=function(t){m.location.href=e.toURL(),b.readyState=b.DONE,h(b,"writeend",t),f(e)},r.onerror=function(){var e=r.error;e.code!==e.ABORT_ERR&&P()},"writestart progress write abort".split(" ").forEach(function(e){r["on"+e]=b["on"+e]}),r.write(t),b.abort=function(){r.abort(),b.readyState=b.DONE},b.readyState=b.WRITING}),P)}),P)};e.getFile(u,{create:!1},T(function(e){e.remove(),r()}),T(function(e){e.code===e.NOT_FOUND_ERR?r():P()}))}),P)}),P)):void P())},m=y.prototype,g=function(e,t,r){return new y(e,t,r)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,r){return r||(e=v(e)),navigator.msSaveOrOpenBlob(e,t||"download")}:(m.abort=function(){var e=this;e.readyState=e.DONE,h(e,"abort")},m.readyState=m.INIT=0,m.WRITING=1,m.DONE=2,m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null,g)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||(void 0).content);"undefined"!=typeof e&&e.exports?e.exports.saveAs=i:null!==r(37)&&null!=r(38)&&(n=[],o=function(){return i}.apply(t,n),!(void 0!==o&&(e.exports=o)))},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r