diff --git a/src/app/modules/dataset-module/routes/upload-module/component/stepper.tsx b/src/app/modules/dataset-module/routes/upload-module/component/stepper.tsx index 8a23db1bd..f18acc118 100644 --- a/src/app/modules/dataset-module/routes/upload-module/component/stepper.tsx +++ b/src/app/modules/dataset-module/routes/upload-module/component/stepper.tsx @@ -81,14 +81,15 @@ export default function Stepper( css={` position: absolute; margin: 0; - left: 0; + left: -48px; + width: 128px; + text-align: center; font-size: 14px; font-family: ${props.index <= props.activeStep ? "GothamNarrow-Bold" : "GothamNarrow-Book"}, "Helvetica Neue", sans-serif; color: ${props.index <= props.activeStep ? "#6061E5" : "#868E96"}; - width: max-content; `} > {props.tab} diff --git a/src/app/modules/dataset-module/routes/upload-module/component/table/externalSearchTable/index.tsx b/src/app/modules/dataset-module/routes/upload-module/component/table/externalSearchTable/index.tsx index e24e0bae3..5bc1a2c19 100644 --- a/src/app/modules/dataset-module/routes/upload-module/component/table/externalSearchTable/index.tsx +++ b/src/app/modules/dataset-module/routes/upload-module/component/table/externalSearchTable/index.tsx @@ -97,31 +97,46 @@ export default function ExternalSearchTable(props: { data-cy={`table-row-${data.type}`} > {props.tableData.columns.map((val) => ( - +
-

- {isValidDate(data[val.key]) - ? moment(data[val.key]).format("MMMM YYYY") - : data[val.key] ?? ""} -

+ {data[val.key] ? ( +

+ {isValidDate(data[val.key]) + ? moment(data[val.key]).format("MMMM YYYY") + : data[val.key] ?? ""} +

+ ) : ( + "" + )} + {val.icon}
diff --git a/src/app/modules/dataset-module/routes/upload-module/style.ts b/src/app/modules/dataset-module/routes/upload-module/style.ts index ae02e1be7..483037101 100644 --- a/src/app/modules/dataset-module/routes/upload-module/style.ts +++ b/src/app/modules/dataset-module/routes/upload-module/style.ts @@ -1,4 +1,5 @@ -import { Select, TextField, withStyles } from "@material-ui/core"; +import { Select, TextField, withStyles, InputLabel } from "@material-ui/core"; +import { pad } from "lodash"; import { css } from "styled-components/macro"; export const stepcss = css` @@ -14,12 +15,11 @@ export const stepcss = css` justify-content: center; gap: 8px; padding: 16px 0; - @media (min-width: 768px) { - @media (max-width: 881px) { - top: 66px; - } + @media (max-width: 881px) { + top: 66px; } `; +const gothamNarrowBold = "'GothamNarrow-Book', 'Helvetica Neue', sans-serif"; export const uploadAreacss = (isDragActive: boolean, disabled?: boolean) => css` height: 131px; @@ -74,8 +74,10 @@ export const metaDatacss = css` font-weight: 400; font-size: 48px; font-family: "GothamNarrow-Bold", "Helvetica Neue", sans-serif; + margin: 0; + margin-bottom: 36px; + line-height: normal; - margin-bottom: 4.5rem; @media (min-width: 768px) { @media (max-width: 1024px) { margin-top: 10px; @@ -124,18 +126,27 @@ export const mobileDescriptioncss = css` export const CssTextField = withStyles({ root: { - "& label.Mui-focused": { + "& .MuiInputLabel-outlined": { + fontSize: "18px", + lineHeight: "24px", + fontFamily: gothamNarrowBold, color: "#231D2C", + padding: "0px", + marginLeft: "9px", }, - "&.MuiInputLabel-outlined": { - fontSize: "16px", - fontFamily: "'GothamNarrow-Book', 'Helvetica Neue', sans-serif", + "& label.Mui-focused": { color: "#231D2C", + lineHeight: "normal", + marginLeft: "0px", + }, + "& .MuiFormLabel-filled": { + lineHeight: "normal", + marginLeft: "0px", }, "& .MuiOutlinedInput-input": { - padding: "2px 14px", - height: "48px", + padding: "14.5px 24px", backgroundColor: "#Fff", + height: "24px", }, "& .MuiFormHelperText-root": { color: "#231D2C", @@ -148,8 +159,10 @@ export const CssTextField = withStyles({ }, "& .MuiOutlinedInput-multiline ": { backgroundColor: "#Fff", + padding: "0px", }, "& .MuiOutlinedInput-root": { + fontSize: "18px", "& fieldset": { borderColor: "#231D2C", borderRadius: "10px", @@ -170,17 +183,18 @@ export const CssSelectField = withStyles({ "& label.Mui-focused": { color: "#231D2C", }, - "&.MuiInputLabel-outlined": { - fontSize: "16px", - fontFamily: "'GothamNarrow-Book', 'Helvetica Neue', sans-serif", + "& .MuiInputLabel-outlined": { + fontSize: "18px", + fontFamily: gothamNarrowBold, color: "#231D2C", + lineHeight: "24px", }, "&.MuiSelect-outlined": { - padding: "2px 14px", - height: "48px", + padding: "14.5px 24px", background: "#fff", display: "flex", alignItems: "center", + lineHeight: "24px", }, "&.MuiFormHelperText-root": { color: "#231D2C", @@ -206,3 +220,25 @@ export const CssSelectField = withStyles({ }, }, })(Select); + +export const CssInputLabel = withStyles({ + root: { + "&.MuiInputLabel-outlined": { + fontSize: "18px", + lineHeight: "24px", + fontFamily: gothamNarrowBold, + color: "#231D2C", + padding: "0px", + marginLeft: "9px", + }, + "&.Mui-focused": { + color: "#231D2C", + lineHeight: "normal", + marginLeft: "0px", + }, + "&.MuiFormLabel-filled": { + lineHeight: "normal", + marginLeft: "-2px", + }, + }, +})(InputLabel); 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 6c059c43b..28a821bba 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 @@ -15,6 +15,7 @@ import ExternalSearchTable from "app/modules/dataset-module/routes/upload-module import { useCheckUserPlan } from "app/hooks/useCheckUserPlan"; import { PrimaryButton } from "app/components/Styled/button"; import { SearchIcon } from "app/assets/icons/Search"; +import { ChevronRight } from "@material-ui/icons"; export interface IExternalDataset { name: string; @@ -190,6 +191,9 @@ export default function ExternalSearch(props: { css={` display: flex; gap: 24px; + @media (max-width: 881px) { + margin-top: 40px; + } `} >
props.handleDownload(dataset)} dataset={dataset} + searchValue={props.searchValue} /> @@ -313,7 +318,8 @@ export default function ExternalSearch(props: { { key: "name", label: "Title" }, { key: "description", label: "Description" }, { key: "datePublished", label: "Date" }, - { key: "source", label: "Source", icon: }, + { key: "source", label: "Source" }, + { key: "download", label: "", icon: }, ], data: datasets, }} 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 c46b93d81..9f0231e9a 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 @@ -489,6 +489,10 @@ function DatasetUploadSteps(props: Props) { display: flex; flex-direction: column; justify-content: space-between; + @media (max-width: 881px) { + min-height: calc(100vh - 66px); + margin-top: 66px; + } `} > diff --git a/src/app/modules/dataset-module/routes/upload-module/upload-steps/metaData.tsx b/src/app/modules/dataset-module/routes/upload-module/upload-steps/metaData.tsx index afd939d04..81586b17b 100644 --- a/src/app/modules/dataset-module/routes/upload-module/upload-steps/metaData.tsx +++ b/src/app/modules/dataset-module/routes/upload-module/upload-steps/metaData.tsx @@ -6,6 +6,7 @@ import MenuItem from "@material-ui/core/MenuItem"; import InputLabel from "@material-ui/core/InputLabel"; import FormControl from "@material-ui/core/FormControl"; import { + CssInputLabel, CssSelectField, CssTextField, metaDatacss, @@ -63,7 +64,7 @@ const SelectCategoryField = (props: { onChange: any; }) => ( - Data category* + Data category*

@@ -140,7 +146,7 @@ export default function Processing(props: ProcessingMetaDataProps) { css={` width: 100%; height: 6.42px; - border-radius: 3px; + background-color: #dfe3e5; border-radius: 3.211px; @@ -151,6 +157,7 @@ export default function Processing(props: ProcessingMetaDataProps) { css={` width: ${props.percentageLoaded}%; height: 100%; + border-radius: 3px; background: linear-gradient( 90deg, #6466f1 7.48%, diff --git a/src/app/modules/home-module/components/AssetCollection/Datasets/externalDatasetCard.tsx b/src/app/modules/home-module/components/AssetCollection/Datasets/externalDatasetCard.tsx index b89b82be8..55dc23562 100644 --- a/src/app/modules/home-module/components/AssetCollection/Datasets/externalDatasetCard.tsx +++ b/src/app/modules/home-module/components/AssetCollection/Datasets/externalDatasetCard.tsx @@ -20,6 +20,7 @@ export default function ExternalDatasetCard( publishedDate: string; handleDownload: (dataset: IExternalDataset) => void; dataset: IExternalDataset; + searchValue?: string; }> ) { const sourceLogo = (source: string) => { @@ -40,6 +41,17 @@ export default function ExternalDatasetCard( }; const [showButton, setShowButton] = React.useState(false); + const highlightMatch = (text: string, searchValue?: string) => { + if (!searchValue) { + return text; + } + const regex = new RegExp(`(${searchValue})`, "i"); + const parts = text.split(regex); + return parts.map((part, index) => + regex.test(part) ? {part} : part + ); + }; + return (

setShowButton(true)} @@ -49,9 +61,7 @@ export default function ExternalDatasetCard( width: 296px; height: 162px; box-shadow: 0px 7px 16px 0px rgba(0, 0, 0, 0.05); - padding-left: 11.7px; - padding-right: 12px; - padding-top: 16.2px; + padding: 12px; background: #fff; position: relative; p:nth-of-type(1) { @@ -64,39 +74,48 @@ export default function ExternalDatasetCard( overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + span { + color: #6061e5; + text-decoration: underline; + font-family: "GothamNarrow-Bold", "Helvetica Neue", sans-serif; + font-size: 14px; + } } p:nth-of-type(2) { color: #495057; font-family: "GothamNarrow-Book", "Helvetica Neue", sans-serif; - font-size: 10px; + font-size: 12px; margin: 0; - height: 24px; - //multi-line ellipses - -webkit-box-orient: vertical; display: -webkit-box; -webkit-line-clamp: 2; + -webkit-box-orient: vertical; overflow: hidden; - text-overflow: ellipsis; - white-space: normal; line-height: normal; + span { + color: #6061e5; + text-decoration: underline; + font-family: "GothamNarrow-Book", "Helvetica Neue", sans-serif; + font-size: 12px; + } } p:nth-of-type(3) { color: #495057; font-family: "GothamNarrow-Book", "Helvetica Neue", sans-serif; - font-size: 10px; + font-size: 12px; text-decoration-line: underline; margin: 0; - margin-top: 10px; - margin-bottom: 10px; + margin-top: 4px; + margin-bottom: 9px; height: 12px; line-height: normal; a { text-decoration: none; color: inherit; + font-size: 12px; } } div { - height: 62px; + /* height: 62px; */ margin: 0; display: flex; align-items: center; @@ -111,32 +130,28 @@ export default function ExternalDatasetCard( display: flex; justify-content: center; align-items: center; - gap: 5.959px; - padding: 7.15px 10px; - border-radius: 17.876px; + padding: 8px 16px; + border-radius: 8px; background: #231d2c; - text-transform: uppercase; color: #fff; - font-family: "GothamNarrow-Bold"; + font-family: "GothamNarrow-Bold", "Helvetica Neue", sans-serif; font-size: 12px; - svg { - width: 9px; - height: 9px; - } + line-height: 8px; } } p:nth-of-type(4) { color: #231d2c; font-family: "GothamNarrow-Book"; - font-size: 8.814px; + font-size: 10px; display: flex; justify-content: flex-end; align-items: center; - gap: 5px; + gap: 4px; position: absolute; - right: 11.7px; - bottom: 0px; + right: 16px; + bottom: 12px; margin: 0; + line-height: normal; svg { width: 12px; height: 12px; @@ -144,8 +159,10 @@ export default function ExternalDatasetCard( } `} > -

{props.name}

-

{props.description}

+

{highlightMatch(props.name, props.searchValue)}

+

+ {highlightMatch(props.description, props.searchValue)} +

Link to data source. @@ -153,7 +170,7 @@ export default function ExternalDatasetCard(

props.handleDownload(props.dataset)} data-cy="import-to-dx-button" > - import to dx + Connect to Dataxplorer )}