@json-editor/json-editor 2.11.0 → 2.13.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 (89) hide show
  1. package/.env +1 -1
  2. package/CHANGELOG.md +19 -0
  3. package/README.md +90 -6
  4. package/README_ADDON.md +5 -1
  5. package/dist/jsoneditor.js +1 -1
  6. package/dist/jsoneditor.js.LICENSE.txt +1 -1
  7. package/dist/nonmin/jsoneditor.js +417 -227
  8. package/dist/nonmin/jsoneditor.js.map +1 -1
  9. package/docs/cleave.html +1 -1
  10. package/docs/datetime.html +1 -1
  11. package/docs/describedby.html +1 -1
  12. package/docs/index.html +66 -14
  13. package/docs/meta_schema.json +16 -1
  14. package/docs/radio.html +1 -1
  15. package/docs/scripts/ajv-validator.js +8695 -0
  16. package/docs/select2.html +1 -1
  17. package/docs/selectize.html +2 -5
  18. package/docs/signature.html +12 -11
  19. package/docs/wysiwyg.html +1 -1
  20. package/package.json +1 -1
  21. package/src/core.js +10 -1
  22. package/src/defaults.js +3 -1
  23. package/src/editor.js +19 -1
  24. package/src/editors/array/selectize.js +0 -2
  25. package/src/editors/array.js +24 -13
  26. package/src/editors/base64.js +9 -0
  27. package/src/editors/button.js +8 -2
  28. package/src/editors/integer.js +3 -2
  29. package/src/editors/multiple.js +3 -0
  30. package/src/editors/number.js +4 -2
  31. package/src/editors/object.js +71 -3
  32. package/src/editors/signature.js +16 -16
  33. package/src/editors/simplemde.js +2 -1
  34. package/src/editors/string.js +4 -0
  35. package/src/editors/table.js +17 -14
  36. package/src/resolvers.js +13 -6
  37. package/src/schemaloader.js +13 -0
  38. package/src/theme.js +4 -0
  39. package/src/themes/bootstrap3.js +6 -0
  40. package/src/themes/bootstrap4.js +6 -0
  41. package/src/themes/bootstrap5.js +6 -0
  42. package/src/validator.js +28 -0
  43. package/tests/codeceptjs/codecept.json +1 -1
  44. package/tests/codeceptjs/constrains/contains_test.js +3 -2
  45. package/tests/codeceptjs/constrains/dependentRequired_test.js +33 -0
  46. package/tests/codeceptjs/constrains/dependentSchemas_test.js +1 -0
  47. package/tests/codeceptjs/core_test.js +14 -4
  48. package/tests/codeceptjs/editors/advanced_test.js +1 -1
  49. package/tests/codeceptjs/editors/array_test.js +59 -0
  50. package/tests/codeceptjs/editors/autocomplete_test.js +3 -1
  51. package/tests/codeceptjs/editors/object_test.js +20 -0
  52. package/tests/codeceptjs/editors/tabs_test.js +1 -1
  53. package/tests/codeceptjs/issues/issue-gh-1330_test.js +8 -0
  54. package/tests/codeceptjs/issues/issue-gh-1338_test.js +2 -0
  55. package/tests/codeceptjs/issues/issue-gh-1364_test.js +13 -0
  56. package/tests/codeceptjs/issues/issue-gh-1367_test.js +11 -0
  57. package/tests/codeceptjs/issues/issue-gh-1383_test.js +9 -0
  58. package/tests/codeceptjs/issues/issue-gh-1384_test.js +9 -0
  59. package/tests/codeceptjs/issues/issue-gh-1410_test.js +13 -0
  60. package/tests/codeceptjs/issues/issue-gh-1422_test.js +9 -0
  61. package/tests/codeceptjs/issues/issue-gh-1431_test.js +12 -0
  62. package/tests/codeceptjs/issues/issue-gh-1439_test.js +12 -0
  63. package/tests/docker-compose-local.yml +4 -0
  64. package/tests/pages/array-header-template.html +59 -0
  65. package/tests/pages/array-selectize-create.html +62 -0
  66. package/tests/pages/array-table-responsive.html +65 -0
  67. package/tests/pages/button-icons.html +1 -1
  68. package/tests/pages/button_state_mode_1.html +34 -0
  69. package/tests/pages/button_state_mode_2.html +35 -0
  70. package/tests/pages/dependentRequired.html +71 -0
  71. package/tests/pages/issues/issue-gh-1330.html +52 -0
  72. package/tests/pages/issues/issue-gh-1364.html +64 -0
  73. package/tests/pages/issues/issue-gh-1367.html +49 -0
  74. package/tests/pages/issues/issue-gh-1383.html +31 -0
  75. package/tests/pages/issues/issue-gh-1383.json +14 -0
  76. package/tests/pages/issues/issue-gh-1384.html +31 -0
  77. package/tests/pages/issues/issue-gh-1384.json +36 -0
  78. package/tests/pages/issues/issue-gh-1410.html +57 -0
  79. package/tests/pages/issues/issue-gh-1422.html +68 -0
  80. package/tests/pages/issues/issue-gh-1431.html +49 -0
  81. package/tests/pages/issues/issue-gh-1439.html +69 -0
  82. package/tests/pages/keep_only_existing_values.html +1 -1
  83. package/tests/pages/load-events.html +60 -0
  84. package/tests/pages/meta-schema.html +16 -2
  85. package/tests/pages/meta_schema.json +5 -1
  86. package/tests/pages/object-case-sensitive-property-search-false.html +41 -0
  87. package/tests/pages/object-case-sensitive-property-search-true.html +41 -0
  88. package/dist/dev/jsoneditor.js +0 -3687
  89. package/dist/jsoneditor.js.map +0 -1
