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

kbc-react-components

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kbc-react-components - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

21

lib/tree/TreeNode.js

@@ -17,2 +17,6 @@ 'use strict';

var _Protected = require('../Protected');
var _Protected2 = _interopRequireDefault(_Protected);
var TreeNode = _react2['default'].createClass({

@@ -25,2 +29,4 @@ displayName: 'TreeNode',

concealedKeys: ['password'],
render: function render() {

@@ -55,2 +61,14 @@ return _react2['default'].createElement(

renderValue: function renderValue(value, key) {
if (this.concealedKeys.indexOf(key) >= 0) {
return _react2['default'].createElement(
_Protected2['default'],
null,
value
);
} else {
return value;
}
},
renderLeaf: function renderLeaf(value, key) {

@@ -66,6 +84,5 @@ return _react2['default'].createElement(

': ',
value
this.renderValue(value, key)
);
}
});

@@ -72,0 +89,0 @@

4

package.json
{
"name": "kbc-react-components",
"version": "0.0.7",
"version": "0.0.8",
"description": "Keboola UI React Components Library",

@@ -20,3 +20,3 @@ "main": "lib/index.js",

"devDependencies": {
"babel": "~5.4.3",
"babel": "~5.6.10",
"immutable": "^3.7.3"

@@ -23,0 +23,0 @@ },

import React from 'react';
import Immutable from 'immutable';
import Protected from '../Protected';

@@ -9,7 +10,9 @@ const TreeNode = React.createClass({

concealedKeys: ["password"],
render() {
return (
<ul>
{this.props.data.map(this.renderRow, this)}
</ul>
<ul>
{this.props.data.map(this.renderRow, this)}
</ul>
);

@@ -29,4 +32,4 @@ },

<span>
<strong>{key}</strong>
<TreeNode data={value}/>
<strong>{key}</strong>
<TreeNode data={value}/>
</span>

@@ -36,12 +39,21 @@ );

renderValue(value, key) {
if (this.concealedKeys.indexOf(key) >= 0) {
return (
<Protected>{value}</Protected>
);
} else {
return value;
}
},
renderLeaf(value, key) {
return (
<span>
<strong>{key}</strong>: {value}
</span>
<strong>{key}</strong>: {this.renderValue(value, key)}
</span>
);
}
});
export default TreeNode;
export default TreeNode;
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