Cube('pandav:/com/tableListV2/1.0.0/components/Body.jsx',['pandav:/npm/react/16.13.1','pandav:/npm/lodash/4.6.1','pandav:/com/tableListV2/1.0.0/utils','pandav:/com/tableListV2/1.0.0/common/cssModules','pandav:/com/tableListV2/1.0.0/components/Col.jsx','pandav:/npm/react-motion/0.5.2'],function(a,b,c){function d(a){"@babel/helpers - typeof";return d='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&'function'==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?'symbol':typeof a},d(a)}function e(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}function f(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,'value'in c&&(c.writable=!0),Object.defineProperty(a,h(c.key),c)}function g(a,b,c){return b&&f(a.prototype,b),c&&f(a,c),Object.defineProperty(a,'prototype',{writable:!1}),a}function h(a){var b=j(a,'string');return'symbol'==d(b)?b:b+''}function j(a,b){if('object'!=d(a)||!a)return a;var c=a[Symbol.toPrimitive];if(void 0!==c){var e=c.call(a,b||'default');if('object'!=d(e))return e;throw new TypeError('@@toPrimitive must return a primitive value.')}return('string'===b?String:Number)(a)}function k(a,b,c){return b=p(b),l(a,n()?Reflect.construct(b,c||[],p(a).constructor):b.apply(a,c))}function l(a,b){if(b&&('object'===d(b)||'function'==typeof b))return b;if(void 0!==b)throw new TypeError('Derived constructors may only return object or undefined');return m(a)}function m(a){if(void 0===a)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return a}function n(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(a){}return(n=function b(){return!!a})()}function p(a){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function b(a){return a.__proto__||Object.getPrototypeOf(a)},p(a)}function q(a,b){if('function'!=typeof b&&null!==b)throw new TypeError('Super expression must either be null or a function');a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,'prototype',{writable:!1}),b&&r(a,b)}function r(a,b){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function c(a,b){return a.__proto__=b,a},r(a,b)}function s(a){for(var b=arguments,c=function c(){var e=null==b[d]?{}:b[d],f=Object.keys(e);'function'==typeof Object.getOwnPropertySymbols&&(f=f.concat(Object.getOwnPropertySymbols(e).filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),f.forEach(function(b){x(a,b,e[b])})},d=1;d<arguments.length;d++)c();return a}var t=c('pandav:/npm/react/16.13.1'),u=c('pandav:/npm/lodash/4.6.1'),i=c('pandav:/com/tableListV2/1.0.0/utils'),o=c('pandav:/com/tableListV2/1.0.0/common/cssModules'),v=c('pandav:/com/tableListV2/1.0.0/components/Col.jsx'),w=c('pandav:/npm/react-motion/0.5.2'),x=function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a},y=function(a){function b(a){var c;return e(this,b),c=k(this,b,[a]),c.state={selectedRows:[void 0].concat(Array.from(a.data.map(function(a){if(a.isSelected)return a}))),data:[]},c.fixedData=[],c.activeData=[],c.initData(c.props),c.onClick=c.onClick.bind(c),c.emitEvents=c.emitEvents.bind(c),c.randomNodes=null,c}return q(b,a),g(b,[{key:'tableInterval',value:function c(a,b){this.tid&&(clearTimeout(this.tid),this.tid=null),this.loop&&document.removeEventListener('visibilitychange',this.loop);var d=this,e=function c(){'visible'===document.visibilityState?d.tid=setTimeout(function(){a.call(),c()},b):d.tid&&clearTimeout(d.tid)};document.addEventListener('visibilitychange',this.loop),e()}},{key:'emitEvents',value:function a(){}},{key:'emitCallback',value:function a(){}},{key:'getFieldFixed',value:function c(a,b){for(var d=[],e=[],f=0;f<a.length;f++){for(var g=a[f],h=!1,k=0;k<b.length;k++){var l=b[k].value,m=b[k].fixed,n=m.value,o=m.show;if(o&&g[l]===n){d.push(g),h=!0;break}}h||e.push(g)}return{fixed:d,active:e}}},{key:'initData',value:function b(a){var c=a.chart,d=a.data,e=a.rowSetting,f=c.animation,g=c.global.size;if(0>g||0>=d.length)return this.fixedData=[],void(this.activeData=[]);var h=f.attrs,i=h.mode,j=h.fixedCount,k=e.rows,l=this.getFieldFixed(d,k),m=l.fixed,n=l.active;if(0>j&&(j=0),m.length>=g)return this.fixedData=m.slice(0,g),this.activeData=[],void this.topFixedEmitEvents(f.attrs.callbackSwitch);if('total'===i){if(m.length>=j)return this.fixedData=Array.from(m),this.activeData=n.slice(0),void this.topFixedEmitEvents(f.attrs.callbackSwitch);j-=m.length}else'single'===i&&(j=n.length<=g?g:0);this.fixedData=[].concat(Array.from(m),Array.from(n.slice(0,j))),this.activeData=n.slice(j),void this.topFixedEmitEvents(f.attrs.callbackSwitch)}},{key:'topFixedEmitEvents',value:function b(a){this.fixedData&&0<this.fixedData.length&&a&&this.getRelativeData(this.fixedData[0],this.fixedData),this.fixedData&&0<this.fixedData.length&&this.props.emitEvent&&this.props.emitEvent('topFixed')}},{key:'willEnter',value:function a(){var b=this.props.chart||{},c=b.global.size,d=b.animation.attrs,e=d.animateMode,f=d.mode;return'total'===f?(0,'flop'===e?{t:-180,opacity:0}:{t:c,opacity:0}):'single'===f?{t:0,opacity:0}:void 0}},{key:'willLeave',value:function a(){var b=this.props.chart||{},c=b.global.size,d=b.animation.attrs,e=d.animateMode,f=d.mode;return'total'===f?'flop'===e?{t:90,opacity:w.spring(0)}:{t:-1*c,opacity:w.spring(0)}:'single'===f?{t:0,opacity:w.spring(0)}:void 0}},{key:'componentDidMount',value:function a(){var b=this.props;this.setAnimateData(b),this.intervalHandler(b),this.initEvents()}},{key:'intervalHandler',value:function b(a){var c=this;this.clearInterval();var d=a.chart,e=d.animation,f=e.show,g=e.attrs,h=g.interval;f&&this.activeData&&0<this.activeData.length&&this.tableInterval(function(){c.setAnimateData(a)},1e3*h)}},{key:'clearInterval',value:function a(){this.loop&&document.removeEventListener('visibilitychange',this.loop),this.tid&&(clearTimeout(this.tid),this.tid=null)}},{key:'clearSelectRow',value:function a(){}},{key:'setAnimateData',value:function b(a){var c=this,d=a.chart,e=d.animation,f=d.global,g=f.size,h=e.attrs,i=h.connectMode,j=h.mode,k=this.activeData,l=this.fixedData.length,m=[];if(e.show)if(!(u.isArray(k)&&0<k.length))this.setState({data:[]});else if('total'===j&&(m=this.activeData.splice(0,g-l),this.setState({data:m},function(){var a;if((a=c.activeData).push.apply(a,Array.from(m)),f.firstCallback){var b=c.props,d=b.id,e=b.onRelative;e&&e(d,Object.assign({},f.firstCallback,c.state.data[0]))}})),'single'===j){var n=this.activeData.slice(0,g-l);'circle'===i?this.setState({data:[{index:'-1'}].concat(Array.from(n))},function(){var a,b=c.activeData.splice(0,1);if((a=c.activeData).push.apply(a,Array.from(b)),f.firstCallback){var d=c.props,e=d.id,g=d.onRelative;g&&g(e,Object.assign({},f.firstCallback,c.state.data[1]))}}):1<n.length&&this.activeData.length!==n[n.length-2].index?this.setState({data:[{index:'-1'}].concat(Array.from(n))},function(){var a,b=c.activeData.splice(0,1);(a=c.activeData).push.apply(a,Array.from(b))}):(this.setState({data:[{index:'-1'}].concat(Array.from(this.props.data.slice(0,g-l)))}),this.activeData=Array.from(this.props.data))}}},{key:'shouldComponentUpdate',value:function d(a,b,c){return'hidden'!==document.visibilityState}},{key:'componentWillReceiveProps',value:function c(a,b){var d=this.props.chart,e=d.global,f=d.animation;this.clearInterval(),'hidden'!==document.visibilityState&&(!u.isEqual(this.props.data,a.data)&&(this.clearSelectRow(a.data),this.props.emitEvent&&this.props.emitEvent('dataRefresh',a.data)),u.isEqual(e,a.chart.global)&&u.isEqual(f,a.chart.animation)&&u.isEqual(this.props.data,a.data)||(this.initData(a),this.setAnimateData(a),this.intervalHandler(a)))}},{key:'getDefaultStyles',value:function c(a,b){return b.map(function(b){return{data:b,style:{t:0,opacity:0},key:('total'===a?Math.random():b.index)+''}})}},{key:'getStyles',value:function e(a,b,c,d){return b.map(function(e,f){var g=c[('single'===a?f>b.length-1?b.length-2:f-1:f)%b.length+d],h=g?g.opacity:1;return{data:e,style:{t:w.spring(0),opacity:w.spring(+h)},key:('total'===a?Math.random():e.index)+''}})}},{key:'getLinkFields',value:function b(a){return a&&0<a.length&&a.map(function(a){return a.text})}},{key:'getLinkFieldValue',value:function c(a,b){return a.reduce(function(c,d,e){return'undefined'==typeof b[d]?c:c+d+'='+b[d]+(e===a.length-1?'':'&')},'')}},{key:'openPage',value:function b(a){var c=a.splice('&'),d=!1;return c.forEach(function(a){a.split('=')[1]&&(d=!0)}),d}},{key:'onClick',value:function b(a){var c=this.props,d=c.data,e=c.selectmode,f=a.currentTarget.dataset.index,g=this.state.selectedRows,h=d.filter(function(a){return f==a.index});'not'===e?this.setState({selectedRows:[]}):(null==g[h[0].index]?('single'==e&&(g=[]),g[h[0].index]=h[0]):g[h[0].index]=void 0,this.setState({selectedRows:g}),this.link(h[0]),this.props.emitEvent&&this.props.emitEvent('click',g))}},{key:'initEvents',value:function a(){}},{key:'autoHide',value:function b(a){}},{key:'emitRemoteCallbacks',value:function a(){}},{key:'getRelativeData',value:function a(){}},{key:'link',value:function b(a){var b=this.props.chart.link,c=b.show,d=b.domain,e=b.fields,f=b.blank;if(!c)return!1;var g=c&&this.getLinkFields(e),h=g&&this.getLinkFieldValue(g,a),i=h?d+h:d;f?window.open(i):window.location.href=i}},{key:'getNumeralBgs',value:function b(a){for(var c,d=[],e=[],f=0;f<a.length;f++)(c=a[f]).index?d.push(c):e.push(c);return{specify:d,normal:e}}},{key:'createWebKitScroll',value:function b(a){return a.turnOn?'\n            .activeCol::-webkit-scrollbar {\n              display:'.concat(a.showScrollBar?'block':'none','\n              width: ').concat(a.bgWidth,'px;\n              height:').concat(a.bgWidth,'px;\n            }\n            .activeCol::-webkit-scrollbar-thumb {\n              background: ').concat(a.thumb,';\n              border:').concat((.5-a.length/2)*a.bgWidth,'px solid transparent;\n              border-radius:').concat(a.thumbRadius*a.bgWidth*a.length,'px;\n              background-clip:content-box;\n            }\n            .activeCol::-webkit-scrollbar-track {\n              background-color: ').concat(a.track,';\n              border-radius:').concat(a.trackRadius*a.bgWidth/2,'px;\n            }\n        '):null}},{key:'componentWillUnmount',value:function a(){this.clearInterval()}},{key:'render',value:function a(){var b=this,c=this.props,d=c.highlightShow,e=c.component,f=void 0===e?{}:e,g=c.rowSetting,h=void 0===g?{}:g,j=c.chart,k=void 0===j?{}:j,l=c.lineHeight,m=c.numHeight,n=c.marginBottom,p=c.padding,q=c.scrollbar,r=c.numberColumnMax,u=c.itemHighlight,x=c.data,y=c.totalWidth,z=k.global,A=z.size,B=z.border,C=z.selectedRowConfig,D=k.animation.attrs,E=D.mode,F=D.backgroundFixed,G=D.fixedBackgroundImage,H=D.animateMode,I=D.highlight,J=I.lineNumber,K=I.background,L=h.rows,M=f.numberRow,N=f.col.rowStyles,O=L.filter(function(a){return!!a.fixed.show}),P=this.getNumeralBgs(M.style.numeralStyle),Q=P.specify,R=P.normal,S=this,T={};return t.createElement('div',{className:o.pr+' '+o.ovh,style:{height:m*A,padding:p}},t.createElement('div',{className:o.reset,style:{height:(l+n)*this.fixedData.length}},this.fixedData&&0<this.fixedData.length&&this.fixedData.map(function(a){var c=+a.index,d=N[c],e=O.find(function(b){return a[b.value]===a.fixed.value}),f=e&&e.fixed.color,g={itemHighlight:u,numberRow:s(s({},M),{},{style:s(s({},M.style),{},{numeralStyle:{specify:Q,normal:R}})}),__color__:a.__color__,selectedRowConfig:C,selectedRows:b.state.selectedRows,rowSettingArr:L,fixedColor:f,data:a,lineHeight:l,lineStyle:f?{color:'inherit'}:'',numberColumnMax:r,totalWidth:y};return t.createElement('div',{className:o['full-width']+' '+o['cursor-pointer'],onClick:b.onClick.bind(b),key:c,"data-index":c,style:{background:a._backgroundColor_?a._backgroundColor_:G?'url('.concat(G,')'):F?'transparent':N[c%N.length]&&i.getBackground(N[c%N.length].background),backgroundSize:'100% 100%',border:F||!B.show?'none':'1px solid '+B.color,height:l+1,marginBottom:n-1+'px',transform:'translate3d('+(d?d.offset:0)+'px, 0, 0)',opacity:d?d.opacity:1,color:a.__color__?a.__color__:f||'inherit'}},t.createElement(v,g))}),!!(this.activeData&&this.activeData.length&&!k.animation.show&&0<(A-this.fixedData.length)*(l+n))&&t.createElement('div',{className:'activeCol '+o.hideScroll+' active',style:{height:(A-this.fixedData.length)*(l+n),overflow:'hidden '.concat(this.activeData.length>A-this.fixedData.length?'scroll':'hidden')}},t.createElement('style',null,this.createWebKitScroll({thumb:q.thumb,length:q.length,track:q.track,bgWidth:q.bgWidth,thumbRadius:q.thumbRadius,trackRadius:q.trackRadius,showScrollBar:q.showScrollBar,turnOn:!1})),this.activeData&&0<this.activeData.length&&this.activeData.map(function(a,c){var d=a.index,e=b.props.data[d%b.props.data.length],f=O.find(function(b){return a[b.value]===b.fixed.value}),g=f&&f.fixed.color,h={itemHighlight:u,numberRow:s(s({},M),{},{style:s(s({},M.style),{},{numeralStyle:{specify:Q,normal:R}})}),__color__:a.__color__,selectedRowConfig:C,selectedRows:b.state.selectedRows,rowSettingArr:L,fixedColor:g,data:a,lineHeight:l,lineStyle:g?{color:'inherit'}:'',numberColumnMax:r,totalWidth:y};return t.createElement('div',{className:o['full-width']+' '+o['cursor-pointer'],onClick:b.onClick.bind(b),key:d,"data-index":d,style:{background:a._backgroundColor_?a._backgroundColor_:F?'transparent':x[d%$]&&i.getBackground(x[d%x.length].background),backgroundSize:'100% 100%',border:F||!B.show?'none':'1px solid '+B.color,height:l+1,marginBottom:n-1+'px',transform:'translate3d('+(e?e.offset:0)+'px, 0, 0)',opacity:e?e.opacity:1,color:a.__color__?a.__color__:g||'inherit'}},t.createElement(v,h))})),k.animation.show&&this.state.data&&0<this.state.data.length&&t.createElement(w.TransitionMotion,{willLeave:this.willLeave.bind(this),willEnter:this.willEnter.bind(this),defaultStyles:this.getDefaultStyles(E,this.state.data,N),styles:this.getStyles(E,this.state.data,N,this.fixedData?this.fixedData.length:0)},function(a){return t.createElement('div',{className:o.pr+' '+o['full-width'],style:{height:'total'===E?m*(S.activeData?S.activeData.length:0):m*((S.activeData?S.activeData.length:0)-1)}},S.randomNodes=a.map(function(c,e){var f=N[('single'===E?e>(S.activeData?S.activeData.length:0)-1?(S.activeData?S.activeData.length:0)-2:e-1:e)%(S.activeData?S.activeData.length:0)+(S.fixedData?S.fixedData.length:0)],g=f?f.offset:0;'total'===E?'up'===H?T={top:(l+n)*(e%(A-(S.fixedData?S.fixedData.length:0))),transform:'translate3d('+g+'px, '+(l+n)*c.style.t+'px, 0px)',willChange:'transform'}:'flop'===H&&(T={top:e%(A-(S.fixedData?S.fixedData.length:0))*(l+n),transform:'rotateX('+c.style.t+'deg) translate3d('+g+'px, 0, 0)',willChange:'transform'}):'single'===E&&(T={transition:'all 500ms linear',transform:'translate3d('+g+'px,'+(e-1)*(l+n)+'px, 0px)',opacity:0===e?0:c.style.opacity,willChange:'transform'});var h=d&&e===J&&i.getBackground(K),j=N['single'===E?parseInt(c.key)%N.length:(e%(S.activeData?S.activeData.length:0)+(S.fixedData?S.fixedData.length:0))%N.length],k={itemHighlight:u,numberRow:s(s({},M),{},{style:s(s({},M.style),{},{numeralStyle:{specify:Q,normal:R}})}),__color__:c.data.__color__,selectedRowConfig:C,selectedRows:S.state.selectedRows,rowSettingArr:L,fixedColor:'',data:c.data,lineHeight:l,lineStyle:d&&e===J&&I.style,numberColumnMax:r,totalWidth:y};return t.createElement('div',{className:o['full-width']+' '+o.pa+' '+o['cursor-pointer']+' '+o['backface-visibility-hidden'],onClick:S.onClick.bind(b),key:c.key,"data-index":c.data.index,style:Object.assign({borderRadius:N[(e+1)%N.length].borderRadius,background:F?'transparent':h||j&&i.getBackground(j.background),border:F||!B.show?'none':'1px solid '+B.color,height:l+1,marginBottom:(e===a.length-1?0:-1)+'px',opacity:c.style.opacity},T)},t.createElement(v,k))}))})))}}])}(t.Component);return a.exports=y,a.exports});