@@ -0,0 +1,62 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8"/>
5
+ <title>Selectize add item</title>
6
+ <link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
7
+ <link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
8
+ <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.4/css/selectize.bootstrap3.css">
9
+ <script src="../../dist/jsoneditor.js"></script>
10
+ <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
11
+ <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.4/js/standalone/selectize.js"></script>
12
+ </head>
13
+ <body>
14
+
15
+ <div class="container">
16
+ <div class="row">
17
+ <div class="col-xs-12 col-md-6">
18
+ <div id='editor-container'></div>
19
+ </div>
20
+ <div class="col-xs-12 col-md-6">
21
+ <label for="value">value</label>
22
+ <textarea class="form-control" id="value" cols="30" rows="10"></textarea>
23
+ <button id="set-value">Set value</button>
24
+ </div>
25
+ </div>
26
+ </div>
27
+
28
+ <script>
29
+ var schema = {
30
+ "type": "array",
31
+ "format":"selectize",
32
+ "uniqueItems": true,
33
+ "items": {
34
+ "type": "string"
35
+ },
36
+ "options": {
37
+ "selectize": {
38
+ "create": true,
39
+ "plugins": ["remove_button"],
40
+ }
41
+ }
42
+ }
43
+ var editorContainer = document.querySelector('#editor-container')
44
+ var value = document.querySelector('#value')
45
+ var setValue = document.querySelector('#set-value')
46
+ var editor = new JSONEditor(editorContainer, {
47
+ schema: schema,
48
+ theme: 'bootstrap4',
49
+ iconlib: 'fontawesome'
50
+ })
51
+
52
+ editor.on('change', function () {
53
+ value.value = JSON.stringify(editor.getValue())
54
+ })
55
+
56
+ setValue.addEventListener('click', function () {
57
+ editor.setValue(JSON.parse(value.value))
58
+ })
59
+ </script>
60
+
61
+ </body>
62
+ </html>
@@ -0,0 +1,65 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8"/>
5
+ <title>dependentSchemas</title>
6
+ <script src="../../dist/jsoneditor.js"></script>
7
+ <link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
8
+ <link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
9
+ </head>
10
+ <body>
11
+
12
+ <div class="container">
13
+ <div id='editor-container'></div>
14
+ </div>
15
+
16
+ <style>
17
+ th {
18
+ white-space: nowrap;
19
+ }
20
+ </style>
21
+
22
+ <script>
23
+ var editorContainer = document.querySelector('#editor-container')
24
+ var schema = {
25
+ "title": "Array table responsive",
26
+ "format": "table",
27
+ "type": "array",
28
+ "minItems": 1,
29
+ "items": {
30
+ "title": "item",
31
+ "type": "object",
32
+ "properties": {
33
+ "property_a": {
34
+ "title": "A very long title",
35
+ "type": "string"
36
+ },
37
+ "property_b": {
38
+ "title": "Another long title",
39
+ "type": "string"
40
+ },
41
+ "property_c": {
42
+ "title": "Another long title too",
43
+ "type": "string"
44
+ },
45
+ "property_d": {
46
+ "title": "Another long title too",
47
+ "type": "string"
48
+ },
49
+ "property_e": {
50
+ "title": "Another long title too",
51
+ "type": "string"
52
+ }
53
+ }
54
+ }
55
+ }
56
+
57
+ var editor = new JSONEditor(editorContainer, {
58
+ schema: schema,
59
+ theme: 'bootstrap4',
60
+ iconlib: 'fontawesome',
61
+ })
62
+ </script>
63
+
64
+ </body>
65
+ </html>
@@ -17,7 +17,7 @@
17
17
  'title': 'test',
