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

hui-ui

Package Overview
Dependencies
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hui-ui - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

lib/option/option.jsx

42

lib/list/list-table.jsx

@@ -7,2 +7,5 @@ import React from 'react';

super(args);
this.state = {
activeIndex: null
}
}

@@ -37,11 +40,48 @@

const BodyStyle = this.props.dataSource && this.props.dataSource.body && this.props.dataSource.body.style || [];
const BodyActiveStyle = this.props.dataSource && this.props.dataSource.body && this.props.dataSource.body.activeStyle || [];
return BodyData.map((trs, trindex) => {
const tds = trs.map(td => this.getTdContent(td));
return <tr style={BodyStyle} key={`tableBody${trindex}`} onClick={this.click.bind(this, trs, trindex)}>{tds}</tr>;
const isActive = this.state.activeIndex === trindex;
let style = BodyStyle;
if (isActive) {
const oldStyle = JSON.parse(JSON.stringify(BodyStyle));
for (var i in BodyActiveStyle) {
oldStyle[i] = BodyActiveStyle[i];
}
style = oldStyle;
}
return (
<tr
className={isActive ? 'active' : ''}
style={style} key={`tableBody${trindex}`}
onClick={this.click.bind(this, trs, trindex)}
onMouseEnter={this.onMouseEnter.bind(this, trs, trindex)}
onMouseOut={this.onMouseOut.bind(this, trs, trindex)}
onMouseMove={this.onMouseMove.bind(this, trs, trindex)}
>
{tds}
</tr>
);
})
}
onMouseMove(item, index) {
const clickEvt = this.props.dataSource && this.props.dataSource.body && this.props.dataSource.body.mousemove;
clickEvt && clickEvt(item, index);
}
onMouseOut(item, index) {
const clickEvt = this.props.dataSource && this.props.dataSource.body && this.props.dataSource.body.mouseout;
clickEvt && clickEvt(item, index);
}
onMouseEnter(item, index) {
const clickEvt = this.props.dataSource && this.props.dataSource.body && this.props.dataSource.body.mouseenter;
clickEvt && clickEvt(item, index);
}
click(item, index) {
const clickEvt = this.props.dataSource && this.props.dataSource.body && this.props.dataSource.body.click;
clickEvt && clickEvt(item, index);
this.setState({
activeIndex: index
})
}

@@ -48,0 +88,0 @@

2

package.json
{
"name": "hui-ui",
"version": "0.0.15",
"version": "0.0.16",
"description": "hui-ui",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -14,2 +14,3 @@ /**

'chart/chart': './src/chart/chart.jsx',
'option/option': './src/option/option.jsx',
vendor: ['react', 'react-dom']

@@ -16,0 +17,0 @@ },

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc