Skip to content

Commit

Permalink
Released v5.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Jul 8, 2017
1 parent ee85fb0 commit b84621d
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 41 deletions.
4 changes: 3 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
https://github.com/josdejong/jsoneditor


## not yet released, version 5.8.2
## 2017-07-08, version 5.8.2

- Select first option from `modes` instead of `tree` when `mode` is not
configured. Thanks @bag-man.
- Some fixes and improvements in the API of autocompletion.
Thanks @israelito3000.


## 2017-07-03, version 5.8.1
Expand Down
18 changes: 4 additions & 14 deletions dist/jsoneditor-minimalist.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
*
* @author Jos de Jong, <[email protected]>
* @version 5.8.1
* @date 2017-07-03
* @version 5.8.2
* @date 2017-07-08
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
Expand Down Expand Up @@ -215,7 +215,7 @@ return /******/ (function(modules) { // webpackBootstrap
this.options = options || {};
this.json = json || {};

var mode = this.options.mode || 'tree';
var mode = this.options.modes ? this.options.modes[0] : this.options.mode || 'tree';
this.setMode(mode);
};

Expand Down Expand Up @@ -1591,7 +1591,7 @@ return /******/ (function(modules) { // webpackBootstrap
// Activate autocomplete
setTimeout(function (hnode, element) {
if (element.innerText.length > 0) {
var result = this.options.autocomplete.getOptions(element.innerText, editor.get(), jsonElementType);
var result = this.options.autocomplete.getOptions(element.innerText, hnode.getPath(), jsonElementType, hnode.editor);
if (typeof result.then === 'function') {
// probably a promise
if (result.then(function (obj) {
Expand Down Expand Up @@ -4486,16 +4486,6 @@ return /******/ (function(modules) { // webpackBootstrap
return (this.parent ? this.parent.getLevel() + 1 : 0);
};

/**
* Get path of the root node till the current node
* @return {Node[]} Returns an array with nodes
*/
Node.prototype.getNodePath = function() {
var path = this.parent ? this.parent.getNodePath() : [];
path.push(this);
return path;
};

/**
* Create a clone of a node
* The complete state of a clone is copied, including whether it is expanded or
Expand Down
2 changes: 1 addition & 1 deletion dist/jsoneditor-minimalist.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/jsoneditor-minimalist.min.js

Large diffs are not rendered by default.

18 changes: 4 additions & 14 deletions dist/jsoneditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
*
* @author Jos de Jong, <[email protected]>
* @version 5.8.1
* @date 2017-07-03
* @version 5.8.2
* @date 2017-07-08
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
Expand Down Expand Up @@ -215,7 +215,7 @@ return /******/ (function(modules) { // webpackBootstrap
this.options = options || {};
this.json = json || {};

var mode = this.options.mode || 'tree';
var mode = this.options.modes ? this.options.modes[0] : this.options.mode || 'tree';
this.setMode(mode);
};

Expand Down Expand Up @@ -9567,7 +9567,7 @@ return /******/ (function(modules) { // webpackBootstrap
// Activate autocomplete
setTimeout(function (hnode, element) {
if (element.innerText.length > 0) {
var result = this.options.autocomplete.getOptions(element.innerText, editor.get(), jsonElementType);
var result = this.options.autocomplete.getOptions(element.innerText, hnode.getPath(), jsonElementType, hnode.editor);
if (typeof result.then === 'function') {
// probably a promise
if (result.then(function (obj) {
Expand Down Expand Up @@ -12462,16 +12462,6 @@ return /******/ (function(modules) { // webpackBootstrap
return (this.parent ? this.parent.getLevel() + 1 : 0);
};

/**
* Get path of the root node till the current node
* @return {Node[]} Returns an array with nodes
*/
Node.prototype.getNodePath = function() {
var path = this.parent ? this.parent.getNodePath() : [];
path.push(this);
return path;
};

/**
* Create a clone of a node
* The complete state of a clone is copied, including whether it is expanded or
Expand Down
2 changes: 1 addition & 1 deletion dist/jsoneditor.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dist/jsoneditor.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsoneditor",
"version": "5.8.1",
"version": "5.8.2",
"main": "./index",
"description": "A web-based tool to view, edit, format, and validate JSON",
"tags": [
Expand Down

0 comments on commit b84621d

Please sign in to comment.