From fa2a23a83dbfdd8c42abd306385ade6a3167f83a Mon Sep 17 00:00:00 2001 From: Jos de Jong Date: Sun, 5 Jul 2020 14:18:34 +0200 Subject: [PATCH] Cut/copy/paste (WIP) --- src/JSONEditor.svelte | 86 ++++++++++++---- src/JSONNode.svelte | 18 ++-- src/SearchBox.scss | 1 + src/actions.js | 188 +++++++++++++++++++++++++++++++++++ src/clipboard.js | 9 -- src/types.js | 2 +- src/utils/arrayUtils.js | 62 ++++++++++++ src/utils/arrayUtils.test.js | 27 +++++ 8 files changed, 355 insertions(+), 38 deletions(-) create mode 100644 src/actions.js delete mode 100644 src/clipboard.js create mode 100644 src/utils/arrayUtils.js create mode 100644 src/utils/arrayUtils.test.js diff --git a/src/JSONEditor.svelte b/src/JSONEditor.svelte index 1e1d9fb..14d5153 100644 --- a/src/JSONEditor.svelte +++ b/src/JSONEditor.svelte @@ -1,5 +1,6 @@ diff --git a/src/JSONNode.svelte b/src/JSONNode.svelte index 8f73514..a580440 100644 --- a/src/JSONNode.svelte +++ b/src/JSONNode.svelte @@ -1,5 +1,5 @@