react-tablize
Advanced tools
Comparing version 0.12.0 to 0.13.0
@@ -5,2 +5,13 @@ # React Tablize - Change Log | ||
## [0.13.0 - 2019-07-14](https://github.com/alonrbar/react-tablize/tree/v0.13.0) | ||
### Added | ||
- Scroll grid's body when scrolling frozen columns. | ||
- Output css labels. | ||
### Removed | ||
- `TableView.lineNumbers`. | ||
## [0.12.0 - 2019-07-11](https://github.com/alonrbar/react-tablize/tree/v0.12.0) | ||
@@ -7,0 +18,0 @@ |
@@ -116,4 +116,3 @@ import * as React from 'react'; | ||
rowHeight?: number | SizeCallback; | ||
emptyMessage?: string; | ||
lineNumbers?: boolean; | ||
emptyMessage?: string; | ||
customScrollbars?: boolean; | ||
@@ -120,0 +119,0 @@ hairlines?: boolean; |
@@ -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 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){e.exports=require("react-dom")},function(e,t){e.exports=require("react-custom-scrollbars")},function(e,t,n){e.exports=n(9)},function(e,t){e.exports=require("lodash.flattendeep")},function(e,t,n){"use strict";n.r(t);var r=n(3),p=n(0),o=n(2),y=n.n(o),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 s,d,b=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 m(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)}}(d=s=s||{}).PageUp="PageUp",d.PageDown="PageDown",d.End="End",d.Home="Home";var g=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&&m(e.prototype,t),n&&m(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||Object.prototype.isPrototypeOf.call(t,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 v(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 w=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return function(e,t,n){t&&v(e.prototype,t),n&&v(e,n)}(e,null,[{key:"geElementHeights",value:function(e,t){var n=e&&e.props.style||{},r=n.height,o=n.minHeight,i=n.maxHeight;return void 0===r&&void 0===o&&(r=t),{height:r=this.cssSizeString(r),minHeight:o=this.cssSizeString(o),maxHeight:i=this.cssSizeString(i)}}},{key:"getBodyHeights",value:function(e,t,n){var r=this.geElementHeights(e,n.total),o=this.getHeadHeight(t,n.head),i=this.geElementHeights(e,void 0),u=i.height||r.height,l=i.minHeight||r.minHeight,c=i.maxHeight||r.maxHeight;return o&&(u="calc(".concat(u," - ").concat(o,")"),l=l&&"calc(".concat(l," - ").concat(o,")"),c=c&&"calc(".concat(c," - ").concat(o,")")),{height:u,minHeight:l,maxHeight:c}}},{key:"getHeadHeight",value:function(e,t){return e?this.geElementHeights(e,t).height:0}},{key:"cssSizeString",value:function(e){return Number.isFinite(e)?e+"px":e}}]),e}();function O(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 j(e){return null==e}function S(e){return O(Array(e||0).keys())}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 P(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 _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var x=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),P(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&&C(e,t)}(e,p["PureComponent"]),e}();function T(e){return(T="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 H(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 R(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 k(e,t){return!t||"object"!==T(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 I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var A="__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),F=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),k(this,I(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&&z(e,t)}(e,p["PureComponent"]),function(e,t,n){t&&R(e.prototype,t),n&&R(e,n)}(e,[{key:"render",value:function(){return this.props.children}}],[{key:"extract",value:function(e){if(e&&e.props&&e.props[A]){var t=e.props,n=t.children;return{props:H(t,["children"]),content:n}}return{props:{},content:e}}}]),e}();function K(e){return(K="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 W(e,t){return!t||"object"!==K(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 M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}B(F,"defaultProps",B({},A,!0));var G=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),W(this,M(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&&N(e,t)}(e,p["PureComponent"]),e}();function V(e){return(V="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 D(e,t){return!t||"object"!==V(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 L(e){return(L=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 U=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),D(this,L(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}(),X=n(4),J=n.n(X).a;function Q(){var e=te(["\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 Q=function(){return e},e}function Y(){var e=te(["\n label: grid-body;\n"]);return Y=function(){return e},e}function Z(){var e=te(["\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 Z=function(){return e},e}function $(){var e=te(["\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 $=function(){return e},e}function ee(){var e=te(["\n label: grid-view;\n\n width: 100%;\n"]);return ee=function(){return e},e}function te(e,t){return t=t||e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ne=J.div(ee()),re=J.div($(),function(e){return"rtl"===e.theme.dir?"padding-left":"padding-right"},17,"1px solid #ddd"),oe=J.div(Z()),ie=J.div(Y()),ue=J.div(Q());function le(e){return(le="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 ce(){return(ce=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 fe(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 ae(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 se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ye(e,t){return(ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function he(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var de=function(){function s(){var e,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return he(pe(r=function(e,t){return!t||"object"!==le(t)&&"function"!=typeof t?pe(e):t}(this,(e=se(s)).call.apply(e,[this].concat(n)))),"headList",p.createRef()),he(pe(r),"mainBodyGrid",p.createRef()),he(pe(r),"freezedColumnsGrid",p.createRef()),he(pe(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})}),he(pe(r),"getColumnWidth",function(e){return"function"==typeof r.props.columnWidth?r.props.columnWidth(e):r.props.columnWidth}),he(pe(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&&ye(e,t)}(s,p["PureComponent"]),function(e,t,n){t&&ae(e.prototype,t),n&&ae(e,n)}(s,[{key:"render",value:function(){var e=this.props,t=(e.columnCount,e.columnWidth,e.children,fe(e,["columnCount","columnWidth","children"]));return p.createElement(b,null,p.createElement(r.ThemeProvider,{theme:this.getTheme()},p.createElement(ne,ce({},t,{style:Object.assign({direction:this.props.dir},this.props.style,w.geElementHeights(this,s.defaultHeight))}),this.renderHead(),this.renderBody(),this.renderFooter())))}},{key:"renderHead",value:function(){var o=this,e=g.singleChildOfType(this,U);if(!e)return null;var t=e.props,i=t.children,n=fe(t,["children"]),u=this.props.freezeColumns||0;return p.createElement(re,ce({},n,{style:Object.assign({},e.props.style,w.geElementHeights(e,s.defaultHeadHeight))}),p.createElement(b,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"}},S(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=F.extract(i),l=u.props,c=u.content,f=this.getColumnWidth(t);return p.createElement(oe,ce({key:t},l,{style:Object.assign({width:f},l.style,o)}),p.createElement(b,null,c))}},{key:"renderBody",value:function(){var i=this,e=g.singleChildOfType(this,x);if(!e)return null;var t=e.props,u=t.children,r=t.rowCount,o=t.rowHeight,n=fe(t,["children","rowCount","rowHeight"]),l=g.singleChildOfType(this,U),c=w.getBodyHeights(this,l,{total:s.defaultHeight,head:s.defaultHeadHeight}),f=this.props.freezeColumns||0,a=this.getFrozenColumnsWidth();return p.createElement(ie,ce({},n,{style:Object.assign({},n.style,c)}),p.createElement(b,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:a,columnCount:f,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-a,columnCount:i.props.columnCount-f,columnWidth:function(e){return i.getColumnWidth(e+f)},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+f,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=F.extract(u),c=l.props,f=l.content;return p.createElement(ue,ce({key:"[ ".concat(t,", ").concat(n," ]")},c,{style:Object.assign({},c.style,i)}),p.createElement(b,null,f))}},{key:"renderFooter",value:function(){return g.singleChildOfType(this,G)?p.createElement("span",null,"Footer"):null}},{key:"getTheme",value:function(){return{dir:this.props.dir}}},{key:"getFrozenColumnsWidth",value:function(){return this.props.freezeColumns?S(this.props.freezeColumns).map(this.getColumnWidth).reduce(function(e,t){return e+t},0):0}}]),s}();function be(e){return(be="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 me(e,t){return!t||"object"!==be(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 ge(e){return(ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ve(e,t){return(ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function we(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}he(de,"defaultHeight","35vh"),he(de,"defaultHeadHeight","40px"),he(de,"Head",U),he(de,"Body",x),he(de,"Cell",F),he(de,"defaultProps",{overscanRowsCount:1,overscanColumnsCount:1});function Oe(){we(this,Oe),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 je=function(){function e(){return we(this,e),me(this,ge(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&&ve(e,t)}(e,p["PureComponent"]),e}();function Se(e){return(Se="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"!==Se(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 Pe(e){return(Pe=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 Ce=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ee(this,Pe(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 xe(e){return(xe="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 Te(e,t){return!t||"object"!==xe(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 He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Re(e,t){return(Re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ie(){ke(this,Ie),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 ze=function(){function e(){return ke(this,e),Te(this,He(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&&Re(e,t)}(e,p["PureComponent"]),e}();function Be(e){return(Be="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 Ae(e,t){return!t||"object"!==Be(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 Fe(e){return(Fe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ke(e,t){return(Ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var We=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ae(this,Fe(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&&Ke(e,t)}(e,p["PureComponent"]),e}();function Me(e){return(Me="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 Ne(e,t){return!t||"object"!==Me(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 Ge(e){return(Ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ve(e,t){return(Ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function De(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Le(){De(this,Le),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 De(this,e),Ne(this,Ge(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&&Ve(e,t)}(e,p["PureComponent"]),e}();function Ue(e){return(Ue="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 Xe(e,t){return!t||"object"!==Ue(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 Je(e){return(Je=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qe(e,t){return(Qe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ye=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Xe(this,Je(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&&Qe(e,t)}(e,p["PureComponent"]),e}();function Ze(e){return(Ze="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 $e(e,t){return!t||"object"!==Ze(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 et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tt(e,t){return(tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var nt=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),$e(this,et(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&&tt(e,t)}(e,p["PureComponent"]),e}(),rt=n(5),ot=n(6),it=n.n(ot);function ut(){return(ut=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 lt(e){return(lt="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 ct(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ft(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 at(e,t){return!t||"object"!==lt(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)}var yt=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),at(this,st(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&&pt(e,t)}(e,p["PureComponent"]),function(e,t,n){t&&ft(e.prototype,t),n&&ft(e,n)}(e,[{key:"render",value:function(){var t=this;return p.createElement(it.a,{ref:function(e){t.props.forwardedRef&&t.props.forwardedRef((e||{}).view)},style:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(e){ct(t,e,n[e])})}return t}({},this.props.style,{overflow:"hidden",direction:"ltr"}),onScroll:this.props.onScroll},this.props.children)}}]),e}(),ht=p.forwardRef(function(e,t){return p.createElement(yt,ut({},e,{forwardedRef:t}))});function dt(){var e=Et(["\n min-width: 40px;\n max-width: 50px;\n"]);return dt=function(){return e},e}function bt(){var e=Et(["\n flex: 1;\n padding: 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n"]);return bt=function(){return e},e}function mt(){var e=Et(["\n flex: 1;\n display: flex;\n justify-content: stretch;\n\n ",";\n\n &:first-of-type {\n border-top: none;\n }\n"]);return mt=function(){return e},e}function gt(){var e=Et(["\n display: flex;\n flex-flow: column;\n\n vertical-align: middle;\n"]);return gt=function(){return e},e}function vt(){var e=Et(["\n min-width: 40px;\n max-width: 50px;\n"]);return vt=function(){return e},e}function wt(){var e=Et(["\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 wt=function(){return e},e}function Ot(){var e=Et(["\n flex: 1;\n display: flex;\n justify-content: stretch;\n\n ",": ",";\n ",";\n"]);return Ot=function(){return e},e}function jt(){var e=Et(["\n display: flex;\n flex-flow: column;\n\n overflow-y: hidden;\n\n font-weight: bold;\n vertical-align: middle;\n"]);return jt=function(){return e},e}function St(){var e=Et(["\n width: 100%;\n overflow-y: hidden;\n"]);return St=function(){return e},e}function Et(e,t){return t=t||e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}ht.displayName="CustomScrollbars";var Pt,_t="1px solid #ddd",Ct=J.div(St()),xt=J.div(jt()),Tt=J.div(Ot(),function(e){return"rtl"===e.theme.dir?"padding-left":"padding-right"},"17px",function(e){return e.theme.hairlines?"border-bottom: ".concat(_t):""}),Ht=J.div(wt()),Rt=J(Ht)(vt()),kt=J.div(gt()),It=J.div(mt(),function(e){return e.theme.hairlines?"border-top: ".concat(_t):""}),zt=J.div(bt()),Bt=J(zt)(dt());function At(e){return(At="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 Ft(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 Kt(){return(Kt=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 Wt(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 Mt(e){return(Mt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Nt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gt(e,t){return(Gt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lt(){Vt(this,Lt),Dt(this,"isVirtual",void 0),Dt(this,"rowCount",void 0),Dt(this,"rowKey",void 0),Dt(this,"children",void 0),Dt(this,"dir","ltr"),Dt(this,"className",void 0),Dt(this,"style",void 0),Dt(this,"rowHeight",50),Dt(this,"emptyMessage","No Items to Display"),Dt(this,"lineNumbers",void 0),Dt(this,"customScrollbars",void 0),Dt(this,"hairlines",void 0),Dt(this,"keyScroll",void 0),Dt(this,"overscanCount",20),Dt(this,"useIsScrolling",void 0)}var qt=n(8),Ut=(Dt(Pt={},s.PageUp,!0),Dt(Pt,s.PageDown,!0),Dt(Pt,s.End,!0),Dt(Pt,s.Home,!0),Pt),Xt=function(){function o(){var e,f;Vt(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Dt(Nt(f=function(e,t){return!t||"object"!==At(t)&&"function"!=typeof t?Nt(e):t}(this,(e=Mt(o)).call.apply(e,[this].concat(n)))),"tableElement",p.createRef()),Dt(Nt(f),"tableInnerRef",p.createRef()),Dt(Nt(f),"tableOuterRef",p.createRef()),Dt(Nt(f),"registerKeyHandlers",function(){window.addEventListener("keydown",f.scrollByKey)}),Dt(Nt(f),"removeKeyHandlers",function(){window.removeEventListener("keydown",f.scrollByKey)}),Dt(Nt(f),"scrollByKey",function(e){var t,n=e.key;if(Ut[n]&&f.tableElement.current&&f.tableInnerRef.current&&f.tableOuterRef.current){var r=f.props.customScrollbars?f.tableOuterRef.current:f.tableElement.current,o=rt.findDOMNode(r),i=o.scrollTop,u=.85*o.clientHeight,l=f.tableInnerRef.current.clientHeight,c=(Dt(t={},s.PageUp,Math.max(.1,i-u)),Dt(t,s.PageDown,Math.min(i+u,l)),Dt(t,s.End,l),Dt(t,s.Home,.1),t);f.setScrollOffset(c[n])}}),Dt(Nt(f),"setScrollOffset",function(e){f.tableElement.current&&f.tableElement.current.scrollTo(e)}),Dt(Nt(f),"getRowHeight",function(e){return"function"==typeof f.props.rowHeight?f.props.rowHeight(e):f.props.rowHeight}),f}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&&Gt(e,t)}(o,p["PureComponent"]),function(e,t,n){t&&Wt(e.prototype,t),n&&Wt(e,n)}(o,[{key:"refresh",value:function(){this.tableElement.current&&this.tableElement.current.resetAfterIndex(0,!1),this.forceUpdate()}},{key:"render",value:function(){var e=g.singleChildOfType(this,Ye),t=g.singleChildOfType(this,ze),n=g.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(b,null,p.createElement(r.ThemeProvider,{theme:this.getTheme()},p.createElement(Ct,Kt({className:this.props.className,style:Object.assign({},this.props.style,w.geElementHeights(this,o.defaultHeight))},this.getKeyScrollProps()),this.renderTableHead(e),this.renderTableBody(e,t))))}},{key:"renderTableHead",value:function(e){var i=this;if(!e)return null;var t=e.props,n=t.children,r=Ft(t,["children"]);return p.createElement(xt,Kt({},r,{style:Object.assign({},e.props.style,w.geElementHeights(e,o.defaultHeadHeight))}),p.createElement(Tt,null,p.createElement(b,null,this.props.lineNumbers&&p.createElement(Rt,null),p.Children.map(n,function(e,t){var n=e,r=i.getHeadCellProps(n);if(!1===r.visible)return null;var o=i.getHeadCellContent(n);return p.createElement(Ht,Kt({key:t},r),p.createElement(b,null,o))}))))}},{key:"renderTableBody",value:function(e,t){var n=w.getBodyHeights(this,e,{total:o.defaultHeight,head:o.defaultHeadHeight});return p.createElement(kt,{style:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(e){Dt(t,e,n[e])})}return t}({direction:this.props.dir},n)},p.createElement(b,null,this.renderTableRows(t)))}},{key:"renderTableRows",value:function(e){var r=this;if(0===this.props.rowCount||!this.hasBody(e))return this.renderItemsPlaceHolder();var o=e.props.children;return p.createElement(y.a,null,function(e){var t=e.width,n=e.height;return!1!==r.props.isVirtual?r.renderTableRows_virtual(t,n,o):r.renderTableRows_nonVirtual(t,n,o)})}},{key:"renderTableRows_virtual",value:function(e,t,o){var i=this;return p.createElement(h.VariableSizeList,{ref:this.tableElement,innerRef:this.tableInnerRef,outerRef:this.tableOuterRef,style:{outline:"none"},outerElementType:this.getOuterElementType(),direction:this.props.dir,layout:"vertical",height:t,width:e,itemCount:this.props.rowCount,itemSize:this.getRowHeight,overscanCount:this.props.overscanCount,useIsScrolling:this.props.useIsScrolling},function(e){var t=e.index,n=e.style,r=e.isScrolling;return i.renderBodyRow(t,o,n,r)})}},{key:"renderTableRows_nonVirtual",value:function(e,t,n){var r=this;return p.createElement(this.getOuterElementType()||"div",{style:{height:t,width:e,direction:this.props.dir,outline:"none",overflow:"auto"}},n&&Array(this.props.rowCount).fill(0).map(function(e,t){return r.renderBodyRow(t,n,{height:r.getRowHeight(t)})}))}},{key:"renderBodyRow",value:function(e,t,n,r){var o=this;if(!t)return null;var i=t(e,r),u=this.getRowProps(i),l=u.style,c=Ft(u,["style"]),f=this.getRowKey(c,e),a=this.getRowContent(i);return p.createElement(It,Kt({style:Object.assign({},n,l),key:f},c),p.createElement(b,null,this.props.lineNumbers&&p.createElement(Bt,null,e+1),function(e){return Array.isArray(e)?e:[e]}(a).map(function(e,t){var n=o.getCellProps(e);return!1===n.visible?null:p.createElement(zt,Kt({key:t},n),p.createElement(b,null,o.getCellContent(e)))})))}},{key:"renderItemsPlaceHolder",value:function(){return p.createElement("div",null,p.createElement("div",{style:{textAlign:"center"}},this.props.emptyMessage))}},{key:"getKeyScrollProps",value:function(){var t=this;return!1===this.props.keyScroll?{}:{onMouseEnter:this.registerKeyHandlers,onMouseLeave:this.removeKeyHandlers,onKeyDown:function(e){return t.scrollByKey(e)}}}},{key:"createHeadFromColumns",value:function(e){return e.every(function(e){return!g.singleChildOfType(e,Ce)})?null:p.createElement(Ye,null,e.map(function(e){var t=g.singleChildOfType(e,Ce);return t?p.createElement(We,t.props):null}))}},{key:"createBodyFromColumns",value:function(e){return p.createElement(ze,null,function(r){return e.map(function(e,t){var n=g.singleChildOfType(e,je).props.children;return n?n({rowIndex:r,columnIndex:t}):null})})}},{key:"getHeadCellProps",value:function(e){return g.elementInstanceOf(e,We)&&e.props||{}}},{key:"getHeadCellContent",value:function(e){return g.elementInstanceOf(e,We)?e.props.children:e}},{key:"hasBody",value:function(e){return!!e&&(!j(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 g.elementInstanceOf(e,nt)&&e.props||{}}},{key:"getRowContent",value:function(e){var t=e;if(g.isReactFragment(t))throw new Error("Can not use React.Fragment as row content. Consider wrapping your content with a row element.");return g.elementInstanceOf(t,nt)&&(t=t.props.children),Array.isArray(t)&&(t=qt(t)),t}},{key:"getRowKey",value:function(e,t){return j(e.key)?"function"==typeof this.props.rowKey?this.props.rowKey(t):t:e.key}},{key:"getCellProps",value:function(e){return g.elementInstanceOf(e,We)&&e.props||{}}},{key:"getCellContent",value:function(e){var t=e;return g.elementInstanceOf(t,We)&&(t=t.props.children),t||null}},{key:"getTheme",value:function(){return{dir:this.props.dir,hairlines:!1!==this.props.hairlines}}},{key:"getOuterElementType",value:function(){return this.props.customScrollbars?ht:void 0}}]),o}();Dt(Xt,"defaultHeight","35vh"),Dt(Xt,"defaultHeadHeight","40px"),Dt(Xt,"Head",Ye),Dt(Xt,"Body",ze),Dt(Xt,"Row",nt),Dt(Xt,"Cell",We),Dt(Xt,"Column",qe),Dt(Xt,"defaultProps",new Lt),n.d(t,"GridView",function(){return de}),n.d(t,"ColumnBodyProps",function(){return Oe}),n.d(t,"ColumnBody",function(){return je}),n.d(t,"ColumnHead",function(){return Ce}),n.d(t,"TableBodyProps",function(){return Ie}),n.d(t,"TableBody",function(){return ze}),n.d(t,"TableCell",function(){return We}),n.d(t,"TableColumnProps",function(){return Le}),n.d(t,"TableColumn",function(){return qe}),n.d(t,"TableHead",function(){return Ye}),n.d(t,"TableRow",function(){return nt}),n.d(t,"TableViewProps",function(){return Lt}),n.d(t,"TableView",function(){return Xt})}],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=7);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}); | ||
!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("@emotion/styled-base")},function(e,t){e.exports=require("react-virtualized-auto-sizer")},function(e,t){e.exports=require("emotion-theming")},function(e,t){e.exports=require("react-dom")},function(e,t){e.exports=require("react-custom-scrollbars")},function(e,t){e.exports=require("@emotion/styled")},function(e,t,n){e.exports=n(10)},function(e,t){e.exports=require("lodash.flattendeep")},function(e,t,n){"use strict";n.r(t);var r=n(4),p=n(0),o=n(3),y=n.n(o),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 s,d,b=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 m(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)}}(d=s=s||{}).PageUp="PageUp",d.PageDown="PageDown",d.End="End",d.Home="Home";var g=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&&m(e.prototype,t),n&&m(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||Object.prototype.isPrototypeOf.call(t,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 v(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 w,O,S,j=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return function(e,t,n){t&&v(e.prototype,t),n&&v(e,n)}(e,null,[{key:"geElementHeights",value:function(e,t){var n=e&&e.props.style||{},r=n.height,o=n.minHeight,i=n.maxHeight;return void 0===r&&void 0===o&&(r=t),{height:r=this.cssSizeString(r),minHeight:o=this.cssSizeString(o),maxHeight:i=this.cssSizeString(i)}}},{key:"getBodyHeights",value:function(e,t,n){var r=this.geElementHeights(e,n.total),o=this.getHeadHeight(t,n.head),i=this.geElementHeights(e,void 0),u=i.height||r.height,l=i.minHeight||r.minHeight,c=i.maxHeight||r.maxHeight;return o&&(u="calc(".concat(u," - ").concat(o,")"),l=l&&"calc(".concat(l," - ").concat(o,")"),c=c&&"calc(".concat(c," - ").concat(o,")")),{height:u,minHeight:l,maxHeight:c}}},{key:"getHeadHeight",value:function(e,t){return e?this.geElementHeights(e,t).height:0}},{key:"cssSizeString",value:function(e){return Number.isFinite(e)?e+"px":e}},{key:"scrollbarWidth",get:function(){if(null===this._scrollbarWidth){var e=document.createElement("div");e.style.width="100px",e.style.height="100px",e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e),this._scrollbarWidth=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return this._scrollbarWidth}}]),e}();function _(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 C(e){return null==e}function P(e){return _(Array(e||0).keys())}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){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 T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}S=null,(O="_scrollbarWidth")in(w=j)?Object.defineProperty(w,O,{value:S,enumerable:!0,configurable:!0,writable:!0}):w[O]=S;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),x(this,T(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&&H(e,t)}(e,p["PureComponent"]),e}();function R(e){return(R="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 I(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 z(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 B(e,t){return!t||"object"!==R(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 A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var G="__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),q=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),B(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&&A(e,t)}(e,p["PureComponent"]),function(e,t,n){t&&z(e.prototype,t),n&&z(e,n)}(e,[{key:"render",value:function(){return this.props.children}}],[{key:"extract",value:function(e){if(e&&e.props&&e.props[G]){var t=e.props,n=t.children;return{props:I(t,["children"]),content:n}}return{props:{},content:e}}}]),e}();function M(e){return(M="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 K(e,t){return!t||"object"!==M(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 N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}F(q,"defaultProps",F({},G,!0));var D=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),K(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&&N(e,t)}(e,p["PureComponent"]),e}();function L(e){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t){return!t||"object"!==L(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 X(e){return(X=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function J(e,t){return(J=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Q=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),U(this,X(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&&J(e,t)}(e,p["PureComponent"]),e}(),Y=n(2),Z=n.n(Y),$=Z()("div",{target:"e12w1khq0",label:"StyledGridView"})({name:"8atqhb",styles:"width:100%;"}),ee=Z()("div",{target:"e12w1khq1",label:"StyledGridCell"})({name:"6ejg3q",styles:"display:flex;height:100%;overflow:hidden;text-overflow:ellipsis;align-items:center;vertical-align:middle;"}),te=Z()("div",{target:"e12w1khq2",label:"StyledGridHead"})("display:flex;font-weight:bold;vertical-align:middle;",function(e){return"rtl"===e.theme.dir?"padding-left":"padding-right"},":",j.scrollbarWidth,"px;border-bottom:","1px solid #ddd",";& ",ee,"{align-items:flex-end;}"),ne=Z()("div",{target:"e12w1khq3",label:"StyledGridBody"})(""),re=Z()("div",{target:"e12w1khq4",label:"FrozenColumnsWrapper"})({name:"i6bazn",styles:"overflow:hidden;"}),oe=Z()(h.VariableSizeGrid,{target:"e12w1khq5",label:"FrozenColumns"})("overflow-y:scroll;box-sizing:content-box;",function(e){return"rtl"===e.theme.dir?"padding-left":"padding-right"},":",j.scrollbarWidth,"px;");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 s(){var e,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);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(s)).call.apply(e,[this].concat(n)))),"headList",p.createRef()),pe(ae(r),"mainBodyGrid",p.createRef()),pe(ae(r),"freezedColumnsGrid",p.createRef()),pe(ae(r),"handleMainGridScroll",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),"handleFrozenColumnsScroll",function(e){var t=e.scrollTop;r.mainBodyGrid.current&&r.mainBodyGrid.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)}(s,p["PureComponent"]),function(e,t,n){t&&ce(e.prototype,t),n&&ce(e,n)}(s,[{key:"render",value:function(){var e=this.props,t=(e.columnCount,e.columnWidth,e.children,le(e,["columnCount","columnWidth","children"]));return p.createElement(b,null,p.createElement(r.ThemeProvider,{theme:this.getTheme()},p.createElement($,ue({},t,{style:Object.assign({direction:this.props.dir},this.props.style,j.geElementHeights(this,s.defaultHeight))}),this.renderHead(),this.renderBody(),this.renderFooter())))}},{key:"renderHead",value:function(){var o=this,e=g.singleChildOfType(this,Q);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,j.geElementHeights(e,s.defaultHeadHeight))}),p.createElement(b,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"}},P(u).map(function(e){return o.renderCell({cellRender:i,rowIndex:0,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.renderCell({cellRender:i,rowIndex:0,columnIndex:t+u,isScrolling:r,style:n})}))})))}},{key:"renderBody",value:function(){var i=this,e=g.singleChildOfType(this,k);if(!e)return null;var t=e.props,u=t.children,r=t.rowCount,o=t.rowHeight,n=le(t,["children","rowCount","rowHeight"]),l=g.singleChildOfType(this,Q),c=j.getBodyHeights(this,l,{total:s.defaultHeight,head:s.defaultHeadHeight}),f=this.props.freezeColumns||0,a=this.getFrozenColumnsWidth();return p.createElement(ne,ue({},n,{style:Object.assign({},n.style,c)}),p.createElement(b,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(re,{style:{height:t-j.scrollbarWidth,width:a}},p.createElement(oe,{ref:i.freezedColumnsGrid,direction:i.props.dir,height:t-j.scrollbarWidth,width:a,columnCount:f,columnWidth:i.getColumnWidth,rowCount:r,rowHeight:i.getRowHeight(o),overscanRowsCount:i.props.overscanRowsCount,useIsScrolling:i.props.useIsScrolling,onScroll:i.handleFrozenColumnsScroll},function(e){var t=e.rowIndex,n=e.columnIndex,r=e.style,o=e.isScrolling;return i.renderCell({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-a,columnCount:i.props.columnCount-f,columnWidth:function(e){return i.getColumnWidth(e+f)},rowCount:r,rowHeight:i.getRowHeight(o),onScroll:i.handleMainGridScroll,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.renderCell({cellRender:u,rowIndex:t,columnIndex:n+f,isScrolling:o,style:r})}))})))}},{key:"renderCell",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=q.extract(u),c=l.props,f=l.content,a=this.getColumnWidth(n);return p.createElement(ee,ue({key:"[ ".concat(t,", ").concat(n," ]")},c,{style:Object.assign({width:a},c.style,i)}),p.createElement(b,null,f))}},{key:"renderFooter",value:function(){return g.singleChildOfType(this,D)?p.createElement("span",null,"Footer"):null}},{key:"getTheme",value:function(){return{dir:this.props.dir}}},{key:"getFrozenColumnsWidth",value:function(){return this.props.freezeColumns?P(this.props.freezeColumns).map(this.getColumnWidth).reduce(function(e,t){return e+t},0):0}}]),s}();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",Q),pe(ye,"Body",k),pe(ye,"Cell",q),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 Se(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 je(e){return(je=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 Ce=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Se(this,je(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 Be(e){return(Be=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function We(e,t){return(We=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ae=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,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&&We(e,t)}(e,p["PureComponent"]),e}();function Fe(e){return(Fe="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"!==Fe(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 qe(e){return(qe=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 Ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ve(){Ke(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 Ne=function(){function e(){return Ke(this,e),Ge(this,qe(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 De(e){return(De="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 Le(e,t){return!t||"object"!==De(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 Ue(e){return(Ue=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xe(e,t){return(Xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Je=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Le(this,Ue(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&&Xe(e,t)}(e,p["PureComponent"]),e}();function Qe(e){return(Qe="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 Ye(e,t){return!t||"object"!==Qe(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 Ze(e){return(Ze=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 et=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ye(this,Ze(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}(),tt=n(5),nt=n(6),rt=n.n(nt);function ot(){return(ot=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 it(e){return(it="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 ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lt(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 ct(e,t){return!t||"object"!==it(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 ft(e){return(ft=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function at(e,t){return(at=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var st=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ct(this,ft(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&&at(e,t)}(e,p["PureComponent"]),function(e,t,n){t&<(e.prototype,t),n&<(e,n)}(e,[{key:"render",value:function(){var t=this;return p.createElement(rt.a,{ref:function(e){t.props.forwardedRef&&t.props.forwardedRef((e||{}).view)},style:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(e){ut(t,e,n[e])})}return t}({},this.props.style,{overflow:"hidden",direction:"ltr"}),onScroll:this.props.onScroll},this.props.children)}}]),e}(),pt=p.forwardRef(function(e,t){return p.createElement(st,ot({},e,{forwardedRef:t}))});pt.displayName="CustomScrollbars";var yt=n(7),ht=n.n(yt).a;function dt(){var e=St(["\n flex: 1;\n padding: 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n"]);return dt=function(){return e},e}function bt(){var e=St(["\n flex: 1;\n display: flex;\n justify-content: stretch;\n\n ",";\n\n &:first-of-type {\n border-top: none;\n }\n"]);return bt=function(){return e},e}function mt(){var e=St(["\n display: flex;\n flex-flow: column;\n\n vertical-align: middle;\n"]);return mt=function(){return e},e}function gt(){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 gt=function(){return e},e}function vt(){var e=St(["\n flex: 1;\n display: flex;\n justify-content: stretch;\n\n ",": ",";\n ",";\n"]);return vt=function(){return e},e}function wt(){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 wt=function(){return e},e}function Ot(){var e=St(["\n width: 100%;\n overflow-y: hidden;\n"]);return Ot=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 jt,_t="1px solid #ddd",Ct=ht.div(Ot()),Pt=ht.div(wt()),Et=ht.div(vt(),function(e){return"rtl"===e.theme.dir?"padding-left":"padding-right"},"17px",function(e){return e.theme.hairlines?"border-bottom: ".concat(_t):""}),xt=ht.div(gt()),Tt=ht.div(mt()),Ht=ht.div(bt(),function(e){return e.theme.hairlines?"border-top: ".concat(_t):""}),kt=ht.div(dt());function Rt(e){return(Rt="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 It(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 zt(){return(zt=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 Bt(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 Wt(e){return(Wt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function At(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ft(e,t){return(Ft=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mt(){Gt(this,Mt),qt(this,"isVirtual",void 0),qt(this,"rowCount",void 0),qt(this,"rowKey",void 0),qt(this,"children",void 0),qt(this,"dir","ltr"),qt(this,"className",void 0),qt(this,"style",void 0),qt(this,"rowHeight",50),qt(this,"emptyMessage","No Items to Display"),qt(this,"customScrollbars",void 0),qt(this,"hairlines",void 0),qt(this,"keyScroll",void 0),qt(this,"overscanCount",20),qt(this,"useIsScrolling",void 0)}var Kt=n(9),Vt=(qt(jt={},s.PageUp,!0),qt(jt,s.PageDown,!0),qt(jt,s.End,!0),qt(jt,s.Home,!0),jt),Nt=function(){function o(){var e,f;Gt(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return qt(At(f=function(e,t){return!t||"object"!==Rt(t)&&"function"!=typeof t?At(e):t}(this,(e=Wt(o)).call.apply(e,[this].concat(n)))),"tableElement",p.createRef()),qt(At(f),"tableInnerRef",p.createRef()),qt(At(f),"tableOuterRef",p.createRef()),qt(At(f),"registerKeyHandlers",function(){window.addEventListener("keydown",f.scrollByKey)}),qt(At(f),"removeKeyHandlers",function(){window.removeEventListener("keydown",f.scrollByKey)}),qt(At(f),"scrollByKey",function(e){var t,n=e.key;if(Vt[n]&&f.tableElement.current&&f.tableInnerRef.current&&f.tableOuterRef.current){var r=f.props.customScrollbars?f.tableOuterRef.current:f.tableElement.current,o=tt.findDOMNode(r),i=o.scrollTop,u=.85*o.clientHeight,l=f.tableInnerRef.current.clientHeight,c=(qt(t={},s.PageUp,Math.max(.1,i-u)),qt(t,s.PageDown,Math.min(i+u,l)),qt(t,s.End,l),qt(t,s.Home,.1),t);f.setScrollOffset(c[n])}}),qt(At(f),"setScrollOffset",function(e){f.tableElement.current&&f.tableElement.current.scrollTo(e)}),qt(At(f),"getRowHeight",function(e){return"function"==typeof f.props.rowHeight?f.props.rowHeight(e):f.props.rowHeight}),f}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&&Ft(e,t)}(o,p["PureComponent"]),function(e,t,n){t&&Bt(e.prototype,t),n&&Bt(e,n)}(o,[{key:"refresh",value:function(){this.tableElement.current&&this.tableElement.current.resetAfterIndex(0,!1),this.forceUpdate()}},{key:"render",value:function(){var e=g.singleChildOfType(this,Je),t=g.singleChildOfType(this,Re),n=g.childrenOfType(this,Ne);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(b,null,p.createElement(r.ThemeProvider,{theme:this.getTheme()},p.createElement(Ct,zt({className:this.props.className,style:Object.assign({},this.props.style,j.geElementHeights(this,o.defaultHeight))},this.getKeyScrollProps()),this.renderTableHead(e),this.renderTableBody(e,t))))}},{key:"renderTableHead",value:function(e){var i=this;if(!e)return null;var t=e.props,n=t.children,r=It(t,["children"]);return p.createElement(Pt,zt({},r,{style:Object.assign({},e.props.style,j.geElementHeights(e,o.defaultHeadHeight))}),p.createElement(Et,null,p.createElement(b,null,p.Children.map(n,function(e,t){var n=e,r=i.getHeadCellProps(n);if(!1===r.visible)return null;var o=i.getHeadCellContent(n);return p.createElement(xt,zt({key:t},r),p.createElement(b,null,o))}))))}},{key:"renderTableBody",value:function(e,t){var n=j.getBodyHeights(this,e,{total:o.defaultHeight,head:o.defaultHeadHeight});return p.createElement(Tt,{style:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(e){qt(t,e,n[e])})}return t}({direction:this.props.dir},n)},p.createElement(b,null,this.renderTableRows(t)))}},{key:"renderTableRows",value:function(e){var r=this;if(0===this.props.rowCount||!this.hasBody(e))return this.renderItemsPlaceHolder();var o=e.props.children;return p.createElement(y.a,null,function(e){var t=e.width,n=e.height;return!1!==r.props.isVirtual?r.renderTableRows_virtual(t,n,o):r.renderTableRows_nonVirtual(t,n,o)})}},{key:"renderTableRows_virtual",value:function(e,t,o){var i=this;return p.createElement(h.VariableSizeList,{ref:this.tableElement,innerRef:this.tableInnerRef,outerRef:this.tableOuterRef,style:{outline:"none"},outerElementType:this.getOuterElementType(),direction:this.props.dir,layout:"vertical",height:t,width:e,itemCount:this.props.rowCount,itemSize:this.getRowHeight,overscanCount:this.props.overscanCount,useIsScrolling:this.props.useIsScrolling},function(e){var t=e.index,n=e.style,r=e.isScrolling;return i.renderBodyRow(t,o,n,r)})}},{key:"renderTableRows_nonVirtual",value:function(e,t,n){var r=this;return p.createElement(this.getOuterElementType()||"div",{style:{height:t,width:e,direction:this.props.dir,outline:"none",overflow:"auto"}},n&&Array(this.props.rowCount).fill(0).map(function(e,t){return r.renderBodyRow(t,n,{height:r.getRowHeight(t)})}))}},{key:"renderBodyRow",value:function(e,t,n,r){var o=this;if(!t)return null;var i=t(e,r),u=this.getRowProps(i),l=u.style,c=It(u,["style"]),f=this.getRowKey(c,e),a=this.getRowContent(i);return p.createElement(Ht,zt({style:Object.assign({},n,l),key:f},c),p.createElement(b,null,function(e){return Array.isArray(e)?e:[e]}(a).map(function(e,t){var n=o.getCellProps(e);return!1===n.visible?null:p.createElement(kt,zt({key:t},n),p.createElement(b,null,o.getCellContent(e)))})))}},{key:"renderItemsPlaceHolder",value:function(){return p.createElement("div",null,p.createElement("div",{style:{textAlign:"center"}},this.props.emptyMessage))}},{key:"getKeyScrollProps",value:function(){var t=this;return!1===this.props.keyScroll?{}:{onMouseEnter:this.registerKeyHandlers,onMouseLeave:this.removeKeyHandlers,onKeyDown:function(e){return t.scrollByKey(e)}}}},{key:"createHeadFromColumns",value:function(e){return e.every(function(e){return!g.singleChildOfType(e,Ce)})?null:p.createElement(Je,null,e.map(function(e){var t=g.singleChildOfType(e,Ce);return t?p.createElement(Ae,t.props):null}))}},{key:"createBodyFromColumns",value:function(e){return p.createElement(Re,null,function(r){return e.map(function(e,t){var n=g.singleChildOfType(e,we).props.children;return n?n({rowIndex:r,columnIndex:t}):null})})}},{key:"getHeadCellProps",value:function(e){return g.elementInstanceOf(e,Ae)&&e.props||{}}},{key:"getHeadCellContent",value:function(e){return g.elementInstanceOf(e,Ae)?e.props.children:e}},{key:"hasBody",value:function(e){return!!e&&(!C(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 g.elementInstanceOf(e,et)&&e.props||{}}},{key:"getRowContent",value:function(e){var t=e;if(g.isReactFragment(t))throw new Error("Can not use React.Fragment as row content. Consider wrapping your content with a row element.");return g.elementInstanceOf(t,et)&&(t=t.props.children),Array.isArray(t)&&(t=Kt(t)),t}},{key:"getRowKey",value:function(e,t){return C(e.key)?"function"==typeof this.props.rowKey?this.props.rowKey(t):t:e.key}},{key:"getCellProps",value:function(e){return g.elementInstanceOf(e,Ae)&&e.props||{}}},{key:"getCellContent",value:function(e){var t=e;return g.elementInstanceOf(t,Ae)&&(t=t.props.children),t||null}},{key:"getTheme",value:function(){return{dir:this.props.dir,hairlines:!1!==this.props.hairlines}}},{key:"getOuterElementType",value:function(){return this.props.customScrollbars?pt:void 0}}]),o}();qt(Nt,"defaultHeight","35vh"),qt(Nt,"defaultHeadHeight","40px"),qt(Nt,"Head",Je),qt(Nt,"Body",Re),qt(Nt,"Row",et),qt(Nt,"Cell",Ae),qt(Nt,"Column",Ne),qt(Nt,"defaultProps",new Mt),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 Ce}),n.d(t,"TableBodyProps",function(){return ke}),n.d(t,"TableBody",function(){return Re}),n.d(t,"TableCell",function(){return Ae}),n.d(t,"TableColumnProps",function(){return Ve}),n.d(t,"TableColumn",function(){return Ne}),n.d(t,"TableHead",function(){return Je}),n.d(t,"TableRow",function(){return et}),n.d(t,"TableViewProps",function(){return Mt}),n.d(t,"TableView",function(){return Nt})}],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=8);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.12.0", | ||
"version": "0.13.0", | ||
"description": "Virtual table and grid components for React", | ||
@@ -34,3 +34,3 @@ "author": "Alon Bar", | ||
"react-virtualized-auto-sizer": "^1.0.2", | ||
"react-window": "^1.8.4" | ||
"react-window": "^1.8.5" | ||
}, | ||
@@ -42,10 +42,10 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@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.5", | ||
"@babel/core": "7.5.4", | ||
"@babel/plugin-proposal-class-properties": "7.5.0", | ||
"@babel/plugin-proposal-object-rest-spread": "7.5.4", | ||
"@babel/preset-env": "7.5.4", | ||
"@babel/preset-react": "7.0.0", | ||
"@babel/preset-typescript": "7.3.3", | ||
"@storybook/react": "5.1.9", | ||
"@types/react": "16.8.22", | ||
"@types/react": "16.8.23", | ||
"@types/react-custom-scrollbars": "4.0.5", | ||
@@ -56,5 +56,5 @@ "@types/react-dom": "16.8.4", | ||
"@types/storybook__react": "4.0.2", | ||
"@types/webpack-env": "1.13.9", | ||
"@typescript-eslint/eslint-plugin": "1.11.0", | ||
"@typescript-eslint/parser": "1.11.0", | ||
"@types/webpack-env": "1.14.0", | ||
"@typescript-eslint/eslint-plugin": "1.12.0", | ||
"@typescript-eslint/parser": "1.12.0", | ||
"babel-loader": "8.0.6", | ||
@@ -64,5 +64,5 @@ "babel-plugin-emotion": "10.0.14", | ||
"eslint-plugin-react": "7.14.2", | ||
"typescript": "3.5.2", | ||
"typescript": "3.5.3", | ||
"uglifyjs-webpack-plugin": "2.1.3", | ||
"webpack": "4.35.2", | ||
"webpack": "4.35.3", | ||
"webpack-cli": "3.3.5", | ||
@@ -69,0 +69,0 @@ "webpack-merge": "4.2.1", |
@@ -17,17 +17,42 @@ | ||
public static get scrollbarWidth(): number { | ||
if (this._scrollbarWidth === null) { | ||
// https://github.com/sonicdoe/measure-scrollbar/blob/master/index.js | ||
const div = document.createElement('div'); | ||
div.style.width = '100px'; | ||
div.style.height = '100px'; | ||
div.style.overflow = 'scroll'; | ||
div.style.position = 'absolute'; | ||
div.style.top = '-9999px'; | ||
document.body.appendChild(div); | ||
this._scrollbarWidth = div.offsetWidth - div.clientWidth; | ||
document.body.removeChild(div); | ||
} | ||
return this._scrollbarWidth; | ||
} | ||
private static _scrollbarWidth: number = null; | ||
public static geElementHeights(component: ComponentWithStyle, defaultHeight: number | string): ElementHeights { | ||
const style = (component && component.props.style) || {}; | ||
let height = style.height; | ||
let minHeight = style.minHeight; | ||
let maxHeight = style.maxHeight; | ||
if (height === undefined && minHeight === undefined) { | ||
height = defaultHeight; | ||
} | ||
height = this.cssSizeString(height); | ||
minHeight = this.cssSizeString(minHeight); | ||
maxHeight = this.cssSizeString(maxHeight); | ||
return { | ||
@@ -77,3 +102,2 @@ height, | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
317519
3155
6
Updatedreact-window@^1.8.5