@@ -8,6 +8,10 @@ var _createClass = function () { function defineProperties(target, props) { for
88
99var _react = require ( 'react' ) ;
1010
11+ var _propTypes = require ( 'prop-types' ) ;
12+
13+ var _propTypes2 = _interopRequireDefault ( _propTypes ) ;
14+
1115var _classnames = require ( 'classnames' ) ;
1216
1317var _classnames2 = _interopRequireDefault ( _classnames ) ;
@@ -48,7 +52,7 @@ var JSONField = function (_Component) {
4852 function JSONField ( props ) {
4953 _classCallCheck ( this , JSONField ) ;
5054
51- var _this = _possibleConstructorReturn ( this , Object . getPrototypeOf ( JSONField ) . call ( this , props ) ) ;
55+ var _this = _possibleConstructorReturn ( this , ( JSONField . __proto__ || Object . getPrototypeOf ( JSONField ) ) . call ( this , props ) ) ;
5256
5357 _this . state = {
5458 expanded : true
@@ -121,20 +125,20 @@ var JSONField = function (_Component) {
121125 } , {
122126 key : 'getFieldPath' ,
123127 value : function getFieldPath ( ) {
124- var _props = this . props ;
125- var path = _props . path ;
126- var fieldKey = _props . fieldKey ;
127- var isArrayElement = _props . isArrayElement ;
128+ var _props = this . props ,
129+ path = _props . path ,
130+ fieldKey = _props . fieldKey ,
131+ isArrayElement = _props . isArrayElement ;
128132
129133 return path . concat ( isArrayElement ? parseInt ( fieldKey , 10 ) : fieldKey ) ;
130134 }
131135 } , {
132136 key : 'renderValue' ,
133137 value : function renderValue ( ) {
134- var _props2 = this . props ;
135- var fieldKey = _props2 . fieldKey ;
136- var fieldValue = _props2 . fieldValue ;
137- var path = _props2 . path ;
138+ var _props2 = this . props ,
139+ fieldKey = _props2 . fieldKey ,
140+ fieldValue = _props2 . fieldValue ,
141+ path = _props2 . path ;
138142 var expanded = this . state . expanded ;
139143
140144 var isArray = ( 0 , _lib . getValueType ) ( fieldValue ) === 'array' ;
@@ -213,10 +217,10 @@ var JSONField = function (_Component) {
213217 } , {
214218 key : 'render' ,
215219 value : function render ( ) {
216- var _props3 = this . props ;
217- var fieldKey = _props3 . fieldKey ;
218- var fieldValue = _props3 . fieldValue ;
219- var isArrayElement = _props3 . isArrayElement ;
220+ var _props3 = this . props ,
221+ fieldKey = _props3 . fieldKey ,
222+ fieldValue = _props3 . fieldValue ,
223+ isArrayElement = _props3 . isArrayElement ;
220224 var expanded = this . state . expanded ;
221225
222226 var valueIsPlain = ( 0 , _lib . isPlainValue ) ( fieldValue ) ;
@@ -256,15 +260,15 @@ var JSONField = function (_Component) {
256260} ( _react . Component ) ;
257261
258262JSONField . propTypes = {
259- fieldKey : _react . PropTypes . string ,
260- fieldValue : _react . PropTypes . oneOfType ( [ _react . PropTypes . string , _react . PropTypes . array , _react . PropTypes . object , _react . PropTypes . number , _react . PropTypes . bool ] ) ,
261- path : _react . PropTypes . arrayOf ( _react . PropTypes . string ) ,
262- isArrayElement : _react . PropTypes . bool
263+ fieldKey : _propTypes2 . default . string ,
264+ fieldValue : _propTypes2 . default . oneOfType ( [ _propTypes2 . default . string , _propTypes2 . default . array , _propTypes2 . default . object , _propTypes2 . default . number , _propTypes2 . default . bool ] ) ,
265+ path : _propTypes2 . default . arrayOf ( _propTypes2 . default . string ) ,
266+ isArrayElement : _propTypes2 . default . bool
263267} ;
264268JSONField . defaultProps = {
265269 path : [ ]
266270} ;
267271JSONField . contextTypes = {
268- jsonEditor : _react . PropTypes . object
272+ jsonEditor : _propTypes2 . default . object
269273} ;
270274exports . default = JSONField ;
0 commit comments