react-tablize
Advanced tools
Comparing version 0.13.0 to 0.14.0
@@ -5,2 +5,8 @@ # React Tablize - Change Log | ||
## [0.14.0 - 2019-07-16](https://github.com/alonrbar/react-tablize/tree/v0.14.0) | ||
### Added | ||
- `GridView.isVirtual`. | ||
## [0.13.0 - 2019-07-14](https://github.com/alonrbar/react-tablize/tree/v0.13.0) | ||
@@ -7,0 +13,0 @@ |
@@ -221,2 +221,3 @@ import * as React from 'react'; | ||
isVirtual?: boolean; | ||
columnCount: number; | ||
@@ -223,0 +224,0 @@ columnWidth: number | SizeCallback; |
@@ -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("@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}); | ||
!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("@emotion/styled-base")},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("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),c=n.n(o),y=n(2);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 l(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 u(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 a(e){return(a=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)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var h,d,b=function(){function n(e){var t;return f(this,n),(t=u(this,a(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&&s(e,t)}(n,p["Component"]),function(e,t,n){t&&l(e.prototype,t),n&&l(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=h=h||{}).PageUp="PageUp",d.PageDown="PageDown",d.End="End",d.Home="Home";var v=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 g(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&&g(e.prototype,t),n&&g(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),l=i.height||r.height,u=i.minHeight||r.minHeight,c=i.maxHeight||r.maxHeight;return o&&(l="calc(".concat(l," - ").concat(o,")"),u=u&&"calc(".concat(u," - ").concat(o,")"),c=c&&"calc(".concat(c," - ").concat(o,")")),{height:l,minHeight:u,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(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 _(e){return null==e}function C(e){return E(Array(e||0).keys())}function P(e){return(P="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){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){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function H(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}S=null,(O="_scrollbarWidth")in(w=j)?Object.defineProperty(w,O,{value:S,enumerable:!0,configurable:!0,writable:!0}):w[O]=S;var z=function(){function i(){var e,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return R(H(o=function(e,t){return!t||"object"!==P(t)&&"function"!=typeof t?H(e):t}(this,(e=T(i)).call.apply(e,[this].concat(n)))),"disableScrollEvents",!1),R(H(o),"innerElement",p.createRef()),R(H(o),"scrollTo",function(e){var t=o.innerElement.current;if(t){if(void 0===e)return;if(e===(o.isHorizontal?t.scrollLeft:t.scrollTop))return;o.disableScrollEvents=!0,t.scrollTo({top:o.isHorizontal?void 0:e,left:o.isHorizontal?e:void 0})}}),R(H(o),"handleOnScroll",function(e){if(o.disableScrollEvents)o.disableScrollEvents=!1;else if(o.props.onScroll){var t=e.currentTarget,n=t.scrollTop,r=t.scrollLeft;o.props.onScroll({scrollOffset:o.isHorizontal?r:n,scrollDirection:void 0,scrollUpdateWasRequested:!1})}}),o}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&&k(e,t)}(i,p["PureComponent"]),function(e,t,n){t&&x(e.prototype,t),n&&x(e,n)}(i,[{key:"render",value:function(){var r=this,e={height:this.props.height,width:this.props.width,direction:this.props.direction,outline:"none",overflow:"hidden"},t=R({height:this.props.height,width:this.props.width,boxSizing:"content-box",outline:"none",overflow:"auto"},this.isHorizontal?"overflowY":"overflowX","hidden");this.isHorizontal&&(t.display="flex"),this.props.hideScrollbar&&(this.isHorizontal?t.paddingBottom=j.scrollbarWidth:t["rtl"===this.props.direction?"paddingLeft":"paddingRight"]=j.scrollbarWidth);return p.createElement(this.props.outerElementType||"div",{style:e,onScroll:this.handleOnScroll},p.createElement(this.props.innerElementType||"div",{ref:this.innerElement,style:t},Array(this.props.itemCount).fill(0).map(function(e,t){var n;return p.createElement(r.props.children,{key:t,index:t,style:(n={},R(n,r.isHorizontal?"minWidth":"minHeight",r.props.itemSize(t)),R(n,r.isHorizontal?"height":"width",r.isHorizontal?r.props.height:r.props.width),n),data:null})})))}},{key:"isHorizontal",get:function(){return"horizontal"===this.props.layout}}]),i}();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 W(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 B(e){return(B=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)}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,B(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"]),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 L(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 F(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 M(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 q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function K(e,t){return(K=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var D="__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),U=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),M(this,q(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&&K(e,t)}(e,p["PureComponent"]),function(e,t,n){t&&F(e.prototype,t),n&&F(e,n)}(e,[{key:"render",value:function(){return this.props.children}}],[{key:"extract",value:function(e){if(e&&e.props&&e.props[D]){var t=e.props,n=t.children;return{props:L(t,["children"]),content:n}}return{props:{},content:e}}}]),e}();function X(e){return(X="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 Y(e,t){return!t||"object"!==X(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 J(e){return(J=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)}N(U,"defaultProps",N({},D,!0));var Z=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Y(this,J(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}(),$=n(1),ee=n.n($);function te(e){return(te="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){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 re(e){return(re=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ie(e,t){return(ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ue=function(){function i(){var e,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return le(oe(o=function(e,t){return!t||"object"!==te(t)&&"function"!=typeof t?oe(e):t}(this,(e=re(i)).call.apply(e,[this].concat(n)))),"disableScrollEvents",!1),le(oe(o),"innerElement",p.createRef()),le(oe(o),"scrollTo",function(e){var t=o.innerElement.current;if(t){if(!(void 0!==e.scrollLeft&&e.scrollLeft!==t.scrollLeft||void 0!==e.scrollTop&&e.scrollTop!==t.scrollTop))return;o.disableScrollEvents=!0,t.scrollTo({top:e.scrollTop,left:e.scrollLeft})}}),le(oe(o),"handleOnScroll",function(e){if(o.disableScrollEvents)o.disableScrollEvents=!1;else if(o.props.onScroll){var t=e.currentTarget,n=t.scrollTop,r=t.scrollLeft;o.props.onScroll({scrollTop:n,scrollLeft:r,horizontalScrollDirection:void 0,verticalScrollDirection:void 0,scrollUpdateWasRequested:!1})}}),o}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&&ie(e,t)}(i,p["PureComponent"]),function(e,t,n){t&&ne(e.prototype,t),n&&ne(e,n)}(i,[{key:"render",value:function(){var n=this,e={height:this.props.height,width:this.props.width},t={height:this.props.height,width:this.props.width};this.props.hideVerticalScrollbar&&(t["rtl"===this.props.direction?"paddingLeft":"paddingRight"]=j.scrollbarWidth);var r=C(this.props.columnCount).map(this.props.columnWidth).reduce(function(e,t){return e+t},0);return p.createElement(ce,{style:e},p.createElement(ae,{ref:this.innerElement,style:t,onScroll:this.handleOnScroll},C(this.props.rowCount).map(function(t){return p.createElement(se,{key:t,style:{height:n.props.rowHeight(t),width:r}},C(n.props.columnCount).map(function(e){return p.createElement(n.props.children,{key:e,columnIndex:e,rowIndex:t,data:null,isScrolling:!1,style:{height:n.props.rowHeight(t),width:n.props.columnWidth(e),minWidth:n.props.columnWidth(e)}})}))})))}}]),i}(),ce=ee()("div",{target:"ehvrxrz0",label:"OuterNonVirtualGrid"})({name:"i6bazn",styles:"overflow:hidden;"}),ae=ee()("div",{target:"ehvrxrz1",label:"InnerNonVirtualGrid"})({name:"tdz4b4",styles:"overflow:auto;box-sizing:content-box;"}),se=ee()("div",{target:"ehvrxrz2",label:"NonVirtualGridRow"})({name:"k008qs",styles:"display:flex;"}),fe=ee()("div",{target:"e12w1khq0",label:"StyledGridView"})({name:"8atqhb",styles:"width:100%;"}),pe=ee()("div",{target:"e12w1khq1",label:"StyledGridCell"})({name:"6ejg3q",styles:"display:flex;height:100%;overflow:hidden;text-overflow:ellipsis;align-items:center;vertical-align:middle;"}),ye=ee()("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",";& ",pe,"{align-items:flex-end;}"),he=ee()("div",{target:"e12w1khq3",label:"StyledGridBody"})("");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 be(){return(be=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 me(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 ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ge(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function we(e,t){return(we=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Se=function(){function i(){var e,t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Oe(ge(t=function(e,t){return!t||"object"!==de(t)&&"function"!=typeof t?ge(e):t}(this,(e=ve(i)).call.apply(e,[this].concat(r)))),"innerElement",p.createRef()),Oe(ge(t),"scrollTo",function(e){t.innerElement.current&&t.innerElement.current.scrollTo(e)}),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&&we(e,t)}(i,p["PureComponent"]),function(e,t,n){t&&me(e.prototype,t),n&&me(e,n)}(i,[{key:"render",value:function(){var e={height:this.props.height,width:this.props.width},t={};this.props.hideVerticalScrollbar&&(t["rtl"===this.props.direction?"paddingLeft":"paddingRight"]=j.scrollbarWidth);return p.createElement(je,{style:e},p.createElement(Ee,be({},this.props,{ref:this.innerElement,style:Object.assign({},this.props.style,t)})))}}]),i}(),je=ee()("div",{target:"e1jbh8vy0",label:"OuterVirtualGrid"})({name:"i6bazn",styles:"overflow:hidden;"}),Ee=ee()(y.VariableSizeGrid,{target:"e1jbh8vy1",label:"InnerVirtualGrid"})({name:"tdz4b4",styles:"overflow:auto;box-sizing:content-box;"});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 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 Pe(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 xe(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 Te(e){return(Te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function He(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ke(e,t){return(ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ze=function(){function u(){var e,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Re(He(r=function(e,t){return!t||"object"!==_e(t)&&"function"!=typeof t?He(e):t}(this,(e=Te(u)).call.apply(e,[this].concat(n)))),"headList",p.createRef()),Re(He(r),"mainBodyGrid",p.createRef()),Re(He(r),"freezedColumnsGrid",p.createRef()),Re(He(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})}),Re(He(r),"handleFrozenColumnsScroll",function(e){var t=e.scrollTop;r.mainBodyGrid.current&&r.mainBodyGrid.current.scrollTo({scrollTop:t})}),Re(He(r),"getColumnWidth",function(e){return"function"==typeof r.props.columnWidth?r.props.columnWidth(e):r.props.columnWidth}),Re(He(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&&ke(e,t)}(u,p["PureComponent"]),function(e,t,n){t&&xe(e.prototype,t),n&&xe(e,n)}(u,[{key:"render",value:function(){var e=this.props,t=(e.columnCount,e.columnWidth,e.children,Pe(e,["columnCount","columnWidth","children"]));return p.createElement(b,null,p.createElement(r.ThemeProvider,{theme:this.getTheme()},p.createElement(fe,Ce({},t,{style:Object.assign({direction:this.props.dir},this.props.style,j.geElementHeights(this,u.defaultHeight))}),this.renderHead(),this.renderBody())))}},{key:"renderHead",value:function(){var o=this,e=v.singleChildOfType(this,Z);if(!e)return null;var t=e.props,i=t.children,n=Pe(t,["children"]),l=this.props.freezeColumns||0,r=!1!==this.props.isVirtual?y.VariableSizeList:z;return p.createElement(ye,Ce({},n,{style:Object.assign({},e.props.style,j.geElementHeights(e,u.defaultHeadHeight))}),p.createElement(b,null,p.createElement(c.a,null,function(e){var t=e.width,n=e.height;return p.createElement("div",{style:{width:t,height:n,display:"flex"}},C(l).map(function(e){return o.renderCell({cellRender:i,rowIndex:0,columnIndex:e,isScrolling:!1})}),p.createElement(r,{ref:o.headList,hideScrollbar:!0,direction:o.props.dir,style:{overflow:"hidden"},layout:"horizontal",height:n,width:t-o.getFrozenColumnsWidth(),itemCount:o.props.columnCount-l,itemSize:function(e){return o.getColumnWidth(e+l)},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+l,isScrolling:r,style:n})}))})))}},{key:"renderBody",value:function(){var r=this,o=v.singleChildOfType(this,G);if(!o)return null;var e=o.props,t=(e.children,e.rowCount,e.rowHeight,Pe(e,["children","rowCount","rowHeight"])),n=v.singleChildOfType(this,Z),i=j.getBodyHeights(this,n,{total:u.defaultHeight,head:u.defaultHeadHeight});return p.createElement(he,Ce({},t,{style:Object.assign({},t.style,i)}),p.createElement(b,null,p.createElement(c.a,null,function(e){var t=e.height,n=e.width;return p.createElement("div",{style:{width:n,height:t,display:"flex"}},r.renderFrozenColumns(t,n,o),r.renderMainGrid(t,n,o))})))}},{key:"renderFrozenColumns",value:function(e,t,n){var i=this,r=this.props.freezeColumns||0,o=this.getFrozenColumnsWidth(),l=n.props,u=l.children,c=l.rowCount,a=l.rowHeight,s={direction:this.props.dir,height:e-j.scrollbarWidth,width:o,columnCount:r,columnWidth:this.getColumnWidth,rowCount:c,rowHeight:this.getRowHeight(a),onScroll:this.handleFrozenColumnsScroll,overscanRowsCount:this.props.overscanRowsCount,overscanColumnsCount:this.props.overscanColumnsCount,useIsScrolling:this.props.useIsScrolling,children: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})}},f=!1!==this.props.isVirtual?Se:ue;return p.createElement(f,Ce({ref:this.freezedColumnsGrid,hideVerticalScrollbar:!0},s))}},{key:"renderMainGrid",value:function(e,t,n){var i=this,l=this.props.freezeColumns||0,r=this.getFrozenColumnsWidth(),o=n.props,u=o.children,c=o.rowCount,a=o.rowHeight,s={direction:this.props.dir,height:e,width:t-r,columnCount:this.props.columnCount-l,columnWidth:function(e){return i.getColumnWidth(e+l)},rowCount:c,rowHeight:this.getRowHeight(a),onScroll:this.handleMainGridScroll,overscanRowsCount:this.props.overscanRowsCount,overscanColumnsCount:this.props.overscanColumnsCount,useIsScrolling:this.props.useIsScrolling,children:function(e){var t=e.rowIndex,n=e.columnIndex,r=e.style,o=e.isScrolling;return i.renderCell({cellRender:u,rowIndex:t,columnIndex:n+l,isScrolling:o,style:r})}},f=!1!==this.props.isVirtual?y.VariableSizeGrid:ue;return p.createElement(f,Ce({ref:this.mainBodyGrid},s))}},{key:"renderCell",value:function(e){var t=e.rowIndex,n=e.columnIndex,r=e.cellRender,o=e.isScrolling,i=e.style,l=r({rowIndex:t,columnIndex:n,isScrolling:o}),u=U.extract(l),c=u.props,a=u.content,s=this.getColumnWidth(n);return p.createElement(pe,Ce({key:"[ ".concat(t,", ").concat(n," ]")},c,{style:Object.assign({width:s},c.style,i)}),p.createElement(b,null,a))}},{key:"getTheme",value:function(){return{dir:this.props.dir}}},{key:"getFrozenColumnsWidth",value:function(){return this.props.freezeColumns?C(this.props.freezeColumns).map(this.getColumnWidth).reduce(function(e,t){return e+t},0):0}}]),u}();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 We(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 Ae(e,t){return(Ae=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")}Re(ze,"defaultHeight","35vh"),Re(ze,"defaultHeadHeight","40px"),Re(ze,"Head",Z),Re(ze,"Body",G),Re(ze,"Cell",U),Re(ze,"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 Le=function(){function e(){return Ge(this,e),We(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&&Ae(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 Me(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 Ke(e,t){return(Ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ne=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Me(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&&Ke(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 Ue(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 Xe(e){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ye(e,t){return(Ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qe(){Je(this,Qe),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 Je(this,e),Ue(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&&Ye(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(e){return(ot="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){return!t||"object"!==ot(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 lt(e){return(lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ut(e,t){return(ut=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function at(){ct(this,at),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 st=function(){function e(){return ct(this,e),it(this,lt(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&&ut(e,t)}(e,p["PureComponent"]),e}();function ft(e){return(ft="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 pt(e,t){return!t||"object"!==ft(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 yt(e){return(yt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ht(e,t){return(ht=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var dt=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),pt(this,yt(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&&ht(e,t)}(e,p["PureComponent"]),e}();function bt(e){return(bt="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 mt(e,t){return!t||"object"!==bt(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 vt(e){return(vt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gt(e,t){return(gt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var wt=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),mt(this,vt(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,t)}(e,p["PureComponent"]),e}(),Ot=n(5),St=n(6),jt=n.n(St);function Et(){return(Et=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 _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 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 Pt(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 xt(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 Tt(e){return(Tt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ht(e,t){return(Ht=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var kt=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),xt(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&&Ht(e,t)}(e,p["PureComponent"]),function(e,t,n){t&&Pt(e.prototype,t),n&&Pt(e,n)}(e,[{key:"render",value:function(){var t=this;return p.createElement(jt.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}(),Rt=p.forwardRef(function(e,t){return p.createElement(kt,Et({},e,{forwardedRef:t}))});Rt.displayName="CustomScrollbars";var zt=n(7),It=n.n(zt).a;function Wt(){var e=Mt(["\n flex: 1;\n padding: 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n"]);return Wt=function(){return e},e}function Bt(){var e=Mt(["\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 At(){var e=Mt(["\n display: flex;\n flex-flow: column;\n\n vertical-align: middle;\n"]);return At=function(){return e},e}function Gt(){var e=Mt(["\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=Mt(["\n flex: 1;\n display: flex;\n justify-content: stretch;\n\n ",": ",";\n ",";\n"]);return Vt=function(){return e},e}function Lt(){var e=Mt(["\n display: flex;\n flex-flow: column;\n\n overflow-y: hidden;\n\n font-weight: bold;\n vertical-align: middle;\n"]);return Lt=function(){return e},e}function Ft(){var e=Mt(["\n width: 100%;\n overflow-y: hidden;\n"]);return Ft=function(){return e},e}function Mt(e,t){return t=t||e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var qt,Kt="1px solid #ddd",Nt=It.div(Ft()),Dt=It.div(Lt()),Ut=It.div(Vt(),function(e){return"rtl"===e.theme.dir?"padding-left":"padding-right"},"17px",function(e){return e.theme.hairlines?"border-bottom: ".concat(Kt):""}),Xt=It.div(Gt()),Yt=It.div(At()),Jt=It.div(Bt(),function(e){return e.theme.hairlines?"border-top: ".concat(Kt):""}),Qt=It.div(Wt());function Zt(e){return(Zt="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 $t(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 en(){return(en=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 tn(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 nn(e){return(nn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function on(e,t){return(on=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ln(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function un(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cn(){ln(this,cn),un(this,"isVirtual",void 0),un(this,"rowCount",void 0),un(this,"rowKey",void 0),un(this,"children",void 0),un(this,"dir","ltr"),un(this,"className",void 0),un(this,"style",void 0),un(this,"rowHeight",50),un(this,"emptyMessage","No Items to Display"),un(this,"customScrollbars",void 0),un(this,"hairlines",void 0),un(this,"keyScroll",void 0),un(this,"overscanCount",20),un(this,"useIsScrolling",void 0)}var an=n(9),sn=(un(qt={},h.PageUp,!0),un(qt,h.PageDown,!0),un(qt,h.End,!0),un(qt,h.Home,!0),qt),fn=function(){function o(){var e,a;ln(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return un(rn(a=function(e,t){return!t||"object"!==Zt(t)&&"function"!=typeof t?rn(e):t}(this,(e=nn(o)).call.apply(e,[this].concat(n)))),"tableElement",p.createRef()),un(rn(a),"tableInnerRef",p.createRef()),un(rn(a),"tableOuterRef",p.createRef()),un(rn(a),"registerKeyHandlers",function(){window.addEventListener("keydown",a.scrollByKey)}),un(rn(a),"removeKeyHandlers",function(){window.removeEventListener("keydown",a.scrollByKey)}),un(rn(a),"scrollByKey",function(e){var t,n=e.key;if(sn[n]&&a.tableElement.current&&a.tableInnerRef.current&&a.tableOuterRef.current){var r=a.props.customScrollbars?a.tableOuterRef.current:a.tableElement.current,o=Ot.findDOMNode(r),i=o.scrollTop,l=.85*o.clientHeight,u=a.tableInnerRef.current.clientHeight,c=(un(t={},h.PageUp,Math.max(.1,i-l)),un(t,h.PageDown,Math.min(i+l,u)),un(t,h.End,u),un(t,h.Home,.1),t);a.setScrollOffset(c[n])}}),un(rn(a),"setScrollOffset",function(e){a.tableElement.current&&a.tableElement.current.scrollTo(e)}),un(rn(a),"getRowHeight",function(e){return"function"==typeof a.props.rowHeight?a.props.rowHeight(e):a.props.rowHeight}),a}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&&on(e,t)}(o,p["PureComponent"]),function(e,t,n){t&&tn(e.prototype,t),n&&tn(e,n)}(o,[{key:"refresh",value:function(){this.tableElement.current&&this.tableElement.current.resetAfterIndex(0,!1),this.forceUpdate()}},{key:"render",value:function(){var e=v.singleChildOfType(this,dt),t=v.singleChildOfType(this,Ze),n=v.childrenOfType(this,st);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(Nt,en({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=$t(t,["children"]);return p.createElement(Dt,en({},r,{style:Object.assign({},e.props.style,j.geElementHeights(e,o.defaultHeadHeight))}),p.createElement(Ut,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,en({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(Yt,{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){un(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(c.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(y.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),l=this.getRowProps(i),u=l.style,c=$t(l,["style"]),a=this.getRowKey(c,e),s=this.getRowContent(i);return p.createElement(Jt,en({style:Object.assign({},n,u),key:a},c),p.createElement(b,null,function(e){return Array.isArray(e)?e:[e]}(s).map(function(e,t){var n=o.getCellProps(e);return!1===n.visible?null:p.createElement(Qt,en({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!v.singleChildOfType(e,Ne)})?null:p.createElement(dt,null,e.map(function(e){var t=v.singleChildOfType(e,Ne);return t?p.createElement(rt,t.props):null}))}},{key:"createBodyFromColumns",value:function(e){return p.createElement(Ze,null,function(r){return e.map(function(e,t){var n=v.singleChildOfType(e,Le).props.children;return n?n({rowIndex:r,columnIndex:t}):null})})}},{key:"getHeadCellProps",value:function(e){return v.elementInstanceOf(e,rt)&&e.props||{}}},{key:"getHeadCellContent",value:function(e){return v.elementInstanceOf(e,rt)?e.props.children:e}},{key:"hasBody",value:function(e){return!!e&&(!_(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 v.elementInstanceOf(e,wt)&&e.props||{}}},{key:"getRowContent",value:function(e){var t=e;if(v.isReactFragment(t))throw new Error("Can not use React.Fragment as row content. Consider wrapping your content with a row element.");return v.elementInstanceOf(t,wt)&&(t=t.props.children),Array.isArray(t)&&(t=an(t)),t}},{key:"getRowKey",value:function(e,t){return _(e.key)?"function"==typeof this.props.rowKey?this.props.rowKey(t):t:e.key}},{key:"getCellProps",value:function(e){return v.elementInstanceOf(e,rt)&&e.props||{}}},{key:"getCellContent",value:function(e){var t=e;return v.elementInstanceOf(t,rt)&&(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?Rt:void 0}}]),o}();un(fn,"defaultHeight","35vh"),un(fn,"defaultHeadHeight","40px"),un(fn,"Head",dt),un(fn,"Body",Ze),un(fn,"Row",wt),un(fn,"Cell",rt),un(fn,"Column",st),un(fn,"defaultProps",new cn),n.d(t,"GridView",function(){return ze}),n.d(t,"ColumnBodyProps",function(){return Ve}),n.d(t,"ColumnBody",function(){return Le}),n.d(t,"ColumnHead",function(){return Ne}),n.d(t,"TableBodyProps",function(){return Qe}),n.d(t,"TableBody",function(){return Ze}),n.d(t,"TableCell",function(){return rt}),n.d(t,"TableColumnProps",function(){return at}),n.d(t,"TableColumn",function(){return st}),n.d(t,"TableHead",function(){return dt}),n.d(t,"TableRow",function(){return wt}),n.d(t,"TableViewProps",function(){return cn}),n.d(t,"TableView",function(){return fn})}],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.13.0", | ||
"version": "0.14.0", | ||
"description": "Virtual table and grid components for React", | ||
@@ -5,0 +5,0 @@ "author": "Alon Bar", |
@@ -130,3 +130,3 @@ # react-tablize | ||
|-|-|-|-|-| | ||
| isVirtual | boolean | true | no | Whether to use a virtual table (using [react-window](https://github.com/bvaughn/react-window)) or to use simple divs. Useful for performance comparison and optimization. | | ||
| isVirtual | boolean | true | no | Whether to use a virtual table (using [react-window](https://github.com/bvaughn/react-window)) or simple divs. Useful for performance comparison and optimization. | | ||
| rowCount | number || yes | The number of rows in the table. | | ||
@@ -230,2 +230,3 @@ | rowKey | `(rowIndex: number) => React.Key` | | no | React key for each row. | | ||
|-|-|-|-|-| | ||
| isVirtual | boolean | true | no | Whether to use a set of virtual tables (using [react-window](https://github.com/bvaughn/react-window)) or simple divs. Useful for performance comparison and optimization. | | ||
| columnCount | number || yes || | ||
@@ -232,0 +233,0 @@ | columnWidth | `number` \| `(columnIndex: number) => number` || yes | Column width in pixels. | |
@@ -12,2 +12,7 @@ | ||
type SizeCallback = (index: number) => number; | ||
type SizeCallback = (index: number) => number; | ||
interface ScrollEvent { | ||
scrollTop: number; | ||
scrollLeft: number; | ||
} |
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
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
386280
38
3767
241
9