From 97c08c5327cd50c2c5800f9d90bf195f92846774 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 29 Sep 2023 08:50:58 +0100 Subject: [PATCH 1/2] Copy to clipboard while copying inside grids --- .../controls/FieldConfiguration.svelte | 91 ------------------- .../src/components/grid/stores/clipboard.js | 12 ++- 2 files changed, 11 insertions(+), 92 deletions(-) delete mode 100644 packages/builder/src/components/design/settings/controls/FieldConfiguration.svelte diff --git a/packages/builder/src/components/design/settings/controls/FieldConfiguration.svelte b/packages/builder/src/components/design/settings/controls/FieldConfiguration.svelte deleted file mode 100644 index 80f4829d71..0000000000 --- a/packages/builder/src/components/design/settings/controls/FieldConfiguration.svelte +++ /dev/null @@ -1,91 +0,0 @@ - - -Configure columns - - - Configure the columns in your {subject.toLowerCase()}. - - - - diff --git a/packages/frontend-core/src/components/grid/stores/clipboard.js b/packages/frontend-core/src/components/grid/stores/clipboard.js index 71db36de9b..200df29902 100644 --- a/packages/frontend-core/src/components/grid/stores/clipboard.js +++ b/packages/frontend-core/src/components/grid/stores/clipboard.js @@ -1,4 +1,5 @@ import { writable, get } from "svelte/store" +import { Helpers } from "@budibase/bbui" export const createStores = () => { const copiedCell = writable(null) @@ -12,7 +13,16 @@ export const createActions = context => { const { copiedCell, focusedCellAPI } = context const copy = () => { - copiedCell.set(get(focusedCellAPI)?.getValue()) + const value = get(focusedCellAPI)?.getValue() + copiedCell.set(value) + + // Also copy a stringified version to the clipboard + let stringified = "" + if (value != null && value !== "") { + // Only conditionally stringify to avoid redundant quotes around text + stringified = typeof value === "object" ? JSON.stringify(value) : value + } + Helpers.copyToClipboard(stringified) } const paste = () => { From 7c72fe93753257e8d2f087e4ea46f01b53993cd7 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 9 Oct 2023 07:13:11 +0000 Subject: [PATCH 2/2] Bump version to 2.11.15-alpha.1 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index e5ad209fd4..0118865b37 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.11.15-alpha.0", + "version": "2.11.15-alpha.1", "npmClient": "yarn", "packages": [ "packages/*"