From d9c57aaccb42070392dae76fa0c110b344fe22e0 Mon Sep 17 00:00:00 2001
From: Daniel Gading
Date: Mon, 18 Nov 2024 12:57:02 -0500
Subject: [PATCH 1/9] Move to context based pattern
---
src/components/FeaturedDatasets/index.jsx | 6 +-
src/components/Layout/index.jsx | 10 +-
src/components/Resource/index.jsx | 22 +-
src/templates/about/index.jsx | 6 +-
src/templates/api/index.jsx | 6 +-
src/templates/dataset/api.jsx | 32 +-
src/templates/dataset/index.jsx | 354 +++++++++++++++-------
src/templates/home/index.jsx | 90 ++----
src/templates/publishers/index.jsx | 4 +-
src/templates/search/index.jsx | 51 +++-
10 files changed, 358 insertions(+), 223 deletions(-)
diff --git a/src/components/FeaturedDatasets/index.jsx b/src/components/FeaturedDatasets/index.jsx
index 845d4c8..927083d 100644
--- a/src/components/FeaturedDatasets/index.jsx
+++ b/src/components/FeaturedDatasets/index.jsx
@@ -2,7 +2,7 @@ import React from "react";
import PropTypes from "prop-types";
import excerpts from 'excerpts';
import { Link } from 'react-router-dom';
-import { Text } from "@civicactions/data-catalog-components";
+// import { Text } from "@civicactions/data-catalog-components";
import config from "../../assets/config";
import './featureddatasets.scss';
@@ -10,7 +10,7 @@ const FeaturedDatasets = ({ datasets }) => {
return (
Featured Datasets
-
+ {/*
{datasets.map((item) => (
-
@@ -21,7 +21,7 @@ const FeaturedDatasets = ({ datasets }) => {
))}
-
+
*/}
);
};
diff --git a/src/components/Layout/index.jsx b/src/components/Layout/index.jsx
index 68778f5..81a8cd5 100644
--- a/src/components/Layout/index.jsx
+++ b/src/components/Layout/index.jsx
@@ -1,7 +1,7 @@
import React from "react";
import Helmet from "react-helmet";
-import { Link, NavLink } from 'react-router-dom';
-import { Header, NavBar, Footer } from "@civicactions/data-catalog-components";
+import { Link } from 'react-router-dom';
+// import { Header, NavBar, Footer } from "@civicactions/data-catalog-components";
import config from "../../assets/config.json";
import links from "../../assets/menu.json";
@@ -21,7 +21,7 @@ const Layout = ({
"lang": "en"
}}
/>
-
+ {/*
(
@@ -29,11 +29,11 @@ const Layout = ({
))}
customClasses={config.container}
- />
+ /> */}
{children}
-
+ {/* */}
);
};
diff --git a/src/components/Resource/index.jsx b/src/components/Resource/index.jsx
index cc85c01..8fe6ac9 100644
--- a/src/components/Resource/index.jsx
+++ b/src/components/Resource/index.jsx
@@ -1,21 +1,21 @@
import React from "react";
-import {
- Resource,
- FileDownload,
-} from "@civicactions/data-catalog-components";
+// import {
+// Resource,
+// FileDownload,
+// } from "@civicactions/data-catalog-components";
const ResourceTemplate = ({ resource }) => {
- const type = resource.hasOwnProperty('data') && resource.data.hasOwnProperty('mediaType') ? resource.data.mediaType.split("/") : '';
- const backup = type ? type[1] : 'data';
- const format = resource.hasOwnProperty('data') && resource.data.hasOwnProperty('format') ? resource.data.format : backup;
+ // const type = resource.hasOwnProperty('data') && resource.data.hasOwnProperty('mediaType') ? resource.data.mediaType.split("/") : '';
+ // const backup = type ? type[1] : 'data';
+ // const format = resource.hasOwnProperty('data') && resource.data.hasOwnProperty('format') ? resource.data.format : backup;
- const downloadURL = resource.hasOwnProperty('data') && resource.data.hasOwnProperty('downloadURL') ? resource.data.downloadURL : '';
- const accessURL = resource.hasOwnProperty('data') && resource.data.hasOwnProperty('accessURL') ? resource.data.accessURL : downloadURL;
+ // const downloadURL = resource.hasOwnProperty('data') && resource.data.hasOwnProperty('downloadURL') ? resource.data.downloadURL : '';
+ // const accessURL = resource.hasOwnProperty('data') && resource.data.hasOwnProperty('accessURL') ? resource.data.accessURL : downloadURL;
const rootURL = `${import.meta.env.VITE_REACT_APP_ROOT_URL}`;
return (
- {format.toLowerCase() === 'csv'
+ {/* {format.toLowerCase() === 'csv'
? (
{
downloadURL={resource.data.downloadURL}
/>
)
- }
+ } */}
);
};
diff --git a/src/templates/about/index.jsx b/src/templates/about/index.jsx
index 9a73483..7ea3811 100644
--- a/src/templates/about/index.jsx
+++ b/src/templates/about/index.jsx
@@ -1,5 +1,5 @@
import React from "react";
-import { Announcement } from "@civicactions/data-catalog-components";
+// import { Announcement } from "@civicactions/data-catalog-components";
import Layout from '../../components/Layout';
import config from "../../assets/config";
import { version, dependencies } from '../../../package.json';
@@ -17,9 +17,9 @@ const About = () => (
-
+ {/*
Update this about page before publishing.
-
+ */}
App version:
diff --git a/src/templates/api/index.jsx b/src/templates/api/index.jsx
index 317fd55..feda33d 100644
--- a/src/templates/api/index.jsx
+++ b/src/templates/api/index.jsx
@@ -1,15 +1,15 @@
import React from 'react';
import config from "../../assets/config";
import Layout from "../../components/Layout";
-import { ApiDocs } from "@civicactions/data-catalog-components";
+// import { ApiDocs } from "@civicactions/data-catalog-components";
const ApiDocsFull = ({ path }) => (
- {typeof window !== `undefined` && (
+ {/* {typeof window !== `undefined` && (
- )}
+ )} */}
diff --git a/src/templates/dataset/api.jsx b/src/templates/dataset/api.jsx
index 7bb2d6d..e1da951 100644
--- a/src/templates/dataset/api.jsx
+++ b/src/templates/dataset/api.jsx
@@ -1,10 +1,10 @@
import React from "react";
import { Link, useParams } from "react-router-dom";
import { Spinner } from "reactstrap";
-import {
- ApiDocs,
- Organization
-} from "@civicactions/data-catalog-components";
+// import {
+// ApiDocs,
+// Organization
+// } from "@civicactions/data-catalog-components";
import config from "../../assets/config";
import orgs from "../../assets/publishers";
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
@@ -23,20 +23,20 @@ const ApiDocsSpecific = () => {
});
const item = data ? data : {};
- const orgName = "publisher" in item && item.publisher.data ? item.publisher.data.name : "";
- const orgDetails = orgs.filter(org => orgName === org.name);
- const orgImage = orgDetails.length && orgDetails[0].imageUrl ? orgDetails[0].imageUrl : "";
- const orgDesc = orgDetails.length && orgDetails[0].description ? orgDetails[0].description : "";
- let renderOrg;
- if(orgDetails.length > 0 && orgDetails[0].imageUrl) {
- renderOrg = ;
- } else {
- renderOrg = ;
- }
+ // const orgName = "publisher" in item && item.publisher.data ? item.publisher.data.name : "";
+ // const orgDetails = orgs.filter(org => orgName === org.name);
+ // const orgImage = orgDetails.length && orgDetails[0].imageUrl ? orgDetails[0].imageUrl : "";
+ // const orgDesc = orgDetails.length && orgDetails[0].description ? orgDetails[0].description : "";
+ // let renderOrg;
+ // if(orgDetails.length > 0 && orgDetails[0].imageUrl) {
+ // renderOrg = ;
+ // } else {
+ // renderOrg = ;
+ // }
return (
-
+ {/*
{loading ? (
) : (
@@ -74,7 +74,7 @@ const ApiDocsSpecific = () => {
)}
-
+ */}
);
}
diff --git a/src/templates/dataset/index.jsx b/src/templates/dataset/index.jsx
index 9e2a24f..885616a 100644
--- a/src/templates/dataset/index.jsx
+++ b/src/templates/dataset/index.jsx
@@ -1,124 +1,139 @@
-import React, { useEffect, useState } from "react";
+import React, { useContext, useEffect, useState } from "react";
import { useQuery } from '@tanstack/react-query';
import { Link, useParams } from 'react-router-dom';
import Layout from '../../components/Layout';
import config from "../../assets/config";
-import ResourceTemplate from "../../components/Resource";
+import { MetadataContext, DatastoreWrapper, MetadataWrapper } from "@civicactions/data-catalog-components";
+
+
+// import ResourceTemplate from "../../components/Resource";
import { Spinner } from 'reactstrap';
-import {
- Text,
- Organization,
- Table,
- Tags,
- TopicIcon,
- TopicWrapper
-} from "@civicactions/data-catalog-components";
+// import {
+// Text,
+// Organization,
+// Table,
+// Tags,
+// TopicIcon,
+// TopicWrapper
+// } from "@civicactions/data-catalog-components";
import orgs from "../../assets/publishers";
const Dataset = () => {
const { id } = useParams();
- const [hasWindow, checkForWindow] = useState(false);
+ // const [hasWindow, checkForWindow] = useState(false);
- useEffect(() => {
- if (window !== undefined) {
- checkForWindow(true);
- }
- }, [id]);
-
- const {data} = useQuery({
- queryKey: ['metastoreDataset', id],
- queryFn: () => {
- return fetch(`${import.meta.env.VITE_REACT_APP_ROOT_URL}/metastore/schemas/dataset/items/${id}?show-reference-ids`).then(
- (res) => res.json(),
- )
- }
- });
- const item = data ? data : {};
-
- const orgName =
- "publisher" in item && item.publisher ? item.publisher.data.name : "";
- const orgDetails = orgs.filter(org => orgName === org.name);
- const orgImage = orgDetails.length > 0 && orgDetails[0].imageUrl ? orgDetails[0].imageUrl : null;
- const orgDesc = orgDetails.length > 0 && orgDetails[0].description ? orgDetails[0].description : "";
- let renderOrg;
- if(orgDetails.length > 0 && orgDetails[0].imageUrl) {
- renderOrg = ;
- } else {
- renderOrg = ;
- }
+ // useEffect(() => {
+ // if (window !== undefined) {
+ // checkForWindow(true);
+ // }
+ // }, [id]);
+ // const {data} = useQuery({
+ // queryKey: ['metastoreDataset', id],
+ // queryFn: () => {
+ // return fetch(`${import.meta.env.VITE_REACT_APP_ROOT_URL}/metastore/schemas/dataset/items/${id}?show-reference-ids`).then(
+ // (res) => res.json(),
+ // )
+ // }
+ // });
+ // const item = data ? data : {};
- const tag = "keyword" in item ? item.keyword : [];
- const theme = "theme" in item ? item.theme : [];
+ // const orgName =
+ // "publisher" in item && item.publisher ? item.publisher.data.name : "";
+ // const orgDetails = orgs.filter(org => orgName === org.name);
+ // const orgImage = orgDetails.length > 0 && orgDetails[0].imageUrl ? orgDetails[0].imageUrl : null;
+ // const orgDesc = orgDetails.length > 0 && orgDetails[0].description ? orgDetails[0].description : "";
+ // let renderOrg;
+ // if(orgDetails.length > 0 && orgDetails[0].imageUrl) {
+ // renderOrg = ;
+ // } else {
+ // renderOrg = ;
+ // }
- function themes(theme) {
- if (!theme) {
- return null;
- } else {
- return theme.map(topic => {
- return (
-
- );
- });
- }
- }
- // // Process content for 'Columns in this Dataset' table.
- // // const labelsT2 = {};
- // // const valuesT2 = {};
+ // const tag = "keyword" in item ? item.keyword : [];
+ // const theme = "theme" in item ? item.theme : [];
- // // columns.forEach((value, index) => {
- // // labelsT2[index] = { label: value };
- // // valuesT2[index] = "String";
- // // });
+ // function themes(theme) {
+ // if (!theme) {
+ // return null;
+ // } else {
+ // return theme.map(topic => {
+ // return (
+ //
+ // );
+ // });
+ // }
+ // }
- // // Process content for 'Additional Information' table.
- const labelsT3 = {};
- const valuesT3 = {};
+ // // // Process content for 'Columns in this Dataset' table.
+ // // // const labelsT2 = {};
+ // // // const valuesT2 = {};
- if (orgName && orgName.length > 0) {
- labelsT3.publisher = { label: "Publisher" };
- valuesT3.publisher = orgName;
- }
- if ("identifier" in item && item.identifier) {
- labelsT3.identifier = { label: "Identifier" };
- valuesT3.identifier = item.identifier;
- }
- if ("issued" in item && item.issued) {
- labelsT3.issued = { label: "Issued" };
- valuesT3.issued = item.issued;
- }
- if ("modified" in item && item.modified) {
- labelsT3.modified = { label: "Last Update" };
- valuesT3.modified = item.modified;
- }
- if ("license" in item && item.license) {
- labelsT3.license = { label: "License" };
- valuesT3.license = `${item.license}`;
- }
- if ("contactPoint" in item && item.contactPoint && item.contactPoint.fn) {
- labelsT3.contact = { label: "Contact" };
- valuesT3.contact = item.contactPoint.fn;
- }
- if (
- "contactPoint" in item &&
- item.contactPoint &&
- item.contactPoint.hasEmail
- ) {
- labelsT3.email = { label: "Contact E-mail" };
- valuesT3.email = `${item.contactPoint.hasEmail}`;
- }
- if ("accessLevel" in item && item.accessLevel) {
- labelsT3.access = { label: "Public Access Level" };
- valuesT3.access = item.accessLevel;
- }
- if ("landingPage" in item && item.landingPage) {
- labelsT3.homepage = { label: "Homepage URL" };
- valuesT3.homepage = `${item.landingPage}`;
- }
+ // // // columns.forEach((value, index) => {
+ // // // labelsT2[index] = { label: value };
+ // // // valuesT2[index] = "String";
+ // // // });
+
+ // // // Process content for 'Additional Information' table.
+ // const labelsT3 = {};
+ // const valuesT3 = {};
+
+ // if (orgName && orgName.length > 0) {
+ // labelsT3.publisher = { label: "Publisher" };
+ // valuesT3.publisher = orgName;
+ // }
+ // if ("identifier" in item && item.identifier) {
+ // labelsT3.identifier = { label: "Identifier" };
+ // valuesT3.identifier = item.identifier;
+ // }
+ // if ("issued" in item && item.issued) {
+ // labelsT3.issued = { label: "Issued" };
+ // valuesT3.issued = item.issued;
+ // }
+ // if ("modified" in item && item.modified) {
+ // labelsT3.modified = { label: "Last Update" };
+ // valuesT3.modified = item.modified;
+ // }
+ // if ("license" in item && item.license) {
+ // labelsT3.license = { label: "License" };
+ // valuesT3.license = `${item.license}`;
+ // }
+ // if ("contactPoint" in item && item.contactPoint && item.contactPoint.fn) {
+ // labelsT3.contact = { label: "Contact" };
+ // valuesT3.contact = item.contactPoint.fn;
+ // }
+ // if (
+ // "contactPoint" in item &&
+ // item.contactPoint &&
+ // item.contactPoint.hasEmail
+ // ) {
+ // labelsT3.email = { label: "Contact E-mail" };
+ // valuesT3.email = `${item.contactPoint.hasEmail}`;
+ // }
+ // if ("accessLevel" in item && item.accessLevel) {
+ // labelsT3.access = { label: "Public Access Level" };
+ // valuesT3.access = item.accessLevel;
+ // }
+ // if ("landingPage" in item && item.landingPage) {
+ // labelsT3.homepage = { label: "Homepage URL" };
+ // valuesT3.homepage = `${item.landingPage}`;
+ // }
return (
-
-
+
+
+
+
+ {/*
{renderOrg}
@@ -155,9 +170,140 @@ const Dataset = () => {
)}
-
+ */}
);
};
export default Dataset;
+
+const DatasetHeader = () => {
+ const metadataContext = useContext(MetadataContext);
+ const metadata = metadataContext.metadata;
+ return (
+
+
{metadata?.title}
+
+
{metadata?.description}
+
+ )
+}
+
+const Themes = () => {
+ const metadataContext = useContext(MetadataContext);
+ const metadata = metadataContext.metadata;
+ const themes = metadata?.theme;
+ if (!themes || themes.length === 0) {
+ return null;
+ }
+ return (
+
+ {themes.map((theme) => - {theme.data}
)}
+
+ )
+}
+
+const DownloadLinks = () => {
+ const metadataContext = useContext(MetadataContext);
+ const metadata = metadataContext.metadata;
+ const distributions = metadata?.distribution;
+ if (!distributions || distributions.length === 0) {
+ return null;
+ }
+ return (
+
+ );
+}
+
+const Tags = () => {
+ const metadataContext = useContext(MetadataContext);
+ const metadata = metadataContext.metadata;
+ const keywords = metadata?.keyword;
+ if (!keywords || keywords.length === 0) {
+ return null;
+ }
+ return (
+
+
Tags
+
+ {keywords.map((keyword) => - {keyword.data}
)}
+
+
+ )
+}
+
+const AdditionalInfoTable = () => {
+ const metadataContext = useContext(MetadataContext);
+ const metadata = metadataContext.metadata;
+ if (!metadata) {
+ return null;
+ }
+ return (
+
+
Additional Information
+
+
+
+ | Field |
+ Value |
+
+
+
+
+ | Publisher |
+ {metadata.publisher?.data.name} |
+
+
+ | Identifier |
+ {metadata.identifier} |
+
+
+ | Issued |
+ {metadata.issued} |
+
+
+ | Last Update |
+ {metadata.modified} |
+
+
+ | License |
+ {metadata.license} |
+
+
+ | Contact |
+ {metadata.contactPoint?.fn} |
+
+
+ | Contact Email |
+ {metadata.contactPoint?.hasEmail} |
+
+
+ | Public Access Level |
+ {metadata.accessLevel} |
+
+
+
+
+ )
+}
+
+const DataTables = () => {
+ const metadataContext = useContext(MetadataContext);
+ const metadata = metadataContext.metadata;
+ const distributions = metadata?.distribution;
+ if (!distributions || distributions.length === 0) {
+ return null;
+ }
+ return (
+
+ {distributions.map((dist, index) => (
+
+ {index}
+
+ ))}
+
+ );
+
+}
diff --git a/src/templates/home/index.jsx b/src/templates/home/index.jsx
index 55044cb..766b796 100644
--- a/src/templates/home/index.jsx
+++ b/src/templates/home/index.jsx
@@ -1,74 +1,36 @@
-import React, {useEffect} from "react";
-import { useQuery } from '@tanstack/react-query';
-import {
- Blocks,
- Hero,
- IconList,
- IconListItem,
- StatBlock
-} from "@civicactions/data-catalog-components";
+import React, {useContext, useState} from "react";
+import { useNavigate } from "react-router-dom";
+import { SearchAPIWrapper, SearchAPIContext } from "@civicactions/data-catalog-components";
import Layout from '../../components/Layout';
-import FeaturedDatasets from '../../components/FeaturedDatasets';
-import copy from "../../assets/copy.json";
const Home = () => {
- const datasets = useQuery({
- queryKey: ['datasets'],
- queryFn: () => {
- return fetch(`${import.meta.env.VITE_REACT_APP_ROOT_URL}/metastore/schemas/dataset/items?show-reference-ids`).then(
- (res) => res.json(),
- )
- }
- }).data;
-
- const themes = useQuery({
- queryKey: ['themes'],
- queryFn: () => {
- return fetch(`${import.meta.env.VITE_REACT_APP_ROOT_URL}/metastore/schemas/theme/items`).then(
- (res) => res.json(),
- )
- }
- }).data;
-
- const orderedDatasets = (datasets && datasets.length) ? datasets.sort(function(a,b) {
- return a.title - b.title;
- }): [];
-
- const fDatasets = orderedDatasets.length > 3 ? orderedDatasets.slice(orderedDatasets.length -3, orderedDatasets.length) : orderedDatasets;
-
- const items = (themes && themes.length) ?
- themes.map(x => {
- let item = {
- identifier: x.identifier,
- ref: `search?theme=${x.data}`,
- title: x.data,
- size: "100"
- };
- return item;
- }) : [];
-
return (
-
+
+
+
);
}
export default Home;
+
+const Hero = () => {
+ const navigate = useNavigate();
+ const searchData = useContext(SearchAPIContext);
+ const [fulltext, setFulltext] = useState('');
+ function heroSubmit(event) {
+ event.preventDefault();
+ navigate(`/search?fulltext=${fulltext}`);
+ }
+
+ return(
+
+
Welcome to DKAN
+
+
+ );
+}
diff --git a/src/templates/publishers/index.jsx b/src/templates/publishers/index.jsx
index a109038..01fc748 100644
--- a/src/templates/publishers/index.jsx
+++ b/src/templates/publishers/index.jsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { PublisherList } from "@civicactions/data-catalog-components";
+// import { PublisherList } from "@civicactions/data-catalog-components";
import config from "../../assets/config";
import Layout from '../../components/Layout';
import orgs from "../../assets/publishers";
@@ -22,7 +22,7 @@ const Publishers = () => {
publishing data to the same site.
-
+ {/* */}
diff --git a/src/templates/search/index.jsx b/src/templates/search/index.jsx
index f92d870..d663357 100644
--- a/src/templates/search/index.jsx
+++ b/src/templates/search/index.jsx
@@ -1,7 +1,7 @@
-import React from 'react';
+import React, { useContext } from 'react';
import { useLocation } from "react-router-dom"
import { defaultFacets, sortOptions } from '../../config/search';
-import { Search } from "@civicactions/data-catalog-components";
+import { SearchAPIWrapper, SearchAPIContext } from "@civicactions/data-catalog-components";
import Layout from "../../components/Layout";
import config from "../../assets/config";
@@ -10,19 +10,46 @@ const SearchTemplate = () => {
return (
-
)
}
export default SearchTemplate;
+
+const SearchInput = () => {
+ const searchData = useContext(SearchAPIContext);
+ return(
+
+ searchData.setFulltextFn(e.target.value)} value={searchData.fulltext} />
+
+
+ );
+}
+
+const DatasetList = () => {
+ const searchData = useContext(SearchAPIContext);
+ if (searchData.status === 'pending' || searchData.data.length > 0) {
+ return (loading
)
+ }
+ return (
+
+ {Object.keys(searchData.data.results).map((key) => (
+
+ ))}
+
+ );
+}
+
+
+const DatasetListItem = ({item}) => {
+ return(
+ {item.title}
+ );
+}
From 031623efaa3bd5df5ea8c16c3db97a59c59fc0a1 Mon Sep 17 00:00:00 2001
From: Daniel Gading
Date: Tue, 25 Feb 2025 11:37:58 -0500
Subject: [PATCH 2/9] Initial context based build
---
.env.development | 2 +-
index.html | 19 +-
package-lock.json | 4850 ++++++++++++-----
package.json | 34 +-
src/assets/config.json | 6 -
.../images/dkan-avatar-blue.png | Bin
src/{theme => assets}/images/logo.svg | 0
src/components/DataTable.tsx | 69 +
src/components/DatasetHeader.tsx | 17 +
src/components/Distributions.tsx | 27 +
src/components/FeaturedDatasets.tsx | 14 +
.../FeaturedDatasets/featureddatasets.scss | 37 -
src/components/FeaturedDatasets/index.jsx | 33 -
src/components/Footer.tsx | 15 +
src/components/Header.tsx | 20 +
src/components/Hero.tsx | 24 +
src/components/IndividualDistribution.tsx | 28 +
src/components/KeywordTags.tsx | 21 +
src/components/Layout.tsx | 29 +
src/components/MetadataTable.tsx | 61 +
src/components/Resource/index.jsx | 43 -
src/components/SearchFacetList.tsx | 31 +
src/components/SearchFacets.tsx | 30 +
src/components/SearchListItem.tsx | 28 +
src/components/ThemeTags.tsx | 18 +
src/{index.jsx => index.tsx} | 38 +-
src/styles.css | 1 +
src/templates/{about/index.jsx => About.tsx} | 11 +-
src/templates/Dataset.tsx | 43 +
.../FeaturedDatasets/featureddatasets.scss | 37 -
src/templates/Home.tsx | 26 +
.../{not_found/index.jsx => NotFound.tsx} | 7 +-
src/templates/Publishers.tsx | 28 +
.../{search/index.jsx => Search.tsx} | 27 +-
src/templates/dataset/api.jsx | 82 -
src/templates/dataset/index.jsx | 309 --
src/templates/home/index.jsx | 36 -
src/templates/publishers/index.jsx | 33 -
src/theme/index.css | 1262 -----
src/theme/index.module.css | 1 +
src/theme/index.scss | 56 +-
src/types/searchApiResult.types.ts | 16 +
src/typings.d.ts | 1 +
tsconfig.app.json | 26 +
tsconfig.json | 7 +
tsconfig.node.json | 24 +
vite-env.d.ts | 1 +
vite.config.mts | 19 +
vite.config.ts | 34 -
49 files changed, 4221 insertions(+), 3360 deletions(-)
delete mode 100644 src/assets/config.json
rename src/{theme => assets}/images/dkan-avatar-blue.png (100%)
rename src/{theme => assets}/images/logo.svg (100%)
create mode 100644 src/components/DataTable.tsx
create mode 100644 src/components/DatasetHeader.tsx
create mode 100644 src/components/Distributions.tsx
create mode 100644 src/components/FeaturedDatasets.tsx
delete mode 100644 src/components/FeaturedDatasets/featureddatasets.scss
delete mode 100644 src/components/FeaturedDatasets/index.jsx
create mode 100644 src/components/Footer.tsx
create mode 100644 src/components/Header.tsx
create mode 100644 src/components/Hero.tsx
create mode 100644 src/components/IndividualDistribution.tsx
create mode 100644 src/components/KeywordTags.tsx
create mode 100644 src/components/Layout.tsx
create mode 100644 src/components/MetadataTable.tsx
delete mode 100644 src/components/Resource/index.jsx
create mode 100644 src/components/SearchFacetList.tsx
create mode 100644 src/components/SearchFacets.tsx
create mode 100644 src/components/SearchListItem.tsx
create mode 100644 src/components/ThemeTags.tsx
rename src/{index.jsx => index.tsx} (54%)
create mode 100644 src/styles.css
rename src/templates/{about/index.jsx => About.tsx} (80%)
create mode 100644 src/templates/Dataset.tsx
delete mode 100644 src/templates/FeaturedDatasets/featureddatasets.scss
create mode 100644 src/templates/Home.tsx
rename src/templates/{not_found/index.jsx => NotFound.tsx} (58%)
create mode 100644 src/templates/Publishers.tsx
rename src/templates/{search/index.jsx => Search.tsx} (62%)
delete mode 100644 src/templates/dataset/api.jsx
delete mode 100644 src/templates/dataset/index.jsx
delete mode 100644 src/templates/home/index.jsx
delete mode 100644 src/templates/publishers/index.jsx
delete mode 100644 src/theme/index.css
create mode 100644 src/theme/index.module.css
create mode 100644 src/types/searchApiResult.types.ts
create mode 100644 src/typings.d.ts
create mode 100644 tsconfig.app.json
create mode 100644 tsconfig.json
create mode 100644 tsconfig.node.json
create mode 100644 vite-env.d.ts
create mode 100644 vite.config.mts
delete mode 100644 vite.config.ts
diff --git a/.env.development b/.env.development
index 9c17318..a020234 100644
--- a/.env.development
+++ b/.env.development
@@ -1 +1 @@
-VITE_REACT_APP_ROOT_URL = "/api/1"
\ No newline at end of file
+VITE_REACT_APP_ROOT_URL = "https://demo.getdkan.org/api/1"
\ No newline at end of file
diff --git a/index.html b/index.html
index b5cd6e5..1d80ca5 100644
--- a/index.html
+++ b/index.html
@@ -3,10 +3,6 @@
-
+
DKAN data catalog
-
-
-
+
+