Commit Graph

1177 Commits

Author SHA1 Message Date
jos 704a50d415 Fixed #661: JSONEditor broken on IE11 caused by duplicate JSON entries in a translation 2019-02-20 20:38:21 +01:00
RobAley 5d833d2131
Add call to options.onCreateMenu
to allow customisation of context menu items
2019-02-17 11:16:14 +00:00
RobAley 2bd4ca67af
Add onCreateMenu as valid option 2019-02-17 11:12:07 +00:00
jos df4673146f Publish `v5.29.0` 2019-02-16 14:12:53 +01:00
Adam Vigneaux f8279537d0 Fix Node._findSchema() (#651)
* Add test setup function for simulating browser globals

* Add tests for Node._findSchema

Some of the tests currently fail, which will be helpful in fixing the
incorrect behavior of the `_findSchema` function. The current failures
are:
- the last schema in the pattern properties object is always returned
- when pattern properties are present, wrong object schemas are returned

* Add schema-based tooltip to field names

Using the `title` and `description` properties from the schema, create
and set a tooltip on each field name. When the user hovers over a field
name, it will show the applicable information: title, description, both,
or neither, depending on what data is present in the schema.

* Remove redundant setting of field name title

* Remove accidental .only() from Node tests

* Fix Node._findSchema for pattern properties

The method now checks the key against the RegExp specified by the
pattern properties instead of always returning the last pattern property
in the object.

* Fix path used for recursive calls in Node._findSchema

* Add failing Node._findSchema tests for multi-level pattern properties

* Fix Node._findSchema for schemas with properties and patternProperties
2019-02-16 14:01:30 +01:00
jos 53a4f57dda Fix #657: `onClassName` throwing an error when a node is removed 2019-02-14 20:42:23 +01:00
jos c28cef0a9a Update history 2019-02-13 11:53:07 +01:00
jos 7c17ef9001 Merge branch 'add-schema-description-tooltips' of https://github.com/AdamVig/jsoneditor into AdamVig-add-schema-description-tooltips 2019-02-13 11:50:40 +01:00
Adam Vigneaux 9377ee825d
Remove redundant setting of field name title 2019-02-11 11:24:05 -05:00
jos 5098095e86 Update docs 2019-02-09 13:05:53 +01:00
jos a0ad953c4c Update history 2019-02-09 13:02:18 +01:00
jos dc55c11015 Fix merge conflicts 2019-02-09 12:57:09 +01:00
Berat Postalcioglu ae2e8018c5 tr json is updated 2019-02-09 02:52:47 +03:00
Berat Postalcioglu 07f7e0fcb4 turkish language support is added by adding tr json to i18n.js 2019-02-09 02:19:27 +03:00
Adam Vigneaux dc357061a7
Add schema-based tooltip to field names
Using the `title` and `description` properties from the schema, create
and set a tooltip on each field name. When the user hovers over a field
name, it will show the applicable information: title, description, both,
or neither, depending on what data is present in the schema.
2019-02-08 09:31:28 -05:00
jos 53a8803e06 Update history 2019-02-05 20:50:10 +01:00
long2ice 10bcf425f7 i18n support zh_CN (#640)
* i18n support chinese

* fix _locales

* rename zh_CN to zh-CN
change the indentation to 2 space
2019-02-05 20:48:56 +01:00
jos 4c6f2cdd4f Publish `v5.28.2` 2019-01-23 14:29:13 +01:00
jos cb2f343d1d Fix #639: Occurrence of non-ES5 `const` declaration in published code 2019-01-23 14:27:19 +01:00
jos 21ae2180e7 Publish `v5.28.1` 2019-01-22 20:48:08 +01:00
jos 3f9ea75f20 Minor code cleanup 2019-01-22 20:44:52 +01:00
jos 7d9db67d69 Fix #637: vertical white border left/right from the main menu in some specific circumstances 2019-01-22 20:44:10 +01:00
jos 958463a9cd Fix #638: cannot expand after collapse 2019-01-22 20:27:23 +01:00
jos 3334241ab9 Publish v5.28.0 2019-01-21 21:06:23 +01:00
jos db9f5480c7 Define `onClassName` once and use it twice 2019-01-21 21:04:32 +01:00
jos 20e42ab8b0 Fix example 20 always highlighting objects and arrays (see #604) 2019-01-21 21:01:38 +01:00
jos c7d054406c Make the method `refresh()` public 2019-01-21 20:56:50 +01:00
jos a7cc8527bd Updated history, some minor tweaks in example 20 (see #604) 2019-01-21 20:53:02 +01:00
Pawel Raszewski 1c5d7d71ac added an ability to set custom css classes for Node's field and value (#604)
* update for gulp 4.0.0

* added an ability to set custom css classes for Node's field and value

* v5.9.8-beta

* wip

* wip

* wip

* wip

* wip

* wip

* cleanup

* reverted ./dist/ files

* cleanup

* reverted package-lock.json

* updated onClassName signature

* recursive node class name update on change

* add/remove css classes on node

* example fix

* merged remote

* removed yarn.lock

* changes get reflected on both sides of the diff view in example 20

* refactored and cleaned up example 20
2019-01-21 20:42:43 +01:00
jos 160c82f378 Updated history 2019-01-16 17:48:29 +01:00
Ben Chadwick a20908f462 Configurable max visible childs (#630)
* repair branch; undo childs->children change; make getMaxVisibleChilds a fn

* address PR comment
2019-01-16 17:47:08 +01:00
jos 4e62cf5ba5 Publish v5.27.1 2019-01-16 15:59:11 +01:00
jos 182150ea30 Updated history 2019-01-16 14:20:54 +01:00
Tyler Chen 4f9fc926f8 Update Node.js (#624)
* Update Node.js

add both:
1. fix childSchema with $ref, and not display the select element on the child schema because of not found enum
2. add title from schema description to show the tips for user input

* Update Node.js

fix this.editor.options.schema could be nullable.

* Update Node.js

improve the Node._findSchema to Node._findSchema = function (schema, schemaRefs, path) { ... } by tylerchen

* update Node._findSchema to Node._findSchema = function (schema, schemaRefs, path)
2019-01-16 14:18:02 +01:00
jos 5a93d3df6d Update history 2019-01-12 11:27:52 +01:00
Meir Rotstein 02d7d0fc71 Add option for show all path on the navigation bar (tree mode) (#628)
* navigation bar - allow to see all path when there is no space

* fix: ellipsis was not presented on some cases

* some code cleaning
2019-01-12 11:25:02 +01:00
jos e9f6a299f7 Publish v5.27.0 2019-01-05 15:21:54 +01:00
jos b59da1a5c9 Describe `onNodeName` in docs (see #617) 2019-01-05 15:15:33 +01:00
jos 8c74bc7ef9 Put try/catch directly around `this.editor.options.onNodeName(...)` (see #617) 2019-01-05 15:00:13 +01:00
jos 1e29d2a94a Check whether `onNodeName` is defined before calling the function (see #617) 2019-01-04 21:11:27 +01:00
jos 535a47c347 Updated history 2019-01-04 21:04:37 +01:00
jos b6e34ea476 Merge remote-tracking branch 'origin/develop' into develop 2019-01-04 21:03:58 +01:00
Bastian Nanchen 93232a09cc Customize object names 2 (#617)
* Customize object names

* Fix: the object's name updates when its properties change

* Creation of node.prototype.updateObjectName method

* Implementation of recursivelyUpdateObjectName method

* Callback arguments: path and size

* New callback argument - type: array | object

* Code improvement and callback function renaming: onNodeName
2019-01-04 21:03:45 +01:00
jos b202627f6e Update history 2019-01-04 21:00:21 +01:00
Meir Rotstein 78194051b0 Hide show error table (#620)
* allow to hide adn show the error table

* code mode: scroll to line on text selection

* validation icon - pointer cursor

* (1) toggle validation errors table by clicking validation count
(2) preserve show/hide state after fixing parse errors

* remove arrow function (no ES6 support)
2019-01-04 20:57:19 +01:00
jos bc5c133b52 Updated history 2018-12-20 21:18:07 +01:00
Anthony Fu ea119df821 i18n for ModeSwitcher (#616)
* unquote keys

* i18n for ModeSwitcher
2018-12-20 21:14:04 +01:00
jos 72ab51002c Publish v5.26.3 2018-12-06 21:44:37 +01:00
jos 6551701153 Fixed #610: JSON Repair now removes trailing commas 2018-12-06 20:15:14 +01:00
jos 550e0a2c4e Updated history 2018-12-05 09:38:51 +01:00