UNPKG

react-filter-tables

Version:

A simple sortable table with filter option and pagination

1,002 lines (839 loc) 39.3 kB
module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // identity function for calling harmony imports with the correct context /******/ __webpack_require__.i = function(value) { return value; }; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 7); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { module.exports = require("react"); /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ // css base code, injected by the css-loader // eslint-disable-next-line func-names module.exports = function (useSourceMap) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = cssWithMappingToString(item, useSourceMap); if (item[2]) { return "@media ".concat(item[2], "{").concat(content, "}"); } return content; }).join(''); }; // import a list of modules into the list // eslint-disable-next-line func-names list.i = function (modules, mediaQuery) { if (typeof modules === 'string') { // eslint-disable-next-line no-param-reassign modules = [[null, modules, '']]; } var alreadyImportedModules = {}; for (var i = 0; i < this.length; i++) { // eslint-disable-next-line prefer-destructuring var id = this[i][0]; if (id != null) { alreadyImportedModules[id] = true; } } for (var _i = 0; _i < modules.length; _i++) { var item = modules[_i]; // skip already imported module // this implementation is not 100% perfect for weird media query combinations // when a module is imported multiple times with different media queries. // I hope this will never occur (Hey this way we have smaller bundles) if (item[0] == null || !alreadyImportedModules[item[0]]) { if (mediaQuery && !item[2]) { item[2] = mediaQuery; } else if (mediaQuery) { item[2] = "(".concat(item[2], ") and (").concat(mediaQuery, ")"); } list.push(item); } } }; return list; }; function cssWithMappingToString(item, useSourceMap) { var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring var cssMapping = item[3]; if (!cssMapping) { return content; } if (useSourceMap && typeof btoa === 'function') { var sourceMapping = toComment(cssMapping); var sourceURLs = cssMapping.sources.map(function (source) { return "/*# sourceURL=".concat(cssMapping.sourceRoot).concat(source, " */"); }); return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); } return [content].join('\n'); } // Adapted from convert-source-map (MIT) function toComment(sourceMap) { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64); return "/*# ".concat(data, " */"); } /***/ }), /* 2 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var stylesInDom = {}; var isOldIE = function isOldIE() { var memo; return function memorize() { if (typeof memo === 'undefined') { // Test for IE <= 9 as proposed by Browserhacks // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 // Tests for existence of standard globals is to allow style-loader // to operate correctly into non-standard environments // @see https://github.com/webpack-contrib/style-loader/issues/177 memo = Boolean(window && document && document.all && !window.atob); } return memo; }; }(); var getTarget = function getTarget() { var memo = {}; return function memorize(target) { if (typeof memo[target] === 'undefined') { var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { try { // This will throw an exception if access to iframe is blocked // due to cross-origin restrictions styleTarget = styleTarget.contentDocument.head; } catch (e) { // istanbul ignore next styleTarget = null; } } memo[target] = styleTarget; } return memo[target]; }; }(); function listToStyles(list, options) { var styles = []; var newStyles = {}; for (var i = 0; i < list.length; i++) { var item = list[i]; var id = options.base ? item[0] + options.base : item[0]; var css = item[1]; var media = item[2]; var sourceMap = item[3]; var part = { css: css, media: media, sourceMap: sourceMap }; if (!newStyles[id]) { styles.push(newStyles[id] = { id: id, parts: [part] }); } else { newStyles[id].parts.push(part); } } return styles; } function addStylesToDom(styles, options) { for (var i = 0; i < styles.length; i++) { var item = styles[i]; var domStyle = stylesInDom[item.id]; var j = 0; if (domStyle) { domStyle.refs++; for (; j < domStyle.parts.length; j++) { domStyle.parts[j](item.parts[j]); } for (; j < item.parts.length; j++) { domStyle.parts.push(addStyle(item.parts[j], options)); } } else { var parts = []; for (; j < item.parts.length; j++) { parts.push(addStyle(item.parts[j], options)); } stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }; } } } function insertStyleElement(options) { var style = document.createElement('style'); if (typeof options.attributes.nonce === 'undefined') { var nonce = true ? __webpack_require__.nc : null; if (nonce) { options.attributes.nonce = nonce; } } Object.keys(options.attributes).forEach(function (key) { style.setAttribute(key, options.attributes[key]); }); if (typeof options.insert === 'function') { options.insert(style); } else { var target = getTarget(options.insert || 'head'); if (!target) { throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); } target.appendChild(style); } return style; } function removeStyleElement(style) { // istanbul ignore if if (style.parentNode === null) { return false; } style.parentNode.removeChild(style); } /* istanbul ignore next */ var replaceText = function replaceText() { var textStore = []; return function replace(index, replacement) { textStore[index] = replacement; return textStore.filter(Boolean).join('\n'); }; }(); function applyToSingletonTag(style, index, remove, obj) { var css = remove ? '' : obj.css; // For old IE /* istanbul ignore if */ if (style.styleSheet) { style.styleSheet.cssText = replaceText(index, css); } else { var cssNode = document.createTextNode(css); var childNodes = style.childNodes; if (childNodes[index]) { style.removeChild(childNodes[index]); } if (childNodes.length) { style.insertBefore(cssNode, childNodes[index]); } else { style.appendChild(cssNode); } } } function applyToTag(style, options, obj) { var css = obj.css; var media = obj.media; var sourceMap = obj.sourceMap; if (media) { style.setAttribute('media', media); } if (sourceMap && btoa) { css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); } // For old IE /* istanbul ignore if */ if (style.styleSheet) { style.styleSheet.cssText = css; } else { while (style.firstChild) { style.removeChild(style.firstChild); } style.appendChild(document.createTextNode(css)); } } var singleton = null; var singletonCounter = 0; function addStyle(obj, options) { var style; var update; var remove; if (options.singleton) { var styleIndex = singletonCounter++; style = singleton || (singleton = insertStyleElement(options)); update = applyToSingletonTag.bind(null, style, styleIndex, false); remove = applyToSingletonTag.bind(null, style, styleIndex, true); } else { style = insertStyleElement(options); update = applyToTag.bind(null, style, options); remove = function remove() { removeStyleElement(style); }; } update(obj); return function updateStyle(newObj) { if (newObj) { if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { return; } update(obj = newObj); } else { remove(); } }; } module.exports = function (list, options) { options = options || {}; options.attributes = typeof options.attributes === 'object' ? options.attributes : {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> // tags it will allow on a page if (!options.singleton && typeof options.singleton !== 'boolean') { options.singleton = isOldIE(); } var styles = listToStyles(list, options); addStylesToDom(styles, options); return function update(newList) { var mayRemove = []; for (var i = 0; i < styles.length; i++) { var item = styles[i]; var domStyle = stylesInDom[item.id]; if (domStyle) { domStyle.refs--; mayRemove.push(domStyle); } } if (newList) { var newStyles = listToStyles(newList, options); addStylesToDom(newStyles, options); } for (var _i = 0; _i < mayRemove.length; _i++) { var _domStyle = mayRemove[_i]; if (_domStyle.refs === 0) { for (var j = 0; j < _domStyle.parts.length; j++) { _domStyle.parts[j](); } delete stylesInDom[_domStyle.id]; } } }; }; /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var Filter = function (_React$Component) { _inherits(Filter, _React$Component); function Filter(props) { _classCallCheck(this, Filter); return _possibleConstructorReturn(this, (Filter.__proto__ || Object.getPrototypeOf(Filter)).call(this, props)); } _createClass(Filter, [{ key: "render", value: function render() { var _props = this.props, width = _props.width, fill = _props.fill, style = _props.style, viewBox = _props.viewBox, _onClick = _props.onClick, className = _props.className; return _react2.default.createElement( "svg", { width: width, fill: fill, style: style, height: width, viewBox: viewBox, onClick: function onClick() { return _onClick(); }, xmlns: "http://www.w3.org/2000/svg", className: "svg-icon " + (className || ""), xmlnsXlink: "http://www.w3.org/1999/xlink" }, _react2.default.createElement( "g", null, _react2.default.createElement( "g", null, _react2.default.createElement( "g", null, _react2.default.createElement("path", { d: "M480 183.91L640 0L319.99 0L0 0L159.98 183.91L319.99 367.82L480 183.91Z" }) ), _react2.default.createElement( "g", null, _react2.default.createElement("path", { d: "M248.74 561.46L319.12 640L391.26 640L391.26 196.55L248.74 196.55L248.74 561.46Z" }), _react2.default.createElement( "g", null, _react2.default.createElement("path", { d: "M248.74 561.46L319.12 640L391.26 640L391.26 196.55L248.74 196.55L248.74 561.46Z" }) ) ) ) ) ); } }]); return Filter; }(_react2.default.Component); Filter.defaultProps = { style: {}, fill: "#000", width: "100%", className: "", viewBox: "0 0 640 640", onClick: function onClick() {} }; exports.default = Filter; /***/ }), /* 4 */, /* 5 */, /* 6 */ /***/ (function(module, exports, __webpack_require__) { var content = __webpack_require__(9); if (typeof content === 'string') { content = [[module.i, content, '']]; } var options = {} options.insert = "head"; options.singleton = false; var update = __webpack_require__(2)(content, options); if (content.locals) { module.exports = content.locals; } /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); __webpack_require__(6); var _Filter = __webpack_require__(3); var _Filter2 = _interopRequireDefault(_Filter); var _FilterRemove = __webpack_require__(17); var _FilterRemove2 = _interopRequireDefault(_FilterRemove); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * @author Alan Kuriakose * * This renders a simple sortable table with filter option */ var FilterTable = function (_React$Component) { _inherits(FilterTable, _React$Component); function FilterTable(props) { _classCallCheck(this, FilterTable); var _this = _possibleConstructorReturn(this, (FilterTable.__proto__ || Object.getPrototypeOf(FilterTable)).call(this, props)); _this.state = { showDropdown: false, filter: [], data: props.data, pages: Math.ceil(props.data.length / props.recordsPerPage), page: 1, columns: FilterTable.findColumnNames(props.data) }; return _this; } _createClass(FilterTable, [{ key: 'changePage', value: function changePage(offset) { this.setState({ page: this.state.page + offset }); } }, { key: 'renderBody', value: function renderBody() { var _this2 = this; var body = this.state.data.filter(function (object) { return _this2.state.filter.length == 0 || _this2.state.filter.filter(function (ob) { return object[ob.column] === ob.value; }).length === [].concat(_toConsumableArray(new Set(_this2.state.filter.map(function (ob) { return ob.column; })))).length; }).map(function (object, index) { return _react2.default.createElement( 'tr', { style: { cursor: 'pointer' }, key: -index, onClick: function onClick() { return _this2.props.onClick(object); } }, _this2.state.columns.map(function (key, ind) { return _react2.default.createElement( 'td', { key: key + ind }, object[key] ); }) ); }); var pages = Math.ceil(body.length / this.props.recordsPerPage); if (this.state.pages !== pages) this.setState({ pages: pages, page: 1 }); return body.slice((this.state.page - 1) * this.props.recordsPerPage, this.state.page * this.props.recordsPerPage); } }, { key: 'render', value: function render() { var _this3 = this; if (this.props.data.toString() === "") return "No data found"; return _react2.default.createElement( 'table', { className: "filterTable ".concat(this.props.classNames.join(' ')), style: this.props.style }, _react2.default.createElement( 'tbody', null, _react2.default.createElement( 'tr', { className: 'headder' }, this.state.columns.map(function (column, index) { return _react2.default.createElement( 'th', { id: 'sort', key: index + column, onClick: function onClick(event) { if (event.target.id === 'sort') _this3.setState({ data: _this3.state.data.sort(function (a, b) { var val = String(a[column]).localeCompare(String(b[column]));return _this3.state.arrow === column ? -val : val; }), arrow: _this3.state.arrow === column ? column + 'i' : column }); } }, _react2.default.createElement( 'span', { style: { cursor: 'pointer' }, id: 'sort' }, column ), '\xA0\xA0', _react2.default.createElement(_Filter2.default, { width: 15, style: { marginRight: '5px', cursor: 'pointer' }, fill: _this3.state.filter.find(function (ob) { return ob.column === column; }) ? 'red' : 'black', onClick: function onClick() { _this3.columnValues = new Set(); var lastColumn = _this3.state.filter.length !== 0 && _this3.state.filter.slice(-1)[0].column; var tempFilter = column === lastColumn ? _this3.state.filter.filter(function (ob) { return ob.column !== lastColumn; }) : _this3.state.filter; _this3.state.data.filter(function (object) { return tempFilter.length == 0 || _this3.state.filter.find(function (ob) { return ob.column === column && ob.value === object[column]; }) || tempFilter.filter(function (ob) { return object[ob.column] === ob.value; }).length === [].concat(_toConsumableArray(new Set(tempFilter.map(function (ob) { return ob.column; })))).length; }).forEach(function (object) { return _this3.columnValues.add(object[column]); }); _this3.setState(_defineProperty({}, 'showDropdown' + index, true)); } }), _react2.default.createElement( 'span', { id: 'sort', style: { fontSize: '20px', cursor: 'pointer', rotate: '180' } }, _this3.state.arrow === column ? '\u25B2' : _this3.state.arrow === column + 'i' ? '\u25BC' : null ), _this3.state['showDropdown' + index] && _react2.default.createElement( 'div', { className: 'dropDown' }, _react2.default.createElement( 'div', null, _react2.default.createElement( 'ul', null, Array.from(_this3.columnValues).sort().map(function (val) { return _react2.default.createElement( 'li', null, _react2.default.createElement('input', { type: 'checkbox', checked: _this3.state.filter.find(function (ob) { return ob.column === column && ob.value === val; }), onClick: function onClick(event) { var filter = _this3.state.filter; if (event.target.checked) { var obj = { column: column, value: val }; _this3.state.filter.find(function (object) { return object.column === column; }) ? filter.unshift(obj) : filter.push(obj); } else { filter = filter.filter(function (ob) { return ob.column !== column || ob.value !== val; }); } _this3.setState({ filter: filter }); } }), val ); }) ) ), _react2.default.createElement('div', { onClick: function onClick() { _this3.setState(_defineProperty({}, 'showDropdown' + index, false)); }, style: { position: 'fixed', top: '0', left: '0', zIndex: '990', width: '100%', height: '100%', opacity: 0 } }) ) ); }) ), this.renderBody(), _react2.default.createElement( 'tr', null, _react2.default.createElement( 'th', { colSpan: '100%', style: { fontStyle: 'normal' } }, this.state.pages === 0 ? "No data found" : _react2.default.createElement( 'div', { style: { display: 'inline-block' } }, _react2.default.createElement( 'span', { onClick: function onClick() { return _this3.changePage(-1); }, className: this.state.page === 1 ? "disabled" : "enabled" }, '\u25C0' ), ' Page ', _react2.default.createElement( 'select', { value: this.state.page, onChange: function onChange(event) { _this3.setState({ page: parseInt(event.target.value) }); } }, Array.apply(null, { length: this.state.pages }).map(function (val, ind) { return _react2.default.createElement( 'option', { key: ind, value: ind + 1 }, ind + 1 ); }) ), ' of ', this.state.pages, ' ', _react2.default.createElement( 'span', { onClick: function onClick() { return _this3.changePage(1); }, className: this.state.page === this.state.pages ? "disabled" : "enabled" }, '\u25B6' ) ), _react2.default.createElement(_FilterRemove2.default, { width: 20, fill: this.state.filter.toString() === "" ? 'darkgray' : 'red', style: { float: 'right', display: 'inline-block', cursor: 'pointer' }, onClick: function onClick() { _this3.setState({ filter: [] }); } }) ) ) ) ); } }], [{ key: 'findColumnNames', value: function findColumnNames(data) { return [].concat(_toConsumableArray(new Set(data.reduce(function (total, row) { return total.concat(Object.keys(row)); }, [])))); } }, { key: 'getDerivedStateFromProps', value: function getDerivedStateFromProps(nextProps, prevState) { if (nextProps.data !== prevState.data) { return { data: nextProps.data, filter: [], columns: FilterTable.findColumnNames(nextProps.data) }; } return null; } }]); return FilterTable; }(_react2.default.Component); FilterTable.defaultProps = { onClick: function onClick() {}, recordsPerPage: 4, data: [], style: {}, classNames: [] }; exports.default = FilterTable; /***/ }), /* 8 */, /* 9 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(1)(false); // Module exports.push([module.i, ".filterTable th {\n border: 1px solid #ddd;\n padding: 8px;\n border-right-color: white;\n border-left-color: white;\n white-space: nowrap;\n}\n\n.filterTable th:last-of-type {\n background-color: #ddd;\n border-color: #ddd;\n}\n\n.filterTable th:first-of-type {\n border-left-color: #ddd;\n}\n\n.filterTable td {\n border: 1px solid #ddd;\n padding: 8px;\n}\n\n.filterTable .headder {\n background-color: gainsboro !important;\n}\n\n.filterTable tr:hover {\n background-color: #ddd !important;\n}\n\n.filterTable tr:nth-child(odd) {\n background-color: #f2f2f2;\n}\n\n.dropDown {\n position: relative;\n}\n\n.dropDown div {\n position: absolute;\n top: 0;\n left: 0;\n min-width: 100% !important;\n background-color: white;\n text-align: left;\n margin-top: 8px;\n margin-left: -2px;\n z-index: 999;\n box-shadow: 0px 3px 5px -1px rgba(0,0,0,0.2), 0px 5px 8px 0px rgba(0,0,0,0.14), 0px 1px 14px 0px rgba(0,0,0,0.12);\n padding-left: 5px;\n border-radius: 0 0 3px 3px;\n}\n\n.filterTable ul {\n list-style: none;\n padding-left: 0;\n margin-top: 0;\n margin-bottom: 0;\n white-space: nowrap;\n margin-right: 10px;\n}\n\n.filterTable li {\n font-weight: normal;\n padding: 2px 2px 2px 0px;\n}\n\n.filterTable th span {\n cursor: pointer;\n}\n\n.filterTable .details {\n text-align: center;\n font-size: 30px;\n}\n\n.filterTable .details span:hover {\n color: #00A6E5;\n cursor: pointer;\n}\n\n.filterTable .disabled {\n font-size: 19px;\n cursor: pointer;\n color: darkgray;\n}\n\n.filterTable .enabled {\n font-size: 19px;\n cursor: pointer;\n color: black;\n}\n\n.filterTable .enabled-remove-filter {\n color: red !important;\n}\n\n.my-class {\n filter: invert(1) sepia() saturate(10000%) hue-rotate(30deg);\n}\n", ""]); /***/ }), /* 10 */, /* 11 */, /* 12 */, /* 13 */, /* 14 */, /* 15 */, /* 16 */, /* 17 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var FilterRemove = function (_React$Component) { _inherits(FilterRemove, _React$Component); function FilterRemove(props) { _classCallCheck(this, FilterRemove); return _possibleConstructorReturn(this, (FilterRemove.__proto__ || Object.getPrototypeOf(FilterRemove)).call(this, props)); } _createClass(FilterRemove, [{ key: "render", value: function render() { var _props = this.props, width = _props.width, fill = _props.fill, style = _props.style, viewBox = _props.viewBox, _onClick = _props.onClick, className = _props.className; return _react2.default.createElement( "svg", { width: width, fill: fill, style: style, height: width, viewBox: viewBox, onClick: function onClick() { _onClick(); }, xmlns: "http://www.w3.org/2000/svg", className: "svg-icon " + (className || ""), xmlnsXlink: "http://www.w3.org/1999/xlink" }, _react2.default.createElement( "g", null, _react2.default.createElement( "g", null, _react2.default.createElement( "g", null, _react2.default.createElement("path", { d: "M480 183.91L640 0L319.99 0L0 0L159.98 183.91L319.99 367.82L480 183.91Z" }) ), _react2.default.createElement( "g", null, _react2.default.createElement("path", { d: "M248.74 561.46L319.12 640L391.26 640L391.26 196.55L248.74 196.55L248.74 561.46Z" }), _react2.default.createElement( "g", null, _react2.default.createElement("path", { d: "M248.74 561.46L319.12 640L391.26 640L391.26 196.55L248.74 196.55L248.74 561.46Z" }) ) ), _react2.default.createElement( "g", null, _react2.default.createElement("path", { d: "M705.71 438.22L825.61 560.92L758.47 629.64L638.58 506.93L518.68 629.64L451.55 560.92L571.44 438.22L451.55 315.51L518.68 246.79L638.58 369.5L758.47 246.79L825.61 315.51L705.71 438.22Z" }) ) ) ) ); } }]); return FilterRemove; }(_react2.default.Component); FilterRemove.defaultProps = { style: {}, fill: "#000", width: "100%", className: "", viewBox: "0 0 832 640", onClick: function onClick() {} }; exports.default = FilterRemove; /***/ }) /******/ ]);