@civicactions/cmsds-open-data-components 3.0.0-alpha.3 → 3.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.css +33 -10
- package/dist/main.css.map +1 -1
- package/dist/main.js +122 -173
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +0 -14
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/assets/frequencyMap.js +0 -22
- package/lib/assets/icons/close.js +0 -33
- package/lib/assets/icons/close.jsx +0 -24
- package/lib/assets/icons/copy.js +0 -33
- package/lib/assets/icons/copy.jsx +0 -23
- package/lib/assets/icons/download.js +0 -33
- package/lib/assets/icons/download.jsx +0 -23
- package/lib/assets/icons/settings.js +0 -34
- package/lib/assets/icons/settings.jsx +0 -24
- package/lib/assets/images/CMSGovLogo-O.png +0 -0
- package/lib/assets/images/CMSgov@2x-white-O.png +0 -0
- package/lib/assets/metadataMapping.js +0 -161
- package/lib/assets/metadataMapping.jsx +0 -110
- package/lib/commands/index.js +0 -7
- package/lib/commands/templates/footer.js +0 -61
- package/lib/commands/templates/header.js +0 -84
- package/lib/commands/templates/page_not_found.js +0 -14
- package/lib/components/ApiDocumentation/index.js +0 -24
- package/lib/components/Breadcrumb/index.js +0 -47
- package/lib/components/DataTableDensity/datatabledensity.test.js +0 -30
- package/lib/components/DataTableDensity/index.js +0 -47
- package/lib/components/DataTableRowChanger/datatablerowchanger.test.js +0 -49
- package/lib/components/DataTableRowChanger/index.js +0 -46
- package/lib/components/DatasetAdditionalInformation/index.js +0 -59
- package/lib/components/DatasetDownloads/datasetdownloads.test.js +0 -30
- package/lib/components/DatasetDownloads/index.js +0 -34
- package/lib/components/DatasetSearchFacets/dataset_search_facets.test.js +0 -103
- package/lib/components/DatasetSearchFacets/index.js +0 -104
- package/lib/components/DatasetSearchListItem/datasetsearchlistitem.test.js +0 -44
- package/lib/components/DatasetSearchListItem/index.js +0 -86
- package/lib/components/DatasetTags/datasettags.test.js +0 -40
- package/lib/components/DatasetTags/index.js +0 -38
- package/lib/components/Hero/index.js +0 -92
- package/lib/components/ManageColumns/index.js +0 -36
- package/lib/components/NavBar/index.js +0 -55
- package/lib/components/NavLink/index.js +0 -60
- package/lib/components/NavLink/navlink.test.js +0 -35
- package/lib/components/Pagination/index.js +0 -263
- package/lib/components/Pagination/pagination.test.js +0 -541
- package/lib/components/ResourceConditionField/ResourceConditionalField.test.js +0 -20
- package/lib/components/ResourceConditionField/index.js +0 -246
- package/lib/components/ResourceFilter/index.js +0 -174
- package/lib/components/ResourceFilter/resourcefilter.test.js +0 -440
- package/lib/components/ResourceFooter/index.js +0 -34
- package/lib/components/ResourceHeader/index.js +0 -149
- package/lib/components/ResourceInformation/index.js +0 -37
- package/lib/components/ResourcePreview/index.js +0 -139
- package/lib/components/SearchModal/index.js +0 -116
- package/lib/components/SubMenu/index.js +0 -86
- package/lib/components/TransformedDate/index.js +0 -34
- package/lib/components/useAddLoginLink/index.js +0 -44
- package/lib/components/useScrollToTop/index.js +0 -22
- package/lib/index.js +0 -247
- package/lib/templates/APIPage/index.js +0 -30
- package/lib/templates/Dataset/DatasetBody.js +0 -189
- package/lib/templates/Dataset/index.js +0 -83
- package/lib/templates/DatasetSearch/datasetsearch.test.js +0 -122
- package/lib/templates/DatasetSearch/index.js +0 -356
- package/lib/templates/DrupalPage/index.js +0 -37
- package/lib/templates/FilteredResource/FilteredResourceBody.js +0 -160
- package/lib/templates/FilteredResource/QueryBuilder.js +0 -235
- package/lib/templates/FilteredResource/QueryRow.js +0 -175
- package/lib/templates/FilteredResource/QueryTitle.js +0 -89
- package/lib/templates/FilteredResource/functions.js +0 -142
- package/lib/templates/FilteredResource/index.js +0 -95
- package/lib/templates/Footer/footer.test.js +0 -48
- package/lib/templates/Footer/index.js +0 -366
- package/lib/templates/PageNotFound/index.js +0 -25
- package/lib/templates/header/index.js +0 -112
- package/lib/templates/mobile_header/index.js +0 -199
package/dist/types.d.ts
CHANGED
|
@@ -54,20 +54,6 @@ export function DatasetSearchListItem({ item, updateFacets }: {
|
|
|
54
54
|
item: any;
|
|
55
55
|
updateFacets: any;
|
|
56
56
|
}): JSX.Element;
|
|
57
|
-
declare namespace DatasetSearchFacets {
|
|
58
|
-
namespace defaultProps {
|
|
59
|
-
const selectedFacets: never[];
|
|
60
|
-
}
|
|
61
|
-
namespace propTypes {
|
|
62
|
-
const title: PropTypes.Validator<string>;
|
|
63
|
-
const facets: PropTypes.Validator<(PropTypes.InferProps<{
|
|
64
|
-
type: PropTypes.Validator<string>;
|
|
65
|
-
name: PropTypes.Validator<string>;
|
|
66
|
-
total: PropTypes.Validator<NonNullable<NonNullable<string | number | null | undefined>>>;
|
|
67
|
-
}> | null | undefined)[]>;
|
|
68
|
-
const onclickFunction: PropTypes.Validator<(...args: any[]) => any>;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
57
|
export { default } from "./DatasetSearch";
|
|
72
58
|
export { default } from "./useMetastoreDataset";
|
|
73
59
|
export { default } from "./useDatastore";
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAAA;IACE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB;;;;;;;;;;;;;;;;;;AGFD,OAAA,MAAM;uEAA4E,WAAW;;;;CAuB5F,CAAC;;;;;;;;AO1BF;;;gBAOC;;;;;;;;;;;ACID;;;gBAwDC
|
|
1
|
+
{"mappings":"AAAA;IACE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB;;;;;;;;;;;;;;;;;;AGFD,OAAA,MAAM;uEAA4E,WAAW;;;;CAuB5F,CAAC;;;;;;;;AO1BF;;;gBAOC;;;;;;;;;;;ACID;;;gBAwDC;;;;AerED,qEAMC;;AK4BD;;;;;;;;;;;;gBAyDC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ASvED;;;;;;;;;;gBA0GC;;;;;;;;;AG1HD,yEAUC;ACXD;;gBAqBC;AElBD,0FAuBC;AAED,sDAOC;AAED,0DAOC;AAcD;;;IAyBC;;;;;;;;IGhFW;;;QAET;IACO;;;QAEP;IACmB;;;QAOnB;IACU;;;QAMV;IACW;;;QAEX;IACa;;;QASb;IACW;;;oBAIX;IACY;;;oBAIZ;IACM;;;QAaN;IACQ;;;QAaR;IACQ;;;QAER;IACY;;;QAEZ;IAES;;;QAIT;IACQ;;;QAER;IACW;;;QAeX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AUrGH;;;;;;;;;;;gBAkVC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGrVD;;;;;;;gBA4CC;;;;;;;;;AC5CD;;gBAMC;AGLD;;;;;;;gBAwIC;;;;;;;;;;;;;;;;;;;;;AIzID;;;;iCAuDC;;;;;;;;;;;AGrDD;;;;;;;;;;;;gBA0EC;AC9ED,oGAYC;ACXD,uCAKC","sources":["src/src/components/NavBar/Navbar.types.ts","src/src/components/NavLink/index.jsx","src/src/components/SubMenu/index.jsx","src/src/components/NavBar/Navbar.tsx","src/src/components/NavBar/index.ts","src/src/templates/APIPage/APIPage.jsx","src/src/templates/APIPage/index.jsx","src/src/templates/PageNotFound/PageNotFound.jsx","src/src/templates/PageNotFound/index.jsx","src/src/utilities/QueryProvider/QueryProvider.jsx","src/src/components/TransformedDate/index.jsx","src/src/components/DatasetSearchListItem/index.jsx","src/src/types/search.ts","src/src/components/DatasetSearchFacets/index.tsx","src/src/components/LargeFileInfo/index.tsx","src/src/components/SearchButton/index.tsx","src/src/components/PageHeader/index.tsx","src/src/services/useSearchAPI/helpers.ts","src/src/templates/DatasetSearch/DatasetSearch.tsx","src/src/templates/DatasetSearch/index.jsx","src/src/services/useMetastoreDataset/useMetastoreDataset.jsx","src/src/services/useMetastoreDataset/index.jsx","src/src/services/useDatastore/fetch.js","src/src/services/useDatastore/useDatastore.jsx","src/src/services/useDatastore/index.js","src/src/services/useDatastore/transformConditions.js","src/src/services/useDatastore/transformSorts.js","src/src/components/Datatable/TruncatedResizeableTHead.jsx","src/src/components/Datatable/FixedSizeTHead.jsx","src/src/components/Datatable/Datatable.jsx","src/src/components/Datatable/index.js","src/src/components/ResourcePreview/index.jsx","src/src/components/DataTablePageResults/DataTablePageResults.tsx","src/src/components/DataTablePageResults/index.js","src/src/components/DataTableDensity/index.jsx","src/src/components/ManageColumns/index.jsx","src/src/components/DataTableRowChanger/index.jsx","src/src/assets/icons/download.jsx","src/src/assets/icons/copy.jsx","src/src/assets/icons/settings.jsx","src/src/components/ResourceHeader/index.jsx","src/src/components/DatasetTags/index.jsx","src/src/components/DatasetDownloads/index.jsx","src/src/components/DatasetAdditionalInformation/index.jsx","src/src/components/ResourceFooter/index.jsx","src/src/components/ResourceInformation/index.jsx","src/src/templates/FilteredResource/functions.js","src/src/templates/Dataset/DatasetBody.jsx","src/src/assets/frequencyMap.js","src/src/assets/metadataMapping.jsx","src/src/templates/Dataset/Dataset.jsx","src/src/templates/Dataset/index.jsx","src/src/components/SearchModal/index.jsx","src/src/components/DesktopHeader/DesktopHeader.jsx","src/src/components/DesktopHeader/index.jsx","src/src/components/MobileHeader/MobileHeader.jsx","src/src/components/MobileHeader/index.jsx","src/src/templates/Header/Header.jsx","src/src/templates/Header/index.js","src/src/templates/Footer/index.jsx","src/src/services/useSearchAPI/useSearchAPI.jsx","src/src/services/useSearchAPI/index.jsx","src/src/components/Hero/index.jsx","src/src/components/ApiDocumentation/index.jsx","src/src/assets/icons/close.jsx","src/src/components/ResourceConditionField/index.jsx","src/src/components/ResourceFilter/index.jsx","src/src/components/Breadcrumb/Breadcrumb.jsx","src/src/components/Breadcrumb/index.jsx","src/src/templates/FilteredResource/QueryRow.jsx","src/src/templates/FilteredResource/QueryTitle.jsx","src/src/templates/FilteredResource/QueryBuilder.jsx","src/src/templates/FilteredResource/FilteredResourceBody.jsx","src/src/templates/FilteredResource/index.jsx","src/src/components/useAddLoginLink/index.jsx","src/src/components/useScrollToTop/index.jsx","src/src/index.ts","src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"// Components\nexport { default as NavBar } from './components/NavBar';\n\n\n// Templates\nexport { default as APIPage } from './templates/APIPage';\nexport { default as PageNotFound } from './templates/PageNotFound';\nexport { default as DatasetSearch } from './templates/DatasetSearch';\nexport { default as Dataset } from './templates/Dataset';\nexport { default as Header } from './templates/Header';\nexport { default as Footer } from './templates/Footer';\n\n// Services\nexport { default as useSearchAPI } from './services/useSearchAPI';\nexport { default as useDatastore } from './services/useDatastore';\nexport { transformTableSortToQuerySort } from './services/useDatastore/transformSorts';\n\n// export { default as NavLink } from './components/NavLink';\n// export { default as DatasetTags } from './components/DatasetTags';\n// export { default as DatasetDownloads } from './components/DatasetDownloads';\nexport { default as Hero } from './components/Hero';\n// export { default as SearchModal } from './components/SearchModal';\nexport { default as DatasetSearchListItem } from './components/DatasetSearchListItem';\n// export { default as SubMenu } from './components/SubMenu';\nexport { default as ApiDocumentation } from './components/ApiDocumentation';\n// export { default as ResourceConditionField } from './components/ResourceConditionField';\nexport { default as ResourceFilter } from './components/ResourceFilter';\nexport { default as ResourceHeader } from './components/ResourceHeader';\nexport { default as ResourcePreview } from './components/ResourcePreview';\nexport { default as ResourceFooter } from './components/ResourceFooter';\nexport { default as Breadcrumb } from './components/Breadcrumb';\nexport { default as TransformedDate } from './components/TransformedDate';\nexport { default as DataTable } from './components/Datatable';\nexport { buildRows } from './components/DatasetAdditionalInformation';\n\n// Templates\n// export { default as Dataset } from './templates/Dataset';\n// export { default as DatasetSearch } from './templates/DatasetSearch';\n// export { default as DrupalPage } from './templates/DrupalPage';\n// export { default as Header } from './templates/header';\n// export { default as MobileHeader } from './templates/mobile_header';\n\nexport { default as FilteredResource } from './templates/FilteredResource';\n// export { default as QueryBuilder } from './templates/FilteredResource/QueryBuilder';\nexport { default as QueryTitle } from './templates/FilteredResource/QueryTitle';\nexport { buildOperatorOptions, convertUTCToLocalDate, cleanText, buildCustomColHeaders } from './templates/FilteredResource/functions';\n// export { default as APIPage } from './templates/APIPage';\n\n// Hooks\nexport { default as useAddLoginLink } from './components/useAddLoginLink';\nexport { default as useScrollToTop } from './components/useScrollToTop';\nexport { default as useMetastoreDataset } from './services/useMetastoreDataset';\n\n// Assets\n// export { default as frequencyMap } from './assets/frequencyMap';\nexport { defaultMetadataMapping } from './assets/metadataMapping';\n\nexport { default as DataTablePageResults } from './components/DataTablePageResults';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export const frequencyMap = {
|
|
2
|
-
'R/P10Y': { name: 'Decennial' },
|
|
3
|
-
'R/P4Y': { name: 'Quadrennial' },
|
|
4
|
-
'R/P1Y': { name: 'Annual' },
|
|
5
|
-
'R/P2M': { name: 'Bimonthly' },
|
|
6
|
-
'R/P3.5D': { name: 'Semiweekly' },
|
|
7
|
-
'R/P1D': { name: 'Daily' },
|
|
8
|
-
'R/P2W': { name: 'Biweekly' },
|
|
9
|
-
'R/P6M': { name: 'Semiannual' },
|
|
10
|
-
'R/P2Y': { name: 'Biennial' },
|
|
11
|
-
'R/P3Y': { name: 'Triennial' },
|
|
12
|
-
'R/P0.33W': { name: 'Three times a week' },
|
|
13
|
-
'R/P0.33M': { name: 'Three times a month' },
|
|
14
|
-
'R/PT1S': { name: 'Continuously updated' },
|
|
15
|
-
'R/P1M': { name: 'Monthly' },
|
|
16
|
-
'R/P3M': { name: 'Quarterly' },
|
|
17
|
-
'R/P0.5M': { name: 'Semimonthly' },
|
|
18
|
-
'R/P4M': { name: 'Three times a year' },
|
|
19
|
-
'R/P1W': { name: 'Weekly' },
|
|
20
|
-
'R/PT1H': { name: 'Hourly' },
|
|
21
|
-
irregular: { name: 'Irregular' },
|
|
22
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var CloseIcon = function CloseIcon() {
|
|
13
|
-
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
14
|
-
width: "15px",
|
|
15
|
-
height: "15px",
|
|
16
|
-
viewBox: "0 0 15 15",
|
|
17
|
-
version: "1.1",
|
|
18
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
20
|
-
}, /*#__PURE__*/_react["default"].createElement("title", null, "Close Icon"), /*#__PURE__*/_react["default"].createElement("desc", null, "Created with Sketch."), /*#__PURE__*/_react["default"].createElement("g", {
|
|
21
|
-
stroke: "none",
|
|
22
|
-
strokeWidth: "1",
|
|
23
|
-
fill: "none",
|
|
24
|
-
fillRule: "evenodd"
|
|
25
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
26
|
-
d: "M14.6467778,11.2126037 C14.8818403,11.4476661 15,11.7342663 15,12.0711472 C15,12.4080282 14.8818403,12.6946283 14.6467778,12.9296908 L12.9296908,14.6467778 C12.6933713,14.8830973 12.4067711,15.001257 12.0698902,15.001257 C11.7342663,15.001257 11.4476661,14.8830973 11.2126037,14.6467778 L7.49937149,10.9348026 L3.7873963,14.6467778 C3.55233386,14.8830973 3.26573368,15.001257 2.92885276,15.001257 C2.59197184,15.001257 2.30662868,14.8830973 2.07030923,14.6467778 L0.353222157,12.9296908 C0.116902707,12.6946283 0,12.4080282 0,12.0711472 C0,11.7342663 0.116902707,11.4476661 0.353222157,11.2126037 L4.06519735,7.50062851 L0.353222157,3.78865331 C0.116902707,3.55233386 0,3.2669907 0,2.92885276 C0,2.59322886 0.116902707,2.30662868 0.353222157,2.07156624 L2.07030923,0.353222157 C2.30662868,0.118159725 2.59197184,0 2.92885276,0 C3.26573368,0 3.55233386,0.118159725 3.7873963,0.353222157 L7.49937149,4.06519735 L11.2126037,0.353222157 C11.4476661,0.118159725 11.7342663,0 12.0698902,0 C12.4067711,0 12.6933713,0.118159725 12.9296908,0.353222157 L14.6467778,2.07156624 C14.8818403,2.30662868 15,2.59322886 15,2.92885276 C15,3.2669907 14.8818403,3.55233386 14.6467778,3.78865331 L10.9348026,7.50062851 L14.6467778,11.2126037 Z",
|
|
27
|
-
fill: "#000000",
|
|
28
|
-
fillRule: "nonzero"
|
|
29
|
-
})));
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
var _default = CloseIcon;
|
|
33
|
-
exports["default"] = _default;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const CloseIcon = () => (
|
|
4
|
-
<svg
|
|
5
|
-
width="15px"
|
|
6
|
-
height="15px"
|
|
7
|
-
viewBox="0 0 15 15"
|
|
8
|
-
version="1.1"
|
|
9
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
-
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
11
|
-
>
|
|
12
|
-
<title>Close Icon</title>
|
|
13
|
-
<desc>Created with Sketch.</desc>
|
|
14
|
-
<g stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
|
|
15
|
-
<path
|
|
16
|
-
d="M14.6467778,11.2126037 C14.8818403,11.4476661 15,11.7342663 15,12.0711472 C15,12.4080282 14.8818403,12.6946283 14.6467778,12.9296908 L12.9296908,14.6467778 C12.6933713,14.8830973 12.4067711,15.001257 12.0698902,15.001257 C11.7342663,15.001257 11.4476661,14.8830973 11.2126037,14.6467778 L7.49937149,10.9348026 L3.7873963,14.6467778 C3.55233386,14.8830973 3.26573368,15.001257 2.92885276,15.001257 C2.59197184,15.001257 2.30662868,14.8830973 2.07030923,14.6467778 L0.353222157,12.9296908 C0.116902707,12.6946283 0,12.4080282 0,12.0711472 C0,11.7342663 0.116902707,11.4476661 0.353222157,11.2126037 L4.06519735,7.50062851 L0.353222157,3.78865331 C0.116902707,3.55233386 0,3.2669907 0,2.92885276 C0,2.59322886 0.116902707,2.30662868 0.353222157,2.07156624 L2.07030923,0.353222157 C2.30662868,0.118159725 2.59197184,0 2.92885276,0 C3.26573368,0 3.55233386,0.118159725 3.7873963,0.353222157 L7.49937149,4.06519735 L11.2126037,0.353222157 C11.4476661,0.118159725 11.7342663,0 12.0698902,0 C12.4067711,0 12.6933713,0.118159725 12.9296908,0.353222157 L14.6467778,2.07156624 C14.8818403,2.30662868 15,2.59322886 15,2.92885276 C15,3.2669907 14.8818403,3.55233386 14.6467778,3.78865331 L10.9348026,7.50062851 L14.6467778,11.2126037 Z"
|
|
17
|
-
fill="#000000"
|
|
18
|
-
fillRule="nonzero"
|
|
19
|
-
></path>
|
|
20
|
-
</g>
|
|
21
|
-
</svg>
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
export default CloseIcon;
|
package/lib/assets/icons/copy.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var CopyIcon = function CopyIcon() {
|
|
13
|
-
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
14
|
-
width: "15px",
|
|
15
|
-
height: "15px",
|
|
16
|
-
viewBox: "0 0 512 512",
|
|
17
|
-
version: "1.1",
|
|
18
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
20
|
-
}, /*#__PURE__*/_react["default"].createElement("title", null, "Copy Icon"), /*#__PURE__*/_react["default"].createElement("g", {
|
|
21
|
-
stroke: "none",
|
|
22
|
-
strokeWidth: "1",
|
|
23
|
-
fill: "none",
|
|
24
|
-
fillRule: "evenodd"
|
|
25
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
26
|
-
fill: "#112E51",
|
|
27
|
-
fillRule: "nonzero",
|
|
28
|
-
d: "M384 96L384 0h-112c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48H464c26.51 0 48-21.49 48-48V128h-95.1C398.4 128 384 113.6 384 96zM416 0v96h96L416 0zM192 352V128h-144c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h192c26.51 0 48-21.49 48-48L288 416h-32C220.7 416 192 387.3 192 352z"
|
|
29
|
-
})));
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
var _default = CopyIcon;
|
|
33
|
-
exports["default"] = _default;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const CopyIcon = () => (
|
|
4
|
-
<svg
|
|
5
|
-
width="15px"
|
|
6
|
-
height="15px"
|
|
7
|
-
viewBox="0 0 512 512"
|
|
8
|
-
version="1.1"
|
|
9
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
-
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
11
|
-
>
|
|
12
|
-
<title>Copy Icon</title>
|
|
13
|
-
<g stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
|
|
14
|
-
<path
|
|
15
|
-
fill="#112E51"
|
|
16
|
-
fillRule="nonzero"
|
|
17
|
-
d="M384 96L384 0h-112c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48H464c26.51 0 48-21.49 48-48V128h-95.1C398.4 128 384 113.6 384 96zM416 0v96h96L416 0zM192 352V128h-144c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h192c26.51 0 48-21.49 48-48L288 416h-32C220.7 416 192 387.3 192 352z"
|
|
18
|
-
/>
|
|
19
|
-
</g>
|
|
20
|
-
</svg>
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
export default CopyIcon;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var DownloadIcon = function DownloadIcon() {
|
|
13
|
-
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
14
|
-
width: "15px",
|
|
15
|
-
height: "15px",
|
|
16
|
-
viewBox: "0 0 384 512",
|
|
17
|
-
version: "1.1",
|
|
18
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
20
|
-
}, /*#__PURE__*/_react["default"].createElement("title", null, "Download Icon"), /*#__PURE__*/_react["default"].createElement("g", {
|
|
21
|
-
stroke: "none",
|
|
22
|
-
strokeWidth: "1",
|
|
23
|
-
fill: "none",
|
|
24
|
-
fillRule: "evenodd"
|
|
25
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
26
|
-
fill: "#112E51",
|
|
27
|
-
fillRule: "nonzero",
|
|
28
|
-
d: "M384 128h-128V0L384 128zM256 160H384v304c0 26.51-21.49 48-48 48h-288C21.49 512 0 490.5 0 464v-416C0 21.49 21.49 0 48 0H224l.0039 128C224 145.7 238.3 160 256 160zM255 295L216 334.1V232c0-13.25-10.75-24-24-24S168 218.8 168 232v102.1L128.1 295C124.3 290.3 118.2 288 112 288S99.72 290.3 95.03 295c-9.375 9.375-9.375 24.56 0 33.94l80 80c9.375 9.375 24.56 9.375 33.94 0l80-80c9.375-9.375 9.375-24.56 0-33.94S264.4 285.7 255 295z"
|
|
29
|
-
})));
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
var _default = DownloadIcon;
|
|
33
|
-
exports["default"] = _default;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const DownloadIcon = () => (
|
|
4
|
-
<svg
|
|
5
|
-
width="15px"
|
|
6
|
-
height="15px"
|
|
7
|
-
viewBox="0 0 384 512"
|
|
8
|
-
version="1.1"
|
|
9
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
-
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
11
|
-
>
|
|
12
|
-
<title>Download Icon</title>
|
|
13
|
-
<g stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
|
|
14
|
-
<path
|
|
15
|
-
fill="#112E51"
|
|
16
|
-
fillRule="nonzero"
|
|
17
|
-
d="M384 128h-128V0L384 128zM256 160H384v304c0 26.51-21.49 48-48 48h-288C21.49 512 0 490.5 0 464v-416C0 21.49 21.49 0 48 0H224l.0039 128C224 145.7 238.3 160 256 160zM255 295L216 334.1V232c0-13.25-10.75-24-24-24S168 218.8 168 232v102.1L128.1 295C124.3 290.3 118.2 288 112 288S99.72 290.3 95.03 295c-9.375 9.375-9.375 24.56 0 33.94l80 80c9.375 9.375 24.56 9.375 33.94 0l80-80c9.375-9.375 9.375-24.56 0-33.94S264.4 285.7 255 295z"
|
|
18
|
-
/>
|
|
19
|
-
</g>
|
|
20
|
-
</svg>
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
export default DownloadIcon;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var SettingsIcon = function SettingsIcon() {
|
|
13
|
-
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
14
|
-
width: "15px",
|
|
15
|
-
height: "15px" // viewBox="0 0 15 15"
|
|
16
|
-
,
|
|
17
|
-
viewBox: "0 0 512 512",
|
|
18
|
-
version: "1.1",
|
|
19
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
20
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
21
|
-
}, /*#__PURE__*/_react["default"].createElement("title", null, "Settings Icon"), /*#__PURE__*/_react["default"].createElement("g", {
|
|
22
|
-
stroke: "none",
|
|
23
|
-
strokeWidth: "1",
|
|
24
|
-
fill: "none",
|
|
25
|
-
fillRule: "evenodd"
|
|
26
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
27
|
-
fill: "#112E51",
|
|
28
|
-
fillRule: "nonzero",
|
|
29
|
-
d: "M495.9 166.6C499.2 175.2 496.4 184.9 489.6 191.2L446.3 230.6C447.4 238.9 448 247.4 448 256C448 264.6 447.4 273.1 446.3 281.4L489.6 320.8C496.4 327.1 499.2 336.8 495.9 345.4C491.5 357.3 486.2 368.8 480.2 379.7L475.5 387.8C468.9 398.8 461.5 409.2 453.4 419.1C447.4 426.2 437.7 428.7 428.9 425.9L373.2 408.1C359.8 418.4 344.1 427 329.2 433.6L316.7 490.7C314.7 499.7 307.7 506.1 298.5 508.5C284.7 510.8 270.5 512 255.1 512C241.5 512 227.3 510.8 213.5 508.5C204.3 506.1 197.3 499.7 195.3 490.7L182.8 433.6C167 427 152.2 418.4 138.8 408.1L83.14 425.9C74.3 428.7 64.55 426.2 58.63 419.1C50.52 409.2 43.12 398.8 36.52 387.8L31.84 379.7C25.77 368.8 20.49 357.3 16.06 345.4C12.82 336.8 15.55 327.1 22.41 320.8L65.67 281.4C64.57 273.1 64 264.6 64 256C64 247.4 64.57 238.9 65.67 230.6L22.41 191.2C15.55 184.9 12.82 175.3 16.06 166.6C20.49 154.7 25.78 143.2 31.84 132.3L36.51 124.2C43.12 113.2 50.52 102.8 58.63 92.95C64.55 85.8 74.3 83.32 83.14 86.14L138.8 103.9C152.2 93.56 167 84.96 182.8 78.43L195.3 21.33C197.3 12.25 204.3 5.04 213.5 3.51C227.3 1.201 241.5 0 256 0C270.5 0 284.7 1.201 298.5 3.51C307.7 5.04 314.7 12.25 316.7 21.33L329.2 78.43C344.1 84.96 359.8 93.56 373.2 103.9L428.9 86.14C437.7 83.32 447.4 85.8 453.4 92.95C461.5 102.8 468.9 113.2 475.5 124.2L480.2 132.3C486.2 143.2 491.5 154.7 495.9 166.6V166.6zM256 336C300.2 336 336 300.2 336 255.1C336 211.8 300.2 175.1 256 175.1C211.8 175.1 176 211.8 176 255.1C176 300.2 211.8 336 256 336z"
|
|
30
|
-
})));
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
var _default = SettingsIcon;
|
|
34
|
-
exports["default"] = _default;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const SettingsIcon = () => (
|
|
4
|
-
<svg
|
|
5
|
-
width="15px"
|
|
6
|
-
height="15px"
|
|
7
|
-
// viewBox="0 0 15 15"
|
|
8
|
-
viewBox="0 0 512 512"
|
|
9
|
-
version="1.1"
|
|
10
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
-
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
12
|
-
>
|
|
13
|
-
<title>Settings Icon</title>
|
|
14
|
-
<g stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
|
|
15
|
-
<path
|
|
16
|
-
fill="#112E51"
|
|
17
|
-
fillRule="nonzero"
|
|
18
|
-
d="M495.9 166.6C499.2 175.2 496.4 184.9 489.6 191.2L446.3 230.6C447.4 238.9 448 247.4 448 256C448 264.6 447.4 273.1 446.3 281.4L489.6 320.8C496.4 327.1 499.2 336.8 495.9 345.4C491.5 357.3 486.2 368.8 480.2 379.7L475.5 387.8C468.9 398.8 461.5 409.2 453.4 419.1C447.4 426.2 437.7 428.7 428.9 425.9L373.2 408.1C359.8 418.4 344.1 427 329.2 433.6L316.7 490.7C314.7 499.7 307.7 506.1 298.5 508.5C284.7 510.8 270.5 512 255.1 512C241.5 512 227.3 510.8 213.5 508.5C204.3 506.1 197.3 499.7 195.3 490.7L182.8 433.6C167 427 152.2 418.4 138.8 408.1L83.14 425.9C74.3 428.7 64.55 426.2 58.63 419.1C50.52 409.2 43.12 398.8 36.52 387.8L31.84 379.7C25.77 368.8 20.49 357.3 16.06 345.4C12.82 336.8 15.55 327.1 22.41 320.8L65.67 281.4C64.57 273.1 64 264.6 64 256C64 247.4 64.57 238.9 65.67 230.6L22.41 191.2C15.55 184.9 12.82 175.3 16.06 166.6C20.49 154.7 25.78 143.2 31.84 132.3L36.51 124.2C43.12 113.2 50.52 102.8 58.63 92.95C64.55 85.8 74.3 83.32 83.14 86.14L138.8 103.9C152.2 93.56 167 84.96 182.8 78.43L195.3 21.33C197.3 12.25 204.3 5.04 213.5 3.51C227.3 1.201 241.5 0 256 0C270.5 0 284.7 1.201 298.5 3.51C307.7 5.04 314.7 12.25 316.7 21.33L329.2 78.43C344.1 84.96 359.8 93.56 373.2 103.9L428.9 86.14C437.7 83.32 447.4 85.8 453.4 92.95C461.5 102.8 468.9 113.2 475.5 124.2L480.2 132.3C486.2 143.2 491.5 154.7 495.9 166.6V166.6zM256 336C300.2 336 336 300.2 336 255.1C336 211.8 300.2 175.1 256 175.1C211.8 175.1 176 211.8 176 255.1C176 300.2 211.8 336 256 336z"
|
|
19
|
-
/>
|
|
20
|
-
</g>
|
|
21
|
-
</svg>
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
export default SettingsIcon;
|
|
Binary file
|
|
Binary file
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.defaultMetadataMapping = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _reactRouterDom = require("react-router-dom");
|
|
13
|
-
|
|
14
|
-
var _TransformedDate = _interopRequireDefault(require("../components/TransformedDate"));
|
|
15
|
-
|
|
16
|
-
var _frequencyMap = require("./frequencyMap");
|
|
17
|
-
|
|
18
|
-
var defaultMetadataMapping = {
|
|
19
|
-
modified: function modified(data) {
|
|
20
|
-
return [{
|
|
21
|
-
label: 'Modified',
|
|
22
|
-
value: /*#__PURE__*/_react["default"].createElement(_TransformedDate["default"], {
|
|
23
|
-
date: data
|
|
24
|
-
})
|
|
25
|
-
}];
|
|
26
|
-
},
|
|
27
|
-
issued: function issued(data) {
|
|
28
|
-
return [{
|
|
29
|
-
label: 'Issued',
|
|
30
|
-
value: /*#__PURE__*/_react["default"].createElement(_TransformedDate["default"], {
|
|
31
|
-
date: data
|
|
32
|
-
})
|
|
33
|
-
}];
|
|
34
|
-
},
|
|
35
|
-
accrualPeriodicity: function accrualPeriodicity(data) {
|
|
36
|
-
return [{
|
|
37
|
-
label: 'Frequency',
|
|
38
|
-
value: _frequencyMap.frequencyMap[data].name
|
|
39
|
-
}];
|
|
40
|
-
},
|
|
41
|
-
publisher: function publisher(data) {
|
|
42
|
-
if (data.data && data.data.name) {
|
|
43
|
-
return [{
|
|
44
|
-
label: 'Publisher',
|
|
45
|
-
value: data.data.name
|
|
46
|
-
}];
|
|
47
|
-
} else {
|
|
48
|
-
return [];
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
identifier: function identifier(data) {
|
|
52
|
-
return [{
|
|
53
|
-
label: 'Identifier',
|
|
54
|
-
value: data
|
|
55
|
-
}];
|
|
56
|
-
},
|
|
57
|
-
contactPoint: function contactPoint(data) {
|
|
58
|
-
var rows = [];
|
|
59
|
-
|
|
60
|
-
if (data.fn) {
|
|
61
|
-
rows.push({
|
|
62
|
-
label: 'Contact',
|
|
63
|
-
value: data.fn
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (data.hasEmail) {
|
|
68
|
-
rows.push({
|
|
69
|
-
label: 'Contact Email',
|
|
70
|
-
value: data.hasEmail
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return rows;
|
|
75
|
-
},
|
|
76
|
-
bureauCode: function bureauCode(data) {
|
|
77
|
-
if (data.length) {
|
|
78
|
-
return [{
|
|
79
|
-
label: 'Bureau Code',
|
|
80
|
-
value: data[0]
|
|
81
|
-
}];
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
programCode: function programCode(data) {
|
|
85
|
-
if (data.length) {
|
|
86
|
-
return [{
|
|
87
|
-
label: 'Program Code',
|
|
88
|
-
value: data[0]
|
|
89
|
-
}];
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
theme: function theme(data) {
|
|
93
|
-
return [{
|
|
94
|
-
label: 'Category',
|
|
95
|
-
value: data.map(function (theme) {
|
|
96
|
-
return /*#__PURE__*/_react["default"].createElement(_reactRouterDom.Link, {
|
|
97
|
-
key: theme.data,
|
|
98
|
-
to: "/datasets?theme[]=".concat(theme.data)
|
|
99
|
-
}, theme.data);
|
|
100
|
-
}).reduce(function (prev, curr) {
|
|
101
|
-
return [prev, ', ', curr];
|
|
102
|
-
})
|
|
103
|
-
}];
|
|
104
|
-
},
|
|
105
|
-
keyword: function keyword(data) {
|
|
106
|
-
return [{
|
|
107
|
-
label: 'Tags',
|
|
108
|
-
value: data.map(function (keyword) {
|
|
109
|
-
return /*#__PURE__*/_react["default"].createElement(_reactRouterDom.Link, {
|
|
110
|
-
key: keyword.data,
|
|
111
|
-
to: "/datasets?keyword[]=".concat(keyword.data)
|
|
112
|
-
}, keyword.data);
|
|
113
|
-
}).reduce(function (prev, curr) {
|
|
114
|
-
return [prev, ', ', curr];
|
|
115
|
-
})
|
|
116
|
-
}];
|
|
117
|
-
},
|
|
118
|
-
license: function license(data) {
|
|
119
|
-
return [{
|
|
120
|
-
label: 'License',
|
|
121
|
-
value: /*#__PURE__*/_react["default"].createElement("a", {
|
|
122
|
-
href: data
|
|
123
|
-
}, data)
|
|
124
|
-
}];
|
|
125
|
-
},
|
|
126
|
-
accessLevel: function accessLevel(data) {
|
|
127
|
-
return [{
|
|
128
|
-
label: 'Public Access Level',
|
|
129
|
-
value: data
|
|
130
|
-
}];
|
|
131
|
-
},
|
|
132
|
-
temporal: function temporal(data) {
|
|
133
|
-
return [{
|
|
134
|
-
label: 'Temporal Coverage',
|
|
135
|
-
value: /*#__PURE__*/_react["default"].createElement("span", {
|
|
136
|
-
className: "dc-c-word-break--all"
|
|
137
|
-
}, data)
|
|
138
|
-
}];
|
|
139
|
-
},
|
|
140
|
-
spatial: function spatial(data) {
|
|
141
|
-
return [{
|
|
142
|
-
label: 'Spacial/Geographical Coverage',
|
|
143
|
-
value: data
|
|
144
|
-
}];
|
|
145
|
-
},
|
|
146
|
-
references: function references(data) {
|
|
147
|
-
return [{
|
|
148
|
-
label: 'Related Documents',
|
|
149
|
-
value: /*#__PURE__*/_react["default"].createElement("ul", {
|
|
150
|
-
className: "ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0"
|
|
151
|
-
}, data.map(function (item) {
|
|
152
|
-
return /*#__PURE__*/_react["default"].createElement("li", {
|
|
153
|
-
key: item
|
|
154
|
-
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
155
|
-
href: item
|
|
156
|
-
}, item));
|
|
157
|
-
}))
|
|
158
|
-
}];
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
exports.defaultMetadataMapping = defaultMetadataMapping;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Link } from 'react-router-dom';
|
|
3
|
-
import TransformedDate from '../components/TransformedDate';
|
|
4
|
-
import { frequencyMap } from './frequencyMap';
|
|
5
|
-
|
|
6
|
-
export const defaultMetadataMapping = {
|
|
7
|
-
modified: (data) => {
|
|
8
|
-
return [{ label: 'Modified', value: <TransformedDate date={data} /> }];
|
|
9
|
-
},
|
|
10
|
-
issued: (data) => {
|
|
11
|
-
return [{ label: 'Issued', value: <TransformedDate date={data} /> }];
|
|
12
|
-
},
|
|
13
|
-
accrualPeriodicity: (data) => {
|
|
14
|
-
return [
|
|
15
|
-
{
|
|
16
|
-
label: 'Frequency',
|
|
17
|
-
value: frequencyMap[data].name,
|
|
18
|
-
},
|
|
19
|
-
];
|
|
20
|
-
},
|
|
21
|
-
publisher: (data) => {
|
|
22
|
-
if (data.data && data.data.name) {
|
|
23
|
-
return [{ label: 'Publisher', value: data.data.name }];
|
|
24
|
-
} else {
|
|
25
|
-
return [];
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
identifier: (data) => {
|
|
29
|
-
return [{ label: 'Identifier', value: data }];
|
|
30
|
-
},
|
|
31
|
-
contactPoint: (data) => {
|
|
32
|
-
let rows = [];
|
|
33
|
-
if (data.fn) {
|
|
34
|
-
rows.push({ label: 'Contact', value: data.fn });
|
|
35
|
-
}
|
|
36
|
-
if (data.hasEmail) {
|
|
37
|
-
rows.push({ label: 'Contact Email', value: data.hasEmail });
|
|
38
|
-
}
|
|
39
|
-
return rows;
|
|
40
|
-
},
|
|
41
|
-
bureauCode: (data) => {
|
|
42
|
-
if (data.length) {
|
|
43
|
-
return [{ label: 'Bureau Code', value: data[0] }];
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
programCode: (data) => {
|
|
47
|
-
if (data.length) {
|
|
48
|
-
return [{ label: 'Program Code', value: data[0] }];
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
theme: (data) => {
|
|
52
|
-
return [
|
|
53
|
-
{
|
|
54
|
-
label: 'Category',
|
|
55
|
-
value: data
|
|
56
|
-
.map((theme) => (
|
|
57
|
-
<Link key={theme.data} to={`/datasets?theme[]=${theme.data}`}>
|
|
58
|
-
{theme.data}
|
|
59
|
-
</Link>
|
|
60
|
-
))
|
|
61
|
-
.reduce((prev, curr) => [prev, ', ', curr]),
|
|
62
|
-
},
|
|
63
|
-
];
|
|
64
|
-
},
|
|
65
|
-
keyword: (data) => {
|
|
66
|
-
return [
|
|
67
|
-
{
|
|
68
|
-
label: 'Tags',
|
|
69
|
-
value: data
|
|
70
|
-
.map((keyword) => (
|
|
71
|
-
<Link key={keyword.data} to={`/datasets?keyword[]=${keyword.data}`}>
|
|
72
|
-
{keyword.data}
|
|
73
|
-
</Link>
|
|
74
|
-
))
|
|
75
|
-
.reduce((prev, curr) => [prev, ', ', curr]),
|
|
76
|
-
},
|
|
77
|
-
];
|
|
78
|
-
},
|
|
79
|
-
license: (data) => {
|
|
80
|
-
return [{ label: 'License', value: <a href={data}>{data}</a> }];
|
|
81
|
-
},
|
|
82
|
-
accessLevel: (data) => {
|
|
83
|
-
return [{ label: 'Public Access Level', value: data }];
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
temporal: (data) => {
|
|
87
|
-
return [
|
|
88
|
-
{ label: 'Temporal Coverage', value: <span className="dc-c-word-break--all">{data}</span> },
|
|
89
|
-
];
|
|
90
|
-
},
|
|
91
|
-
spatial: (data) => {
|
|
92
|
-
return [{ label: 'Spacial/Geographical Coverage', value: data }];
|
|
93
|
-
},
|
|
94
|
-
references: (data) => {
|
|
95
|
-
return [
|
|
96
|
-
{
|
|
97
|
-
label: 'Related Documents',
|
|
98
|
-
value: (
|
|
99
|
-
<ul className="ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0">
|
|
100
|
-
{data.map((item) => (
|
|
101
|
-
<li key={item}>
|
|
102
|
-
<a href={item}>{item}</a>
|
|
103
|
-
</li>
|
|
104
|
-
))}
|
|
105
|
-
</ul>
|
|
106
|
-
),
|
|
107
|
-
},
|
|
108
|
-
];
|
|
109
|
-
},
|
|
110
|
-
};
|