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

frc-ui

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

frc-ui - npm Package Compare versions

Comparing version 0.0.0-beta.27 to 0.0.0-beta.28

9

es/tree/Item.js

@@ -6,3 +6,3 @@ import React from 'react';

export default function (props) {
const { prefix, className, option, onChange, expanded, checked, hasSelected, rowHeight, parentWidth } = props;
const { prefix, className, option, onChange, expanded, checked, hasSelected, rowHeight, parentWidth, clickRow } = props;
const { text, selectEnable, expandEnable, expandPlace, disabled, index, render, expandedIcon } = option;

@@ -59,6 +59,11 @@ const cls = classNames(`${prefix}-item`, className, {

}
const contentProps = {};
if (clickRow)
contentProps.onClick = expand;
if (selectEnable)
contentProps.onClick = select;
return (React.createElement("div", { className: cls, style: style },
icon,
selectEnable && React.createElement(Checkbox, { checked: checked, onChange: select, style: { lineHeight: `${rowHeight}px` } }),
React.createElement("div", { className: `${prefix}-item-text`, style: textStyle }, content)));
React.createElement("div", Object.assign({ className: `${prefix}-item-text`, style: textStyle }, contentProps), content)));
}

@@ -11,2 +11,3 @@ import React from 'react';

fixedTopBottom: boolean;
clickRow: boolean;
};

@@ -13,0 +14,0 @@ showColorKeys: Array<string | number>;

@@ -206,7 +206,7 @@ var __rest = (this && this.__rest) || function (s, e) {

this.renderItem = (type) => {
const { prefix, rowHeight } = this.props;
const { prefix, rowHeight, clickRow } = this.props;
const options = this.state[type.toString()];
const { selectedKeys, expandedKeys, width } = this.state;
return options.map(o => {
return (React.createElement(Item, { key: `${o.value}-${o.index}`, prefix: prefix, option: o, parentWidth: width || 100, rowHeight: rowHeight || 22, hasSelected: this.showColorKeys.indexOf(o.value) > -1, expanded: (expandedKeys || []).indexOf(o.value) > -1, checked: (selectedKeys || []).indexOf(o.value) > -1, onChange: this.onChange(o) }));
return (React.createElement(Item, { key: `${o.value}-${o.index}`, prefix: prefix, option: o, clickRow: clickRow, parentWidth: width || 100, rowHeight: rowHeight || 22, hasSelected: this.showColorKeys.indexOf(o.value) > -1, expanded: (expandedKeys || []).indexOf(o.value) > -1, checked: (selectedKeys || []).indexOf(o.value) > -1, onChange: this.onChange(o) }));
});

@@ -296,4 +296,5 @@ };

rowHeight: 22,
fixedTopBottom: true
fixedTopBottom: true,
clickRow: true
};
export default Tree;

@@ -24,2 +24,3 @@ export interface OptionProps {

fixedTopBottom: boolean;
clickRow?: boolean;
}

@@ -45,2 +46,3 @@ export interface State {

onChange?: (type: string, value: boolean) => void;
clickRow?: boolean;
}

@@ -47,0 +49,0 @@ export declare enum Scroll_Type {

@@ -27,3 +27,4 @@ "use strict";

rowHeight = props.rowHeight,
parentWidth = props.parentWidth;
parentWidth = props.parentWidth,
clickRow = props.clickRow;
var text = option.text,

@@ -103,2 +104,5 @@ selectEnable = option.selectEnable,

var contentProps = {};
if (clickRow) contentProps.onClick = expand;
if (selectEnable) contentProps.onClick = select;
return _react["default"].createElement("div", {

@@ -113,6 +117,6 @@ className: cls,

}
}), _react["default"].createElement("div", {
}), _react["default"].createElement("div", Object.assign({
className: "".concat(prefix, "-item-text"),
style: textStyle
}, content));
}, contentProps), content));
}

@@ -371,3 +371,4 @@ "use strict";

prefix = _this$props3.prefix,
rowHeight = _this$props3.rowHeight;
rowHeight = _this$props3.rowHeight,
clickRow = _this$props3.clickRow;

@@ -385,2 +386,3 @@ var options = _this.state[type.toString()];

option: o,
clickRow: clickRow,
parentWidth: width || 100,

@@ -513,5 +515,6 @@ rowHeight: rowHeight || 22,

rowHeight: 22,
fixedTopBottom: true
fixedTopBottom: true,
clickRow: true
};
var _default = Tree;
exports["default"] = _default;
{
"name": "frc-ui",
"version": "0.0.0-beta.27",
"version": "0.0.0-beta.28",
"description": "React Web UI",

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

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