diff --git a/packages/djedi-json/package-lock.json b/packages/djedi-json/package-lock.json index 7fddbba..aa6a541 100644 --- a/packages/djedi-json/package-lock.json +++ b/packages/djedi-json/package-lock.json @@ -1,17 +1,16 @@ { "name": "djedi-json", - "version": "0.5.4", + "version": "0.5.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "djedi-json", - "version": "0.5.4", + "version": "0.5.5", "license": "ISC", "dependencies": { "classnames": "^2.3.1", - "lodash-es": "^4.17.21", - "weak-key": "^1.0.2" + "lodash-es": "^4.17.21" }, "devDependencies": { "@rollup/plugin-commonjs": "^19.0.0", @@ -2538,13 +2537,6 @@ "safe-buffer": "~5.1.1" } }, - "node_modules/core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "deprecated": "core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.", - "hasInstallScript": true - }, "node_modules/core-js-compat": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.0.tgz", @@ -5332,14 +5324,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/weak-key": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/weak-key/-/weak-key-1.0.2.tgz", - "integrity": "sha512-x9y9moPEcom985nUdHxM+YWbMcP3Ru+fmYqVNHSb6djJGg7H6Ru2ohuzaVIXx1JNyp8E7GO7GsBnehRntaBlsg==", - "dependencies": { - "core-js": "^2.4.0" - } - }, "node_modules/which-boxed-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", @@ -7138,11 +7122,6 @@ "safe-buffer": "~5.1.1" } }, - "core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==" - }, "core-js-compat": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.0.tgz", @@ -9062,14 +9041,6 @@ "object.getownpropertydescriptors": "^2.1.0" } }, - "weak-key": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/weak-key/-/weak-key-1.0.2.tgz", - "integrity": "sha512-x9y9moPEcom985nUdHxM+YWbMcP3Ru+fmYqVNHSb6djJGg7H6Ru2ohuzaVIXx1JNyp8E7GO7GsBnehRntaBlsg==", - "requires": { - "core-js": "^2.4.0" - } - }, "which-boxed-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", diff --git a/packages/djedi-json/package.json b/packages/djedi-json/package.json index d0db31c..2279026 100644 --- a/packages/djedi-json/package.json +++ b/packages/djedi-json/package.json @@ -24,8 +24,7 @@ }, "dependencies": { "classnames": "^2.3.1", - "lodash-es": "^4.17.21", - "weak-key": "^1.0.2" + "lodash-es": "^4.17.21" }, "peerDependencies": { "react": ">=16.8.0", diff --git a/packages/djedi-json/src/core/Renderer/EditorTree.tsx b/packages/djedi-json/src/core/Renderer/EditorTree.tsx index 4ff50ba..0d8d1e5 100644 --- a/packages/djedi-json/src/core/Renderer/EditorTree.tsx +++ b/packages/djedi-json/src/core/Renderer/EditorTree.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import key from 'weak-key'; import { useCMS } from '../../contexts/cms'; import Editable from '../Editable'; @@ -22,21 +21,16 @@ const EditorTree: React.FC<{ tree: NodeTreeItem; path?: string[] }> = ({ tree, p if (!Config) { return null; } - // const [childKey] = Object.entries(Config.content).find(([, t]) => t.type == 'input/children'); const { children } = tree.content; - // const localPath = [...path, index.toString(), 'content', 'children']; return ( {Array.isArray(children) && - children?.map((child, i) => ( - - ))} + children?.map((child, i) => { + const k = [...path, 'content', 'children', i.toString()]; + return ; + })} );