diff --git a/README.md b/README.md
index 9b9d3b7..9d592d5 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
# JSON Editor
-https://github.com/josdejong/jsoneditor
-http://jsoneditoronline.org/
+
+Website: http://jsoneditoronline.org/
+Github: https://github.com/josdejong/jsoneditor
### Description
diff --git a/examples/05_custom_fields_editable.html b/examples/05_custom_fields_editable.html
new file mode 100644
index 0000000..28b4ab2
--- /dev/null
+++ b/examples/05_custom_fields_editable.html
@@ -0,0 +1,56 @@
+
+
+
+ JSONEditor | Basic usage
+
+
+
+
+
+
+ In this example:
+
+
+ - the field
_id
and its value are read-only
+ - the field
name
is read-only but has an editable value
+ - the field
age
and its value are editable
+
+
+
+
+
+
+
diff --git a/jsoneditor.js b/jsoneditor.js
index f57cc96..84d3757 100644
--- a/jsoneditor.js
+++ b/jsoneditor.js
@@ -24,7 +24,7 @@
*
* @author Jos de Jong,
* @version 3.1.0-SNAPSHOT
- * @date 2014-07-26
+ * @date 2014-07-27
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
@@ -348,7 +348,7 @@ return /******/ (function(modules) { // webpackBootstrap
/* 1 */
/***/ function(module, exports, __webpack_require__) {
- var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(4), __webpack_require__(5), __webpack_require__(6), __webpack_require__(7), __webpack_require__(8), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (Highlighter, History, SearchBox, Node, modeswitcher, util) {
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(5), __webpack_require__(6), __webpack_require__(7), __webpack_require__(8), __webpack_require__(4), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (Highlighter, History, SearchBox, Node, modeswitcher, util) {
// create a mixin with the functions for tree mode
var treemode = {};
@@ -1074,7 +1074,7 @@ return /******/ (function(modules) { // webpackBootstrap
/* 2 */
/***/ function(module, exports, __webpack_require__) {
- var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(8), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (modeswitcher, util) {
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(4), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (modeswitcher, util) {
// create a mixin with the functions for text mode
var textmode = {};
@@ -1871,6 +1871,115 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
/* 4 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (ContextMenu) {
+
+ /**
+ * Create a select box to be used in the editor menu's, which allows to switch mode
+ * @param {Object} editor
+ * @param {String[]} modes Available modes: 'code', 'form', 'text', 'tree', 'view'
+ * @param {String} current Available modes: 'code', 'form', 'text', 'tree', 'view'
+ * @returns {HTMLElement} box
+ */
+ function createModeSwitcher(editor, modes, current) {
+ // TODO: decouple mode switcher from editor
+
+ /**
+ * Switch the mode of the editor
+ * @param {String} mode
+ */
+ function switchMode(mode) {
+ // switch mode
+ editor.setMode(mode);
+
+ // restore focus on mode box
+ var modeBox = editor.dom && editor.dom.modeBox;
+ if (modeBox) {
+ modeBox.focus();
+ }
+ }
+
+ // available modes
+ var availableModes = {
+ code: {
+ 'text': 'Code',
+ 'title': 'Switch to code highlighter',
+ 'click': function () {
+ switchMode('code')
+ }
+ },
+ form: {
+ 'text': 'Form',
+ 'title': 'Switch to form editor',
+ 'click': function () {
+ switchMode('form');
+ }
+ },
+ text: {
+ 'text': 'Text',
+ 'title': 'Switch to plain text editor',
+ 'click': function () {
+ switchMode('text');
+ }
+ },
+ tree: {
+ 'text': 'Tree',
+ 'title': 'Switch to tree editor',
+ 'click': function () {
+ switchMode('tree');
+ }
+ },
+ view: {
+ 'text': 'View',
+ 'title': 'Switch to tree view',
+ 'click': function () {
+ switchMode('view');
+ }
+ }
+ };
+
+ // list the selected modes
+ var items = [];
+ for (var i = 0; i < modes.length; i++) {
+ var mode = modes[i];
+ var item = availableModes[mode];
+ if (!item) {
+ throw new Error('Unknown mode "' + mode + '"');
+ }
+
+ item.className = 'type-modes' + ((current == mode) ? ' selected' : '');
+ items.push(item);
+ }
+
+ // retrieve the title of current mode
+ var currentMode = availableModes[current];
+ if (!currentMode) {
+ throw new Error('Unknown mode "' + current + '"');
+ }
+ var currentTitle = currentMode.text;
+
+ // create the html element
+ var box = document.createElement('button');
+ box.className = 'modes separator';
+ box.innerHTML = currentTitle + ' ▾';
+ box.title = 'Switch editor mode';
+ box.onclick = function () {
+ var menu = new ContextMenu(items);
+ menu.show(box);
+ };
+
+ return box;
+ }
+
+ return {
+ create: createModeSwitcher
+ }
+ }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+
+
+/***/ },
+/* 5 */
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
@@ -1962,7 +2071,7 @@ return /******/ (function(modules) { // webpackBootstrap
}.call(exports, __webpack_require__, exports, module)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/***/ },
-/* 5 */
+/* 6 */
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (util) {
@@ -2191,7 +2300,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 6 */
+/* 7 */
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
@@ -2490,7 +2599,7 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ },
-/* 7 */
+/* 8 */
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9), __webpack_require__(10), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (ContextMenu, appendNodeFactory, util) {
@@ -2520,8 +2629,42 @@ return /******/ (function(modules) { // webpackBootstrap
this.setField('');
this.setValue(null);
}
+
+ this._setEditability(editor);
}
+ /**
+ * Determine whether the field and/or value of this node are editable
+ * @param editor
+ * @private
+ */
+ Node.prototype._setEditability = function (editor) {
+ this.editable = {
+ field: true,
+ value: true
+ };
+
+ if (editor) {
+ this.editable.field = (this.editor.options.mode != 'view' && this.editor.options.mode != 'form');
+ this.editable.value = (this.editor.options.mode != 'view');
+
+ if (typeof editor.options.editable === 'function') {
+ var editable = editor.options.editable({
+ field: this.field
+ });
+
+ if (typeof editable === 'boolean') {
+ this.editable.field = editable;
+ this.editable.value = editable;
+ }
+ else {
+ if (typeof editable.field === 'boolean') this.editable.field = editable.field;
+ if (typeof editable.value === 'boolean') this.editable.value = editable.value;
+ }
+ }
+ }
+ };
+
/**
* Set parent node
* @param {Node} parent
@@ -3472,7 +3615,7 @@ return /******/ (function(modules) { // webpackBootstrap
var t = (this.type == 'auto') ? util.type(v) : this.type;
var isUrl = (t == 'string' && util.isUrl(v));
var color = '';
- if (isUrl && !this.editor.mode.edit) {
+ if (isUrl && !this.editable.value) { // TODO: when to apply this?
color = '';
}
else if (t == 'string') {
@@ -3519,7 +3662,7 @@ return /******/ (function(modules) { // webpackBootstrap
domValue.title = this.type + ' containing ' + count + ' items';
}
else if (t == 'string' && util.isUrl(v)) {
- if (this.editor.mode.edit) {
+ if (this.editable.value) {
domValue.title = 'Ctrl+Click or Ctrl+Enter to open url in new window';
}
}
@@ -3647,15 +3790,17 @@ return /******/ (function(modules) { // webpackBootstrap
dom.tr = document.createElement('tr');
dom.tr.node = this;
- if (this.editor.mode.edit) {
- // create draggable area
+ if (this.editor.options.mode != 'view' && this.editor.options.mode != 'form') {
var tdDrag = document.createElement('td');
- if (this.parent) {
- var domDrag = document.createElement('button');
- dom.drag = domDrag;
- domDrag.className = 'dragarea';
- domDrag.title = 'Drag to move this field (Alt+Shift+Arrows)';
- tdDrag.appendChild(domDrag);
+ if (this.editable.field) {
+ // create draggable area
+ if (this.parent) {
+ var domDrag = document.createElement('button');
+ dom.drag = domDrag;
+ domDrag.className = 'dragarea';
+ domDrag.title = 'Drag to move this field (Alt+Shift+Arrows)';
+ tdDrag.appendChild(domDrag);
+ }
}
dom.tr.appendChild(tdDrag);
@@ -3980,9 +4125,9 @@ return /******/ (function(modules) { // webpackBootstrap
// update field
var domField = this.dom.field;
if (domField) {
- if (this.fieldEditable == true) {
+ if (this.fieldEditable) {
// parent is an object
- domField.contentEditable = this.editor.mode.edit;
+ domField.contentEditable = this.editable.field;
domField.spellcheck = false;
domField.className = 'field';
}
@@ -4098,7 +4243,7 @@ return /******/ (function(modules) { // webpackBootstrap
domValue.innerHTML = '{...}';
}
else {
- if (!this.editor.mode.edit && util.isUrl(this.value)) {
+ if (!this.editable.value && util.isUrl(this.value)) {
// create a link in case of read-only editor and value containing an url
domValue = document.createElement('a');
domValue.className = 'value';
@@ -4107,9 +4252,9 @@ return /******/ (function(modules) { // webpackBootstrap
domValue.innerHTML = this._escapeHTML(this.value);
}
else {
- // create and editable or read-only div
+ // create an editable or read-only div
domValue = document.createElement('div');
- domValue.contentEditable = !this.editor.mode.view;
+ domValue.contentEditable = this.editable.value;
domValue.spellcheck = false;
domValue.className = 'value';
domValue.innerHTML = this._escapeHTML(this.value);
@@ -4272,7 +4417,7 @@ return /******/ (function(modules) { // webpackBootstrap
break;
case 'click':
- if (event.ctrlKey && this.editor.mode.edit) {
+ if (event.ctrlKey || !this.editable.value) {
if (util.isUrl(this.value)) {
window.open(this.value, '_blank');
}
@@ -4394,7 +4539,7 @@ return /******/ (function(modules) { // webpackBootstrap
// util.log(ctrlKey, keynum, event.charCode); // TODO: cleanup
if (keynum == 13) { // Enter
if (target == this.dom.value) {
- if (!this.editor.mode.edit || event.ctrlKey) {
+ if (!this.editable.value || event.ctrlKey) {
if (util.isUrl(this.value)) {
window.open(this.value, '_blank');
handled = true;
@@ -5032,49 +5177,51 @@ return /******/ (function(modules) { // webpackBootstrap
var titles = Node.TYPE_TITLES;
var items = [];
- items.push({
- 'text': 'Type',
- 'title': 'Change the type of this field',
- 'className': 'type-' + this.type,
- 'submenu': [
- {
- 'text': 'Auto',
- 'className': 'type-auto' +
- (this.type == 'auto' ? ' selected' : ''),
- 'title': titles.auto,
- 'click': function () {
- node._onChangeType('auto');
+ if (this.editable.value) {
+ items.push({
+ 'text': 'Type',
+ 'title': 'Change the type of this field',
+ 'className': 'type-' + this.type,
+ 'submenu': [
+ {
+ 'text': 'Auto',
+ 'className': 'type-auto' +
+ (this.type == 'auto' ? ' selected' : ''),
+ 'title': titles.auto,
+ 'click': function () {
+ node._onChangeType('auto');
+ }
+ },
+ {
+ 'text': 'Array',
+ 'className': 'type-array' +
+ (this.type == 'array' ? ' selected' : ''),
+ 'title': titles.array,
+ 'click': function () {
+ node._onChangeType('array');
+ }
+ },
+ {
+ 'text': 'Object',
+ 'className': 'type-object' +
+ (this.type == 'object' ? ' selected' : ''),
+ 'title': titles.object,
+ 'click': function () {
+ node._onChangeType('object');
+ }
+ },
+ {
+ 'text': 'String',
+ 'className': 'type-string' +
+ (this.type == 'string' ? ' selected' : ''),
+ 'title': titles.string,
+ 'click': function () {
+ node._onChangeType('string');
+ }
}
- },
- {
- 'text': 'Array',
- 'className': 'type-array' +
- (this.type == 'array' ? ' selected' : ''),
- 'title': titles.array,
- 'click': function () {
- node._onChangeType('array');
- }
- },
- {
- 'text': 'Object',
- 'className': 'type-object' +
- (this.type == 'object' ? ' selected' : ''),
- 'title': titles.object,
- 'click': function () {
- node._onChangeType('object');
- }
- },
- {
- 'text': 'String',
- 'className': 'type-string' +
- (this.type == 'string' ? ' selected' : ''),
- 'title': titles.string,
- 'click': function () {
- node._onChangeType('string');
- }
- }
- ]
- });
+ ]
+ });
+ }
if (this._hasChilds()) {
var direction = ((this.sort == 'asc') ? 'desc': 'asc');
@@ -5107,10 +5254,12 @@ return /******/ (function(modules) { // webpackBootstrap
}
if (this.parent && this.parent._hasChilds()) {
- // create a separator
- items.push({
- 'type': 'separator'
- });
+ if (items.length) {
+ // create a separator
+ items.push({
+ 'type': 'separator'
+ });
+ }
// create append button (for last child node only)
var childs = node.parent.childs;
@@ -5205,25 +5354,27 @@ return /******/ (function(modules) { // webpackBootstrap
]
});
- // create duplicate button
- items.push({
- 'text': 'Duplicate',
- 'title': 'Duplicate this field (Ctrl+D)',
- 'className': 'duplicate',
- 'click': function () {
- node._onDuplicate();
- }
- });
+ if (this.editable.field) {
+ // create duplicate button
+ items.push({
+ 'text': 'Duplicate',
+ 'title': 'Duplicate this field (Ctrl+D)',
+ 'className': 'duplicate',
+ 'click': function () {
+ node._onDuplicate();
+ }
+ });
- // create remove button
- items.push({
- 'text': 'Remove',
- 'title': 'Remove this field (Ctrl+Del)',
- 'className': 'remove',
- 'click': function () {
- node._onRemove();
- }
- });
+ // create remove button
+ items.push({
+ 'text': 'Remove',
+ 'title': 'Remove this field (Ctrl+Del)',
+ 'className': 'remove',
+ 'click': function () {
+ node._onRemove();
+ }
+ });
+ }
}
var menu = new ContextMenu(items, {close: onClose});
@@ -5361,115 +5512,6 @@ return /******/ (function(modules) { // webpackBootstrap
return Node;
}.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
-/***/ },
-/* 8 */
-/***/ function(module, exports, __webpack_require__) {
-
- var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (ContextMenu) {
-
- /**
- * Create a select box to be used in the editor menu's, which allows to switch mode
- * @param {Object} editor
- * @param {String[]} modes Available modes: 'code', 'form', 'text', 'tree', 'view'
- * @param {String} current Available modes: 'code', 'form', 'text', 'tree', 'view'
- * @returns {HTMLElement} box
- */
- function createModeSwitcher(editor, modes, current) {
- // TODO: decouple mode switcher from editor
-
- /**
- * Switch the mode of the editor
- * @param {String} mode
- */
- function switchMode(mode) {
- // switch mode
- editor.setMode(mode);
-
- // restore focus on mode box
- var modeBox = editor.dom && editor.dom.modeBox;
- if (modeBox) {
- modeBox.focus();
- }
- }
-
- // available modes
- var availableModes = {
- code: {
- 'text': 'Code',
- 'title': 'Switch to code highlighter',
- 'click': function () {
- switchMode('code')
- }
- },
- form: {
- 'text': 'Form',
- 'title': 'Switch to form editor',
- 'click': function () {
- switchMode('form');
- }
- },
- text: {
- 'text': 'Text',
- 'title': 'Switch to plain text editor',
- 'click': function () {
- switchMode('text');
- }
- },
- tree: {
- 'text': 'Tree',
- 'title': 'Switch to tree editor',
- 'click': function () {
- switchMode('tree');
- }
- },
- view: {
- 'text': 'View',
- 'title': 'Switch to tree view',
- 'click': function () {
- switchMode('view');
- }
- }
- };
-
- // list the selected modes
- var items = [];
- for (var i = 0; i < modes.length; i++) {
- var mode = modes[i];
- var item = availableModes[mode];
- if (!item) {
- throw new Error('Unknown mode "' + mode + '"');
- }
-
- item.className = 'type-modes' + ((current == mode) ? ' selected' : '');
- items.push(item);
- }
-
- // retrieve the title of current mode
- var currentMode = availableModes[current];
- if (!currentMode) {
- throw new Error('Unknown mode "' + current + '"');
- }
- var currentTitle = currentMode.text;
-
- // create the html element
- var box = document.createElement('button');
- box.className = 'modes separator';
- box.innerHTML = currentTitle + ' ▾';
- box.title = 'Switch editor mode';
- box.onclick = function () {
- var menu = new ContextMenu(items);
- menu.show(box);
- };
-
- return box;
- }
-
- return {
- create: createModeSwitcher
- }
- }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
-
-
/***/ },
/* 9 */
/***/ function(module, exports, __webpack_require__) {
@@ -5942,6 +5984,8 @@ return /******/ (function(modules) { // webpackBootstrap
/** @type {TreeEditor} */
this.editor = editor;
this.dom = {};
+
+ this._setEditability(editor);
}
AppendNode.prototype = new Node();
@@ -5965,7 +6009,7 @@ return /******/ (function(modules) { // webpackBootstrap
// TODO: consistent naming
- if (this.editor.mode.edit) {
+ if (this.editable.field) {
// a cell for the dragarea column
dom.tdDrag = document.createElement('td');
diff --git a/jsoneditor.map b/jsoneditor.map
index 4c5476f..f5103cb 100644
--- a/jsoneditor.map
+++ b/jsoneditor.map
@@ -1 +1 @@
-{"version":3,"file":"jsoneditor.map","sources":["./jsoneditor.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","treemode","textmode","util","JSONEditor","container","options","json","Error","ieVersion","getInternetExplorerVersion","arguments","length","_create","modes","prototype","mode","setMode","_delete","set","get","setText","jsonText","parse","getText","JSON","stringify","setName","name","getName","data","extend","config","asText","clear","mixin","create","load","err","_onError","onError","log","error","registerMode","i","prop","isArray","reserved","apply","undefined","Highlighter","History","SearchBox","Node","modeswitcher","dom","highlighter","selection","_setOptions","history","view","_createFrame","_createTable","frame","parentNode","removeChild","search","hasOwnProperty","edit","form","focusNode","domFocus","Function","content","table","params","field","value","node","_setRoot","recurse","expand","appendChild","blur","getValue","updateField","collapse","tbody","getDom","text","results","expandAll","collapseAll","_onAction","action","add","change","startAutoScroll","mouseY","me","top","getAbsoluteTop","height","clientHeight","bottom","margin","interval","autoScrollStep","scrollTop","scrollHeight","autoScrollTimer","setInterval","stopAutoScroll","clearTimeout","setSelection","range","setSelectionOffset","focus","getSelection","getSelectionOffset","scrollTo","callback","editor","animateTimeout","animateCallback","finalScrollTop","Math","min","max","animate","diff","abs","setTimeout","onEvent","event","_onEvent","document","createElement","className","onclick","target","nodeName","preventDefault","oninput","onchange","onkeydown","onkeyup","oncut","onpaste","onmousedown","onmouseup","onmouseover","onmouseout","addEventListener","onfocusin","onfocusout","menu","title","undo","_onUndo","redo","_onRedo","onChange","disabled","canUndo","canRedo","modeBox","searchBox","type","_onKeyDown","getNodeFromTarget","keynum","which","keyCode","ctrlKey","shiftKey","handled","selectContentEditable","select","previous","next","stopPropagation","contentOuter","col","colgroupContent","width","indentation","Number","ace","textarea","clientWidth","buttonFormat","format","buttonCompact","compact","editorDom","style","setTheme","setShowPrintMargin","setFontSize","getSession","setTabSize","setUseSoftTabs","setUseWrapMode","poweredBy","createTextNode","href","window","open","on","spellcheck","resize","force","setValue","jsonString","eval","err2","validate","jsonlint","a","b","console","object","String","Boolean","RegExp","isUrlRegex","isUrl","test","obj","Object","toString","getAbsoluteLeft","elem","rect","getBoundingClientRect","left","pageXOffset","scrollLeft","pageYOffset","addClassName","classes","split","indexOf","push","join","removeClassName","index","splice","stripFormatting","divElement","childs","childNodes","iMax","child","removeAttribute","attributes","j","attribute","specified","setEndOfContentEditable","contentEditableElement","createRange","selectNodeContents","removeAllRanges","addRange","sel","getRangeAt","rangeCount","startContainer","endContainer","startOffset","endOffset","setStart","firstChild","setEnd","getInnerText","element","buffer","first","flush","nodeValue","hasChildNodes","innerText","prevChild","prevName","_ieVersion","rv","navigator","appName","ua","userAgent","re","exec","parseFloat","$1","isFirefox","listener","useCapture","attachEvent","f","removeEventListener","detachEvent","locked","highlight","setHighlight","_cancelUnhighlight","unhighlight","unhighlightTimer","lock","unlock","actions","editField","oldValue","newValue","editValue","updateValue","appendNode","parent","insertBeforeNode","insertBefore","beforeNode","insertAfterNode","insertAfter","afterNode","removeNode","append","duplicateNode","clone","changeType","oldType","newType","moveNode","startParent","moveTo","startIndex","endParent","endIndex","sort","hideChilds","oldSort","oldChilds","showChilds","newSort","newChilds","timestamp","Date","oldSelection","newSelection","timeout","delay","lastText","tr","td","divInput","input","tableInput","tbodySearch","refreshSearch","_onDelayedSearch","_onSearch","_onKeyUp","searchNext","searchPrevious","resultIndex","_setActiveResult","activeResult","prevNode","prevElem","searchFieldActive","searchValueActive","updateDom","_clearDelay","forceSearch","resultCount","innerHTML","ContextMenu","appendNodeFactory","expanded","setField","fieldEditable","setParent","getField","_getDomField","childValue","_getType","childField","arr","forEach","_getDomValue","getLevel","fieldInnerText","valueInnerText","cloneChilds","childClone","getAppend","nextTr","nextSibling","hide","_hasChilds","newTr","appendTr","updateIndexes","moveBefore","trTemp","AppendNode","currentIndex","toLowerCase","searchField","searchValue","_updateDomField","childResults","concat","_updateDomValue","offsetTop","focusElement","elementName","drag","editableDiv","_duplicate","containsNode","_move","clearDom","removedNode","_remove","lastTr","_stringCast","silent","_unescapeHTML","str","domValue","v","t","color","isEmpty","count","domField","oldField","tdDrag","domDrag","tdMenu","tdField","tree","_createDomTree","_onDragStart","mousemove","_onDrag","mouseup","_onDragEnd","oldCursor","body","cursor","mouseX","pageX","level","trThis","trPrev","trNext","trFirst","trLast","trRoot","nodePrev","nodeNext","topThis","topPrev","topFirst","heightThis","bottomNext","heightNext","pageY","moved","offsetHeight","previousSibling","diffX","diffLevel","round","levelNext","_isChildOf","n","_createDomField","domTree","marginLeft","contentEditable","_escapeHTML","_updateDomIndexes","_createDomValue","_createDomExpandButton","borderCollapse","tdExpand","tdSeparator","tdValue","srcElement","expandable","showContextMenu","_onExpand","offsetX","onKeyDown","nextNode","nextDom","nextDom2","altKey","_onDuplicate","_onRemove","_onInsertBefore","_onInsertAfter","lastNode","_lastNode","_getElementName","firstNode","_firstNode","prevElement","_previousElement","appendDom","nextNode2","_previousNode","nextElement","_nextElement","prevDom","isVisible","_nextNode","newNode","_onAppend","_onChangeType","_onSort","direction","order","firstDom","lastDom","lastChild","TYPE_TITLES","auto","array","string","anchor","onClose","titles","items","submenu","click","submenuTitle","close","show","Array","lower","num","numFloat","isNaN","htmlEscaped","replace","substring","escapedText","_escapeJSON","escaped","charAt","createModeSwitcher","current","switchMode","availableModes","code","item","currentMode","currentTitle","box","createMenuItems","list","domItems","separator","li","domItem","button","divIcon","buttonSubmenu","buttonExpand","divExpand","_onExpandItem","domSubItems","subItems","ul","eventListeners","visibleSubmenu","focusButton","overflow","maxHeight","_getVisibleButtons","buttons","expandedItem","subItem","visibleMenu","windowHeight","innerHeight","windowScroll","windowBottom","anchorHeight","menuHeight","mousedown","mousewheel","keydown","fn","alreadyVisible","padding","display","targetIndex","prevButton","nextButton","e","trAppend","tdAppend","domText","paddingLeft"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,IACQ,kBAAXG,SAAyBA,OAAOC,IAC9CD,OAAOH,GACmB,gBAAZC,SACdA,QAAoB,WAAID,IAExBD,EAAiB,WAAIC,KACpBK,KAAM,WACT,MAAgB,UAAUC,GAKhB,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUP,OAGnC,IAAIC,GAASO,EAAiBD,IAC7BP,WACAS,GAAIF,EACJG,QAAQ,EAUT,OANAL,GAAQE,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOS,QAAS,EAGTT,EAAOD,QAvBf,G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OlE,WAC9BA,GAAYwP,UAAU5T,KAAK0U,QAC3BtQ,EAAY6P,OACZlT,EAAK6O,aAAazL,EAAIqG,KAAM,YAC5BxK,KAAKyf,gBAAgBtb,EAAIqG,KAAM,WAC7BzJ,EAAKmP,gBAAgB/L,EAAIqG,KAAM,YAC/BpG,EAAY8P,SACZ9P,EAAY2P,gBAIJ,WAAR3I,GACFpL,KAAK4f,UAAU1W,IAIZ+Q,EAIT,MAAO5B,IACPzU,MAAM,KAAMjD,KAAkEkD,SAAlCjD,IAAgDf,EAAOD,QAAUgB"}
\ No newline at end of file
+{"version":3,"file":"jsoneditor.map","sources":["./jsoneditor.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","treemode","textmode","util","JSONEditor","container","options","json","Error","ieVersion","getInternetExplorerVersion","arguments","length","_create","modes","prototype","mode","setMode","_delete","set","get","setText","jsonText","parse","getText","JSON","stringify","setName","name","getName","data","extend","config","asText","clear","mixin","create","load","err","_onError","onError","log","error","registerMode","i","prop","isArray","reserved","apply","undefined","Highlighter","History","SearchBox","Node","modeswitcher","dom","highlighter","selection","_setOptions","history","view","_createFrame","_createTable","frame","parentNode","removeChild","search","hasOwnProperty","edit","form","focusNode","domFocus","Function","content","table","params","field","value","node","_setRoot","recurse","expand","appendChild","blur","getValue","updateField","collapse","tbody","getDom","text","results","expandAll","collapseAll","_onAction","action","add","change","startAutoScroll","mouseY","me","top","getAbsoluteTop","height","clientHeight","bottom","margin","interval","autoScrollStep","scrollTop","scrollHeight","autoScrollTimer","setInterval","stopAutoScroll","clearTimeout","setSelection","range","setSelectionOffset","focus","getSelection","getSelectionOffset","scrollTo","callback","editor","animateTimeout","animateCallback","finalScrollTop","Math","min","max","animate","diff","abs","setTimeout","onEvent","event","_onEvent","document","createElement","className","onclick","target","nodeName","preventDefault","oninput","onchange","onkeydown","onkeyup","oncut","onpaste","onmousedown","onmouseup","onmouseover","onmouseout","addEventListener","onfocusin","onfocusout","menu","title","undo","_onUndo","redo","_onRedo","onChange","disabled","canUndo","canRedo","modeBox","searchBox","type","_onKeyDown","getNodeFromTarget","keynum","which","keyCode","ctrlKey","shiftKey","handled","selectContentEditable","select","previous","next","stopPropagation","contentOuter","col","colgroupContent","width","indentation","Number","ace","textarea","clientWidth","buttonFormat","format","buttonCompact","compact","editorDom","style","setTheme","setShowPrintMargin","setFontSize","getSession","setTabSize","setUseSoftTabs","setUseWrapMode","poweredBy","createTextNode","href","window","open","on","spellcheck","resize","force","setValue","jsonString","eval","err2","validate","jsonlint","a","b","console","object","String","Boolean","RegExp","isUrlRegex","isUrl","test","obj","Object","toString","getAbsoluteLeft","elem","rect","getBoundingClientRect","left","pageXOffset","scrollLeft","pageYOffset","addClassName","classes","split","indexOf","push","join","removeClassName","index","splice","stripFormatting","divElement","childs","childNodes","iMax","child","removeAttribute","attributes","j","attribute","specified","setEndOfContentEditable","contentEditableElement","createRange","selectNodeContents","removeAllRanges","addRange","sel","getRangeAt","rangeCount","startContainer","endContainer","startOffset","endOffset","setStart","firstChild","setEnd","getInnerText","element","buffer","first","flush","nodeValue","hasChildNodes","innerText","prevChild","prevName","_ieVersion","rv","navigator","appName","ua","userAgent","re","exec","parseFloat","$1","isFirefox","listener","useCapture","attachEvent","f","removeEventListener","detachEvent","ContextMenu","createModeSwitcher","current","switchMode","availableModes","code","click","tree","items","item","currentMode","currentTitle","box","innerHTML","show","locked","highlight","setHighlight","_cancelUnhighlight","unhighlight","unhighlightTimer","lock","unlock","actions","editField","oldValue","newValue","editValue","updateValue","appendNode","parent","insertBeforeNode","insertBefore","beforeNode","insertAfterNode","insertAfter","afterNode","removeNode","append","duplicateNode","clone","changeType","oldType","newType","moveNode","startParent","moveTo","startIndex","endParent","endIndex","sort","hideChilds","oldSort","oldChilds","showChilds","newSort","newChilds","timestamp","Date","oldSelection","newSelection","timeout","delay","lastText","tr","td","divInput","input","tableInput","tbodySearch","refreshSearch","_onDelayedSearch","_onSearch","_onKeyUp","searchNext","searchPrevious","resultIndex","_setActiveResult","activeResult","prevNode","prevElem","searchFieldActive","searchValueActive","updateDom","_clearDelay","forceSearch","resultCount","appendNodeFactory","expanded","setField","fieldEditable","_setEditability","editable","setParent","getField","_getDomField","childValue","_getType","childField","arr","forEach","_getDomValue","getLevel","fieldInnerText","valueInnerText","cloneChilds","childClone","getAppend","nextTr","nextSibling","hide","_hasChilds","newTr","appendTr","updateIndexes","moveBefore","trTemp","AppendNode","currentIndex","toLowerCase","searchField","searchValue","_updateDomField","childResults","concat","_updateDomValue","offsetTop","focusElement","elementName","drag","editableDiv","_duplicate","containsNode","_move","clearDom","removedNode","_remove","lastTr","_stringCast","silent","_unescapeHTML","str","domValue","v","t","color","isEmpty","count","domField","oldField","tdDrag","domDrag","tdMenu","tdField","_createDomTree","_onDragStart","mousemove","_onDrag","mouseup","_onDragEnd","oldCursor","body","cursor","mouseX","pageX","level","trThis","trPrev","trNext","trFirst","trLast","trRoot","nodePrev","nodeNext","topThis","topPrev","topFirst","heightThis","bottomNext","heightNext","pageY","moved","offsetHeight","previousSibling","diffX","diffLevel","round","levelNext","_isChildOf","n","_createDomField","domTree","marginLeft","contentEditable","_escapeHTML","_updateDomIndexes","_createDomValue","_createDomExpandButton","borderCollapse","tdExpand","tdSeparator","tdValue","srcElement","expandable","showContextMenu","_onExpand","offsetX","onKeyDown","nextNode","nextDom","nextDom2","altKey","_onDuplicate","_onRemove","_onInsertBefore","_onInsertAfter","lastNode","_lastNode","_getElementName","firstNode","_firstNode","prevElement","_previousElement","appendDom","nextNode2","_previousNode","nextElement","_nextElement","prevDom","isVisible","_nextNode","newNode","_onAppend","_onChangeType","_onSort","direction","order","firstDom","lastDom","lastChild","TYPE_TITLES","auto","array","string","anchor","onClose","titles","submenu","submenuTitle","close","Array","lower","num","numFloat","isNaN","htmlEscaped","replace","substring","escapedText","_escapeJSON","escaped","charAt","createMenuItems","list","domItems","separator","li","domItem","button","divIcon","buttonSubmenu","buttonExpand","divExpand","_onExpandItem","domSubItems","subItems","ul","eventListeners","visibleSubmenu","focusButton","overflow","maxHeight","_getVisibleButtons","buttons","expandedItem","subItem","visibleMenu","windowHeight","innerHeight","windowScroll","windowBottom","anchorHeight","menuHeight","mousedown","mousewheel","keydown","fn","alreadyVisible","padding","display","targetIndex","prevButton","nextButton","e","trAppend","tdAppend","domText","paddingLeft"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,IACQ,kBAAXG,SAAyBA,OAAOC,IAC9CD,OAAOH,GACmB,gBAAZC,SACdA,QAAoB,WAAID,IAExBD,EAAiB,WAAIC,KACpBK,KAAM,WACT,MAAgB,UAAUC,GAKhB,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUP,OAGnC,IAAIC,GAASO,EAAiBD,IAC7BP,WACAS,GAAIF,EACJG,QAAQ,EAUT,OANAL,GAAQE,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOS,QAAS,EAGTT,EAAOD,QAvBf,GAAIQ,KAqCJ,OATAF,GAAoBM,EAAIP,EAGxBC,EAAoBO,EAAIL,EAGxBF,EAAoBQ,EAAI,GAGjBR,EAAoB,KAK/B,SAASL,EAAQD,EAASM,GAE/B,GAAIS,GAA8BC,CAAgCD,IAAgCT,EAAoB,GAAIA,EAAoB,GAAIA,EAAoB,IAAKU,EAAiC,SAAUC,EAAUC,EAAUC,GA4BxO,QAASC,GAAYC,EAAWC,EAASC,GACvC,KAAMnB,eAAgBgB,IACpB,KAAM,IAAII,OAAM,+CAIlB,IAAIC,GAAYN,EAAKO,4BACrB,IAAiB,IAAbD,GAA+B,EAAZA,EACrB,KAAM,IAAID,OAAM,iGAIdG,WAAUC,QACZxB,KAAKyB,QAAQR,EA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QAAU,SAAUC,GACvC,GAAIkC,GAAOlC,EAAMkC,KACb5B,EAASN,EAAMM,QAAUN,EAAMmX,WAC/Blc,EAAMnE,KAAKmE,IAGXqG,EAAOrG,EAAIqG,IAWf,IAVIhB,GAAUgB,IACA,aAARY,EACFpL,KAAKsI,OAAOlE,YAAYuQ,UAAU3U,KAAKyV,QAExB,YAARrK,GACPpL,KAAKsI,OAAOlE,YAAY0Q,eAKhB,SAAR1J,GAAmB5B,GAAUrF,EAAIqG,KAAM,CACzC,GAAIpG,GAAcpE,KAAKsI,OAAOlE,WAC9BA,GAAYuQ,UAAU3U,KAAKyV,QAC3BrR,EAAY4Q,OACZjU,EAAK6O,aAAazL,EAAIqG,KAAM,YAC5BxK,KAAKugB,gBAAgBpc,EAAIqG,KAAM,WAC7BzJ,EAAKmP,gBAAgB/L,EAAIqG,KAAM,YAC/BpG,EAAY6Q,SACZ7Q,EAAY0Q,gBAIJ,WAAR1J,GACFpL,KAAK0gB,UAAUxX,IAIZ8R,EAIT,MAAO9B,IACPtV,MAAM,KAAMjD,KAAkEkD,SAAlCjD,IAAgDf,EAAOD,QAAUgB"}
\ No newline at end of file
diff --git a/jsoneditor.min.js b/jsoneditor.min.js
index 7ea02a3..693a535 100644
--- a/jsoneditor.min.js
+++ b/jsoneditor.min.js
@@ -24,9 +24,9 @@
*
* @author Jos de Jong,
* @version 3.1.0-SNAPSHOT
- * @date 2014-07-26
+ * @date 2014-07-27
*/
-!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):"object"==typeof exports?exports.JSONEditor=t():e.JSONEditor=t()}(this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var n,o;n=[i(1),i(2),i(3)],o=function(e,t,i){function n(e,t,o){if(!(this instanceof n))throw new Error('JSONEditor constructor called without "new".');var s=i.getInternetExplorerVersion();if(-1!=s&&9>s)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");arguments.length&&this._create(e,t,o)}return n.modes={},n.prototype._create=function(e,t,i){this.container=e,this.options=t||{},this.json=i||{};var n=this.options.mode||"tree";this.setMode(n)},n.prototype._delete=function(){},n.prototype.set=function(e){this.json=e},n.prototype.get=function(){return this.json},n.prototype.setText=function(e){this.json=i.parse(e)},n.prototype.getText=function(){return JSON.stringify(this.json)},n.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},n.prototype.getName=function(){return this.options&&this.options.name},n.prototype.setMode=function(e){var t,o,s=this.container,r=i.extend({},this.options);r.mode=e;var a=n.modes[e];if(!a)throw new Error('Unknown mode "'+r.mode+'"');try{var d="text"==a.data;if(o=this.getName(),t=this[d?"getText":"get"](),this._delete(),i.clear(this),i.extend(this,a.mixin),this.create(s,r),this.setName(o),this[d?"setText":"set"](t),"function"==typeof a.load)try{a.load.call(this)}catch(l){}}catch(l){this._onError(l)}},n.prototype._onError=function(e){if("function"==typeof this.onError&&(i.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(e)),!this.options||"function"!=typeof this.options.error)throw e;this.options.error(e)},n.registerMode=function(e){var t,o;if(i.isArray(e))for(t=0;te&&i.scrollTop>0?(n+a-e)/3:e>r-a&&o+i.scrollTop3?(i.scrollTop+=o/3,n.animateCallback=t,n.animateTimeout=setTimeout(a,50)):(t&&t(!0),i.scrollTop=r,delete n.animateTimeout,delete n.animateCallback)};a()}else t&&t(!1)},r._createFrame=function(){function e(e){t._onEvent(e)}this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.container.appendChild(this.frame);var t=this;this.frame.onclick=function(t){var i=t.target;e(t),"BUTTON"==i.nodeName&&t.preventDefault()},this.frame.oninput=e,this.frame.onchange=e,this.frame.onkeydown=e,this.frame.onkeyup=e,this.frame.oncut=e,this.frame.onpaste=e,this.frame.onmousedown=e,this.frame.onmouseup=e,this.frame.onmouseover=e,this.frame.onmouseout=e,s.addEventListener(this.frame,"focus",e,!0),s.addEventListener(this.frame,"blur",e,!0),this.frame.onfocusin=e,this.frame.onfocusout=e,this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var n=document.createElement("button");n.className="expand-all",n.title="Expand all fields",n.onclick=function(){t.expandAll()},this.menu.appendChild(n);var r=document.createElement("button");if(r.title="Collapse all fields",r.className="collapse-all",r.onclick=function(){t.collapseAll()},this.menu.appendChild(r),this.history){var a=document.createElement("button");a.className="undo separator",a.title="Undo last action (Ctrl+Z)",a.onclick=function(){t._onUndo()},this.menu.appendChild(a),this.dom.undo=a;var d=document.createElement("button");d.className="redo",d.title="Redo (Ctrl+Shift+Z)",d.onclick=function(){t._onRedo()},this.menu.appendChild(d),this.dom.redo=d,this.history.onChange=function(){a.disabled=!t.history.canUndo(),d.disabled=!t.history.canRedo()},this.history.onChange()}if(this.options&&this.options.modes&&this.options.modes.length){var l=o.create(this,this.options.modes,this.options.mode);this.menu.appendChild(l),this.dom.modeBox=l}this.options.search&&(this.searchBox=new i(this,this.menu))},r._onUndo=function(){this.history&&(this.history.undo(),this.options.change&&this.options.change())},r._onRedo=function(){this.history&&(this.history.redo(),this.options.change&&this.options.change())},r._onEvent=function(e){var t=e.target;"keydown"==e.type&&this._onKeyDown(e),"focus"==e.type&&(d=t);var i=n.getNodeFromTarget(t);i&&i.onEvent(e)},r._onKeyDown=function(e){var t=e.which||e.keyCode,i=e.ctrlKey,n=e.shiftKey,o=!1;if(9==t&&setTimeout(function(){s.selectContentEditable(d)},0),this.searchBox)if(i&&70==t)this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),o=!0;else if(114==t||i&&71==t){var r=!0;n?this.searchBox.previous(r):this.searchBox.next(r),o=!0}this.history&&(i&&!n&&90==t?(this._onUndo(),o=!0):i&&n&&90==t&&(this._onRedo(),o=!0)),o&&(e.preventDefault(),e.stopPropagation())},r._createTable=function(){var e=document.createElement("div");e.className="outer",this.contentOuter=e,this.content=document.createElement("div"),this.content.className="tree",e.appendChild(this.content),this.table=document.createElement("table"),this.table.className="tree",this.content.appendChild(this.table);var t;this.colgroupContent=document.createElement("colgroup"),this.mode.edit&&(t=document.createElement("col"),t.width="24px",this.colgroupContent.appendChild(t)),t=document.createElement("col"),t.width="24px",this.colgroupContent.appendChild(t),t=document.createElement("col"),this.colgroupContent.appendChild(t),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(e)},[{mode:"tree",mixin:r,data:"json"},{mode:"view",mixin:r,data:"json"},{mode:"form",mixin:r,data:"json"}]}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(e,t,i){var n,o;n=[i(8),i(3)],o=function(e,t){var i={};return i.create=function(i,n){n=n||{},this.options=n,this.indentation=n.indentation?Number(n.indentation):2,this.mode="code"==n.mode?"code":"text","code"==this.mode&&"undefined"==typeof ace&&(this.mode="text",t.log("WARNING: Cannot load code editor, Ace library not loaded. Falling back to plain text editor"));var o=this;this.container=i,this.dom={},this.editor=void 0,this.textarea=void 0,this.width=i.clientWidth,this.height=i.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.frame.onclick=function(e){e.preventDefault()},this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var s=document.createElement("button");s.className="format",s.title="Format JSON data, with proper indentation and line feeds",this.menu.appendChild(s),s.onclick=function(){try{o.format()}catch(e){o._onError(e)}};var r=document.createElement("button");if(r.className="compact",r.title="Compact JSON data, remove all whitespaces",this.menu.appendChild(r),r.onclick=function(){try{o.compact()}catch(e){o._onError(e)}},this.options&&this.options.modes&&this.options.modes.length){var a=e.create(this,this.options.modes,this.options.mode);this.menu.appendChild(a),this.dom.modeBox=a}if(this.content=document.createElement("div"),this.content.className="outer",this.frame.appendChild(this.content),this.container.appendChild(this.frame),"code"==this.mode){this.editorDom=document.createElement("div"),this.editorDom.style.height="100%",this.editorDom.style.width="100%",this.content.appendChild(this.editorDom);var d=ace.edit(this.editorDom);d.setTheme("ace/theme/jsoneditor"),d.setShowPrintMargin(!1),d.setFontSize(13),d.getSession().setMode("ace/mode/json"),d.getSession().setTabSize(2),d.getSession().setUseSoftTabs(!0),d.getSession().setUseWrapMode(!0),this.editor=d;var l=document.createElement("a");l.appendChild(document.createTextNode("powered by ace")),l.href="http://ace.ajax.org",l.target="_blank",l.className="poweredBy",l.onclick=function(){window.open(l.href,l.target)},this.menu.appendChild(l),n.change&&d.on("change",function(){n.change()})}else{var h=document.createElement("textarea");h.className="text",h.spellcheck=!1,this.content.appendChild(h),this.textarea=h,n.change&&(null===this.textarea.oninput?this.textarea.oninput=function(){n.change()}:this.textarea.onchange=function(){n.change()})}},i._delete=function(){this.frame&&this.container&&this.frame.parentNode==this.container&&this.container.removeChild(this.frame)},i._onError=function(e){if("function"==typeof this.onError&&(t.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(e)),!this.options||"function"!=typeof this.options.error)throw e;this.options.error(e)},i.compact=function(){var e=t.parse(this.getText());this.setText(JSON.stringify(e))},i.format=function(){var e=t.parse(this.getText());this.setText(JSON.stringify(e,null,this.indentation))},i.focus=function(){this.textarea&&this.textarea.focus(),this.editor&&this.editor.focus()},i.resize=function(){if(this.editor){var e=!1;this.editor.resize(e)}},i.set=function(e){this.setText(JSON.stringify(e,null,this.indentation))},i.get=function(){return t.parse(this.getText())},i.getText=function(){return this.textarea?this.textarea.value:this.editor?this.editor.getValue():""},i.setText=function(e){this.textarea&&(this.textarea.value=e),this.editor&&this.editor.setValue(e,-1)},[{mode:"text",mixin:i,data:"text",load:i.format},{mode:"code",mixin:i,data:"text",load:i.format}]}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_RESULT__=function(){var util={};util.parse=function parse(jsonString){try{return JSON.parse(jsonString)}catch(err){try{return eval("("+jsonString+")")}catch(err2){throw util.validate(jsonString),err}}},util.validate=function(e){"undefined"!=typeof jsonlint?jsonlint.parse(e):JSON.parse(e)},util.extend=function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},util.clear=function(e){for(var t in e)e.hasOwnProperty(t)&&delete e[t];return e},util.log=function(){"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)},util.type=function(e){return null===e?"null":void 0===e?"undefined":e instanceof Number||"number"==typeof e?"number":e instanceof String||"string"==typeof e?"string":e instanceof Boolean||"boolean"==typeof e?"boolean":e instanceof RegExp||"regexp"==typeof e?"regexp":util.isArray(e)?"array":"object"};var isUrlRegex=/^https?:\/\/\S+$/;util.isUrl=function(e){return("string"==typeof e||e instanceof String)&&isUrlRegex.test(e)},util.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},util.getAbsoluteLeft=function(e){var t=e.getBoundingClientRect();return t.left+window.pageXOffset||document.scrollLeft||0},util.getAbsoluteTop=function(e){var t=e.getBoundingClientRect();return t.top+window.pageYOffset||document.scrollTop||0},util.addClassName=function(e,t){var i=e.className.split(" ");-1==i.indexOf(t)&&(i.push(t),e.className=i.join(" "))},util.removeClassName=function(e,t){var i=e.className.split(" "),n=i.indexOf(t);-1!=n&&(i.splice(n,1),e.className=i.join(" "))},util.stripFormatting=function(e){for(var t=e.childNodes,i=0,n=t.length;n>i;i++){var o=t[i];o.style&&o.removeAttribute("style");var s=o.attributes;if(s)for(var r=s.length-1;r>=0;r--){var a=s[r];1==a.specified&&o.removeAttribute(a.name)}util.stripFormatting(o)}},util.setEndOfContentEditable=function(e){var t,i;document.createRange&&(t=document.createRange(),t.selectNodeContents(e),t.collapse(!1),i=window.getSelection(),i.removeAllRanges(),i.addRange(t))},util.selectContentEditable=function(e){if(e&&"DIV"==e.nodeName){var t,i;window.getSelection&&document.createRange&&(i=document.createRange(),i.selectNodeContents(e),t=window.getSelection(),t.removeAllRanges(),t.addRange(i))}},util.getSelection=function(){if(window.getSelection){var e=window.getSelection();if(e.getRangeAt&&e.rangeCount)return e.getRangeAt(0)}return null},util.setSelection=function(e){if(e&&window.getSelection){var t=window.getSelection();t.removeAllRanges(),t.addRange(e)}},util.getSelectionOffset=function(){var e=util.getSelection();return e&&"startOffset"in e&&"endOffset"in e&&e.startContainer&&e.startContainer==e.endContainer?{startOffset:e.startOffset,endOffset:e.endOffset,container:e.startContainer.parentNode}:null},util.setSelectionOffset=function(e){if(document.createRange&&window.getSelection){var t=window.getSelection();if(t){var i=document.createRange();i.setStart(e.container.firstChild,e.startOffset),i.setEnd(e.container.firstChild,e.endOffset),util.setSelection(i)}}},util.getInnerText=function(e,t){var i=void 0==t;if(i&&(t={text:"",flush:function(){var e=this.text;return this.text="",e},set:function(e){this.text=e}}),e.nodeValue)return t.flush()+e.nodeValue;if(e.hasChildNodes()){for(var n=e.childNodes,o="",s=0,r=n.length;r>s;s++){var a=n[s];if("DIV"==a.nodeName||"P"==a.nodeName){var d=n[s-1],l=d?d.nodeName:void 0;l&&"DIV"!=l&&"P"!=l&&"BR"!=l&&(o+="\n",t.flush()),o+=util.getInnerText(a,t),t.set("\n")}else"BR"==a.nodeName?(o+=t.flush(),t.set("\n")):o+=util.getInnerText(a,t)}return o}return"P"==e.nodeName&&-1!=util.getInternetExplorerVersion()?t.flush():""},util.getInternetExplorerVersion=function(){if(-1==_ieVersion){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent,i=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=i.exec(t)&&(e=parseFloat(RegExp.$1))}_ieVersion=e}return _ieVersion},util.isFirefox=function(){return-1!=navigator.userAgent.indexOf("Firefox")};var _ieVersion=-1;return util.addEventListener=function(e,t,i,n){if(e.addEventListener)return void 0===n&&(n=!1),"mousewheel"===t&&util.isFirefox()&&(t="DOMMouseScroll"),e.addEventListener(t,i,n),i;if(e.attachEvent){var o=function(){return i.call(e,window.event)};return e.attachEvent("on"+t,o),o}},util.removeEventListener=function(e,t,i,n){e.removeEventListener?(void 0===n&&(n=!1),"mousewheel"===t&&util.isFirefox()&&(t="DOMMouseScroll"),e.removeEventListener(t,i,n)):e.detachEvent&&e.detachEvent("on"+t,i)},util}.call(exports,__webpack_require__,exports,module),!(void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))},function(e,t,i){var n;n=function(){function e(){this.locked=!1}return e.prototype.highlight=function(e){this.locked||(this.node!=e&&(this.node&&this.node.setHighlight(!1),this.node=e,this.node.setHighlight(!0)),this._cancelUnhighlight())},e.prototype.unhighlight=function(){if(!this.locked){var e=this;this.node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout(function(){e.node.setHighlight(!1),e.node=void 0,e.unhighlightTimer=void 0},0))}},e.prototype._cancelUnhighlight=function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void 0)},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1},e}.call(t,i,t,e),!(void 0!==n&&(e.exports=n))},function(e,t,i){var n,o;n=[i(3)],o=function(e){function t(e){this.editor=e,this.clear(),this.actions={editField:{undo:function(e){e.node.updateField(e.oldValue)},redo:function(e){e.node.updateField(e.newValue)}},editValue:{undo:function(e){e.node.updateValue(e.oldValue)},redo:function(e){e.node.updateValue(e.newValue)}},appendNode:{undo:function(e){e.parent.removeChild(e.node)},redo:function(e){e.parent.appendChild(e.node)}},insertBeforeNode:{undo:function(e){e.parent.removeChild(e.node)},redo:function(e){e.parent.insertBefore(e.node,e.beforeNode)}},insertAfterNode:{undo:function(e){e.parent.removeChild(e.node)},redo:function(e){e.parent.insertAfter(e.node,e.afterNode)}},removeNode:{undo:function(e){var t=e.parent,i=t.childs[e.index]||t.append;t.insertBefore(e.node,i)},redo:function(e){e.parent.removeChild(e.node)}},duplicateNode:{undo:function(e){e.parent.removeChild(e.clone)},redo:function(e){e.parent.insertAfter(e.clone,e.node)}},changeType:{undo:function(e){e.node.changeType(e.oldType)},redo:function(e){e.node.changeType(e.newType)}},moveNode:{undo:function(e){e.startParent.moveTo(e.node,e.startIndex)},redo:function(e){e.endParent.moveTo(e.node,e.endIndex)}},sort:{undo:function(e){var t=e.node;t.hideChilds(),t.sort=e.oldSort,t.childs=e.oldChilds,t.showChilds()},redo:function(e){var t=e.node;t.hideChilds(),t.sort=e.newSort,t.childs=e.newChilds,t.showChilds()}}}}return t.prototype.onChange=function(){},t.prototype.add=function(e,t){this.index++,this.history[this.index]={action:e,params:t,timestamp:new Date},this.index=0},t.prototype.canRedo=function(){return this.indexthis.results.length-1&&(t=0),this._setActiveResult(t,e)}},e.prototype.previous=function(e){if(void 0!=this.results){var t=this.results.length-1,i=void 0!=this.resultIndex?this.resultIndex-1:t;0>i&&(i=t),this._setActiveResult(i,e)}},e.prototype._setActiveResult=function(e,t){if(this.activeResult){var i=this.activeResult.node,n=this.activeResult.elem;"field"==n?delete i.searchFieldActive:delete i.searchValueActive,i.updateDom()}if(!this.results||!this.results[e])return this.resultIndex=void 0,void(this.activeResult=void 0);this.resultIndex=e;var o=this.results[this.resultIndex].node,s=this.results[this.resultIndex].elem;"field"==s?o.searchFieldActive=!0:o.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],o.updateDom(),o.scrollTo(function(){t&&o.focus(s)})},e.prototype._clearDelay=function(){void 0!=this.timeout&&(clearTimeout(this.timeout),delete this.timeout)},e.prototype._onDelayedSearch=function(){this._clearDelay();var e=this;this.timeout=setTimeout(function(t){e._onSearch(t)},this.delay)},e.prototype._onSearch=function(e,t){this._clearDelay();var i=this.dom.search.value,n=i.length>0?i:void 0;if(n!=this.lastText||t)if(this.lastText=n,this.results=this.editor.search(n),this._setActiveResult(void 0),void 0!=n){var o=this.results.length;switch(o){case 0:this.dom.results.innerHTML="no results";break;case 1:this.dom.results.innerHTML="1 result";break;default:this.dom.results.innerHTML=o+" results"}}else this.dom.results.innerHTML=""},e.prototype._onKeyDown=function(e){var t=e.which;27==t?(this.dom.search.value="",this._onSearch(e),e.preventDefault(),e.stopPropagation()):13==t&&(e.ctrlKey?this._onSearch(e,!0):e.shiftKey?this.previous():this.next(),e.preventDefault(),e.stopPropagation())},e.prototype._onKeyUp=function(e){var t=e.keyCode;27!=t&&13!=t&&this._onDelayedSearch(e)},e}.call(t,i,t,e),!(void 0!==n&&(e.exports=n))},function(e,t,i){var n,o;n=[i(9),i(10),i(3)],o=function(e,t,i){function n(e,t){this.editor=e,this.dom={},this.expanded=!1,t&&t instanceof Object?(this.setField(t.field,t.fieldEditable),this.setValue(t.value,t.type)):(this.setField(""),this.setValue(null))}n.prototype.setParent=function(e){this.parent=e},n.prototype.setField=function(e,t){this.field=e,this.fieldEditable=1==t},n.prototype.getField=function(){return void 0===this.field&&this._getDomField(),this.field},n.prototype.setValue=function(e,t){var i,o,s=this.childs;if(s)for(;s.length;)this.removeChild(s[0]);if(this.type=this._getType(e),t&&t!=this.type){if("string"!=t||"auto"!=this.type)throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+t+'"');this.type=t}if("array"==this.type){this.childs=[];for(var r=0,a=e.length;a>r;r++)i=e[r],void 0===i||i instanceof Function||(o=new n(this.editor,{value:i}),this.appendChild(o));this.value=""}else if("object"==this.type){this.childs=[];for(var d in e)e.hasOwnProperty(d)&&(i=e[d],void 0===i||i instanceof Function||(o=new n(this.editor,{field:d,value:i}),this.appendChild(o)));this.value=""}else this.childs=void 0,this.value=e},n.prototype.getValue=function(){if("array"==this.type){var e=[];return this.childs.forEach(function(t){e.push(t.getValue())}),e}if("object"==this.type){var t={};return this.childs.forEach(function(e){t[e.getField()]=e.getValue()}),t}return void 0===this.value&&this._getDomValue(),this.value},n.prototype.getLevel=function(){return this.parent?this.parent.getLevel()+1:0},n.prototype.clone=function(){var e=new n(this.editor);if(e.type=this.type,e.field=this.field,e.fieldInnerText=this.fieldInnerText,e.fieldEditable=this.fieldEditable,e.value=this.value,e.valueInnerText=this.valueInnerText,e.expanded=this.expanded,this.childs){var t=[];this.childs.forEach(function(i){var n=i.clone();n.setParent(e),t.push(n)}),e.childs=t}else e.childs=void 0;return e},n.prototype.expand=function(e){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="expanded"),this.showChilds(),0!=e&&this.childs.forEach(function(t){t.expand(e)}))},n.prototype.collapse=function(e){this.childs&&(this.hideChilds(),0!=e&&this.childs.forEach(function(t){t.collapse(e)}),this.dom.expand&&(this.dom.expand.className="collapsed"),this.expanded=!1)},n.prototype.showChilds=function(){var e=this.childs;if(e&&this.expanded){var t=this.dom.tr,i=t?t.parentNode:void 0;if(i){var n=this.getAppend(),o=t.nextSibling;o?i.insertBefore(n,o):i.appendChild(n),this.childs.forEach(function(e){i.insertBefore(e.getDom(),n),e.showChilds()})}}},n.prototype.hide=function(){var e=this.dom.tr,t=e?e.parentNode:void 0;t&&t.removeChild(e),this.hideChilds()},n.prototype.hideChilds=function(){var e=this.childs;if(e&&this.expanded){var t=this.getAppend();t.parentNode&&t.parentNode.removeChild(t),this.childs.forEach(function(e){e.hide()})}},n.prototype.appendChild=function(e){if(this._hasChilds()){if(e.setParent(this),e.fieldEditable="object"==this.type,"array"==this.type&&(e.index=this.childs.length),this.childs.push(e),this.expanded){var t=e.getDom(),i=this.getAppend(),n=i?i.parentNode:void 0;i&&n&&n.insertBefore(t,i),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},n.prototype.moveBefore=function(e,t){if(this._hasChilds()){var i=this.dom.tr?this.dom.tr.parentNode:void 0;if(i){var n=document.createElement("tr");n.style.height=i.clientHeight+"px",i.appendChild(n)}e.parent&&e.parent.removeChild(e),t instanceof o?this.appendChild(e):this.insertBefore(e,t),i&&i.removeChild(n)}},n.prototype.moveTo=function(e,t){if(e.parent==this){var i=this.childs.indexOf(e);t>i&&t++}var n=this.childs[t]||this.append;this.moveBefore(e,n)},n.prototype.insertBefore=function(e,t){if(this._hasChilds()){if(t==this.append)e.setParent(this),e.fieldEditable="object"==this.type,this.childs.push(e);else{var i=this.childs.indexOf(t);if(-1==i)throw new Error("Node not found");e.setParent(this),e.fieldEditable="object"==this.type,this.childs.splice(i,0,e)}if(this.expanded){var n=e.getDom(),o=t.getDom(),s=o?o.parentNode:void 0;o&&s&&s.insertBefore(n,o),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},n.prototype.insertAfter=function(e,t){if(this._hasChilds()){var i=this.childs.indexOf(t),n=this.childs[i+1];n?this.insertBefore(e,n):this.appendChild(e)}},n.prototype.search=function(e){var t,i=[],n=e?e.toLowerCase():void 0;if(delete this.searchField,delete this.searchValue,void 0!=this.field){var o=String(this.field).toLowerCase();t=o.indexOf(n),-1!=t&&(this.searchField=!0,i.push({node:this,elem:"field"})),this._updateDomField()}if(this._hasChilds()){if(this.childs){var s=[];this.childs.forEach(function(t){s=s.concat(t.search(e))}),i=i.concat(s)}if(void 0!=n){var r=!1;0==s.length?this.collapse(r):this.expand(r)}}else{if(void 0!=this.value){var a=String(this.value).toLowerCase();t=a.indexOf(n),-1!=t&&(this.searchValue=!0,i.push({node:this,elem:"value"}))}this._updateDomValue()}return i},n.prototype.scrollTo=function(e){if(!this.dom.tr||!this.dom.tr.parentNode)for(var t=this.parent,i=!1;t;)t.expand(i),t=t.parent;this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,e)},n.focusElement=void 0,n.prototype.focus=function(e){if(n.focusElement=e,this.dom.tr&&this.dom.tr.parentNode){var t=this.dom;switch(e){case"drag":t.drag?t.drag.focus():t.menu.focus();break;case"menu":t.menu.focus();break;case"expand":this._hasChilds()?t.expand.focus():t.field&&this.fieldEditable?(t.field.focus(),i.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):t.menu.focus();break;case"field":t.field&&this.fieldEditable?(t.field.focus(),i.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):this._hasChilds()?t.expand.focus():t.menu.focus();break;case"value":default:t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):t.field&&this.fieldEditable?(t.field.focus(),i.selectContentEditable(t.field)):this._hasChilds()?t.expand.focus():t.menu.focus()}}},n.select=function(e){setTimeout(function(){i.selectContentEditable(e)},0)},n.prototype.blur=function(){this._getDomValue(!1),this._getDomField(!1)},n.prototype._duplicate=function(e){var t=e.clone();return this.insertAfter(t,e),t},n.prototype.containsNode=function(e){if(this==e)return!0;var t=this.childs;if(t)for(var i=0,n=t.length;n>i;i++)if(t[i].containsNode(e))return!0;return!1},n.prototype._move=function(e,t){if(e!=t){if(e.containsNode(this))throw new Error("Cannot move a field into a child of itself");e.parent&&e.parent.removeChild(e);var i=e.clone();e.clearDom(),t?this.insertBefore(i,t):this.appendChild(i)}},n.prototype.removeChild=function(e){if(this.childs){var t=this.childs.indexOf(e);if(-1!=t){e.hide(),delete e.searchField,delete e.searchValue;var i=this.childs.splice(t,1)[0];
-return this.updateDom({updateIndexes:!0}),i}}return void 0},n.prototype._remove=function(e){this.removeChild(e)},n.prototype.changeType=function(e){var t=this.type;if(t!=e){if("string"!=e&&"auto"!=e||"string"!=t&&"auto"!=t){var i,n=this.dom.tr?this.dom.tr.parentNode:void 0;i=this.expanded?this.getAppend():this.getDom();var o=i&&i.parentNode?i.nextSibling:void 0;this.hide(),this.clearDom(),this.type=e,"object"==e?(this.childs||(this.childs=[]),this.childs.forEach(function(e){e.clearDom(),delete e.index,e.fieldEditable=!0,void 0==e.field&&(e.field="")}),("string"==t||"auto"==t)&&(this.expanded=!0)):"array"==e?(this.childs||(this.childs=[]),this.childs.forEach(function(e,t){e.clearDom(),e.fieldEditable=!1,e.index=t}),("string"==t||"auto"==t)&&(this.expanded=!0)):this.expanded=!1,n&&(o?n.insertBefore(this.getDom(),o):n.appendChild(this.getDom())),this.showChilds()}else this.type=e;("auto"==e||"string"==e)&&(this.value="string"==e?String(this.value):this._stringCast(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0})}},n.prototype._getDomValue=function(e){if(this.dom.value&&"array"!=this.type&&"object"!=this.type&&(this.valueInnerText=i.getInnerText(this.dom.value)),void 0!=this.valueInnerText)try{var t;if("string"==this.type)t=this._unescapeHTML(this.valueInnerText);else{var n=this._unescapeHTML(this.valueInnerText);t=this._stringCast(n)}if(t!==this.value){var o=this.value;this.value=t,this.editor._onAction("editValue",{node:this,oldValue:o,newValue:t,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(s){if(this.value=void 0,1!=e)throw s}},n.prototype._updateDomValue=function(){var e=this.dom.value;if(e){var t=this.value,n="auto"==this.type?i.type(t):this.type,o="string"==n&&i.isUrl(t),s="";s=o&&!this.editor.mode.edit?"":"string"==n?"green":"number"==n?"red":"boolean"==n?"darkorange":this._hasChilds()?"":null===t?"#004ED0":"black",e.style.color=s;var r=""==String(this.value)&&"array"!=this.type&&"object"!=this.type;if(r?i.addClassName(e,"empty"):i.removeClassName(e,"empty"),o?i.addClassName(e,"url"):i.removeClassName(e,"url"),"array"==n||"object"==n){var a=this.childs?this.childs.length:0;e.title=this.type+" containing "+a+" items"}else"string"==n&&i.isUrl(t)?this.editor.mode.edit&&(e.title="Ctrl+Click or Ctrl+Enter to open url in new window"):e.title="";this.searchValueActive?i.addClassName(e,"highlight-active"):i.removeClassName(e,"highlight-active"),this.searchValue?i.addClassName(e,"highlight"):i.removeClassName(e,"highlight"),i.stripFormatting(e)}},n.prototype._updateDomField=function(){var e=this.dom.field;if(e){var t=""==String(this.field)&&"array"!=this.parent.type;t?i.addClassName(e,"empty"):i.removeClassName(e,"empty"),this.searchFieldActive?i.addClassName(e,"highlight-active"):i.removeClassName(e,"highlight-active"),this.searchField?i.addClassName(e,"highlight"):i.removeClassName(e,"highlight"),i.stripFormatting(e)}},n.prototype._getDomField=function(e){if(this.dom.field&&this.fieldEditable&&(this.fieldInnerText=i.getInnerText(this.dom.field)),void 0!=this.fieldInnerText)try{var t=this._unescapeHTML(this.fieldInnerText);if(t!==this.field){var n=this.field;this.field=t,this.editor._onAction("editField",{node:this,oldValue:n,newValue:t,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(o){if(this.field=void 0,1!=e)throw o}},n.prototype.clearDom=function(){this.dom={}},n.prototype.getDom=function(){var e=this.dom;if(e.tr)return e.tr;if(e.tr=document.createElement("tr"),e.tr.node=this,this.editor.mode.edit){var t=document.createElement("td");if(this.parent){var i=document.createElement("button");e.drag=i,i.className="dragarea",i.title="Drag to move this field (Alt+Shift+Arrows)",t.appendChild(i)}e.tr.appendChild(t);var n=document.createElement("td"),o=document.createElement("button");e.menu=o,o.className="contextmenu",o.title="Click to open the actions menu (Ctrl+M)",n.appendChild(e.menu),e.tr.appendChild(n)}var s=document.createElement("td");return e.tr.appendChild(s),e.tree=this._createDomTree(),s.appendChild(e.tree),this.updateDom({updateIndexes:!0}),e.tr},n.prototype._onDragStart=function(e){var t=this;this.mousemove||(this.mousemove=i.addEventListener(document,"mousemove",function(e){t._onDrag(e)})),this.mouseup||(this.mouseup=i.addEventListener(document,"mouseup",function(e){t._onDragEnd(e)})),this.editor.highlighter.lock(),this.drag={oldCursor:document.body.style.cursor,startParent:this.parent,startIndex:this.parent.childs.indexOf(this),mouseX:e.pageX,level:this.getLevel()},document.body.style.cursor="move",e.preventDefault()},n.prototype._onDrag=function(e){var t,s,r,a,d,l,h,c,u,p,f,m,v,g,y=e.pageY,x=e.pageX,C=!1;if(t=this.dom.tr,u=i.getAbsoluteTop(t),m=t.offsetHeight,u>y){s=t;do s=s.previousSibling,h=n.getNodeFromTarget(s),p=s?i.getAbsoluteTop(s):0;while(s&&p>y);h&&!h.parent&&(h=void 0),h||(l=t.parentNode.firstChild,s=l?l.nextSibling:void 0,h=n.getNodeFromTarget(s),h==this&&(h=void 0)),h&&(s=h.dom.tr,p=s?i.getAbsoluteTop(s):0,y>p+m&&(h=void 0)),h&&(h.parent.moveBefore(this,h),C=!0)}else if(d=this.expanded&&this.append?this.append.getDom():this.dom.tr,a=d?d.nextSibling:void 0){f=i.getAbsoluteTop(a),r=a;do c=n.getNodeFromTarget(r),r&&(v=r.nextSibling?i.getAbsoluteTop(r.nextSibling):0,g=r?v-f:0,1==c.parent.childs.length&&c.parent.childs[0]==this&&(u+=23)),r=r.nextSibling;while(r&&y>u+g);if(c&&c.parent){var _=x-this.drag.mouseX,b=Math.round(_/24/2),E=this.drag.level+b,N=c.getLevel();for(s=c.dom.tr.previousSibling;E>N&&s;){if(h=n.getNodeFromTarget(s),h==this||h._isChildOf(this));else{if(!(h instanceof o))break;var w=h.parent.childs;if(!(w.length>1||1==w.length&&w[0]!=this))break;c=n.getNodeFromTarget(s),N=c.getLevel()}s=s.previousSibling}d.nextSibling!=c.dom.tr&&(c.parent.moveBefore(this,c),C=!0)}}C&&(this.drag.mouseX=x,this.drag.level=this.getLevel()),this.editor.startAutoScroll(y),e.preventDefault()},n.prototype._onDragEnd=function(e){var t={node:this,startParent:this.drag.startParent,startIndex:this.drag.startIndex,endParent:this.parent,endIndex:this.parent.childs.indexOf(this)};(t.startParent!=t.endParent||t.startIndex!=t.endIndex)&&this.editor._onAction("moveNode",t),document.body.style.cursor=this.drag.oldCursor,this.editor.highlighter.unlock(),delete this.drag,this.mousemove&&(i.removeEventListener(document,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&(i.removeEventListener(document,"mouseup",this.mouseup),delete this.mouseup),this.editor.stopAutoScroll(),e.preventDefault()},n.prototype._isChildOf=function(e){for(var t=this.parent;t;){if(t==e)return!0;t=t.parent}return!1},n.prototype._createDomField=function(){return document.createElement("div")},n.prototype.setHighlight=function(e){this.dom.tr&&(this.dom.tr.className=e?"highlight":"",this.append&&this.append.setHighlight(e),this.childs&&this.childs.forEach(function(t){t.setHighlight(e)}))},n.prototype.updateValue=function(e){this.value=e,this.updateDom()},n.prototype.updateField=function(e){this.field=e,this.updateDom()},n.prototype.updateDom=function(e){var t=this.dom.tree;t&&(t.style.marginLeft=24*this.getLevel()+"px");var i=this.dom.field;if(i){1==this.fieldEditable?(i.contentEditable=this.editor.mode.edit,i.spellcheck=!1,i.className="field"):i.className="readonly";var n;n=void 0!=this.index?this.index:void 0!=this.field?this.field:this._hasChilds()?this.type:"",i.innerHTML=this._escapeHTML(n)}var o=this.dom.value;if(o){var s=this.childs?this.childs.length:0;o.innerHTML="array"==this.type?"["+s+"]":"object"==this.type?"{"+s+"}":this._escapeHTML(this.value)}this._updateDomField(),this._updateDomValue(),e&&1==e.updateIndexes&&this._updateDomIndexes(),e&&1==e.recurse&&this.childs&&this.childs.forEach(function(t){t.updateDom(e)}),this.append&&this.append.updateDom()},n.prototype._updateDomIndexes=function(){var e=this.dom.value,t=this.childs;e&&t&&("array"==this.type?t.forEach(function(e,t){e.index=t;var i=e.dom.field;i&&(i.innerHTML=t)}):"object"==this.type&&t.forEach(function(e){void 0!=e.index&&(delete e.index,void 0==e.field&&(e.field=""))}))},n.prototype._createDomValue=function(){var e;return"array"==this.type?(e=document.createElement("div"),e.className="readonly",e.innerHTML="[...]"):"object"==this.type?(e=document.createElement("div"),e.className="readonly",e.innerHTML="{...}"):!this.editor.mode.edit&&i.isUrl(this.value)?(e=document.createElement("a"),e.className="value",e.href=this.value,e.target="_blank",e.innerHTML=this._escapeHTML(this.value)):(e=document.createElement("div"),e.contentEditable=!this.editor.mode.view,e.spellcheck=!1,e.className="value",e.innerHTML=this._escapeHTML(this.value)),e},n.prototype._createDomExpandButton=function(){var e=document.createElement("button");return this._hasChilds()?(e.className=this.expanded?"expanded":"collapsed",e.title="Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs."):(e.className="invisible",e.title=""),e},n.prototype._createDomTree=function(){var e=this.dom,t=document.createElement("table"),i=document.createElement("tbody");t.style.borderCollapse="collapse",t.className="values",t.appendChild(i);var n=document.createElement("tr");i.appendChild(n);var o=document.createElement("td");o.className="tree",n.appendChild(o),e.expand=this._createDomExpandButton(),o.appendChild(e.expand),e.tdExpand=o;var s=document.createElement("td");s.className="tree",n.appendChild(s),e.field=this._createDomField(),s.appendChild(e.field),e.tdField=s;var r=document.createElement("td");r.className="tree",n.appendChild(r),"object"!=this.type&&"array"!=this.type&&(r.appendChild(document.createTextNode(":")),r.className="separator"),e.tdSeparator=r;var a=document.createElement("td");return a.className="tree",n.appendChild(a),e.value=this._createDomValue(),a.appendChild(e.value),e.tdValue=a,t},n.prototype.onEvent=function(e){var t,n=e.type,o=e.target||e.srcElement,s=this.dom,r=this,a=this._hasChilds();if((o==s.drag||o==s.menu)&&("mouseover"==n?this.editor.highlighter.highlight(this):"mouseout"==n&&this.editor.highlighter.unhighlight()),"mousedown"==n&&o==s.drag&&this._onDragStart(e),"click"==n&&o==s.menu){var d=r.editor.highlighter;d.highlight(r),d.lock(),i.addClassName(s.menu,"selected"),this.showContextMenu(s.menu,function(){i.removeClassName(s.menu,"selected"),d.unlock(),d.unhighlight()})}if("click"==n&&o==s.expand&&a){var l=e.ctrlKey;this._onExpand(l)}var h=s.value;if(o==h)switch(n){case"focus":t=this;break;case"blur":case"change":this._getDomValue(!0),this._updateDomValue(),this.value&&(h.innerHTML=this._escapeHTML(this.value));break;case"input":this._getDomValue(!0),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"click":e.ctrlKey&&this.editor.mode.edit&&i.isUrl(this.value)&&window.open(this.value,"_blank");break;case"keyup":this._getDomValue(!0),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){r._getDomValue(!0),r._updateDomValue()},1)}var c=s.field;if(o==c)switch(n){case"focus":t=this;break;case"blur":case"change":this._getDomField(!0),this._updateDomField(),this.field&&(c.innerHTML=this._escapeHTML(this.field));break;case"input":this._getDomField(!0),this._updateDomField();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"keyup":this._getDomField(!0),this._updateDomField();break;case"cut":case"paste":setTimeout(function(){r._getDomField(!0),r._updateDomField()},1)}var u=s.tree;if(o==u.parentNode)switch(n){case"click":var p=void 0!=e.offsetX?e.offsetX<24*(this.getLevel()+1):e.pageXn[i]?t:e[i]/g,">").replace(/ /g," ").replace(/^ /," ").replace(/ $/," "),i=JSON.stringify(t);return i.substring(1,i.length-1)},n.prototype._unescapeHTML=function(e){var t='"'+this._escapeJSON(e)+'"',n=i.parse(t);return n.replace(/</g,"<").replace(/>/g,">").replace(/ |\u00A0/g," ")},n.prototype._escapeJSON=function(e){for(var t="",i=0,n=e.length;n>i;){var o=e.charAt(i);"\n"==o?t+="\\n":"\\"==o?(t+=o,i++,o=e.charAt(i),-1=='"\\/bfnrtu'.indexOf(o)&&(t+="\\"),t+=o):t+='"'==o?'\\"':o,i++}return t};var o=t(n);return n}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(e,t,i){var n,o;n=[i(9)],o=function(e){function t(t,i,n){function o(e){t.setMode(e);var i=t.dom&&t.dom.modeBox;i&&i.focus()}for(var s={code:{text:"Code",title:"Switch to code highlighter",click:function(){o("code")}},form:{text:"Form",title:"Switch to form editor",click:function(){o("form")}},text:{text:"Text",title:"Switch to plain text editor",click:function(){o("text")}},tree:{text:"Tree",title:"Switch to tree editor",click:function(){o("tree")}},view:{text:"View",title:"Switch to tree view",click:function(){o("view")}}},r=[],a=0;a',a.appendChild(c),o.submenuTitle&&(c.title=o.submenuTitle),h=c}else{var u=document.createElement("div");u.className="expand",d.appendChild(u),h=d}h.onclick=function(){n._onExpandItem(r),h.focus()};var p=[];r.subItems=p;var f=document.createElement("ul");r.ul=f,f.className="menu",f.style.height="0",a.appendChild(f),i(f,p,o.submenu)}else d.innerHTML=''+o.text;t.push(r)}})}this.dom={};var n=this,o=this.dom;this.anchor=void 0,this.items=e,this.eventListeners={},this.selection=void 0,this.visibleSubmenu=void 0,this.onClose=t?t.close:void 0;var s=document.createElement("div");s.className="jsoneditor-contextmenu",o.menu=s;var r=document.createElement("ul");r.className="menu",s.appendChild(r),o.list=r,o.items=[];var a=document.createElement("button");o.focusButton=a;var d=document.createElement("li");d.style.overflow="hidden",d.style.height="0",d.appendChild(a),r.appendChild(d),i(r,this.dom.items,e),this.maxHeight=0,e.forEach(function(t){var i=24*(e.length+(t.submenu?t.submenu.length:0));n.maxHeight=Math.max(n.maxHeight,i)})}return t.prototype._getVisibleButtons=function(){var e=[],t=this;return this.dom.items.forEach(function(i){e.push(i.button),i.buttonExpand&&e.push(i.buttonExpand),i.subItems&&i==t.expandedItem&&i.subItems.forEach(function(t){e.push(t.button),t.buttonExpand&&e.push(t.buttonExpand)})}),e},t.visibleMenu=void 0,t.prototype.show=function(i){this.hide();var n=window.innerHeight,o=window.pageYOffset||document.scrollTop||0,s=n+o,r=i.offsetHeight,a=this.maxHeight,d=e.getAbsoluteLeft(i),l=e.getAbsoluteTop(i);s>l+r+a?(this.dom.menu.style.left=d+"px",this.dom.menu.style.top=l+r+"px",this.dom.menu.style.bottom=""):(this.dom.menu.style.left=d+"px",this.dom.menu.style.top="",this.dom.menu.style.bottom=n-l+"px"),document.body.appendChild(this.dom.menu);var h=this,c=this.dom.list;this.eventListeners.mousedown=e.addEventListener(document,"mousedown",function(e){var t=e.target;t==c||h._isChildOf(t,c)||(h.hide(),e.stopPropagation(),e.preventDefault())}),this.eventListeners.mousewheel=e.addEventListener(document,"mousewheel",function(e){e.stopPropagation(),e.preventDefault()}),this.eventListeners.keydown=e.addEventListener(document,"keydown",function(e){h._onKeyDown(e)}),this.selection=e.getSelection(),this.anchor=i,setTimeout(function(){h.dom.focusButton.focus()},0),t.visibleMenu&&t.visibleMenu.hide(),t.visibleMenu=this},t.prototype.hide=function(){this.dom.menu.parentNode&&(this.dom.menu.parentNode.removeChild(this.dom.menu),this.onClose&&this.onClose());for(var i in this.eventListeners)if(this.eventListeners.hasOwnProperty(i)){var n=this.eventListeners[i];n&&e.removeEventListener(document,i,n),delete this.eventListeners[i]}t.visibleMenu==this&&(t.visibleMenu=void 0)},t.prototype._onExpandItem=function(t){var i=this,n=t==this.expandedItem,o=this.expandedItem;if(o&&(o.ul.style.height="0",o.ul.style.padding="",setTimeout(function(){i.expandedItem!=o&&(o.ul.style.display="",e.removeClassName(o.ul.parentNode,"selected"))},300),this.expandedItem=void 0),!n){var s=t.ul;s.style.display="block";{s.clientHeight}setTimeout(function(){i.expandedItem==t&&(s.style.height=24*s.childNodes.length+"px",s.style.padding="5px 10px")},0),e.addClassName(s.parentNode,"selected"),this.expandedItem=t}},t.prototype._onKeyDown=function(t){var i,n,o,s,r=t.target,a=t.which,d=!1;27==a?(this.selection&&e.setSelection(this.selection),this.anchor&&this.anchor.focus(),this.hide(),d=!0):9==a?t.shiftKey?(i=this._getVisibleButtons(),n=i.indexOf(r),0==n&&(i[i.length-1].focus(),d=!0)):(i=this._getVisibleButtons(),n=i.indexOf(r),n==i.length-1&&(i[0].focus(),d=!0)):37==a?("expand"==r.className&&(i=this._getVisibleButtons(),n=i.indexOf(r),o=i[n-1],o&&o.focus()),d=!0):38==a?(i=this._getVisibleButtons(),n=i.indexOf(r),o=i[n-1],o&&"expand"==o.className&&(o=i[n-2]),o||(o=i[i.length-1]),o&&o.focus(),d=!0):39==a?(i=this._getVisibleButtons(),n=i.indexOf(r),s=i[n+1],s&&"expand"==s.className&&s.focus(),d=!0):40==a&&(i=this._getVisibleButtons(),n=i.indexOf(r),s=i[n+1],s&&"expand"==s.className&&(s=i[n+2]),s||(s=i[0]),s&&(s.focus(),d=!0),d=!0),d&&(t.stopPropagation(),t.preventDefault())},t.prototype._isChildOf=function(e,t){for(var i=e.parentNode;i;){if(i==t)return!0;i=i.parentNode}return!1},t}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(e,t,i){var n,o;n=[i(9),i(3)],o=function(e,t){function i(i){function n(e){this.editor=e,this.dom={}}return n.prototype=new i,n.prototype.getDom=function(){var e=this.dom;if(e.tr)return e.tr;var t=document.createElement("tr");if(t.node=this,e.tr=t,this.editor.mode.edit){e.tdDrag=document.createElement("td");var i=document.createElement("td");e.tdMenu=i;var n=document.createElement("button");n.className="contextmenu",n.title="Click to open the actions menu (Ctrl+M)",e.menu=n,i.appendChild(e.menu)}var o=document.createElement("td"),s=document.createElement("div");return s.innerHTML="(empty)",s.className="readonly",o.appendChild(s),e.td=o,e.text=s,this.updateDom(),t},n.prototype.updateDom=function(){var e=this.dom,t=e.td;t&&(t.style.paddingLeft=24*this.getLevel()+26+"px");var i=e.text;i&&(i.innerHTML="(empty "+this.parent.type+")");var n=e.tr;this.isVisible()?e.tr.firstChild||(e.tdDrag&&n.appendChild(e.tdDrag),e.tdMenu&&n.appendChild(e.tdMenu),n.appendChild(t)):e.tr.firstChild&&(e.tdDrag&&n.removeChild(e.tdDrag),e.tdMenu&&n.removeChild(e.tdMenu),n.removeChild(t))},n.prototype.isVisible=function(){return 0==this.parent.childs.length},n.prototype.showContextMenu=function(t,n){var o=this,s=i.TYPE_TITLES,r=[{text:"Append",title:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",submenuTitle:"Select the type of the field to be appended",className:"insert",click:function(){o._onAppend("","","auto")},submenu:[{text:"Auto",className:"type-auto",title:s.auto,click:function(){o._onAppend("","","auto")}},{text:"Array",className:"type-array",title:s.array,click:function(){o._onAppend("",[])}},{text:"Object",className:"type-object",title:s.object,click:function(){o._onAppend("",{})}},{text:"String",className:"type-string",title:s.string,click:function(){o._onAppend("","","string")}}]}],a=new e(r,{close:n});a.show(t)},n.prototype.onEvent=function(e){var i=e.type,n=e.target||e.srcElement,o=this.dom,s=o.menu;if(n==s&&("mouseover"==i?this.editor.highlighter.highlight(this.parent):"mouseout"==i&&this.editor.highlighter.unhighlight()),"click"==i&&n==o.menu){var r=this.editor.highlighter;r.highlight(this.parent),r.lock(),t.addClassName(o.menu,"selected"),this.showContextMenu(o.menu,function(){t.removeClassName(o.menu,"selected"),r.unlock(),r.unhighlight()})}"keydown"==i&&this.onKeyDown(e)},n}return i}.apply(null,n),!(void 0!==o&&(e.exports=o))}])});
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):"object"==typeof exports?exports.JSONEditor=t():e.JSONEditor=t()}(this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var n,o;n=[i(1),i(2),i(3)],o=function(e,t,i){function n(e,t,o){if(!(this instanceof n))throw new Error('JSONEditor constructor called without "new".');var s=i.getInternetExplorerVersion();if(-1!=s&&9>s)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");arguments.length&&this._create(e,t,o)}return n.modes={},n.prototype._create=function(e,t,i){this.container=e,this.options=t||{},this.json=i||{};var n=this.options.mode||"tree";this.setMode(n)},n.prototype._delete=function(){},n.prototype.set=function(e){this.json=e},n.prototype.get=function(){return this.json},n.prototype.setText=function(e){this.json=i.parse(e)},n.prototype.getText=function(){return JSON.stringify(this.json)},n.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},n.prototype.getName=function(){return this.options&&this.options.name},n.prototype.setMode=function(e){var t,o,s=this.container,r=i.extend({},this.options);r.mode=e;var a=n.modes[e];if(!a)throw new Error('Unknown mode "'+r.mode+'"');try{var l="text"==a.data;if(o=this.getName(),t=this[l?"getText":"get"](),this._delete(),i.clear(this),i.extend(this,a.mixin),this.create(s,r),this.setName(o),this[l?"setText":"set"](t),"function"==typeof a.load)try{a.load.call(this)}catch(d){}}catch(d){this._onError(d)}},n.prototype._onError=function(e){if("function"==typeof this.onError&&(i.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(e)),!this.options||"function"!=typeof this.options.error)throw e;this.options.error(e)},n.registerMode=function(e){var t,o;if(i.isArray(e))for(t=0;te&&i.scrollTop>0?(n+a-e)/3:e>r-a&&o+i.scrollTop3?(i.scrollTop+=o/3,n.animateCallback=t,n.animateTimeout=setTimeout(a,50)):(t&&t(!0),i.scrollTop=r,delete n.animateTimeout,delete n.animateCallback)};a()}else t&&t(!1)},r._createFrame=function(){function e(e){t._onEvent(e)}this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.container.appendChild(this.frame);var t=this;this.frame.onclick=function(t){var i=t.target;e(t),"BUTTON"==i.nodeName&&t.preventDefault()},this.frame.oninput=e,this.frame.onchange=e,this.frame.onkeydown=e,this.frame.onkeyup=e,this.frame.oncut=e,this.frame.onpaste=e,this.frame.onmousedown=e,this.frame.onmouseup=e,this.frame.onmouseover=e,this.frame.onmouseout=e,s.addEventListener(this.frame,"focus",e,!0),s.addEventListener(this.frame,"blur",e,!0),this.frame.onfocusin=e,this.frame.onfocusout=e,this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var n=document.createElement("button");n.className="expand-all",n.title="Expand all fields",n.onclick=function(){t.expandAll()},this.menu.appendChild(n);var r=document.createElement("button");if(r.title="Collapse all fields",r.className="collapse-all",r.onclick=function(){t.collapseAll()},this.menu.appendChild(r),this.history){var a=document.createElement("button");a.className="undo separator",a.title="Undo last action (Ctrl+Z)",a.onclick=function(){t._onUndo()},this.menu.appendChild(a),this.dom.undo=a;var l=document.createElement("button");l.className="redo",l.title="Redo (Ctrl+Shift+Z)",l.onclick=function(){t._onRedo()},this.menu.appendChild(l),this.dom.redo=l,this.history.onChange=function(){a.disabled=!t.history.canUndo(),l.disabled=!t.history.canRedo()},this.history.onChange()}if(this.options&&this.options.modes&&this.options.modes.length){var d=o.create(this,this.options.modes,this.options.mode);this.menu.appendChild(d),this.dom.modeBox=d}this.options.search&&(this.searchBox=new i(this,this.menu))},r._onUndo=function(){this.history&&(this.history.undo(),this.options.change&&this.options.change())},r._onRedo=function(){this.history&&(this.history.redo(),this.options.change&&this.options.change())},r._onEvent=function(e){var t=e.target;"keydown"==e.type&&this._onKeyDown(e),"focus"==e.type&&(l=t);var i=n.getNodeFromTarget(t);i&&i.onEvent(e)},r._onKeyDown=function(e){var t=e.which||e.keyCode,i=e.ctrlKey,n=e.shiftKey,o=!1;if(9==t&&setTimeout(function(){s.selectContentEditable(l)},0),this.searchBox)if(i&&70==t)this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),o=!0;else if(114==t||i&&71==t){var r=!0;n?this.searchBox.previous(r):this.searchBox.next(r),o=!0}this.history&&(i&&!n&&90==t?(this._onUndo(),o=!0):i&&n&&90==t&&(this._onRedo(),o=!0)),o&&(e.preventDefault(),e.stopPropagation())},r._createTable=function(){var e=document.createElement("div");e.className="outer",this.contentOuter=e,this.content=document.createElement("div"),this.content.className="tree",e.appendChild(this.content),this.table=document.createElement("table"),this.table.className="tree",this.content.appendChild(this.table);var t;this.colgroupContent=document.createElement("colgroup"),this.mode.edit&&(t=document.createElement("col"),t.width="24px",this.colgroupContent.appendChild(t)),t=document.createElement("col"),t.width="24px",this.colgroupContent.appendChild(t),t=document.createElement("col"),this.colgroupContent.appendChild(t),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(e)},[{mode:"tree",mixin:r,data:"json"},{mode:"view",mixin:r,data:"json"},{mode:"form",mixin:r,data:"json"}]}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(e,t,i){var n,o;n=[i(4),i(3)],o=function(e,t){var i={};return i.create=function(i,n){n=n||{},this.options=n,this.indentation=n.indentation?Number(n.indentation):2,this.mode="code"==n.mode?"code":"text","code"==this.mode&&"undefined"==typeof ace&&(this.mode="text",t.log("WARNING: Cannot load code editor, Ace library not loaded. Falling back to plain text editor"));var o=this;this.container=i,this.dom={},this.editor=void 0,this.textarea=void 0,this.width=i.clientWidth,this.height=i.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.frame.onclick=function(e){e.preventDefault()},this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var s=document.createElement("button");s.className="format",s.title="Format JSON data, with proper indentation and line feeds",this.menu.appendChild(s),s.onclick=function(){try{o.format()}catch(e){o._onError(e)}};var r=document.createElement("button");if(r.className="compact",r.title="Compact JSON data, remove all whitespaces",this.menu.appendChild(r),r.onclick=function(){try{o.compact()}catch(e){o._onError(e)}},this.options&&this.options.modes&&this.options.modes.length){var a=e.create(this,this.options.modes,this.options.mode);this.menu.appendChild(a),this.dom.modeBox=a}if(this.content=document.createElement("div"),this.content.className="outer",this.frame.appendChild(this.content),this.container.appendChild(this.frame),"code"==this.mode){this.editorDom=document.createElement("div"),this.editorDom.style.height="100%",this.editorDom.style.width="100%",this.content.appendChild(this.editorDom);var l=ace.edit(this.editorDom);l.setTheme("ace/theme/jsoneditor"),l.setShowPrintMargin(!1),l.setFontSize(13),l.getSession().setMode("ace/mode/json"),l.getSession().setTabSize(2),l.getSession().setUseSoftTabs(!0),l.getSession().setUseWrapMode(!0),this.editor=l;var d=document.createElement("a");d.appendChild(document.createTextNode("powered by ace")),d.href="http://ace.ajax.org",d.target="_blank",d.className="poweredBy",d.onclick=function(){window.open(d.href,d.target)},this.menu.appendChild(d),n.change&&l.on("change",function(){n.change()})}else{var h=document.createElement("textarea");h.className="text",h.spellcheck=!1,this.content.appendChild(h),this.textarea=h,n.change&&(null===this.textarea.oninput?this.textarea.oninput=function(){n.change()}:this.textarea.onchange=function(){n.change()})}},i._delete=function(){this.frame&&this.container&&this.frame.parentNode==this.container&&this.container.removeChild(this.frame)},i._onError=function(e){if("function"==typeof this.onError&&(t.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(e)),!this.options||"function"!=typeof this.options.error)throw e;this.options.error(e)},i.compact=function(){var e=t.parse(this.getText());this.setText(JSON.stringify(e))},i.format=function(){var e=t.parse(this.getText());this.setText(JSON.stringify(e,null,this.indentation))},i.focus=function(){this.textarea&&this.textarea.focus(),this.editor&&this.editor.focus()},i.resize=function(){if(this.editor){var e=!1;this.editor.resize(e)}},i.set=function(e){this.setText(JSON.stringify(e,null,this.indentation))},i.get=function(){return t.parse(this.getText())},i.getText=function(){return this.textarea?this.textarea.value:this.editor?this.editor.getValue():""},i.setText=function(e){this.textarea&&(this.textarea.value=e),this.editor&&this.editor.setValue(e,-1)},[{mode:"text",mixin:i,data:"text",load:i.format},{mode:"code",mixin:i,data:"text",load:i.format}]}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_RESULT__=function(){var util={};util.parse=function parse(jsonString){try{return JSON.parse(jsonString)}catch(err){try{return eval("("+jsonString+")")}catch(err2){throw util.validate(jsonString),err}}},util.validate=function(e){"undefined"!=typeof jsonlint?jsonlint.parse(e):JSON.parse(e)},util.extend=function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},util.clear=function(e){for(var t in e)e.hasOwnProperty(t)&&delete e[t];return e},util.log=function(){"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)},util.type=function(e){return null===e?"null":void 0===e?"undefined":e instanceof Number||"number"==typeof e?"number":e instanceof String||"string"==typeof e?"string":e instanceof Boolean||"boolean"==typeof e?"boolean":e instanceof RegExp||"regexp"==typeof e?"regexp":util.isArray(e)?"array":"object"};var isUrlRegex=/^https?:\/\/\S+$/;util.isUrl=function(e){return("string"==typeof e||e instanceof String)&&isUrlRegex.test(e)},util.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},util.getAbsoluteLeft=function(e){var t=e.getBoundingClientRect();return t.left+window.pageXOffset||document.scrollLeft||0},util.getAbsoluteTop=function(e){var t=e.getBoundingClientRect();return t.top+window.pageYOffset||document.scrollTop||0},util.addClassName=function(e,t){var i=e.className.split(" ");-1==i.indexOf(t)&&(i.push(t),e.className=i.join(" "))},util.removeClassName=function(e,t){var i=e.className.split(" "),n=i.indexOf(t);-1!=n&&(i.splice(n,1),e.className=i.join(" "))},util.stripFormatting=function(e){for(var t=e.childNodes,i=0,n=t.length;n>i;i++){var o=t[i];o.style&&o.removeAttribute("style");var s=o.attributes;if(s)for(var r=s.length-1;r>=0;r--){var a=s[r];1==a.specified&&o.removeAttribute(a.name)}util.stripFormatting(o)}},util.setEndOfContentEditable=function(e){var t,i;document.createRange&&(t=document.createRange(),t.selectNodeContents(e),t.collapse(!1),i=window.getSelection(),i.removeAllRanges(),i.addRange(t))},util.selectContentEditable=function(e){if(e&&"DIV"==e.nodeName){var t,i;window.getSelection&&document.createRange&&(i=document.createRange(),i.selectNodeContents(e),t=window.getSelection(),t.removeAllRanges(),t.addRange(i))}},util.getSelection=function(){if(window.getSelection){var e=window.getSelection();if(e.getRangeAt&&e.rangeCount)return e.getRangeAt(0)}return null},util.setSelection=function(e){if(e&&window.getSelection){var t=window.getSelection();t.removeAllRanges(),t.addRange(e)}},util.getSelectionOffset=function(){var e=util.getSelection();return e&&"startOffset"in e&&"endOffset"in e&&e.startContainer&&e.startContainer==e.endContainer?{startOffset:e.startOffset,endOffset:e.endOffset,container:e.startContainer.parentNode}:null},util.setSelectionOffset=function(e){if(document.createRange&&window.getSelection){var t=window.getSelection();if(t){var i=document.createRange();i.setStart(e.container.firstChild,e.startOffset),i.setEnd(e.container.firstChild,e.endOffset),util.setSelection(i)}}},util.getInnerText=function(e,t){var i=void 0==t;if(i&&(t={text:"",flush:function(){var e=this.text;return this.text="",e},set:function(e){this.text=e}}),e.nodeValue)return t.flush()+e.nodeValue;if(e.hasChildNodes()){for(var n=e.childNodes,o="",s=0,r=n.length;r>s;s++){var a=n[s];if("DIV"==a.nodeName||"P"==a.nodeName){var l=n[s-1],d=l?l.nodeName:void 0;d&&"DIV"!=d&&"P"!=d&&"BR"!=d&&(o+="\n",t.flush()),o+=util.getInnerText(a,t),t.set("\n")}else"BR"==a.nodeName?(o+=t.flush(),t.set("\n")):o+=util.getInnerText(a,t)}return o}return"P"==e.nodeName&&-1!=util.getInternetExplorerVersion()?t.flush():""},util.getInternetExplorerVersion=function(){if(-1==_ieVersion){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent,i=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=i.exec(t)&&(e=parseFloat(RegExp.$1))}_ieVersion=e}return _ieVersion},util.isFirefox=function(){return-1!=navigator.userAgent.indexOf("Firefox")};var _ieVersion=-1;return util.addEventListener=function(e,t,i,n){if(e.addEventListener)return void 0===n&&(n=!1),"mousewheel"===t&&util.isFirefox()&&(t="DOMMouseScroll"),e.addEventListener(t,i,n),i;if(e.attachEvent){var o=function(){return i.call(e,window.event)};return e.attachEvent("on"+t,o),o}},util.removeEventListener=function(e,t,i,n){e.removeEventListener?(void 0===n&&(n=!1),"mousewheel"===t&&util.isFirefox()&&(t="DOMMouseScroll"),e.removeEventListener(t,i,n)):e.detachEvent&&e.detachEvent("on"+t,i)},util}.call(exports,__webpack_require__,exports,module),!(void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))},function(e,t,i){var n,o;n=[i(9)],o=function(e){function t(t,i,n){function o(e){t.setMode(e);var i=t.dom&&t.dom.modeBox;i&&i.focus()}for(var s={code:{text:"Code",title:"Switch to code highlighter",click:function(){o("code")}},form:{text:"Form",title:"Switch to form editor",click:function(){o("form")}},text:{text:"Text",title:"Switch to plain text editor",click:function(){o("text")}},tree:{text:"Tree",title:"Switch to tree editor",click:function(){o("tree")}},view:{text:"View",title:"Switch to tree view",click:function(){o("view")}}},r=[],a=0;a=0},t.prototype.canRedo=function(){return this.indexthis.results.length-1&&(t=0),this._setActiveResult(t,e)}},e.prototype.previous=function(e){if(void 0!=this.results){var t=this.results.length-1,i=void 0!=this.resultIndex?this.resultIndex-1:t;0>i&&(i=t),this._setActiveResult(i,e)}},e.prototype._setActiveResult=function(e,t){if(this.activeResult){var i=this.activeResult.node,n=this.activeResult.elem;"field"==n?delete i.searchFieldActive:delete i.searchValueActive,i.updateDom()}if(!this.results||!this.results[e])return this.resultIndex=void 0,void(this.activeResult=void 0);this.resultIndex=e;var o=this.results[this.resultIndex].node,s=this.results[this.resultIndex].elem;"field"==s?o.searchFieldActive=!0:o.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],o.updateDom(),o.scrollTo(function(){t&&o.focus(s)})},e.prototype._clearDelay=function(){void 0!=this.timeout&&(clearTimeout(this.timeout),delete this.timeout)},e.prototype._onDelayedSearch=function(){this._clearDelay();var e=this;this.timeout=setTimeout(function(t){e._onSearch(t)},this.delay)},e.prototype._onSearch=function(e,t){this._clearDelay();var i=this.dom.search.value,n=i.length>0?i:void 0;if(n!=this.lastText||t)if(this.lastText=n,this.results=this.editor.search(n),this._setActiveResult(void 0),void 0!=n){var o=this.results.length;switch(o){case 0:this.dom.results.innerHTML="no results";break;case 1:this.dom.results.innerHTML="1 result";break;default:this.dom.results.innerHTML=o+" results"}}else this.dom.results.innerHTML=""},e.prototype._onKeyDown=function(e){var t=e.which;27==t?(this.dom.search.value="",this._onSearch(e),e.preventDefault(),e.stopPropagation()):13==t&&(e.ctrlKey?this._onSearch(e,!0):e.shiftKey?this.previous():this.next(),e.preventDefault(),e.stopPropagation())},e.prototype._onKeyUp=function(e){var t=e.keyCode;27!=t&&13!=t&&this._onDelayedSearch(e)},e}.call(t,i,t,e),!(void 0!==n&&(e.exports=n))},function(e,t,i){var n,o;n=[i(9),i(10),i(3)],o=function(e,t,i){function n(e,t){this.editor=e,this.dom={},this.expanded=!1,t&&t instanceof Object?(this.setField(t.field,t.fieldEditable),this.setValue(t.value,t.type)):(this.setField(""),this.setValue(null)),this._setEditability(e)}n.prototype._setEditability=function(e){if(this.editable={field:!0,value:!0},e&&(this.editable.field="view"!=this.editor.options.mode&&"form"!=this.editor.options.mode,this.editable.value="view"!=this.editor.options.mode,"function"==typeof e.options.editable)){var t=e.options.editable({field:this.field});"boolean"==typeof t?(this.editable.field=t,this.editable.value=t):("boolean"==typeof t.field&&(this.editable.field=t.field),"boolean"==typeof t.value&&(this.editable.value=t.value))}},n.prototype.setParent=function(e){this.parent=e},n.prototype.setField=function(e,t){this.field=e,this.fieldEditable=1==t},n.prototype.getField=function(){return void 0===this.field&&this._getDomField(),this.field},n.prototype.setValue=function(e,t){var i,o,s=this.childs;if(s)for(;s.length;)this.removeChild(s[0]);if(this.type=this._getType(e),t&&t!=this.type){if("string"!=t||"auto"!=this.type)throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+t+'"');this.type=t}if("array"==this.type){this.childs=[];for(var r=0,a=e.length;a>r;r++)i=e[r],void 0===i||i instanceof Function||(o=new n(this.editor,{value:i}),this.appendChild(o));this.value=""}else if("object"==this.type){this.childs=[];for(var l in e)e.hasOwnProperty(l)&&(i=e[l],void 0===i||i instanceof Function||(o=new n(this.editor,{field:l,value:i}),this.appendChild(o)));this.value=""}else this.childs=void 0,this.value=e},n.prototype.getValue=function(){if("array"==this.type){var e=[];return this.childs.forEach(function(t){e.push(t.getValue())}),e}if("object"==this.type){var t={};return this.childs.forEach(function(e){t[e.getField()]=e.getValue()}),t}return void 0===this.value&&this._getDomValue(),this.value},n.prototype.getLevel=function(){return this.parent?this.parent.getLevel()+1:0},n.prototype.clone=function(){var e=new n(this.editor);if(e.type=this.type,e.field=this.field,e.fieldInnerText=this.fieldInnerText,e.fieldEditable=this.fieldEditable,e.value=this.value,e.valueInnerText=this.valueInnerText,e.expanded=this.expanded,this.childs){var t=[];this.childs.forEach(function(i){var n=i.clone();n.setParent(e),t.push(n)}),e.childs=t}else e.childs=void 0;return e},n.prototype.expand=function(e){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="expanded"),this.showChilds(),0!=e&&this.childs.forEach(function(t){t.expand(e)}))},n.prototype.collapse=function(e){this.childs&&(this.hideChilds(),0!=e&&this.childs.forEach(function(t){t.collapse(e)}),this.dom.expand&&(this.dom.expand.className="collapsed"),this.expanded=!1)},n.prototype.showChilds=function(){var e=this.childs;if(e&&this.expanded){var t=this.dom.tr,i=t?t.parentNode:void 0;if(i){var n=this.getAppend(),o=t.nextSibling;o?i.insertBefore(n,o):i.appendChild(n),this.childs.forEach(function(e){i.insertBefore(e.getDom(),n),e.showChilds()})}}},n.prototype.hide=function(){var e=this.dom.tr,t=e?e.parentNode:void 0;t&&t.removeChild(e),this.hideChilds()},n.prototype.hideChilds=function(){var e=this.childs;if(e&&this.expanded){var t=this.getAppend();t.parentNode&&t.parentNode.removeChild(t),this.childs.forEach(function(e){e.hide()})}},n.prototype.appendChild=function(e){if(this._hasChilds()){if(e.setParent(this),e.fieldEditable="object"==this.type,"array"==this.type&&(e.index=this.childs.length),this.childs.push(e),this.expanded){var t=e.getDom(),i=this.getAppend(),n=i?i.parentNode:void 0;i&&n&&n.insertBefore(t,i),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},n.prototype.moveBefore=function(e,t){if(this._hasChilds()){var i=this.dom.tr?this.dom.tr.parentNode:void 0;if(i){var n=document.createElement("tr");n.style.height=i.clientHeight+"px",i.appendChild(n)}e.parent&&e.parent.removeChild(e),t instanceof o?this.appendChild(e):this.insertBefore(e,t),i&&i.removeChild(n)}},n.prototype.moveTo=function(e,t){if(e.parent==this){var i=this.childs.indexOf(e);t>i&&t++}var n=this.childs[t]||this.append;this.moveBefore(e,n)},n.prototype.insertBefore=function(e,t){if(this._hasChilds()){if(t==this.append)e.setParent(this),e.fieldEditable="object"==this.type,this.childs.push(e);else{var i=this.childs.indexOf(t);if(-1==i)throw new Error("Node not found");e.setParent(this),e.fieldEditable="object"==this.type,this.childs.splice(i,0,e)}if(this.expanded){var n=e.getDom(),o=t.getDom(),s=o?o.parentNode:void 0;o&&s&&s.insertBefore(n,o),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},n.prototype.insertAfter=function(e,t){if(this._hasChilds()){var i=this.childs.indexOf(t),n=this.childs[i+1];n?this.insertBefore(e,n):this.appendChild(e)}},n.prototype.search=function(e){var t,i=[],n=e?e.toLowerCase():void 0;if(delete this.searchField,delete this.searchValue,void 0!=this.field){var o=String(this.field).toLowerCase();t=o.indexOf(n),-1!=t&&(this.searchField=!0,i.push({node:this,elem:"field"})),this._updateDomField()}if(this._hasChilds()){if(this.childs){var s=[];this.childs.forEach(function(t){s=s.concat(t.search(e))}),i=i.concat(s)}if(void 0!=n){var r=!1;0==s.length?this.collapse(r):this.expand(r)}}else{if(void 0!=this.value){var a=String(this.value).toLowerCase();t=a.indexOf(n),-1!=t&&(this.searchValue=!0,i.push({node:this,elem:"value"}))}this._updateDomValue()}return i},n.prototype.scrollTo=function(e){if(!this.dom.tr||!this.dom.tr.parentNode)for(var t=this.parent,i=!1;t;)t.expand(i),t=t.parent;this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,e)},n.focusElement=void 0,n.prototype.focus=function(e){if(n.focusElement=e,this.dom.tr&&this.dom.tr.parentNode){var t=this.dom;switch(e){case"drag":t.drag?t.drag.focus():t.menu.focus();
+break;case"menu":t.menu.focus();break;case"expand":this._hasChilds()?t.expand.focus():t.field&&this.fieldEditable?(t.field.focus(),i.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):t.menu.focus();break;case"field":t.field&&this.fieldEditable?(t.field.focus(),i.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):this._hasChilds()?t.expand.focus():t.menu.focus();break;case"value":default:t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):t.field&&this.fieldEditable?(t.field.focus(),i.selectContentEditable(t.field)):this._hasChilds()?t.expand.focus():t.menu.focus()}}},n.select=function(e){setTimeout(function(){i.selectContentEditable(e)},0)},n.prototype.blur=function(){this._getDomValue(!1),this._getDomField(!1)},n.prototype._duplicate=function(e){var t=e.clone();return this.insertAfter(t,e),t},n.prototype.containsNode=function(e){if(this==e)return!0;var t=this.childs;if(t)for(var i=0,n=t.length;n>i;i++)if(t[i].containsNode(e))return!0;return!1},n.prototype._move=function(e,t){if(e!=t){if(e.containsNode(this))throw new Error("Cannot move a field into a child of itself");e.parent&&e.parent.removeChild(e);var i=e.clone();e.clearDom(),t?this.insertBefore(i,t):this.appendChild(i)}},n.prototype.removeChild=function(e){if(this.childs){var t=this.childs.indexOf(e);if(-1!=t){e.hide(),delete e.searchField,delete e.searchValue;var i=this.childs.splice(t,1)[0];return this.updateDom({updateIndexes:!0}),i}}return void 0},n.prototype._remove=function(e){this.removeChild(e)},n.prototype.changeType=function(e){var t=this.type;if(t!=e){if("string"!=e&&"auto"!=e||"string"!=t&&"auto"!=t){var i,n=this.dom.tr?this.dom.tr.parentNode:void 0;i=this.expanded?this.getAppend():this.getDom();var o=i&&i.parentNode?i.nextSibling:void 0;this.hide(),this.clearDom(),this.type=e,"object"==e?(this.childs||(this.childs=[]),this.childs.forEach(function(e){e.clearDom(),delete e.index,e.fieldEditable=!0,void 0==e.field&&(e.field="")}),("string"==t||"auto"==t)&&(this.expanded=!0)):"array"==e?(this.childs||(this.childs=[]),this.childs.forEach(function(e,t){e.clearDom(),e.fieldEditable=!1,e.index=t}),("string"==t||"auto"==t)&&(this.expanded=!0)):this.expanded=!1,n&&(o?n.insertBefore(this.getDom(),o):n.appendChild(this.getDom())),this.showChilds()}else this.type=e;("auto"==e||"string"==e)&&(this.value="string"==e?String(this.value):this._stringCast(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0})}},n.prototype._getDomValue=function(e){if(this.dom.value&&"array"!=this.type&&"object"!=this.type&&(this.valueInnerText=i.getInnerText(this.dom.value)),void 0!=this.valueInnerText)try{var t;if("string"==this.type)t=this._unescapeHTML(this.valueInnerText);else{var n=this._unescapeHTML(this.valueInnerText);t=this._stringCast(n)}if(t!==this.value){var o=this.value;this.value=t,this.editor._onAction("editValue",{node:this,oldValue:o,newValue:t,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(s){if(this.value=void 0,1!=e)throw s}},n.prototype._updateDomValue=function(){var e=this.dom.value;if(e){var t=this.value,n="auto"==this.type?i.type(t):this.type,o="string"==n&&i.isUrl(t),s="";s=o&&!this.editable.value?"":"string"==n?"green":"number"==n?"red":"boolean"==n?"darkorange":this._hasChilds()?"":null===t?"#004ED0":"black",e.style.color=s;var r=""==String(this.value)&&"array"!=this.type&&"object"!=this.type;if(r?i.addClassName(e,"empty"):i.removeClassName(e,"empty"),o?i.addClassName(e,"url"):i.removeClassName(e,"url"),"array"==n||"object"==n){var a=this.childs?this.childs.length:0;e.title=this.type+" containing "+a+" items"}else"string"==n&&i.isUrl(t)?this.editable.value&&(e.title="Ctrl+Click or Ctrl+Enter to open url in new window"):e.title="";this.searchValueActive?i.addClassName(e,"highlight-active"):i.removeClassName(e,"highlight-active"),this.searchValue?i.addClassName(e,"highlight"):i.removeClassName(e,"highlight"),i.stripFormatting(e)}},n.prototype._updateDomField=function(){var e=this.dom.field;if(e){var t=""==String(this.field)&&"array"!=this.parent.type;t?i.addClassName(e,"empty"):i.removeClassName(e,"empty"),this.searchFieldActive?i.addClassName(e,"highlight-active"):i.removeClassName(e,"highlight-active"),this.searchField?i.addClassName(e,"highlight"):i.removeClassName(e,"highlight"),i.stripFormatting(e)}},n.prototype._getDomField=function(e){if(this.dom.field&&this.fieldEditable&&(this.fieldInnerText=i.getInnerText(this.dom.field)),void 0!=this.fieldInnerText)try{var t=this._unescapeHTML(this.fieldInnerText);if(t!==this.field){var n=this.field;this.field=t,this.editor._onAction("editField",{node:this,oldValue:n,newValue:t,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(o){if(this.field=void 0,1!=e)throw o}},n.prototype.clearDom=function(){this.dom={}},n.prototype.getDom=function(){var e=this.dom;if(e.tr)return e.tr;if(e.tr=document.createElement("tr"),e.tr.node=this,"view"!=this.editor.options.mode&&"form"!=this.editor.options.mode){var t=document.createElement("td");if(this.editable.field&&this.parent){var i=document.createElement("button");e.drag=i,i.className="dragarea",i.title="Drag to move this field (Alt+Shift+Arrows)",t.appendChild(i)}e.tr.appendChild(t);var n=document.createElement("td"),o=document.createElement("button");e.menu=o,o.className="contextmenu",o.title="Click to open the actions menu (Ctrl+M)",n.appendChild(e.menu),e.tr.appendChild(n)}var s=document.createElement("td");return e.tr.appendChild(s),e.tree=this._createDomTree(),s.appendChild(e.tree),this.updateDom({updateIndexes:!0}),e.tr},n.prototype._onDragStart=function(e){var t=this;this.mousemove||(this.mousemove=i.addEventListener(document,"mousemove",function(e){t._onDrag(e)})),this.mouseup||(this.mouseup=i.addEventListener(document,"mouseup",function(e){t._onDragEnd(e)})),this.editor.highlighter.lock(),this.drag={oldCursor:document.body.style.cursor,startParent:this.parent,startIndex:this.parent.childs.indexOf(this),mouseX:e.pageX,level:this.getLevel()},document.body.style.cursor="move",e.preventDefault()},n.prototype._onDrag=function(e){var t,s,r,a,l,d,h,c,u,p,f,m,v,g,y=e.pageY,x=e.pageX,b=!1;if(t=this.dom.tr,u=i.getAbsoluteTop(t),m=t.offsetHeight,u>y){s=t;do s=s.previousSibling,h=n.getNodeFromTarget(s),p=s?i.getAbsoluteTop(s):0;while(s&&p>y);h&&!h.parent&&(h=void 0),h||(d=t.parentNode.firstChild,s=d?d.nextSibling:void 0,h=n.getNodeFromTarget(s),h==this&&(h=void 0)),h&&(s=h.dom.tr,p=s?i.getAbsoluteTop(s):0,y>p+m&&(h=void 0)),h&&(h.parent.moveBefore(this,h),b=!0)}else if(l=this.expanded&&this.append?this.append.getDom():this.dom.tr,a=l?l.nextSibling:void 0){f=i.getAbsoluteTop(a),r=a;do c=n.getNodeFromTarget(r),r&&(v=r.nextSibling?i.getAbsoluteTop(r.nextSibling):0,g=r?v-f:0,1==c.parent.childs.length&&c.parent.childs[0]==this&&(u+=23)),r=r.nextSibling;while(r&&y>u+g);if(c&&c.parent){var C=x-this.drag.mouseX,_=Math.round(C/24/2),E=this.drag.level+_,N=c.getLevel();for(s=c.dom.tr.previousSibling;E>N&&s;){if(h=n.getNodeFromTarget(s),h==this||h._isChildOf(this));else{if(!(h instanceof o))break;var w=h.parent.childs;if(!(w.length>1||1==w.length&&w[0]!=this))break;c=n.getNodeFromTarget(s),N=c.getLevel()}s=s.previousSibling}l.nextSibling!=c.dom.tr&&(c.parent.moveBefore(this,c),b=!0)}}b&&(this.drag.mouseX=x,this.drag.level=this.getLevel()),this.editor.startAutoScroll(y),e.preventDefault()},n.prototype._onDragEnd=function(e){var t={node:this,startParent:this.drag.startParent,startIndex:this.drag.startIndex,endParent:this.parent,endIndex:this.parent.childs.indexOf(this)};(t.startParent!=t.endParent||t.startIndex!=t.endIndex)&&this.editor._onAction("moveNode",t),document.body.style.cursor=this.drag.oldCursor,this.editor.highlighter.unlock(),delete this.drag,this.mousemove&&(i.removeEventListener(document,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&(i.removeEventListener(document,"mouseup",this.mouseup),delete this.mouseup),this.editor.stopAutoScroll(),e.preventDefault()},n.prototype._isChildOf=function(e){for(var t=this.parent;t;){if(t==e)return!0;t=t.parent}return!1},n.prototype._createDomField=function(){return document.createElement("div")},n.prototype.setHighlight=function(e){this.dom.tr&&(this.dom.tr.className=e?"highlight":"",this.append&&this.append.setHighlight(e),this.childs&&this.childs.forEach(function(t){t.setHighlight(e)}))},n.prototype.updateValue=function(e){this.value=e,this.updateDom()},n.prototype.updateField=function(e){this.field=e,this.updateDom()},n.prototype.updateDom=function(e){var t=this.dom.tree;t&&(t.style.marginLeft=24*this.getLevel()+"px");var i=this.dom.field;if(i){this.fieldEditable?(i.contentEditable=this.editable.field,i.spellcheck=!1,i.className="field"):i.className="readonly";var n;n=void 0!=this.index?this.index:void 0!=this.field?this.field:this._hasChilds()?this.type:"",i.innerHTML=this._escapeHTML(n)}var o=this.dom.value;if(o){var s=this.childs?this.childs.length:0;o.innerHTML="array"==this.type?"["+s+"]":"object"==this.type?"{"+s+"}":this._escapeHTML(this.value)}this._updateDomField(),this._updateDomValue(),e&&1==e.updateIndexes&&this._updateDomIndexes(),e&&1==e.recurse&&this.childs&&this.childs.forEach(function(t){t.updateDom(e)}),this.append&&this.append.updateDom()},n.prototype._updateDomIndexes=function(){var e=this.dom.value,t=this.childs;e&&t&&("array"==this.type?t.forEach(function(e,t){e.index=t;var i=e.dom.field;i&&(i.innerHTML=t)}):"object"==this.type&&t.forEach(function(e){void 0!=e.index&&(delete e.index,void 0==e.field&&(e.field=""))}))},n.prototype._createDomValue=function(){var e;return"array"==this.type?(e=document.createElement("div"),e.className="readonly",e.innerHTML="[...]"):"object"==this.type?(e=document.createElement("div"),e.className="readonly",e.innerHTML="{...}"):!this.editable.value&&i.isUrl(this.value)?(e=document.createElement("a"),e.className="value",e.href=this.value,e.target="_blank",e.innerHTML=this._escapeHTML(this.value)):(e=document.createElement("div"),e.contentEditable=this.editable.value,e.spellcheck=!1,e.className="value",e.innerHTML=this._escapeHTML(this.value)),e},n.prototype._createDomExpandButton=function(){var e=document.createElement("button");return this._hasChilds()?(e.className=this.expanded?"expanded":"collapsed",e.title="Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs."):(e.className="invisible",e.title=""),e},n.prototype._createDomTree=function(){var e=this.dom,t=document.createElement("table"),i=document.createElement("tbody");t.style.borderCollapse="collapse",t.className="values",t.appendChild(i);var n=document.createElement("tr");i.appendChild(n);var o=document.createElement("td");o.className="tree",n.appendChild(o),e.expand=this._createDomExpandButton(),o.appendChild(e.expand),e.tdExpand=o;var s=document.createElement("td");s.className="tree",n.appendChild(s),e.field=this._createDomField(),s.appendChild(e.field),e.tdField=s;var r=document.createElement("td");r.className="tree",n.appendChild(r),"object"!=this.type&&"array"!=this.type&&(r.appendChild(document.createTextNode(":")),r.className="separator"),e.tdSeparator=r;var a=document.createElement("td");return a.className="tree",n.appendChild(a),e.value=this._createDomValue(),a.appendChild(e.value),e.tdValue=a,t},n.prototype.onEvent=function(e){var t,n=e.type,o=e.target||e.srcElement,s=this.dom,r=this,a=this._hasChilds();if((o==s.drag||o==s.menu)&&("mouseover"==n?this.editor.highlighter.highlight(this):"mouseout"==n&&this.editor.highlighter.unhighlight()),"mousedown"==n&&o==s.drag&&this._onDragStart(e),"click"==n&&o==s.menu){var l=r.editor.highlighter;l.highlight(r),l.lock(),i.addClassName(s.menu,"selected"),this.showContextMenu(s.menu,function(){i.removeClassName(s.menu,"selected"),l.unlock(),l.unhighlight()})}if("click"==n&&o==s.expand&&a){var d=e.ctrlKey;this._onExpand(d)}var h=s.value;if(o==h)switch(n){case"focus":t=this;break;case"blur":case"change":this._getDomValue(!0),this._updateDomValue(),this.value&&(h.innerHTML=this._escapeHTML(this.value));break;case"input":this._getDomValue(!0),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"click":(e.ctrlKey||!this.editable.value)&&i.isUrl(this.value)&&window.open(this.value,"_blank");break;case"keyup":this._getDomValue(!0),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){r._getDomValue(!0),r._updateDomValue()},1)}var c=s.field;if(o==c)switch(n){case"focus":t=this;break;case"blur":case"change":this._getDomField(!0),this._updateDomField(),this.field&&(c.innerHTML=this._escapeHTML(this.field));break;case"input":this._getDomField(!0),this._updateDomField();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"keyup":this._getDomField(!0),this._updateDomField();break;case"cut":case"paste":setTimeout(function(){r._getDomField(!0),r._updateDomField()},1)}var u=s.tree;if(o==u.parentNode)switch(n){case"click":var p=void 0!=e.offsetX?e.offsetX<24*(this.getLevel()+1):e.pageXn[i]?t:e[i]/g,">").replace(/ /g," ").replace(/^ /," ").replace(/ $/," "),i=JSON.stringify(t);return i.substring(1,i.length-1)},n.prototype._unescapeHTML=function(e){var t='"'+this._escapeJSON(e)+'"',n=i.parse(t);return n.replace(/</g,"<").replace(/>/g,">").replace(/ |\u00A0/g," ")},n.prototype._escapeJSON=function(e){for(var t="",i=0,n=e.length;n>i;){var o=e.charAt(i);"\n"==o?t+="\\n":"\\"==o?(t+=o,i++,o=e.charAt(i),-1=='"\\/bfnrtu'.indexOf(o)&&(t+="\\"),t+=o):t+='"'==o?'\\"':o,i++}return t};var o=t(n);return n}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(e,t,i){var n,o;n=[i(3)],o=function(e){function t(e,t){function i(e,t,o){o.forEach(function(o){if("separator"==o.type){var s=document.createElement("div");s.className="separator",a=document.createElement("li"),a.appendChild(s),e.appendChild(a)}else{var r={},a=document.createElement("li");e.appendChild(a);var l=document.createElement("button");if(l.className=o.className,r.button=l,o.title&&(l.title=o.title),o.click&&(l.onclick=function(){n.hide(),o.click()}),a.appendChild(l),o.submenu){var d=document.createElement("div");d.className="icon",l.appendChild(d),l.appendChild(document.createTextNode(o.text));var h;if(o.click){l.className+=" default";var c=document.createElement("button");r.buttonExpand=c,c.className="expand",c.innerHTML='',a.appendChild(c),o.submenuTitle&&(c.title=o.submenuTitle),h=c}else{var u=document.createElement("div");u.className="expand",l.appendChild(u),h=l}h.onclick=function(){n._onExpandItem(r),h.focus()};var p=[];r.subItems=p;var f=document.createElement("ul");r.ul=f,f.className="menu",f.style.height="0",a.appendChild(f),i(f,p,o.submenu)}else l.innerHTML=''+o.text;t.push(r)}})}this.dom={};var n=this,o=this.dom;this.anchor=void 0,this.items=e,this.eventListeners={},this.selection=void 0,this.visibleSubmenu=void 0,this.onClose=t?t.close:void 0;var s=document.createElement("div");s.className="jsoneditor-contextmenu",o.menu=s;var r=document.createElement("ul");r.className="menu",s.appendChild(r),o.list=r,o.items=[];var a=document.createElement("button");o.focusButton=a;var l=document.createElement("li");l.style.overflow="hidden",l.style.height="0",l.appendChild(a),r.appendChild(l),i(r,this.dom.items,e),this.maxHeight=0,e.forEach(function(t){var i=24*(e.length+(t.submenu?t.submenu.length:0));n.maxHeight=Math.max(n.maxHeight,i)})}return t.prototype._getVisibleButtons=function(){var e=[],t=this;return this.dom.items.forEach(function(i){e.push(i.button),i.buttonExpand&&e.push(i.buttonExpand),i.subItems&&i==t.expandedItem&&i.subItems.forEach(function(t){e.push(t.button),t.buttonExpand&&e.push(t.buttonExpand)})}),e},t.visibleMenu=void 0,t.prototype.show=function(i){this.hide();var n=window.innerHeight,o=window.pageYOffset||document.scrollTop||0,s=n+o,r=i.offsetHeight,a=this.maxHeight,l=e.getAbsoluteLeft(i),d=e.getAbsoluteTop(i);s>d+r+a?(this.dom.menu.style.left=l+"px",this.dom.menu.style.top=d+r+"px",this.dom.menu.style.bottom=""):(this.dom.menu.style.left=l+"px",this.dom.menu.style.top="",this.dom.menu.style.bottom=n-d+"px"),document.body.appendChild(this.dom.menu);var h=this,c=this.dom.list;this.eventListeners.mousedown=e.addEventListener(document,"mousedown",function(e){var t=e.target;t==c||h._isChildOf(t,c)||(h.hide(),e.stopPropagation(),e.preventDefault())}),this.eventListeners.mousewheel=e.addEventListener(document,"mousewheel",function(e){e.stopPropagation(),e.preventDefault()}),this.eventListeners.keydown=e.addEventListener(document,"keydown",function(e){h._onKeyDown(e)}),this.selection=e.getSelection(),this.anchor=i,setTimeout(function(){h.dom.focusButton.focus()},0),t.visibleMenu&&t.visibleMenu.hide(),t.visibleMenu=this},t.prototype.hide=function(){this.dom.menu.parentNode&&(this.dom.menu.parentNode.removeChild(this.dom.menu),this.onClose&&this.onClose());for(var i in this.eventListeners)if(this.eventListeners.hasOwnProperty(i)){var n=this.eventListeners[i];n&&e.removeEventListener(document,i,n),delete this.eventListeners[i]}t.visibleMenu==this&&(t.visibleMenu=void 0)},t.prototype._onExpandItem=function(t){var i=this,n=t==this.expandedItem,o=this.expandedItem;if(o&&(o.ul.style.height="0",o.ul.style.padding="",setTimeout(function(){i.expandedItem!=o&&(o.ul.style.display="",e.removeClassName(o.ul.parentNode,"selected"))},300),this.expandedItem=void 0),!n){var s=t.ul;s.style.display="block";{s.clientHeight}setTimeout(function(){i.expandedItem==t&&(s.style.height=24*s.childNodes.length+"px",s.style.padding="5px 10px")},0),e.addClassName(s.parentNode,"selected"),this.expandedItem=t}},t.prototype._onKeyDown=function(t){var i,n,o,s,r=t.target,a=t.which,l=!1;27==a?(this.selection&&e.setSelection(this.selection),this.anchor&&this.anchor.focus(),this.hide(),l=!0):9==a?t.shiftKey?(i=this._getVisibleButtons(),n=i.indexOf(r),0==n&&(i[i.length-1].focus(),l=!0)):(i=this._getVisibleButtons(),n=i.indexOf(r),n==i.length-1&&(i[0].focus(),l=!0)):37==a?("expand"==r.className&&(i=this._getVisibleButtons(),n=i.indexOf(r),o=i[n-1],o&&o.focus()),l=!0):38==a?(i=this._getVisibleButtons(),n=i.indexOf(r),o=i[n-1],o&&"expand"==o.className&&(o=i[n-2]),o||(o=i[i.length-1]),o&&o.focus(),l=!0):39==a?(i=this._getVisibleButtons(),n=i.indexOf(r),s=i[n+1],s&&"expand"==s.className&&s.focus(),l=!0):40==a&&(i=this._getVisibleButtons(),n=i.indexOf(r),s=i[n+1],s&&"expand"==s.className&&(s=i[n+2]),s||(s=i[0]),s&&(s.focus(),l=!0),l=!0),l&&(t.stopPropagation(),t.preventDefault())},t.prototype._isChildOf=function(e,t){for(var i=e.parentNode;i;){if(i==t)return!0;i=i.parentNode}return!1},t}.apply(null,n),!(void 0!==o&&(e.exports=o))},function(e,t,i){var n,o;n=[i(9),i(3)],o=function(e,t){function i(i){function n(e){this.editor=e,this.dom={},this._setEditability(e)}return n.prototype=new i,n.prototype.getDom=function(){var e=this.dom;if(e.tr)return e.tr;var t=document.createElement("tr");if(t.node=this,e.tr=t,this.editable.field){e.tdDrag=document.createElement("td");var i=document.createElement("td");e.tdMenu=i;var n=document.createElement("button");n.className="contextmenu",n.title="Click to open the actions menu (Ctrl+M)",e.menu=n,i.appendChild(e.menu)}var o=document.createElement("td"),s=document.createElement("div");return s.innerHTML="(empty)",s.className="readonly",o.appendChild(s),e.td=o,e.text=s,this.updateDom(),t},n.prototype.updateDom=function(){var e=this.dom,t=e.td;t&&(t.style.paddingLeft=24*this.getLevel()+26+"px");var i=e.text;i&&(i.innerHTML="(empty "+this.parent.type+")");var n=e.tr;this.isVisible()?e.tr.firstChild||(e.tdDrag&&n.appendChild(e.tdDrag),e.tdMenu&&n.appendChild(e.tdMenu),n.appendChild(t)):e.tr.firstChild&&(e.tdDrag&&n.removeChild(e.tdDrag),e.tdMenu&&n.removeChild(e.tdMenu),n.removeChild(t))},n.prototype.isVisible=function(){return 0==this.parent.childs.length},n.prototype.showContextMenu=function(t,n){var o=this,s=i.TYPE_TITLES,r=[{text:"Append",title:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",submenuTitle:"Select the type of the field to be appended",className:"insert",click:function(){o._onAppend("","","auto")},submenu:[{text:"Auto",className:"type-auto",title:s.auto,click:function(){o._onAppend("","","auto")}},{text:"Array",className:"type-array",title:s.array,click:function(){o._onAppend("",[])}},{text:"Object",className:"type-object",title:s.object,click:function(){o._onAppend("",{})}},{text:"String",className:"type-string",title:s.string,click:function(){o._onAppend("","","string")}}]}],a=new e(r,{close:n});a.show(t)},n.prototype.onEvent=function(e){var i=e.type,n=e.target||e.srcElement,o=this.dom,s=o.menu;if(n==s&&("mouseover"==i?this.editor.highlighter.highlight(this.parent):"mouseout"==i&&this.editor.highlighter.unhighlight()),"click"==i&&n==o.menu){var r=this.editor.highlighter;r.highlight(this.parent),r.lock(),t.addClassName(o.menu,"selected"),this.showContextMenu(o.menu,function(){t.removeClassName(o.menu,"selected"),r.unlock(),r.unhighlight()})}"keydown"==i&&this.onKeyDown(e)},n}return i}.apply(null,n),!(void 0!==o&&(e.exports=o))}])});
//# sourceMappingURL=jsoneditor.map
//# sourceMappingURL=jsoneditor.map
\ No newline at end of file
diff --git a/src/js/Node.js b/src/js/Node.js
index 92dab3c..e381ae0 100644
--- a/src/js/Node.js
+++ b/src/js/Node.js
@@ -25,8 +25,42 @@ define(['./ContextMenu', './appendNodeFactory', './util'], function (ContextMenu
this.setField('');
this.setValue(null);
}
+
+ this._setEditability(editor);
}
+ /**
+ * Determine whether the field and/or value of this node are editable
+ * @param editor
+ * @private
+ */
+ Node.prototype._setEditability = function (editor) {
+ this.editable = {
+ field: true,
+ value: true
+ };
+
+ if (editor) {
+ this.editable.field = (this.editor.options.mode != 'view' && this.editor.options.mode != 'form');
+ this.editable.value = (this.editor.options.mode != 'view');
+
+ if (typeof editor.options.editable === 'function') {
+ var editable = editor.options.editable({
+ field: this.field
+ });
+
+ if (typeof editable === 'boolean') {
+ this.editable.field = editable;
+ this.editable.value = editable;
+ }
+ else {
+ if (typeof editable.field === 'boolean') this.editable.field = editable.field;
+ if (typeof editable.value === 'boolean') this.editable.value = editable.value;
+ }
+ }
+ }
+ };
+
/**
* Set parent node
* @param {Node} parent
@@ -977,7 +1011,7 @@ define(['./ContextMenu', './appendNodeFactory', './util'], function (ContextMenu
var t = (this.type == 'auto') ? util.type(v) : this.type;
var isUrl = (t == 'string' && util.isUrl(v));
var color = '';
- if (isUrl && !this.editor.mode.edit) {
+ if (isUrl && !this.editable.value) { // TODO: when to apply this?
color = '';
}
else if (t == 'string') {
@@ -1024,7 +1058,7 @@ define(['./ContextMenu', './appendNodeFactory', './util'], function (ContextMenu
domValue.title = this.type + ' containing ' + count + ' items';
}
else if (t == 'string' && util.isUrl(v)) {
- if (this.editor.mode.edit) {
+ if (this.editable.value) {
domValue.title = 'Ctrl+Click or Ctrl+Enter to open url in new window';
}
}
@@ -1152,15 +1186,17 @@ define(['./ContextMenu', './appendNodeFactory', './util'], function (ContextMenu
dom.tr = document.createElement('tr');
dom.tr.node = this;
- if (this.editor.mode.edit) {
- // create draggable area
+ if (this.editor.options.mode != 'view' && this.editor.options.mode != 'form') {
var tdDrag = document.createElement('td');
- if (this.parent) {
- var domDrag = document.createElement('button');
- dom.drag = domDrag;
- domDrag.className = 'dragarea';
- domDrag.title = 'Drag to move this field (Alt+Shift+Arrows)';
- tdDrag.appendChild(domDrag);
+ if (this.editable.field) {
+ // create draggable area
+ if (this.parent) {
+ var domDrag = document.createElement('button');
+ dom.drag = domDrag;
+ domDrag.className = 'dragarea';
+ domDrag.title = 'Drag to move this field (Alt+Shift+Arrows)';
+ tdDrag.appendChild(domDrag);
+ }
}
dom.tr.appendChild(tdDrag);
@@ -1485,9 +1521,9 @@ define(['./ContextMenu', './appendNodeFactory', './util'], function (ContextMenu
// update field
var domField = this.dom.field;
if (domField) {
- if (this.fieldEditable == true) {
+ if (this.fieldEditable) {
// parent is an object
- domField.contentEditable = this.editor.mode.edit;
+ domField.contentEditable = this.editable.field;
domField.spellcheck = false;
domField.className = 'field';
}
@@ -1603,7 +1639,7 @@ define(['./ContextMenu', './appendNodeFactory', './util'], function (ContextMenu
domValue.innerHTML = '{...}';
}
else {
- if (!this.editor.mode.edit && util.isUrl(this.value)) {
+ if (!this.editable.value && util.isUrl(this.value)) {
// create a link in case of read-only editor and value containing an url
domValue = document.createElement('a');
domValue.className = 'value';
@@ -1612,9 +1648,9 @@ define(['./ContextMenu', './appendNodeFactory', './util'], function (ContextMenu
domValue.innerHTML = this._escapeHTML(this.value);
}
else {
- // create and editable or read-only div
+ // create an editable or read-only div
domValue = document.createElement('div');
- domValue.contentEditable = !this.editor.mode.view;
+ domValue.contentEditable = this.editable.value;
domValue.spellcheck = false;
domValue.className = 'value';
domValue.innerHTML = this._escapeHTML(this.value);
@@ -1777,7 +1813,7 @@ define(['./ContextMenu', './appendNodeFactory', './util'], function (ContextMenu
break;
case 'click':
- if (event.ctrlKey && this.editor.mode.edit) {
+ if (event.ctrlKey || !this.editable.value) {
if (util.isUrl(this.value)) {
window.open(this.value, '_blank');
}
@@ -1899,7 +1935,7 @@ define(['./ContextMenu', './appendNodeFactory', './util'], function (ContextMenu
// util.log(ctrlKey, keynum, event.charCode); // TODO: cleanup
if (keynum == 13) { // Enter
if (target == this.dom.value) {
- if (!this.editor.mode.edit || event.ctrlKey) {
+ if (!this.editable.value || event.ctrlKey) {
if (util.isUrl(this.value)) {
window.open(this.value, '_blank');
handled = true;
@@ -2537,49 +2573,51 @@ define(['./ContextMenu', './appendNodeFactory', './util'], function (ContextMenu
var titles = Node.TYPE_TITLES;
var items = [];
- items.push({
- 'text': 'Type',
- 'title': 'Change the type of this field',
- 'className': 'type-' + this.type,
- 'submenu': [
- {
- 'text': 'Auto',
- 'className': 'type-auto' +
- (this.type == 'auto' ? ' selected' : ''),
- 'title': titles.auto,
- 'click': function () {
- node._onChangeType('auto');
+ if (this.editable.value) {
+ items.push({
+ 'text': 'Type',
+ 'title': 'Change the type of this field',
+ 'className': 'type-' + this.type,
+ 'submenu': [
+ {
+ 'text': 'Auto',
+ 'className': 'type-auto' +
+ (this.type == 'auto' ? ' selected' : ''),
+ 'title': titles.auto,
+ 'click': function () {
+ node._onChangeType('auto');
+ }
+ },
+ {
+ 'text': 'Array',
+ 'className': 'type-array' +
+ (this.type == 'array' ? ' selected' : ''),
+ 'title': titles.array,
+ 'click': function () {
+ node._onChangeType('array');
+ }
+ },
+ {
+ 'text': 'Object',
+ 'className': 'type-object' +
+ (this.type == 'object' ? ' selected' : ''),
+ 'title': titles.object,
+ 'click': function () {
+ node._onChangeType('object');
+ }
+ },
+ {
+ 'text': 'String',
+ 'className': 'type-string' +
+ (this.type == 'string' ? ' selected' : ''),
+ 'title': titles.string,
+ 'click': function () {
+ node._onChangeType('string');
+ }
}
- },
- {
- 'text': 'Array',
- 'className': 'type-array' +
- (this.type == 'array' ? ' selected' : ''),
- 'title': titles.array,
- 'click': function () {
- node._onChangeType('array');
- }
- },
- {
- 'text': 'Object',
- 'className': 'type-object' +
- (this.type == 'object' ? ' selected' : ''),
- 'title': titles.object,
- 'click': function () {
- node._onChangeType('object');
- }
- },
- {
- 'text': 'String',
- 'className': 'type-string' +
- (this.type == 'string' ? ' selected' : ''),
- 'title': titles.string,
- 'click': function () {
- node._onChangeType('string');
- }
- }
- ]
- });
+ ]
+ });
+ }
if (this._hasChilds()) {
var direction = ((this.sort == 'asc') ? 'desc': 'asc');
@@ -2612,10 +2650,12 @@ define(['./ContextMenu', './appendNodeFactory', './util'], function (ContextMenu
}
if (this.parent && this.parent._hasChilds()) {
- // create a separator
- items.push({
- 'type': 'separator'
- });
+ if (items.length) {
+ // create a separator
+ items.push({
+ 'type': 'separator'
+ });
+ }
// create append button (for last child node only)
var childs = node.parent.childs;
@@ -2710,25 +2750,27 @@ define(['./ContextMenu', './appendNodeFactory', './util'], function (ContextMenu
]
});
- // create duplicate button
- items.push({
- 'text': 'Duplicate',
- 'title': 'Duplicate this field (Ctrl+D)',
- 'className': 'duplicate',
- 'click': function () {
- node._onDuplicate();
- }
- });
+ if (this.editable.field) {
+ // create duplicate button
+ items.push({
+ 'text': 'Duplicate',
+ 'title': 'Duplicate this field (Ctrl+D)',
+ 'className': 'duplicate',
+ 'click': function () {
+ node._onDuplicate();
+ }
+ });
- // create remove button
- items.push({
- 'text': 'Remove',
- 'title': 'Remove this field (Ctrl+Del)',
- 'className': 'remove',
- 'click': function () {
- node._onRemove();
- }
- });
+ // create remove button
+ items.push({
+ 'text': 'Remove',
+ 'title': 'Remove this field (Ctrl+Del)',
+ 'className': 'remove',
+ 'click': function () {
+ node._onRemove();
+ }
+ });
+ }
}
var menu = new ContextMenu(items, {close: onClose});
diff --git a/src/js/appendNodeFactory.js b/src/js/appendNodeFactory.js
index adedce8..f64b2cf 100644
--- a/src/js/appendNodeFactory.js
+++ b/src/js/appendNodeFactory.js
@@ -16,6 +16,8 @@ define(['./ContextMenu', './util'], function (ContextMenu, util) {
/** @type {TreeEditor} */
this.editor = editor;
this.dom = {};
+
+ this._setEditability(editor);
}
AppendNode.prototype = new Node();
@@ -39,7 +41,7 @@ define(['./ContextMenu', './util'], function (ContextMenu, util) {
// TODO: consistent naming
- if (this.editor.mode.edit) {
+ if (this.editable.field) {
// a cell for the dragarea column
dom.tdDrag = document.createElement('td');
diff --git a/test/test.html b/test/test.html
index a9e14c7..59d1ef6 100644
--- a/test/test.html
+++ b/test/test.html
@@ -68,16 +68,35 @@
modes: ['code', 'form', 'text', 'tree', 'view'], // allowed modes
error: function (err) {
alert(err.toString());
+ },
+ editable: function (node) {
+ console.log(node);
+ switch(node.field) {
+ case '_id':
+ return false;
+
+ case '_field':
+ return {
+ field: false,
+ value: true
+ };
+
+ default:
+ return true;
+ }
}
};
json = {
+ "_id": "1234",
+ "_field": "ABCD",
"array": [1, 2, 3],
"boolean": true,
"null": null,
"number": 123,
"object": {"a": "b", "c": "d"},
- "string": "Hello World"
+ "string": "Hello World",
+ "url": "http://jsoneditorononline.org"
};
editor = new JSONEditor(container, options, json);