@json-editor/json-editor 2.9.0-beta.0 → 2.9.0

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 (58) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/README.md +16 -7
  3. package/dist/jsoneditor.js +2 -2
  4. package/dist/jsoneditor.js.LICENSE.txt +15 -0
  5. package/dist/jsoneditor.js.map +1 -0
  6. package/dist/nonmin/jsoneditor.js +989 -127
  7. package/dist/nonmin/jsoneditor.js.map +1 -1
  8. package/docs/index.html +22 -10
  9. package/docs/meta_schema.json +3 -2
  10. package/docs/starrating.html +2 -6
  11. package/package.json +4 -2
  12. package/src/defaults.js +9 -1
  13. package/src/editor.js +17 -3
  14. package/src/editors/array.js +7 -4
  15. package/src/editors/multiselect.js +1 -0
  16. package/src/editors/object.css +3 -3
  17. package/src/editors/object.css.js +1 -1
  18. package/src/editors/object.js +5 -2
  19. package/src/editors/table.js +11 -4
  20. package/src/editors/upload.js +3 -2
  21. package/src/themes/barebones.js +3 -1
  22. package/src/themes/bootstrap5.css +97 -0
  23. package/src/themes/bootstrap5.css.js +3 -0
  24. package/src/themes/bootstrap5.js +623 -0
  25. package/src/themes/index.js +2 -0
  26. package/src/themes/tailwind.js +2 -2
  27. package/tests/codeceptjs/core_test.js +107 -17
  28. package/tests/codeceptjs/editors/array_test.js +6 -5
  29. package/tests/codeceptjs/editors/button_test.js +7 -6
  30. package/tests/codeceptjs/editors/checkbox_test.js +3 -2
  31. package/tests/codeceptjs/editors/integer_test.js +3 -2
  32. package/tests/codeceptjs/editors/issues/issue-gh-1158_test.js +10 -0
  33. package/tests/codeceptjs/editors/issues/issue-gh-1257_test.js +13 -0
  34. package/tests/codeceptjs/editors/number_test.js +2 -1
  35. package/tests/codeceptjs/editors/object_test.js +39 -38
  36. package/tests/codeceptjs/editors/option-no_default_values_test.js +1 -1
  37. package/tests/codeceptjs/editors/programmatic-changes_test.js +3 -2
  38. package/tests/codeceptjs/editors/tabs_test.js +5 -3
  39. package/tests/codeceptjs/editors/validation_test.js +3 -1
  40. package/tests/codeceptjs/meta-schema_test.js +72 -4
  41. package/tests/codeceptjs/schemaloader_test.js +2 -1
  42. package/tests/codeceptjs/test-config.js +3 -0
  43. package/tests/codeceptjs/themes_test.js +14 -0
  44. package/tests/pages/anyof-2.html +90 -0
  45. package/tests/pages/anyof.html +1 -1
  46. package/tests/pages/container-attributes.html +50 -0
  47. package/tests/pages/issues/issue-gh-1158.html +50 -0
  48. package/tests/pages/issues/issue-gh-1233-failing.html +46 -0
  49. package/tests/pages/issues/issue-gh-1233-passing.html +49 -0
  50. package/tests/pages/issues/issue-gh-1257.html +77 -0
  51. package/tests/pages/meta-schema.html +747 -0
  52. package/tests/pages/meta_schema.json +3 -16
  53. package/tests/pages/oneof-2.html +90 -0
  54. package/tests/pages/per-editor-options.html +44 -0
  55. package/tests/pages/stepper.html +2 -2
  56. package/tests/pages/themes.html +2 -0
  57. /package/tests/pages/{table-move-events.html → array-events-table.html} +0 -0
  58. /package/tests/pages/{array-move-events.html → array-events.html} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,8 +1,42 @@
1
1
  ### Unreleased
2
2
 
