Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-bootstrap-table2-toolkit

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-bootstrap-table2-toolkit - npm Package Compare versions

Comparing version 1.4.2 to 2.0.0

2

dist/react-bootstrap-table2-toolkit.min.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactBootstrapTable2Toolkit=t(require("react")):e.ReactBootstrapTable2Toolkit=t(e.React)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(t,r){t.exports=e},function(e,t,r){e.exports=r(6)()},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 a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(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 i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),c=r(0),f=n(c),p=r(1),d=n(p),h=r(15),y=n(h),b=r(22),v=n(b),m=f.default.createContext(),g=function(e){function t(e){o(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n={};return r._=null,r.onClear=r.onClear.bind(r),r.onSearch=r.onSearch.bind(r),r.onColumnToggle=r.onColumnToggle.bind(r),r.setDependencyModules=r.setDependencyModules.bind(r),e.columnToggle&&(n.columnToggle=e.columns.reduce(function(e,t){return e[t.dataField]=!t.hidden,e},{})),n.searchText="object"===l(e.search)?e.search.defaultSearch||"":"",r.state=n,r}return u(t,e),s(t,[{key:"onSearch",value:function(e){e!==this.state.searchText&&this.setState({searchText:e})}},{key:"onClear",value:function(){this.setState({searchText:""})}},{key:"onColumnToggle",value:function(e){var t=this.state.columnToggle;t[e]=!t[e],this.setState(i({},this.state,{columnToggle:t}))}},{key:"setDependencyModules",value:function(e){this._=e}},{key:"render",value:function(){var e={keyField:this.props.keyField,columns:this.props.columns,data:this.props.data,bootstrap4:this.props.bootstrap4,setDependencyModules:this.setDependencyModules,registerExposedAPI:this.registerExposedAPI};return this.props.search&&(e.search={searchContext:(0,v.default)(this.props.search),searchText:this.state.searchText}),this.props.columnToggle&&(e.columnToggle={toggles:this.state.columnToggle}),f.default.createElement(m.Provider,{value:{searchProps:{searchText:this.state.searchText,onSearch:this.onSearch,onClear:this.onClear},csvProps:{onExport:this.handleExportCSV},columnToggleProps:{columns:this.props.columns,toggles:this.state.columnToggle,onColumnToggle:this.onColumnToggle},baseProps:e}},this.props.children)}}]),t}((0,y.default)(f.default.Component));g.propTypes={keyField:d.default.string.isRequired,data:d.default.array.isRequired,columns:d.default.array.isRequired,children:d.default.node.isRequired,bootstrap4:d.default.bool,search:d.default.oneOfType([d.default.bool,d.default.shape({defaultSearch:d.default.string,searchFormatted:d.default.bool})]),exportCSV:d.default.oneOfType([d.default.bool,d.default.shape({fileName:d.default.string,separator:d.default.string,ignoreHeader:d.default.bool,noAutoBOM:d.default.bool,exportAll:d.default.bool,onlyExportFiltered:d.default.bool,onlyExportSelection:d.default.bool})])},g.defaultProps={search:!1,exportCSV:!1,bootstrap4:!1},t.default={Provider:g,Consumer:m.Consumer}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnToggle=t.CSVExport=t.Search=t.ToolkitContext=void 0;var o=r(4);Object.defineProperty(t,"Search",{enumerable:!0,get:function(){return n(o).default}});var a=r(11);Object.defineProperty(t,"CSVExport",{enumerable:!0,get:function(){return n(a).default}});var u=r(13);Object.defineProperty(t,"ColumnToggle",{enumerable:!0,get:function(){return n(u).default}});var i=r(2),l=n(i),s=r(23),c=n(s);t.default=c.default;t.ToolkitContext=l.default},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(5),a=n(o),u=r(10),i=n(u);t.default={SearchBar:a.default,ClearSearchButton:i.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 a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(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 i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=arguments,s=r(0),c=n(s),f=r(1),p=n(f),d=function(e,t,r){var n=void 0;return function(){var o=function(){n=null,r||e.apply(void 0,l)},a=r&&!n;clearTimeout(n),n=setTimeout(o,t||0),a&&e.appy(void 0,l)}},h=function(e){function t(e){o(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.onChangeValue=function(e){r.setState({value:e.target.value})},r.onKeyup=function(){var e=r.props,t=e.delay,n=e.onSearch;d(function(){n(r.input.value)},t)()},r.state={value:e.searchText},r}return u(t,e),i(t,[{key:"componentWillReceiveProps",value:function(e){this.setState({value:e.searchText})}},{key:"render",value:function(){var e=this,r=this.props,n=r.className,o=r.style,a=r.placeholder,u=r.tableId;return c.default.createElement("label",{htmlFor:"search-bar-"+u,className:"search-label"},c.default.createElement("span",{className:"sr-only"},"Search this table"),c.default.createElement("input",{ref:function(t){return e.input=t},id:"search-bar-"+u,type:"text",style:o,onKeyUp:function(){return e.onKeyup()},onChange:this.onChangeValue,className:"form-control "+n,value:this.state.value,placeholder:a||t.defaultProps.placeholder}))}}]),t}(c.default.Component);h.propTypes={onSearch:p.default.func.isRequired,className:p.default.string,placeholder:p.default.string,style:p.default.object,delay:p.default.number,searchText:p.default.string,tableId:p.default.string},h.defaultProps={className:"",style:{},placeholder:"Search",delay:250,searchText:"",tableId:"0"},t.default=h},function(e,t,r){"use strict";var n=r(7),o=r(8),a=r(9);e.exports=function(){function e(e,t,r,n,u,i){i!==a&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return r.checkPropTypes=n,r.PropTypes=r,r}},function(e,t,r){"use strict";function n(e){return function(){return e}}var o=function(){};o.thatReturns=n,o.thatReturnsFalse=n(!1),o.thatReturnsTrue=n(!0),o.thatReturnsNull=n(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,r){"use strict";function n(e,t,r,n,a,u,i,l){if(o(t),!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,a,u,i,l],f=0;s=new Error(t.replace(/%s/g,function(){return c[f++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var o=function(e){};e.exports=n},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},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(0),a=n(o),u=r(1),i=n(u),l=function(e){var t=e.onClear,r=e.text,n=e.className;return a.default.createElement("button",{className:"btn btn-default "+n,onClick:t},r)};l.propTypes={onClear:i.default.func.isRequired,className:i.default.string,text:i.default.string},l.defaultProps={text:"Clear",className:""},t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12),o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default={ExportCSVButton:o.default}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(0),i=n(u),l=r(1),s=n(l),c=function(e){var t=e.onExport,r=e.children,n=e.className,u=o(e,["onExport","children","className"]);return i.default.createElement("button",a({type:"button",className:"react-bs-table-csv-btn btn btn-default "+n,onClick:function(){return t()}},u),r)};c.propTypes={children:s.default.node.isRequired,onExport:s.default.func.isRequired,className:s.default.string,style:s.default.object},c.defaultProps={className:"",style:{}},t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(14),o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default={ToggleList:o.default}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=r(0),u=n(a),i=r(1),l=n(i),s=function(e){var t=e.columns,r=e.onColumnToggle,n=e.toggles,a=e.contextual,i=e.className,l=e.btnClassName;return u.default.createElement("div",{className:"btn-group btn-group-toggle "+i,"data-toggle":"buttons"},t.map(function(e){return o({},e,{toggle:n[e.dataField]})}).map(function(e){return u.default.createElement("button",{type:"button",key:e.dataField,className:l+" btn btn-"+a+" "+(e.toggle?"active":""),"data-toggle":"button","aria-pressed":e.toggle?"true":"false",onClick:function(){return r(e.dataField)}},e.text)}))};s.propTypes={columns:l.default.array.isRequired,toggles:l.default.object.isRequired,onColumnToggle:l.default.func.isRequired,btnClassName:l.default.string,className:l.default.string,contextual:l.default.string},s.defaultProps={btnClassName:"",className:"",contextual:"primary"},t.default=s},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=r(16),i=function(e){return e&&e.__esModule?e:{default:e}}(u);t.default=function(e){return function(e){function t(){var e,r,a,u;n(this,t);for(var i=arguments.length,l=Array(i),s=0;s<i;s++)l[s]=arguments[s];return r=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),a.registerExposedAPI=function(e){a.tableExposedAPIEmitter=e},u=r,o(a,u)}return a(t,e),t}(i.default.csvOperation(e))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(17),o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default={csvOperation:o.default}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(18),l={fileName:"spreadsheet.csv",separator:",",ignoreHeader:!1,noAutoBOM:!0,exportAll:!0,onlyExportSelection:!1};t.default=function(e){return function(e){function t(){var e,r,a,s;n(this,t);for(var c=arguments.length,f=Array(c),p=0;p<c;p++)f[p]=arguments[p];return r=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(f))),a.handleExportCSV=function(e){var t=a.props,r=t.columns,n=t.exportCSV,o=t.keyField,s=(0,i.getMetaInfo)(r),c=!0===n?l:u({},l,n),f=void 0;if(void 0!==e)f=e;else if(c.exportAll)f=a.props.data;else if(c.onlyExportFiltered){var p={};a.tableExposedAPIEmitter.emit("get.filtered.rows",p),f=p.result}else{var d={};a.tableExposedAPIEmitter.emit("get.table.data",d),f=d.result}if(c.onlyExportSelection){var h={};a.tableExposedAPIEmitter.emit("get.selected.rows",h);var y=h.result;f=f.filter(function(e){return!!y.find(function(t){return e[o]===t})})}var b=(0,i.transform)(f,s,a._.get,c);(0,i.save)(b,c)},s=r,o(a,s)}return a(t,e),t}(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.save=t.transform=t.getMetaInfo=void 0;var n=r(19),o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.getMetaInfo=function(e){return e.map(function(e){return{field:e.dataField,type:e.csvType||String,formatter:e.csvFormatter,formatExtraData:e.formatExtraData,header:e.csvText||e.text,export:!1!==e.csvExport,row:Number(e.row)||0,rowSpan:Number(e.rowSpan)||1,colSpan:Number(e.colSpan)||1}}).filter(function(e){return e.export})},t.transform=function(e,t,r,n){var o=n.separator,a=n.ignoreHeader,u=t.filter(function(e){return e.export}),i="";return a||(i+=u.map(function(e){return'"'+e.header+'"'}).join(o),i+="\n"),0===e.length?i:i+=e.map(function(e,t){return u.map(function(n){var o=r(e,n.field);return n.formatter&&(o=n.formatter(o,e,t,n.formatExtraData)),n.type===String?'"'+(""+o).replace(/"/g,'""')+'"':o}).join(o)}).join("\n")},t.save=function(e,t){var r=t.noAutoBOM,n=t.fileName;o.default.saveAs(new Blob([e],{type:"text/plain;charset=utf-8"}),n,r)}},function(e,t,r){var n,o=o||function(e){"use strict";if(!(void 0===e||"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,a=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},u=/constructor/i.test(e.HTMLElement)||e.safari,i=/CriOS\/[\d]+/.test(navigator.userAgent),l=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},s=function(e){var t=function(){"string"==typeof e?r().revokeObjectURL(e):e.remove()};setTimeout(t,4e4)},c=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(e){l(e)}}},f=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e},p=function(t,l,p){p||(t=f(t));var d,h=this,y=t.type,b="application/octet-stream"===y,v=function(){c(h,"writestart progress write writeend".split(" "))};if(h.readyState=h.INIT,o)return d=r().createObjectURL(t),void setTimeout(function(){n.href=d,n.download=l,a(n),v(),s(d),h.readyState=h.DONE});!function(){if((i||b&&u)&&e.FileReader){var n=new FileReader;return n.onloadend=function(){var t=i?n.result:n.result.replace(/^data:[^;]*;/,"data:attachment/file;");e.open(t,"_blank")||(e.location.href=t),t=void 0,h.readyState=h.DONE,v()},n.readAsDataURL(t),void(h.readyState=h.INIT)}if(d||(d=r().createObjectURL(t)),b)e.location.href=d;else{e.open(d,"_blank")||(e.location.href=d)}h.readyState=h.DONE,v(),s(d)}()},d=p.prototype,h=function(e,t,r){return new p(e,t||e.name||"download",r)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,r){return t=t||e.name||"download",r||(e=f(e)),navigator.msSaveOrOpenBlob(e,t)}:(d.abort=function(){},d.readyState=d.INIT=0,d.WRITING=1,d.DONE=2,d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null,h)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);void 0!==e&&e.exports?e.exports.saveAs=o:null!==r(20)&&null!==r(21)&&void 0!==(n=function(){return o}.call(t,r,t,e))&&(e.exports=n)},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 a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(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 i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=r(0),s=n(l),c=r(1),f=n(c);t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{searchFormatted:!1};return function(t,r,n){var l=s.default.createContext(),c=function(c){function f(e){o(this,f);var t=a(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,e)),u=e.data;return r()&&""!==t.props.searchText?n(t.props.searchText):(u=t.search(e),t.triggerListener(u)),t.state={data:u},t}return u(f,c),i(f,[{key:"componentWillReceiveProps",value:function(e){if(e.searchText!==this.props.searchText)if(r())n(e.searchText);else{var o=this.search(e);this.triggerListener(o),this.setState({data:o})}else if(r())this.setState({data:e.data});else if(!t.isEqual(e.data,this.props.data)){var a=this.search(e);this.triggerListener(a),this.setState({data:a})}}},{key:"getSearched",value:function(){return this.state.data}},{key:"triggerListener",value:function(e){this.props.dataChangeListener&&this.props.dataChangeListener.emit("filterChanged",e.length)}},{key:"search",value:function(r){var n=r.data,o=r.columns,a=r.searchText.toLowerCase();return n.filter(function(r,n){for(var u=0;u<o.length;u+=1){var i=o[u];if(!1!==i.searchable){var l=t.get(r,i.dataField);if(i.formatter&&e.searchFormatted?l=i.formatter(l,r,n,i.formatExtraData):i.filterValue&&(l=i.filterValue(l,r)),null!==l&&void 0!==l&&(l=l.toString().toLowerCase(),l.indexOf(a)>-1))return!0}}return!1})}},{key:"render",value:function(){return s.default.createElement(l.Provider,{value:{data:this.state.data}},this.props.children)}}]),f}(s.default.Component);return c.propTypes={data:f.default.array.isRequired,columns:f.default.array.isRequired,searchText:f.default.string,dataChangeListener:f.default.object},{Provider:c,Consumer:l.Consumer}}}},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(0),a=n(o),u=r(1),i=n(u),l=r(2),s=n(l),c=function(e){return a.default.createElement(s.default.Provider,e,a.default.createElement(s.default.Consumer,null,function(t){return e.children(t)}))};c.propTypes={children:i.default.func.isRequired},t.default=c}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactBootstrapTable2Toolkit=t(require("react")):e.ReactBootstrapTable2Toolkit=t(e.React)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(t,r){t.exports=e},function(e,t,r){e.exports=r(6)()},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 a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),c=r(0),f=n(c),p=r(1),d=n(p),h=r(15),y=n(h),b=r(21),v=n(b),m=f.default.createContext(),g=function(e){function t(e){o(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),n={};return r._=null,r.onClear=r.onClear.bind(r),r.onSearch=r.onSearch.bind(r),r.onColumnToggle=r.onColumnToggle.bind(r),r.setDependencyModules=r.setDependencyModules.bind(r),e.columnToggle&&(n.columnToggle=e.columns.reduce(function(e,t){return e[t.dataField]=!t.hidden,e},{})),n.searchText="object"===i(e.search)?e.search.defaultSearch||"":"",r.state=n,r}return u(t,e),s(t,[{key:"onSearch",value:function(e){e!==this.state.searchText&&this.setState({searchText:e})}},{key:"onClear",value:function(){this.setState({searchText:""})}},{key:"onColumnToggle",value:function(e){var t=this.state.columnToggle;t[e]=!t[e],this.setState(l({},this.state,{columnToggle:t}))}},{key:"setDependencyModules",value:function(e){this._=e}},{key:"render",value:function(){var e={keyField:this.props.keyField,columns:this.props.columns,data:this.props.data,bootstrap4:this.props.bootstrap4,setDependencyModules:this.setDependencyModules,registerExposedAPI:this.registerExposedAPI};return this.props.search&&(e.search={searchContext:(0,v.default)(this.props.search),searchText:this.state.searchText}),this.props.columnToggle&&(e.columnToggle={toggles:this.state.columnToggle}),f.default.createElement(m.Provider,{value:{searchProps:{searchText:this.state.searchText,onSearch:this.onSearch,onClear:this.onClear},csvProps:{onExport:this.handleExportCSV},columnToggleProps:{columns:this.props.columns,toggles:this.state.columnToggle,onColumnToggle:this.onColumnToggle},baseProps:e}},this.props.children)}}]),t}((0,y.default)(f.default.Component));g.propTypes={keyField:d.default.string.isRequired,data:d.default.array.isRequired,columns:d.default.array.isRequired,children:d.default.node.isRequired,bootstrap4:d.default.bool,search:d.default.oneOfType([d.default.bool,d.default.shape({defaultSearch:d.default.string,searchFormatted:d.default.bool})]),exportCSV:d.default.oneOfType([d.default.bool,d.default.shape({fileName:d.default.string,separator:d.default.string,ignoreHeader:d.default.bool,noAutoBOM:d.default.bool,exportAll:d.default.bool,onlyExportFiltered:d.default.bool,onlyExportSelection:d.default.bool})])},g.defaultProps={search:!1,exportCSV:!1,bootstrap4:!1},t.default={Provider:g,Consumer:m.Consumer}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnToggle=t.CSVExport=t.Search=t.ToolkitContext=void 0;var o=r(4);Object.defineProperty(t,"Search",{enumerable:!0,get:function(){return n(o).default}});var a=r(11);Object.defineProperty(t,"CSVExport",{enumerable:!0,get:function(){return n(a).default}});var u=r(13);Object.defineProperty(t,"ColumnToggle",{enumerable:!0,get:function(){return n(u).default}});var l=r(2),i=n(l),s=r(22),c=n(s);t.default=c.default;t.ToolkitContext=i.default},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(5),a=n(o),u=r(10),l=n(u);t.default={SearchBar:a.default,ClearSearchButton:l.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 a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=arguments,s=r(0),c=n(s),f=r(1),p=n(f),d=function(e,t,r){var n=void 0;return function(){var o=function(){n=null,r||e.apply(void 0,i)},a=r&&!n;clearTimeout(n),n=setTimeout(o,t||0),a&&e.appy(void 0,i)}},h=function(e){function t(e){o(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.onChangeValue=function(e){r.setState({value:e.target.value})},r.onKeyup=function(){var e=r.props,t=e.delay,n=e.onSearch;d(function(){n(r.input.value)},t)()},r.state={value:e.searchText},r}return u(t,e),l(t,[{key:"componentWillReceiveProps",value:function(e){this.setState({value:e.searchText})}},{key:"render",value:function(){var e=this,r=this.props,n=r.className,o=r.style,a=r.placeholder,u=r.tableId;return c.default.createElement("label",{htmlFor:"search-bar-"+u,className:"search-label"},c.default.createElement("span",{className:"sr-only"},"Search this table"),c.default.createElement("input",{ref:function(t){return e.input=t},id:"search-bar-"+u,type:"text",style:o,"aria-label":"enter text you want to search",onKeyUp:function(){return e.onKeyup()},onChange:this.onChangeValue,className:"form-control "+n,value:this.state.value,placeholder:a||t.defaultProps.placeholder}))}}]),t}(c.default.Component);h.propTypes={onSearch:p.default.func.isRequired,className:p.default.string,placeholder:p.default.string,style:p.default.object,delay:p.default.number,searchText:p.default.string,tableId:p.default.string},h.defaultProps={className:"",style:{},placeholder:"Search",delay:250,searchText:"",tableId:"0"},t.default=h},function(e,t,r){"use strict";var n=r(7),o=r(8),a=r(9);e.exports=function(){function e(e,t,r,n,u,l){l!==a&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return r.checkPropTypes=n,r.PropTypes=r,r}},function(e,t,r){"use strict";function n(e){return function(){return e}}var o=function(){};o.thatReturns=n,o.thatReturnsFalse=n(!1),o.thatReturnsTrue=n(!0),o.thatReturnsNull=n(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,r){"use strict";function n(e,t,r,n,a,u,l,i){if(o(t),!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,a,u,l,i],f=0;s=new Error(t.replace(/%s/g,function(){return c[f++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var o=function(e){};e.exports=n},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},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(0),a=n(o),u=r(1),l=n(u),i=function(e){var t=e.onClear,r=e.text,n=e.className;return a.default.createElement("button",{className:"btn btn-default "+n,onClick:t},r)};i.propTypes={onClear:l.default.func.isRequired,className:l.default.string,text:l.default.string},i.defaultProps={text:"Clear",className:""},t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12),o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default={ExportCSVButton:o.default}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(0),l=n(u),i=r(1),s=n(i),c=function(e){var t=e.onExport,r=e.children,n=e.className,u=o(e,["onExport","children","className"]);return l.default.createElement("button",a({type:"button",className:"react-bs-table-csv-btn btn btn-default "+n,onClick:function(){return t()}},u),r)};c.propTypes={children:s.default.node.isRequired,onExport:s.default.func.isRequired,className:s.default.string,style:s.default.object},c.defaultProps={className:"",style:{}},t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(14),o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default={ToggleList:o.default}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=r(0),u=n(a),l=r(1),i=n(l),s=function(e){var t=e.columns,r=e.onColumnToggle,n=e.toggles,a=e.contextual,l=e.className,i=e.btnClassName;return u.default.createElement("div",{className:"btn-group btn-group-toggle "+l,"data-toggle":"buttons"},t.map(function(e){return o({},e,{toggle:n[e.dataField]})}).map(function(e){return u.default.createElement("button",{type:"button",key:e.dataField,className:i+" btn btn-"+a+" "+(e.toggle?"active":""),"data-toggle":"button","aria-pressed":e.toggle?"true":"false",onClick:function(){return r(e.dataField)}},e.text)}))};s.propTypes={columns:i.default.array.isRequired,toggles:i.default.object.isRequired,onColumnToggle:i.default.func.isRequired,btnClassName:i.default.string,className:i.default.string,contextual:i.default.string},s.defaultProps={btnClassName:"",className:"",contextual:"primary"},t.default=s},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=r(16),l=function(e){return e&&e.__esModule?e:{default:e}}(u);t.default=function(e){return function(e){function t(){var e,r,a,u;n(this,t);for(var l=arguments.length,i=Array(l),s=0;s<l;s++)i[s]=arguments[s];return r=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),a.registerExposedAPI=function(e){a.tableExposedAPIEmitter=e},u=r,o(a,u)}return a(t,e),t}(l.default.csvOperation(e))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(17),o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default={csvOperation:o.default}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l=r(18),i={fileName:"spreadsheet.csv",separator:",",ignoreHeader:!1,noAutoBOM:!0,exportAll:!0,onlyExportSelection:!1};t.default=function(e){return function(e){function t(){var e,r,a,s;n(this,t);for(var c=arguments.length,f=Array(c),p=0;p<c;p++)f[p]=arguments[p];return r=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(f))),a.handleExportCSV=function(e){var t=a.props,r=t.columns,n=t.exportCSV,o=t.keyField,s=(0,l.getMetaInfo)(r),c=!0===n?i:u({},i,n),f=void 0;if(void 0!==e)f=e;else if(c.exportAll)f=a.props.data;else if(c.onlyExportFiltered){var p={};a.tableExposedAPIEmitter.emit("get.filtered.rows",p),f=p.result}else{var d={};a.tableExposedAPIEmitter.emit("get.table.data",d),f=d.result}if(c.onlyExportSelection){var h={};a.tableExposedAPIEmitter.emit("get.selected.rows",h);var y=h.result;f=f.filter(function(e){return!!y.find(function(t){return e[o]===t})})}var b=(0,l.transform)(f,s,a._.get,c);(0,l.save)(b,c)},s=r,o(a,s)}return a(t,e),t}(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.save=t.transform=t.getMetaInfo=void 0;var n=r(19),o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.getMetaInfo=function(e){return e.map(function(e){return{field:e.dataField,type:e.csvType||String,formatter:e.csvFormatter,formatExtraData:e.formatExtraData,header:e.csvText||e.text,export:!1!==e.csvExport,row:Number(e.row)||0,rowSpan:Number(e.rowSpan)||1,colSpan:Number(e.colSpan)||1}}).filter(function(e){return e.export})},t.transform=function(e,t,r,n){var o=n.separator,a=n.ignoreHeader,u=t.filter(function(e){return e.export}),l="";return a||(l+=u.map(function(e){return'"'+e.header+'"'}).join(o),l+="\n"),0===e.length?l:l+=e.map(function(e,t){return u.map(function(n){var o=r(e,n.field);return n.formatter&&(o=n.formatter(o,e,t,n.formatExtraData)),n.type===String?'"'+(""+o).replace(/"/g,'""')+'"':o}).join(o)}).join("\n")},t.save=function(e,t){var r=t.noAutoBOM,n=t.fileName;o.default.saveAs(new Blob([e],{type:"text/plain;charset=utf-8"}),n,r)}},function(e,t,r){(function(r){var n,o,a;!function(r,u){o=[],n=u,void 0!==(a="function"==typeof n?n.apply(t,o):n)&&(e.exports=a)}(0,function(){"use strict";function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\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}function n(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){l(n.response,t,r)},n.onerror=function(){console.error("could not download file")},n.send()}function o(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var u="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof r&&r.global===r?r:void 0,l=u.saveAs||("object"!=typeof window||window!==u?function(){}:"download"in HTMLAnchorElement.prototype?function(e,t,r){var l=u.URL||u.webkitURL,i=document.createElement("a");t=t||e.name||"download",i.download=t,i.rel="noopener","string"==typeof e?(i.href=e,i.origin===location.origin?a(i):o(i.href)?n(e,t,r):a(i,i.target="_blank")):(i.href=l.createObjectURL(e),setTimeout(function(){l.revokeObjectURL(i.href)},4e4),setTimeout(function(){a(i)},0))}:"msSaveOrOpenBlob"in navigator?function(e,r,u){if(r=r||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,u),r);else if(o(e))n(e,r,u);else{var l=document.createElement("a");l.href=e,l.target="_blank",setTimeout(function(){a(l)})}}:function(e,t,r,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return n(e,t,r);var a="application/octet-stream"===e.type,l=/constructor/i.test(u.HTMLElement)||u.safari,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||a&&l)&&"object"==typeof FileReader){var s=new FileReader;s.onloadend=function(){var e=s.result;e=i?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},s.readAsDataURL(e)}else{var c=u.URL||u.webkitURL,f=c.createObjectURL(e);o?o.location=f:location.href=f,o=null,setTimeout(function(){c.revokeObjectURL(f)},4e4)}});u.saveAs=l.saveAs=l,void 0!==e&&(e.exports=l)})}).call(t,r(20))},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},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 a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),s=n(i),c=r(1),f=n(c);t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{searchFormatted:!1};return function(t,r,n){var i=s.default.createContext(),c=function(c){function f(e){o(this,f);var t=a(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,e)),u=e.data;return r()&&""!==t.props.searchText?n(t.props.searchText):(u=t.search(e),t.triggerListener(u)),t.state={data:u},t}return u(f,c),l(f,[{key:"componentWillReceiveProps",value:function(e){if(e.searchText!==this.props.searchText)if(r())n(e.searchText);else{var o=this.search(e);this.triggerListener(o),this.setState({data:o})}else if(r())this.setState({data:e.data});else if(!t.isEqual(e.data,this.props.data)){var a=this.search(e);this.triggerListener(a),this.setState({data:a})}}},{key:"getSearched",value:function(){return this.state.data}},{key:"triggerListener",value:function(e){this.props.dataChangeListener&&this.props.dataChangeListener.emit("filterChanged",e.length)}},{key:"search",value:function(r){var n=r.data,o=r.columns,a=r.searchText.toLowerCase();return n.filter(function(r,n){for(var u=0;u<o.length;u+=1){var l=o[u];if(!1!==l.searchable){var i=t.get(r,l.dataField);if(l.formatter&&e.searchFormatted?i=l.formatter(i,r,n,l.formatExtraData):l.filterValue&&(i=l.filterValue(i,r)),null!==i&&void 0!==i&&(i=i.toString().toLowerCase(),i.indexOf(a)>-1))return!0}}return!1})}},{key:"render",value:function(){return s.default.createElement(i.Provider,{value:{data:this.state.data}},this.props.children)}}]),f}(s.default.Component);return c.propTypes={data:f.default.array.isRequired,columns:f.default.array.isRequired,searchText:f.default.string,dataChangeListener:f.default.object},{Provider:c,Consumer:i.Consumer}}}},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(0),a=n(o),u=r(1),l=n(u),i=r(2),s=n(i),c=function(e){return a.default.createElement(s.default.Provider,e,a.default.createElement(s.default.Consumer,null,function(t){return e.children(t)}))};c.propTypes={children:l.default.func.isRequired},t.default=c}])});

@@ -115,2 +115,3 @@ 'use strict';

style: style,
'aria-label': 'enter text you want to search',
onKeyUp: function onKeyUp() {

@@ -117,0 +118,0 @@ return _this2.onKeyup();

{
"name": "react-bootstrap-table2-toolkit",
"version": "1.4.2",
"version": "2.0.0",
"description": "The toolkit for react-bootstrap-table2",

@@ -48,4 +48,4 @@ "main": "./lib/index.js",

"dependencies": {
"file-saver": "1.3.8"
"file-saver": "2.0.2"
}
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc