New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

uxcore-table

Package Overview
Dependencies
Maintainers
3
Versions
299
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uxcore-table - npm Package Compare versions

Comparing version 1.4.3 to 1.4.4

27

build/Mask.js

@@ -33,16 +33,18 @@ 'use strict';

var props = this.props,
visible = props.visible,
loadTips = props.tips ? props.tips : "Loading...";
var _className = classnames((_classnames = {}, _classnames[props.jsxprefixCls] = true, _classnames[props.jsxprefixCls + "-hide"] = !visible, _classnames));
var props = this.props;
var visible = props.visible;
var text = props.text;
var className = classnames((_classnames = {}, _classnames[props.prefixCls] = true, _classnames[props.prefixCls + "-hide"] = !visible, _classnames));
return React.createElement(
'div',
{ className: _className },
{ className: className },
React.createElement(
'div',
{ className: props.jsxprefixCls + '-centerblk' },
{ className: props.prefixCls + '-centerblk' },
React.createElement('span', { className: 'kuma-loading' }),
React.createElement(
'span',
null,
loadTips
{ className: props.prefixCls + '-text' },
text
)

@@ -56,8 +58,9 @@ )

;
Mask.propTypes = {
prefixCls: React.PropTypes.string
};
Mask.propTypes = {};
Mask.defaultProps = {
jsxprefixCls: "kuma-uxmask"
prefixCls: "kuma-uxmask",
text: '加载中'
};

@@ -64,0 +67,0 @@

@@ -539,11 +539,4 @@ "use strict";

{ className: "kuma-uxtable-page" },
React.createElement(Pagination, { className: "mini",
locale: locale,
showSizeChanger: true,
showTotal: showPagerTotal,
total: data.totalCount,
onShowSizeChange: me.handleShowSizeChange.bind(me),
onChange: me.onPageChange.bind(me),
current: currentPage,
pageSize: pageSize })
React.createElement(Pagination, { className: "mini", locale: locale, showSizeChanger: true, showTotal: showPagerTotal, total: data.totalCount, onShowSizeChange: me.handleShowSizeChange.bind(me),
onChange: me.onPageChange.bind(me), current: currentPage, pageSize: pageSize })
);

@@ -647,5 +640,3 @@ }

"div",
{ className: "kuma-uxtable-body-wrapper", style: {
height: bodyHeight
} },
{ className: "kuma-uxtable-body-wrapper", style: { height: bodyHeight } },
React.createElement(Tbody, _extends({}, fixedBodyProps, { fixedColumn: "fixed", key: "grid-body-fixed" })),

@@ -657,5 +648,3 @@ React.createElement(Tbody, _extends({}, renderBodyProps, { fixedColumn: "scroll", key: "grid-body-scroll" }))

"div",
{ className: "kuma-uxtable-body-wrapper", style: {
height: bodyHeight
} },
{ className: "kuma-uxtable-body-wrapper", style: { height: bodyHeight } },
React.createElement(Tbody, _extends({}, renderBodyProps, { fixedColumn: "no" }))

@@ -702,3 +691,2 @@ );

data: this.state.data ? this.state.data.datas || this.state.data.data : [],
onModifyRow: props.onModifyRow ? props.onModifyRow : function () {},
rowSelection: props.rowSelection,

@@ -709,4 +697,4 @@ addRowClassName: props.addRowClassName,

mask: this.state.showMask,
changeSelected: this.changeSelected.bind(this),
rowHeight: this.props.rowHeight,
rowHeight: props.rowHeight,
loadingText: props.loadingText,
height: bodyHeight,

@@ -718,2 +706,3 @@ width: props.width,

levels: props.levels,
changeSelected: this.changeSelected.bind(this),
handleDataChange: this.handleDataChange.bind(this),

@@ -737,3 +726,2 @@ attachCellField: this.attachCellField.bind(this),

key: 'grid-header'
};

@@ -760,5 +748,3 @@

"div",
{ className: "kuma-uxtable-content", style: {
width: !!props.passedData ? "auto" : props.width
} },
{ className: "kuma-uxtable-content", style: { width: !!props.passedData ? "auto" : props.width } },
this.renderHeader(renderHeaderProps),

@@ -1047,2 +1033,3 @@ this.renderTbody(renderBodyProps, bodyHeight)

searchBarPlaceholder: "搜索表格内容",
loadingText: "loading",
processData: function processData(data) {

@@ -1078,2 +1065,3 @@ return data;

searchBarPlaceholder: React.PropTypes.string,
loadingText: React.PropTypes.string,
subComp: React.PropTypes.element,

@@ -1080,0 +1068,0 @@ emptyText: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.element]),

@@ -176,3 +176,3 @@ "use strict";

}),
React.createElement(Mask, { visible: _props.mask })
React.createElement(Mask, { visible: _props.mask, text: _props.loadingText })
)

@@ -179,0 +179,0 @@ );

@@ -137,3 +137,3 @@ // https://github.com/gulpjs/gulp/tree/master/docs

validate: function(input) {
if (/\d+\.\d+\.\d+/.test(input)) {
if (/^\d+\.\d+\.\d+$/.test(input)) {
if (versionCompare(input, pkg.version)) {

@@ -140,0 +140,0 @@ return true;

@@ -5,2 +5,6 @@ # History

# 1.4.4
* `NEW` add new prop `loadingText`
# 1.4.3

@@ -7,0 +11,0 @@

{
"name": "uxcore-table",
"version": "1.4.3",
"version": "1.4.4",
"description": "table ui component for react",

@@ -5,0 +5,0 @@ "repository": "https://github.com/uxcore/uxcore-table.git",

@@ -65,2 +65,3 @@ # uxcore-table

|searchBarPlaceholder|string |optional |"搜索表格内容"| 1.3.0 |searchBar 的占位符|
|loadingText |string |optional |"loading" | 1.4.4 |加载数据时的文案|
|headerHeight |number |optional |40 | - |表格头部的高度|

@@ -67,0 +68,0 @@ |pageSize |number |optional |10 | - |每页显示多少条数据|

@@ -19,24 +19,27 @@ /**

let props = this.props,
visible = props.visible,
loadTips = props.tips ? props.tips : "Loading...";
let _className = classnames({
[props.jsxprefixCls]: true,
[props.jsxprefixCls + "-hide"]: !visible
})
return (<div className={_className}>
<div className={`${props.jsxprefixCls}-centerblk`}><span>{loadTips}</span></div>
</div>);
let props = this.props;
let {visible, text} = props;
let className = classnames({
[props.prefixCls]: true,
[props.prefixCls + "-hide"]: !visible
});
return (<div className={className}>
<div className={`${props.prefixCls}-centerblk`}>
<span className="kuma-loading"></span>
<span className={`${props.prefixCls}-text`}>{text}</span>
</div>
</div>);
}
}
;
Mask.propTypes = {
prefixCls: React.PropTypes.string
};
Mask.defaultProps = {
jsxprefixCls: "kuma-uxmask"
prefixCls: "kuma-uxmask",
text: '加载中'
};
export default Mask;

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

me.setState(newData);
}

@@ -120,4 +119,2 @@

})
}

@@ -309,3 +306,2 @@

}
}

@@ -423,3 +419,2 @@

})
}

@@ -521,11 +516,4 @@

<div className="kuma-uxtable-page">
<Pagination className="mini"
locale={locale}
showSizeChanger={true}
showTotal={showPagerTotal}
total={data.totalCount}
onShowSizeChange={me.handleShowSizeChange.bind(me)}
onChange={me.onPageChange.bind(me)}
current={currentPage}
pageSize={pageSize} />
<Pagination className="mini" locale={locale} showSizeChanger={true} showTotal={showPagerTotal} total={data.totalCount} onShowSizeChange={me.handleShowSizeChange.bind(me)}
onChange={me.onPageChange.bind(me)} current={currentPage} pageSize={pageSize} />
</div>

@@ -544,3 +532,2 @@ );

})
}

@@ -609,9 +596,9 @@

return <div className="kuma-uxtable-header-wrapper">
<Header {...renderHeaderProps} fixedColumn='fixed' key="grid-header-fixed"/>
<Header {...renderHeaderProps} fixedColumn='scroll' key="grid-header-scroll"/>
</div>
<Header {...renderHeaderProps} fixedColumn='fixed' key="grid-header-fixed" />
<Header {...renderHeaderProps} fixedColumn='scroll' key="grid-header-scroll" />
</div>
} else {
return <div className="kuma-uxtable-header-wrapper">
<Header {...renderHeaderProps} fixedColumn="no" />
</div>
<Header {...renderHeaderProps} fixedColumn="no" />
</div>
}

@@ -625,15 +612,11 @@ }

return (
<div className="kuma-uxtable-body-wrapper" style={{
height: bodyHeight
}}>
<Tbody {...fixedBodyProps} fixedColumn='fixed' key="grid-body-fixed"/>
<Tbody {...renderBodyProps} fixedColumn='scroll' key="grid-body-scroll"/>
<div className="kuma-uxtable-body-wrapper" style={{ height: bodyHeight }}>
<Tbody {...fixedBodyProps} fixedColumn='fixed' key="grid-body-fixed" />
<Tbody {...renderBodyProps} fixedColumn='scroll' key="grid-body-scroll" />
</div>
)
} else {
return <div className="kuma-uxtable-body-wrapper" style={{
height: bodyHeight
}}>
<Tbody {...renderBodyProps} fixedColumn='no'/>
</div>
return <div className="kuma-uxtable-body-wrapper" style={{ height: bodyHeight }}>
<Tbody {...renderBodyProps} fixedColumn='no' />
</div>
}

@@ -675,3 +658,2 @@ }

data: this.state.data ? this.state.data.datas || this.state.data.data : [],
onModifyRow: props.onModifyRow ? props.onModifyRow : function() {},
rowSelection: props.rowSelection,

@@ -682,4 +664,4 @@ addRowClassName: props.addRowClassName,

mask: this.state.showMask,
changeSelected: this.changeSelected.bind(this),
rowHeight: this.props.rowHeight,
rowHeight: props.rowHeight,
loadingText: props.loadingText,
height: bodyHeight,

@@ -691,2 +673,3 @@ width: props.width,

levels: props.levels,
changeSelected: this.changeSelected.bind(this),
handleDataChange: this.handleDataChange.bind(this),

@@ -710,3 +693,2 @@ attachCellField: this.attachCellField.bind(this),

key: 'grid-header'
};

@@ -730,17 +712,13 @@

<div className={classnames({
[props.jsxprefixCls]: true,
"kuma-subgrid-mode": !!props.passedData
})} style={_style}>
{actionBar}
<div className="kuma-uxtable-content" style={{
width: !!props.passedData ? "auto" : props.width
}}>
{this.renderHeader(renderHeaderProps)}
{this.renderTbody(renderBodyProps, bodyHeight)}
</div>
{this.renderPager()}
[props.jsxprefixCls]: true,
"kuma-subgrid-mode": !!props.passedData
})} style={_style}>
{actionBar}
<div className="kuma-uxtable-content" style={{ width: !!props.passedData ? "auto" : props.width }}>
{this.renderHeader(renderHeaderProps)}
{this.renderTbody(renderBodyProps, bodyHeight)}
</div>
{this.renderPager()}
</div>
);
);
}

@@ -910,3 +888,2 @@

});
}

@@ -1023,2 +1000,3 @@

searchBarPlaceholder: "搜索表格内容",
loadingText: "loading",
processData: (data) => {

@@ -1063,2 +1041,3 @@ return data

searchBarPlaceholder: React.PropTypes.string,
loadingText: React.PropTypes.string,
subComp: React.PropTypes.element,

@@ -1065,0 +1044,0 @@ emptyText: React.PropTypes.oneOfType([

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

$(me.rootEl).off("scroll", me.scrollHandler);
}

@@ -42,3 +41,5 @@

}
return (<div className="kuma-uxtable-body-emptyword" style={_style}>{this.props.root.props.emptyText}</div>);
return (<div className="kuma-uxtable-body-emptyword" style={_style}>
{this.props.root.props.emptyText}
</div>);
}

@@ -74,4 +75,2 @@ }

}
}

@@ -132,33 +131,33 @@

return (
<div className={bodyWrapClassName} ref="root" style={_style} >
<ul className={this.props.jsxprefixCls} >
{this.renderEmptyData()}
{_data.map(function(item, index) {
let renderProps = {
columns: _columns,
rowIndex: item.jsxid, //tree mode, rowIndex need think more, so use jsxid
rowData: deepcopy(_data[index]),
index: index,
data: _data,
root: _props.root,
addRowClassName: _props.addRowClassName,
rowSelection: _props.rowSelection,
changeSelected: me.props.changeSelected,
subComp: _props.subComp,
renderSubComp: _props.renderSubComp,
actions: _props.actions,
key: 'row' + index,
mode: _props.mode,
renderModel: _props.renderModel,
fixedColumn: _props.fixedColumn,
level: 1,
levels: _props.levels,
handleDataChange: _props.handleDataChange,
attachCellField: _props.attachCellField,
detachCellField: _props.detachCellField,
visible: true
};
return <Row {...renderProps} />
})}
<Mask visible={_props.mask}/>
<div className={bodyWrapClassName} ref="root" style={_style}>
<ul className={this.props.jsxprefixCls}>
{this.renderEmptyData()}
{_data.map(function(item, index) {
let renderProps = {
columns: _columns,
rowIndex: item.jsxid, //tree mode, rowIndex need think more, so use jsxid
rowData: deepcopy(_data[index]),
index: index,
data: _data,
root: _props.root,
addRowClassName: _props.addRowClassName,
rowSelection: _props.rowSelection,
changeSelected: me.props.changeSelected,
subComp: _props.subComp,
renderSubComp: _props.renderSubComp,
actions: _props.actions,
key: 'row' + index,
mode: _props.mode,
renderModel: _props.renderModel,
fixedColumn: _props.fixedColumn,
level: 1,
levels: _props.levels,
handleDataChange: _props.handleDataChange,
attachCellField: _props.attachCellField,
detachCellField: _props.detachCellField,
visible: true
};
return <Row {...renderProps} />
})}
<Mask visible={_props.mask} text={_props.loadingText}/>
</ul>

@@ -168,5 +167,2 @@ </div>

}
}

@@ -173,0 +169,0 @@ ;

Sorry, the diff of this file is not supported yet

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