diff --git a/src/components/FileMenu/utils.js b/src/components/FileMenu/utils.js index 7cca04a9d..424f7f43e 100644 --- a/src/components/FileMenu/utils.js +++ b/src/components/FileMenu/utils.js @@ -39,3 +39,12 @@ export const appPathFor = (fileType, id) => { return `${window.location.search}${window.location.hash}` } } + +export const preparePayloadForSaveAs = ({ ...visualization }) => { + delete visualization.id + delete visualization.created + delete visualization.createdBy + delete visualization.user + + return visualization +} diff --git a/src/index.js b/src/index.js index 069656b77..8db29cbb2 100644 --- a/src/index.js +++ b/src/index.js @@ -22,6 +22,7 @@ export { default as DimensionMenu } from './components/DimensionMenu.js' export { default as PivotTable } from './components/PivotTable/PivotTable.js' export { default as FileMenu } from './components/FileMenu/FileMenu.js' +export { preparePayloadForSaveAs } from './components/FileMenu/utils.js' export { default as VisTypeIcon } from './components/VisTypeIcon.js'