From c9587b25c06998eb443970b89302bac147840fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Almali?= Date: Mon, 5 Dec 2016 13:06:39 +0300 Subject: [PATCH] #0 lib added --- .gitignore | 4 +- dist/react-bootstrap-table.js | 159 ++-- dist/react-bootstrap-table.js.map | 2 +- dist/react-bootstrap-table.min.js | 14 +- lib/BootstrapTable.js | 1437 +++++++++++++++++++++++++++++ lib/Const.js | 53 ++ lib/Editor.js | 135 +++ lib/ExpandComponent.js | 75 ++ lib/Filter.js | 80 ++ lib/Notification.js | 76 ++ lib/SelectRowHeaderColumn.js | 61 ++ lib/TableBody.js | 465 ++++++++++ lib/TableColumn.js | 158 ++++ lib/TableEditColumn.js | 244 +++++ lib/TableFilter.js | 147 +++ lib/TableHeader.js | 192 ++++ lib/TableHeaderColumn.js | 357 +++++++ lib/TableRow.js | 177 ++++ lib/csv_export_util.js | 72 ++ lib/filesaver.js | 275 ++++++ lib/filters/Date.js | 198 ++++ lib/filters/Number.js | 245 +++++ lib/filters/Regex.js | 123 +++ lib/filters/Select.js | 141 +++ lib/filters/Text.js | 123 +++ lib/index.js | 32 + lib/pagination/PageButton.js | 92 ++ lib/pagination/PaginationList.js | 331 +++++++ lib/store/TableDataStore.js | 676 ++++++++++++++ lib/toolbar/ToolBar.js | 571 ++++++++++++ lib/util.js | 72 ++ 31 files changed, 6697 insertions(+), 90 deletions(-) create mode 100644 lib/BootstrapTable.js create mode 100644 lib/Const.js create mode 100644 lib/Editor.js create mode 100644 lib/ExpandComponent.js create mode 100644 lib/Filter.js create mode 100644 lib/Notification.js create mode 100644 lib/SelectRowHeaderColumn.js create mode 100644 lib/TableBody.js create mode 100644 lib/TableColumn.js create mode 100644 lib/TableEditColumn.js create mode 100644 lib/TableFilter.js create mode 100644 lib/TableHeader.js create mode 100644 lib/TableHeaderColumn.js create mode 100644 lib/TableRow.js create mode 100644 lib/csv_export_util.js create mode 100644 lib/filesaver.js create mode 100644 lib/filters/Date.js create mode 100644 lib/filters/Number.js create mode 100644 lib/filters/Regex.js create mode 100644 lib/filters/Select.js create mode 100644 lib/filters/Text.js create mode 100644 lib/index.js create mode 100644 lib/pagination/PageButton.js create mode 100644 lib/pagination/PaginationList.js create mode 100644 lib/store/TableDataStore.js create mode 100644 lib/toolbar/ToolBar.js create mode 100644 lib/util.js diff --git a/.gitignore b/.gitignore index dab80ee0e..df6f3c1ba 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,5 @@ node_modules *.sublime-workspace *.idea *.iml -lib/ -npm-debug.log \ No newline at end of file + +npm-debug.log diff --git a/dist/react-bootstrap-table.js b/dist/react-bootstrap-table.js index 107056539..b9b5c2306 100644 --- a/dist/react-bootstrap-table.js +++ b/dist/react-bootstrap-table.js @@ -1522,9 +1522,9 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(BootstrapTable, 'BootstrapTable', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/BootstrapTable.js'); + __REACT_HOT_LOADER__.register(BootstrapTable, 'BootstrapTable', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/BootstrapTable.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/BootstrapTable.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/BootstrapTable.js'); }(); ; @@ -1642,7 +1642,7 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/Const.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/Const.js'); }(); ; @@ -1835,11 +1835,11 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(Checkbox, 'Checkbox', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableHeader.js'); + __REACT_HOT_LOADER__.register(Checkbox, 'Checkbox', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableHeader.js'); - __REACT_HOT_LOADER__.register(TableHeader, 'TableHeader', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableHeader.js'); + __REACT_HOT_LOADER__.register(TableHeader, 'TableHeader', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableHeader.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableHeader.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableHeader.js'); }(); ; @@ -1909,9 +1909,9 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(SelectRowHeaderColumn, 'SelectRowHeaderColumn', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/SelectRowHeaderColumn.js'); + __REACT_HOT_LOADER__.register(SelectRowHeaderColumn, 'SelectRowHeaderColumn', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/SelectRowHeaderColumn.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/SelectRowHeaderColumn.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/SelectRowHeaderColumn.js'); }(); ; @@ -2377,11 +2377,11 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(isFun, 'isFun', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableBody.js'); + __REACT_HOT_LOADER__.register(isFun, 'isFun', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableBody.js'); - __REACT_HOT_LOADER__.register(TableBody, 'TableBody', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableBody.js'); + __REACT_HOT_LOADER__.register(TableBody, 'TableBody', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableBody.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableBody.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableBody.js'); }(); ; @@ -2561,9 +2561,9 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(TableRow, 'TableRow', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableRow.js'); + __REACT_HOT_LOADER__.register(TableRow, 'TableRow', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableRow.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableRow.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableRow.js'); }(); ; @@ -2724,9 +2724,9 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(TableColumn, 'TableColumn', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableColumn.js'); + __REACT_HOT_LOADER__.register(TableColumn, 'TableColumn', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableColumn.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableColumn.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableColumn.js'); }(); ; @@ -2973,9 +2973,9 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(TableEditColumn, 'TableEditColumn', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableEditColumn.js'); + __REACT_HOT_LOADER__.register(TableEditColumn, 'TableEditColumn', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableEditColumn.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableEditColumn.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableEditColumn.js'); }(); ; @@ -3113,9 +3113,9 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(editor, 'editor', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/Editor.js'); + __REACT_HOT_LOADER__.register(editor, 'editor', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/Editor.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/Editor.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/Editor.js'); }(); ; @@ -3192,11 +3192,11 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(ToastrMessageFactory, 'ToastrMessageFactory', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/Notification.js'); + __REACT_HOT_LOADER__.register(ToastrMessageFactory, 'ToastrMessageFactory', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/Notification.js'); - __REACT_HOT_LOADER__.register(Notification, 'Notification', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/Notification.js'); + __REACT_HOT_LOADER__.register(Notification, 'Notification', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/Notification.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/Notification.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/Notification.js'); }(); ; @@ -8367,7 +8367,7 @@ return /******/ (function(modules) { // webpackBootstrap * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule reactProdInvariant - * + * */ 'use strict'; @@ -9373,9 +9373,9 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(ExpandComponent, 'ExpandComponent', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/ExpandComponent.js'); + __REACT_HOT_LOADER__.register(ExpandComponent, 'ExpandComponent', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/ExpandComponent.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/ExpandComponent.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/ExpandComponent.js'); }(); ; @@ -9709,9 +9709,9 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(PaginationList, 'PaginationList', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/pagination/PaginationList.js'); + __REACT_HOT_LOADER__.register(PaginationList, 'PaginationList', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/pagination/PaginationList.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/pagination/PaginationList.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/pagination/PaginationList.js'); }(); ; @@ -9806,9 +9806,9 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(PageButton, 'PageButton', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/pagination/PageButton.js'); + __REACT_HOT_LOADER__.register(PageButton, 'PageButton', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/pagination/PageButton.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/pagination/PageButton.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/pagination/PageButton.js'); }(); ; @@ -10382,9 +10382,9 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(ToolBar, 'ToolBar', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/toolbar/ToolBar.js'); + __REACT_HOT_LOADER__.register(ToolBar, 'ToolBar', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/toolbar/ToolBar.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/toolbar/ToolBar.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/toolbar/ToolBar.js'); }(); ; @@ -10534,9 +10534,9 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(TableFilter, 'TableFilter', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableFilter.js'); + __REACT_HOT_LOADER__.register(TableFilter, 'TableFilter', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableFilter.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableFilter.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableFilter.js'); }(); ; @@ -11215,9 +11215,9 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(_sort, '_sort', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/store/TableDataStore.js'); + __REACT_HOT_LOADER__.register(_sort, '_sort', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/store/TableDataStore.js'); - __REACT_HOT_LOADER__.register(TableDataStore, 'TableDataStore', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/store/TableDataStore.js'); + __REACT_HOT_LOADER__.register(TableDataStore, 'TableDataStore', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/store/TableDataStore.js'); }(); ; @@ -11294,7 +11294,7 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/util.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/util.js'); }(); ; @@ -11365,13 +11365,13 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(saveAs, 'saveAs', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/csv_export_util.js'); + __REACT_HOT_LOADER__.register(saveAs, 'saveAs', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/csv_export_util.js'); - __REACT_HOT_LOADER__.register(toString, 'toString', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/csv_export_util.js'); + __REACT_HOT_LOADER__.register(toString, 'toString', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/csv_export_util.js'); - __REACT_HOT_LOADER__.register(exportCSV, 'exportCSV', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/csv_export_util.js'); + __REACT_HOT_LOADER__.register(exportCSV, 'exportCSV', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/csv_export_util.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/csv_export_util.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/csv_export_util.js'); }(); ; @@ -11651,7 +11651,7 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(saveAs, "saveAs", "/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/filesaver.js"); + __REACT_HOT_LOADER__.register(saveAs, "saveAs", "/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/filesaver.js"); }(); ; @@ -11751,7 +11751,7 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(Filter, 'Filter', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/Filter.js'); + __REACT_HOT_LOADER__.register(Filter, 'Filter', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/Filter.js'); }(); ; @@ -11819,12 +11819,8 @@ return /******/ (function(modules) { // webpackBootstrap er = arguments[1]; if (er instanceof Error) { throw er; // Unhandled 'error' event - } else { - // At least give some kind of context to the user - var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); - err.context = er; - throw err; } + throw TypeError('Uncaught, unspecified "error" event.'); } } @@ -11847,11 +11843,18 @@ return /******/ (function(modules) { // webpackBootstrap break; // slower default: - args = Array.prototype.slice.call(arguments, 1); + len = arguments.length; + args = new Array(len - 1); + for (i = 1; i < len; i++) + args[i - 1] = arguments[i]; handler.apply(this, args); } } else if (isObject(handler)) { - args = Array.prototype.slice.call(arguments, 1); + len = arguments.length; + args = new Array(len - 1); + for (i = 1; i < len; i++) + args[i - 1] = arguments[i]; + listeners = handler.slice(); len = listeners.length; for (i = 0; i < len; i++) @@ -11889,6 +11892,7 @@ return /******/ (function(modules) { // webpackBootstrap // Check for listener leak if (isObject(this._events[type]) && !this._events[type].warned) { + var m; if (!isUndefined(this._maxListeners)) { m = this._maxListeners; } else { @@ -12010,7 +12014,7 @@ return /******/ (function(modules) { // webpackBootstrap if (isFunction(listeners)) { this.removeListener(type, listeners); - } else if (listeners) { + } else { // LIFO order while (listeners.length) this.removeListener(type, listeners[listeners.length - 1]); @@ -12031,20 +12035,15 @@ return /******/ (function(modules) { // webpackBootstrap return ret; }; - EventEmitter.prototype.listenerCount = function(type) { - if (this._events) { - var evlistener = this._events[type]; - - if (isFunction(evlistener)) - return 1; - else if (evlistener) - return evlistener.length; - } - return 0; - }; - EventEmitter.listenerCount = function(emitter, type) { - return emitter.listenerCount(type); + var ret; + if (!emitter._events || !emitter._events[type]) + ret = 0; + else if (isFunction(emitter._events[type])) + ret = 1; + else + ret = emitter._events[type].length; + return ret; }; function isFunction(arg) { @@ -12417,11 +12416,11 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(TableHeaderColumn, 'TableHeaderColumn', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableHeaderColumn.js'); + __REACT_HOT_LOADER__.register(TableHeaderColumn, 'TableHeaderColumn', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableHeaderColumn.js'); - __REACT_HOT_LOADER__.register(filterTypeArray, 'filterTypeArray', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableHeaderColumn.js'); + __REACT_HOT_LOADER__.register(filterTypeArray, 'filterTypeArray', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableHeaderColumn.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/TableHeaderColumn.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/TableHeaderColumn.js'); }(); ; @@ -12618,13 +12617,13 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(legalComparators, 'legalComparators', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/filters/Date.js'); + __REACT_HOT_LOADER__.register(legalComparators, 'legalComparators', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/filters/Date.js'); - __REACT_HOT_LOADER__.register(dateParser, 'dateParser', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/filters/Date.js'); + __REACT_HOT_LOADER__.register(dateParser, 'dateParser', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/filters/Date.js'); - __REACT_HOT_LOADER__.register(DateFilter, 'DateFilter', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/filters/Date.js'); + __REACT_HOT_LOADER__.register(DateFilter, 'DateFilter', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/filters/Date.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/filters/Date.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/filters/Date.js'); }(); ; @@ -12750,9 +12749,9 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(TextFilter, 'TextFilter', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/filters/Text.js'); + __REACT_HOT_LOADER__.register(TextFilter, 'TextFilter', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/filters/Text.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/filters/Text.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/filters/Text.js'); }(); ; @@ -12878,9 +12877,9 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(RegexFilter, 'RegexFilter', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/filters/Regex.js'); + __REACT_HOT_LOADER__.register(RegexFilter, 'RegexFilter', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/filters/Regex.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/filters/Regex.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/filters/Regex.js'); }(); ; @@ -13024,9 +13023,9 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(SelectFilter, 'SelectFilter', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/filters/Select.js'); + __REACT_HOT_LOADER__.register(SelectFilter, 'SelectFilter', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/filters/Select.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/filters/Select.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/filters/Select.js'); }(); ; @@ -13272,11 +13271,11 @@ return /******/ (function(modules) { // webpackBootstrap return; } - __REACT_HOT_LOADER__.register(legalComparators, 'legalComparators', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/filters/Number.js'); + __REACT_HOT_LOADER__.register(legalComparators, 'legalComparators', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/filters/Number.js'); - __REACT_HOT_LOADER__.register(NumberFilter, 'NumberFilter', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/filters/Number.js'); + __REACT_HOT_LOADER__.register(NumberFilter, 'NumberFilter', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/filters/Number.js'); - __REACT_HOT_LOADER__.register(_default, 'default', '/Users/allen/Node/react-bootstrap-table-new/react-bootstrap-table/src/filters/Number.js'); + __REACT_HOT_LOADER__.register(_default, 'default', '/Users/omerfarukalmali/Projects/personal/js/reactjs/oalmali/react-bootstrap-table/src/filters/Number.js'); }(); ; @@ -13285,4 +13284,4 @@ return /******/ (function(modules) { // webpackBootstrap /******/ ]) }); ; -//# sourceMappingURL=react-bootstrap-table.js.map +//# sourceMappingURL=react-bootstrap-table.js.map \ No newline at end of file diff --git a/dist/react-bootstrap-table.js.map b/dist/react-bootstrap-table.js.map index 59e194ffb..bbf9aa67e 100644 --- a/dist/react-bootstrap-table.js.map +++ b/dist/react-bootstrap-table.js.map @@ -1 +1 @@ -{"version":3,"file":"react-bootstrap-table.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap cb56810a09bfc462e9e7","webpack:///src/index.js","webpack:///","webpack:///src/BootstrapTable.js","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","webpack:///./~/classnames/index.js","webpack:///src/Const.js","webpack:///src/TableHeader.js","webpack:///external {\"root\":\"ReactDOM\",\"commonjs2\":\"react-dom\",\"commonjs\":\"react-dom\",\"amd\":\"react-dom\"}","webpack:///src/SelectRowHeaderColumn.js","webpack:///src/TableBody.js","webpack:///src/TableRow.js","webpack:///src/TableColumn.js","webpack:///src/TableEditColumn.js","webpack:///src/Editor.js","webpack:///src/Notification.js","webpack:///./~/react-toastr/lib/index.js","webpack:///./~/react-toastr/lib/ToastContainer.js","webpack:///./~/react-toastr/~/lodash/omit.js","webpack:///./~/react-toastr/~/lodash/_arrayMap.js","webpack:///./~/react-toastr/~/lodash/_baseClone.js","webpack:///./~/react-toastr/~/lodash/_Stack.js","webpack:///./~/react-toastr/~/lodash/_ListCache.js","webpack:///./~/react-toastr/~/lodash/_listCacheClear.js","webpack:///./~/react-toastr/~/lodash/_listCacheDelete.js","webpack:///./~/react-toastr/~/lodash/_assocIndexOf.js","webpack:///./~/react-toastr/~/lodash/eq.js","webpack:///./~/react-toastr/~/lodash/_listCacheGet.js","webpack:///./~/react-toastr/~/lodash/_listCacheHas.js","webpack:///./~/react-toastr/~/lodash/_listCacheSet.js","webpack:///./~/react-toastr/~/lodash/_stackClear.js","webpack:///./~/react-toastr/~/lodash/_stackDelete.js","webpack:///./~/react-toastr/~/lodash/_stackGet.js","webpack:///./~/react-toastr/~/lodash/_stackHas.js","webpack:///./~/react-toastr/~/lodash/_stackSet.js","webpack:///./~/react-toastr/~/lodash/_Map.js","webpack:///./~/react-toastr/~/lodash/_getNative.js","webpack:///./~/react-toastr/~/lodash/_baseIsNative.js","webpack:///./~/react-toastr/~/lodash/isFunction.js","webpack:///./~/react-toastr/~/lodash/_baseGetTag.js","webpack:///./~/react-toastr/~/lodash/_Symbol.js","webpack:///./~/react-toastr/~/lodash/_root.js","webpack:///./~/react-toastr/~/lodash/_freeGlobal.js","webpack:///./~/react-toastr/~/lodash/_getRawTag.js","webpack:///./~/react-toastr/~/lodash/_objectToString.js","webpack:///./~/react-toastr/~/lodash/isObject.js","webpack:///./~/react-toastr/~/lodash/_isMasked.js","webpack:///./~/react-toastr/~/lodash/_coreJsData.js","webpack:///./~/react-toastr/~/lodash/_toSource.js","webpack:///./~/react-toastr/~/lodash/_getValue.js","webpack:///./~/react-toastr/~/lodash/_MapCache.js","webpack:///./~/react-toastr/~/lodash/_mapCacheClear.js","webpack:///./~/react-toastr/~/lodash/_Hash.js","webpack:///./~/react-toastr/~/lodash/_hashClear.js","webpack:///./~/react-toastr/~/lodash/_nativeCreate.js","webpack:///./~/react-toastr/~/lodash/_hashDelete.js","webpack:///./~/react-toastr/~/lodash/_hashGet.js","webpack:///./~/react-toastr/~/lodash/_hashHas.js","webpack:///./~/react-toastr/~/lodash/_hashSet.js","webpack:///./~/react-toastr/~/lodash/_mapCacheDelete.js","webpack:///./~/react-toastr/~/lodash/_getMapData.js","webpack:///./~/react-toastr/~/lodash/_isKeyable.js","webpack:///./~/react-toastr/~/lodash/_mapCacheGet.js","webpack:///./~/react-toastr/~/lodash/_mapCacheHas.js","webpack:///./~/react-toastr/~/lodash/_mapCacheSet.js","webpack:///./~/react-toastr/~/lodash/_arrayEach.js","webpack:///./~/react-toastr/~/lodash/_assignValue.js","webpack:///./~/react-toastr/~/lodash/_baseAssignValue.js","webpack:///./~/react-toastr/~/lodash/_defineProperty.js","webpack:///./~/react-toastr/~/lodash/_baseAssign.js","webpack:///./~/react-toastr/~/lodash/_copyObject.js","webpack:///./~/react-toastr/~/lodash/keys.js","webpack:///./~/react-toastr/~/lodash/_arrayLikeKeys.js","webpack:///./~/react-toastr/~/lodash/_baseTimes.js","webpack:///./~/react-toastr/~/lodash/isArguments.js","webpack:///./~/react-toastr/~/lodash/_baseIsArguments.js","webpack:///./~/react-toastr/~/lodash/isObjectLike.js","webpack:///./~/react-toastr/~/lodash/isArray.js","webpack:///./~/react-toastr/~/lodash/isBuffer.js","webpack:///(webpack)/buildin/module.js","webpack:///./~/react-toastr/~/lodash/stubFalse.js","webpack:///./~/react-toastr/~/lodash/_isIndex.js","webpack:///./~/react-toastr/~/lodash/isTypedArray.js","webpack:///./~/react-toastr/~/lodash/_baseIsTypedArray.js","webpack:///./~/react-toastr/~/lodash/isLength.js","webpack:///./~/react-toastr/~/lodash/_baseUnary.js","webpack:///./~/react-toastr/~/lodash/_nodeUtil.js","webpack:///./~/react-toastr/~/lodash/_baseKeys.js","webpack:///./~/react-toastr/~/lodash/_isPrototype.js","webpack:///./~/react-toastr/~/lodash/_nativeKeys.js","webpack:///./~/react-toastr/~/lodash/_overArg.js","webpack:///./~/react-toastr/~/lodash/isArrayLike.js","webpack:///./~/react-toastr/~/lodash/_baseAssignIn.js","webpack:///./~/react-toastr/~/lodash/keysIn.js","webpack:///./~/react-toastr/~/lodash/_baseKeysIn.js","webpack:///./~/react-toastr/~/lodash/_nativeKeysIn.js","webpack:///./~/react-toastr/~/lodash/_cloneBuffer.js","webpack:///./~/react-toastr/~/lodash/_copyArray.js","webpack:///./~/react-toastr/~/lodash/_copySymbols.js","webpack:///./~/react-toastr/~/lodash/_getSymbols.js","webpack:///./~/react-toastr/~/lodash/stubArray.js","webpack:///./~/react-toastr/~/lodash/_copySymbolsIn.js","webpack:///./~/react-toastr/~/lodash/_getSymbolsIn.js","webpack:///./~/react-toastr/~/lodash/_arrayPush.js","webpack:///./~/react-toastr/~/lodash/_getPrototype.js","webpack:///./~/react-toastr/~/lodash/_getAllKeys.js","webpack:///./~/react-toastr/~/lodash/_baseGetAllKeys.js","webpack:///./~/react-toastr/~/lodash/_getAllKeysIn.js","webpack:///./~/react-toastr/~/lodash/_getTag.js","webpack:///./~/react-toastr/~/lodash/_DataView.js","webpack:///./~/react-toastr/~/lodash/_Promise.js","webpack:///./~/react-toastr/~/lodash/_Set.js","webpack:///./~/react-toastr/~/lodash/_WeakMap.js","webpack:///./~/react-toastr/~/lodash/_initCloneArray.js","webpack:///./~/react-toastr/~/lodash/_initCloneByTag.js","webpack:///./~/react-toastr/~/lodash/_cloneArrayBuffer.js","webpack:///./~/react-toastr/~/lodash/_Uint8Array.js","webpack:///./~/react-toastr/~/lodash/_cloneDataView.js","webpack:///./~/react-toastr/~/lodash/_cloneMap.js","webpack:///./~/react-toastr/~/lodash/_addMapEntry.js","webpack:///./~/react-toastr/~/lodash/_arrayReduce.js","webpack:///./~/react-toastr/~/lodash/_mapToArray.js","webpack:///./~/react-toastr/~/lodash/_cloneRegExp.js","webpack:///./~/react-toastr/~/lodash/_cloneSet.js","webpack:///./~/react-toastr/~/lodash/_addSetEntry.js","webpack:///./~/react-toastr/~/lodash/_setToArray.js","webpack:///./~/react-toastr/~/lodash/_cloneSymbol.js","webpack:///./~/react-toastr/~/lodash/_cloneTypedArray.js","webpack:///./~/react-toastr/~/lodash/_initCloneObject.js","webpack:///./~/react-toastr/~/lodash/_baseCreate.js","webpack:///./~/react-toastr/~/lodash/_baseUnset.js","webpack:///./~/react-toastr/~/lodash/_castPath.js","webpack:///./~/react-toastr/~/lodash/_isKey.js","webpack:///./~/react-toastr/~/lodash/isSymbol.js","webpack:///./~/react-toastr/~/lodash/_stringToPath.js","webpack:///./~/react-toastr/~/lodash/_memoizeCapped.js","webpack:///./~/react-toastr/~/lodash/memoize.js","webpack:///./~/react-toastr/~/lodash/toString.js","webpack:///./~/react-toastr/~/lodash/_baseToString.js","webpack:///./~/react-toastr/~/lodash/last.js","webpack:///./~/react-toastr/~/lodash/_parent.js","webpack:///./~/react-toastr/~/lodash/_baseGet.js","webpack:///./~/react-toastr/~/lodash/_toKey.js","webpack:///./~/react-toastr/~/lodash/_baseSlice.js","webpack:///./~/react-toastr/~/lodash/_flatRest.js","webpack:///./~/react-toastr/~/lodash/flatten.js","webpack:///./~/react-toastr/~/lodash/_baseFlatten.js","webpack:///./~/react-toastr/~/lodash/_isFlattenable.js","webpack:///./~/react-toastr/~/lodash/_overRest.js","webpack:///./~/react-toastr/~/lodash/_apply.js","webpack:///./~/react-toastr/~/lodash/_setToString.js","webpack:///./~/react-toastr/~/lodash/_baseSetToString.js","webpack:///./~/react-toastr/~/lodash/constant.js","webpack:///./~/react-toastr/~/lodash/identity.js","webpack:///./~/react-toastr/~/lodash/_shortOut.js","webpack:///./~/react-toastr/~/lodash/includes.js","webpack:///./~/react-toastr/~/lodash/_baseIndexOf.js","webpack:///./~/react-toastr/~/lodash/_baseFindIndex.js","webpack:///./~/react-toastr/~/lodash/_baseIsNaN.js","webpack:///./~/react-toastr/~/lodash/_strictIndexOf.js","webpack:///./~/react-toastr/~/lodash/isString.js","webpack:///./~/react-toastr/~/lodash/toInteger.js","webpack:///./~/react-toastr/~/lodash/toFinite.js","webpack:///./~/react-toastr/~/lodash/toNumber.js","webpack:///./~/react-toastr/~/lodash/values.js","webpack:///./~/react-toastr/~/lodash/_baseValues.js","webpack:///./~/react-toastr/~/react-addons-update/index.js","webpack:///./~/react-toastr/~/react/lib/update.js","webpack:///(webpack)/~/node-libs-browser/~/process/browser.js","webpack:///./~/react-toastr/~/react/lib/reactProdInvariant.js","webpack:///./~/react-toastr/~/react/~/object-assign/index.js","webpack:///./~/react-toastr/~/react/~/fbjs/lib/keyOf.js","webpack:///./~/react-toastr/~/react/~/fbjs/lib/invariant.js","webpack:///./~/react-toastr/lib/ToastMessage/index.js","webpack:///./~/react-toastr/lib/ToastMessage/animationMixin.js","webpack:///./~/react-toastr/~/react/lib/ReactTransitionEvents.js","webpack:///./~/react-toastr/~/react/~/fbjs/lib/ExecutionEnvironment.js","webpack:///./~/react-toastr/~/react/lib/getVendorPrefixedEventName.js","webpack:///./~/react-toastr/~/element-class/index.js","webpack:///./~/react-toastr/lib/ToastMessage/jQueryMixin.js","webpack:///src/ExpandComponent.js","webpack:///src/pagination/PaginationList.js","webpack:///src/pagination/PageButton.js","webpack:///src/toolbar/ToolBar.js","webpack:///src/TableFilter.js","webpack:///src/store/TableDataStore.js","webpack:///src/util.js","webpack:///src/csv_export_util.js","webpack:///src/filesaver.js","webpack:///(webpack)/buildin/amd-define.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///src/Filter.js","webpack:///(webpack)/~/node-libs-browser/~/events/events.js","webpack:///src/TableHeaderColumn.js","webpack:///src/filters/Date.js","webpack:///src/filters/Text.js","webpack:///src/filters/Regex.js","webpack:///src/filters/Select.js","webpack:///src/filters/Number.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactBootstrapTable\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"ReactBootstrapTable\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_6__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap cb56810a09bfc462e9e7","import BootstrapTable from './BootstrapTable';\nimport TableHeaderColumn from './TableHeaderColumn';\n\nif (typeof window !== 'undefined') {\n window.BootstrapTable = BootstrapTable;\n window.TableHeaderColumn = TableHeaderColumn;\n}\nexport {\n BootstrapTable,\n TableHeaderColumn\n};\n\n\n\n// WEBPACK FOOTER //\n// src/index.js","undefined\n\n\n// WEBPACK FOOTER //\n// ","/* eslint no-alert: 0 */\n/* eslint max-len: 0 */\nimport React, { Component, PropTypes } from 'react';\nimport classSet from 'classnames';\nimport Const from './Const';\nimport TableHeader from './TableHeader';\nimport TableBody from './TableBody';\nimport PaginationList from './pagination/PaginationList';\nimport ToolBar from './toolbar/ToolBar';\nimport TableFilter from './TableFilter';\nimport { TableDataStore } from './store/TableDataStore';\nimport Util from './util';\nimport exportCSV from './csv_export_util';\nimport { Filter } from './Filter';\n\nclass BootstrapTable extends Component {\n\n constructor(props) {\n super(props);\n this.isIE = false;\n this._attachCellEditFunc();\n if (Util.canUseDOM()) {\n this.isIE = document.documentMode;\n }\n this.store = new TableDataStore(this.props.data.slice());\n\n this.initTable(this.props);\n\n if (this.props.selectRow && this.props.selectRow.selected) {\n const copy = this.props.selectRow.selected.slice();\n this.store.setSelectedRowKey(copy);\n }\n let currPage = Const.PAGE_START_INDEX;\n if (typeof this.props.options.page !== 'undefined') {\n currPage = this.props.options.page;\n } else if (typeof this.props.options.pageStartIndex !== 'undefined') {\n currPage = this.props.options.pageStartIndex;\n }\n\n this.state = {\n data: this.getTableData(),\n currPage: currPage,\n sizePerPage: this.props.options.sizePerPage || Const.SIZE_PER_PAGE_LIST[0],\n selectedRowKeys: this.store.getSelectedRowKeys()\n };\n }\n\n initTable(props) {\n let { keyField } = props;\n\n const isKeyFieldDefined = typeof keyField === 'string' && keyField.length;\n React.Children.forEach(props.children, column => {\n if (column.props.isKey) {\n if (keyField) {\n throw new Error('Error. Multiple key column be detected in TableHeaderColumn.');\n }\n keyField = column.props.dataField;\n }\n if (column.props.filter) {\n // a column contains a filter\n if (!this.filter) {\n // first time create the filter on the BootstrapTable\n this.filter = new Filter();\n }\n // pass the filter to column with filter\n column.props.filter.emitter = this.filter;\n }\n });\n\n if (this.filter) {\n this.filter.removeAllListeners('onFilterChange');\n this.filter.on('onFilterChange', (currentFilter) => {\n this.handleFilterData(currentFilter);\n });\n }\n\n this.colInfos = this.getColumnsDescription(props).reduce(( prev, curr ) => {\n prev[curr.name] = curr;\n return prev;\n }, {});\n\n if (!isKeyFieldDefined && !keyField) {\n throw new Error(`Error. No any key column defined in TableHeaderColumn.\n Use 'isKey={true}' to specify a unique column after version 0.5.4.`);\n }\n\n this.store.setProps({\n isPagination: props.pagination,\n keyField: keyField,\n colInfos: this.colInfos,\n multiColumnSearch: props.multiColumnSearch,\n remote: this.isRemoteDataSource()\n });\n }\n\n getTableData() {\n let result = [];\n const { options, pagination } = this.props;\n const sortName = options.defaultSortName || options.sortName;\n const sortOrder = options.defaultSortOrder || options.sortOrder;\n const searchText = options.defaultSearch;\n if (sortName && sortOrder) {\n this.store.sort(sortOrder, sortName);\n }\n\n if (searchText) {\n this.store.search(searchText);\n }\n\n if (pagination) {\n let page;\n let sizePerPage;\n if (this.store.isChangedPage()) {\n sizePerPage = this.state.sizePerPage;\n page = this.state.currPage;\n } else {\n sizePerPage = options.sizePerPage || Const.SIZE_PER_PAGE_LIST[0];\n page = options.page || 1;\n }\n result = this.store.page(page, sizePerPage).get();\n } else {\n result = this.store.get();\n }\n return result;\n }\n\n getColumnsDescription({ children }) {\n return React.Children.map(children, (column, i) => {\n return {\n name: column.props.dataField,\n align: column.props.dataAlign,\n sort: column.props.dataSort,\n format: column.props.dataFormat,\n formatExtraData: column.props.formatExtraData,\n filterFormatted: column.props.filterFormatted,\n filterValue: column.props.filterValue,\n editable: column.props.editable,\n customEditor: column.props.customEditor,\n hidden: column.props.hidden,\n hiddenOnInsert: column.props.hiddenOnInsert,\n searchable: column.props.searchable,\n className: column.props.columnClassName,\n columnTitle: column.props.columnTitle,\n width: column.props.width,\n text: column.props.children,\n sortFunc: column.props.sortFunc,\n sortFuncExtraData: column.props.sortFuncExtraData,\n export: column.props.export,\n index: i\n };\n });\n }\n\n componentWillReceiveProps(nextProps) {\n this.initTable(nextProps);\n const { options, selectRow } = nextProps;\n\n this.store.setData(nextProps.data.slice());\n\n // from #481\n let page = this.state.currPage;\n if (this.props.options.page !== options.page) {\n page = options.page;\n }\n // from #481\n let sizePerPage = this.state.sizePerPage;\n if (this.props.options.sizePerPage !== options.sizePerPage) {\n sizePerPage = options.sizePerPage;\n }\n\n if (this.isRemoteDataSource()) {\n this.setState({\n data: nextProps.data.slice(),\n currPage: page,\n sizePerPage\n });\n } else {\n // #125\n // remove !options.page for #709\n if (page > Math.ceil(nextProps.data.length / sizePerPage)) {\n page = 1;\n }\n const sortInfo = this.store.getSortInfo();\n const sortField = options.sortName || (sortInfo ? sortInfo.sortField : undefined);\n const sortOrder = options.sortOrder || (sortInfo ? sortInfo.order : undefined);\n if (sortField && sortOrder) this.store.sort(sortOrder, sortField);\n const data = this.store.page(page, sizePerPage).get();\n this.setState({\n data,\n currPage: page,\n sizePerPage\n });\n }\n\n if (selectRow && selectRow.selected) {\n // set default select rows to store.\n const copy = selectRow.selected.slice();\n this.store.setSelectedRowKey(copy);\n this.setState({\n selectedRowKeys: copy\n });\n }\n }\n\n componentDidMount() {\n this._adjustTable();\n window.addEventListener('resize', this._adjustTable);\n this.refs.body.refs.container.addEventListener('scroll', this._scrollHeader);\n }\n\n componentWillUnmount() {\n window.removeEventListener('resize', this._adjustTable);\n this.refs.body.refs.container.removeEventListener('scroll', this._scrollHeader);\n if (this.filter) {\n this.filter.removeAllListeners('onFilterChange');\n }\n }\n\n componentDidUpdate() {\n this._adjustTable();\n this._attachCellEditFunc();\n if (this.props.options.afterTableComplete) {\n this.props.options.afterTableComplete();\n }\n }\n\n _attachCellEditFunc() {\n const { cellEdit } = this.props;\n if (cellEdit) {\n this.props.cellEdit.__onCompleteEdit__ = this.handleEditCell.bind(this);\n if (cellEdit.mode !== Const.CELL_EDIT_NONE) {\n this.props.selectRow.clickToSelect = false;\n }\n }\n }\n\n /**\n * Returns true if in the current configuration,\n * the datagrid should load its data remotely.\n *\n * @param {Object} [props] Optional. If not given, this.props will be used\n * @return {Boolean}\n */\n isRemoteDataSource(props) {\n return (props || this.props).remote;\n }\n\n render() {\n const style = {\n height: this.props.height,\n maxHeight: this.props.maxHeight\n };\n\n const columns = this.getColumnsDescription(this.props);\n const sortInfo = this.store.getSortInfo();\n const pagination = this.renderPagination();\n const toolBar = this.renderToolBar();\n const tableFilter = this.renderTableFilter(columns);\n const isSelectAll = this.isSelectAll();\n let sortIndicator = this.props.options.sortIndicator;\n if (typeof this.props.options.sortIndicator === 'undefined') sortIndicator = true;\n return (\n
\n { toolBar }\n
\n \n { this.props.children }\n \n \n
\n { tableFilter }\n { pagination }\n
\n );\n }\n\n isSelectAll() {\n if (this.store.isEmpty()) return false;\n const unselectable = this.props.selectRow.unselectable;\n const defaultSelectRowKeys = this.store.getSelectedRowKeys();\n const allRowKeys = this.store.getAllRowkey();\n\n if (defaultSelectRowKeys.length === 0) return false;\n let match = 0;\n let noFound = 0;\n let unSelectableCnt = 0;\n defaultSelectRowKeys.forEach(selected => {\n if (allRowKeys.indexOf(selected) !== -1) match++;\n else noFound++;\n if (unselectable &&\n unselectable.indexOf(selected) !== -1) unSelectableCnt++;\n });\n\n if (noFound === defaultSelectRowKeys.length) return false;\n if (match === allRowKeys.length) {\n return true;\n } else {\n if (unselectable && match <= unSelectableCnt &&\n unSelectableCnt === unselectable.length) return false;\n else return 'indeterminate';\n }\n // return (match === allRowKeys.length) ? true : 'indeterminate';\n }\n\n cleanSelected() {\n this.store.setSelectedRowKey([]);\n this.setState({\n selectedRowKeys: []\n });\n }\n\n handleSort = (order, sortField) => {\n if (this.props.options.onSortChange) {\n this.props.options.onSortChange(sortField, order, this.props);\n }\n\n if (this.isRemoteDataSource()) {\n this.store.setSortInfo(order, sortField);\n return;\n }\n\n const result = this.store.sort(order, sortField).get();\n this.setState({\n data: result\n });\n }\n\n handlePaginationData = (page, sizePerPage) => {\n const { onPageChange, pageStartIndex } = this.props.options;\n if (onPageChange) {\n onPageChange(page, sizePerPage);\n }\n\n this.setState({\n currPage: page,\n sizePerPage\n });\n\n if (this.isRemoteDataSource()) {\n return;\n }\n\n // We calculate an offset here in order to properly fetch the indexed data,\n // despite the page start index not always being 1\n let normalizedPage;\n if (pageStartIndex !== undefined) {\n const offset = Math.abs(Const.PAGE_START_INDEX - pageStartIndex);\n normalizedPage = page + offset;\n } else {\n normalizedPage = page;\n }\n\n const result = this.store.page(normalizedPage, sizePerPage).get();\n\n this.setState({ data: result });\n }\n\n handleMouseLeave = () => {\n if (this.props.options.onMouseLeave) {\n this.props.options.onMouseLeave();\n }\n }\n\n handleMouseEnter = () => {\n if (this.props.options.onMouseEnter) {\n this.props.options.onMouseEnter();\n }\n }\n\n handleRowMouseOut = (row, event) => {\n if (this.props.options.onRowMouseOut) {\n this.props.options.onRowMouseOut(row, event);\n }\n }\n\n handleRowMouseOver = (row, event) => {\n if (this.props.options.onRowMouseOver) {\n this.props.options.onRowMouseOver(row, event);\n }\n }\n\n handleRowClick = row => {\n if (this.props.options.onRowClick) {\n this.props.options.onRowClick(row);\n }\n }\n\n handleRowDoubleClick = row => {\n if (this.props.options.onRowDoubleClick) {\n this.props.options.onRowDoubleClick(row);\n }\n }\n\n handleSelectAllRow = e => {\n const isSelected = e.currentTarget.checked;\n const keyField = this.store.getKeyField();\n const { selectRow: { onSelectAll, unselectable, selected } } = this.props;\n let selectedRowKeys = [];\n let result = true;\n let rows = isSelected ?\n this.store.get() :\n this.store.getRowByKey(this.state.selectedRowKeys);\n\n if (unselectable && unselectable.length > 0) {\n if (isSelected) {\n rows = rows.filter(r => {\n return unselectable.indexOf(r[keyField]) === -1 ||\n (selected && selected.indexOf(r[keyField]) !== -1);\n });\n } else {\n rows = rows.filter(r => unselectable.indexOf(r[keyField]) === -1);\n }\n }\n\n if (onSelectAll) {\n result = this.props.selectRow.onSelectAll(isSelected, rows);\n }\n\n if (typeof result == 'undefined' || result !== false) {\n if (isSelected) {\n selectedRowKeys = Array.isArray(result) ?\n result :\n rows.map(r => r[keyField]);\n } else {\n if (unselectable && selected) {\n selectedRowKeys = selected.filter(r => unselectable.indexOf(r) > -1 );\n }\n }\n\n this.store.setSelectedRowKey(selectedRowKeys);\n this.setState({ selectedRowKeys });\n }\n }\n\n handleShowOnlySelected = () => {\n this.store.ignoreNonSelected();\n let result;\n if (this.props.pagination) {\n result = this.store.page(1, this.state.sizePerPage).get();\n } else {\n result = this.store.get();\n }\n this.setState({\n data: result,\n currPage: this.props.options.pageStartIndex || Const.PAGE_START_INDEX\n });\n }\n\n handleSelectRow = (row, isSelected, e) => {\n let result = true;\n let currSelected = this.store.getSelectedRowKeys();\n const rowKey = row[ this.store.getKeyField() ];\n const { selectRow } = this.props;\n if (selectRow.onSelect) {\n result = selectRow.onSelect(row, isSelected, e);\n }\n\n if (typeof result === 'undefined' || result !== false) {\n if (selectRow.mode === Const.ROW_SELECT_SINGLE) {\n currSelected = isSelected ? [ rowKey ] : [];\n } else {\n if (isSelected) {\n currSelected.push(rowKey);\n } else {\n currSelected = currSelected.filter(key => rowKey !== key);\n }\n }\n\n this.store.setSelectedRowKey(currSelected);\n this.setState({\n selectedRowKeys: currSelected\n });\n }\n }\n\n handleEditCell(newVal, rowIndex, colIndex) {\n const { onCellEdit } = this.props.options;\n const { beforeSaveCell, afterSaveCell } = this.props.cellEdit;\n let fieldName;\n React.Children.forEach(this.props.children, function(column, i) {\n if (i === colIndex) {\n fieldName = column.props.dataField;\n return false;\n }\n });\n\n if (beforeSaveCell) {\n const isValid = beforeSaveCell(this.state.data[rowIndex], fieldName, newVal);\n if (!isValid && typeof isValid !== 'undefined') {\n this.setState({\n data: this.store.get()\n });\n return;\n }\n }\n\n if (onCellEdit) {\n newVal = onCellEdit(this.state.data[rowIndex], fieldName, newVal);\n }\n\n if (this.isRemoteDataSource()) {\n if (afterSaveCell) {\n afterSaveCell(this.state.data[rowIndex], fieldName, newVal);\n }\n return;\n }\n\n const result = this.store.edit(newVal, rowIndex, fieldName).get();\n this.setState({\n data: result\n });\n\n if (afterSaveCell) {\n afterSaveCell(this.state.data[rowIndex], fieldName, newVal);\n }\n }\n\n handleAddRowAtBegin(newObj) {\n try {\n this.store.addAtBegin(newObj);\n } catch (e) {\n return e;\n }\n this._handleAfterAddingRow(newObj, true);\n }\n\n handleAddRow = newObj => {\n const { onAddRow } = this.props.options;\n if (onAddRow) {\n const colInfos = this.store.getColInfos();\n onAddRow(newObj, colInfos);\n }\n\n if (this.isRemoteDataSource()) {\n if (this.props.options.afterInsertRow) {\n this.props.options.afterInsertRow(newObj);\n }\n return null;\n }\n\n try {\n this.store.add(newObj);\n } catch (e) {\n return e.message;\n }\n this._handleAfterAddingRow(newObj, false);\n }\n\n getSizePerPage() {\n return this.state.sizePerPage;\n }\n\n getCurrentPage() {\n return this.state.currPage;\n }\n\n getTableDataIgnorePaging() {\n return this.store.getCurrentDisplayData();\n }\n\n getPageByRowKey = rowKey => {\n const { sizePerPage } = this.state;\n const currentData = this.store.getCurrentDisplayData();\n const keyField = this.store.getKeyField();\n const result = currentData.findIndex((x) => x[ keyField ] === rowKey);\n if (result > -1) {\n return parseInt((result / sizePerPage), 10) + 1;\n } else {\n return result;\n }\n }\n\n handleDropRow = rowKeys => {\n const dropRowKeys = rowKeys ? rowKeys : this.store.getSelectedRowKeys();\n // add confirm before the delete action if that option is set.\n if (dropRowKeys && dropRowKeys.length > 0) {\n if (this.props.options.handleConfirmDeleteRow) {\n this.props.options.handleConfirmDeleteRow(() => {\n this.deleteRow(dropRowKeys);\n }, dropRowKeys);\n } else if (confirm('Are you sure you want to delete?')) {\n this.deleteRow(dropRowKeys);\n }\n }\n }\n\n deleteRow(dropRowKeys) {\n const { onDeleteRow } = this.props.options;\n if (onDeleteRow) {\n onDeleteRow(dropRowKeys);\n }\n\n this.store.setSelectedRowKey([]); // clear selected row key\n\n if (this.isRemoteDataSource()) {\n if (this.props.options.afterDeleteRow) {\n this.props.options.afterDeleteRow(dropRowKeys);\n }\n return;\n }\n\n this.store.remove(dropRowKeys); // remove selected Row\n let result;\n if (this.props.pagination) {\n const { sizePerPage } = this.state;\n const currLastPage = Math.ceil(this.store.getDataNum() / sizePerPage);\n let { currPage } = this.state;\n if (currPage > currLastPage) currPage = currLastPage;\n result = this.store.page(currPage, sizePerPage).get();\n this.setState({\n data: result,\n selectedRowKeys: this.store.getSelectedRowKeys(),\n currPage\n });\n } else {\n result = this.store.get();\n this.setState({\n data: result,\n selectedRowKeys: this.store.getSelectedRowKeys()\n });\n }\n if (this.props.options.afterDeleteRow) {\n this.props.options.afterDeleteRow(dropRowKeys);\n }\n }\n\n handleFilterData = filterObj => {\n const { onFilterChange } = this.props.options;\n if (onFilterChange) {\n const colInfos = this.store.getColInfos();\n onFilterChange(filterObj, colInfos);\n }\n\n this.setState({\n currPage: this.props.options.pageStartIndex || Const.PAGE_START_INDEX\n });\n\n if (this.isRemoteDataSource()) {\n if (this.props.options.afterColumnFilter) {\n this.props.options.afterColumnFilter(filterObj, this.store.getDataIgnoringPagination());\n }\n return;\n }\n\n this.store.filter(filterObj);\n\n const sortObj = this.store.getSortInfo();\n\n if (sortObj) {\n this.store.sort(sortObj.order, sortObj.sortField);\n }\n\n let result;\n\n if (this.props.pagination) {\n const { sizePerPage } = this.state;\n result = this.store.page(1, sizePerPage).get();\n } else {\n result = this.store.get();\n }\n if (this.props.options.afterColumnFilter) {\n this.props.options.afterColumnFilter(filterObj,\n this.store.getDataIgnoringPagination());\n }\n this.setState({\n data: result\n });\n }\n\n handleExportCSV = () => {\n let result = {};\n\n let { csvFileName } = this.props;\n const { onExportToCSV } = this.props.options;\n if (onExportToCSV) {\n result = onExportToCSV();\n } else {\n result = this.store.getDataIgnoringPagination();\n }\n\n const keys = [];\n this.props.children.map(function(column) {\n if (column.props.export === true ||\n (typeof column.props.export === 'undefined' &&\n column.props.hidden === false)) {\n keys.push({\n field: column.props.dataField,\n format: column.props.csvFormat,\n header: column.props.csvHeader || column.props.dataField\n });\n }\n });\n\n if (typeof csvFileName === 'function') {\n csvFileName = csvFileName();\n }\n\n exportCSV(result, keys, csvFileName);\n }\n\n handleSearch = searchText => {\n const { onSearchChange } = this.props.options;\n if (onSearchChange) {\n const colInfos = this.store.getColInfos();\n onSearchChange(searchText, colInfos, this.props.multiColumnSearch);\n }\n\n this.setState({\n currPage: this.props.options.pageStartIndex || Const.PAGE_START_INDEX\n });\n\n if (this.isRemoteDataSource()) {\n if (this.props.options.afterSearch) {\n this.props.options.afterSearch(searchText, this.store.getDataIgnoringPagination());\n }\n return;\n }\n\n\n this.store.search(searchText);\n\n const sortObj = this.store.getSortInfo();\n\n if (sortObj) {\n this.store.sort(sortObj.order, sortObj.sortField);\n }\n\n let result;\n if (this.props.pagination) {\n const { sizePerPage } = this.state;\n result = this.store.page(1, sizePerPage).get();\n } else {\n result = this.store.get();\n }\n if (this.props.options.afterSearch) {\n this.props.options.afterSearch(searchText,\n this.store.getDataIgnoringPagination());\n }\n this.setState({\n data: result\n });\n }\n\n renderPagination() {\n if (this.props.pagination) {\n let dataSize;\n if (this.isRemoteDataSource()) {\n dataSize = this.props.fetchInfo.dataTotalSize;\n } else {\n dataSize = this.store.getDataNum();\n }\n const { options } = this.props;\n if (Math.ceil(dataSize / this.state.sizePerPage) <= 1 &&\n this.props.ignoreSinglePage) return null;\n return (\n
\n \n
\n );\n }\n return null;\n }\n\n renderToolBar() {\n const { selectRow, insertRow, deleteRow, search, children } = this.props;\n const enableShowOnlySelected = selectRow && selectRow.showOnlySelected;\n if (enableShowOnlySelected\n || insertRow\n || deleteRow\n || search\n || this.props.exportCSV) {\n let columns;\n if (Array.isArray(children)) {\n columns = children.map((column, r) => {\n const { props } = column;\n return {\n name: props.children,\n field: props.dataField,\n hiddenOnInsert: props.hiddenOnInsert,\n // when you want same auto generate value and not allow edit, example ID field\n autoValue: props.autoValue || false,\n // for create editor, no params for column.editable() indicate that editor for new row\n editable: props.editable && (typeof props.editable === 'function') ? props.editable() : props.editable,\n format: props.dataFormat ? function(value) {\n return props.dataFormat(value, null, props.formatExtraData, r).replace(/<.*?>/g, '');\n } : false\n };\n });\n } else {\n columns = [ {\n name: children.props.children,\n field: children.props.dataField,\n editable: children.props.editable,\n hiddenOnInsert: children.props.hiddenOnInsert\n } ];\n }\n return (\n
\n \n
\n );\n } else {\n return null;\n }\n }\n\n renderTableFilter(columns) {\n if (this.props.columnFilter) {\n return (\n \n );\n } else {\n return null;\n }\n }\n\n _scrollHeader = (e) => {\n this.refs.header.refs.container.scrollLeft = e.currentTarget.scrollLeft;\n }\n\n _adjustTable = () => {\n if (!this.props.printable) {\n this._adjustHeaderWidth();\n }\n this._adjustHeight();\n }\n\n _adjustHeaderWidth = () => {\n const header = this.refs.header.refs.header;\n const headerContainer = this.refs.header.refs.container;\n const tbody = this.refs.body.refs.tbody;\n const firstRow = tbody.childNodes[0];\n const isScroll = headerContainer.offsetWidth !== tbody.parentNode.offsetWidth;\n const scrollBarWidth = isScroll ? Util.getScrollBarWidth() : 0;\n if (firstRow && this.store.getDataNum()) {\n const cells = firstRow.childNodes;\n for (let i = 0; i < cells.length; i++) {\n const cell = cells[i];\n const computedStyle = getComputedStyle(cell);\n let width = parseFloat(computedStyle.width.replace('px', ''));\n if (this.isIE) {\n const paddingLeftWidth = parseFloat(computedStyle.paddingLeft.replace('px', ''));\n const paddingRightWidth = parseFloat(computedStyle.paddingRight.replace('px', ''));\n const borderRightWidth = parseFloat(computedStyle.borderRightWidth.replace('px', ''));\n const borderLeftWidth = parseFloat(computedStyle.borderLeftWidth.replace('px', ''));\n width = width + paddingLeftWidth + paddingRightWidth + borderRightWidth + borderLeftWidth;\n }\n const lastPadding = (cells.length - 1 === i ? scrollBarWidth : 0);\n if (width <= 0) {\n width = 120;\n cell.width = width + lastPadding + 'px';\n }\n const result = width + lastPadding + 'px';\n header.childNodes[i].style.width = result;\n header.childNodes[i].style.minWidth = result;\n }\n } else {\n React.Children.forEach(this.props.children, (child, i) => {\n if (child.props.width) {\n header.childNodes[i].style.width = `${child.props.width}px`;\n header.childNodes[i].style.minWidth = `${child.props.width}px`;\n }\n });\n }\n }\n\n _adjustHeight = () => {\n const { height } = this.props;\n let { maxHeight } = this.props;\n if ((typeof height === 'number' && !isNaN(height)) || height.indexOf('%') === -1) {\n this.refs.body.refs.container.style.height =\n parseFloat(height, 10) - this.refs.header.refs.container.offsetHeight + 'px';\n }\n if (maxHeight) {\n maxHeight = typeof maxHeight === 'number' ?\n maxHeight :\n parseInt(maxHeight.replace('px', ''), 10);\n\n this.refs.body.refs.container.style.maxHeight =\n maxHeight - this.refs.header.refs.container.offsetHeight + 'px';\n }\n }\n\n _handleAfterAddingRow(newObj, atTheBeginning) {\n let result;\n if (this.props.pagination) {\n // if pagination is enabled and inserting row at the end,\n // change page to the last page\n // otherwise, change it to the first page\n const { sizePerPage } = this.state;\n\n if (atTheBeginning) {\n const firstPage = this.props.options.pageStartIndex || Const.PAGE_START_INDEX;\n result = this.store.page(firstPage, sizePerPage).get();\n this.setState({\n data: result,\n currPage: firstPage\n });\n } else {\n const currLastPage = Math.ceil(this.store.getDataNum() / sizePerPage);\n result = this.store.page(currLastPage, sizePerPage).get();\n this.setState({\n data: result,\n currPage: currLastPage\n });\n }\n } else {\n result = this.store.get();\n this.setState({\n data: result\n });\n }\n\n if (this.props.options.afterInsertRow) {\n this.props.options.afterInsertRow(newObj);\n }\n }\n}\n\nBootstrapTable.propTypes = {\n keyField: PropTypes.string,\n height: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),\n maxHeight: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),\n data: PropTypes.oneOfType([ PropTypes.array, PropTypes.object ]),\n remote: PropTypes.bool, // remote data, default is false\n striped: PropTypes.bool,\n bordered: PropTypes.bool,\n hover: PropTypes.bool,\n condensed: PropTypes.bool,\n pagination: PropTypes.bool,\n printable: PropTypes.bool,\n searchPlaceholder: PropTypes.string,\n selectRow: PropTypes.shape({\n mode: PropTypes.oneOf([\n Const.ROW_SELECT_NONE,\n Const.ROW_SELECT_SINGLE,\n Const.ROW_SELECT_MULTI\n ]),\n customComponent: PropTypes.func,\n bgColor: PropTypes.string,\n selected: PropTypes.array,\n onSelect: PropTypes.func,\n onSelectAll: PropTypes.func,\n clickToSelect: PropTypes.bool,\n hideSelectColumn: PropTypes.bool,\n clickToSelectAndEditCell: PropTypes.bool,\n showOnlySelected: PropTypes.bool,\n unselectable: PropTypes.array\n }),\n cellEdit: PropTypes.shape({\n mode: PropTypes.string,\n blurToSave: PropTypes.bool,\n beforeSaveCell: PropTypes.func,\n afterSaveCell: PropTypes.func,\n nonEditableRows: PropTypes.func\n }),\n insertRow: PropTypes.bool,\n deleteRow: PropTypes.bool,\n search: PropTypes.bool,\n columnFilter: PropTypes.bool,\n trClassName: PropTypes.any,\n tableStyle: PropTypes.object,\n containerStyle: PropTypes.object,\n headerStyle: PropTypes.object,\n bodyStyle: PropTypes.object,\n containerClass: PropTypes.string,\n tableContainerClass: PropTypes.string,\n headerContainerClass: PropTypes.string,\n bodyContainerClass: PropTypes.string,\n tableHeaderClass: PropTypes.string,\n tableBodyClass: PropTypes.string,\n options: PropTypes.shape({\n clearSearch: PropTypes.bool,\n sortName: PropTypes.string,\n sortOrder: PropTypes.string,\n defaultSortName: PropTypes.string,\n defaultSortOrder: PropTypes.string,\n sortIndicator: PropTypes.bool,\n afterTableComplete: PropTypes.func,\n afterDeleteRow: PropTypes.func,\n afterInsertRow: PropTypes.func,\n afterSearch: PropTypes.func,\n afterColumnFilter: PropTypes.func,\n onRowClick: PropTypes.func,\n onRowDoubleClick: PropTypes.func,\n page: PropTypes.number,\n pageStartIndex: PropTypes.number,\n paginationShowsTotal: PropTypes.oneOfType([ PropTypes.bool, PropTypes.func ]),\n sizePerPageList: PropTypes.array,\n sizePerPage: PropTypes.number,\n paginationSize: PropTypes.number,\n hideSizePerPage: PropTypes.bool,\n onSortChange: PropTypes.func,\n onPageChange: PropTypes.func,\n onSizePerPageList: PropTypes.func,\n onFilterChange: React.PropTypes.func,\n onSearchChange: React.PropTypes.func,\n onAddRow: React.PropTypes.func,\n onExportToCSV: React.PropTypes.func,\n onCellEdit: React.PropTypes.func,\n noDataText: PropTypes.oneOfType([ PropTypes.string, PropTypes.object ]),\n handleConfirmDeleteRow: PropTypes.func,\n prePage: PropTypes.string,\n nextPage: PropTypes.string,\n firstPage: PropTypes.string,\n lastPage: PropTypes.string,\n searchDelayTime: PropTypes.number,\n exportCSVText: PropTypes.string,\n insertText: PropTypes.string,\n deleteText: PropTypes.string,\n saveText: PropTypes.string,\n closeText: PropTypes.string,\n ignoreEditable: PropTypes.bool,\n defaultSearch: PropTypes.string,\n expandRowBgColor: PropTypes.string\n }),\n fetchInfo: PropTypes.shape({\n dataTotalSize: PropTypes.number\n }),\n exportCSV: PropTypes.bool,\n csvFileName: PropTypes.oneOfType([ PropTypes.string, PropTypes.func ]),\n ignoreSinglePage: PropTypes.bool,\n expandableRow: PropTypes.func,\n expandComponent: PropTypes.func\n};\nBootstrapTable.defaultProps = {\n expandComponent: undefined,\n expandableRow: undefined,\n height: '100%',\n maxHeight: undefined,\n striped: false,\n bordered: true,\n hover: false,\n condensed: false,\n pagination: false,\n printable: false,\n searchPlaceholder: undefined,\n selectRow: {\n mode: Const.ROW_SELECT_NONE,\n bgColor: Const.ROW_SELECT_BG_COLOR,\n selected: [],\n onSelect: undefined,\n onSelectAll: undefined,\n clickToSelect: false,\n hideSelectColumn: false,\n clickToSelectAndEditCell: false,\n showOnlySelected: false,\n unselectable: [],\n customComponent: undefined\n },\n cellEdit: {\n mode: Const.CELL_EDIT_NONE,\n blurToSave: false,\n beforeSaveCell: undefined,\n afterSaveCell: undefined,\n nonEditableRows: undefined\n },\n insertRow: false,\n deleteRow: false,\n search: false,\n multiColumnSearch: false,\n columnFilter: false,\n trClassName: '',\n tableStyle: undefined,\n containerStyle: undefined,\n headerStyle: undefined,\n bodyStyle: undefined,\n containerClass: null,\n tableContainerClass: null,\n headerContainerClass: null,\n bodyContainerClass: null,\n tableHeaderClass: null,\n tableBodyClass: null,\n options: {\n clearSearch: false,\n sortName: undefined,\n sortOrder: undefined,\n defaultSortName: undefined,\n defaultSortOrder: undefined,\n sortIndicator: true,\n afterTableComplete: undefined,\n afterDeleteRow: undefined,\n afterInsertRow: undefined,\n afterSearch: undefined,\n afterColumnFilter: undefined,\n onRowClick: undefined,\n onRowDoubleClick: undefined,\n onMouseLeave: undefined,\n onMouseEnter: undefined,\n onRowMouseOut: undefined,\n onRowMouseOver: undefined,\n page: undefined,\n paginationShowsTotal: false,\n sizePerPageList: Const.SIZE_PER_PAGE_LIST,\n sizePerPage: undefined,\n paginationSize: Const.PAGINATION_SIZE,\n hideSizePerPage: false,\n onSizePerPageList: undefined,\n noDataText: undefined,\n handleConfirmDeleteRow: undefined,\n prePage: Const.PRE_PAGE,\n nextPage: Const.NEXT_PAGE,\n firstPage: Const.FIRST_PAGE,\n lastPage: Const.LAST_PAGE,\n pageStartIndex: undefined,\n searchDelayTime: undefined,\n exportCSVText: Const.EXPORT_CSV_TEXT,\n insertText: Const.INSERT_BTN_TEXT,\n deleteText: Const.DELETE_BTN_TEXT,\n saveText: Const.SAVE_BTN_TEXT,\n closeText: Const.CLOSE_BTN_TEXT,\n ignoreEditable: false,\n defaultSearch: '',\n expandRowBgColor: undefined\n },\n fetchInfo: {\n dataTotalSize: 0\n },\n exportCSV: false,\n csvFileName: 'spreadsheet.csv',\n ignoreSinglePage: false\n};\n\nexport default BootstrapTable;\n\n\n\n// WEBPACK FOOTER //\n// src/BootstrapTable.js","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}\n// module id = 2\n// module chunks = 0","/*!\n Copyright (c) 2016 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses.push(classNames.apply(null, arg));\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/classnames/index.js\n// module id = 3\n// module chunks = 0","export default {\n SORT_DESC: 'desc',\n SORT_ASC: 'asc',\n SIZE_PER_PAGE: 10,\n NEXT_PAGE: '>',\n LAST_PAGE: '>>',\n PRE_PAGE: '<',\n FIRST_PAGE: '<<',\n PAGE_START_INDEX: 1,\n ROW_SELECT_BG_COLOR: '',\n ROW_SELECT_NONE: 'none',\n ROW_SELECT_SINGLE: 'radio',\n ROW_SELECT_MULTI: 'checkbox',\n CELL_EDIT_NONE: 'none',\n CELL_EDIT_CLICK: 'click',\n CELL_EDIT_DBCLICK: 'dbclick',\n SIZE_PER_PAGE_LIST: [ 10, 25, 30, 50 ],\n PAGINATION_SIZE: 5,\n NO_DATA_TEXT: 'There is no data to display',\n SHOW_ONLY_SELECT: 'Show Selected Only',\n SHOW_ALL: 'Show All',\n EXPORT_CSV_TEXT: 'Export to CSV',\n INSERT_BTN_TEXT: 'New',\n DELETE_BTN_TEXT: 'Delete',\n SAVE_BTN_TEXT: 'Save',\n CLOSE_BTN_TEXT: 'Close',\n FILTER_DELAY: 500,\n FILTER_TYPE: {\n TEXT: 'TextFilter',\n REGEX: 'RegexFilter',\n SELECT: 'SelectFilter',\n NUMBER: 'NumberFilter',\n DATE: 'DateFilter',\n CUSTOM: 'CustomFilter'\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// src/Const.js","import React, { Component, PropTypes } from 'react';\nimport ReactDOM from 'react-dom';\nimport Const from './Const';\nimport classSet from 'classnames';\nimport SelectRowHeaderColumn from './SelectRowHeaderColumn';\n\nclass Checkbox extends Component {\n componentDidMount() { this.update(this.props.checked); }\n componentWillReceiveProps(props) { this.update(props.checked); }\n update(checked) {\n ReactDOM.findDOMNode(this).indeterminate = checked === 'indeterminate';\n }\n render() {\n return (\n \n );\n }\n}\n\nclass TableHeader extends Component {\n\n render() {\n const containerClasses = classSet(\n 'react-bs-container-header',\n 'table-header-wrapper',\n this.props.headerContainerClass);\n const tableClasses = classSet('table', 'table-hover', {\n 'table-bordered': this.props.bordered,\n 'table-condensed': this.props.condensed\n }, this.props.tableHeaderClass);\n let selectRowHeaderCol = null;\n if (!this.props.hideSelectColumn) selectRowHeaderCol = this.renderSelectRowHeader();\n let i = 0;\n return (\n
\n \n \n \n { selectRowHeaderCol }\n {\n React.Children.map(this.props.children, (elm) => {\n const { sortIndicator, sortName, sortOrder, onSort } = this.props;\n const { dataField, dataSort } = elm.props;\n const sort = (dataSort && dataField === sortName) ? sortOrder : undefined;\n return React.cloneElement(elm, { key: i++, onSort, sort, sortIndicator });\n })\n }\n \n \n
\n
\n );\n }\n\n renderSelectRowHeader() {\n if (this.props.customComponent) {\n const CustomComponent = this.props.customComponent;\n return (\n \n \n \n );\n } else if (this.props.rowSelectType === Const.ROW_SELECT_SINGLE) {\n return ();\n } else if (this.props.rowSelectType === Const.ROW_SELECT_MULTI) {\n return (\n \n \n \n );\n } else {\n return null;\n }\n }\n}\nTableHeader.propTypes = {\n headerContainerClass: PropTypes.string,\n tableHeaderClass: PropTypes.string,\n style: PropTypes.object,\n rowSelectType: PropTypes.string,\n onSort: PropTypes.func,\n onSelectAllRow: PropTypes.func,\n sortName: PropTypes.string,\n sortOrder: PropTypes.string,\n hideSelectColumn: PropTypes.bool,\n bordered: PropTypes.bool,\n condensed: PropTypes.bool,\n isFiltered: PropTypes.bool,\n isSelectAll: PropTypes.oneOf([ true, 'indeterminate', false ]),\n sortIndicator: PropTypes.bool,\n customComponent: PropTypes.func\n};\n\nexport default TableHeader;\n\n\n\n// WEBPACK FOOTER //\n// src/TableHeader.js","module.exports = __WEBPACK_EXTERNAL_MODULE_6__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"ReactDOM\",\"commonjs2\":\"react-dom\",\"commonjs\":\"react-dom\",\"amd\":\"react-dom\"}\n// module id = 6\n// module chunks = 0","import React, { Component, PropTypes } from 'react';\n\nclass SelectRowHeaderColumn extends Component {\n\n render() {\n return (\n \n { this.props.children }\n \n );\n }\n}\nSelectRowHeaderColumn.propTypes = {\n children: PropTypes.node\n};\nexport default SelectRowHeaderColumn;\n\n\n\n// WEBPACK FOOTER //\n// src/SelectRowHeaderColumn.js","import React, { Component, PropTypes } from 'react';\nimport Const from './Const';\nimport TableRow from './TableRow';\nimport TableColumn from './TableColumn';\nimport TableEditColumn from './TableEditColumn';\nimport classSet from 'classnames';\nimport ExpandComponent from './ExpandComponent';\n\nconst isFun = function(obj) {\n return obj && (typeof obj === 'function');\n};\n\nclass TableBody extends Component {\n constructor(props) {\n super(props);\n this.state = {\n currEditCell: null,\n expanding: [],\n lastExpand: null\n };\n }\n\n render() {\n const { cellEdit } = this.props;\n const tableClasses = classSet('table', {\n 'table-striped': this.props.striped,\n 'table-bordered': this.props.bordered,\n 'table-hover': this.props.hover,\n 'table-condensed': this.props.condensed\n }, this.props.tableBodyClass);\n\n const noneditableRows = (cellEdit.nonEditableRows && cellEdit.nonEditableRows()) || [];\n const unselectable = this.props.selectRow.unselectable || [];\n const isSelectRowDefined = this._isSelectRowDefined();\n const tableHeader = this.renderTableHeader(isSelectRowDefined);\n const inputType = this.props.selectRow.mode === Const.ROW_SELECT_SINGLE ? 'radio' : 'checkbox';\n const CustomComponent = this.props.selectRow.customComponent;\n\n const tableRows = this.props.data.map(function(data, r) {\n const tableColumns = this.props.columns.map(function(column, i) {\n const fieldValue = data[column.name];\n if (column.name !== this.props.keyField && // Key field can't be edit\n column.editable && // column is editable? default is true, user can set it false\n this.state.currEditCell !== null &&\n this.state.currEditCell.rid === r &&\n this.state.currEditCell.cid === i &&\n noneditableRows.indexOf(data[this.props.keyField]) === -1) {\n let editable = column.editable;\n const format = column.format ? function(value) {\n return column.format(value, data, column.formatExtraData, r).replace(/<.*?>/g, '');\n } : false;\n if (isFun(column.editable)) {\n editable = column.editable(fieldValue, data, r, i);\n }\n\n return (\n \n );\n } else {\n // add by bluespring for className customize\n let columnChild = fieldValue && fieldValue.toString();\n let columnTitle = null;\n let tdClassName = column.className;\n if (isFun(column.className)) {\n tdClassName = column.className(fieldValue, data, r, i);\n }\n\n if (typeof column.format !== 'undefined') {\n const formattedValue = column.format(fieldValue, data, column.formatExtraData, r);\n if (!React.isValidElement(formattedValue)) {\n columnChild = (\n
\n );\n } else {\n columnChild = formattedValue;\n columnTitle = column.columnTitle && formattedValue ? formattedValue.toString() : null;\n }\n } else {\n columnTitle = column.columnTitle && fieldValue ? fieldValue.toString() : null;\n }\n return (\n \n );\n }\n }, this);\n const key = data[this.props.keyField];\n const disable = unselectable.indexOf(key) !== -1;\n const selected = this.props.selectedRowKeys.indexOf(key) !== -1;\n const selectRowColumn = isSelectRowDefined && !this.props.selectRow.hideSelectColumn ?\n this.renderSelectRowColumn(selected, inputType, disable, CustomComponent, r) : null;\n // add by bluespring for className customize\n let trClassName = this.props.trClassName;\n if (isFun(this.props.trClassName)) {\n trClassName = this.props.trClassName(data, r);\n }\n const result = [ \n { selectRowColumn }\n { tableColumns }\n ];\n\n if (this.props.expandableRow && this.props.expandableRow(data)) {\n let colSpan = this.props.columns.length;\n const bgColor = this.props.expandRowBgColor || this.props.selectRow.bgColor || undefined;\n if (isSelectRowDefined && !this.props.selectRow.hideSelectColumn) {\n colSpan += 1;\n }\n result.push(\n