From 66db0d985c40028b3d605defabeaadd026416310 Mon Sep 17 00:00:00 2001 From: okorie2 Date: Fri, 6 Dec 2024 19:45:07 +0000 Subject: [PATCH 1/4] chore: copy change from report to story --- src/app/Routes.tsx | 6 +-- .../EmbedChartDialog/chartContainer.tsx | 2 +- .../Dialogs/EmbedChartDialog/index.tsx | 4 +- .../components/Dialogs/TourGuide/index.tsx | 36 ++++++++-------- .../Dialogs/TourGuide/rowFrameIntro.tsx | 8 ++-- .../components/Dialogs/TourGuide/tourEnd.tsx | 14 +++--- .../Dialogs/TourGuide/tourStart.tsx | 4 +- .../Dialogs/deleteDatasetDialog.tsx | 10 ++--- ...ReportDialog.tsx => deleteStoryDialog.tsx} | 10 ++--- .../components/Dialogs/emptyRowsDialog.tsx | 2 +- src/app/components/Dialogs/index.tsx | 4 +- src/app/components/Dialogs/logOutDialog.tsx | 6 +-- ...portDialog.tsx => untitledStoryDialog.tsx} | 12 +++--- src/app/components/Search/data.tsx | 2 +- src/app/components/Search/icons.tsx | 2 +- src/app/hooks/useAutoSave.tsx | 4 +- src/app/hooks/useCheckUserPlan.tsx | 14 +++--- ... => useGetChartsStoriesCountByDataset.tsx} | 10 ++--- src/app/hooks/useHandleRowFrameItemResize.tsx | 2 +- src/app/modules/callback-module/index.tsx | 16 +++---- .../__test__/chartSubheaderToolbar.test.tsx | 32 +++++++------- .../components/chartSubheaderToolbar/data.ts | 16 +++---- .../chartSubheaderToolbar/index.tsx | 40 +++++++++--------- .../chartSubheaderToolbar/styles.ts | 2 +- .../components/common-chart/index.tsx | 8 ++-- .../chart-module/components/toolbox/index.tsx | 6 +-- .../components/toolbox/steps/index.tsx | 14 +++--- .../steps/panels-content/SelectDataset.tsx | 8 ++-- src/app/modules/chart-module/index.tsx | 12 +++--- .../chart-module/routes/chart-type/index.tsx | 18 ++++---- .../chart-module/routes/mapping/index.tsx | 16 +++---- src/app/modules/common/RichEditor/index.tsx | 4 +- .../common/mobile-duplicate-message/index.tsx | 4 +- .../common/not-authorized-message/index.tsx | 2 +- .../component/datasetSubHeaderToolbar.tsx | 2 +- .../dataset-module/component/shareModal.tsx | 2 +- .../routes/upload-module/component/tabs.tsx | 6 +-- .../upload-steps/addDatasetFragment.tsx | 7 +-- .../upload-steps/externalSearch.tsx | 13 +++--- .../upload-module/upload-steps/index.tsx | 2 +- .../AssetCollection/All/assetsGrid.tsx | 2 +- .../AssetCollection/Reports/reportsGrid.tsx | 2 +- .../components/AssetCollection/index.tsx | 8 ++-- .../components/Footer/DesktopFooter.tsx | 2 +- .../components/Subscribe/index.tsx | 2 +- src/app/modules/home-module/index.tsx | 4 +- .../sub-modules/contact/newsletterBlock.tsx | 2 +- .../partners/components/empowerBlock.tsx | 2 +- .../partners/components/tabCard.tsx | 4 +- .../home-module/sub-modules/pricing/index.tsx | 2 +- .../__test__/data.ts | 0 .../__test__/headerBlock.test.tsx | 0 .../reportRightPanelCreateView.test.tsx | 8 ++-- .../__test__/reportSubheaderToolbar.test.tsx | 4 +- .../__test__/setupIntersectionObserver.ts | 0 .../asset/EditHeaderIcon.tsx | 0 .../asset/active-chart-icon.svg | 0 .../asset/active-elements-icon.svg | 0 .../asset/active-media-icon.svg | 0 .../asset/addButton.svg | 0 .../asset/advancedTemplate-img.svg | 0 .../asset/ai-newsletter-big-ellipse.svg | 0 .../asset/ai-newsletter-btm-green-ellipse.svg | 0 .../asset/ai-newsletter-md-btm-ellipse.svg | 0 .../asset/ai-newsletter-sm-purple-ellispe.svg | 0 .../asset/ai-newsletter-top-ellipse.svg | 0 .../asset/ai-newsletter.png | Bin .../asset/ai-newsletter.svg | 0 .../asset/ai-sneak-peek.mp4 | Bin .../asset/aiTemplate-img.svg | 0 .../asset/blankTemplate-img.svg | 0 .../asset/chart-icon.svg | 0 .../asset/chart-illustration.svg | 0 .../asset/clock-img.svg | 0 .../asset/closeIcon.svg | 0 .../asset/dataset-illustration.svg | 0 .../asset/deleteIcon.svg | 0 .../asset/dividerIcon.svg | 0 .../asset/dividerPreview.svg | 0 .../asset/editIcon.svg | 0 .../asset/elements-icon.svg | 0 .../asset/expand-icon.svg | 0 .../asset/header-handle.svg | 0 .../asset/headerPreviewImg.svg | 0 .../asset/info-icon.svg | 0 .../asset/mail-img.svg | 0 .../asset/media-icon.svg | 0 .../asset/more-icon.svg | 0 .../asset/play-icon.svg | 0 .../asset/report-illustration.svg | 0 .../asset/rightArrow.svg | 0 .../asset/rowFrameHandleAdornment.svg | 0 .../asset/rowframe-icon.svg | 0 .../asset/rowframePreview.svg | 0 .../asset/sneak-peek-poster.svg | 0 .../asset/sneak-peek.png | Bin .../asset/textPreview.svg | 0 .../asset/video-icon.svg | 0 .../asset/youtube-gradient.png | Bin .../asset/youtube-icon.svg | 0 .../components/chart-wrapper/index.tsx | 0 .../useLoadDatasetDetailsAPI.tsx | 0 .../chart-wrapper/useRenderChartFromAPI.ts | 0 .../components/grid-columns/index.tsx | 0 .../components/headerBlock/index.tsx | 0 .../components/headerBlock/style.ts | 0 .../components/order-container/index.tsx | 0 .../components/placeholder/index.tsx | 0 .../right-panel-create-view/data.tsx | 0 .../right-panel-create-view/index.tsx | 8 ++-- .../right-panel-create-view/panelLabel.tsx | 0 .../right-panel-create-view/rhpGridItem.tsx | 0 .../right-panel-create-view/style.ts | 0 .../components/right-panel/data.ts | 0 .../components/right-panel/index.tsx | 0 .../components/right-panel/styles.ts | 0 .../rowStructure/addRowFrameButton.tsx | 0 .../components/rowStructure/index.tsx | 0 .../rowStructure/rowStructureDisplay.tsx | 4 +- .../components/rowStructure/style.ts | 0 .../autoResizeInput/index.tsx | 0 .../autoSaveSwitch/index.tsx | 0 .../autoSaveSwitch/style.css | 0 .../storySubHeaderToolbar}/exportButton.tsx | 0 .../storySubHeaderToolbar}/index.tsx | 2 +- .../storySubHeaderToolbar}/infosnackbar.tsx | 0 .../storySubHeaderToolbar}/staticToolbar.tsx | 0 .../storySubHeaderToolbar}/styles.ts | 0 .../components/use-report-panel/index.tsx | 0 .../{report-module => story-module}/data.ts | 0 .../{report-module => story-module}/index.tsx | 0 .../views/ai-template/index.tsx | 4 +- .../views/ai-template/sneakPreview.tsx | 8 ++-- .../views/ai-template/style.ts | 0 .../views/create/data.ts | 0 .../views/create/index.tsx | 0 .../views/downloaded-view/index.tsx | 0 .../views/edit/compareStates.ts | 0 .../views/edit/data.ts | 0 .../views/edit/index.tsx | 0 .../views/initial/data.tsx | 0 .../views/initial/index.tsx | 0 .../views/preview/index.tsx | 0 src/app/state/api/interfaces/index.ts | 20 ++++----- src/app/state/recoil/atoms/index.ts | 30 ++++++------- 145 files changed, 247 insertions(+), 253 deletions(-) rename src/app/components/Dialogs/{deleteReportDialog.tsx => deleteStoryDialog.tsx} (94%) rename src/app/components/Dialogs/{untitledReportDialog.tsx => untitledStoryDialog.tsx} (89%) rename src/app/hooks/{useGetChartsReportsCountByDataset.tsx => useGetChartsStoriesCountByDataset.tsx} (80%) rename src/app/modules/{report-module => story-module}/__test__/data.ts (100%) rename src/app/modules/{report-module => story-module}/__test__/headerBlock.test.tsx (100%) rename src/app/modules/{report-module => story-module}/__test__/reportRightPanelCreateView.test.tsx (98%) rename src/app/modules/{report-module => story-module}/__test__/reportSubheaderToolbar.test.tsx (99%) rename src/app/modules/{report-module => story-module}/__test__/setupIntersectionObserver.ts (100%) rename src/app/modules/{report-module => story-module}/asset/EditHeaderIcon.tsx (100%) rename src/app/modules/{report-module => story-module}/asset/active-chart-icon.svg (100%) rename src/app/modules/{report-module => story-module}/asset/active-elements-icon.svg (100%) rename src/app/modules/{report-module => story-module}/asset/active-media-icon.svg (100%) rename src/app/modules/{report-module => story-module}/asset/addButton.svg (100%) rename src/app/modules/{report-module => story-module}/asset/advancedTemplate-img.svg (100%) rename src/app/modules/{report-module => story-module}/asset/ai-newsletter-big-ellipse.svg (100%) rename src/app/modules/{report-module => story-module}/asset/ai-newsletter-btm-green-ellipse.svg (100%) rename src/app/modules/{report-module => story-module}/asset/ai-newsletter-md-btm-ellipse.svg (100%) rename src/app/modules/{report-module => story-module}/asset/ai-newsletter-sm-purple-ellispe.svg (100%) rename src/app/modules/{report-module => story-module}/asset/ai-newsletter-top-ellipse.svg (100%) rename src/app/modules/{report-module => story-module}/asset/ai-newsletter.png (100%) rename src/app/modules/{report-module => story-module}/asset/ai-newsletter.svg (100%) rename src/app/modules/{report-module => story-module}/asset/ai-sneak-peek.mp4 (100%) rename src/app/modules/{report-module => story-module}/asset/aiTemplate-img.svg (100%) rename src/app/modules/{report-module => story-module}/asset/blankTemplate-img.svg (100%) rename src/app/modules/{report-module => story-module}/asset/chart-icon.svg (100%) rename src/app/modules/{report-module => story-module}/asset/chart-illustration.svg (100%) rename src/app/modules/{report-module => story-module}/asset/clock-img.svg (100%) rename src/app/modules/{report-module => story-module}/asset/closeIcon.svg (100%) rename src/app/modules/{report-module => story-module}/asset/dataset-illustration.svg (100%) rename src/app/modules/{report-module => story-module}/asset/deleteIcon.svg (100%) rename src/app/modules/{report-module => story-module}/asset/dividerIcon.svg (100%) rename src/app/modules/{report-module => story-module}/asset/dividerPreview.svg (100%) rename src/app/modules/{report-module => story-module}/asset/editIcon.svg (100%) rename src/app/modules/{report-module => story-module}/asset/elements-icon.svg (100%) rename src/app/modules/{report-module => story-module}/asset/expand-icon.svg (100%) rename src/app/modules/{report-module => story-module}/asset/header-handle.svg (100%) rename src/app/modules/{report-module => story-module}/asset/headerPreviewImg.svg (100%) rename src/app/modules/{report-module => story-module}/asset/info-icon.svg (100%) rename src/app/modules/{report-module => story-module}/asset/mail-img.svg (100%) rename src/app/modules/{report-module => story-module}/asset/media-icon.svg (100%) rename src/app/modules/{report-module => story-module}/asset/more-icon.svg (100%) rename src/app/modules/{report-module => story-module}/asset/play-icon.svg (100%) rename src/app/modules/{report-module => story-module}/asset/report-illustration.svg (100%) rename src/app/modules/{report-module => story-module}/asset/rightArrow.svg (100%) rename src/app/modules/{report-module => story-module}/asset/rowFrameHandleAdornment.svg (100%) rename src/app/modules/{report-module => story-module}/asset/rowframe-icon.svg (100%) rename src/app/modules/{report-module => story-module}/asset/rowframePreview.svg (100%) rename src/app/modules/{report-module => story-module}/asset/sneak-peek-poster.svg (100%) rename src/app/modules/{report-module => story-module}/asset/sneak-peek.png (100%) rename src/app/modules/{report-module => story-module}/asset/textPreview.svg (100%) rename src/app/modules/{report-module => story-module}/asset/video-icon.svg (100%) rename src/app/modules/{report-module => story-module}/asset/youtube-gradient.png (100%) rename src/app/modules/{report-module => story-module}/asset/youtube-icon.svg (100%) rename src/app/modules/{report-module => story-module}/components/chart-wrapper/index.tsx (100%) rename src/app/modules/{report-module => story-module}/components/chart-wrapper/useLoadDatasetDetailsAPI.tsx (100%) rename src/app/modules/{report-module => story-module}/components/chart-wrapper/useRenderChartFromAPI.ts (100%) rename src/app/modules/{report-module => story-module}/components/grid-columns/index.tsx (100%) rename src/app/modules/{report-module => story-module}/components/headerBlock/index.tsx (100%) rename src/app/modules/{report-module => story-module}/components/headerBlock/style.ts (100%) rename src/app/modules/{report-module => story-module}/components/order-container/index.tsx (100%) rename src/app/modules/{report-module => story-module}/components/placeholder/index.tsx (100%) rename src/app/modules/{report-module => story-module}/components/right-panel-create-view/data.tsx (100%) rename src/app/modules/{report-module => story-module}/components/right-panel-create-view/index.tsx (99%) rename src/app/modules/{report-module => story-module}/components/right-panel-create-view/panelLabel.tsx (100%) rename src/app/modules/{report-module => story-module}/components/right-panel-create-view/rhpGridItem.tsx (100%) rename src/app/modules/{report-module => story-module}/components/right-panel-create-view/style.ts (100%) rename src/app/modules/{report-module => story-module}/components/right-panel/data.ts (100%) rename src/app/modules/{report-module => story-module}/components/right-panel/index.tsx (100%) rename src/app/modules/{report-module => story-module}/components/right-panel/styles.ts (100%) rename src/app/modules/{report-module => story-module}/components/rowStructure/addRowFrameButton.tsx (100%) rename src/app/modules/{report-module => story-module}/components/rowStructure/index.tsx (100%) rename src/app/modules/{report-module => story-module}/components/rowStructure/rowStructureDisplay.tsx (99%) rename src/app/modules/{report-module => story-module}/components/rowStructure/style.ts (100%) rename src/app/modules/{report-module/components/reportSubHeaderToolbar => story-module/components/storySubHeaderToolbar}/autoResizeInput/index.tsx (100%) rename src/app/modules/{report-module/components/reportSubHeaderToolbar => story-module/components/storySubHeaderToolbar}/autoSaveSwitch/index.tsx (100%) rename src/app/modules/{report-module/components/reportSubHeaderToolbar => story-module/components/storySubHeaderToolbar}/autoSaveSwitch/style.css (100%) rename src/app/modules/{report-module/components/reportSubHeaderToolbar => story-module/components/storySubHeaderToolbar}/exportButton.tsx (100%) rename src/app/modules/{report-module/components/reportSubHeaderToolbar => story-module/components/storySubHeaderToolbar}/index.tsx (99%) rename src/app/modules/{report-module/components/reportSubHeaderToolbar => story-module/components/storySubHeaderToolbar}/infosnackbar.tsx (100%) rename src/app/modules/{report-module/components/reportSubHeaderToolbar => story-module/components/storySubHeaderToolbar}/staticToolbar.tsx (100%) rename src/app/modules/{report-module/components/reportSubHeaderToolbar => story-module/components/storySubHeaderToolbar}/styles.ts (100%) rename src/app/modules/{report-module => story-module}/components/use-report-panel/index.tsx (100%) rename src/app/modules/{report-module => story-module}/data.ts (100%) rename src/app/modules/{report-module => story-module}/index.tsx (100%) rename src/app/modules/{report-module => story-module}/views/ai-template/index.tsx (98%) rename src/app/modules/{report-module => story-module}/views/ai-template/sneakPreview.tsx (93%) rename src/app/modules/{report-module => story-module}/views/ai-template/style.ts (100%) rename src/app/modules/{report-module => story-module}/views/create/data.ts (100%) rename src/app/modules/{report-module => story-module}/views/create/index.tsx (100%) rename src/app/modules/{report-module => story-module}/views/downloaded-view/index.tsx (100%) rename src/app/modules/{report-module => story-module}/views/edit/compareStates.ts (100%) rename src/app/modules/{report-module => story-module}/views/edit/data.ts (100%) rename src/app/modules/{report-module => story-module}/views/edit/index.tsx (100%) rename src/app/modules/{report-module => story-module}/views/initial/data.tsx (100%) rename src/app/modules/{report-module => story-module}/views/initial/index.tsx (100%) rename src/app/modules/{report-module => story-module}/views/preview/index.tsx (100%) diff --git a/src/app/Routes.tsx b/src/app/Routes.tsx index 5533a8b82..58f84c734 100755 --- a/src/app/Routes.tsx +++ b/src/app/Routes.tsx @@ -53,7 +53,7 @@ const EmbedChartModule = lazy( ); const ChartModule = lazy(() => import("app/modules/chart-module")); -const ReportModule = lazy(() => import("app/modules/report-module")); +const StoryModule = lazy(() => import("app/modules/story-module")); const AuthCallbackModule = lazy(() => import("app/modules/callback-module")); const OnboardingModule = lazy(() => import("app/modules/onboarding-module")); @@ -268,9 +268,9 @@ export function MainRoutes() { - + - + diff --git a/src/app/components/Dialogs/EmbedChartDialog/chartContainer.tsx b/src/app/components/Dialogs/EmbedChartDialog/chartContainer.tsx index 82ecf61b3..20a23d478 100644 --- a/src/app/components/Dialogs/EmbedChartDialog/chartContainer.tsx +++ b/src/app/components/Dialogs/EmbedChartDialog/chartContainer.tsx @@ -21,7 +21,7 @@ export default function ChartContainer(props: { setChartErrorMessage: React.Dispatch>; renderedChartType?: ChartType; inChartWrapper?: boolean; - chartPreviewInReport?: boolean; + chartPreviewInStory?: boolean; mapping?: any; datasetDetails?: DatasetListItemAPIModel; setNotFound: React.Dispatch>; diff --git a/src/app/components/Dialogs/EmbedChartDialog/index.tsx b/src/app/components/Dialogs/EmbedChartDialog/index.tsx index c81313f66..5c2fa41fe 100644 --- a/src/app/components/Dialogs/EmbedChartDialog/index.tsx +++ b/src/app/components/Dialogs/EmbedChartDialog/index.tsx @@ -2,11 +2,11 @@ import React from "react"; import CloseOutlined from "@material-ui/icons/ClearOutlined"; import Modal from "@material-ui/core/Modal"; import { useStyles } from "app/components/Dialogs/deleteChartDialog"; -import { useRenderChartFromAPI } from "app/modules/report-module/components/chart-wrapper/useRenderChartFromAPI"; +import { useRenderChartFromAPI } from "app/modules/story-module/components/chart-wrapper/useRenderChartFromAPI"; import IconButton from "@material-ui/core/IconButton"; import Snackbar from "@material-ui/core/Snackbar"; import get from "lodash/get"; -import { useLoadDatasetDetails } from "app/modules/report-module/components/chart-wrapper/useLoadDatasetDetailsAPI"; +import { useLoadDatasetDetails } from "app/modules/story-module/components/chart-wrapper/useLoadDatasetDetailsAPI"; import ChartContainer from "./chartContainer"; import { copyToClipboard } from "app/utils/copyToClipboard"; import { useStoreActions, useStoreState } from "app/state/store/hooks"; diff --git a/src/app/components/Dialogs/TourGuide/index.tsx b/src/app/components/Dialogs/TourGuide/index.tsx index 4c3962d1a..d0b7169ba 100644 --- a/src/app/components/Dialogs/TourGuide/index.tsx +++ b/src/app/components/Dialogs/TourGuide/index.tsx @@ -4,25 +4,25 @@ import RowFrameIntro from "app/components/Dialogs/TourGuide/rowFrameIntro"; import SelectStructure from "./selectStructure"; import TourEnd from "./tourEnd"; import { useRecoilState } from "recoil"; -import { reportCreationTourStepAtom } from "app/state/recoil/atoms"; +import { storyCreationTourStepAtom } from "app/state/recoil/atoms"; import useCookie from "@devhammed/use-cookie"; export default function TourGuide(props: { - reportType: "basic" | "advanced" | "ai"; + storyType: "basic" | "advanced" | "ai"; toolBoxOpen: boolean; handleClose: () => void; open: boolean; }) { - const [reportCreationTourStep, setReportCreationTourStep] = useRecoilState( - reportCreationTourStepAtom + const [storyCreationTourStep, setStoryCreationTourStep] = useRecoilState( + storyCreationTourStepAtom ); - const displayBasicReportTourStep = () => { - switch (reportCreationTourStep) { + const displayBasicStoryTourStep = () => { + switch (storyCreationTourStep) { case 0: return ( @@ -30,11 +30,11 @@ export default function TourGuide(props: { case 1: return ( ); case 2: @@ -50,7 +50,7 @@ export default function TourGuide(props: { ); @@ -58,12 +58,12 @@ export default function TourGuide(props: { return; } }; - const displayAdvancedReportTourStep = () => { - switch (reportCreationTourStep) { + const displayAdvancedStoryTourStep = () => { + switch (storyCreationTourStep) { case 0: return ( @@ -71,11 +71,11 @@ export default function TourGuide(props: { case 1: return ( ); case 2: @@ -83,7 +83,7 @@ export default function TourGuide(props: { ); @@ -95,8 +95,8 @@ export default function TourGuide(props: { return ( <> - {props.reportType === "basic" && displayBasicReportTourStep()} - {props.reportType === "advanced" && displayAdvancedReportTourStep()} + {props.storyType === "basic" && displayBasicStoryTourStep()} + {props.storyType === "advanced" && displayAdvancedStoryTourStep()} ); } diff --git a/src/app/components/Dialogs/TourGuide/rowFrameIntro.tsx b/src/app/components/Dialogs/TourGuide/rowFrameIntro.tsx index f9abf7bf4..bd2af4171 100644 --- a/src/app/components/Dialogs/TourGuide/rowFrameIntro.tsx +++ b/src/app/components/Dialogs/TourGuide/rowFrameIntro.tsx @@ -7,16 +7,16 @@ export default function RowFrameIntro(props: { setStep: SetterOrUpdater; handleClose: () => void; open: boolean; - reportType: "basic" | "advanced" | "ai"; + storyType: "basic" | "advanced" | "ai"; toolBoxOpen: boolean; }) { return (

- The reports in Dx are created by rows. Whenever you want to add + The stories in Dx are created by rows. Whenever you want to add chart or text, you need to use the Row frame element and Select a structure for the row. diff --git a/src/app/components/Dialogs/TourGuide/tourEnd.tsx b/src/app/components/Dialogs/TourGuide/tourEnd.tsx index ce20a3787..e7c42cfaa 100644 --- a/src/app/components/Dialogs/TourGuide/tourEnd.tsx +++ b/src/app/components/Dialogs/TourGuide/tourEnd.tsx @@ -5,12 +5,12 @@ import React from "react"; export default function TourEnd({ handleClose, open, - reportType, + storyType, toolBoxOpen, }: { handleClose: () => void; open: boolean; - reportType: "basic" | "advanced" | "ai"; + storyType: "basic" | "advanced" | "ai"; toolBoxOpen: boolean; }) { return ( @@ -18,9 +18,9 @@ export default function TourEnd({ css={` position: absolute; - ${reportType === "basic" && + ${storyType === "basic" && `top: 19.8rem; right: ${toolBoxOpen ? "-25%" : "-10%"};`} - ${reportType === "advanced" && + ${storyType === "advanced" && `top: 2.4rem; right: ${toolBoxOpen ? "-29%" : "-10%"};`} display: ${open ? "block" : "none"}; transition: right 225ms cubic-bezier(0, 0, 0.2, 1) 0ms; @@ -82,13 +82,13 @@ export default function TourEnd({

- {reportType === "basic" && + {storyType === "basic" && " Good job! These grey rectangles are called placeholders. You drag and drop Chart or other Layout elements inside from the right panel."} - {reportType === "advanced" && + {storyType === "advanced" && "These grey rectangles are called placeholders. You drag and drop Chart or other Layout elements inside from the right panel"}

- That’s how you create a report. Easy right! + That’s how you create a story. Easy right!

)} {view === "preview" && ( @@ -622,7 +622,7 @@ export function ChartSubheaderToolbar( )} setShowSnackbar(null)} open={showSnackbar !== null && showSnackbar !== ""} @@ -635,10 +635,10 @@ export function ChartSubheaderToolbar( } diff --git a/src/app/modules/chart-module/components/chartSubheaderToolbar/styles.ts b/src/app/modules/chart-module/components/chartSubheaderToolbar/styles.ts index 8ed9fbdcb..bbf3e1f90 100644 --- a/src/app/modules/chart-module/components/chartSubheaderToolbar/styles.ts +++ b/src/app/modules/chart-module/components/chartSubheaderToolbar/styles.ts @@ -41,7 +41,7 @@ export const styles = { color: white; text-decoration: none; `, - backToReport: css` + backToStory: css` background: #231d2c; border-radius: 8px; display: flex; diff --git a/src/app/modules/chart-module/components/common-chart/index.tsx b/src/app/modules/chart-module/components/common-chart/index.tsx index cf2d93d6c..3bf31b8f5 100644 --- a/src/app/modules/chart-module/components/common-chart/index.tsx +++ b/src/app/modules/chart-module/components/common-chart/index.tsx @@ -43,7 +43,7 @@ interface Props { setChartErrorMessage: React.Dispatch>; renderedChartType?: ChartType; inChartWrapper?: boolean; - chartPreviewInReport?: boolean; + chartPreviewInStory?: boolean; mapping?: any; datasetDetails?: DatasetListItemAPIModel; } @@ -81,7 +81,7 @@ export function CommonChart(props: Readonly) { let content; let contentHeight; - if (!props.chartPreviewInReport && props.renderedChartType !== "bigNumber") { + if (!props.chartPreviewInStory && props.renderedChartType !== "bigNumber") { contentHeight = props.visualOptions?.height - 28 + "px"; } else { contentHeight = "auto"; @@ -163,7 +163,7 @@ export function CommonChart(props: Readonly) { }, props.mapping, `common-chart-render-container-${props.chartId || "1"}-${ - props.chartPreviewInReport + props.chartPreviewInStory }` ); } catch (e: any) { @@ -191,7 +191,7 @@ export function CommonChart(props: Readonly) {
) {
setShowSnackbar(null)} open={showSnackbar !== null && showSnackbar !== ""} @@ -289,10 +289,10 @@ export function ChartModuleToolBox(props: Readonly) {

state.charts.appliedFilters.value ); - const [chartFromReport, setChartFromReport] = - useRecoilState(chartFromReportAtom); + const [chartFromStory, setChartFromStory] = + useRecoilState(chartFromStoryAtom); let appliedFiltersCount = 0; Object.keys(appliedFilters || {}).forEach((key) => { @@ -66,12 +66,12 @@ export function ChartToolBoxSteps(props: ChartToolBoxStepsProps) { }); const handleSave = () => { - const { page: reportPage, view: reportView } = chartFromReport; + const { page: storyPage, view: storyView } = chartFromStory; if (!isEmpty(props.mappedData)) { props.save(); - if (chartFromReport.state) { - setChartFromReport((prev) => ({ ...prev, chartId: page })); - history.push(`/report/${reportPage}/edit`); + if (chartFromStory.state) { + setChartFromStory((prev) => ({ ...prev, chartId: page })); + history.push(`/story/${storyPage}/edit`); } else { props.setShowSnackbar("Your chart has been successfully saved!"); history.push(`/chart/${page}`); diff --git a/src/app/modules/chart-module/components/toolbox/steps/panels-content/SelectDataset.tsx b/src/app/modules/chart-module/components/toolbox/steps/panels-content/SelectDataset.tsx index 619e8c25a..cbfbffd05 100644 --- a/src/app/modules/chart-module/components/toolbox/steps/panels-content/SelectDataset.tsx +++ b/src/app/modules/chart-module/components/toolbox/steps/panels-content/SelectDataset.tsx @@ -7,7 +7,7 @@ import { useHistory, useParams } from "react-router-dom"; import ToolboxSubHeader from "app/modules/chart-module/components/toolbox/steps/sub-header"; import { useRecoilValue, useResetRecoilState } from "recoil"; import { - chartFromReportAtom, + chartFromStoryAtom, isChartAutoMappedAtom, } from "app/state/recoil/atoms"; @@ -174,7 +174,7 @@ function ChartToolBoxSelectDataset(props: { deselectDataset: () => void }) { const ConnectData = () => { const history = useHistory(); - const chartFromReport = useRecoilValue(chartFromReportAtom); + const chartFromStory = useRecoilValue(chartFromStoryAtom); return (

{ onClick={() => history.push( `/dataset/new/upload${ - chartFromReport.state - ? `?fromreport=true&page=${chartFromReport.page}` + chartFromStory.state + ? `?fromstory=true&page=${chartFromStory.page}` : "" }` ) diff --git a/src/app/modules/chart-module/index.tsx b/src/app/modules/chart-module/index.tsx index 8a2d8f15b..145367afb 100644 --- a/src/app/modules/chart-module/index.tsx +++ b/src/app/modules/chart-module/index.tsx @@ -54,7 +54,7 @@ import { useSetRecoilState, } from "recoil"; import { - chartFromReportAtom, + chartFromStoryAtom, isChartAIAgentActive, isChartAutoMappedAtom, planDialogAtom, @@ -154,8 +154,8 @@ export default function ChartModule() { (state) => state.charts.SelectedAIChartState.value ); - const [chartFromReport, setChartFromReport] = - useRecoilState(chartFromReportAtom); + const [chartFromStory, setChartFromStory] = + useRecoilState(chartFromStoryAtom); const appliedFilters = useStoreState( (state) => state.charts.appliedFilters.value ); @@ -329,8 +329,8 @@ export default function ChartModule() { } history.push( `/chart/${data.id}/mapping${ - chartFromReport.state - ? `?fromreport=true&page=${chartFromReport.page}` + chartFromStory.state + ? `?fromstory=true&page=${chartFromStory.page}` : "" }` ); @@ -444,7 +444,7 @@ export default function ChartModule() { setChartError(false); setDataTypes([]); resetIsChartAutoMapped(); - setChartFromReport((prev) => ({ + setChartFromStory((prev) => ({ ...prev, state: false, page: "", diff --git a/src/app/modules/chart-module/routes/chart-type/index.tsx b/src/app/modules/chart-module/routes/chart-type/index.tsx index 7d1b89d59..d6057037e 100644 --- a/src/app/modules/chart-module/routes/chart-type/index.tsx +++ b/src/app/modules/chart-module/routes/chart-type/index.tsx @@ -16,7 +16,7 @@ import { import AISwitch from "app/modules/chart-module/components/switch/AISwitch"; import { useRecoilState, useResetRecoilState } from "recoil"; import { - chartFromReportAtom, + chartFromStoryAtom, isChartAIAgentActive, isChartAutoMappedAtom, } from "app/state/recoil/atoms"; @@ -61,11 +61,11 @@ function ChartBuilderChartType(props: Readonly) { // access query parameters const queryParams = new URLSearchParams(location.search); const loadDatasetParamValue = queryParams.get("loadataset"); - const fromReportParamValue = queryParams.get("fromreport"); - const reportPage = queryParams.get("page") as string; + const fromStoryParamValue = queryParams.get("fromstory"); + const storyPage = queryParams.get("page") as string; - const [chartFromReport, setChartFromReport] = - useRecoilState(chartFromReportAtom); + const [chartFromStory, setChartFromStory] = + useRecoilState(chartFromStoryAtom); React.useEffect(() => { //if dataset is empty and not loading, redirect to data page @@ -99,12 +99,12 @@ function ChartBuilderChartType(props: Readonly) { }, [userPlan]); React.useEffect(() => { - if (fromReportParamValue === "true") { - setChartFromReport((prev) => ({ - ...chartFromReport, + if (fromStoryParamValue === "true") { + setChartFromStory((prev) => ({ + ...chartFromStory, state: true, action: "create", - page: reportPage, + page: storyPage, chartId: "new", })); } diff --git a/src/app/modules/chart-module/routes/mapping/index.tsx b/src/app/modules/chart-module/routes/mapping/index.tsx index e8ed73705..e502feb7f 100644 --- a/src/app/modules/chart-module/routes/mapping/index.tsx +++ b/src/app/modules/chart-module/routes/mapping/index.tsx @@ -14,7 +14,7 @@ import { import ChartPlaceholder from "app/modules/chart-module/components/placeholder"; import { ReactComponent as AIIcon } from "app/modules/chart-module/assets/ai-icon.svg"; import { useRecoilState } from "recoil"; -import { chartFromReportAtom } from "app/state/recoil/atoms"; +import { chartFromStoryAtom } from "app/state/recoil/atoms"; import { useLocation, useParams } from "react-router-dom"; import MappingErrorComponent from "app/modules/chart-module/routes/mapping/error"; @@ -33,12 +33,12 @@ function ChartBuilderMapping(props: Readonly) { { id: string; name: string; minValues: number }[] >([]); - const [chartFromReport, setChartFromReport] = - useRecoilState(chartFromReportAtom); + const [chartFromStory, setChartFromStory] = + useRecoilState(chartFromStoryAtom); // access query parameters const queryParams = new URLSearchParams(location.search); - const paramValue = queryParams.get("fromreport"); - const reportPage = queryParams.get("page") as string; + const paramValue = queryParams.get("fromstory"); + const storyPage = queryParams.get("page") as string; React.useEffect(() => { const { updRequiredFields, updMinValuesFields } = @@ -51,11 +51,11 @@ function ChartBuilderMapping(props: Readonly) { React.useEffect(() => { if (paramValue === "true") { - setChartFromReport((prev) => ({ - ...chartFromReport, + setChartFromStory((prev) => ({ + ...chartFromStory, state: true, action: "create", - page: reportPage, + page: storyPage, chartId: page, })); } diff --git a/src/app/modules/common/RichEditor/index.tsx b/src/app/modules/common/RichEditor/index.tsx index 4a00378a4..eb0dc1f94 100644 --- a/src/app/modules/common/RichEditor/index.tsx +++ b/src/app/modules/common/RichEditor/index.tsx @@ -1,7 +1,7 @@ import React, { ReactElement, useMemo, useRef } from "react"; import picker from "app/modules/common/RichEditor/ColorModal/Picker"; import bgPicker from "app/modules/common/RichEditor/BGColorModal/Picker"; -import { ToolbarPluginsType } from "app/modules/report-module/components/reportSubHeaderToolbar/staticToolbar"; +import { ToolbarPluginsType } from "app/modules/story-module/components/storySubHeaderToolbar/staticToolbar"; /*plugins */ import { EditorState, SelectionState } from "draft-js"; @@ -25,7 +25,7 @@ import "@draft-js-plugins/inline-toolbar/lib/plugin.css"; import "@draft-js-plugins/static-toolbar/lib/plugin.css"; import "@draft-js-plugins/emoji/lib/plugin.css"; import fontSizeStyleMap from "app/modules/common/RichEditor/FontSizeController/styleMap"; -import { styles } from "app/modules/report-module/components/reportSubHeaderToolbar/styles"; +import { styles } from "app/modules/story-module/components/storySubHeaderToolbar/styles"; export const RichEditor = (props: { editMode: boolean; diff --git a/src/app/modules/common/mobile-duplicate-message/index.tsx b/src/app/modules/common/mobile-duplicate-message/index.tsx index 6728a523c..e245e9fbc 100644 --- a/src/app/modules/common/mobile-duplicate-message/index.tsx +++ b/src/app/modules/common/mobile-duplicate-message/index.tsx @@ -1,4 +1,4 @@ -import { InfoSnackbarDuplicateContentcss } from "app/modules/report-module/components/reportSubHeaderToolbar/infosnackbar"; +import { InfoSnackbarDuplicateContentcss } from "app/modules/story-module/components/storySubHeaderToolbar/infosnackbar"; import React from "react"; import { CloseOutlined } from "@material-ui/icons"; @@ -6,7 +6,7 @@ export default function DuplicateMessage(props: { name: string; closeSnackbar: () => void; action: () => void; - type: "data" | "chart" | "report"; + type: "data" | "chart" | "story"; }) { return (
diff --git a/src/app/modules/common/not-authorized-message/index.tsx b/src/app/modules/common/not-authorized-message/index.tsx index 62e0cba65..048470a07 100644 --- a/src/app/modules/common/not-authorized-message/index.tsx +++ b/src/app/modules/common/not-authorized-message/index.tsx @@ -10,7 +10,7 @@ import { socialAuth } from "app/utils/socialAuth"; import { useHistory, useLocation } from "react-router-dom"; export function NotAuthorizedMessageModule(props: { - asset: "chart" | "report" | "dataset"; + asset: "chart" | "story" | "dataset"; action: "view" | "edit" | "delete"; name?: string; }) { diff --git a/src/app/modules/dataset-module/component/datasetSubHeaderToolbar.tsx b/src/app/modules/dataset-module/component/datasetSubHeaderToolbar.tsx index 9d406388c..081b1c14a 100644 --- a/src/app/modules/dataset-module/component/datasetSubHeaderToolbar.tsx +++ b/src/app/modules/dataset-module/component/datasetSubHeaderToolbar.tsx @@ -23,7 +23,7 @@ import { useStoreActions, useStoreState } from "app/state/store/hooks"; import { styles } from "app/modules/dataset-module/component/styles"; import DeleteDatasetDialog from "app/components/Dialogs/deleteDatasetDialog"; import { ISnackbarState } from "app/modules/dataset-module/routes/upload-module/upload-steps/previewFragment"; -import { InfoSnackbar } from "app/modules/report-module/components/reportSubHeaderToolbar/infosnackbar"; +import { InfoSnackbar } from "app/modules/story-module/components/storySubHeaderToolbar/infosnackbar"; import { DatasetListItemAPIModel } from "app/modules/dataset-module/data"; import { useSetRecoilState } from "recoil"; import { planDialogAtom } from "app/state/recoil/atoms"; diff --git a/src/app/modules/dataset-module/component/shareModal.tsx b/src/app/modules/dataset-module/component/shareModal.tsx index 24470306c..0f00644b7 100644 --- a/src/app/modules/dataset-module/component/shareModal.tsx +++ b/src/app/modules/dataset-module/component/shareModal.tsx @@ -10,7 +10,7 @@ import { ReactComponent as LinkedinIcon } from "app/components/Dialogs/EmbedChar import { ReactComponent as PNGIcon } from "app/components/Dialogs/EmbedChartDialog/assets/png-icon.svg"; import { ReactComponent as SVGIcon } from "app/components/Dialogs/EmbedChartDialog/assets/svg-icon.svg"; import { ReactComponent as PDFIcon } from "app/components/Dialogs/EmbedChartDialog/assets/pdf-icon.svg"; -import { shareModalcss } from "app/modules/report-module/components/reportSubHeaderToolbar/infosnackbar"; +import { shareModalcss } from "app/modules/story-module/components/storySubHeaderToolbar/infosnackbar"; import SaveAlt from "@material-ui/icons/SaveAlt"; import { makeStyles, createStyles } from "@material-ui/core"; import CopyToClipboard from "react-copy-to-clipboard"; diff --git a/src/app/modules/dataset-module/routes/upload-module/component/tabs.tsx b/src/app/modules/dataset-module/routes/upload-module/component/tabs.tsx index d394e8732..e286b0811 100644 --- a/src/app/modules/dataset-module/routes/upload-module/component/tabs.tsx +++ b/src/app/modules/dataset-module/routes/upload-module/component/tabs.tsx @@ -47,7 +47,7 @@ function UploadTabs({ activeTab, setActiveTab }: Props) { onClick={() => setActiveTab("search")} data-cy="federated-search-tab" > - Federated search + External search
); diff --git a/src/app/modules/dataset-module/routes/upload-module/upload-steps/addDatasetFragment.tsx b/src/app/modules/dataset-module/routes/upload-module/upload-steps/addDatasetFragment.tsx index 2638eee4d..8e5e43060 100644 --- a/src/app/modules/dataset-module/routes/upload-module/upload-steps/addDatasetFragment.tsx +++ b/src/app/modules/dataset-module/routes/upload-module/upload-steps/addDatasetFragment.tsx @@ -181,13 +181,10 @@ export default function AddDatasetFragment(props: Props) { } `} > -

File Upload

+

Connect Your Data

- Upload your favourite data effortlessly in Dataxplorer, and with just - a few clicks, import datasets without the hassle of downloading,{" "} -
- enabling you to visualize and analyse diverse data like never before. + Connect your data by uploading a file or connect to your cloud storage

diff --git a/src/app/modules/dataset-module/routes/upload-module/upload-steps/externalSearch.tsx b/src/app/modules/dataset-module/routes/upload-module/upload-steps/externalSearch.tsx index 035a8380c..a5d4d7d85 100644 --- a/src/app/modules/dataset-module/routes/upload-module/upload-steps/externalSearch.tsx +++ b/src/app/modules/dataset-module/routes/upload-module/upload-steps/externalSearch.tsx @@ -150,9 +150,9 @@ export default function ExternalSearch(props: { } }, [token]); const t = - "http://localhost:4200/reports?filter={%22order%22:%22updatedDate%20desc%22,%22limit%22:15,%22offset%22:0}"; + "http://localhost:4200/stories?filter={%22order%22:%22updatedDate%20desc%22,%22limit%22:15,%22offset%22:0}"; const v = - "http://localhost:4200/reports?filter={%22order%22:%22updatedDate%20desc%22,%22limit%22:15,%22offset%22:0}"; + "http://localhost:4200/stories?filter={%22order%22:%22updatedDate%20desc%22,%22limit%22:15,%22offset%22:0}"; const [,] = useDebounce( () => { @@ -192,14 +192,11 @@ export default function ExternalSearch(props: { } `} > -

Federated Search

+

Search External Data Sources

- Connect to your favourite data sources effortlessly in Dataxplorer, - and with just a few clicks, import datasets without the hassle of - downloading, -
enabling you to visualize and analyse diverse data like never - before. + External search allows you to search and import data rom WHO, World + Bank, The Global Fund, Kaggle and the Humanitarian Data Exchange

diff --git a/src/app/modules/dataset-module/routes/upload-module/upload-steps/index.tsx b/src/app/modules/dataset-module/routes/upload-module/upload-steps/index.tsx index cea1858e0..32bb82ec0 100644 --- a/src/app/modules/dataset-module/routes/upload-module/upload-steps/index.tsx +++ b/src/app/modules/dataset-module/routes/upload-module/upload-steps/index.tsx @@ -374,7 +374,7 @@ function DatasetUploadSteps(props: Props) { icon: , }, { - label: "File upload", + label: "Connect Data", value: "file", testId: "file-upload-tab", icon: , diff --git a/src/app/modules/home-module/components/AssetCollection/All/assetsGrid.tsx b/src/app/modules/home-module/components/AssetCollection/All/assetsGrid.tsx index 973e599c4..139aa59c4 100644 --- a/src/app/modules/home-module/components/AssetCollection/All/assetsGrid.tsx +++ b/src/app/modules/home-module/components/AssetCollection/All/assetsGrid.tsx @@ -21,7 +21,7 @@ import DatasetGridItem from "app/modules/home-module/components/AssetCollection/ import ReportGridItem from "app/modules/home-module/components/AssetCollection/Reports/gridItem"; import ColoredReportIcon from "app/assets/icons/ColoredReportIcon"; import DeleteDatasetDialog from "app/components/Dialogs/deleteDatasetDialog"; -import DeleteReportDialog from "app/components/Dialogs/deleteReportDialog"; +import DeleteReportDialog from "app/components/Dialogs/deleteStoryDialog"; import { EditorState, convertFromRaw } from "draft-js"; import { getLimit } from "app/modules/home-module/components/AssetCollection/Datasets/datasetsGrid"; import { HomepageTable } from "app/modules/home-module/components/Table/"; diff --git a/src/app/modules/home-module/components/AssetCollection/Reports/reportsGrid.tsx b/src/app/modules/home-module/components/AssetCollection/Reports/reportsGrid.tsx index 4aef70263..3f4a5ad0e 100644 --- a/src/app/modules/home-module/components/AssetCollection/Reports/reportsGrid.tsx +++ b/src/app/modules/home-module/components/AssetCollection/Reports/reportsGrid.tsx @@ -8,7 +8,7 @@ import { ReportModel } from "app/modules/report-module/data"; import ColoredReportIcon from "app/assets/icons/ColoredReportIcon"; import { useStoreActions, useStoreState } from "app/state/store/hooks"; import { HomepageTable } from "app/modules/home-module/components/Table"; -import DeleteReportDialog from "app/components/Dialogs/deleteReportDialog"; +import DeleteReportDialog from "app/components/Dialogs/deleteStoryDialog"; import ReformedGridItem from "app/modules/home-module/components/AssetCollection/Reports/gridItem"; import ReportAddnewCard from "./reportAddNewCard"; import { useInfinityScroll } from "app/hooks/useInfinityScroll"; diff --git a/src/app/modules/home-module/components/AssetCollection/index.tsx b/src/app/modules/home-module/components/AssetCollection/index.tsx index 26b011829..233b4a965 100644 --- a/src/app/modules/home-module/components/AssetCollection/index.tsx +++ b/src/app/modules/home-module/components/AssetCollection/index.tsx @@ -96,10 +96,10 @@ function AssetsCollection() { }, [display]); const descriptions = { - all: "Explore the collection of Assets", - data: "Explore the collection of Datasets used to create Charts", - charts: "Explore the collection of Charts used in Reports", - reports: "Explore the collection of Reports", + all: "Explore stories collection of Assets", + data: "Explore stories collection of Datasets ", + charts: "Explore stories collection of Charts ", + reports: "Explore stories collection of Stories", }; return ( diff --git a/src/app/modules/home-module/components/Footer/DesktopFooter.tsx b/src/app/modules/home-module/components/Footer/DesktopFooter.tsx index 6eae38f50..042c0a353 100644 --- a/src/app/modules/home-module/components/Footer/DesktopFooter.tsx +++ b/src/app/modules/home-module/components/Footer/DesktopFooter.tsx @@ -139,7 +139,7 @@ export default function DesktopFooter() { font-family: "GothamNarrow-Medium", sans-serif; `} > - Subscribe to our newsletter + Stay Up To Date

{formError.email && (