diff --git a/package-lock.json b/package-lock.json index 16f4b54..d5b4b04 100644 --- a/package-lock.json +++ b/package-lock.json @@ -752,6 +752,11 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" }, + "lodash-es": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.15.tgz", + "integrity": "sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==" + }, "log-symbols": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", diff --git a/package.json b/package.json index f6ab319..8a43687 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@fortawesome/free-regular-svg-icons": "5.13.0", "@fortawesome/free-solid-svg-icons": "5.13.0", "classnames": "2.2.6", - "lodash": "4.17.15", + "lodash-es": "4.17.15", "svelte-awesome": "2.3.0" }, "devDependencies": { diff --git a/public/index.html b/public/index.html index 2f1b857..9f23d25 100644 --- a/public/index.html +++ b/public/index.html @@ -29,7 +29,7 @@ color: purple; } - #testEditor { + #testEditorContainer { width: 800px; height: 500px; max-width: 100%; @@ -38,7 +38,7 @@ -
+

@@ -85,12 +85,13 @@ } const testEditor = jsoneditor({ - target: document.getElementById('testEditor'), + target: document.getElementById('testEditorContainer'), props: { json, onChangeJson: json => console.log('onChangeJson', json) } }) + window.testEditor = testEditor // expose to window for debugging document.getElementById('loadLargeJson').onclick = function handleLoadLargeJson() { const count = 500 diff --git a/src/JSONEditor.svelte b/src/JSONEditor.svelte index 1e6e53a..989deb4 100644 --- a/src/JSONEditor.svelte +++ b/src/JSONEditor.svelte @@ -1,25 +1,32 @@