@bpmn-io/properties-panel 3.41.0 → 3.41.1
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/dist/index.esm.js +8 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1844,6 +1844,7 @@ function CheckboxGroup(props) {
|
|
|
1844
1844
|
}
|
|
1845
1845
|
|
|
1846
1846
|
const ExternalChange = state.Annotation.define();
|
|
1847
|
+
const parseJsonLinter = langJson.jsonParseLinter();
|
|
1847
1848
|
|
|
1848
1849
|
/**
|
|
1849
1850
|
* A CodeMirror based JSON editor for the properties panel.
|
|
@@ -1888,7 +1889,11 @@ function JsonEditor(props) {
|
|
|
1888
1889
|
if (update.docChanged && !isExternal) {
|
|
1889
1890
|
handleChange(update.state.doc.toString());
|
|
1890
1891
|
}
|
|
1891
|
-
}), langJson.json(), lint.linter(
|
|
1892
|
+
}), langJson.json(), lint.linter(view => {
|
|
1893
|
+
const content = view.state.doc.toString();
|
|
1894
|
+
if (!content.trim()) return [];
|
|
1895
|
+
return parseJsonLinter(view);
|
|
1896
|
+
}, {
|
|
1892
1897
|
delay: 300
|
|
1893
1898
|
})]
|
|
1894
1899
|
}),
|
|
@@ -2024,7 +2029,7 @@ function isEdited$8(node) {
|
|
|
2024
2029
|
// helpers /////////////////
|
|
2025
2030
|
|
|
2026
2031
|
function validateJson(value) {
|
|
2027
|
-
if (!value) return null;
|
|
2032
|
+
if (!value || !value.trim()) return null;
|
|
2028
2033
|
try {
|
|
2029
2034
|
return minDash.isObject(JSON.parse(value)) ? null : 'JSON contains errors';
|
|
2030
2035
|
} catch (e) {
|