Socket
Socket
Sign inDemoInstall

react-json-editor-ajrm

Package Overview
Dependencies
13
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.3 to 1.0.4

8

jsoninput.js

@@ -22,2 +22,3 @@ import React, { Component } from 'react';

this.state = {
preText : '',
markupText : '',

@@ -57,3 +58,3 @@ plainText : '',

backgroundColor : 'colors' in this.props ? 'background' in this.props.colors ? this.props.colors.background : '#1E1E1E' : '#1E1E1E',
borderBottom : '2px solid #000000'
borderBottom : '2px solid ' + ( 'colors' in this.props ? 'border' in this.props.colors ? this.props.colors.border : '#000000' : '#000000' )
}}

@@ -578,2 +579,3 @@ >

componentDidUpdate(){
this.showPlaceholder();
function createRange(node, chars, range) {

@@ -649,6 +651,7 @@ if (!range) {

showPlaceholder(){
const { preText } = this.state;
const _markupText = this.state.markupText;
if(_markupText!=='') return;
if(!('placeholder' in this.props)) return;
const { placeholder } = this.props;
if(preText===placeholder) return;
if(typeof placeholder !== 'object') return console.error('placeholder in props is not an object:',placeholder);

@@ -664,2 +667,3 @@ let

...this.state,
preText : placeholder,
plainText : spaceText,

@@ -666,0 +670,0 @@ markupText : markupText,

{
"name": "react-json-editor-ajrm",
"version": "1.0.3",
"version": "1.0.4",
"description": "A stylish, modular, react component for viewing, editing, json and more!",

@@ -5,0 +5,0 @@ "author": "andrew.redican.mejia@gmail.com",

@@ -26,4 +26,4 @@ # react-json-editor-ajrm

## Latest Release Notes
1. Light theme now included in example file.
2. Tomorrow a website will be released so that you can interact with this component live.
1. Fixed: Component now re-renders when `placeholder` property is updated.
2. Now accepts `border` property for any color theme to specify the color of the border separating the status bar and the code viewer.

@@ -30,0 +30,0 @@ ## Set Up

@@ -22,2 +22,3 @@ import React, { Component } from 'react';

this.state = {
preText : '',
markupText : '',

@@ -57,3 +58,3 @@ plainText : '',

backgroundColor : 'colors' in this.props ? 'background' in this.props.colors ? this.props.colors.background : '#1E1E1E' : '#1E1E1E',
borderBottom : '2px solid #000000'
borderBottom : '2px solid ' + ( 'colors' in this.props ? 'border' in this.props.colors ? this.props.colors.border : '#000000' : '#000000' )
}}

@@ -578,2 +579,3 @@ >

componentDidUpdate(){
this.showPlaceholder();
function createRange(node, chars, range) {

@@ -649,6 +651,7 @@ if (!range) {

showPlaceholder(){
const { preText } = this.state;
const _markupText = this.state.markupText;
if(_markupText!=='') return;
if(!('placeholder' in this.props)) return;
const { placeholder } = this.props;
if(preText===placeholder) return;
if(typeof placeholder !== 'object') return console.error('placeholder in props is not an object:',placeholder);

@@ -664,2 +667,3 @@ let

...this.state,
preText : placeholder,
plainText : spaceText,

@@ -666,0 +670,0 @@ markupText : markupText,

@@ -24,2 +24,3 @@ import React, { Component } from 'react';

background : '#1E1E1E',
border : '#000000',
string : '#CE8453',

@@ -36,2 +37,3 @@ number : '#B5CE9F',

background : '#E3E9EA0D',
border : '#00000026',
string : '#FA7921',

@@ -38,0 +40,0 @@ number : '#70CE35',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc