@json-editor/json-editor 2.15.1 → 2.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/.env +1 -1
  2. package/.github/workflows/build.yml +5 -5
  3. package/CHANGELOG.md +21 -0
  4. package/CONTRIBUTING.md +10 -0
  5. package/README.md +27 -0
  6. package/dist/jsoneditor.js +1 -1
  7. package/dist/jsoneditor.js.LICENSE.txt +1 -1
  8. package/dist/nonmin/jsoneditor.js +497 -150
  9. package/dist/nonmin/jsoneditor.js.map +1 -1
  10. package/docs/form-submission.html +1 -1
  11. package/docs/index.html +18 -0
  12. package/package.json +1 -1
  13. package/src/core.js +11 -0
  14. package/src/defaults.js +2 -1
  15. package/src/editor.js +27 -16
  16. package/src/editors/ace.js +1 -0
  17. package/src/editors/array/choices.js +1 -0
  18. package/src/editors/array/select2.js +2 -0
  19. package/src/editors/array/selectize.js +2 -0
  20. package/src/editors/array.js +81 -0
  21. package/src/editors/base64.js +2 -0
  22. package/src/editors/checkbox.js +13 -1
  23. package/src/editors/choices.js +2 -0
  24. package/src/editors/colorpicker.js +2 -0
  25. package/src/editors/datetime.js +2 -0
  26. package/src/editors/describedby.js +2 -0
  27. package/src/editors/enum.js +3 -1
  28. package/src/editors/hidden.js +2 -0
  29. package/src/editors/jodit.js +2 -0
  30. package/src/editors/multiple.js +2 -0
  31. package/src/editors/multiselect.js +2 -0
  32. package/src/editors/object.js +10 -3
  33. package/src/editors/radio.js +2 -0
  34. package/src/editors/sceditor.js +2 -0
  35. package/src/editors/select.js +2 -1
  36. package/src/editors/select2.js +2 -0
  37. package/src/editors/selectize.js +2 -0
  38. package/src/editors/signature.js +2 -0
  39. package/src/editors/simplemde.js +3 -1
  40. package/src/editors/starrating.js +2 -0
  41. package/src/editors/string.js +2 -0
  42. package/src/editors/table.js +19 -2
  43. package/src/editors/upload.js +2 -0
  44. package/src/editors/uuid.js +2 -0
  45. package/src/resolvers.js +1 -1
  46. package/src/theme.js +23 -0
  47. package/src/themes/bootstrap3.css +53 -0
  48. package/src/themes/bootstrap3.css.js +1 -1
  49. package/src/themes/bootstrap3.js +30 -0
  50. package/src/themes/bootstrap4.js +27 -0
  51. package/src/themes/bootstrap5.js +28 -0
  52. package/src/themes/spectre.js +28 -0
  53. package/src/themes/tailwind.css +54 -0
  54. package/src/themes/tailwind.css.js +1 -1
  55. package/src/themes/tailwind.js +26 -0
  56. package/tests/codeceptjs/core_test.js +28 -0
  57. package/tests/codeceptjs/editors/multiple_test.js +27 -0
  58. package/tests/codeceptjs/issues/issue-gh-1559_test.js +15 -0
  59. package/tests/codeceptjs/issues/issue-gh-1562_test.js +12 -0
  60. package/tests/codeceptjs/issues/issue-gh-1586_test.js +15 -0
  61. package/tests/pages/editor-show-validation-errors.html +54 -0
  62. package/tests/pages/enforce-const.html +10 -18
  63. package/tests/pages/issues/issue-gh-1559.html +68 -0
  64. package/tests/pages/issues/issue-gh-1562.html +170 -0
  65. package/tests/pages/issues/issue-gh-1586.html +48 -0
  66. package/tests/pages/opt-in-widget.html +134 -0
  67. package/tests/pages/switcher-option.html +69 -0
  68. package/tests/docker-compose-local.yml +0 -4
package/.env CHANGED
@@ -1,2 +1,2 @@
1
1
  COMPOSE_PROJECT_NAME=json-editor
2
- COMPOSE_FILE=./tests/docker-compose.yml:./tests/docker-compose-local.yml
2
+ COMPOSE_FILE=./tests/docker-compose.yml
@@ -46,14 +46,14 @@ jobs:
46
46
  # run: |
47
47
  # npm install
48
48
  - name: Install
49
- run: docker-compose run -T --rm node npm install
49
+ run: docker compose run -T --rm node npm install
50
50
  - name: Start
51
- run: docker-compose up -d ${SELENIUM_BROWSER}
51
+ run: docker compose up -d ${SELENIUM_BROWSER}
52
52
  - name: Build
53
- run: docker-compose run -T --rm node npm run ${BUILD_ENV}
53
+ run: docker compose run -T --rm node npm run ${BUILD_ENV}
54
54
  - name: Test
55
55
  run: |
56
- docker-compose exec -T node codeceptjs run-multiple -c /repo/tests/codeceptjs/codecept.json basic:${SELENIUM_BROWSER} --invert --grep '@optional'
56
+ docker compose exec -T node codeceptjs run-multiple -c /repo/tests/codeceptjs/codecept.json basic:${SELENIUM_BROWSER} --invert --grep '@optional'
57
57
  pwd
58
58
  ls -la codeceptjs/output
59
59
  - name: Test Artifacts
@@ -66,5 +66,5 @@ jobs:
66
66
  merge-multiple: true
