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

json-editor

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-editor - npm Package Compare versions

Comparing version 0.7.25 to 0.7.26

2

package.json

@@ -5,3 +5,3 @@ {

"description": "JSON Schema based editor",
"version": "0.7.25",
"version": "0.7.26",
"main": "dist/jsoneditor.js",

@@ -8,0 +8,0 @@ "author": {

@@ -19,8 +19,4 @@ JSON Editor

JSON Schema has the following dependencies:
JSON Editor has no dependencies. It only needs a modern browser (tested in Chrome and Firefox).
* [math.js](http://mathjs.org/) for floating point math
It needs a modern browser (tested in Chrome and Firefox).
### Optional Requirements

@@ -38,2 +34,3 @@

* [Selectize](http://brianreavis.github.io/selectize.js/) for nicer Select & Array boxes
* [math.js](http://mathjs.org/) for more accurate floating point math (multipleOf, divisibleBy, etc.)

@@ -175,2 +172,7 @@ Usage

</tr>
<tr>
<td>display_required_only</td>
<td>If <code>true</code>, only required properties will be included by default.</td>
<td><code>false</code></td>
</tr>
</tbody>

@@ -425,3 +427,5 @@ </table>

"rel": "comments",
"href": "/posts/{{self}}/comments/"
"href": "/posts/{{self}}/comments/",
// Optional - set CSS classes for the link
"class": "comment-link open-in-modal primary-text"
}

@@ -428,0 +432,0 @@ ]

@@ -200,3 +200,7 @@ // Set the default theme

*/
button_collapse: "Collapse"
button_collapse: "Collapse",
/**
* Title on Expand buttons
*/
button_expand: "Expand"
};

@@ -203,0 +207,0 @@

@@ -100,2 +100,3 @@ /**

if(Array.isArray(path)) {
if(path.length<2) continue;
path_parts = [path[0]].concat(path[1].split('.'));

@@ -251,2 +252,4 @@ }

}
if(data.class) link.className = link.className + ' ' + data.class;

@@ -253,0 +256,0 @@ return holder;

@@ -581,3 +581,3 @@ JSONEditor.defaults.editors.array = JSONEditor.AbstractEditor.extend({

self.controls.style.display = controls_display;
self.setButtonText(this,'','collapse','Collapse');
self.setButtonText(this,'','collapse',self.translate('button_collapse'));
}

@@ -590,3 +590,3 @@ else {

if(self.panel) self.panel.style.display = 'none';
self.setButtonText(this,'','expand','Expand');
self.setButtonText(this,'','expand',self.translate('button_expand'));
}

@@ -593,0 +593,0 @@ });

@@ -52,2 +52,4 @@ // Multiple Editor (for when `type` is an array)

}
var current_value = self.getValue();

@@ -58,4 +60,2 @@ self.type = i;

var current_value = self.getValue();
$each(self.editors,function(type,editor) {

@@ -62,0 +62,0 @@ if(!editor) return;

@@ -238,3 +238,15 @@ JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({

else {
this.defaultProperties = this.schema.defaultProperties || Object.keys(this.schema.properties);
if(!this.schema.defaultProperties) {
if(this.jsoneditor.options.display_required_only || this.options.display_required_only) {
this.schema.defaultProperties = [];
$each(this.schema.properties, function(k,s) {
if(self.isRequired({key: k, schema: s})) {
self.schema.defaultProperties.push(k);
}
});
}
else {
self.schema.defaultProperties = Object.keys(self.schema.properties);
}
}

@@ -244,3 +256,3 @@ // Increase the grid width to account for padding

$each(this.defaultProperties, function(i,key) {
$each(this.schema.defaultProperties, function(i,key) {
self.addObjectProperty(key, true);

@@ -400,3 +412,3 @@

this.collapsed = false;
this.toggle_button = this.getButton('','collapse','Collapse');
this.toggle_button = this.getButton('','collapse',this.translate('button_collapse'));
this.title_controls.appendChild(this.toggle_button);

@@ -409,3 +421,3 @@ this.toggle_button.addEventListener('click',function(e) {

self.collapsed = false;
self.setButtonText(self.toggle_button,'','collapse','Collapse');
self.setButtonText(self.toggle_button,'','collapse',self.translate('button_collapse'));
}

@@ -415,3 +427,3 @@ else {

self.collapsed = true;
self.setButtonText(self.toggle_button,'','expand','Expand');
self.setButtonText(self.toggle_button,'','expand',self.translate('button_expand'));
}

@@ -418,0 +430,0 @@ });

@@ -405,3 +405,3 @@ JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({

self.panel.style.display = '';
self.setButtonText(this,'','collapse','Collapse');
self.setButtonText(this,'','collapse',this.translate('button_collapse'));
}

@@ -411,3 +411,3 @@ else {

self.panel.style.display = 'none';
self.setButtonText(this,'','expand','Expand');
self.setButtonText(this,'','expand',this.translate('button_expand'));
}

@@ -414,0 +414,0 @@ });

@@ -1,6 +0,6 @@

/*! JSON Editor v0.7.25 - JSON Schema -> HTML Editor
/*! JSON Editor v0.7.26 - JSON Schema -> HTML Editor
* By Jeremy Dorn - https://github.com/jdorn/json-editor/
* Released under the MIT license
*
* Date: 2016-04-12
* Date: 2016-06-21
*/

@@ -7,0 +7,0 @@

@@ -276,3 +276,3 @@ var matchKey = (function () {

while (elem && elem !== document) {
if (matchKey) {
if (elem[matchKey]) {
if (elem[matchKey](selector)) {

@@ -279,0 +279,0 @@ return elem;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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