{ "pandav:/index.js": { "cubeCode": "Cube('pandav:/com/scrollTabV2/1.0.0',['pandav:/npm/bcore/0.0.18/event','pandav:/npm/react/17.0.2','pandav:/npm/react-dom/17.0.2','pandav:/com/scrollTabV2/1.0.0/com.jsx'],function(a,b,c){var d=c('pandav:/npm/bcore/0.0.18/event'),e=c('pandav:/npm/react/17.0.2'),f=c('pandav:/npm/react-dom/17.0.2'),g=c('pandav:/com/scrollTabV2/1.0.0/com.jsx');return a.exports=d.extend(function(a,b){this.config={theme:{}},this.container=a,this.apis=b.apis,this.containSize={boxWidth:$(a)&&$(a).width(),boxHeight:$(a)&&$(a).height()},this.init(b)},{init:function(a){this.mergeConfig(a)},mergeConfig:function(a){var b;return a?(b=a,this.config=a):b=this.config,b},updateOptions:function(a){this.render(this._data,a)},data:function(a){return a&&(this._data=a),this._data},setColors:function(){},resize:function(a,b){this.containSize={boxWidth:a,boxHeight:b},this.render(this._data,this.config)},render:function(a,b){a=this.data(a);var c=this.mergeConfig(b);f.render(e.createElement(g,Object.assign({width:this.containSize.boxWidth,height:this.containSize.boxHeight,emitEvent:this.emit,configuration:c.options,container:this.container,childrenConfig:[],data:a,id:this.__id})),this.container)},destroy:function(){return!!this.container&&void(f.unmountComponentAtNode(this.container),this.container.innerHTML='')}}),a.exports});", "requires": [ "pandav:/com.jsx" ], "buildLevel": 1, "outputDir": "/com/scrollTabV2/1.0.0", "outputPath": "/com/scrollTabV2/1.0.0/index.js", "fileName": "/index.js" }, "pandav:/ChildWrap.jsx": { "cubeCode": "Cube('pandav:/com/scrollTabV2/1.0.0/ChildWrap.jsx',['pandav:/npm/styled-components/6.1.13','pandav:/npm/react/17.0.2'],function(a,b,c){var d=c('pandav:/npm/styled-components/6.1.13'),e=c('pandav:/npm/react/17.0.2'),f=d.div(function(){return'\\n &::-webkit-scrollbar {\\n display: \\'block\\';\\n width: 0px;\\n height: 0px;\\n }\\n'});return a.exports=f,a.exports});", "requires": [], "buildLevel": 4, "outputDir": "/com/scrollTabV2/1.0.0", "outputPath": "/com/scrollTabV2/1.0.0/ChildWrap.jsx", "fileName": "/ChildWrap.jsx" }, "pandav:/com.css.js": { "cubeCode": "Cube(\"pandav:/com/scrollTabV2/1.0.0/com.css\", [], function(m){m.exports=\".index-module_container_1XVYL{display:inline-block;transition:transform linear .2s}.index-module_item_36DIa{position:relative;display:inline-block;cursor:pointer;text-align:center}.index-module_item_36DIa.index-module_active_Z8lAW:after{height:20px;bottom:0;left:0;transform:perspective(.5em) rotateX(5deg);transform-origin:bottom}.index-module_item_36DIa:after{position:absolute;content:'';width:100%;bottom:0;left:0;height:2px;background-repeat:no-repeat}\";return m.exports});", "requires": [], "buildLevel": 5, "outputDir": "/com/scrollTabV2/1.0.0", "outputPath": "/com/scrollTabV2/1.0.0/com.css.js", "fileName": "/com.css" }, "pandav:/ScrollBar.jsx": { "cubeCode": "Cube('pandav:/com/scrollTabV2/1.0.0/ScrollBar.jsx',['pandav:/npm/react/17.0.2','pandav:/npm/lodash/4.6.1'],function(a,b,c){var d=c('pandav:/npm/react/17.0.2'),e=d.memo,f=c('pandav:/npm/lodash/4.6.1'),g=e(function(a){var b=a.type,c=a.config,e=c.show,g=c.track,h=g.width,i=g.color,j=g.radius,k=c.thumb,l=k.width,m=k.color,n=k.radius,o=a.boxStyle,p=o.width,q=o.height,r=a.length,s=a.value,t=a.scrollEvent,u=function(a){t(a,b)},v=function(){document.removeEventListener('mousemove',u),document.removeEventListener('mousemove',v)},w='row'==b?{position:'absolute',left:0,width:p,height:h,top:q}:{position:'absolute',left:p,width:h,height:q,bottom:0},x='row'==b?{width:r,height:l,left:0,top:(h-l)/2,transform:'translateX('.concat(s,'px)')}:{width:l,height:r,left:(h-l)/2,top:0,transform:'translateY('.concat(s,'px)')};return e?d.createElement('div',{style:f.assign({},w,{background:i,borderRadius:j*h/2})},d.createElement('div',{style:f.assign({},x,{borderRadius:n*l/2,background:m,position:'absolute',cursor:'pointer',transition:'all linear 0.1s'}),onMouseDown:function(){document.addEventListener('mousemove',u),document.addEventListener('mouseup',v)}})):null});return a.exports=g,a.exports});", "requires": [], "buildLevel": 3, "outputDir": "/com/scrollTabV2/1.0.0", "outputPath": "/com/scrollTabV2/1.0.0/ScrollBar.jsx", "fileName": "/ScrollBar.jsx" }, "pandav:/com.jsx": { "cubeCode": "Cube('pandav:/com/scrollTabV2/1.0.0/com.jsx',['pandav:/npm/react/17.0.2','pandav:/com/common-utils/1.0.0','pandav:/com/cube-chart/0.0.2','pandav:/npm/classnames/2.3.2','pandav:/com/scrollTabV2/1.0.0/ScrollBar.jsx','pandav:/com/scrollTabV2/1.0.0/ChildWrap.jsx','pandav:/npm/lodash/4.6.1','pandav:/com/scrollTabV2/1.0.0/com.css'],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(b,a){if(!(b instanceof a))throw new TypeError('Cannot call a class as a function')}function f(a,b){for(var c,d=0;dc-e?0:c-e;d.setIndex(a),d.handleClickEvents('click',a),d.handleClickEvents('stateChange',a),d.clearTimer(),d.timeout=setTimeout(function(){d.animate(d.props)},1e3*f)},b.handleClickEvents=function(a,b){var c=d.data;d.props.emit&&d.props.emit(a,c[b])},b.scrollEvent=function(a,b){var c=d.container.parentElement;'row'==b?(c.scrollLeft+=3*a.movementX,d.setState({offset:c.scrollLeft})):(c.scrollTop+=3*a.movementY,d.setState({offset:c.scrollTop}))},b.setScroll=function(a,b){var c=a.currentTarget,e=c.scrollTop,f=c.scrollLeft;'row'==b?d.setState({offset:f}):d.setState({offset:e})};var f=a.configuration.chart.initIndex;return b.timeout=null,b.timer=null,b.rectBox=null,b.state={current:f-1,offset:0},b.data=a.data,b.config=a.configuration,b.animate(a),document.addEventListener('setIndex_'.concat(a.id),b.onAction,!1),b}return q(c,a),g(c,[{key:'UNSAFE_componentWillReceiveProps',value:function b(a){var c=A.isEqual(this.props.data,a.data),d=A.isEqual(this.props.configuration,a.configuration),e=a.configuration.chart.initIndex-1;c&&d||(this.data=a.data,this.config=a.configuration,this.animate(a),this.setIndex(e),a.data[e]&&this.handleClickEvents('stateChange',e))}},{key:'componentDidUpdate',value:function b(a){}},{key:'setIndex',value:function c(a){var d,f=this,g=this.config.chart,h=g.directionWidth,i=g.direction,j=g.directionHeight,k=this.props,l=k.width,m=k.height;a>=this.data.length&&(a=0),this.setState({current:a});var n=window.getScale(),o=this['item_'.concat(a)],p=this.rectBox.getBoundingClientRect(),q=p.x,r=p.y,s=q/n[0],t=r/n[0],u='row'==i,v=u?(o?o.getBoundingClientRect().left:0)/n[0]-(s+l/2)+h/2:(o?o.getBoundingClientRect().top:0)/n[1]-(t+m/2)+j/2,w=this.container.parentElement,x=w.scrollLeft,y=w.scrollTop,z=u?x:y;this.setState({offset:z+v}),this.timer=requestAnimationFrame(function c(a){d||(d=a);var e=a-d;300>e&&('row'==i?f.container.parentElement.scrollLeft=z+b(1,e/300)*v:f.container.parentElement.scrollTop=z+b(1,e/300)*v,f.timer=requestAnimationFrame(c))})}},{key:'animate',value:function b(a){var c,d=this,e=this.config,f=e.chart,b=f.animate,g=f.interval,h=e.tabSeries;this.clearTimer(),b&&this.data&&0=e&&(e=1),e}},{key:'componentDidMount',value:function a(){var b=this.state.current;/^\\d+(?=\\.{0,1}\\d+$|$)/.test(b)&&(this.setIndex(b),this.animate(this.props),this.handleClickEvents('stateChange',b)),this.animate(this.props)}},{key:'getActiveStyle',value:function e(a,b,c,d){var f=b.text,g=f.textStyle,h=f.shadow,i=f.textShadowConfig,j=b.border,k=b.background,l=(c.filter(function(a){return a.value==d.s})[0]||{}).background,m=u(k),n=l&&l.show?l:{},o=n.fillType,p=n.defaultColor,q=n.activeColor,r=n.defaultUrl,s=n.activeUrl,t=!!o&&u({fillType:o,colors:p,url:r}),v=!!o&&u({fillType:o,colors:q,url:s});return{activeStyle:A.assign({},g,{fontStyle:g.italic,fontWeight:g.fontWeight,background:v||m,border:j.show?'solid '.concat(j.borderWidth,'px ').concat(j.borderColor):'',textShadow:h?''.concat(i.hShadow,'px ').concat(i.vShadow,'px ').concat(i.blur,'px ').concat(i.color):'none'}),defaultStyle:{background:t||u(a.background)}}}},{key:'componentWillUnmount',value:function a(){cancelAnimationFrame(this.timer),document.removeEventListener('setIndex_'.concat(this.props.id),this.onAction,!1),this.clearTimer()}},{key:'render',value:function a(){var c=Math.max,d=Math.pow,e=this,f=Array.isArray(this.props.data)?this.props.data:[],g=this.props,h=g.width,i=g.height,j=this.config,k=j.chart,l=k.textOverflow,m=k.speed,n=k.directionHeight,o=k.directionWidth,p=k.direction,q=k.tabMargin,r=k.alignItems,t=k.scroll,v=j.tabStyle,B=v.defaultStyle,C=B.text,D=C.shadow,E=C.textShadowConfig,F=B.border,G=B.background,H=B.text,I=v.defaultStyle,J=v.active,K=j.tabSeries,L=A.assign({},{height:i,width:h,position:'absolute'},I.text.textStyle,{display:'flex',flexDirection:p}),M=this.state.current,N='row'==p?h:i,O=f.length*('row'==p?o:n)+q*(f.length-1),P=b(d(N,2)/O,N);return s.createElement(z,{className:'__pandav-component',style:L,id:this.props.id,ref:function b(a){return e.rectBox=a}},s.createElement(z,{style:{overflow:'row'===p?'scroll hidden':'hidden scroll',whiteSpace:'column'===p?'':'nowrap'},onScroll:function b(a){return e.setScroll(a,p)}},s.createElement('div',{className:'index-module_container_1XVYL',style:{display:'inline-block'},ref:function b(a){return e.container=a}},f&&f.map(function(a,b){var c=M==b?e.getActiveStyle(I,J,K.tabseries,a).activeStyle:e.getActiveStyle(I,J,K.tabseries,a).defaultStyle;return s.createElement('div',{key:b,ref:function c(a){return e['item_'.concat(b)]=a},className:x('index-module_item_36DIa',A.set({},'index-module_active_Z8lAW',M==b)),style:Object.assign({position:'relative',verticalAlign:'middle',height:'row'===p?L.height:n,width:'row'===p?o:L.width,marginRight:'row'===p?b===f.length-1?0:q:0,marginTop:'column'===p?0===b?0:q:0,fontStyle:H.textStyle.italic,fontWeight:H.textStyle.fontWeight,background:u(G),border:F.show?'solid '.concat(F.borderWidth,'px ').concat(F.borderColor):'',textShadow:D?''.concat(E.hShadow,'px ').concat(E.vShadow,'px ').concat(E.blur,'px ').concat(E.color):'none'},c),onClick:function a(){return e.onClick(b)}},s.createElement(w,{type:l,speed:m,value:a?a.content:'',style:{transform:'translate(0, -50%) translate('.concat(M===b?J.text.textTranslate.x:I.text.textTranslate.x,'px, ').concat(M===b?J.text.textTranslate.y:I.text.textTranslate.y,'px)'),position:'absolute',left:0,right:0,top:'50%',display:'ellipsis'==l?'':'flex',textAlign:'flex-start'==r?'left':'flex-end'==r?'right':'center',justifyContent:r}}))})),s.createElement(y,{type:p,config:t,scrollEvent:this.scrollEvent,value:c(0,b(O-N,this.state.offset))/O*N,boxStyle:{width:h,height:i},length:P})))}}])}(s.Component);return a.exports=i,a.exports});", "requires": [ "pandav:/ScrollBar.jsx", "pandav:/ChildWrap.jsx", "pandav:/com.css.js" ], "buildLevel": 2, "outputDir": "/com/scrollTabV2/1.0.0", "outputPath": "/com/scrollTabV2/1.0.0/com.jsx", "fileName": "/com.jsx" } }