67
67
  - name: Test (optional)
68
68
  continue-on-error: true
69
- run: docker-compose exec -T node codeceptjs run-multiple -c /repo/tests/codeceptjs/codecept.json basic:${SELENIUM_BROWSER} --grep '@optional'
69
+ run: docker compose exec -T node codeceptjs run-multiple -c /repo/tests/codeceptjs/codecept.json basic:${SELENIUM_BROWSER} --grep '@optional'
70
70
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  ### Unreleased
2
2
 
3
+ ### 2.15.3
4
+
5
+ - Added maintenance mode notice to README, CONTRIBUTING.md, and documentation
6
+ - Fixed #1559 and #1621 field dependent on false should now display
7
+ - Fixed form-submission.html example documentation
8
+
9
+ ### 2.15.2
10
+
11
+ - Support drag and drop for array item
12
+ - Updated to docker compose commands
13
+ - Updated to docker compose commands
14
+ - Added schema switcher option
15
+ - Added opt_in_widget option (checkboxes and switches for opt int activators)
16
+ - Added enforce_const option
17
+ - Added enforce_const option
18
+ - ShowErrorMessages method
19
+ - Recursively deactivate non required properties, when adding a new row in an array
20
+ - Fixed error in Playground
21
+ - Fixed simpleMde exception
22
+ - Support drag and drop for array item
23
+
3
24
  ### 2.15.1
4
25
 
5
26
  - Fixed #1563 and #1558. Select values not displayed
package/CONTRIBUTING.md CHANGED
@@ -1,5 +1,15 @@
1
1
  Contributing
2
2
  ===============
3
+
4
+ > **Note: This project is in maintenance mode**
5
+ >
6
+ > JSON Editor is now in maintenance mode. We continue to accept and review community pull requests for:
7
+ > - Bug fixes
8
+ > - Security updates
9
+ > - Critical improvements
10
+ >
11
+ > For those seeking active development and new features, consider [Jedison](https://github.com/germanbisurgi/jedison).
12
+
3
13
  This document briefly lists the guidelines for contributing to JSON Editor.
4
14
 
5
15
  Reporting Bugs
package/README.md CHANGED
@@ -1,6 +1,17 @@
1
1
  JSON Editor
2
2
  ===========
3
3
 
4
+ > **🔧 Maintenance Mode Notice**
5
+ >
6
+ > This library is now in maintenance mode. While it remains stable and functional, active development has moved to [Jedison](https://github.com/germanbisurgi/jedison).
7
+ >
8
+ > We will continue to:
9
+ > - Accept and review community pull requests
10
+ > - Address critical bugs and security issues
11
+ > - Keep the library functional for existing users
12
+ >
13
+ > For new projects or those seeking active development, consider using [Jedison](https://github.com/germanbisurgi/jedison).
14
+
4
15
  [![Actions Status](https://github.com/json-editor/json-editor/actions/workflows/build.yml/badge.svg)](https://github.com/json-editor/json-editor/actions)
5
16
 
6
17
  Fork of the inactive [jdorn/json-editor](https://github.com/jdorn/json-editor) using the updated fork [json-editor/json-editor](https://github.com/json-editor/json-editor).
@@ -336,6 +347,11 @@ Here are all the available options:
336
347
  <td>When set to <code>true</code>, the schema <code>const</code> will serve as the default value, and the editor will prevent any changes to it.</td>
337
348
  <td><code>false</code></td>
338
349
  </tr>
350
+ <tr>
351
+ <td>opt_in_widget</td>
352
+ <td>Which widget should be used for opt-in inputs. Possible values are <code>'checkbox'</code> and <code>'switch'</code></td>
353
+ <td><code>'checkbox'</code></td>
354
+ </tr>
339
355
  </tbody>
340
356
  </table>
341
357
 
@@ -409,6 +425,12 @@ const errors = editor.validate({
409
425
  });
410
426
  ```
411
427
 
428
+ Display validation errors on demand
429
+
430
+ ```javascript
431
+ editor.showValidationErrors();
432
+ ```
433
+
412
434
  ### Listen for Changes
413
435
 
414
436
  The `change` event is fired whenever the editor's value changes.
@@ -1126,6 +1148,10 @@ editor.on('deleteAllRows', deletedValues => {
1126
1148
  });
1127
1149
  ```
1128
1150
 
1151
+ Drag and drop for array item is supported to perform a quick item moving.
1152
+ For array editor with format=`tabs` or `tabs-top`, you can drag the tab header directly.
1153
+ For the default array editor (or format=`table`), you have to drag the array item panel with Ctrl key pressed (to avoid side-effect of draggable panel), or drag any text in the input box to another item panel.
1154
+
1129
1155
  #### Schema loader events
1130
1156
 
1131
1157
  When schemas are loaded via a request, the `schemaLoaded` event is triggered individually for each schema after its loading.
@@ -1224,6 +1250,7 @@ Editor Options
1224
1250
 
1225
1251
  Editors can accept options which alter the behavior in some way.
1226
1252
 
1253
+ * `switcher` - If set to false and using oneOf or anyOf, a multiple editor is not created, but validation still applies. Should be used with schemas with same type.
1227
1254
  * `titleHidden` - If set to true, the editor title will be visually hidden
1228
1255
  * `collapsed` - If set to true, the editor will start collapsed (works for objects and arrays)
1229
1256
  * `disable_array_add` - If set to true, the "add row" button will be hidden (works for arrays)