3
- ### dev
3
+ ### 2.9.0
4
+
5
+ Updated datetime example page
6
+ Updated packages
7
+ Fixed issue #1133: default values for each of the oneOf options
8
+ Upgraded codeceptjs from 2 to 3
9
+ Fixed npm audit issues
10
+ Fixed unnecessary Null values included in enums
11
+ Fixed radio editors not recognising numerical values
12
+
13
+ ### 2.9.0-beta.1
14
+
15
+ - Fixed editors default values bug
16
+ - Fixed typo in example schema
17
+ - Fixed color editors default value bug
18
+ - Improved docs page UI with ACE editor and some spacing
19
+ - Fixed hidden option for upload editor
20
+ - Fixed array editors events and callbacks params
21
+ - Added link to GitHub repo in docs page
22
+ - Fixed typo in code
23
+ - Added test for meta-schema scenario
24
+ - Added test for $ref schema with oneOf/anyOf scenario
25
+ - Added Bootstrap 5 theme
26
+ - Removed !important flags from CSS
27
+ - Added upload translations
28
+ - Updated SCEditor documentation
29
+ - Fixed test waits
30
+ - Fixed per editor Options
31
+ - Fixed bug in tailwind and barebones theme. Append errors to element that exist.
32
+ - Fixed #1194 Event listener removed after destroy
33
+ - Added setContainerAttributes option
34
+ - Fixed select2/selectize cannnot add new option
35
+
36
+ ### 2.9.0-beta.0
4
37
 
5
38
  - Enh #1162 Added cache system for schema loader (chhill-redhat)
39
+ - Added warnings undefined callbacks
6
40
 
7
41
  ### 2.8.0
8
42
 
package/README.md CHANGED
@@ -463,6 +463,7 @@ The currently supported themes are:
463
463
  * barebones
464
464
  * html (the default)
465
465
  * bootstrap4
466
+ * bootstrap5
466
467
  * spectre
467
468
  * tailwind
468
469
 
@@ -724,7 +725,8 @@ Here is an example that will show a color picker in browsers that support it:
724
725
 
725
726
  #### String Editors Input Attributes
726
727
 
727
- You can set custom attributes such as **placeholder**, **class** and **data-** on the input field using the special options keyword `inputAttributes`.
728
+ You can set custom attributes such as **placeholder**, **class** and **data-** on the input field and on the editor container
729
+ using the special options keyword `inputAttributes` and `containerAttributes`.
728
730
 
729
731
  Like this:
730
732
 
@@ -738,6 +740,10 @@ Like this:
738
740
  "inputAttributes": {
739
741
  "placeholder": "your name here...",
740
742
  "class": "myclass"
743
+ },
744
+ "containerAttributes": {
745
+ "data-container": "my-container",
746
+ "class": "my-container-class"
741
747
  }
742
748
  }
743
749
  }
@@ -749,12 +755,12 @@ Like this:
749
755
 
750
756
  In addition to the standard HTML input formats, JSON Editor can also integrate with several 3rd party specialized editors. These libraries are not included in JSON Editor and you must load them on the page yourself.
751
757
 
752
- __SCEditor__ provides WYSIWYG editing of HTML and BBCode. To use it, set the format to `html` or `bbcode` and set the `wysiwyg` option to `true`:
758
+ __SCEditor__ provides WYSIWYG editing of HTML and BBCode. To use it, set the format to `xhtml` or `bbcode` and set the `wysiwyg` option to `true`:
753
759
 
754
760
  ```json
755
761
  {
756
762
  "type": "string",
757
- "format": "html",
763
+ "format": "xhtml",
758
764
  "options": {
759
765
  "wysiwyg": true
760
766
  }
@@ -1012,14 +1018,17 @@ When an array item is added, removed, moved up, moved or removed the json editor
1012
1018
  editor.on('moveRow', editor => {
1013
1019
  console.log('moveRow', editor)
1014
1020
  });
1021
+
1015
1022
  editor.on('addRow', editor => {
1016
1023
  console.log('addRow', editor)
1017
1024
  });
1018
- editor.on('deleteRow', editor => {
1019
- console.log('deleteRow', editor)
1025
+
1026
+ editor.on('deleteRow', deletedValue => {
1027
+ console.log('deleteRow', deletedValue)
1020
1028
  });
1021
- editor.on('deleteAllRows', editor => {
1022
- console.log('deleteAllRows', editor)
1029
+
1030
+ editor.on('deleteAllRows', deletedValues => {
1031
+ console.log('deleteAllRows', deletedValues)
1023
1032
  });
1024
1033
  ```
1025
1034