@json-editor/json-editor 2.15.1 → 2.15.2
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.
- package/.github/workflows/build.yml +5 -5
- package/CHANGELOG.md +15 -0
- package/README.md +16 -0
- package/dist/jsoneditor.js +1 -1
- package/dist/jsoneditor.js.LICENSE.txt +1 -1
- package/dist/nonmin/jsoneditor.js +496 -149
- package/dist/nonmin/jsoneditor.js.map +1 -1
- package/package.json +1 -1
- package/src/core.js +11 -0
- package/src/defaults.js +2 -1
- package/src/editor.js +26 -15
- package/src/editors/ace.js +1 -0
- package/src/editors/array/choices.js +1 -0
- package/src/editors/array/select2.js +2 -0
- package/src/editors/array/selectize.js +2 -0
- package/src/editors/array.js +81 -0
- package/src/editors/base64.js +2 -0
- package/src/editors/checkbox.js +13 -1
- package/src/editors/choices.js +2 -0
- package/src/editors/colorpicker.js +2 -0
- package/src/editors/datetime.js +2 -0
- package/src/editors/describedby.js +2 -0
- package/src/editors/enum.js +3 -1
- package/src/editors/hidden.js +2 -0
- package/src/editors/jodit.js +2 -0
- package/src/editors/multiple.js +2 -0
- package/src/editors/multiselect.js +2 -0
- package/src/editors/object.js +10 -3
- package/src/editors/radio.js +2 -0
- package/src/editors/sceditor.js +2 -0
- package/src/editors/select.js +2 -1
- package/src/editors/select2.js +2 -0
- package/src/editors/selectize.js +2 -0
- package/src/editors/signature.js +2 -0
- package/src/editors/simplemde.js +3 -1
- package/src/editors/starrating.js +2 -0
- package/src/editors/string.js +2 -0
- package/src/editors/table.js +19 -2
- package/src/editors/upload.js +2 -0
- package/src/editors/uuid.js +2 -0
- package/src/resolvers.js +1 -1
- package/src/theme.js +23 -0
- package/src/themes/bootstrap3.css +53 -0
- package/src/themes/bootstrap3.css.js +1 -1
- package/src/themes/bootstrap3.js +30 -0
- package/src/themes/bootstrap4.js +27 -0
- package/src/themes/bootstrap5.js +28 -0
- package/src/themes/spectre.js +28 -0
- package/src/themes/tailwind.css +54 -0
- package/src/themes/tailwind.css.js +1 -1
- package/src/themes/tailwind.js +26 -0
- package/tests/codeceptjs/core_test.js +28 -0
- package/tests/codeceptjs/editors/multiple_test.js +27 -0
- package/tests/codeceptjs/issues/issue-gh-1562_test.js +12 -0
- package/tests/codeceptjs/issues/issue-gh-1586_test.js +15 -0
- package/tests/pages/editor-show-validation-errors.html +54 -0
- package/tests/pages/enforce-const.html +10 -18
- package/tests/pages/issues/issue-gh-1562.html +170 -0
- package/tests/pages/issues/issue-gh-1586.html +48 -0
- package/tests/pages/opt-in-widget.html +134 -0
- package/tests/pages/switcher-option.html +69 -0
|
@@ -46,14 +46,14 @@ jobs:
|
|
|
46
46
|
# run: |
|
|
47
47
|
# npm install
|
|
48
48
|
- name: Install
|
|
49
|
-
run: docker
|
|
49
|
+
run: docker compose run -T --rm node npm install
|
|
50
50
|
- name: Start
|
|
51
|
-
run: docker
|
|
51
|
+
run: docker compose up -d ${SELENIUM_BROWSER}
|
|
52
52
|
- name: Build
|
|
53
|
-
run: docker
|
|
53
|
+
run: docker compose run -T --rm node npm run ${BUILD_ENV}
|
|
54
54
|
- name: Test
|
|
55
55
|
run: |
|
|
56
|
-
docker
|
|
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
|
|
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,20 @@
|
|
|
1
1
|
### Unreleased
|
|
2
2
|
|
|
3
|
+
### 2.15.2
|
|
4
|
+
|
|
5
|
+
- Support drag and drop for array item
|
|
6
|
+
- Updated to docker compose commands
|
|
7
|
+
- Updated to docker compose commands
|
|
8
|
+
- Added schema switcher option
|
|
9
|
+
- Added opt_in_widget option (checkboxes and switches for opt int activators)
|
|
10
|
+
- Added enforce_const option
|
|
11
|
+
- Added enforce_const option
|
|
12
|
+
- ShowErrorMessages method
|
|
13
|
+
- Recursively deactivate non required properties, when adding a new row in an array
|
|
14
|
+
- Fixed error in Playground
|
|
15
|
+
- Fixed simpleMde exception
|
|
16
|
+
- Support drag and drop for array item
|
|
17
|
+
|
|
3
18
|
### 2.15.1
|
|
4
19
|
|
|
5
20
|
- Fixed #1563 and #1558. Select values not displayed
|
package/README.md
CHANGED
|
@@ -336,6 +336,11 @@ Here are all the available options:
|
|
|
336
336
|
<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
337
|
<td><code>false</code></td>
|
|
338
338
|
</tr>
|
|
339
|
+
<tr>
|
|
340
|
+
<td>opt_in_widget</td>
|
|
341
|
+
<td>Which widget should be used for opt-in inputs. Possible values are <code>'checkbox'</code> and <code>'switch'</code></td>
|
|
342
|
+
<td><code>'checkbox'</code></td>
|
|
343
|
+
</tr>
|
|
339
344
|
</tbody>
|
|
340
345
|
</table>
|
|
341
346
|
|
|
@@ -409,6 +414,12 @@ const errors = editor.validate({
|
|
|
409
414
|
});
|
|
410
415
|
```
|
|
411
416
|
|
|
417
|
+
Display validation errors on demand
|
|
418
|
+
|
|
419
|
+
```javascript
|
|
420
|
+
editor.showValidationErrors();
|
|
421
|
+
```
|
|
422
|
+
|
|
412
423
|
### Listen for Changes
|
|
413
424
|
|
|
414
425
|
The `change` event is fired whenever the editor's value changes.
|
|
@@ -1126,6 +1137,10 @@ editor.on('deleteAllRows', deletedValues => {
|
|
|
1126
1137
|
});
|
|
1127
1138
|
```
|
|
1128
1139
|
|
|
1140
|
+
Drag and drop for array item is supported to perform a quick item moving.
|
|
1141
|
+
For array editor with format=`tabs` or `tabs-top`, you can drag the tab header directly.
|
|
1142
|
+
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.
|
|
1143
|
+
|
|
1129
1144
|
#### Schema loader events
|
|
1130
1145
|
|
|
1131
1146
|
When schemas are loaded via a request, the `schemaLoaded` event is triggered individually for each schema after its loading.
|
|
@@ -1224,6 +1239,7 @@ Editor Options
|
|
|
1224
1239
|
|
|
1225
1240
|
Editors can accept options which alter the behavior in some way.
|
|
1226
1241
|
|
|
1242
|
+
* `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
1243
|
* `titleHidden` - If set to true, the editor title will be visually hidden
|
|
1228
1244
|
* `collapsed` - If set to true, the editor will start collapsed (works for objects and arrays)
|
|
1229
1245
|
* `disable_array_add` - If set to true, the "add row" button will be hidden (works for arrays)
|