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.16 to 0.7.17

src/editors/checkbox.js

2

bower.json
{
"name": "json-editor",
"version": "0.7.16",
"version": "0.7.17",
"authors": [

@@ -5,0 +5,0 @@ "Jeremy Dorn <jeremy@jeremydorn.com>"

@@ -39,2 +39,3 @@ 'use strict';

'src/editors/upload.js',
'src/editors/checkbox.js',

@@ -41,0 +42,0 @@ // All the themes and iconlibs

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

"description": "JSON Schema based editor",
"version": "0.7.16",
"version": "0.7.17",
"main": "dist/jsoneditor.js",

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

@@ -636,2 +636,13 @@ JSON Editor

#### Booleans
The default boolean editor is a select box with options "true" and "false". To use a checkbox instead, set the format to `checkbox`.
```json
{
"type": "boolean",
"format": "checkbox"
}
```
#### Arrays

@@ -970,3 +981,3 @@

"value": "{{item.text}}"
]}
}]
}

@@ -973,0 +984,0 @@ }

@@ -191,5 +191,10 @@ // Set the default theme

});
// Use the select editor for all boolean values
// Boolean editors
JSONEditor.defaults.resolvers.unshift(function(schema) {
if(schema.type === 'boolean') {
// If explicitly set to 'checkbox', use that
if(schema.format === "checkbox" || (schema.options && schema.options.checkbox)) {
return "checkbox";
}
// Otherwise, default to select menu
return "select";

@@ -196,0 +201,0 @@ }

@@ -261,3 +261,15 @@ /**

if(this.header) {
this.header.textContent = this.getHeaderText();
// If the header has children, only update the text node's value
if(this.header.children.length) {
for(var i=0; i<this.header.childNodes.length; i++) {
if(this.header.childNodes[i].nodeType===3) {
this.header.childNodes[i].nodeValue = this.getHeaderText();
break;
}
}
}
// Otherwise, just update the entire node
else {
this.header.textContent = this.getHeaderText();
}
}

@@ -264,0 +276,0 @@ },

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

/*! JSON Editor v0.7.16 - JSON Schema -> HTML Editor
/*! JSON Editor v0.7.17 - JSON Schema -> HTML Editor
* By Jeremy Dorn - https://github.com/jdorn/json-editor/
* Released under the MIT license
*
* Date: 2015-02-22
* Date: 2015-03-07
*/

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

@@ -182,3 +182,3 @@ JSONEditor.AbstractTheme = Class.extend({

var el = document.createElement('p');
el.appendChild(document.createTextNode(text));
el.innerHTML = text;
return el;

@@ -200,2 +200,3 @@ },

var el = document.createElement('button');
el.type = 'button';
this.setButtonText(el,text,icon,title);

@@ -202,0 +203,0 @@ return el;

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

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