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

react-tablize

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-tablize - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

8

CHANGELOG.md

@@ -5,2 +5,8 @@ # React Tablize - Change Log

## [0.6.2 - 2019-06-06](https://github.com/alonrbar/react-tablize/tree/v0.6.2)
### Changed
- Use `react` and `react-dom` as peer dependencies.
## [0.6.1 - 2019-06-06](https://github.com/alonrbar/react-tablize/tree/v0.6.1)

@@ -10,3 +16,3 @@

- Upgrade to react-window@1.8.2 and remove hacks from GridView.syncScroll.
- Upgrade to `react-window@1.8.2` and remove hacks from GridView.syncScroll.

@@ -13,0 +19,0 @@ ### Fixed

2

dist/react-tablize.min.js

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("react-tablize",[],t):"object"==typeof exports?exports["react-tablize"]=t():e["react-tablize"]=t()}(this,function(){return function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=5)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("react-window")},function(e,t){e.exports=require("react-virtualized-auto-sizer")},function(e,t){e.exports=require("emotion-theming")},function(e,t){e.exports=require("@emotion/styled")},function(e,t,n){e.exports=n(7)},function(e,t){e.exports=require("lodash.flattendeep")},function(e,t,n){"use strict";n.r(t);var o=n(3),p=n(0),r=n(2),y=n.n(r),h=n(1);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var d=function(e){function n(e){var t;return a(this,n),(t=l(this,c(n).call(this,e))).state={hasError:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(n,p["Component"]),function(e,t,n){t&&u(e.prototype,t),n&&u(e,n)}(n,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0}),console.error(e)}},{key:"render",value:function(){return this.state.hasError?p.createElement("span",null,"X"):void 0!==this.props.children?this.props.children:null}}]),n}();function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var b=function(){function r(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r)}return function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(r,null,[{key:"getProps",value:function(e){return e&&e.props||{}}},{key:"elementInstanceOf",value:function(e,t){return!!e&&(!!e.type&&(e.type===t||e.type.prototype instanceof t||t.isPrototypeOf(e.type)))}},{key:"isReactFragment",value:function(e){return p.isValidElement(e)&&e.type===p.Fragment}},{key:"addPropsToChildren",value:function(e,r){return p.Children.map(e,function(e,t){var n=r(e,t);return p.cloneElement(e,n)})}},{key:"childrenArray",value:function(e){if(!e)return null;if(!e.props)return null;var t=e.props.children;return Array.isArray(t)?t:p.Children.map(t,function(e){return e})}},{key:"childrenOfType",value:function(e,t){var n=r.childrenArray(e);return n?n.filter(function(e){return r.elementInstanceOf(e,t)}):null}},{key:"singleChildOfType",value:function(e,t){var n=r.childrenOfType(e,t);if(!n||!n.length)return null;if(1<n.length)throw new Error("Only one ".concat(t.name," child element is allowed."));return n[0]}},{key:"singleFunctionChild",value:function(e){if(!e)return null;if(!e.props)return null;var t=e.props.children;return"function"!=typeof e.props.children?null:t}}]),r}();function m(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function g(e){return null==e}function v(e){return Number.isFinite(e)?e+"px":e}function w(e,t){var n=(e=e||{}).height,r=e.minHeight,o=e.maxHeight;return void 0===n&&void 0===r&&(n=t),{height:n=v(n),minHeight:r=v(r),maxHeight:o=v(o)}}function O(e){return m(Array(e||0).keys())}function j(e){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C(e,t){return!t||"object"!==j(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var P=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),C(this,_(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(t,p["PureComponent"]),t}();function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function T(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function H(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var z="__ReactTablize__GridCell__"+function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Number.MIN_SAFE_INTEGER,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Number.MAX_SAFE_INTEGER;return Math.floor(Math.random()*(t-e+1)+e)}(0),A=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),H(this,k(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&R(e,t)}(t,p["PureComponent"]),function(e,t,n){t&&T(e.prototype,t),n&&T(e,n)}(t,[{key:"render",value:function(){return this.props.children}}],[{key:"extract",value:function(e){if(e&&e.props&&e.props[z]){var t=e.props,n=t.children;return{props:x(t,["children"]),content:n}}return{props:{},content:e}}}]),t}();function B(e){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F(e,t){return!t||"object"!==B(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function W(e){return(W=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}I(A,"defaultProps",I({},z,!0));var M=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),F(this,W(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}(t,p["PureComponent"]),t}();function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e,t){return!t||"object"!==N(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var K=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),L(this,V(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&q(e,t)}(t,p["PureComponent"]),t}(),D=n(4),X=n.n(D).a;function J(){var e=$(["\n label: grid-body-cell;\n\n display: flex;\n\n height: 100%;\n\n overflow: hidden;\n text-overflow: ellipsis;\n\n align-items: center;\n vertical-align: middle;\n"]);return J=function(){return e},e}function Q(){var e=$(["\n label: grid-body;\n"]);return Q=function(){return e},e}function U(){var e=$(["\n label: grid-head-cell;\n\n display: flex;\n\n overflow: hidden;\n text-overflow: ellipsis;\n\n align-items: flex-end;\n vertical-align: bottom;\n"]);return U=function(){return e},e}function Y(){var e=$(["\n label: grid-head;\n\n display: flex;\n\n font-weight: bold;\n vertical-align: middle;\n\n ",": ","px;\n border-bottom: ",";\n"]);return Y=function(){return e},e}function Z(){var e=$(["\n label: grid-view;\n\n width: 100%;\n"]);return Z=function(){return e},e}function $(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ee=X.div(Z()),te=X.div(Y(),function(e){return"rtl"===e.theme.dir?"padding-left":"padding-right"},17,"1px solid #ddd"),ne=X.div(U()),re=X.div(Q()),oe=X.div(J());function ie(e){return(ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ue(){return(ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function le(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fe(e){return(fe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ae(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function se(e,t){return(se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ye=function(e){function l(){var e,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return pe(ae(r=function(e,t){return!t||"object"!==ie(t)&&"function"!=typeof t?ae(e):t}(this,(e=fe(l)).call.apply(e,[this].concat(n)))),"headList",p.createRef()),pe(ae(r),"mainBodyGrid",p.createRef()),pe(ae(r),"freezedColumnsGrid",p.createRef()),pe(ae(r),"syncScroll",function(e){var t=e.scrollTop,n=e.scrollLeft;r.headList.current&&r.headList.current.scrollTo(n),r.freezedColumnsGrid.current&&r.freezedColumnsGrid.current.scrollTo({scrollTop:t})}),pe(ae(r),"getColumnWidth",function(e){return"function"==typeof r.props.columnWidth?r.props.columnWidth(e):r.props.columnWidth}),pe(ae(r),"getRowHeight",function(t){return function(e){return"function"==typeof t?t(e):t}}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&se(e,t)}(l,p["PureComponent"]),function(e,t,n){t&&ce(e.prototype,t),n&&ce(e,n)}(l,[{key:"render",value:function(){var e=this.props,t=(e.columnCount,e.columnWidth,e.children,le(e,["columnCount","columnWidth","children"]));return p.createElement(d,null,p.createElement(o.ThemeProvider,{theme:this.getTheme()},p.createElement(ee,ue({},t,{style:Object.assign({direction:this.props.dir},this.props.style,w(t.style,l.defaultHeight))}),this.renderHead(),this.renderBody(),this.renderFooter())))}},{key:"renderHead",value:function(){var o=this,e=b.singleChildOfType(this,K);if(!e)return null;var t=e.props,i=t.children,n=le(t,["children"]),u=this.props.freezeColumns||0;return p.createElement(te,ue({},n,{style:Object.assign({},e.props.style,w(n.style,l.defaultHeadHeight))}),p.createElement(d,null,p.createElement(y.a,null,function(e){var t=e.width,n=e.height;return p.createElement("div",{style:{width:t,height:n,display:"flex"}},O(u).map(function(e){return o.renderHeadCell({cellRender:i,columnIndex:e,isScrolling:!1})}),p.createElement(h.VariableSizeList,{ref:o.headList,direction:o.props.dir,style:{overflow:"hidden"},layout:"horizontal",height:n,width:t-o.getFrozenColumnsWidth(),itemCount:o.props.columnCount-u,itemSize:function(e){return o.getColumnWidth(e+u)},overscanCount:o.props.overscanColumnsCount,useIsScrolling:o.props.useIsScrolling},function(e){var t=e.index,n=e.style,r=e.isScrolling;return o.renderHeadCell({cellRender:i,columnIndex:t+u,isScrolling:r,style:n})}))})))}},{key:"renderHeadCell",value:function(e){var t=e.columnIndex,n=e.cellRender,r=e.isScrolling,o=e.style,i=n({columnIndex:t,isScrolling:r}),u=A.extract(i),l=u.props,c=u.content,f=this.getColumnWidth(t);return p.createElement(ne,ue({key:t},l,{style:Object.assign({width:f},l.style,o)}),p.createElement(d,null,c))}},{key:"renderBody",value:function(){var i=this,e=b.singleChildOfType(this,P);if(!e)return null;var t=e.props,u=t.children,r=t.rowCount,o=t.rowHeight,n=le(t,["children","rowCount","rowHeight"]),l=this.getBodyHeights(),c=this.props.freezeColumns||0,f=this.getFrozenColumnsWidth();return p.createElement(re,ue({},n,{style:Object.assign({},n.style,l)}),p.createElement(d,null,p.createElement(y.a,null,function(e){var t=e.height,n=e.width;return p.createElement("div",{style:{width:n,height:t,display:"flex"}},p.createElement(h.VariableSizeGrid,{ref:i.freezedColumnsGrid,direction:i.props.dir,style:{overflow:"hidden"},height:t-17,width:f,columnCount:c,columnWidth:i.getColumnWidth,rowCount:r,rowHeight:i.getRowHeight(o),overscanRowsCount:i.props.overscanRowsCount,useIsScrolling:i.props.useIsScrolling},function(e){var t=e.rowIndex,n=e.columnIndex,r=e.style,o=e.isScrolling;return i.renderBodyCell({cellRender:u,rowIndex:t,columnIndex:n,isScrolling:o,style:r})}),p.createElement(h.VariableSizeGrid,{ref:i.mainBodyGrid,direction:i.props.dir,height:t,width:n-f,columnCount:i.props.columnCount-c,columnWidth:function(e){return i.getColumnWidth(e+c)},rowCount:r,rowHeight:i.getRowHeight(o),onScroll:i.syncScroll,overscanRowsCount:i.props.overscanRowsCount,overscanColumnsCount:i.props.overscanColumnsCount,useIsScrolling:i.props.useIsScrolling},function(e){var t=e.rowIndex,n=e.columnIndex,r=e.style,o=e.isScrolling;return i.renderBodyCell({cellRender:u,rowIndex:t,columnIndex:n+c,isScrolling:o,style:r})}))})))}},{key:"renderBodyCell",value:function(e){var t=e.rowIndex,n=e.columnIndex,r=e.cellRender,o=e.isScrolling,i=e.style,u=r({rowIndex:t,columnIndex:n,isScrolling:o}),l=A.extract(u),c=l.props,f=l.content;return p.createElement(oe,ue({key:"[ ".concat(t,", ").concat(n," ]")},c,{style:Object.assign({},c.style,i)}),p.createElement(d,null,f))}},{key:"renderFooter",value:function(){return b.singleChildOfType(this,M)?p.createElement("span",null,"Footer"):null}},{key:"getTheme",value:function(){return{dir:this.props.dir}}},{key:"getBodyHeights",value:function(){var e=w(this.props.style,l.defaultHeight),t=this.getHeadHeight(),n=w(this.props.style,void 0),r=n.height||e.height,o=n.minHeight||e.minHeight,i=n.maxHeight||e.maxHeight;return t&&(r="calc(".concat(r," - ").concat(t,")"),o&&(o="calc(".concat(o," - ").concat(t,")")),i&&(i="calc(".concat(i," - ").concat(t,")"))),{height:r,minHeight:o,maxHeight:i}}},{key:"getHeadHeight",value:function(){var e=b.singleChildOfType(this,K),t=0;return e&&(t=w(e.props.style,l.defaultHeadHeight).height),t}},{key:"getFrozenColumnsWidth",value:function(){return this.props.freezeColumns?O(this.props.freezeColumns).map(this.getColumnWidth).reduce(function(e,t){return e+t},0):0}}]),l}();function he(e){return(he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function de(e,t){return!t||"object"!==he(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function be(e){return(be=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function me(e,t){return(me=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}pe(ye,"defaultHeight","35vh"),pe(ye,"defaultHeadHeight","40px"),pe(ye,"Head",K),pe(ye,"Body",P),pe(ye,"Cell",A),pe(ye,"defaultProps",{overscanRowsCount:1,overscanColumnsCount:1});var ve=function e(){ge(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"children",void 0)},we=function(e){function t(){return ge(this,t),de(this,be(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&me(e,t)}(t,p["PureComponent"]),t}();function Oe(e){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function je(e,t){return!t||"object"!==Oe(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Ce(e){return(Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _e(e,t){return(_e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Se=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),je(this,Ce(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_e(e,t)}(t,p["PureComponent"]),t}();function Pe(e){return(Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ee(e,t){return!t||"object"!==Pe(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function xe(e){return(xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Te(e,t){return(Te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function He(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var ke=function e(){He(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"children",void 0)},Re=function(e){function t(){return He(this,t),Ee(this,xe(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Te(e,t)}(t,p["PureComponent"]),t}();function Ie(e){return(Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ze(e,t){return!t||"object"!==Ie(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Ae(e){return(Ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Be(e,t){return(Be=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Fe=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ze(this,Ae(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Be(e,t)}(t,p["PureComponent"]),t}();function We(e){return(We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ge(e,t){return!t||"object"!==We(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Me(e){return(Me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ne(e,t){return(Ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Ve=function e(){Le(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"children",void 0)},qe=function(e){function t(){return Le(this,t),Ge(this,Me(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ne(e,t)}(t,p["PureComponent"]),t}();function Ke(e){return(Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function De(e,t){return!t||"object"!==Ke(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Xe(e){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Je(e,t){return(Je=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ye=function e(){Qe(this,e),Ue(this,"height","40px"),Ue(this,"children",void 0)},Ze=function(e){function t(){return Qe(this,t),De(this,Xe(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Je(e,t)}(t,p["PureComponent"]),t}();function $e(e){return($e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function et(e,t){return!t||"object"!==$e(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function tt(e){return(tt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nt(e,t){return(nt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var rt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),et(this,tt(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nt(e,t)}(t,p["PureComponent"]),t}();function ot(){var e=st(["\n flex: 1;\n padding: 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n"]);return ot=function(){return e},e}function it(){var e=st(["\n flex: 1;\n display: flex;\n justify-content: stretch;\n\n border-top: ",";\n\n &:first-of-type {\n border-top: none;\n }\n"]);return it=function(){return e},e}function ut(){var e=st(["\n display: flex;\n flex-flow: column;\n\n vertical-align: middle;\n"]);return ut=function(){return e},e}function lt(){var e=st(["\n flex: 1;\n display: flex;\n padding: 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n align-items: flex-end;\n vertical-align: bottom;\n"]);return lt=function(){return e},e}function ct(){var e=st(["\n flex: 1;\n display: flex;\n justify-content: stretch;\n\n ",": ",";\n\n border-bottom: ",";\n"]);return ct=function(){return e},e}function ft(){var e=st(["\n display: flex;\n flex-flow: column;\n\n overflow-y: hidden;\n\n font-weight: bold;\n vertical-align: middle;\n"]);return ft=function(){return e},e}function at(){var e=st(["\n background-color: #fff;\n width: 100%;\n overflow-y: hidden;\n"]);return at=function(){return e},e}function st(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var pt="1px solid #ddd",yt=X.div(at()),ht=X.div(ft()),dt=X.div(ct(),function(e){return"rtl"===e.theme.dir?"padding-left":"padding-dir"},"17px",pt),bt=X.div(lt()),mt=X.div(ut()),gt=X.div(it(),pt),vt=X.div(ot());function wt(e){return(wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ot(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function jt(){return(jt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ct(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _t(e,t){return!t||"object"!==wt(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function St(e){return(St=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pt(e,t){return(Pt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Et(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Tt=n(6),Ht=function e(){Et(this,e),xt(this,"rowCount",void 0),xt(this,"rowKey",void 0),xt(this,"children",void 0),xt(this,"dir","ltr"),xt(this,"className",void 0),xt(this,"style",void 0),xt(this,"rowHeight",50),xt(this,"emptyMessage","No Items to Display"),xt(this,"overscanCount",20)},kt=function(e){function r(){return Et(this,r),_t(this,St(r).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pt(e,t)}(r,p["PureComponent"]),function(e,t,n){t&&Ct(e.prototype,t),n&&Ct(e,n)}(r,[{key:"render",value:function(){var e=b.singleChildOfType(this,Ze),t=b.singleChildOfType(this,Re),n=b.childrenOfType(this,qe);if(n&&n.length){if(e||t)throw new Error("Can not specify head and/or body when specifying table columns.");e=this.createHeadFromColumns(n),t=this.createBodyFromColumns(n)}return p.createElement(d,null,p.createElement(o.ThemeProvider,{theme:this.getTheme()},p.createElement(yt,{className:this.props.className,style:Object.assign({},this.props.style,this.getHeights())},this.renderTableHead(e),this.renderTableBody(e,t))))}},{key:"renderTableHead",value:function(e){var i=this;return e?p.createElement(ht,{style:{height:e.props.height}},p.createElement(dt,null,p.createElement(d,null,p.Children.map(e.props.children,function(e,t){var n=e,r=i.getHeadCellProps(n);if(!1===r.visible)return null;var o=i.getHeadCellContent(n);return p.createElement(bt,jt({key:t},r),p.createElement(d,null,o))})))):null}},{key:"renderTableBody",value:function(e,t){var n=this.getHeadProps(e),r=this.getHeights(),o="calc(".concat(r.height," - ").concat(n.height,")"),i="calc(".concat(r.minHeight," - ").concat(n.height,")"),u="calc(".concat(r.maxHeight," - ").concat(n.height,")");return p.createElement(mt,{style:{direction:this.props.dir,height:o,minHeight:i,maxHeight:u}},p.createElement(d,null,this.renderTableRows(t)))}},{key:"renderTableRows",value:function(a){var s=this;return 0!==this.props.rowCount&&this.hasBody(a)?p.createElement(y.a,null,function(e){var t=e.width,n=e.height;return p.createElement(h.FixedSizeList,{style:{outline:"none"},direction:s.props.dir,layout:"vertical",height:n,width:t,itemCount:s.props.rowCount,itemSize:s.props.rowHeight},function(e){var t=e.index,n=e.style,r=a.props.children;if(!r)return null;var o=r(t),i=s.getRowProps(o),u=i.style,l=Ot(i,["style"]),c=s.getRowKey(l,t),f=s.getRowContent(o);return p.createElement(gt,jt({style:Object.assign({},n,u||{}),key:c},l),p.createElement(d,null,function(e){return Array.isArray(e)?e:[e]}(f).map(function(e,t){var n=s.getCellProps(e);return!1===n.visible?null:p.createElement(vt,jt({key:t},n),p.createElement(d,null,s.getCellContent(e)))})))})}):this.renderItemsPlaceHolder()}},{key:"renderItemsPlaceHolder",value:function(){return p.createElement("div",null,p.createElement("div",{style:{textAlign:"center"}},this.props.emptyMessage))}},{key:"getTheme",value:function(){return{dir:this.props.dir}}},{key:"getHeights",value:function(){var e=(this.props.style||{}).height,t=(this.props.style||{}).minHeight,n=(this.props.style||{}).maxHeight;return void 0===e&&void 0===t&&(e=r.defaultHeight),{height:e=v(e),minHeight:t=v(t),maxHeight:n=v(n)}}},{key:"createHeadFromColumns",value:function(e){return e.every(function(e){return!b.singleChildOfType(e,Se)})?null:p.createElement(Ze,null,e.map(function(e){var t=b.singleChildOfType(e,Se);return t?p.createElement(Fe,t.props):null}))}},{key:"createBodyFromColumns",value:function(e){return p.createElement(Re,null,function(r){return e.map(function(e,t){var n=b.singleChildOfType(e,we).props.children;return n?n({rowIndex:r,columnIndex:t}):null})})}},{key:"getHeadProps",value:function(e){return b.elementInstanceOf(e,rt)?e.props:new Ye}},{key:"getHeadCellProps",value:function(e){return b.elementInstanceOf(e,Fe)&&e.props||{}}},{key:"getHeadCellContent",value:function(e){return b.elementInstanceOf(e,Fe)?e.props.children:e}},{key:"hasBody",value:function(e){return!!e&&(!g(e.props.children)&&("function"==typeof e.props.children||(Array.isArray(e.props.children)?0<e.props.children.length:0<p.Children.count(e.props.children))))}},{key:"getRowProps",value:function(e){return b.elementInstanceOf(e,rt)&&e.props||{}}},{key:"getRowContent",value:function(e){var t=e;if(b.isReactFragment(t))throw new Error("Can not use React.Fragment as row content. Consider wrapping your content with a row element.");return b.elementInstanceOf(t,rt)&&(t=t.props.children),Array.isArray(t)&&(t=Tt(t)),t}},{key:"getRowKey",value:function(e,t){return g(e.key)?"function"==typeof this.props.rowKey?this.props.rowKey(t):t:e.key}},{key:"getCellProps",value:function(e){return b.elementInstanceOf(e,Fe)&&e.props||{}}},{key:"getCellContent",value:function(e){var t=e;return b.elementInstanceOf(t,Fe)&&(t=t.props.children),t||null}}]),r}();xt(kt,"defaultHeight","35vh"),xt(kt,"Head",Ze),xt(kt,"Body",Re),xt(kt,"Row",rt),xt(kt,"Cell",Fe),xt(kt,"Column",qe),xt(kt,"defaultProps",new Ht),n.d(t,"GridView",function(){return ye}),n.d(t,"ColumnBodyProps",function(){return ve}),n.d(t,"ColumnBody",function(){return we}),n.d(t,"ColumnHead",function(){return Se}),n.d(t,"TableBodyProps",function(){return ke}),n.d(t,"TableBody",function(){return Re}),n.d(t,"TableCell",function(){return Fe}),n.d(t,"TableColumnProps",function(){return Ve}),n.d(t,"TableColumn",function(){return qe}),n.d(t,"TableHeadProps",function(){return Ye}),n.d(t,"TableHead",function(){return Ze}),n.d(t,"TableRow",function(){return rt}),n.d(t,"TableViewProps",function(){return Ht}),n.d(t,"TableView",function(){return kt})}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("react-tablize",[],t):"object"==typeof exports?exports["react-tablize"]=t():e["react-tablize"]=t()}(this,function(){return r={},o.m=n=[function(e,t){e.exports=require("react")},function(e,t){e.exports=require("react-window")},function(e,t){e.exports=require("react-virtualized-auto-sizer")},function(e,t){e.exports=require("emotion-theming")},function(e,t){e.exports=require("@emotion/styled")},function(e,t,n){e.exports=n(7)},function(e,t){e.exports=require("lodash.flattendeep")},function(e,t,n){"use strict";n.r(t);var o=n(3),p=n(0),r=n(2),y=n.n(r),h=n(1);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var d=function(){function n(e){var t;return a(this,n),(t=l(this,c(n).call(this,e))).state={hasError:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(n,p["Component"]),function(e,t,n){t&&u(e.prototype,t),n&&u(e,n)}(n,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0}),console.error(e)}},{key:"render",value:function(){return this.state.hasError?p.createElement("span",null,"X"):void 0!==this.props.children?this.props.children:null}}]),n}();function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var b=function(){function r(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r)}return function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(r,null,[{key:"getProps",value:function(e){return e&&e.props||{}}},{key:"elementInstanceOf",value:function(e,t){return!!e&&(!!e.type&&(e.type===t||e.type.prototype instanceof t||t.isPrototypeOf(e.type)))}},{key:"isReactFragment",value:function(e){return p.isValidElement(e)&&e.type===p.Fragment}},{key:"addPropsToChildren",value:function(e,r){return p.Children.map(e,function(e,t){var n=r(e,t);return p.cloneElement(e,n)})}},{key:"childrenArray",value:function(e){if(!e)return null;if(!e.props)return null;var t=e.props.children;return Array.isArray(t)?t:p.Children.map(t,function(e){return e})}},{key:"childrenOfType",value:function(e,t){var n=r.childrenArray(e);return n?n.filter(function(e){return r.elementInstanceOf(e,t)}):null}},{key:"singleChildOfType",value:function(e,t){var n=r.childrenOfType(e,t);if(!n||!n.length)return null;if(1<n.length)throw new Error("Only one ".concat(t.name," child element is allowed."));return n[0]}},{key:"singleFunctionChild",value:function(e){if(!e)return null;if(!e.props)return null;var t=e.props.children;return"function"!=typeof e.props.children?null:t}}]),r}();function m(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function g(e){return null==e}function v(e){return Number.isFinite(e)?e+"px":e}function w(e,t){var n=(e=e||{}).height,r=e.minHeight,o=e.maxHeight;return void 0===n&&void 0===r&&(n=t),{height:n=v(n),minHeight:r=v(r),maxHeight:o=v(o)}}function O(e){return m(Array(e||0).keys())}function j(e){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C(e,t){return!t||"object"!==j(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var P=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),C(this,_(e).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(e,p["PureComponent"]),e}();function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function T(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function H(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var z="__ReactTablize__GridCell__"+function(e,t){var n=0<arguments.length&&void 0!==e?e:Number.MIN_SAFE_INTEGER,r=1<arguments.length&&void 0!==t?t:Number.MAX_SAFE_INTEGER;return Math.floor(Math.random()*(r-n+1)+n)}(0),A=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),H(this,k(e).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&R(e,t)}(e,p["PureComponent"]),function(e,t,n){t&&T(e.prototype,t),n&&T(e,n)}(e,[{key:"render",value:function(){return this.props.children}}],[{key:"extract",value:function(e){if(e&&e.props&&e.props[z]){var t=e.props,n=t.children;return{props:x(t,["children"]),content:n}}return{props:{},content:e}}}]),e}();function B(e){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F(e,t){return!t||"object"!==B(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function W(e){return(W=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}I(A,"defaultProps",I({},z,!0));var M=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),F(this,W(e).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}(e,p["PureComponent"]),e}();function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e,t){return!t||"object"!==N(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var K=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),L(this,V(e).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&q(e,t)}(e,p["PureComponent"]),e}(),D=n(4),X=n.n(D).a;function J(){var e=$(["\n label: grid-body-cell;\n\n display: flex;\n\n height: 100%;\n\n overflow: hidden;\n text-overflow: ellipsis;\n\n align-items: center;\n vertical-align: middle;\n"]);return J=function(){return e},e}function Q(){var e=$(["\n label: grid-body;\n"]);return Q=function(){return e},e}function U(){var e=$(["\n label: grid-head-cell;\n\n display: flex;\n\n overflow: hidden;\n text-overflow: ellipsis;\n\n align-items: flex-end;\n vertical-align: bottom;\n"]);return U=function(){return e},e}function Y(){var e=$(["\n label: grid-head;\n\n display: flex;\n\n font-weight: bold;\n vertical-align: middle;\n\n ",": ","px;\n border-bottom: ",";\n"]);return Y=function(){return e},e}function Z(){var e=$(["\n label: grid-view;\n\n width: 100%;\n"]);return Z=function(){return e},e}function $(e,t){return t=t||e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ee=X.div(Z()),te=X.div(Y(),function(e){return"rtl"===e.theme.dir?"padding-left":"padding-right"},17,"1px solid #ddd"),ne=X.div(U()),re=X.div(Q()),oe=X.div(J());function ie(e){return(ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ue(){return(ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function le(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fe(e){return(fe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ae(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function se(e,t){return(se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ye=function(){function l(){var e,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return pe(ae(r=function(e,t){return!t||"object"!==ie(t)&&"function"!=typeof t?ae(e):t}(this,(e=fe(l)).call.apply(e,[this].concat(n)))),"headList",p.createRef()),pe(ae(r),"mainBodyGrid",p.createRef()),pe(ae(r),"freezedColumnsGrid",p.createRef()),pe(ae(r),"syncScroll",function(e){var t=e.scrollTop,n=e.scrollLeft;r.headList.current&&r.headList.current.scrollTo(n),r.freezedColumnsGrid.current&&r.freezedColumnsGrid.current.scrollTo({scrollTop:t})}),pe(ae(r),"getColumnWidth",function(e){return"function"==typeof r.props.columnWidth?r.props.columnWidth(e):r.props.columnWidth}),pe(ae(r),"getRowHeight",function(t){return function(e){return"function"==typeof t?t(e):t}}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&se(e,t)}(l,p["PureComponent"]),function(e,t,n){t&&ce(e.prototype,t),n&&ce(e,n)}(l,[{key:"render",value:function(){var e=this.props,t=(e.columnCount,e.columnWidth,e.children,le(e,["columnCount","columnWidth","children"]));return p.createElement(d,null,p.createElement(o.ThemeProvider,{theme:this.getTheme()},p.createElement(ee,ue({},t,{style:Object.assign({direction:this.props.dir},this.props.style,w(t.style,l.defaultHeight))}),this.renderHead(),this.renderBody(),this.renderFooter())))}},{key:"renderHead",value:function(){var o=this,e=b.singleChildOfType(this,K);if(!e)return null;var t=e.props,i=t.children,n=le(t,["children"]),u=this.props.freezeColumns||0;return p.createElement(te,ue({},n,{style:Object.assign({},e.props.style,w(n.style,l.defaultHeadHeight))}),p.createElement(d,null,p.createElement(y.a,null,function(e){var t=e.width,n=e.height;return p.createElement("div",{style:{width:t,height:n,display:"flex"}},O(u).map(function(e){return o.renderHeadCell({cellRender:i,columnIndex:e,isScrolling:!1})}),p.createElement(h.VariableSizeList,{ref:o.headList,direction:o.props.dir,style:{overflow:"hidden"},layout:"horizontal",height:n,width:t-o.getFrozenColumnsWidth(),itemCount:o.props.columnCount-u,itemSize:function(e){return o.getColumnWidth(e+u)},overscanCount:o.props.overscanColumnsCount,useIsScrolling:o.props.useIsScrolling},function(e){var t=e.index,n=e.style,r=e.isScrolling;return o.renderHeadCell({cellRender:i,columnIndex:t+u,isScrolling:r,style:n})}))})))}},{key:"renderHeadCell",value:function(e){var t=e.columnIndex,n=e.cellRender,r=e.isScrolling,o=e.style,i=n({columnIndex:t,isScrolling:r}),u=A.extract(i),l=u.props,c=u.content,f=this.getColumnWidth(t);return p.createElement(ne,ue({key:t},l,{style:Object.assign({width:f},l.style,o)}),p.createElement(d,null,c))}},{key:"renderBody",value:function(){var i=this,e=b.singleChildOfType(this,P);if(!e)return null;var t=e.props,u=t.children,r=t.rowCount,o=t.rowHeight,n=le(t,["children","rowCount","rowHeight"]),l=this.getBodyHeights(),c=this.props.freezeColumns||0,f=this.getFrozenColumnsWidth();return p.createElement(re,ue({},n,{style:Object.assign({},n.style,l)}),p.createElement(d,null,p.createElement(y.a,null,function(e){var t=e.height,n=e.width;return p.createElement("div",{style:{width:n,height:t,display:"flex"}},p.createElement(h.VariableSizeGrid,{ref:i.freezedColumnsGrid,direction:i.props.dir,style:{overflow:"hidden"},height:t-17,width:f,columnCount:c,columnWidth:i.getColumnWidth,rowCount:r,rowHeight:i.getRowHeight(o),overscanRowsCount:i.props.overscanRowsCount,useIsScrolling:i.props.useIsScrolling},function(e){var t=e.rowIndex,n=e.columnIndex,r=e.style,o=e.isScrolling;return i.renderBodyCell({cellRender:u,rowIndex:t,columnIndex:n,isScrolling:o,style:r})}),p.createElement(h.VariableSizeGrid,{ref:i.mainBodyGrid,direction:i.props.dir,height:t,width:n-f,columnCount:i.props.columnCount-c,columnWidth:function(e){return i.getColumnWidth(e+c)},rowCount:r,rowHeight:i.getRowHeight(o),onScroll:i.syncScroll,overscanRowsCount:i.props.overscanRowsCount,overscanColumnsCount:i.props.overscanColumnsCount,useIsScrolling:i.props.useIsScrolling},function(e){var t=e.rowIndex,n=e.columnIndex,r=e.style,o=e.isScrolling;return i.renderBodyCell({cellRender:u,rowIndex:t,columnIndex:n+c,isScrolling:o,style:r})}))})))}},{key:"renderBodyCell",value:function(e){var t=e.rowIndex,n=e.columnIndex,r=e.cellRender,o=e.isScrolling,i=e.style,u=r({rowIndex:t,columnIndex:n,isScrolling:o}),l=A.extract(u),c=l.props,f=l.content;return p.createElement(oe,ue({key:"[ ".concat(t,", ").concat(n," ]")},c,{style:Object.assign({},c.style,i)}),p.createElement(d,null,f))}},{key:"renderFooter",value:function(){return b.singleChildOfType(this,M)?p.createElement("span",null,"Footer"):null}},{key:"getTheme",value:function(){return{dir:this.props.dir}}},{key:"getBodyHeights",value:function(){var e=w(this.props.style,l.defaultHeight),t=this.getHeadHeight(),n=w(this.props.style,void 0),r=n.height||e.height,o=n.minHeight||e.minHeight,i=n.maxHeight||e.maxHeight;return t&&(r="calc(".concat(r," - ").concat(t,")"),o=o&&"calc(".concat(o," - ").concat(t,")"),i=i&&"calc(".concat(i," - ").concat(t,")")),{height:r,minHeight:o,maxHeight:i}}},{key:"getHeadHeight",value:function(){var e=b.singleChildOfType(this,K),t=0;return e&&(t=w(e.props.style,l.defaultHeadHeight).height),t}},{key:"getFrozenColumnsWidth",value:function(){return this.props.freezeColumns?O(this.props.freezeColumns).map(this.getColumnWidth).reduce(function(e,t){return e+t},0):0}}]),l}();function he(e){return(he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function de(e,t){return!t||"object"!==he(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function be(e){return(be=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function me(e,t){return(me=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}pe(ye,"defaultHeight","35vh"),pe(ye,"defaultHeadHeight","40px"),pe(ye,"Head",K),pe(ye,"Body",P),pe(ye,"Cell",A),pe(ye,"defaultProps",{overscanRowsCount:1,overscanColumnsCount:1});function ve(){ge(this,ve),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"children",void 0)}var we=function(){function e(){return ge(this,e),de(this,be(e).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&me(e,t)}(e,p["PureComponent"]),e}();function Oe(e){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function je(e,t){return!t||"object"!==Oe(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Ce(e){return(Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _e(e,t){return(_e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Se=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),je(this,Ce(e).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_e(e,t)}(e,p["PureComponent"]),e}();function Pe(e){return(Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ee(e,t){return!t||"object"!==Pe(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function xe(e){return(xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Te(e,t){return(Te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function He(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ke(){He(this,ke),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"children",void 0)}var Re=function(){function e(){return He(this,e),Ee(this,xe(e).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Te(e,t)}(e,p["PureComponent"]),e}();function Ie(e){return(Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ze(e,t){return!t||"object"!==Ie(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Ae(e){return(Ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Be(e,t){return(Be=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Fe=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ze(this,Ae(e).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Be(e,t)}(e,p["PureComponent"]),e}();function We(e){return(We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ge(e,t){return!t||"object"!==We(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Me(e){return(Me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ne(e,t){return(Ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ve(){Le(this,Ve),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"children",void 0)}var qe=function(){function e(){return Le(this,e),Ge(this,Me(e).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ne(e,t)}(e,p["PureComponent"]),e}();function Ke(e){return(Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function De(e,t){return!t||"object"!==Ke(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function Xe(e){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Je(e,t){return(Je=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(){Qe(this,Ye),Ue(this,"height","40px"),Ue(this,"children",void 0)}var Ze=function(){function e(){return Qe(this,e),De(this,Xe(e).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Je(e,t)}(e,p["PureComponent"]),e}();function $e(e){return($e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function et(e,t){return!t||"object"!==$e(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function tt(e){return(tt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nt(e,t){return(nt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var rt=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),et(this,tt(e).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nt(e,t)}(e,p["PureComponent"]),e}();function ot(){var e=st(["\n flex: 1;\n padding: 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n"]);return ot=function(){return e},e}function it(){var e=st(["\n flex: 1;\n display: flex;\n justify-content: stretch;\n\n border-top: ",";\n\n &:first-of-type {\n border-top: none;\n }\n"]);return it=function(){return e},e}function ut(){var e=st(["\n display: flex;\n flex-flow: column;\n\n vertical-align: middle;\n"]);return ut=function(){return e},e}function lt(){var e=st(["\n flex: 1;\n display: flex;\n padding: 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n align-items: flex-end;\n vertical-align: bottom;\n"]);return lt=function(){return e},e}function ct(){var e=st(["\n flex: 1;\n display: flex;\n justify-content: stretch;\n\n ",": ",";\n\n border-bottom: ",";\n"]);return ct=function(){return e},e}function ft(){var e=st(["\n display: flex;\n flex-flow: column;\n\n overflow-y: hidden;\n\n font-weight: bold;\n vertical-align: middle;\n"]);return ft=function(){return e},e}function at(){var e=st(["\n background-color: #fff;\n width: 100%;\n overflow-y: hidden;\n"]);return at=function(){return e},e}function st(e,t){return t=t||e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var pt="1px solid #ddd",yt=X.div(at()),ht=X.div(ft()),dt=X.div(ct(),function(e){return"rtl"===e.theme.dir?"padding-left":"padding-dir"},"17px",pt),bt=X.div(lt()),mt=X.div(ut()),gt=X.div(it(),pt),vt=X.div(ot());function wt(e){return(wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ot(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function jt(){return(jt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ct(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _t(e,t){return!t||"object"!==wt(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function St(e){return(St=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pt(e,t){return(Pt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Et(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tt(){Et(this,Tt),xt(this,"rowCount",void 0),xt(this,"rowKey",void 0),xt(this,"children",void 0),xt(this,"dir","ltr"),xt(this,"className",void 0),xt(this,"style",void 0),xt(this,"rowHeight",50),xt(this,"emptyMessage","No Items to Display"),xt(this,"overscanCount",20)}var Ht=n(6),kt=function(){function r(){return Et(this,r),_t(this,St(r).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pt(e,t)}(r,p["PureComponent"]),function(e,t,n){t&&Ct(e.prototype,t),n&&Ct(e,n)}(r,[{key:"render",value:function(){var e=b.singleChildOfType(this,Ze),t=b.singleChildOfType(this,Re),n=b.childrenOfType(this,qe);if(n&&n.length){if(e||t)throw new Error("Can not specify head and/or body when specifying table columns.");e=this.createHeadFromColumns(n),t=this.createBodyFromColumns(n)}return p.createElement(d,null,p.createElement(o.ThemeProvider,{theme:this.getTheme()},p.createElement(yt,{className:this.props.className,style:Object.assign({},this.props.style,this.getHeights())},this.renderTableHead(e),this.renderTableBody(e,t))))}},{key:"renderTableHead",value:function(e){var i=this;return e?p.createElement(ht,{style:{height:e.props.height}},p.createElement(dt,null,p.createElement(d,null,p.Children.map(e.props.children,function(e,t){var n=e,r=i.getHeadCellProps(n);if(!1===r.visible)return null;var o=i.getHeadCellContent(n);return p.createElement(bt,jt({key:t},r),p.createElement(d,null,o))})))):null}},{key:"renderTableBody",value:function(e,t){var n=this.getHeadProps(e),r=this.getHeights(),o="calc(".concat(r.height," - ").concat(n.height,")"),i="calc(".concat(r.minHeight," - ").concat(n.height,")"),u="calc(".concat(r.maxHeight," - ").concat(n.height,")");return p.createElement(mt,{style:{direction:this.props.dir,height:o,minHeight:i,maxHeight:u}},p.createElement(d,null,this.renderTableRows(t)))}},{key:"renderTableRows",value:function(a){var s=this;return 0!==this.props.rowCount&&this.hasBody(a)?p.createElement(y.a,null,function(e){var t=e.width,n=e.height;return p.createElement(h.FixedSizeList,{style:{outline:"none"},direction:s.props.dir,layout:"vertical",height:n,width:t,itemCount:s.props.rowCount,itemSize:s.props.rowHeight},function(e){var t=e.index,n=e.style,r=a.props.children;if(!r)return null;var o=r(t),i=s.getRowProps(o),u=i.style,l=Ot(i,["style"]),c=s.getRowKey(l,t),f=s.getRowContent(o);return p.createElement(gt,jt({style:Object.assign({},n,u||{}),key:c},l),p.createElement(d,null,function(e){return Array.isArray(e)?e:[e]}(f).map(function(e,t){var n=s.getCellProps(e);return!1===n.visible?null:p.createElement(vt,jt({key:t},n),p.createElement(d,null,s.getCellContent(e)))})))})}):this.renderItemsPlaceHolder()}},{key:"renderItemsPlaceHolder",value:function(){return p.createElement("div",null,p.createElement("div",{style:{textAlign:"center"}},this.props.emptyMessage))}},{key:"getTheme",value:function(){return{dir:this.props.dir}}},{key:"getHeights",value:function(){var e=(this.props.style||{}).height,t=(this.props.style||{}).minHeight,n=(this.props.style||{}).maxHeight;return void 0===e&&void 0===t&&(e=r.defaultHeight),{height:e=v(e),minHeight:t=v(t),maxHeight:n=v(n)}}},{key:"createHeadFromColumns",value:function(e){return e.every(function(e){return!b.singleChildOfType(e,Se)})?null:p.createElement(Ze,null,e.map(function(e){var t=b.singleChildOfType(e,Se);return t?p.createElement(Fe,t.props):null}))}},{key:"createBodyFromColumns",value:function(e){return p.createElement(Re,null,function(r){return e.map(function(e,t){var n=b.singleChildOfType(e,we).props.children;return n?n({rowIndex:r,columnIndex:t}):null})})}},{key:"getHeadProps",value:function(e){return b.elementInstanceOf(e,rt)?e.props:new Ye}},{key:"getHeadCellProps",value:function(e){return b.elementInstanceOf(e,Fe)&&e.props||{}}},{key:"getHeadCellContent",value:function(e){return b.elementInstanceOf(e,Fe)?e.props.children:e}},{key:"hasBody",value:function(e){return!!e&&(!g(e.props.children)&&("function"==typeof e.props.children||(Array.isArray(e.props.children)?0<e.props.children.length:0<p.Children.count(e.props.children))))}},{key:"getRowProps",value:function(e){return b.elementInstanceOf(e,rt)&&e.props||{}}},{key:"getRowContent",value:function(e){var t=e;if(b.isReactFragment(t))throw new Error("Can not use React.Fragment as row content. Consider wrapping your content with a row element.");return b.elementInstanceOf(t,rt)&&(t=t.props.children),Array.isArray(t)&&(t=Ht(t)),t}},{key:"getRowKey",value:function(e,t){return g(e.key)?"function"==typeof this.props.rowKey?this.props.rowKey(t):t:e.key}},{key:"getCellProps",value:function(e){return b.elementInstanceOf(e,Fe)&&e.props||{}}},{key:"getCellContent",value:function(e){var t=e;return b.elementInstanceOf(t,Fe)&&(t=t.props.children),t||null}}]),r}();xt(kt,"defaultHeight","35vh"),xt(kt,"Head",Ze),xt(kt,"Body",Re),xt(kt,"Row",rt),xt(kt,"Cell",Fe),xt(kt,"Column",qe),xt(kt,"defaultProps",new Tt),n.d(t,"GridView",function(){return ye}),n.d(t,"ColumnBodyProps",function(){return ve}),n.d(t,"ColumnBody",function(){return we}),n.d(t,"ColumnHead",function(){return Se}),n.d(t,"TableBodyProps",function(){return ke}),n.d(t,"TableBody",function(){return Re}),n.d(t,"TableCell",function(){return Fe}),n.d(t,"TableColumnProps",function(){return Ve}),n.d(t,"TableColumn",function(){return qe}),n.d(t,"TableHeadProps",function(){return Ye}),n.d(t,"TableHead",function(){return Ze}),n.d(t,"TableRow",function(){return rt}),n.d(t,"TableViewProps",function(){return Tt}),n.d(t,"TableView",function(){return kt})}],o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=5);function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var n,r});
{
"name": "react-tablize",
"version": "0.6.1",
"version": "0.6.2",
"description": "Virtual table and grid components for React",

@@ -31,16 +31,18 @@ "author": "Alon Bar",

"@emotion/styled": "^10.0.10",
"lodash.flattendeep": "^4.4.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"lodash.flattendeep": "^4.4.0",
"react-virtualized-auto-sizer": "^1.0.2",
"react-window": "^1.8.2"
},
"peerDependencies": {
"react": "^16.8.6",
"react-dom": "^16.8.6"
},
"devDependencies": {
"@babel/core": "7.4.4",
"@babel/core": "7.4.5",
"@babel/plugin-proposal-class-properties": "7.4.4",
"@babel/plugin-proposal-object-rest-spread": "7.4.4",
"@babel/preset-env": "7.4.4",
"@babel/preset-env": "7.4.5",
"@babel/preset-react": "7.0.0",
"@babel/preset-typescript": "7.3.3",
"@storybook/react": "5.0.11",
"@storybook/react": "5.1.3",
"@types/react": "16.8.17",

@@ -52,12 +54,12 @@ "@types/react-dom": "16.8.4",

"@types/webpack-env": "1.13.9",
"@typescript-eslint/eslint-plugin": "1.7.0",
"@typescript-eslint/parser": "1.7.0",
"babel-loader": "8.0.5",
"@typescript-eslint/eslint-plugin": "1.9.0",
"@typescript-eslint/parser": "1.9.0",
"babel-loader": "8.0.6",
"babel-plugin-emotion": "10.0.9",
"eslint": "5.16.0",
"eslint-plugin-react": "7.13.0",
"typescript": "3.4.5",
"uglifyjs-webpack-plugin": "2.1.2",
"webpack": "4.30.0",
"webpack-cli": "3.3.2",
"typescript": "3.5.1",
"uglifyjs-webpack-plugin": "2.1.3",
"webpack": "4.33.0",
"webpack-cli": "3.3.3",
"webpack-merge": "4.2.1",

@@ -64,0 +66,0 @@ "webpack-node-externals": "1.7.2"

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc