Publish v5.26.1
This commit is contained in:
parent
2cd9cc168a
commit
db8652baa6
|
@ -3,7 +3,7 @@
|
|||
https://github.com/josdejong/jsoneditor
|
||||
|
||||
|
||||
## not yet released, version 5.26.1
|
||||
## 2018-11-13, version 5.26.1
|
||||
|
||||
- Fixed `.update()` throwing an exception when replacing a JSON object
|
||||
with `null`. Thanks @DullReferenceException.
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
|
||||
*
|
||||
* @author Jos de Jong, <wjosdejong@gmail.com>
|
||||
* @version 5.26.0
|
||||
* @date 2018-11-12
|
||||
* @version 5.26.1
|
||||
* @date 2018-11-13
|
||||
*/
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
|
@ -2632,7 +2632,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (event.type === 'mousedown') {
|
||||
// filter mouse events in the contents part of the editor (not the main menu)
|
||||
if (event.type === 'mousedown' && util.hasParentNode(event.target, editor.content)) {
|
||||
this.deselect();
|
||||
|
||||
if (node && event.target === node.dom.drag) {
|
||||
|
@ -5172,6 +5173,25 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return '';
|
||||
};
|
||||
|
||||
/**
|
||||
* Test whether an element has the provided parent node somewhere up the node tree.
|
||||
* @param {Element} elem
|
||||
* @param {Element} parent
|
||||
* @return {boolean}
|
||||
*/
|
||||
exports.hasParentNode = function (elem, parent) {
|
||||
var e = elem ? elem.parentNode : undefined;
|
||||
|
||||
while (e) {
|
||||
if (e === parent) {
|
||||
return true;
|
||||
}
|
||||
e = e.parentNode;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the version of Internet Explorer or a -1
|
||||
* (indicating the use of another browser).
|
||||
|
@ -6994,7 +7014,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
/**
|
||||
* Find child node by serializable path
|
||||
* @param {Array<String>} path
|
||||
* @param {Array<String>} path
|
||||
*/
|
||||
Node.prototype.findNodeByPath = function (path) {
|
||||
if (!path) {
|
||||
|
@ -7036,7 +7056,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
/**
|
||||
* @typedef {{value: String|Object|Number|Boolean, path: Array.<String|Number>}} SerializableNode
|
||||
*
|
||||
*
|
||||
* Returns serializable representation for the node
|
||||
* @return {SerializableNode}
|
||||
*/
|
||||
|
@ -8319,7 +8339,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
}
|
||||
else if (this.type === 'object') {
|
||||
if (typeof json !== 'object') {
|
||||
if (typeof json !== 'object' || !json) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -9366,7 +9386,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
//Locating the schema of the node and checking for any enum type
|
||||
if(this.editor && this.editor.options) {
|
||||
// find the part of the json schema matching this nodes path
|
||||
this.schema = this.editor.options.schema
|
||||
this.schema = this.editor.options.schema
|
||||
? Node._findSchema(this.editor.options.schema, this.getPath())
|
||||
: null;
|
||||
if (this.schema) {
|
||||
|
@ -9807,7 +9827,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
};
|
||||
// For leaf values, include value
|
||||
if (!this._hasChilds() &&element === this.dom.value) {
|
||||
info.value = this.getValue();
|
||||
info.value = this.getValue();
|
||||
}
|
||||
this.editor.options.onEvent(info, event);
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -24,8 +24,8 @@
|
|||
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
|
||||
*
|
||||
* @author Jos de Jong, <wjosdejong@gmail.com>
|
||||
* @version 5.26.0
|
||||
* @date 2018-11-12
|
||||
* @version 5.26.1
|
||||
* @date 2018-11-13
|
||||
*/
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
|
@ -31274,7 +31274,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (event.type === 'mousedown') {
|
||||
// filter mouse events in the contents part of the editor (not the main menu)
|
||||
if (event.type === 'mousedown' && util.hasParentNode(event.target, editor.content)) {
|
||||
this.deselect();
|
||||
|
||||
if (node && event.target === node.dom.drag) {
|
||||
|
@ -33814,6 +33815,25 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return '';
|
||||
};
|
||||
|
||||
/**
|
||||
* Test whether an element has the provided parent node somewhere up the node tree.
|
||||
* @param {Element} elem
|
||||
* @param {Element} parent
|
||||
* @return {boolean}
|
||||
*/
|
||||
exports.hasParentNode = function (elem, parent) {
|
||||
var e = elem ? elem.parentNode : undefined;
|
||||
|
||||
while (e) {
|
||||
if (e === parent) {
|
||||
return true;
|
||||
}
|
||||
e = e.parentNode;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the version of Internet Explorer or a -1
|
||||
* (indicating the use of another browser).
|
||||
|
@ -35636,7 +35656,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
/**
|
||||
* Find child node by serializable path
|
||||
* @param {Array<String>} path
|
||||
* @param {Array<String>} path
|
||||
*/
|
||||
Node.prototype.findNodeByPath = function (path) {
|
||||
if (!path) {
|
||||
|
@ -35678,7 +35698,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
/**
|
||||
* @typedef {{value: String|Object|Number|Boolean, path: Array.<String|Number>}} SerializableNode
|
||||
*
|
||||
*
|
||||
* Returns serializable representation for the node
|
||||
* @return {SerializableNode}
|
||||
*/
|
||||
|
@ -36961,7 +36981,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
}
|
||||
else if (this.type === 'object') {
|
||||
if (typeof json !== 'object') {
|
||||
if (typeof json !== 'object' || !json) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -38008,7 +38028,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
//Locating the schema of the node and checking for any enum type
|
||||
if(this.editor && this.editor.options) {
|
||||
// find the part of the json schema matching this nodes path
|
||||
this.schema = this.editor.options.schema
|
||||
this.schema = this.editor.options.schema
|
||||
? Node._findSchema(this.editor.options.schema, this.getPath())
|
||||
: null;
|
||||
if (this.schema) {
|
||||
|
@ -38449,7 +38469,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
};
|
||||
// For leaf values, include value
|
||||
if (!this._hasChilds() &&element === this.dom.value) {
|
||||
info.value = this.getValue();
|
||||
info.value = this.getValue();
|
||||
}
|
||||
this.editor.options.onEvent(info, event);
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "jsoneditor",
|
||||
"version": "5.26.0",
|
||||
"version": "5.26.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "jsoneditor",
|
||||
"version": "5.26.0",
|
||||
"version": "5.26.1",
|
||||
"main": "./index",
|
||||
"description": "A web-based tool to view, edit, format, and validate JSON",
|
||||
"tags": [
|
||||
|
|
Loading…
Reference in New Issue