@keboola/indigo-ui
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -11,4 +11,2 @@ 'use strict'; | ||
var _immutable = require('immutable'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -24,17 +22,22 @@ | ||
render: function render() { | ||
var lines = this.props.text.split('\n'); | ||
var result = []; | ||
lines.forEach(function (value, index) { | ||
result.push(_react2.default.createElement( | ||
'span', | ||
{ key: index }, | ||
value | ||
)); | ||
if (index < lines.length - 1) { | ||
result.push(_react2.default.createElement('br', { key: index + '-br' })); | ||
} | ||
}); | ||
return _react2.default.createElement( | ||
'span', | ||
null, | ||
this.lines() | ||
result | ||
); | ||
}, | ||
lines: function lines() { | ||
return (0, _immutable.List)(this.props.text.split("\n")).map(function (value, index) { | ||
return _react2.default.createElement( | ||
'span', | ||
{ key: index }, | ||
value | ||
); | ||
}).interpose(_react.DOM.br()); | ||
} | ||
}); |
@@ -15,2 +15,7 @@ "use strict"; | ||
displayName: "Protected", | ||
propTypes: { | ||
children: _react.PropTypes.any | ||
}, | ||
getInitialState: function getInitialState() { | ||
@@ -17,0 +22,0 @@ return { |
@@ -19,4 +19,3 @@ 'use strict'; | ||
var LEFT = 'left', | ||
RIGHT = 'right'; | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
@@ -28,4 +27,3 @@ var RefreshIcon = _react2.default.createClass({ | ||
isLoading: _react2.default.PropTypes.bool.isRequired, | ||
title: _react2.default.PropTypes.string, | ||
loaderPosition: _react2.default.PropTypes.oneOf([LEFT, RIGHT]) | ||
title: _react2.default.PropTypes.string | ||
}, | ||
@@ -35,18 +33,16 @@ | ||
return { | ||
title: 'Refresh', | ||
loaderPosition: RIGHT | ||
title: 'Refresh' | ||
}; | ||
}, | ||
render: function render() { | ||
var _props = this.props, | ||
isLoading = _props.isLoading, | ||
title = _props.title, | ||
remaining = _objectWithoutProperties(_props, ['isLoading', 'title']); | ||
return _react2.default.createElement( | ||
'span', | ||
{ title: this.props.title }, | ||
this.props.isLoading ? this.loader() : this.refreshIcon() | ||
{ title: title }, | ||
isLoading ? _react2.default.createElement(_Loader2.default, null) : _react2.default.createElement('span', _extends({}, remaining, { className: 'kbc-refresh kbc-icon-cw' })) | ||
); | ||
}, | ||
loader: function loader() { | ||
return _react2.default.createElement(_Loader2.default, null); | ||
}, | ||
refreshIcon: function refreshIcon() { | ||
return _react2.default.createElement('span', _extends({}, this.props, { className: 'kbc-refresh kbc-icon-cw' })); | ||
} | ||
@@ -53,0 +49,0 @@ }); |
@@ -34,3 +34,3 @@ 'use strict'; | ||
null, | ||
this.props.data.map(this.renderRow, this) | ||
this.props.data.map(this.renderRow, this).valueSeq() | ||
); | ||
@@ -41,3 +41,3 @@ }, | ||
'li', | ||
null, | ||
{ key: key }, | ||
_immutable2.default.Iterable.isIterable(value) ? this.renderNode(value, key) : this.renderLeaf(value, key) | ||
@@ -44,0 +44,0 @@ ); |
{ | ||
"name": "@keboola/indigo-ui", | ||
"description": "Keboola UI library", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"dependencies": { | ||
@@ -36,3 +36,4 @@ "bootstrap": "^3.3.7", | ||
"react-dom": "^15.6.1", | ||
"react-scripts": "^1.0.17" | ||
"react-scripts": "^1.0.17", | ||
"react-test-renderer": "^15.6" | ||
}, | ||
@@ -39,0 +40,0 @@ "peerDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
316524
64
351
26