18
18
  'properties': {
19
19
  'search': {
20
- 'type': 'button',
20
+ 'format': 'button',
21
21
  'title': 'Search',
22
22
  'options': {
23
23
  'button': {
@@ -0,0 +1,34 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8"/>
5
+ <title>button_state_mode</title>
6
+ <script src="../../dist/jsoneditor.js"></script>
7
+ <link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
8
+ <link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
9
+ </head>
10
+ <body>
11
+
12
+ <div class="container">
13
+ <div id='editor-container'></div>
14
+ </div>
15
+
16
+ <script>
17
+ var editorContainer = document.querySelector('#editor-container')
18
+ var schema = {
19
+ 'title': 'button_state_mode',
20
+ 'type': 'array',
21
+ 'items': {
22
+ 'type': 'number'
23
+ },
24
+ 'minItems': 3
25
+ }
26
+
27
+ var editor = new JSONEditor(editorContainer, {
28
+ schema: schema,
29
+ theme: 'bootstrap4'
30
+ })
31
+ </script>
32
+
33
+ </body>
34
+ </html>
@@ -0,0 +1,35 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8"/>
5
+ <title>button_state_mode</title>
6
+ <script src="../../dist/jsoneditor.js"></script>
7
+ <link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
8
+ <link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
9
+ </head>
10
+ <body>
11
+
12
+ <div class="container">
13
+ <div id='editor-container'></div>
14
+ </div>
15
+
16
+ <script>
17
+ var editorContainer = document.querySelector('#editor-container')
18
+ var schema = {
19
+ 'title': 'button_state_mode',
20
+ 'type': 'array',
21
+ 'items': {
22
+ 'type': 'number'
23
+ },
24
+ 'minItems': 3
25
+ }
26
+
27
+ var editor = new JSONEditor(editorContainer, {
28
+ schema: schema,
29
+ theme: 'bootstrap4',
30
+ button_state_mode: 2
31
+ })
32
+ </script>
33
+
34
+ </body>
35
+ </html>
@@ -0,0 +1,71 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8"/>
5
+ <title>dependentRequired</title>
6
+ <script src="../../dist/jsoneditor.js"></script>
7
+ <link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
8
+ <link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
9
+ </head>
10
+ <body>
11
+
12
+ <div class="container">
13
+ <div id='editor-container'></div>
14
+
15
+ <div class="form-group">
16
+ <label for="textarea-value">Value</label>
17
+ <textarea class="form-control" id="textarea-value" cols="30" rows="10"></textarea>
18
+ </div>
19
+ </div>
20
+
21
+ <script>
22
+ var editorContainer = document.querySelector('#editor-container')
23
+ var textareaValue = document.querySelector('#textarea-value')
24
+ var schema = {
25
+ 'title': 'dependentRequired',
26
+ 'type': 'object',
27
+ 'properties': {
28
+ 'name': {
29
+ 'type': 'string'
30
+ },
31
+ 'credit_card': {
32
+ 'type': 'number'
33
+ },
34
+ 'billing_address_1': {
35
+ 'type': 'string'
36
+ },
37
+ 'billing_address_2': {
38
+ 'type': 'string'
39
+ }
40
+ },
41
+ 'required': [
42
+ 'name'
43
+ ],
44
+ 'dependentRequired': {
45
+ 'credit_card': [
46
+ 'billing_address_1',
47
+ ],
48
+ 'billing_address_1': [
49
+ 'billing_address_2',
50
+ ],
51
+ 'billing_address_2': [
52
+ 'billing_address_3',
53
+ ]
54
+ }
55
+ }
56
+
57
+ var editor = new JSONEditor(editorContainer, {
58
+ schema: schema,
59
+ theme: 'bootstrap4',
60
+ iconlib: 'fontawesome',
61
+ show_errors: 'always',
62
+ show_opt_in: true
63
+ })
64
+
65
+ editor.on('change', function () {
66
+ textareaValue.value = JSON.stringify(editor.getValue())
67
+ })
68
+ </script>
69
+
70
+ </body>
71
+ </html>
@@ -0,0 +1,52 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>GitHub Issue 1330</title>
6
+ <link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
7
+ <link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
8
+ <script src="../../../dist/jsoneditor.js"></script>
9
+ </head>
10
+ <body>
11
+ <div class="container">
12
+ <a href="https://github.com/json-editor/json-editor/issues/1330">GitHub Issue 1330</a>
13
+ <div id='editor_holder'></div>
14
+ </div>
15
+
16
+ <script>
17
+ var defaultSchema = {
18
+ "$id": "https://example.com/person.schema.json",
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "title": "My Test",
21
+ "type": "object",
22
+ "required": [ "test" ],
23
+ "properties": {
24
+ "test": {
25
+ "type": "array",
26
+ "format": "checkbox",
27
+ "title": "een testje",
28
+ "uniqueItems": true,
29
+ "items": {
30
+ "type": "string",
31
+ "$ref": "#/definitions/columns_enum"
32
+ }
33
+ }
34
+ },
35
+ "definitions": {
36
+ "columns_enum": {
37
+ "type": "string",
38
+ "enum": ["xx", "yy", "zz"]
39
+ }
40
+ }
41
+ }
42
+
43
+ var editor = new JSONEditor(document.getElementById('editor_holder'),{
44
+ iconlib: 'fontawesome5',
45
+ object_layout: 'normal',
46
+ schema: defaultSchema,
47
+ show_errors: 'always',
48
+ theme: 'bootstrap4'
49
+ });
50
+ </script>
51
+ </body>
52
+ </html>
@@ -0,0 +1,64 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>GitHub Issue 1364</title>
6
+ <link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
7
+ <link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
8
+ <script src="../../../dist/jsoneditor.js"></script>
9
+ </head>
10
+ <body>
11
+ <div class="container">
12
+ <a href="https://github.com/json-editor/json-editor/issues/1158">GitHub Issue 1364</a>
13
+ <label for="value">Value</label>
14
+ <textarea class="form-control" id="value" rows="6" style="font-size: 12px; font-family: monospace;"></textarea>
15
+ <div id='editor_holder'></div>
16
+ </div>
17
+
18
+ <script>
19
+ var defaultSchema = {
20
+ "type": "object",
21
+ "properties": {
22
+ "engine": {
23
+ "type": "string",
24
+ "enum": ["none", "test1"]
25
+ },
26
+ "child1": {
27
+ "type": "object",
28
+ "properties": {
29
+ "L2Name": {
30
+ "type": "string",
31
+ "options": {
32
+ "dependencies": {
33
+ "root.engine": "test1"
34
+ }
35
+ }
36
+ }
37
+ }
38
+ },
39
+ "L1Name": {
40
+ "type": "string",
41
+ "options": {
42
+ "dependencies": {
43
+ "root.engine": "test1"
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+
50
+ var value = document.querySelector('#value')
51
+ var editor = new JSONEditor(document.getElementById('editor_holder'),{
52
+ iconlib: 'fontawesome5',
53
+ object_layout: 'normal',
54
+ schema: defaultSchema,
55
+ show_errors: 'always',
56
+ theme: 'bootstrap4'
57
+ });
58
+
59
+ editor.on('change', function () {
60
+ value.value = JSON.stringify(editor.getValue())
61
+ })
62
+ </script>
63
+ </body>
64
+ </html>
@@ -0,0 +1,49 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>GitHub Issue 1367</title>
6
+ <link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
7
+ <link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
8
+ <script src="https://cdn.jsdelivr.net/npm/signature_pad@2.3.2/dist/signature_pad.js"></script>
9
+ <script src="../../../dist/jsoneditor.js"></script>
10
+ </head>
11
+ <body>
12
+ <div class="container">
13
+ <a href="https://github.com/json-editor/json-editor/issues/1158">GitHub Issue 1367</a>
14
+ <label for="value">Value</label>
15
+ <textarea class="form-control" id="value" rows="6" style="font-size: 12px; font-family: monospace;"></textarea>
16
+ <div id='editor_holder'></div>
17
+ </div>
18
+
19
+ <script>
20
+ var defaultSchema = {
21
+ 'type': 'object',
22
+ 'title': 'Document',
23
+ 'properties': {
24
+ 'signature': {
25
+ 'type': 'string',
26
+ 'format': 'signature',
27
+ 'title': 'Signature',
28
+ 'options': {
29
+ 'canvas_height': 500
30
+ }
31
+ }
32
+ }
33
+ }
34
+
35
+ var value = document.querySelector('#value')
36
+ var editor = new JSONEditor(document.getElementById('editor_holder'),{
37
+ iconlib: 'fontawesome5',
38
+ object_layout: 'normal',
39
+ schema: defaultSchema,
40
+ show_errors: 'always',
41
+ theme: 'bootstrap4'
42
+ });
43
+
44
+ editor.on('change', function () {
45
+ value.value = JSON.stringify(editor.getValue())
46
+ })
47
+ </script>
48
+ </body>
49
+ </html>
@@ -0,0 +1,31 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>GitHub Issue 1383</title>
6
+ <link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
7
+ <link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
8
+ <script src="../../../dist/jsoneditor.js"></script>
9
+ </head>
10
+ <body>
11
+ <div class="container">
12
+ <a href="https://github.com/json-editor/json-editor/issues/1383">GitHub Issue 1383</a>
13
+ <div id='editor_holder'></div>
14
+ </div>
15
+
16
+ <script>
17
+ var defaultSchema = {
18
+ "$ref": "./issue-gh-1383.json"
19
+ }
20
+
21
+ var editor = new JSONEditor(document.getElementById('editor_holder'),{
22
+ iconlib: 'fontawesome5',
23
+ object_layout: 'normal',
24
+ schema: defaultSchema,
25
+ show_errors: 'always',
26
+ theme: 'bootstrap4',
27
+ ajax: true
28
+ });
29
+ </script>
30
+ </body>
31
+ </html>
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+
4
+ "properties": {
5
+ "activity-timeout": {
6
+ "description": "How long a CMFActivity-initiated transaction may last, in seconds",
7
+ "default": null,
8
+ "type": [
9
+ "number",
10
+ "null"
11
+ ]
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,31 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>GitHub Issue 1384</title>
6
+ <link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
7
+ <link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
8
+ <script src="../../../dist/jsoneditor.js"></script>
9
+ </head>
10
+ <body>
11
+ <div class="container">
12
+ <a href="https://github.com/json-editor/json-editor/issues/1384">GitHub Issue 1384</a>
13
+ <div id='editor_holder'></div>
14
+ </div>
15
+
16
+ <script>
17
+ var defaultSchema = {
18
+ "$ref": "./issue-gh-1384.json"
19
+ }
20
+
21
+ var editor = new JSONEditor(document.getElementById('editor_holder'),{
22
+ iconlib: 'fontawesome5',
23
+ object_layout: 'normal',
24
+ schema: defaultSchema,
25
+ show_errors: 'always',
26
+ theme: 'bootstrap4',
27
+ ajax: true
28
+ });
29
+ </script>
30
+ </body>
31
+ </html>
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+
4
+ "description": "Parameters to instantiate ERP5",
5
+ "type": "object",
6
+ "definitions": {
7
+ "tcpv4port": {
8
+ "minimum": 0,
9
+ "maximum": 65535,
10
+ "type": "integer"
11
+ }
12
+ },
13
+ "properties": {
14
+ "zope-partition-dict": {
15
+ "description": "Zope layout definition",
16
+ "default": {
17
+ "1": {}
18
+ },
19
+ "patternProperties": {
20
+ ".*": {
21
+ "properties": {
22
+ "port-base": {
23
+ "allOf": [
24
+ {
25
+ "$ref": "#/definitions/tcpv4port"
26
+ }
27
+ ]
28
+ }
29
+ },
30
+ "type": "object"
31
+ }
32
+ },
33
+ "type": "object"
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,57 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>GitHub Issue 1410</title>
6
+ <link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
7
+ <link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
8
+ <script src="../../../dist/jsoneditor.js"></script>
9
+ </head>
10
+ <body>
11
+ <div class="container">
12
+ <a href="https://github.com/json-editor/json-editor/issues/1410">GitHub Issue 1410</a>
13
+ <div id='editor_holder'></div>
14
+ </div>
15
+
16
+ <script>
17
+ var defaultSchema = {
18
+ 'title': 'additionalProperties',
19
+ 'type': 'object',
20
+ 'properties': {
21
+ "standard": {
22
+ "type": "object",
23
+ "properties": {
24
+ "prop": {
25
+ "title": "Prop",
26
+ "type": "string"
27
+ }
28
+ }
29
+ },
30
+ "extras": {
31
+ "type": "object",
32
+ "additionalProperties": {
33
+ "type": ["number", "boolean", "string", "array"],
34
+ "items": {
35
+ "type": ["number", "boolean", "string"]
36
+ }
37
+ },
38
+ "properties": {
39
+ "prop": {
40
+ "title": "Prop",
41
+ "type": "string"
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+
48
+ var editor = new JSONEditor(document.getElementById('editor_holder'),{
49
+ iconlib: 'fontawesome5',
50
+ schema: defaultSchema,
51
+ show_errors: 'always',
52
+ theme: 'bootstrap4',
53
+ no_additional_properties: true
54
+ });
55
+ </script>
56
+ </body>
57
+ </html>