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

react-json-view-lite

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-json-view-lite - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

9

dist/DataRenderer.d.ts

@@ -29,3 +29,3 @@ import * as React from 'react';

export interface ExpandableRenderProps {
field?: string;
field: string | undefined;
value: Array<any> | object;

@@ -41,2 +41,9 @@ data: Array<[string | undefined, any]>;

}
export interface EmptyRenderProps {
field: string | undefined;
openBracket: string;
closeBracket: string;
lastElement: boolean;
style: StyleProps;
}
export default function DataRender(props: JsonRenderProps<any>): React.JSX.Element;

@@ -121,5 +121,26 @@ var React = require('react');

}
function JsonObject(_ref2) {
function EmptyObject(_ref2) {
let {
field,
openBracket,
closeBracket,
lastElement,
style
} = _ref2;
return /*#__PURE__*/React.createElement("div", {
className: style.basicChildStyle,
role: 'listitem'
}, field && /*#__PURE__*/React.createElement("span", {
className: style.label
}, field, ":"), /*#__PURE__*/React.createElement("span", {
className: style.punctuation
}, openBracket), /*#__PURE__*/React.createElement("span", {
className: style.punctuation
}, closeBracket), !lastElement && /*#__PURE__*/React.createElement("span", {
className: style.punctuation
}, ","));
}
function JsonObject(_ref3) {
let {
field,
value,

@@ -131,3 +152,12 @@ style,

level
} = _ref2;
} = _ref3;
if (Object.keys(value).length === 0) {
return EmptyObject({
field,
openBracket: '{',
closeBracket: '}',
lastElement,
style
});
}
return ExpandableObject({

@@ -146,3 +176,3 @@ field,

}
function JsonArray(_ref3) {
function JsonArray(_ref4) {
let {

@@ -156,3 +186,12 @@ field,

clickToExpandNode
} = _ref3;
} = _ref4;
if (value.length === 0) {
return EmptyObject({
field,
openBracket: '[',
closeBracket: ']',
lastElement,
style
});
}
return ExpandableObject({

@@ -171,3 +210,3 @@ field,

}
function JsonPrimitiveValue(_ref4) {
function JsonPrimitiveValue(_ref5) {
let {

@@ -178,3 +217,3 @@ field,

lastElement
} = _ref4;
} = _ref5;
let stringValue = value;

@@ -181,0 +220,0 @@ let valueStyle = style.otherValue;

@@ -121,5 +121,26 @@ import { useState, useRef, createElement, useEffect } from 'react';

}
function JsonObject(_ref2) {
function EmptyObject(_ref2) {
let {
field,
openBracket,
closeBracket,
lastElement,
style
} = _ref2;
return /*#__PURE__*/createElement("div", {
className: style.basicChildStyle,
role: 'listitem'
}, field && /*#__PURE__*/createElement("span", {
className: style.label
}, field, ":"), /*#__PURE__*/createElement("span", {
className: style.punctuation
}, openBracket), /*#__PURE__*/createElement("span", {
className: style.punctuation
}, closeBracket), !lastElement && /*#__PURE__*/createElement("span", {
className: style.punctuation
}, ","));
}
function JsonObject(_ref3) {
let {
field,
value,

@@ -131,3 +152,12 @@ style,

level
} = _ref2;
} = _ref3;
if (Object.keys(value).length === 0) {
return EmptyObject({
field,
openBracket: '{',
closeBracket: '}',
lastElement,
style
});
}
return ExpandableObject({

@@ -146,3 +176,3 @@ field,

}
function JsonArray(_ref3) {
function JsonArray(_ref4) {
let {

@@ -156,3 +186,12 @@ field,

clickToExpandNode
} = _ref3;
} = _ref4;
if (value.length === 0) {
return EmptyObject({
field,
openBracket: '[',
closeBracket: ']',
lastElement,
style
});
}
return ExpandableObject({

@@ -171,3 +210,3 @@ field,

}
function JsonPrimitiveValue(_ref4) {
function JsonPrimitiveValue(_ref5) {
let {

@@ -178,3 +217,3 @@ field,

lastElement
} = _ref4;
} = _ref5;
let stringValue = value;

@@ -181,0 +220,0 @@ let valueStyle = style.otherValue;

2

package.json
{
"name": "react-json-view-lite",
"version": "1.4.0",
"version": "1.5.0",
"description": "JSON viewer component for React focused on performance for large volume input while still providing few customiziation features",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/AnyRoad/react-json-view-lite",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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