@civicactions/cmsds-open-data-components 4.0.4-alpha.1 → 4.0.4-oe
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 +0 -4
- package/dist/main.css.map +1 -1
- package/dist/main.js +698 -687
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +44 -45
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./main.css";
|
|
2
2
|
import {jsx as $hgUW1$jsx, jsxs as $hgUW1$jsxs, Fragment as $hgUW1$Fragment} from "react/jsx-runtime";
|
|
3
|
-
import {Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, Button as $hgUW1$Button, CloseIconThin as $hgUW1$CloseIconThin, ArrowIcon as $hgUW1$ArrowIcon, Spinner as $hgUW1$Spinner, Alert as $hgUW1$Alert, Dialog as $hgUW1$Dialog, TextField as $hgUW1$TextField, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon, Choice as $hgUW1$Choice, Dropdown as $hgUW1$Dropdown, Pagination as $hgUW1$Pagination, Table as $hgUW1$Table, TableHead as $hgUW1$TableHead, TableRow as $hgUW1$TableRow, TableCell as $hgUW1$TableCell, TableBody as $hgUW1$TableBody, Tabs as $hgUW1$Tabs, TabPanel as $hgUW1$TabPanel,
|
|
3
|
+
import {Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, Button as $hgUW1$Button, CloseIconThin as $hgUW1$CloseIconThin, ArrowIcon as $hgUW1$ArrowIcon, Spinner as $hgUW1$Spinner, Alert as $hgUW1$Alert, Dialog as $hgUW1$Dialog, TextField as $hgUW1$TextField, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon, Choice as $hgUW1$Choice, Dropdown as $hgUW1$Dropdown, Pagination as $hgUW1$Pagination, Table as $hgUW1$Table, TableHead as $hgUW1$TableHead, TableRow as $hgUW1$TableRow, TableCell as $hgUW1$TableCell, TableBody as $hgUW1$TableBody, Tabs as $hgUW1$Tabs, TabPanel as $hgUW1$TabPanel, Badge as $hgUW1$Badge} from "@cmsgov/design-system";
|
|
4
4
|
import $hgUW1$react, {createContext as $hgUW1$createContext, useState as $hgUW1$useState, useRef as $hgUW1$useRef, useEffect as $hgUW1$useEffect, useContext as $hgUW1$useContext, useMemo as $hgUW1$useMemo, useCallback as $hgUW1$useCallback} from "react";
|
|
5
5
|
import {NavLink as $hgUW1$NavLink, Link as $hgUW1$Link, useNavigate as $hgUW1$useNavigate, useLocation as $hgUW1$useLocation, useSearchParams as $hgUW1$useSearchParams} from "react-router-dom";
|
|
6
6
|
import $hgUW1$qs from "qs";
|
|
@@ -41,7 +41,7 @@ function $e49d4387bed21287$export$2e2bcd8739ae039() {
|
|
|
41
41
|
/*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
|
|
42
42
|
children: "offset"
|
|
43
43
|
}),
|
|
44
|
-
|
|
44
|
+
" ",
|
|
45
45
|
"parameters to iterate through result sets that are larger than the row limit when running queries against the datastore API."
|
|
46
46
|
]
|
|
47
47
|
})
|
|
@@ -72,7 +72,7 @@ var $3c72c298c3a7f21f$export$2e2bcd8739ae039 = $3c72c298c3a7f21f$var$HeaderTagli
|
|
|
72
72
|
const $1555e1cb3eb7b3e3$var$HeaderNavIconLink = (props)=>{
|
|
73
73
|
const { url: url, urlTitle: urlTitle, logoFilePath: logoFilePath, logoAltText: logoAltText, backArrow: backArrow } = props;
|
|
74
74
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
75
|
-
className: `dkan-c-header-nav-icon-link ${backArrow ?
|
|
75
|
+
className: `dkan-c-header-nav-icon-link ${backArrow ? "show-back-arrow" : ""} ds-u-valign--middle `,
|
|
76
76
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
77
77
|
href: url,
|
|
78
78
|
title: urlTitle,
|
|
@@ -232,7 +232,7 @@ const $046ded0064bd0a3d$var$FAQAccordion = (props)=>{
|
|
|
232
232
|
type: "button",
|
|
233
233
|
variation: "ghost",
|
|
234
234
|
onClick: ()=>toggleAll(),
|
|
235
|
-
children: `${expanded ?
|
|
235
|
+
children: `${expanded ? "Collapse" : "Expand"} all FAQs`
|
|
236
236
|
}),
|
|
237
237
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
|
|
238
238
|
children: faqItems.map((faq)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
@@ -333,8 +333,8 @@ const $844981eac9b63865$export$eccc29c8d0ff408 = (0, $hgUW1$createContext)({
|
|
|
333
333
|
|
|
334
334
|
|
|
335
335
|
const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 4, defaultSort: defaultSort = {
|
|
336
|
-
defaultSort:
|
|
337
|
-
defaultOrder:
|
|
336
|
+
defaultSort: "modified",
|
|
337
|
+
defaultOrder: "desc"
|
|
338
338
|
}, subLinkClasses: subLinkClasses })=>{
|
|
339
339
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
340
340
|
const [currentResultNumbers, setCurrentResultNumbers] = (0, $hgUW1$useState)({
|
|
@@ -354,8 +354,8 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
|
|
|
354
354
|
]);
|
|
355
355
|
let params = {
|
|
356
356
|
sort: defaultSort.defaultSort,
|
|
357
|
-
[
|
|
358
|
-
[
|
|
357
|
+
["sort-order"]: defaultSort.defaultOrder,
|
|
358
|
+
["page-size"]: defaultPageSize
|
|
359
359
|
};
|
|
360
360
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
361
361
|
queryKey: [
|
|
@@ -364,7 +364,7 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
|
|
|
364
364
|
],
|
|
365
365
|
queryFn: ()=>{
|
|
366
366
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
367
|
-
arrayFormat:
|
|
367
|
+
arrayFormat: "comma",
|
|
368
368
|
encode: false
|
|
369
369
|
})}`);
|
|
370
370
|
}
|
|
@@ -507,11 +507,11 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
507
507
|
function handleFocusOut(event) {
|
|
508
508
|
if (currentMenu && !currentMenu.contains(event.relatedTarget)) setIsExpanded(false);
|
|
509
509
|
}
|
|
510
|
-
document.addEventListener(
|
|
511
|
-
currentMenu?.addEventListener(
|
|
510
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
511
|
+
currentMenu?.addEventListener("focusout", handleFocusOut);
|
|
512
512
|
return ()=>{
|
|
513
|
-
document.removeEventListener(
|
|
514
|
-
if (currentMenu) currentMenu.removeEventListener(
|
|
513
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
514
|
+
if (currentMenu) currentMenu.removeEventListener("focusout", handleFocusOut);
|
|
515
515
|
};
|
|
516
516
|
}, [
|
|
517
517
|
isExpanded
|
|
@@ -533,7 +533,7 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
536
|
-
className: `dkan-c-nav-submenu has-submenu${isExpanded ?
|
|
536
|
+
className: `dkan-c-nav-submenu has-submenu${isExpanded ? " open" : ""}`,
|
|
537
537
|
ref: menu,
|
|
538
538
|
children: [
|
|
539
539
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
@@ -569,12 +569,12 @@ var $4f153ca537d853e5$export$2e2bcd8739ae039 = $4f153ca537d853e5$var$SubMenu;
|
|
|
569
569
|
const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
|
|
570
570
|
const { headingText: headingText = "Dataset Search" } = props;
|
|
571
571
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
572
|
-
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)(
|
|
572
|
+
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)("");
|
|
573
573
|
const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
|
|
574
574
|
function searchForDataset(e) {
|
|
575
575
|
e.preventDefault();
|
|
576
576
|
if (window) {
|
|
577
|
-
if (window.location.pathname !==
|
|
577
|
+
if (window.location.pathname !== "/datasets") navigate(`/datasets?fulltext=${modalSearchTerm}`);
|
|
578
578
|
else {
|
|
579
579
|
window.location.search = `fulltext=${modalSearchTerm}`;
|
|
580
580
|
setModalSearch(false);
|
|
@@ -642,9 +642,9 @@ const $b939b31651e82908$var$HeaderNav = (props)=>{
|
|
|
642
642
|
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
643
643
|
const { links: links, topNavLinks: topNavLinks, wrapperClasses: wrapperClasses, searchInMobile: searchInMobile } = props;
|
|
644
644
|
const navMenuOpenClass = `dkan-c-nav-menu--${headerContext.mobileMenuOpen ? "open" : "close"}`;
|
|
645
|
-
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ?
|
|
646
|
-
const linkClasses =
|
|
647
|
-
const listClasses =
|
|
645
|
+
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ? "mobile" : "desktop"}`;
|
|
646
|
+
const linkClasses = "dkan-c-header--link ds-c-button ds-c-button--ghost";
|
|
647
|
+
const listClasses = "dkan-c-header--link-list ";
|
|
648
648
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
649
649
|
className: `dkan-c-nav-menu ${wrapperClasses} ${navMenuOpenClass} ${isMobileClass}`,
|
|
650
650
|
ref: headerContext.menuRef,
|
|
@@ -814,8 +814,8 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
814
814
|
const { title: title, links: links, mobileMax: mobileMax } = props;
|
|
815
815
|
const active = (0, $hgUW1$useLocation)().pathname;
|
|
816
816
|
const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
|
|
817
|
-
const styleClasses =
|
|
818
|
-
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ?
|
|
817
|
+
const styleClasses = "dkan-c--sidebar-nav-wrapper ds-u-border--1 ds-u-border--color-gray-lightest ds-u-padding--2";
|
|
818
|
+
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ? "mobile" : "desktop"}`;
|
|
819
819
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
820
820
|
className: `dkan-c-sidebar-nav ${mobileClass}`,
|
|
821
821
|
children: [
|
|
@@ -829,7 +829,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
829
829
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
830
830
|
"aria-haspopup": "true",
|
|
831
831
|
variation: "ghost",
|
|
832
|
-
"aria-expanded": `${menuOpen ?
|
|
832
|
+
"aria-expanded": `${menuOpen ? "true" : "false"}`,
|
|
833
833
|
onDark: true,
|
|
834
834
|
onClick: ()=>setMenuOpen(!menuOpen),
|
|
835
835
|
children: [
|
|
@@ -838,7 +838,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
838
838
|
children: "Toggle menu"
|
|
839
839
|
}),
|
|
840
840
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
|
|
841
|
-
direction: menuOpen ?
|
|
841
|
+
direction: menuOpen ? "up" : "down"
|
|
842
842
|
})
|
|
843
843
|
]
|
|
844
844
|
})
|
|
@@ -847,7 +847,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
847
847
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
848
848
|
className: ``,
|
|
849
849
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
|
|
850
|
-
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ?
|
|
850
|
+
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ? "open" : "close"}`,
|
|
851
851
|
children: [
|
|
852
852
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
853
853
|
className: "ds-u-padding--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest",
|
|
@@ -859,7 +859,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
859
859
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
860
860
|
className: "ds-u-padding-bottom--2",
|
|
861
861
|
children: links.map(({ url: url, label: label })=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
862
|
-
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ?
|
|
862
|
+
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ? "active" : ""}`,
|
|
863
863
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
864
864
|
className: "ds-u-display--flex ds-u-padding-y--1",
|
|
865
865
|
children: [
|
|
@@ -894,12 +894,12 @@ const $b0968edc60d7d3a4$var$SidebarPage = (props)=>{
|
|
|
894
894
|
query: `(max-width: ${mobileMaxWidth}px)`
|
|
895
895
|
});
|
|
896
896
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
897
|
-
className: `${mobileMax ? "a" :
|
|
897
|
+
className: `${mobileMax ? "a" : "ds-l-container"}`,
|
|
898
898
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
899
|
-
className: `${mobileMax ? "a" :
|
|
899
|
+
className: `${mobileMax ? "a" : "ds-l-row"}`,
|
|
900
900
|
children: [
|
|
901
901
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
902
|
-
className: `${mobileMax ?
|
|
902
|
+
className: `${mobileMax ? "a" : "ds-l-col--4"}`,
|
|
903
903
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $953b286f7778640e$export$2e2bcd8739ae039), {
|
|
904
904
|
links: links,
|
|
905
905
|
title: menuTitle,
|
|
@@ -922,9 +922,9 @@ var $b0968edc60d7d3a4$export$2e2bcd8739ae039 = $b0968edc60d7d3a4$var$SidebarPage
|
|
|
922
922
|
|
|
923
923
|
|
|
924
924
|
|
|
925
|
-
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl =
|
|
925
|
+
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl = "datasets", searchKey: searchKey = "fulltext", textfieldLabel: textfieldLabel = "Search for a dataset", searchButtonText: searchButtonText = "Search" })=>{
|
|
926
926
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
927
|
-
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState(
|
|
927
|
+
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState("");
|
|
928
928
|
function submitHero(e) {
|
|
929
929
|
e.preventDefault();
|
|
930
930
|
navigate(`/${searchUrl}?${searchKey}=${searchValue}`);
|
|
@@ -951,24 +951,24 @@ const $59a079354baa335c$var$Hero = ({ title: title, description: description, se
|
|
|
951
951
|
onSubmit: (e)=>submitHero(e),
|
|
952
952
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
953
953
|
style: {
|
|
954
|
-
position:
|
|
954
|
+
position: "relative"
|
|
955
955
|
},
|
|
956
956
|
className: "ds-l-row ds-u-align-items--stretch ds-u-margin-y--4 ds-u-flex-wrap--nowrap",
|
|
957
957
|
children: [
|
|
958
958
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
959
959
|
className: "ds-u-padding--0 ds-u-margin-right--1",
|
|
960
960
|
style: {
|
|
961
|
-
flex:
|
|
962
|
-
maxWidth:
|
|
961
|
+
flex: "1 1 100%",
|
|
962
|
+
maxWidth: "100%"
|
|
963
963
|
},
|
|
964
964
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
965
965
|
label: textfieldLabel,
|
|
966
966
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
967
967
|
name: "search_text_input",
|
|
968
968
|
style: {
|
|
969
|
-
maxWidth:
|
|
970
|
-
height:
|
|
971
|
-
margin:
|
|
969
|
+
maxWidth: "none",
|
|
970
|
+
height: "61px",
|
|
971
|
+
margin: "0 20px 0 0"
|
|
972
972
|
},
|
|
973
973
|
onChange: (e)=>setSearchValue(e.target.value)
|
|
974
974
|
})
|
|
@@ -1006,14 +1006,14 @@ var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
|
|
|
1006
1006
|
|
|
1007
1007
|
|
|
1008
1008
|
const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date, options: options = {
|
|
1009
|
-
year:
|
|
1010
|
-
month:
|
|
1011
|
-
day:
|
|
1012
|
-
timeZone:
|
|
1009
|
+
year: "numeric",
|
|
1010
|
+
month: "long",
|
|
1011
|
+
day: "numeric",
|
|
1012
|
+
timeZone: "UTC"
|
|
1013
1013
|
} })=>{
|
|
1014
1014
|
const rawDate = new Date(date);
|
|
1015
|
-
let modifiedDate =
|
|
1016
|
-
if (rawDate) modifiedDate = rawDate.toLocaleDateString(
|
|
1015
|
+
let modifiedDate = "";
|
|
1016
|
+
if (rawDate) modifiedDate = rawDate.toLocaleDateString("en-US", options);
|
|
1017
1017
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
1018
1018
|
children: modifiedDate
|
|
1019
1019
|
});
|
|
@@ -1027,25 +1027,25 @@ const $c068004d499082cc$var$DatasetListItem = (props)=>{
|
|
|
1027
1027
|
minWidth: 1024
|
|
1028
1028
|
});
|
|
1029
1029
|
const { title: title, modified: modified, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
|
|
1030
|
-
let linkContainerClasses =
|
|
1031
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1032
|
-
else linkContainerClasses +=
|
|
1033
|
-
let linkClasses =
|
|
1030
|
+
let linkContainerClasses = "ds-u-margin-bottom--2";
|
|
1031
|
+
if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
|
|
1032
|
+
else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
|
|
1033
|
+
let linkClasses = "ds-u-display--block ds-u-text-align--left";
|
|
1034
1034
|
if (desktop) {
|
|
1035
|
-
linkContainerClasses =
|
|
1036
|
-
linkClasses +=
|
|
1035
|
+
linkContainerClasses = "ds-u-padding-x--0";
|
|
1036
|
+
linkClasses += " ds-l-col--4 ds-l-md-col--auto";
|
|
1037
1037
|
}
|
|
1038
1038
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1039
1039
|
className: "dc-c-list-item ds-u-padding-top--4",
|
|
1040
1040
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1041
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1041
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
|
|
1042
1042
|
children: [
|
|
1043
1043
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1044
1044
|
className: "ds-l-row ds-u-align-items--start",
|
|
1045
1045
|
children: [
|
|
1046
1046
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1047
1047
|
id: `dataset-${identifier}-updated-date`,
|
|
1048
|
-
className: `ds-l-col--12 ds-u-text-align--left ds-text-heading--sm ${paginationEnabled ?
|
|
1048
|
+
className: `ds-l-col--12 ds-u-text-align--left ds-text-heading--sm ${paginationEnabled ? "ds-u-padding-top--3" : "ds-u-padding-top--0"}`,
|
|
1049
1049
|
children: [
|
|
1050
1050
|
"Updated ",
|
|
1051
1051
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
@@ -1103,7 +1103,7 @@ var $c068004d499082cc$export$2e2bcd8739ae039 = $c068004d499082cc$var$DatasetList
|
|
|
1103
1103
|
|
|
1104
1104
|
const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
1105
1105
|
switch(props.id){
|
|
1106
|
-
case
|
|
1106
|
+
case "overview":
|
|
1107
1107
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1108
1108
|
width: "16px",
|
|
1109
1109
|
height: "16px",
|
|
@@ -1146,7 +1146,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1146
1146
|
})
|
|
1147
1147
|
]
|
|
1148
1148
|
});
|
|
1149
|
-
case
|
|
1149
|
+
case "data-table":
|
|
1150
1150
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1151
1151
|
width: "16px",
|
|
1152
1152
|
height: "12px",
|
|
@@ -1179,7 +1179,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1179
1179
|
})
|
|
1180
1180
|
]
|
|
1181
1181
|
});
|
|
1182
|
-
case
|
|
1182
|
+
case "api":
|
|
1183
1183
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1184
1184
|
width: "16px",
|
|
1185
1185
|
height: "13px",
|
|
@@ -1212,7 +1212,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1212
1212
|
})
|
|
1213
1213
|
]
|
|
1214
1214
|
});
|
|
1215
|
-
case
|
|
1215
|
+
case "download":
|
|
1216
1216
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1217
1217
|
width: "16px",
|
|
1218
1218
|
height: "16px",
|
|
@@ -1242,7 +1242,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1242
1242
|
})
|
|
1243
1243
|
]
|
|
1244
1244
|
});
|
|
1245
|
-
case
|
|
1245
|
+
case "data-dictionary":
|
|
1246
1246
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1247
1247
|
width: "14px",
|
|
1248
1248
|
height: "16px",
|
|
@@ -1345,13 +1345,13 @@ var $b61856b23f5f58a2$export$2e2bcd8739ae039 = $b61856b23f5f58a2$var$LargeFileDi
|
|
|
1345
1345
|
|
|
1346
1346
|
|
|
1347
1347
|
function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240) {
|
|
1348
|
-
if (!textString) return
|
|
1348
|
+
if (!textString) return "";
|
|
1349
1349
|
let cleanedText = textString;
|
|
1350
|
-
if (cleanedText.split(
|
|
1351
|
-
if (cleanedText.split(
|
|
1350
|
+
if (cleanedText.split("</p>").length > 1) cleanedText = cleanedText.split("</p>")[0];
|
|
1351
|
+
if (cleanedText.split("<br/>").length > 1) cleanedText = cleanedText.split("<br/>")[0];
|
|
1352
1352
|
cleanedText = (0, $hgUW1$lodashtruncate)(cleanedText, {
|
|
1353
|
-
|
|
1354
|
-
|
|
1353
|
+
"length": textLength,
|
|
1354
|
+
"separator": " "
|
|
1355
1355
|
});
|
|
1356
1356
|
return (0, $hgUW1$dompurify).sanitize(cleanedText, {
|
|
1357
1357
|
ALLOWED_TAGS: []
|
|
@@ -1369,9 +1369,9 @@ function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240)
|
|
|
1369
1369
|
const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
1370
1370
|
const { type: type, date: date, boldLabel: boldLabel = false, displayTooltips: displayTooltips = true } = props;
|
|
1371
1371
|
const dateText = {
|
|
1372
|
-
modified:
|
|
1373
|
-
released:
|
|
1374
|
-
refresh:
|
|
1372
|
+
modified: "Last Modified",
|
|
1373
|
+
released: "Released",
|
|
1374
|
+
refresh: "Planned Update"
|
|
1375
1375
|
};
|
|
1376
1376
|
const tooltipContent = {
|
|
1377
1377
|
modified: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -1408,7 +1408,7 @@ const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
|
1408
1408
|
})
|
|
1409
1409
|
};
|
|
1410
1410
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1411
|
-
className: `dataset-date-item${boldLabel ?
|
|
1411
|
+
className: `dataset-date-item${boldLabel ? " bold-label" : ""}`,
|
|
1412
1412
|
children: [
|
|
1413
1413
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1414
1414
|
className: "dataset-data-item-label",
|
|
@@ -1478,7 +1478,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
1478
1478
|
if (dist && dist.data) {
|
|
1479
1479
|
if (dist.data.format) return dist.data.format.toLowerCase();
|
|
1480
1480
|
if (dist.data.mediaType) {
|
|
1481
|
-
const mediaType = dist.data.mediaType.split(
|
|
1481
|
+
const mediaType = dist.data.mediaType.split("/");
|
|
1482
1482
|
if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
|
|
1483
1483
|
}
|
|
1484
1484
|
if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
|
|
@@ -1488,7 +1488,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
|
-
return
|
|
1491
|
+
return "";
|
|
1492
1492
|
}
|
|
1493
1493
|
|
|
1494
1494
|
|
|
@@ -1498,20 +1498,20 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1498
1498
|
});
|
|
1499
1499
|
const { title: title, modified: modified, description: description, downloadUrl: downloadUrl, largeFile: largeFile = false, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks, identifier: identifier, refresh: refresh, released: released, showDateDetails: showDateDetails = false, showTopics: showTopics = false, theme: theme, topicSlugs: topicSlugs, distribution: distribution } = props;
|
|
1500
1500
|
const location = (0, $hgUW1$useLocation)();
|
|
1501
|
-
let linkContainerClasses =
|
|
1502
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1503
|
-
else linkContainerClasses +=
|
|
1504
|
-
let linkClasses =
|
|
1501
|
+
let linkContainerClasses = "ds-u-margin-bottom--2";
|
|
1502
|
+
if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
|
|
1503
|
+
else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
|
|
1504
|
+
let linkClasses = "ds-u-display--block ds-u-text-align--left";
|
|
1505
1505
|
if (desktop) {
|
|
1506
|
-
linkContainerClasses =
|
|
1507
|
-
linkClasses +=
|
|
1506
|
+
linkContainerClasses = "ds-u-padding-x--0";
|
|
1507
|
+
linkClasses += " ds-l-col--4 ds-l-md-col--auto";
|
|
1508
1508
|
}
|
|
1509
1509
|
let themes;
|
|
1510
1510
|
if (theme && showTopics) themes = /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
1511
1511
|
className: "theme-list item-theme",
|
|
1512
1512
|
children: theme.map((topic, index)=>{
|
|
1513
|
-
const title = topic ||
|
|
1514
|
-
const prefix =
|
|
1513
|
+
const title = topic || "Unknown Topic";
|
|
1514
|
+
const prefix = "topics";
|
|
1515
1515
|
// Use the provided slug or fallback to a simple slug generation
|
|
1516
1516
|
const slug = topicSlugs?.[title];
|
|
1517
1517
|
const link = `/${prefix}/${slug}`;
|
|
@@ -1522,7 +1522,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1522
1522
|
state: {
|
|
1523
1523
|
fromUrl: location.pathname,
|
|
1524
1524
|
fromTitle: false,
|
|
1525
|
-
fromSearchList: location.pathname.includes(
|
|
1525
|
+
fromSearchList: location.pathname.includes("search")
|
|
1526
1526
|
},
|
|
1527
1527
|
children: title
|
|
1528
1528
|
})
|
|
@@ -1564,7 +1564,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1564
1564
|
};
|
|
1565
1565
|
const dataDictionaryExists = ()=>{
|
|
1566
1566
|
if (distribution && "data" in distribution) {
|
|
1567
|
-
if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType ===
|
|
1567
|
+
if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType === "application/vnd.tableschema+json";
|
|
1568
1568
|
}
|
|
1569
1569
|
return false;
|
|
1570
1570
|
};
|
|
@@ -1598,7 +1598,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1598
1598
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1599
1599
|
className: "dc-c-search-list-item ds-u-padding-top--3",
|
|
1600
1600
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1601
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1601
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
|
|
1602
1602
|
children: [
|
|
1603
1603
|
themes,
|
|
1604
1604
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
@@ -1606,7 +1606,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1606
1606
|
children: [
|
|
1607
1607
|
!showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1608
1608
|
id: `dataset-${identifier}-updated-date`,
|
|
1609
|
-
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ?
|
|
1609
|
+
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? "ds-u-padding-top--2" : "ds-u-padding-top--0"}`,
|
|
1610
1610
|
children: [
|
|
1611
1611
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1612
1612
|
children: "Updated:"
|
|
@@ -1635,13 +1635,13 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1635
1635
|
(0, $1a2bf34e2a8f6b80$export$59a943b34a82e690)(description),
|
|
1636
1636
|
description.length > 240 ? /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1637
1637
|
children: [
|
|
1638
|
-
|
|
1638
|
+
" ",
|
|
1639
1639
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1640
1640
|
to: `/dataset/${identifier}`,
|
|
1641
1641
|
children: "See more"
|
|
1642
1642
|
})
|
|
1643
1643
|
]
|
|
1644
|
-
}) :
|
|
1644
|
+
}) : ""
|
|
1645
1645
|
]
|
|
1646
1646
|
})
|
|
1647
1647
|
}),
|
|
@@ -1669,14 +1669,14 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1669
1669
|
"Download"
|
|
1670
1670
|
]
|
|
1671
1671
|
})
|
|
1672
|
-
}) :
|
|
1672
|
+
}) : "",
|
|
1673
1673
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("ul", {
|
|
1674
|
-
className: `ds-l-row ds-u-padding--0 ds-u-flex-direction--row ds-u-justify-content--between ds-u-md-justify-content--start ds-u-margin-top--3 ds-u-margin-x--0 ${!dataDictionaryLinks ?
|
|
1674
|
+
className: `ds-l-row ds-u-padding--0 ds-u-flex-direction--row ds-u-justify-content--between ds-u-md-justify-content--start ds-u-margin-top--3 ds-u-margin-x--0 ${!dataDictionaryLinks ? "ds-u-justify-content--center ds-u-md-justify-content--start" : ""}`,
|
|
1675
1675
|
children: [
|
|
1676
1676
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1677
1677
|
className: linkContainerClasses,
|
|
1678
1678
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1679
|
-
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ?
|
|
1679
|
+
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? "" : " dkan-disabled-link-wrapper"}`,
|
|
1680
1680
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataTableLink, {})
|
|
1681
1681
|
})
|
|
1682
1682
|
}),
|
|
@@ -1698,10 +1698,10 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1698
1698
|
dataDictionaryLinks ? /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1699
1699
|
className: linkContainerClasses,
|
|
1700
1700
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1701
|
-
className: `${linkClasses}${dataDictionaryExists() ?
|
|
1701
|
+
className: `${linkClasses}${dataDictionaryExists() ? "" : " dkan-disabled-link-wrapper"}`,
|
|
1702
1702
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataDictionaryLink, {})
|
|
1703
1703
|
})
|
|
1704
|
-
}) :
|
|
1704
|
+
}) : "",
|
|
1705
1705
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1706
1706
|
className: linkContainerClasses,
|
|
1707
1707
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -1797,7 +1797,7 @@ var $789279954d8eff7f$export$2e2bcd8739ae039 = $789279954d8eff7f$var$ApiDocument
|
|
|
1797
1797
|
|
|
1798
1798
|
|
|
1799
1799
|
|
|
1800
|
-
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className =
|
|
1800
|
+
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className = "data-table-results" })=>{
|
|
1801
1801
|
const numTotalRows = totalRows;
|
|
1802
1802
|
if (numTotalRows === 0) return /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1803
1803
|
className: className,
|
|
@@ -1815,18 +1815,18 @@ const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limi
|
|
|
1815
1815
|
className: className,
|
|
1816
1816
|
children: [
|
|
1817
1817
|
"Displaying",
|
|
1818
|
-
|
|
1818
|
+
" ",
|
|
1819
1819
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1820
1820
|
className: "ds-u-font-weight--bold",
|
|
1821
1821
|
children: `${startTotal().toLocaleString()} - ${ofTotal().toLocaleString()}`
|
|
1822
1822
|
}),
|
|
1823
|
-
|
|
1823
|
+
" ",
|
|
1824
1824
|
"of ",
|
|
1825
1825
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1826
1826
|
className: "ds-u-font-weight--bold",
|
|
1827
1827
|
children: `${numTotalRows.toLocaleString()}`
|
|
1828
1828
|
}),
|
|
1829
|
-
|
|
1829
|
+
" ",
|
|
1830
1830
|
"rows"
|
|
1831
1831
|
]
|
|
1832
1832
|
});
|
|
@@ -1852,16 +1852,16 @@ const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePaddi
|
|
|
1852
1852
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
1853
1853
|
options: [
|
|
1854
1854
|
{
|
|
1855
|
-
label:
|
|
1856
|
-
value:
|
|
1855
|
+
label: "Tight",
|
|
1856
|
+
value: "ds-u-padding-y--0"
|
|
1857
1857
|
},
|
|
1858
1858
|
{
|
|
1859
|
-
label:
|
|
1860
|
-
value:
|
|
1859
|
+
label: "Normal",
|
|
1860
|
+
value: "ds-u-padding-y--1"
|
|
1861
1861
|
},
|
|
1862
1862
|
{
|
|
1863
|
-
label:
|
|
1864
|
-
value:
|
|
1863
|
+
label: "Expanded",
|
|
1864
|
+
value: "ds-u-padding-y--2"
|
|
1865
1865
|
}
|
|
1866
1866
|
],
|
|
1867
1867
|
label: "Display density:",
|
|
@@ -2104,7 +2104,7 @@ function $aa4450dcbeef3ac0$export$385a5aba38cc3325(sortArray) {
|
|
|
2104
2104
|
sortArray.forEach((s)=>{
|
|
2105
2105
|
return newQuery.push({
|
|
2106
2106
|
property: s.id,
|
|
2107
|
-
order: s.desc ?
|
|
2107
|
+
order: s.desc ? "desc" : "asc"
|
|
2108
2108
|
});
|
|
2109
2109
|
});
|
|
2110
2110
|
return newQuery;
|
|
@@ -2142,46 +2142,46 @@ function $7264a673914aa746$export$e284ae5d89467c8f(date) {
|
|
|
2142
2142
|
}
|
|
2143
2143
|
function $7264a673914aa746$export$6b5e57d20078142b(value, operator) {
|
|
2144
2144
|
let newValue = value;
|
|
2145
|
-
if (Array.isArray(newValue)) newValue = newValue.join(
|
|
2145
|
+
if (Array.isArray(newValue)) newValue = newValue.join(",");
|
|
2146
2146
|
// return newValue.replace(/(^\%+|\%+$)/gm, '');
|
|
2147
2147
|
return newValue;
|
|
2148
2148
|
}
|
|
2149
2149
|
const $7264a673914aa746$export$5f89a5ae87bc48e1 = [
|
|
2150
2150
|
{
|
|
2151
|
-
label:
|
|
2152
|
-
value:
|
|
2151
|
+
label: "Is",
|
|
2152
|
+
value: "="
|
|
2153
2153
|
},
|
|
2154
2154
|
{
|
|
2155
|
-
label:
|
|
2156
|
-
value:
|
|
2155
|
+
label: "Starts With",
|
|
2156
|
+
value: "starts with"
|
|
2157
2157
|
},
|
|
2158
2158
|
{
|
|
2159
|
-
label:
|
|
2160
|
-
value:
|
|
2159
|
+
label: "Contains",
|
|
2160
|
+
value: "contains"
|
|
2161
2161
|
},
|
|
2162
2162
|
{
|
|
2163
|
-
label:
|
|
2164
|
-
value:
|
|
2163
|
+
label: "Is Not",
|
|
2164
|
+
value: "<>"
|
|
2165
2165
|
},
|
|
2166
2166
|
{
|
|
2167
|
-
label:
|
|
2168
|
-
value:
|
|
2167
|
+
label: "Or",
|
|
2168
|
+
value: "in"
|
|
2169
2169
|
},
|
|
2170
2170
|
{
|
|
2171
|
-
label:
|
|
2172
|
-
value:
|
|
2171
|
+
label: "Is",
|
|
2172
|
+
value: "="
|
|
2173
2173
|
},
|
|
2174
2174
|
{
|
|
2175
|
-
label:
|
|
2176
|
-
value:
|
|
2175
|
+
label: "Is Not",
|
|
2176
|
+
value: "<>"
|
|
2177
2177
|
},
|
|
2178
2178
|
{
|
|
2179
|
-
label:
|
|
2180
|
-
value:
|
|
2179
|
+
label: "Greater Than",
|
|
2180
|
+
value: ">"
|
|
2181
2181
|
},
|
|
2182
2182
|
{
|
|
2183
|
-
label:
|
|
2184
|
-
value:
|
|
2183
|
+
label: "Less Than",
|
|
2184
|
+
value: "<"
|
|
2185
2185
|
}
|
|
2186
2186
|
];
|
|
2187
2187
|
function $7264a673914aa746$export$d243819c3ad678fb(operatorValue) {
|
|
@@ -2190,59 +2190,59 @@ function $7264a673914aa746$export$d243819c3ad678fb(operatorValue) {
|
|
|
2190
2190
|
}
|
|
2191
2191
|
function $7264a673914aa746$export$2b9377795161999(type) {
|
|
2192
2192
|
switch(type){
|
|
2193
|
-
case
|
|
2194
|
-
case
|
|
2193
|
+
case "text":
|
|
2194
|
+
case "string":
|
|
2195
2195
|
return [
|
|
2196
2196
|
{
|
|
2197
|
-
label:
|
|
2198
|
-
value:
|
|
2197
|
+
label: "Is",
|
|
2198
|
+
value: "="
|
|
2199
2199
|
},
|
|
2200
2200
|
{
|
|
2201
|
-
label:
|
|
2202
|
-
value:
|
|
2201
|
+
label: "Starts With",
|
|
2202
|
+
value: "starts with"
|
|
2203
2203
|
},
|
|
2204
2204
|
{
|
|
2205
|
-
label:
|
|
2206
|
-
value:
|
|
2205
|
+
label: "Contains",
|
|
2206
|
+
value: "contains"
|
|
2207
2207
|
},
|
|
2208
2208
|
{
|
|
2209
|
-
label:
|
|
2210
|
-
value:
|
|
2209
|
+
label: "Is Not",
|
|
2210
|
+
value: "<>"
|
|
2211
2211
|
},
|
|
2212
2212
|
{
|
|
2213
|
-
label:
|
|
2214
|
-
value:
|
|
2213
|
+
label: "Or",
|
|
2214
|
+
value: "in"
|
|
2215
2215
|
}
|
|
2216
2216
|
];
|
|
2217
|
-
case
|
|
2217
|
+
case "date":
|
|
2218
2218
|
return [
|
|
2219
2219
|
{
|
|
2220
|
-
label:
|
|
2221
|
-
value:
|
|
2220
|
+
label: "Is",
|
|
2221
|
+
value: "="
|
|
2222
2222
|
},
|
|
2223
2223
|
{
|
|
2224
|
-
label:
|
|
2225
|
-
value:
|
|
2224
|
+
label: "Is Not",
|
|
2225
|
+
value: "<>"
|
|
2226
2226
|
},
|
|
2227
2227
|
{
|
|
2228
|
-
label:
|
|
2229
|
-
value:
|
|
2228
|
+
label: "Greater Than",
|
|
2229
|
+
value: ">"
|
|
2230
2230
|
},
|
|
2231
2231
|
{
|
|
2232
|
-
label:
|
|
2233
|
-
value:
|
|
2232
|
+
label: "Less Than",
|
|
2233
|
+
value: "<"
|
|
2234
2234
|
}
|
|
2235
2235
|
];
|
|
2236
2236
|
default:
|
|
2237
2237
|
// These 2 should be safe for all data types
|
|
2238
2238
|
return [
|
|
2239
2239
|
{
|
|
2240
|
-
label:
|
|
2241
|
-
value:
|
|
2240
|
+
label: "Is",
|
|
2241
|
+
value: "="
|
|
2242
2242
|
},
|
|
2243
2243
|
{
|
|
2244
|
-
label:
|
|
2245
|
-
value:
|
|
2244
|
+
label: "Is Not",
|
|
2245
|
+
value: "<>"
|
|
2246
2246
|
}
|
|
2247
2247
|
];
|
|
2248
2248
|
}
|
|
@@ -2258,15 +2258,19 @@ function $7264a673914aa746$export$2b9377795161999(type) {
|
|
|
2258
2258
|
|
|
2259
2259
|
|
|
2260
2260
|
|
|
2261
|
-
const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: header, sortElement: sortElement, setAriaLiveFeedback: setAriaLiveFeedback })=>{
|
|
2262
|
-
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)(
|
|
2261
|
+
const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: header, sortElement: sortElement, setAriaLiveFeedback: setAriaLiveFeedback, id: id })=>{
|
|
2262
|
+
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)("");
|
|
2263
|
+
// Fix for JSX in Data Dictionary Title header cell
|
|
2264
|
+
const ariaLabel = header.id === "titleResizable" ? "Title" : header.column.columnDef.header;
|
|
2263
2265
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("th", {
|
|
2264
2266
|
key: header.id,
|
|
2265
2267
|
style: {
|
|
2266
2268
|
width: header.getSize()
|
|
2267
2269
|
},
|
|
2268
|
-
|
|
2270
|
+
id: id,
|
|
2271
|
+
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : "",
|
|
2269
2272
|
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
|
|
2273
|
+
"aria-sort": header.column.getIsSorted() === "asc" ? "ascending" : header.column.getIsSorted() === "desc" ? "descending" : "none",
|
|
2270
2274
|
children: [
|
|
2271
2275
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2272
2276
|
className: "ds-u-display--flex",
|
|
@@ -2278,26 +2282,26 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2278
2282
|
}),
|
|
2279
2283
|
sortElement && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2280
2284
|
onClick: header.column.getToggleSortingHandler(),
|
|
2281
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
2282
|
-
"aria-label": `${
|
|
2285
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : "",
|
|
2286
|
+
"aria-label": `${ariaLabel} sort order`
|
|
2283
2287
|
})
|
|
2284
2288
|
]
|
|
2285
2289
|
}),
|
|
2286
2290
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2287
2291
|
onMouseDown: header.getResizeHandler(),
|
|
2288
2292
|
onTouchStart: header.getResizeHandler(),
|
|
2289
|
-
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ?
|
|
2290
|
-
"aria-label": `Resize ${
|
|
2293
|
+
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ? "isResizing" : ""}`,
|
|
2294
|
+
"aria-label": `Resize ${ariaLabel} column`,
|
|
2291
2295
|
onKeyDown: (e)=>{
|
|
2292
2296
|
const columnSizingObject = table.getState().columnSizing;
|
|
2293
2297
|
switch(e.key){
|
|
2294
|
-
case
|
|
2295
|
-
case
|
|
2298
|
+
case "Enter":
|
|
2299
|
+
case " ":
|
|
2296
2300
|
e.preventDefault();
|
|
2297
2301
|
e.stopPropagation();
|
|
2298
2302
|
if (columnResizing) {
|
|
2299
2303
|
// end resizing
|
|
2300
|
-
setColumnResizing(
|
|
2304
|
+
setColumnResizing("");
|
|
2301
2305
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2302
2306
|
} else {
|
|
2303
2307
|
// start resizing
|
|
@@ -2305,13 +2309,13 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2305
2309
|
setAriaLiveFeedback(`${header.column.columnDef.header} grabbed.`);
|
|
2306
2310
|
}
|
|
2307
2311
|
break;
|
|
2308
|
-
case
|
|
2312
|
+
case "Escape":
|
|
2309
2313
|
if (columnResizing) {
|
|
2310
|
-
setColumnResizing(
|
|
2314
|
+
setColumnResizing("");
|
|
2311
2315
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2312
2316
|
}
|
|
2313
2317
|
break;
|
|
2314
|
-
case
|
|
2318
|
+
case "ArrowRight":
|
|
2315
2319
|
e.preventDefault();
|
|
2316
2320
|
e.stopPropagation();
|
|
2317
2321
|
if (columnResizing) {
|
|
@@ -2320,7 +2324,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2320
2324
|
setAriaLiveFeedback(`${header.column.columnDef.header} has been resized. The new width is ${header.getSize()} pixels.`);
|
|
2321
2325
|
}
|
|
2322
2326
|
break;
|
|
2323
|
-
case
|
|
2327
|
+
case "ArrowLeft":
|
|
2324
2328
|
e.preventDefault();
|
|
2325
2329
|
e.stopPropagation();
|
|
2326
2330
|
if (columnResizing) {
|
|
@@ -2332,7 +2336,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2332
2336
|
}
|
|
2333
2337
|
},
|
|
2334
2338
|
onBlur: ()=>{
|
|
2335
|
-
setColumnResizing(
|
|
2339
|
+
setColumnResizing("");
|
|
2336
2340
|
}
|
|
2337
2341
|
})
|
|
2338
2342
|
]
|
|
@@ -2373,6 +2377,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2373
2377
|
},
|
|
2374
2378
|
title: header.column.columnDef.header,
|
|
2375
2379
|
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
|
|
2380
|
+
"aria-sort": header.column.getIsSorted() === "asc" ? "ascending" : header.column.getIsSorted() === "desc" ? "descending" : "none",
|
|
2376
2381
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2377
2382
|
onClick: header.column.getToggleSortingHandler(),
|
|
2378
2383
|
className: "ds-u-display--flex",
|
|
@@ -2381,7 +2386,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2381
2386
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
2382
2387
|
}),
|
|
2383
2388
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2384
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` :
|
|
2389
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` : ""
|
|
2385
2390
|
})
|
|
2386
2391
|
]
|
|
2387
2392
|
})
|
|
@@ -2412,7 +2417,7 @@ const $ee0d4d4f34048447$var$DataTableActionsContextDefaults = {
|
|
|
2412
2417
|
setColumnVisibility: ()=>{},
|
|
2413
2418
|
page: 1,
|
|
2414
2419
|
setPage: ()=>{},
|
|
2415
|
-
tableDensity:
|
|
2420
|
+
tableDensity: "normal",
|
|
2416
2421
|
setTableDensity: ()=>{}
|
|
2417
2422
|
};
|
|
2418
2423
|
const $ee0d4d4f34048447$export$f814ea079e65d8fe = /*#__PURE__*/ (0, $hgUW1$createContext)($ee0d4d4f34048447$var$DataTableActionsContextDefaults);
|
|
@@ -2431,7 +2436,7 @@ const $ee0d4d4f34048447$var$DataTableActionsProvider = ({ children: children })=
|
|
|
2431
2436
|
if (datasetTableControls && localStorageData) return localStorageData.tableColumnVisibility;
|
|
2432
2437
|
else return {};
|
|
2433
2438
|
});
|
|
2434
|
-
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)(
|
|
2439
|
+
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)("normal");
|
|
2435
2440
|
const providerValue = {
|
|
2436
2441
|
columnOrder: columnOrder,
|
|
2437
2442
|
setColumnOrder: setColumnOrder,
|
|
@@ -2478,9 +2483,9 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2478
2483
|
transition: transition,
|
|
2479
2484
|
opacity: isDragging ? 0.7 : 1,
|
|
2480
2485
|
zIndex: isDragging ? 1 : 0,
|
|
2481
|
-
position:
|
|
2482
|
-
background:
|
|
2483
|
-
touchAction:
|
|
2486
|
+
position: "relative",
|
|
2487
|
+
background: "white",
|
|
2488
|
+
touchAction: "none"
|
|
2484
2489
|
};
|
|
2485
2490
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
2486
2491
|
className: "ds-u-display--flex ds-u-justify-content--between ds-u-border-bottom--1",
|
|
@@ -2496,7 +2501,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2496
2501
|
// this code forces the repaint without user interaction
|
|
2497
2502
|
const target = e.target;
|
|
2498
2503
|
if (isDragging && target.tagName.toLowerCase() === "label") setTimeout(()=>{
|
|
2499
|
-
target.parentNode.querySelector(
|
|
2504
|
+
target.parentNode.querySelector("input").checked = visible;
|
|
2500
2505
|
}, 1);
|
|
2501
2506
|
},
|
|
2502
2507
|
children: [
|
|
@@ -2513,7 +2518,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2513
2518
|
}
|
|
2514
2519
|
}),
|
|
2515
2520
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2516
|
-
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging &&
|
|
2521
|
+
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && "grabbed"}`,
|
|
2517
2522
|
"aria-label": `Reorder ${id} column`,
|
|
2518
2523
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2519
2524
|
className: "fa fa-sort"
|
|
@@ -2531,7 +2536,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor extends (0, $hgUW1$Key
|
|
|
2531
2536
|
// Custom function to exclude checkbox from keyboard dragging
|
|
2532
2537
|
static activators = [
|
|
2533
2538
|
{
|
|
2534
|
-
eventName:
|
|
2539
|
+
eventName: "onKeyDown",
|
|
2535
2540
|
handler: ({ nativeEvent: event })=>{
|
|
2536
2541
|
// prevent scrolling the list
|
|
2537
2542
|
const isCheckbox = [
|
|
@@ -2554,7 +2559,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$Poin
|
|
|
2554
2559
|
// Custom function to stop accidental checkbox clicks on pointer activation
|
|
2555
2560
|
static activators = [
|
|
2556
2561
|
{
|
|
2557
|
-
eventName:
|
|
2562
|
+
eventName: "onPointerDown",
|
|
2558
2563
|
handler: ({ nativeEvent: event })=>{
|
|
2559
2564
|
if (event.target.tagName.toLowerCase() === "input") return false;
|
|
2560
2565
|
if (event.target.tagName.toLowerCase() === "label") event.target.blur();
|
|
@@ -2652,13 +2657,13 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
2652
2657
|
className: "dkan-dataset-toolbar-button-label",
|
|
2653
2658
|
children: "Manage Columns"
|
|
2654
2659
|
}),
|
|
2655
|
-
hiddenColumns ? ` (${hiddenColumns})` :
|
|
2660
|
+
hiddenColumns ? ` (${hiddenColumns})` : ""
|
|
2656
2661
|
]
|
|
2657
2662
|
})
|
|
2658
2663
|
]
|
|
2659
2664
|
}),
|
|
2660
2665
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2661
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2666
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
2662
2667
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
|
|
2663
2668
|
heading: "Manage columns",
|
|
2664
2669
|
isOpen: modalOpen,
|
|
@@ -2831,12 +2836,12 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
2831
2836
|
if (Object.keys(resource).length && columns.length && resource.schema && Object.keys(distribution).length) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
2832
2837
|
children: [
|
|
2833
2838
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2834
|
-
className: isModal ?
|
|
2839
|
+
className: isModal ? "dkan-datatable-fullscreen-mode" : "",
|
|
2835
2840
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
|
|
2836
2841
|
canResize: true,
|
|
2837
2842
|
columns: columns,
|
|
2838
2843
|
sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
|
|
2839
|
-
tablePadding: tableDensity ===
|
|
2844
|
+
tablePadding: tableDensity === "normal" ? "ds-u-padding-y--2" : tableDensity === "compact" ? "ds-u-padding-y--1" : "ds-u-padding-y--3",
|
|
2840
2845
|
loading: resource.loading,
|
|
2841
2846
|
isModal: isModal,
|
|
2842
2847
|
downloadURL: downloadURL,
|
|
@@ -2851,14 +2856,14 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
2851
2856
|
}),
|
|
2852
2857
|
!resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2853
2858
|
className: [
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
isModal &&
|
|
2861
|
-
].filter(Boolean).join(
|
|
2859
|
+
"ds-u-display--flex",
|
|
2860
|
+
"ds-u-flex-wrap--wrap",
|
|
2861
|
+
"ds-u-justify-content--end",
|
|
2862
|
+
"ds-u-md-justify-content--between",
|
|
2863
|
+
"ds-u-margin-top--2",
|
|
2864
|
+
"ds-u-align-items--center",
|
|
2865
|
+
isModal && "ds-u-margin-bottom--2"
|
|
2866
|
+
].filter(Boolean).join(" "),
|
|
2862
2867
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
2863
2868
|
totalPages: Math.ceil(resource.count ? resource.count / pageSize : 1),
|
|
2864
2869
|
currentPage: Number(page),
|
|
@@ -2897,7 +2902,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
2897
2902
|
},
|
|
2898
2903
|
children: [
|
|
2899
2904
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2900
|
-
className: `far ${modalOpen ?
|
|
2905
|
+
className: `far ${modalOpen ? "fa-compress" : "fa-expand"} ds-u-margin-right--1`
|
|
2901
2906
|
}),
|
|
2902
2907
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2903
2908
|
className: "dkan-dataset-toolbar-button-label",
|
|
@@ -2906,7 +2911,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
2906
2911
|
]
|
|
2907
2912
|
}),
|
|
2908
2913
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2909
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2914
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
2910
2915
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
2911
2916
|
heading: "Dataset Explorer",
|
|
2912
2917
|
isOpen: modalOpen,
|
|
@@ -2941,13 +2946,13 @@ var $16bd41951b91f02d$export$2e2bcd8739ae039 = $16bd41951b91f02d$var$FullScreenD
|
|
|
2941
2946
|
|
|
2942
2947
|
|
|
2943
2948
|
function $eadd6431fddf4b6c$var$getStartDate(condition, schema, id) {
|
|
2944
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2949
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
2945
2950
|
const newDate = new Date(condition.value.toString());
|
|
2946
2951
|
if (newDate instanceof Date && !isNaN(newDate.getTime())) return newDate;
|
|
2947
2952
|
}
|
|
2948
2953
|
return new Date();
|
|
2949
2954
|
}
|
|
2950
|
-
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className =
|
|
2955
|
+
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className = "" })=>{
|
|
2951
2956
|
const [operator, setOperator] = (0, $hgUW1$useState)(condition.operator);
|
|
2952
2957
|
const [property, setProperty] = (0, $hgUW1$useState)(condition.property);
|
|
2953
2958
|
const [value, setValue] = (0, $hgUW1$useState)(condition.value);
|
|
@@ -2957,9 +2962,9 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
2957
2962
|
});
|
|
2958
2963
|
(0, $hgUW1$useEffect)(()=>{
|
|
2959
2964
|
if (property !== condition.property) {
|
|
2960
|
-
if (property) update(index,
|
|
2961
|
-
else update(index,
|
|
2962
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2965
|
+
if (property) update(index, "property", property);
|
|
2966
|
+
else update(index, "property", "");
|
|
2967
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
2963
2968
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
2964
2969
|
}
|
|
2965
2970
|
}
|
|
@@ -2973,22 +2978,22 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
2973
2978
|
]);
|
|
2974
2979
|
(0, $hgUW1$useEffect)(()=>{
|
|
2975
2980
|
if (operator !== condition.operator) {
|
|
2976
|
-
if (operator) update(index,
|
|
2977
|
-
else update(index,
|
|
2981
|
+
if (operator) update(index, "operator", operator);
|
|
2982
|
+
else update(index, "operator", "");
|
|
2978
2983
|
}
|
|
2979
2984
|
}, [
|
|
2980
2985
|
operator
|
|
2981
2986
|
]);
|
|
2982
2987
|
(0, $hgUW1$useEffect)(()=>{
|
|
2983
2988
|
if (value !== condition.value) {
|
|
2984
|
-
if (value) update(index,
|
|
2985
|
-
else update(index,
|
|
2989
|
+
if (value) update(index, "value", value);
|
|
2990
|
+
else update(index, "value", "");
|
|
2986
2991
|
}
|
|
2987
2992
|
}, [
|
|
2988
2993
|
value
|
|
2989
2994
|
]);
|
|
2990
2995
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("fieldset", {
|
|
2991
|
-
className: `dkan-filter-dataset-control ds-u-padding-x--2 ds-u-md-padding-x--3 ds-u-padding-y--1 ds-u-margin-top--05${className !==
|
|
2996
|
+
className: `dkan-filter-dataset-control ds-u-padding-x--2 ds-u-md-padding-x--3 ds-u-padding-y--1 ds-u-margin-top--05${className !== "" ? ` ${className}` : ""}`,
|
|
2992
2997
|
children: [
|
|
2993
2998
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
2994
2999
|
options: propertyOptions,
|
|
@@ -3006,7 +3011,7 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
3006
3011
|
name: `${condition.key}_operator`,
|
|
3007
3012
|
onChange: (e)=>setOperator(e.target.value)
|
|
3008
3013
|
}),
|
|
3009
|
-
schema[id].fields[property].mysql_type ===
|
|
3014
|
+
schema[id].fields[property].mysql_type === "date" ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
3010
3015
|
children: [
|
|
3011
3016
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
3012
3017
|
className: "ds-c-label",
|
|
@@ -3059,15 +3064,15 @@ var $eadd6431fddf4b6c$export$2e2bcd8739ae039 = $eadd6431fddf4b6c$var$FilterItem;
|
|
|
3059
3064
|
|
|
3060
3065
|
|
|
3061
3066
|
|
|
3062
|
-
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className =
|
|
3067
|
+
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className = "" })=>{
|
|
3063
3068
|
const small = (0, $hgUW1$useMediaQuery)({
|
|
3064
3069
|
minWidth: 0,
|
|
3065
3070
|
maxWidth: 544
|
|
3066
3071
|
});
|
|
3067
3072
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
3068
3073
|
disabled: disabled,
|
|
3069
|
-
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ?
|
|
3070
|
-
variation: small ?
|
|
3074
|
+
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ? "" : " ds-u-float--right ds-l-md-col--6 ds-l-col--5"}${className !== "" ? ` ${className}` : ""}`,
|
|
3075
|
+
variation: small ? "ghost" : undefined,
|
|
3071
3076
|
onClick: ()=>clearFiltersFn(),
|
|
3072
3077
|
children: "Reset"
|
|
3073
3078
|
});
|
|
@@ -3079,19 +3084,19 @@ var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFilter
|
|
|
3079
3084
|
function $6f4318b1e14124e5$var$updateQueryForDatastore(condition) {
|
|
3080
3085
|
let cond = condition;
|
|
3081
3086
|
delete cond.key;
|
|
3082
|
-
if (cond.operator ===
|
|
3087
|
+
if (cond.operator === "=" || cond.operator === "<>") {
|
|
3083
3088
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3084
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3089
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
3085
3090
|
}
|
|
3086
|
-
if (cond.operator.toLowerCase() ===
|
|
3091
|
+
if (cond.operator.toLowerCase() === "like") {
|
|
3087
3092
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3088
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3093
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
3089
3094
|
cond.value = `%${cleanedValue}%`;
|
|
3090
3095
|
}
|
|
3091
|
-
if (cond.operator.toLowerCase() ===
|
|
3092
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
3096
|
+
if (cond.operator.toLowerCase() === "in") {
|
|
3097
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(",");
|
|
3093
3098
|
}
|
|
3094
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
3099
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
|
|
3095
3100
|
return cond;
|
|
3096
3101
|
}
|
|
3097
3102
|
const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
@@ -3117,7 +3122,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3117
3122
|
} else setQueryConditions([
|
|
3118
3123
|
{
|
|
3119
3124
|
property: fields[0],
|
|
3120
|
-
value:
|
|
3125
|
+
value: "",
|
|
3121
3126
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3122
3127
|
key: Date.now().toString()
|
|
3123
3128
|
}
|
|
@@ -3134,7 +3139,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3134
3139
|
...queryConditions,
|
|
3135
3140
|
{
|
|
3136
3141
|
property: fields[0],
|
|
3137
|
-
value:
|
|
3142
|
+
value: "",
|
|
3138
3143
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3139
3144
|
key: Date.now().toString()
|
|
3140
3145
|
}
|
|
@@ -3165,7 +3170,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3165
3170
|
encodeValuesOnly: true,
|
|
3166
3171
|
addQueryPrefix: true
|
|
3167
3172
|
});
|
|
3168
|
-
window.history.pushState({},
|
|
3173
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
3169
3174
|
};
|
|
3170
3175
|
const submitConditions = ()=>{
|
|
3171
3176
|
// only update the data conditions when "Apply filters" is pressed
|
|
@@ -3239,7 +3244,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3239
3244
|
children: [
|
|
3240
3245
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3241
3246
|
className: "dkan-dataset-toolbar-button-label",
|
|
3242
|
-
children: conditions.length > 0 ? `Edit Filters` :
|
|
3247
|
+
children: conditions.length > 0 ? `Edit Filters` : "Filter Dataset"
|
|
3243
3248
|
}),
|
|
3244
3249
|
conditions.length > 0 && ` (${conditions.length})`
|
|
3245
3250
|
]
|
|
@@ -3247,7 +3252,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3247
3252
|
]
|
|
3248
3253
|
}),
|
|
3249
3254
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3250
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
3255
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
3251
3256
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
3252
3257
|
heading: "Filter Dataset",
|
|
3253
3258
|
isOpen: modalOpen,
|
|
@@ -3273,7 +3278,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3273
3278
|
className: "dkan-apply-dataset-filters-button ds-u-float--right ds-l-md-col--auto ds-l-col--auto",
|
|
3274
3279
|
onClick: submitConditions,
|
|
3275
3280
|
variation: "solid",
|
|
3276
|
-
children: `Apply ${conditionsReadyToSubmit(queryConditions).length ||
|
|
3281
|
+
children: `Apply ${conditionsReadyToSubmit(queryConditions).length || ""} filter${conditionsReadyToSubmit(queryConditions).length === 1 ? "" : "s"}`
|
|
3277
3282
|
})
|
|
3278
3283
|
]
|
|
3279
3284
|
})
|
|
@@ -3412,9 +3417,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3412
3417
|
className: "ds-u-display--flex ds-u-align-items--start",
|
|
3413
3418
|
children: [
|
|
3414
3419
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3415
|
-
onClick: ()=>setTableDensity(
|
|
3420
|
+
onClick: ()=>setTableDensity("expanded"),
|
|
3416
3421
|
"aria-label": "Row height, Expanded",
|
|
3417
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3422
|
+
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === "expanded" ? "active ds-u-fill--primary-lightest" : ""}`,
|
|
3418
3423
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3419
3424
|
className: "ds-u-display--block",
|
|
3420
3425
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3433,9 +3438,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3433
3438
|
})
|
|
3434
3439
|
}),
|
|
3435
3440
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3436
|
-
onClick: ()=>setTableDensity(
|
|
3441
|
+
onClick: ()=>setTableDensity("normal"),
|
|
3437
3442
|
"aria-label": "Row height, Normal",
|
|
3438
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3443
|
+
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === "normal" ? "active ds-u-fill--primary-lightest" : ""}`,
|
|
3439
3444
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3440
3445
|
className: "ds-u-display--block",
|
|
3441
3446
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3454,9 +3459,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3454
3459
|
})
|
|
3455
3460
|
}),
|
|
3456
3461
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3457
|
-
onClick: ()=>setTableDensity(
|
|
3462
|
+
onClick: ()=>setTableDensity("compact"),
|
|
3458
3463
|
"aria-label": "Row height, Compact",
|
|
3459
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3464
|
+
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === "compact" ? "active ds-u-fill--primary-lightest " : ""}`,
|
|
3460
3465
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3461
3466
|
className: "ds-u-display--block",
|
|
3462
3467
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3541,7 +3546,7 @@ const $85f8ff1ff89899c7$var$updateBrowserURL = (newConditions)=>{
|
|
|
3541
3546
|
encodeValuesOnly: true,
|
|
3542
3547
|
addQueryPrefix: true
|
|
3543
3548
|
});
|
|
3544
|
-
window.history.pushState({},
|
|
3549
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
3545
3550
|
};
|
|
3546
3551
|
const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, columns: columns, defaultColumnOrder: defaultColumnOrder, isModal: isModal, datasetTableControls: datasetTableControls, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility })=>{
|
|
3547
3552
|
const { limit: limit, offset: offset, count: count, conditions: conditions, setConditions: setConditions } = resource;
|
|
@@ -3627,7 +3632,7 @@ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, co
|
|
|
3627
3632
|
}, index)) : null,
|
|
3628
3633
|
hiddenColumns > 0 ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $c5b172e8d1a8197c$export$2e2bcd8739ae039), {
|
|
3629
3634
|
iconClass: "fa fa-columns",
|
|
3630
|
-
text: `${hiddenColumns} Column${hiddenColumns === 1 ?
|
|
3635
|
+
text: `${hiddenColumns} Column${hiddenColumns === 1 ? "" : "s"} Hidden`,
|
|
3631
3636
|
onClick: ()=>{
|
|
3632
3637
|
resetColumnVisibility();
|
|
3633
3638
|
}
|
|
@@ -3662,7 +3667,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3662
3667
|
const { conditions: conditions } = resource;
|
|
3663
3668
|
const data = resource.values;
|
|
3664
3669
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
3665
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
3670
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)("");
|
|
3666
3671
|
const dataTableWrapperElement = (0, $hgUW1$useRef)(null);
|
|
3667
3672
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
3668
3673
|
const table_columns = columns.map((col)=>{
|
|
@@ -3681,9 +3686,9 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3681
3686
|
columnOrder
|
|
3682
3687
|
]);
|
|
3683
3688
|
const sortElement = (isSorted, onClickFn)=>{
|
|
3684
|
-
if (isSorted ===
|
|
3685
|
-
if (isSorted ===
|
|
3686
|
-
return
|
|
3689
|
+
if (isSorted === "asc") return "dc-c-sort--asc";
|
|
3690
|
+
if (isSorted === "desc") return "dc-c-sort--desc";
|
|
3691
|
+
return "dc-c-sort--default";
|
|
3687
3692
|
};
|
|
3688
3693
|
const filters = [];
|
|
3689
3694
|
const table = (0, $hgUW1$useReactTable)({
|
|
@@ -3695,7 +3700,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3695
3700
|
columnVisibility: columnVisibility,
|
|
3696
3701
|
sorting: sorting
|
|
3697
3702
|
},
|
|
3698
|
-
columnResizeMode:
|
|
3703
|
+
columnResizeMode: "onChange",
|
|
3699
3704
|
onSortingChange: setSorting,
|
|
3700
3705
|
onColumnOrderChange: setColumnOrder,
|
|
3701
3706
|
onColumnVisibilityChange: setColumnVisibility,
|
|
@@ -3712,7 +3717,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3712
3717
|
const defaultColumnOrder = (0, $hgUW1$useMemo)(()=>table_columns.map((column)=>column.accessorKey), []);
|
|
3713
3718
|
const tableWrapperWidth = ()=>{
|
|
3714
3719
|
if (dataTableWrapperElement.current) return dataTableWrapperElement.current.offsetWidth;
|
|
3715
|
-
return
|
|
3720
|
+
return "auto";
|
|
3716
3721
|
};
|
|
3717
3722
|
(0, $hgUW1$useEffect)(()=>{
|
|
3718
3723
|
setHighlightRow(null);
|
|
@@ -3942,7 +3947,7 @@ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, a
|
|
|
3942
3947
|
},
|
|
3943
3948
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3944
3949
|
name: accessor,
|
|
3945
|
-
value: filterValue ||
|
|
3950
|
+
value: filterValue || ""
|
|
3946
3951
|
});
|
|
3947
3952
|
}
|
|
3948
3953
|
const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true })=>{
|
|
@@ -4018,7 +4023,7 @@ const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage, pageTrail:
|
|
|
4018
4023
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4019
4024
|
children: currentPage
|
|
4020
4025
|
})
|
|
4021
|
-
}) :
|
|
4026
|
+
}) : ""
|
|
4022
4027
|
]
|
|
4023
4028
|
})
|
|
4024
4029
|
});
|
|
@@ -4075,11 +4080,11 @@ var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRigh
|
|
|
4075
4080
|
|
|
4076
4081
|
|
|
4077
4082
|
|
|
4078
|
-
const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder =
|
|
4083
|
+
const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = "Search the Data", showMagnifyingGlass: showMagnifyingGlass, showSearchButton: showSearchButton, onDark: onDark, onChange: onChange, onSubmit: onSubmit, onKeyDown: onKeyDown, defaultValue: defaultValue = "" })=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4079
4084
|
className: "search-input-container",
|
|
4080
4085
|
children: [
|
|
4081
4086
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4082
|
-
className: `${showMagnifyingGlass ?
|
|
4087
|
+
className: `${showMagnifyingGlass ? "left-padding" : ""} ${showSearchButton ? "right-padding" : ""}`,
|
|
4083
4088
|
label: placeholder,
|
|
4084
4089
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4085
4090
|
placeholder: placeholder,
|
|
@@ -4094,7 +4099,7 @@ const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = 'Search
|
|
|
4094
4099
|
}),
|
|
4095
4100
|
showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
4096
4101
|
variation: "solid",
|
|
4097
|
-
className: onDark &&
|
|
4102
|
+
className: onDark && "on-dark",
|
|
4098
4103
|
onClick: onSubmit,
|
|
4099
4104
|
children: [
|
|
4100
4105
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4213,7 +4218,7 @@ const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: roo
|
|
|
4213
4218
|
url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4214
4219
|
addQueryPrefix: true
|
|
4215
4220
|
})}`,
|
|
4216
|
-
docExpansion:
|
|
4221
|
+
docExpansion: "list",
|
|
4217
4222
|
defaultModelsExpandDepth: -1,
|
|
4218
4223
|
plugins: [
|
|
4219
4224
|
(0, $hgUW1$SpanOpenAPIVersion),
|
|
@@ -4321,7 +4326,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4321
4326
|
size: "big",
|
|
4322
4327
|
type: "submit",
|
|
4323
4328
|
style: {
|
|
4324
|
-
width:
|
|
4329
|
+
width: "70px"
|
|
4325
4330
|
},
|
|
4326
4331
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4327
4332
|
className: "fas fa-search small-text"
|
|
@@ -4338,7 +4343,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4338
4343
|
className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
|
|
4339
4344
|
children: [
|
|
4340
4345
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4341
|
-
children: text ? text :
|
|
4346
|
+
children: text ? text : "Search"
|
|
4342
4347
|
}),
|
|
4343
4348
|
` `,
|
|
4344
4349
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4423,12 +4428,12 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
4423
4428
|
fulltext: fulltext ? fulltext : undefined,
|
|
4424
4429
|
...selectedFacets,
|
|
4425
4430
|
sort: sort ? sort : undefined,
|
|
4426
|
-
[
|
|
4431
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4427
4432
|
page: page !== 1 ? page : undefined,
|
|
4428
|
-
[
|
|
4433
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4429
4434
|
};
|
|
4430
4435
|
return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4431
|
-
arrayFormat:
|
|
4436
|
+
arrayFormat: "comma",
|
|
4432
4437
|
encode: false
|
|
4433
4438
|
})}`);
|
|
4434
4439
|
}
|
|
@@ -4439,26 +4444,26 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
4439
4444
|
|
|
4440
4445
|
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
4441
4446
|
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4442
|
-
defaultSort:
|
|
4443
|
-
defaultOrder:
|
|
4444
|
-
}, pageTitle: pageTitle =
|
|
4447
|
+
defaultSort: "modified",
|
|
4448
|
+
defaultOrder: "desc"
|
|
4449
|
+
}, pageTitle: pageTitle = "Dataset Explorer", filterTitle: filterTitle = "Tags", showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = "", showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
4445
4450
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4446
4451
|
const sortOptions = [
|
|
4447
4452
|
{
|
|
4448
|
-
label:
|
|
4449
|
-
value:
|
|
4453
|
+
label: "Newest",
|
|
4454
|
+
value: "newest"
|
|
4450
4455
|
},
|
|
4451
4456
|
{
|
|
4452
|
-
label:
|
|
4453
|
-
value:
|
|
4457
|
+
label: "Oldest",
|
|
4458
|
+
value: "oldest"
|
|
4454
4459
|
},
|
|
4455
4460
|
{
|
|
4456
|
-
label:
|
|
4457
|
-
value:
|
|
4461
|
+
label: "Title A-Z",
|
|
4462
|
+
value: "titleAZ"
|
|
4458
4463
|
},
|
|
4459
4464
|
{
|
|
4460
|
-
label:
|
|
4461
|
-
value:
|
|
4465
|
+
label: "Title Z-A",
|
|
4466
|
+
value: "titleZA"
|
|
4462
4467
|
}
|
|
4463
4468
|
];
|
|
4464
4469
|
const defaultSortBy = "";
|
|
@@ -4477,7 +4482,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4477
4482
|
endingNumber: 0
|
|
4478
4483
|
});
|
|
4479
4484
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4480
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4485
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
|
|
4481
4486
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4482
4487
|
const [fulltext, setFullText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
4483
4488
|
const [filterText, setFilterText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
@@ -4486,7 +4491,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4486
4491
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4487
4492
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4488
4493
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4489
|
-
return sort ===
|
|
4494
|
+
return sort === "modified" ? sortOrder === "desc" ? "newest" : "oldest" : sortOrder === "desc" ? "titleZA" : "titleAZ";
|
|
4490
4495
|
});
|
|
4491
4496
|
const [selectedFacets, setSelectedFacets] = (0, $hgUW1$useState)(transformedParams.selectedFacets ? transformedParams.selectedFacets : {
|
|
4492
4497
|
theme: [],
|
|
@@ -4495,21 +4500,21 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4495
4500
|
const setSortOptions = (value)=>{
|
|
4496
4501
|
setSortDisplay(value);
|
|
4497
4502
|
switch(value){
|
|
4498
|
-
case
|
|
4499
|
-
setSort(
|
|
4500
|
-
setSortOrder(
|
|
4503
|
+
case "newest":
|
|
4504
|
+
setSort("modified");
|
|
4505
|
+
setSortOrder("desc");
|
|
4501
4506
|
break;
|
|
4502
|
-
case
|
|
4503
|
-
setSort(
|
|
4504
|
-
setSortOrder(
|
|
4507
|
+
case "oldest":
|
|
4508
|
+
setSort("modified");
|
|
4509
|
+
setSortOrder("asc");
|
|
4505
4510
|
break;
|
|
4506
|
-
case
|
|
4507
|
-
setSort(
|
|
4508
|
-
setSortOrder(
|
|
4511
|
+
case "titleAZ":
|
|
4512
|
+
setSort("title");
|
|
4513
|
+
setSortOrder("asc");
|
|
4509
4514
|
break;
|
|
4510
|
-
case
|
|
4511
|
-
setSort(
|
|
4512
|
-
setSortOrder(
|
|
4515
|
+
case "titleZA":
|
|
4516
|
+
setSort("title");
|
|
4517
|
+
setSortOrder("desc");
|
|
4513
4518
|
break;
|
|
4514
4519
|
}
|
|
4515
4520
|
};
|
|
@@ -4517,12 +4522,12 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4517
4522
|
const newFacets = {
|
|
4518
4523
|
...selectedFacets
|
|
4519
4524
|
};
|
|
4520
|
-
if (key ===
|
|
4525
|
+
if (key === "theme") {
|
|
4521
4526
|
const existingFacet = newFacets.theme.findIndex((s)=>s === value);
|
|
4522
4527
|
if (existingFacet > -1) newFacets.theme.splice(existingFacet, 1);
|
|
4523
4528
|
else newFacets.theme.push(value);
|
|
4524
4529
|
}
|
|
4525
|
-
if (key ===
|
|
4530
|
+
if (key === "keyword") {
|
|
4526
4531
|
const existingFacet = newFacets.keyword.findIndex((s)=>s === value);
|
|
4527
4532
|
if (existingFacet > -1) newFacets.keyword.splice(existingFacet, 1);
|
|
4528
4533
|
else newFacets.keyword.push(value);
|
|
@@ -4536,59 +4541,23 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4536
4541
|
});
|
|
4537
4542
|
setSelectedFacets(newFacets);
|
|
4538
4543
|
const url = new URL(window.location.href);
|
|
4539
|
-
window.history.pushState({},
|
|
4544
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
4540
4545
|
}
|
|
4541
4546
|
const pageSize = defaultPageSize;
|
|
4542
|
-
(0, $hgUW1$useEffect)(()=>{
|
|
4543
|
-
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4544
|
-
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4545
|
-
const endingNumber = Number(pageSize) * Number(page);
|
|
4546
|
-
setCurrentResultNumbers({
|
|
4547
|
-
total: Number(totalItems),
|
|
4548
|
-
startingNumber: Number(totalItems) >= startingNumber ? startingNumber : 0,
|
|
4549
|
-
endingNumber: Number(totalItems) < endingNumber ? Number(totalItems) : endingNumber
|
|
4550
|
-
});
|
|
4551
|
-
setTimeout(()=>{
|
|
4552
|
-
setAnnouncementText(`Showing ${startingNumber} to ${endingNumber} of ${totalItems} datasets`);
|
|
4553
|
-
}, 100);
|
|
4554
|
-
if (totalItems <= 0 && currentResultNumbers !== null) setNoResults(true);
|
|
4555
|
-
else setNoResults(false);
|
|
4556
|
-
}, [
|
|
4557
|
-
totalItems,
|
|
4558
|
-
pageSize,
|
|
4559
|
-
page
|
|
4560
|
-
]);
|
|
4561
|
-
(0, $hgUW1$useEffect)(()=>{
|
|
4562
|
-
if (page !== 1 && (transformedParams.fulltext !== fulltext || transformedParams.selectedFacets !== selectedFacets)) setPage(1);
|
|
4563
|
-
}, [
|
|
4564
|
-
fulltext,
|
|
4565
|
-
selectedFacets
|
|
4566
|
-
]);
|
|
4567
|
-
(0, $hgUW1$useEffect)(()=>{
|
|
4568
|
-
if (totalItems !== null && totalItems !== undefined && totalItems > 0) {
|
|
4569
|
-
var params = buildSearchParams(true);
|
|
4570
|
-
if (params !== location.search) setSearchParams(params);
|
|
4571
|
-
}
|
|
4572
|
-
}, [
|
|
4573
|
-
page,
|
|
4574
|
-
sort,
|
|
4575
|
-
sortOrder,
|
|
4576
|
-
totalItems
|
|
4577
|
-
]);
|
|
4578
4547
|
function resetFilters() {
|
|
4579
4548
|
setFullText(defaultFulltext);
|
|
4580
4549
|
setFilterText(defaultFulltext);
|
|
4581
4550
|
setSelectedFacets(defaultSelectedFacets);
|
|
4582
4551
|
setPage(defaultPage);
|
|
4583
4552
|
const url = new URL(window.location.href);
|
|
4584
|
-
window.history.pushState({},
|
|
4553
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}`);
|
|
4585
4554
|
}
|
|
4586
4555
|
function buildSearchParams(includePage) {
|
|
4587
4556
|
let newParams = {};
|
|
4588
4557
|
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
4589
4558
|
if (sort !== defaultSort.defaultSort) newParams.sort = sort;
|
|
4590
4559
|
if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
|
|
4591
|
-
if (fulltext !==
|
|
4560
|
+
if (fulltext !== "") newParams.fulltext = fulltext;
|
|
4592
4561
|
if (Object.keys(selectedFacets).length) Object.keys(selectedFacets).forEach((key)=>{
|
|
4593
4562
|
newParams[key] = selectedFacets[key];
|
|
4594
4563
|
});
|
|
@@ -4601,9 +4570,9 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4601
4570
|
fulltext: fulltext ? fulltext : undefined,
|
|
4602
4571
|
...selectedFacets,
|
|
4603
4572
|
sort: sort ? sort : undefined,
|
|
4604
|
-
[
|
|
4573
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4605
4574
|
page: page !== 1 ? page : undefined,
|
|
4606
|
-
[
|
|
4575
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4607
4576
|
};
|
|
4608
4577
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4609
4578
|
queryKey: [
|
|
@@ -4612,7 +4581,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4612
4581
|
],
|
|
4613
4582
|
queryFn: ()=>{
|
|
4614
4583
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4615
|
-
arrayFormat:
|
|
4584
|
+
arrayFormat: "comma",
|
|
4616
4585
|
encode: false
|
|
4617
4586
|
})}`);
|
|
4618
4587
|
}
|
|
@@ -4622,6 +4591,50 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4622
4591
|
theme: null,
|
|
4623
4592
|
keyword: null
|
|
4624
4593
|
};
|
|
4594
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
4595
|
+
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4596
|
+
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4597
|
+
const endingNumber = Number(pageSize) * Number(page);
|
|
4598
|
+
setCurrentResultNumbers({
|
|
4599
|
+
total: Number(totalItems),
|
|
4600
|
+
startingNumber: Number(totalItems) >= startingNumber ? startingNumber : 0,
|
|
4601
|
+
endingNumber: Number(totalItems) < endingNumber ? Number(totalItems) : endingNumber
|
|
4602
|
+
});
|
|
4603
|
+
if (totalItems <= 0 && currentResultNumbers !== null) setNoResults(true);
|
|
4604
|
+
else setNoResults(false);
|
|
4605
|
+
}, [
|
|
4606
|
+
totalItems,
|
|
4607
|
+
pageSize,
|
|
4608
|
+
page
|
|
4609
|
+
]);
|
|
4610
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
4611
|
+
if (page !== 1 && (transformedParams.fulltext !== fulltext || transformedParams.selectedFacets !== selectedFacets)) setPage(1);
|
|
4612
|
+
}, [
|
|
4613
|
+
fulltext,
|
|
4614
|
+
selectedFacets
|
|
4615
|
+
]);
|
|
4616
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
4617
|
+
if (totalItems !== null && totalItems !== undefined && totalItems > 0) {
|
|
4618
|
+
var params = buildSearchParams(true);
|
|
4619
|
+
if (params !== location.search) setSearchParams(params);
|
|
4620
|
+
}
|
|
4621
|
+
}, [
|
|
4622
|
+
page,
|
|
4623
|
+
sort,
|
|
4624
|
+
sortOrder,
|
|
4625
|
+
totalItems
|
|
4626
|
+
]);
|
|
4627
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
4628
|
+
// No results found
|
|
4629
|
+
if (noResults) setAnnouncementText("No results found.");
|
|
4630
|
+
else if (!isPending && (!data || !data.data.results)) setAnnouncementText("Could not connect to the API.");
|
|
4631
|
+
else setAnnouncementText(`Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`);
|
|
4632
|
+
}, [
|
|
4633
|
+
data,
|
|
4634
|
+
isPending,
|
|
4635
|
+
noResults,
|
|
4636
|
+
currentResultNumbers
|
|
4637
|
+
]);
|
|
4625
4638
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
4626
4639
|
children: [
|
|
4627
4640
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $5723016a5461c1ca$export$2e2bcd8739ae039), {
|
|
@@ -4630,6 +4643,15 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4630
4643
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("section", {
|
|
4631
4644
|
className: "ds-l-container",
|
|
4632
4645
|
children: [
|
|
4646
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4647
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4648
|
+
className: "ds-u-visibility--screen-reader",
|
|
4649
|
+
"aria-live": "assertive",
|
|
4650
|
+
"aria-atomic": "true",
|
|
4651
|
+
"data-testid": "currentResults",
|
|
4652
|
+
children: announcementText
|
|
4653
|
+
})
|
|
4654
|
+
}),
|
|
4633
4655
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4634
4656
|
className: "ds-l-row",
|
|
4635
4657
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
@@ -4663,7 +4685,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4663
4685
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4664
4686
|
fieldClassName: "ds-u-margin--0",
|
|
4665
4687
|
value: filterText,
|
|
4666
|
-
className: `ds-u-padding-right--2 ${altMobileSearchButton ?
|
|
4688
|
+
className: `ds-u-padding-right--2 ${altMobileSearchButton ? "ds-l-col--12 ds-l-md-col--10 --alt-style" : "ds-l-col--10"}`,
|
|
4667
4689
|
label: "Search datasets",
|
|
4668
4690
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4669
4691
|
placeholder: "Search datasets",
|
|
@@ -4714,34 +4736,23 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4714
4736
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4715
4737
|
className: "ds-u-display--flex ds-u-justify-content--between ds-u-align-items--end ds-u-flex-wrap--reverse ds-u-sm-flex-wrap--wrap",
|
|
4716
4738
|
children: [
|
|
4717
|
-
enablePagination && /*#__PURE__*/ (0, $hgUW1$
|
|
4739
|
+
enablePagination && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4718
4740
|
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--8 ds-u-sm-padding-left--0",
|
|
4719
|
-
children:
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
" datasets"
|
|
4733
|
-
]
|
|
4734
|
-
})
|
|
4735
|
-
}),
|
|
4736
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4737
|
-
className: "ds-u-visibility--screen-reader",
|
|
4738
|
-
role: "status",
|
|
4739
|
-
"aria-live": "assertive",
|
|
4740
|
-
"aria-atomic": "true",
|
|
4741
|
-
"data-testid": "currentResults",
|
|
4742
|
-
children: announcementText
|
|
4741
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4742
|
+
className: "ds-u-margin-y--0",
|
|
4743
|
+
children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
4744
|
+
children: [
|
|
4745
|
+
"Showing ",
|
|
4746
|
+
currentResultNumbers.startingNumber,
|
|
4747
|
+
" -",
|
|
4748
|
+
" ",
|
|
4749
|
+
currentResultNumbers.endingNumber,
|
|
4750
|
+
" of ",
|
|
4751
|
+
data.data.total,
|
|
4752
|
+
" datasets"
|
|
4753
|
+
]
|
|
4743
4754
|
})
|
|
4744
|
-
|
|
4755
|
+
})
|
|
4745
4756
|
}),
|
|
4746
4757
|
enableSort && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4747
4758
|
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4 ds-u-sm-padding-right--0",
|
|
@@ -4762,6 +4773,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4762
4773
|
children: [
|
|
4763
4774
|
noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
4764
4775
|
variation: "error",
|
|
4776
|
+
role: "region",
|
|
4765
4777
|
heading: "No results found."
|
|
4766
4778
|
}),
|
|
4767
4779
|
data && data.data.results ? Object.keys(data.data.results).map((key)=>{
|
|
@@ -4789,6 +4801,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4789
4801
|
}, item.identifier);
|
|
4790
4802
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
4791
4803
|
variation: "error",
|
|
4804
|
+
role: "region",
|
|
4792
4805
|
heading: "Could not connect to the API."
|
|
4793
4806
|
})
|
|
4794
4807
|
]
|
|
@@ -4803,7 +4816,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4803
4816
|
},
|
|
4804
4817
|
renderHref: (page)=>{
|
|
4805
4818
|
const searchParams = buildSearchParams(false);
|
|
4806
|
-
const includeAnd = searchParams ?
|
|
4819
|
+
const includeAnd = searchParams ? "&" : "";
|
|
4807
4820
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
4808
4821
|
}
|
|
4809
4822
|
})
|
|
@@ -4837,26 +4850,26 @@ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
4837
4850
|
|
|
4838
4851
|
|
|
4839
4852
|
const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4840
|
-
defaultSort:
|
|
4841
|
-
defaultOrder:
|
|
4842
|
-
}, pageTitle: pageTitle =
|
|
4853
|
+
defaultSort: "modified",
|
|
4854
|
+
defaultOrder: "desc"
|
|
4855
|
+
}, pageTitle: pageTitle = "What's New ", showLargeFileWarning: showLargeFileWarning = false, introText: introText = "", dataDictionaryLinks: dataDictionaryLinks = false })=>{
|
|
4843
4856
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4844
4857
|
const sortOptions = [
|
|
4845
4858
|
{
|
|
4846
|
-
label:
|
|
4847
|
-
value:
|
|
4859
|
+
label: "Newest",
|
|
4860
|
+
value: "newest"
|
|
4848
4861
|
},
|
|
4849
4862
|
{
|
|
4850
|
-
label:
|
|
4851
|
-
value:
|
|
4863
|
+
label: "Oldest",
|
|
4864
|
+
value: "oldest"
|
|
4852
4865
|
},
|
|
4853
4866
|
{
|
|
4854
|
-
label:
|
|
4855
|
-
value:
|
|
4867
|
+
label: "Title A-Z",
|
|
4868
|
+
value: "titleAZ"
|
|
4856
4869
|
},
|
|
4857
4870
|
{
|
|
4858
|
-
label:
|
|
4859
|
-
value:
|
|
4871
|
+
label: "Title Z-A",
|
|
4872
|
+
value: "titleZA"
|
|
4860
4873
|
}
|
|
4861
4874
|
];
|
|
4862
4875
|
const defaultSortBy = "";
|
|
@@ -4870,42 +4883,71 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4870
4883
|
endingNumber: 0
|
|
4871
4884
|
});
|
|
4872
4885
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4873
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4886
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
|
|
4874
4887
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4875
4888
|
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
4876
4889
|
const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
|
|
4877
4890
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4878
4891
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4879
4892
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4880
|
-
return sort ===
|
|
4893
|
+
return sort === "modified" ? sortOrder === "desc" ? "newest" : "oldest" : sortOrder === "desc" ? "titleZA" : "titleAZ";
|
|
4881
4894
|
});
|
|
4882
4895
|
const setSortOptions = (value)=>{
|
|
4883
4896
|
setSortDisplay(value);
|
|
4884
4897
|
switch(value){
|
|
4885
|
-
case
|
|
4886
|
-
setSort(
|
|
4887
|
-
setSortOrder(
|
|
4898
|
+
case "newest":
|
|
4899
|
+
setSort("modified");
|
|
4900
|
+
setSortOrder("desc");
|
|
4888
4901
|
break;
|
|
4889
|
-
case
|
|
4890
|
-
setSort(
|
|
4891
|
-
setSortOrder(
|
|
4902
|
+
case "oldest":
|
|
4903
|
+
setSort("modified");
|
|
4904
|
+
setSortOrder("asc");
|
|
4892
4905
|
break;
|
|
4893
|
-
case
|
|
4894
|
-
setSort(
|
|
4895
|
-
setSortOrder(
|
|
4906
|
+
case "titleAZ":
|
|
4907
|
+
setSort("title");
|
|
4908
|
+
setSortOrder("asc");
|
|
4896
4909
|
break;
|
|
4897
|
-
case
|
|
4898
|
-
setSort(
|
|
4899
|
-
setSortOrder(
|
|
4910
|
+
case "titleZA":
|
|
4911
|
+
setSort("title");
|
|
4912
|
+
setSortOrder("desc");
|
|
4900
4913
|
break;
|
|
4901
4914
|
}
|
|
4902
4915
|
};
|
|
4903
4916
|
const pageSize = defaultPageSize;
|
|
4917
|
+
function buildSearchParams(includePage) {
|
|
4918
|
+
let newParams = {};
|
|
4919
|
+
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
4920
|
+
if (sort !== defaultSort.defaultSort) newParams.sort = sort;
|
|
4921
|
+
if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
|
|
4922
|
+
return (0, $hgUW1$qs).stringify(newParams, {
|
|
4923
|
+
addQueryPrefix: includePage,
|
|
4924
|
+
encode: true
|
|
4925
|
+
});
|
|
4926
|
+
}
|
|
4927
|
+
let params = {
|
|
4928
|
+
sort: sort ? sort : undefined,
|
|
4929
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4930
|
+
page: page !== 1 ? page : undefined,
|
|
4931
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4932
|
+
};
|
|
4933
|
+
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4934
|
+
queryKey: [
|
|
4935
|
+
"datasets",
|
|
4936
|
+
params
|
|
4937
|
+
],
|
|
4938
|
+
queryFn: ()=>{
|
|
4939
|
+
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4940
|
+
arrayFormat: "comma",
|
|
4941
|
+
encode: false
|
|
4942
|
+
})}`);
|
|
4943
|
+
}
|
|
4944
|
+
});
|
|
4945
|
+
if (data && data.data.total && totalItems != data.data.total) setTotalItems(data.data.total);
|
|
4904
4946
|
(0, $hgUW1$useEffect)(()=>{
|
|
4905
4947
|
// Update browser URL with current search params
|
|
4906
4948
|
const params = buildSearchParams(true);
|
|
4907
4949
|
const url = new URL(window.location.href);
|
|
4908
|
-
window.history.pushState({},
|
|
4950
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${params}`);
|
|
4909
4951
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4910
4952
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4911
4953
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -4914,9 +4956,6 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4914
4956
|
startingNumber: Number(totalItems) >= startingNumber ? startingNumber : 0,
|
|
4915
4957
|
endingNumber: Number(totalItems) < endingNumber ? Number(totalItems) : endingNumber
|
|
4916
4958
|
});
|
|
4917
|
-
setTimeout(()=>{
|
|
4918
|
-
setAnnouncementText(`Showing ${startingNumber} to ${endingNumber} of ${totalItems} datasets`);
|
|
4919
|
-
}, 100);
|
|
4920
4959
|
if (totalItems <= 0 && currentResultNumbers !== null) setNoResults(true);
|
|
4921
4960
|
else setNoResults(false);
|
|
4922
4961
|
}, [
|
|
@@ -4932,35 +4971,17 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4932
4971
|
sort,
|
|
4933
4972
|
sortOrder
|
|
4934
4973
|
]);
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
if (
|
|
4938
|
-
if (
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
sort: sort ? sort : undefined,
|
|
4947
|
-
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
4948
|
-
page: page !== 1 ? page : undefined,
|
|
4949
|
-
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
4950
|
-
};
|
|
4951
|
-
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4952
|
-
queryKey: [
|
|
4953
|
-
"datasets",
|
|
4954
|
-
params
|
|
4955
|
-
],
|
|
4956
|
-
queryFn: ()=>{
|
|
4957
|
-
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4958
|
-
arrayFormat: 'comma',
|
|
4959
|
-
encode: false
|
|
4960
|
-
})}`);
|
|
4961
|
-
}
|
|
4962
|
-
});
|
|
4963
|
-
if (data && data.data.total && totalItems != data.data.total) setTotalItems(data.data.total);
|
|
4974
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
4975
|
+
// No results found
|
|
4976
|
+
if (noResults) setAnnouncementText("No results found.");
|
|
4977
|
+
else if (!isPending && (!data || !data.data.results)) setAnnouncementText("Could not connect to the API.");
|
|
4978
|
+
else setAnnouncementText(`Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`);
|
|
4979
|
+
}, [
|
|
4980
|
+
data,
|
|
4981
|
+
isPending,
|
|
4982
|
+
noResults,
|
|
4983
|
+
currentResultNumbers
|
|
4984
|
+
]);
|
|
4964
4985
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
4965
4986
|
children: [
|
|
4966
4987
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $5723016a5461c1ca$export$2e2bcd8739ae039), {
|
|
@@ -4969,6 +4990,15 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4969
4990
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("section", {
|
|
4970
4991
|
className: "ds-l-container",
|
|
4971
4992
|
children: [
|
|
4993
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4994
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4995
|
+
className: "ds-u-visibility--screen-reader",
|
|
4996
|
+
"aria-live": "assertive",
|
|
4997
|
+
"aria-atomic": "true",
|
|
4998
|
+
"data-testid": "currentResults",
|
|
4999
|
+
children: announcementText
|
|
5000
|
+
})
|
|
5001
|
+
}),
|
|
4972
5002
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4973
5003
|
className: "ds-l-row",
|
|
4974
5004
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -5009,33 +5039,22 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5009
5039
|
className: "ds-u-margin-bottom--3",
|
|
5010
5040
|
children: introText ? introText : null
|
|
5011
5041
|
}),
|
|
5012
|
-
enablePagination && /*#__PURE__*/ (0, $hgUW1$
|
|
5013
|
-
children:
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
" datasets"
|
|
5027
|
-
]
|
|
5028
|
-
})
|
|
5029
|
-
}),
|
|
5030
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
5031
|
-
className: "ds-u-visibility--screen-reader",
|
|
5032
|
-
role: "status",
|
|
5033
|
-
"aria-live": "assertive",
|
|
5034
|
-
"aria-atomic": "true",
|
|
5035
|
-
"data-testid": "currentResults",
|
|
5036
|
-
children: announcementText
|
|
5042
|
+
enablePagination && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5043
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
5044
|
+
className: "ds-u-margin-y--0",
|
|
5045
|
+
children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
5046
|
+
children: [
|
|
5047
|
+
"Showing ",
|
|
5048
|
+
currentResultNumbers.startingNumber,
|
|
5049
|
+
" -",
|
|
5050
|
+
" ",
|
|
5051
|
+
currentResultNumbers.endingNumber,
|
|
5052
|
+
" of ",
|
|
5053
|
+
data.data.total,
|
|
5054
|
+
" datasets"
|
|
5055
|
+
]
|
|
5037
5056
|
})
|
|
5038
|
-
|
|
5057
|
+
})
|
|
5039
5058
|
})
|
|
5040
5059
|
]
|
|
5041
5060
|
}),
|
|
@@ -5058,6 +5077,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5058
5077
|
children: [
|
|
5059
5078
|
noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
5060
5079
|
variation: "error",
|
|
5080
|
+
role: "region",
|
|
5061
5081
|
heading: "No results found."
|
|
5062
5082
|
}),
|
|
5063
5083
|
data && data.data.results ? Object.keys(data.data.results).map((key)=>{
|
|
@@ -5072,6 +5092,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5072
5092
|
}, item.identifier);
|
|
5073
5093
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
5074
5094
|
variation: "error",
|
|
5095
|
+
role: "region",
|
|
5075
5096
|
heading: "Could not connect to the API."
|
|
5076
5097
|
})
|
|
5077
5098
|
]
|
|
@@ -5086,7 +5107,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5086
5107
|
},
|
|
5087
5108
|
renderHref: (page)=>{
|
|
5088
5109
|
const searchParams = buildSearchParams(false);
|
|
5089
|
-
const includeAnd = searchParams ?
|
|
5110
|
+
const includeAnd = searchParams ? "&" : "";
|
|
5090
5111
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
5091
5112
|
}
|
|
5092
5113
|
})
|
|
@@ -5118,12 +5139,12 @@ var $550bcc185f420ff5$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
5118
5139
|
|
|
5119
5140
|
const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
5120
5141
|
const [dataset, setDataset] = (0, $hgUW1$useState)({
|
|
5121
|
-
title:
|
|
5142
|
+
title: "",
|
|
5122
5143
|
distribution: [],
|
|
5123
|
-
error:
|
|
5124
|
-
description:
|
|
5125
|
-
identifier:
|
|
5126
|
-
modified:
|
|
5144
|
+
error: "",
|
|
5145
|
+
description: "",
|
|
5146
|
+
identifier: "",
|
|
5147
|
+
modified: ""
|
|
5127
5148
|
});
|
|
5128
5149
|
const [id, setId] = (0, $hgUW1$useState)(datasetId);
|
|
5129
5150
|
const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
|
|
@@ -5133,7 +5154,7 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
|
5133
5154
|
"metastore" + id
|
|
5134
5155
|
],
|
|
5135
5156
|
queryFn: ()=>{
|
|
5136
|
-
return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ?
|
|
5157
|
+
return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ? "&" : ""}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`).then((res)=>res.data).catch((error)=>{
|
|
5137
5158
|
return {
|
|
5138
5159
|
title: dataset.title,
|
|
5139
5160
|
distribution: dataset.distribution,
|
|
@@ -5199,7 +5220,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5199
5220
|
...additionalParams
|
|
5200
5221
|
};
|
|
5201
5222
|
params = (0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA);
|
|
5202
|
-
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` :
|
|
5223
|
+
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : "";
|
|
5203
5224
|
let enabled = false;
|
|
5204
5225
|
if (id) {
|
|
5205
5226
|
if (!requireConditions) enabled = true;
|
|
@@ -5279,65 +5300,65 @@ var $1d3d480a9cfaabe0$export$2e2bcd8739ae039 = $1d3d480a9cfaabe0$var$useDatastor
|
|
|
5279
5300
|
|
|
5280
5301
|
|
|
5281
5302
|
const $28f16f59778efa64$export$82b1b1d517e5388a = {
|
|
5282
|
-
|
|
5283
|
-
name:
|
|
5303
|
+
"R/P10Y": {
|
|
5304
|
+
name: "Decennial"
|
|
5284
5305
|
},
|
|
5285
|
-
|
|
5286
|
-
name:
|
|
5306
|
+
"R/P4Y": {
|
|
5307
|
+
name: "Quadrennial"
|
|
5287
5308
|
},
|
|
5288
|
-
|
|
5289
|
-
name:
|
|
5309
|
+
"R/P1Y": {
|
|
5310
|
+
name: "Annual"
|
|
5290
5311
|
},
|
|
5291
|
-
|
|
5292
|
-
name:
|
|
5312
|
+
"R/P2M": {
|
|
5313
|
+
name: "Bimonthly"
|
|
5293
5314
|
},
|
|
5294
|
-
|
|
5295
|
-
name:
|
|
5315
|
+
"R/P3.5D": {
|
|
5316
|
+
name: "Semiweekly"
|
|
5296
5317
|
},
|
|
5297
|
-
|
|
5298
|
-
name:
|
|
5318
|
+
"R/P1D": {
|
|
5319
|
+
name: "Daily"
|
|
5299
5320
|
},
|
|
5300
|
-
|
|
5301
|
-
name:
|
|
5321
|
+
"R/P2W": {
|
|
5322
|
+
name: "Biweekly"
|
|
5302
5323
|
},
|
|
5303
|
-
|
|
5304
|
-
name:
|
|
5324
|
+
"R/P6M": {
|
|
5325
|
+
name: "Semiannual"
|
|
5305
5326
|
},
|
|
5306
|
-
|
|
5307
|
-
name:
|
|
5327
|
+
"R/P2Y": {
|
|
5328
|
+
name: "Biennial"
|
|
5308
5329
|
},
|
|
5309
|
-
|
|
5310
|
-
name:
|
|
5330
|
+
"R/P3Y": {
|
|
5331
|
+
name: "Triennial"
|
|
5311
5332
|
},
|
|
5312
|
-
|
|
5313
|
-
name:
|
|
5333
|
+
"R/P0.33W": {
|
|
5334
|
+
name: "Three times a week"
|
|
5314
5335
|
},
|
|
5315
|
-
|
|
5316
|
-
name:
|
|
5336
|
+
"R/P0.33M": {
|
|
5337
|
+
name: "Three times a month"
|
|
5317
5338
|
},
|
|
5318
|
-
|
|
5319
|
-
name:
|
|
5339
|
+
"R/PT1S": {
|
|
5340
|
+
name: "Continuously updated"
|
|
5320
5341
|
},
|
|
5321
|
-
|
|
5322
|
-
name:
|
|
5342
|
+
"R/P1M": {
|
|
5343
|
+
name: "Monthly"
|
|
5323
5344
|
},
|
|
5324
|
-
|
|
5325
|
-
name:
|
|
5345
|
+
"R/P3M": {
|
|
5346
|
+
name: "Quarterly"
|
|
5326
5347
|
},
|
|
5327
|
-
|
|
5328
|
-
name:
|
|
5348
|
+
"R/P0.5M": {
|
|
5349
|
+
name: "Semimonthly"
|
|
5329
5350
|
},
|
|
5330
|
-
|
|
5331
|
-
name:
|
|
5351
|
+
"R/P4M": {
|
|
5352
|
+
name: "Three times a year"
|
|
5332
5353
|
},
|
|
5333
|
-
|
|
5334
|
-
name:
|
|
5354
|
+
"R/P1W": {
|
|
5355
|
+
name: "Weekly"
|
|
5335
5356
|
},
|
|
5336
|
-
|
|
5337
|
-
name:
|
|
5357
|
+
"R/PT1H": {
|
|
5358
|
+
name: "Hourly"
|
|
5338
5359
|
},
|
|
5339
5360
|
irregular: {
|
|
5340
|
-
name:
|
|
5361
|
+
name: "Irregular"
|
|
5341
5362
|
}
|
|
5342
5363
|
};
|
|
5343
5364
|
|
|
@@ -5346,7 +5367,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5346
5367
|
modified: (data)=>{
|
|
5347
5368
|
return [
|
|
5348
5369
|
{
|
|
5349
|
-
label:
|
|
5370
|
+
label: "Modified",
|
|
5350
5371
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5351
5372
|
date: data
|
|
5352
5373
|
})
|
|
@@ -5356,7 +5377,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5356
5377
|
issued: (data)=>{
|
|
5357
5378
|
return [
|
|
5358
5379
|
{
|
|
5359
|
-
label:
|
|
5380
|
+
label: "Issued",
|
|
5360
5381
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5361
5382
|
date: data
|
|
5362
5383
|
})
|
|
@@ -5366,7 +5387,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5366
5387
|
accrualPeriodicity: (data)=>{
|
|
5367
5388
|
return [
|
|
5368
5389
|
{
|
|
5369
|
-
label:
|
|
5390
|
+
label: "Frequency",
|
|
5370
5391
|
value: (0, $28f16f59778efa64$export$82b1b1d517e5388a)[data].name
|
|
5371
5392
|
}
|
|
5372
5393
|
];
|
|
@@ -5374,7 +5395,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5374
5395
|
publisher: (data)=>{
|
|
5375
5396
|
if (data.data && data.data.name) return [
|
|
5376
5397
|
{
|
|
5377
|
-
label:
|
|
5398
|
+
label: "Publisher",
|
|
5378
5399
|
value: data.data.name
|
|
5379
5400
|
}
|
|
5380
5401
|
];
|
|
@@ -5383,7 +5404,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5383
5404
|
identifier: (data)=>{
|
|
5384
5405
|
return [
|
|
5385
5406
|
{
|
|
5386
|
-
label:
|
|
5407
|
+
label: "Identifier",
|
|
5387
5408
|
value: data
|
|
5388
5409
|
}
|
|
5389
5410
|
];
|
|
@@ -5391,11 +5412,11 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5391
5412
|
contactPoint: (data)=>{
|
|
5392
5413
|
let rows = [];
|
|
5393
5414
|
if (data.fn) rows.push({
|
|
5394
|
-
label:
|
|
5415
|
+
label: "Contact",
|
|
5395
5416
|
value: data.fn
|
|
5396
5417
|
});
|
|
5397
5418
|
if (data.hasEmail) rows.push({
|
|
5398
|
-
label:
|
|
5419
|
+
label: "Contact Email",
|
|
5399
5420
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5400
5421
|
href: data.hasEmail.includes("mailto:") ? data.hasEmail : `mailto:${data.hasEmail}`,
|
|
5401
5422
|
children: data.hasEmail.replace("mailto:", "")
|
|
@@ -5406,7 +5427,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5406
5427
|
bureauCode: (data)=>{
|
|
5407
5428
|
if (data.length) return [
|
|
5408
5429
|
{
|
|
5409
|
-
label:
|
|
5430
|
+
label: "Bureau Code",
|
|
5410
5431
|
value: data[0]
|
|
5411
5432
|
}
|
|
5412
5433
|
];
|
|
@@ -5414,7 +5435,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5414
5435
|
programCode: (data)=>{
|
|
5415
5436
|
if (data.length) return [
|
|
5416
5437
|
{
|
|
5417
|
-
label:
|
|
5438
|
+
label: "Program Code",
|
|
5418
5439
|
value: data[0]
|
|
5419
5440
|
}
|
|
5420
5441
|
];
|
|
@@ -5422,13 +5443,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5422
5443
|
theme: (data)=>{
|
|
5423
5444
|
return [
|
|
5424
5445
|
{
|
|
5425
|
-
label:
|
|
5446
|
+
label: "Category",
|
|
5426
5447
|
value: data.map((theme)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5427
5448
|
to: `/datasets?theme[]=${theme.data}`,
|
|
5428
5449
|
children: theme.data
|
|
5429
5450
|
}, theme.data)).reduce((prev, curr)=>[
|
|
5430
5451
|
prev,
|
|
5431
|
-
|
|
5452
|
+
", ",
|
|
5432
5453
|
curr
|
|
5433
5454
|
])
|
|
5434
5455
|
}
|
|
@@ -5437,13 +5458,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5437
5458
|
keyword: (data)=>{
|
|
5438
5459
|
return [
|
|
5439
5460
|
{
|
|
5440
|
-
label:
|
|
5461
|
+
label: "Tags",
|
|
5441
5462
|
value: data.map((keyword)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5442
5463
|
to: `/datasets?keyword[]=${keyword.data}`,
|
|
5443
5464
|
children: keyword.data
|
|
5444
5465
|
}, keyword.data)).reduce((prev, curr)=>[
|
|
5445
5466
|
prev,
|
|
5446
|
-
|
|
5467
|
+
", ",
|
|
5447
5468
|
curr
|
|
5448
5469
|
])
|
|
5449
5470
|
}
|
|
@@ -5452,7 +5473,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5452
5473
|
license: (data)=>{
|
|
5453
5474
|
return [
|
|
5454
5475
|
{
|
|
5455
|
-
label:
|
|
5476
|
+
label: "License",
|
|
5456
5477
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5457
5478
|
href: data,
|
|
5458
5479
|
children: data
|
|
@@ -5463,7 +5484,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5463
5484
|
accessLevel: (data)=>{
|
|
5464
5485
|
return [
|
|
5465
5486
|
{
|
|
5466
|
-
label:
|
|
5487
|
+
label: "Public Access Level",
|
|
5467
5488
|
value: data
|
|
5468
5489
|
}
|
|
5469
5490
|
];
|
|
@@ -5471,7 +5492,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5471
5492
|
temporal: (data)=>{
|
|
5472
5493
|
return [
|
|
5473
5494
|
{
|
|
5474
|
-
label:
|
|
5495
|
+
label: "Temporal Coverage",
|
|
5475
5496
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5476
5497
|
className: "dc-c-word-break--all",
|
|
5477
5498
|
children: data
|
|
@@ -5482,7 +5503,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5482
5503
|
spatial: (data)=>{
|
|
5483
5504
|
return [
|
|
5484
5505
|
{
|
|
5485
|
-
label:
|
|
5506
|
+
label: "Spacial/Geographical Coverage",
|
|
5486
5507
|
value: data
|
|
5487
5508
|
}
|
|
5488
5509
|
];
|
|
@@ -5490,7 +5511,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5490
5511
|
references: (data)=>{
|
|
5491
5512
|
return [
|
|
5492
5513
|
{
|
|
5493
|
-
label:
|
|
5514
|
+
label: "Related Documents",
|
|
5494
5515
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
5495
5516
|
className: "ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0",
|
|
5496
5517
|
children: data.map((item)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -5528,7 +5549,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ distribution: distribution,
|
|
|
5528
5549
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
5529
5550
|
const { data: resource } = (0, $hgUW1$useQuery)({
|
|
5530
5551
|
queryKey: [
|
|
5531
|
-
|
|
5552
|
+
"resource-information",
|
|
5532
5553
|
distribution.identifier
|
|
5533
5554
|
],
|
|
5534
5555
|
queryFn: ()=>(0, $hgUW1$axios).get(`${rootUrl}/datastore/query/${distribution.identifier}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({
|
|
@@ -5555,7 +5576,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ distribution: distribution,
|
|
|
5555
5576
|
}),
|
|
5556
5577
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5557
5578
|
className: "ds-u-font-weight--bold",
|
|
5558
|
-
children: resource?.count ? Number(resource.count).toLocaleString() :
|
|
5579
|
+
children: resource?.count ? Number(resource.count).toLocaleString() : ""
|
|
5559
5580
|
})
|
|
5560
5581
|
]
|
|
5561
5582
|
}),
|
|
@@ -5623,8 +5644,8 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5623
5644
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
5624
5645
|
href: dist.data.downloadURL,
|
|
5625
5646
|
style: {
|
|
5626
|
-
order: sm ?
|
|
5627
|
-
width: sm ?
|
|
5647
|
+
order: sm ? "1" : "0",
|
|
5648
|
+
width: sm ? "100%" : "auto"
|
|
5628
5649
|
},
|
|
5629
5650
|
"aria-label": `Download ${dist.data.title || title} ${fileFormat}`,
|
|
5630
5651
|
className: "ds-c-button",
|
|
@@ -5637,7 +5658,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5637
5658
|
})
|
|
5638
5659
|
}),
|
|
5639
5660
|
dist.data.description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5640
|
-
className:
|
|
5661
|
+
className: "ds-u-measure--wide ds-u-margin-bottom--7",
|
|
5641
5662
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5642
5663
|
className: "dc-c-metadata-description ds-u-margin--0",
|
|
5643
5664
|
dangerouslySetInnerHTML: {
|
|
@@ -5711,7 +5732,7 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5711
5732
|
const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
|
|
5712
5733
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
5713
5734
|
children: [
|
|
5714
|
-
md ?
|
|
5735
|
+
md ? "" : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5715
5736
|
component: "th",
|
|
5716
5737
|
className: "ds-u-font-weight--bold",
|
|
5717
5738
|
children: [
|
|
@@ -5723,8 +5744,8 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5723
5744
|
ariaLabel: r.label,
|
|
5724
5745
|
// @ts-ignore
|
|
5725
5746
|
style: {
|
|
5726
|
-
border:
|
|
5727
|
-
background:
|
|
5747
|
+
border: "none",
|
|
5748
|
+
background: "none"
|
|
5728
5749
|
},
|
|
5729
5750
|
maxWidth: "400px",
|
|
5730
5751
|
placement: "auto",
|
|
@@ -5783,10 +5804,10 @@ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: ap
|
|
|
5783
5804
|
href: apiUrl,
|
|
5784
5805
|
children: [
|
|
5785
5806
|
"View API",
|
|
5786
|
-
|
|
5807
|
+
" ",
|
|
5787
5808
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5788
5809
|
style: {
|
|
5789
|
-
whiteSpace:
|
|
5810
|
+
whiteSpace: "nowrap"
|
|
5790
5811
|
},
|
|
5791
5812
|
children: [
|
|
5792
5813
|
"specification ",
|
|
@@ -5827,20 +5848,20 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
|
|
|
5827
5848
|
|
|
5828
5849
|
const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
|
|
5829
5850
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
5830
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
5851
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)("");
|
|
5831
5852
|
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
5832
5853
|
minWidth: 0,
|
|
5833
5854
|
maxWidth: 544
|
|
5834
5855
|
});
|
|
5835
5856
|
const sortElement = (isSorted)=>{
|
|
5836
|
-
if (isSorted ===
|
|
5837
|
-
if (isSorted ===
|
|
5838
|
-
return
|
|
5857
|
+
if (isSorted === "asc") return "dc-c-sort--asc";
|
|
5858
|
+
if (isSorted === "desc") return "dc-c-sort--desc";
|
|
5859
|
+
return "dc-c-sort--default";
|
|
5839
5860
|
};
|
|
5840
5861
|
const table = (0, $hgUW1$useReactTable)({
|
|
5841
5862
|
data: tableData,
|
|
5842
5863
|
columns: tableColumns,
|
|
5843
|
-
columnResizeMode:
|
|
5864
|
+
columnResizeMode: "onChange",
|
|
5844
5865
|
getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
|
|
5845
5866
|
getFilteredRowModel: (0, $hgUW1$getFilteredRowModel)(),
|
|
5846
5867
|
getPaginationRowModel: (0, $hgUW1$getPaginationRowModel)(),
|
|
@@ -5859,49 +5880,49 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5859
5880
|
});
|
|
5860
5881
|
const sortOptions = [
|
|
5861
5882
|
{
|
|
5862
|
-
value:
|
|
5863
|
-
label:
|
|
5883
|
+
value: "default",
|
|
5884
|
+
label: "No Sort"
|
|
5864
5885
|
},
|
|
5865
5886
|
{
|
|
5866
|
-
value:
|
|
5867
|
-
label:
|
|
5887
|
+
value: "titleasc",
|
|
5888
|
+
label: "Title A-Z"
|
|
5868
5889
|
},
|
|
5869
5890
|
{
|
|
5870
|
-
value:
|
|
5871
|
-
label:
|
|
5891
|
+
value: "titledesc",
|
|
5892
|
+
label: "Title Z-A"
|
|
5872
5893
|
},
|
|
5873
5894
|
{
|
|
5874
|
-
value:
|
|
5875
|
-
label:
|
|
5895
|
+
value: "typeasc",
|
|
5896
|
+
label: "Type A-Z"
|
|
5876
5897
|
},
|
|
5877
5898
|
{
|
|
5878
|
-
value:
|
|
5879
|
-
label:
|
|
5899
|
+
value: "typedesc",
|
|
5900
|
+
label: "Type Z-A"
|
|
5880
5901
|
}
|
|
5881
5902
|
];
|
|
5882
5903
|
const sortStatesLookup = {
|
|
5883
5904
|
default: [],
|
|
5884
5905
|
titleasc: [
|
|
5885
5906
|
{
|
|
5886
|
-
id:
|
|
5907
|
+
id: "titleResizable",
|
|
5887
5908
|
desc: false
|
|
5888
5909
|
}
|
|
5889
5910
|
],
|
|
5890
5911
|
titledesc: [
|
|
5891
5912
|
{
|
|
5892
|
-
id:
|
|
5913
|
+
id: "titleResizable",
|
|
5893
5914
|
desc: true
|
|
5894
5915
|
}
|
|
5895
5916
|
],
|
|
5896
5917
|
typeasc: [
|
|
5897
5918
|
{
|
|
5898
|
-
id:
|
|
5919
|
+
id: "type",
|
|
5899
5920
|
desc: false
|
|
5900
5921
|
}
|
|
5901
5922
|
],
|
|
5902
5923
|
typedesc: [
|
|
5903
5924
|
{
|
|
5904
|
-
id:
|
|
5925
|
+
id: "type",
|
|
5905
5926
|
desc: true
|
|
5906
5927
|
}
|
|
5907
5928
|
]
|
|
@@ -5929,7 +5950,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5929
5950
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
5930
5951
|
className: "dc-c-datatable",
|
|
5931
5952
|
style: {
|
|
5932
|
-
width:
|
|
5953
|
+
width: "100%"
|
|
5933
5954
|
},
|
|
5934
5955
|
stackable: true,
|
|
5935
5956
|
children: [
|
|
@@ -5941,16 +5962,17 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5941
5962
|
table: table,
|
|
5942
5963
|
header: header,
|
|
5943
5964
|
setAriaLiveFeedback: setAriaLiveFeedback,
|
|
5944
|
-
sortElement: sortElement
|
|
5965
|
+
sortElement: sortElement,
|
|
5966
|
+
id: "dataDictionary_" + header.id
|
|
5945
5967
|
}, header.id + "_resize") : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5946
5968
|
key: header.id,
|
|
5947
5969
|
className: `ds-u-border-y--2 ds-u-border--dark ds-u-border-x--0`,
|
|
5948
|
-
id:
|
|
5970
|
+
id: "dataDictionary_" + header.id,
|
|
5949
5971
|
children: [
|
|
5950
5972
|
(0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext()),
|
|
5951
|
-
header.id ===
|
|
5973
|
+
header.id === "type" && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
5952
5974
|
onClick: header.column.getToggleSortingHandler(),
|
|
5953
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
5975
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : "",
|
|
5954
5976
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
5955
5977
|
})
|
|
5956
5978
|
]
|
|
@@ -5965,12 +5987,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5965
5987
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
5966
5988
|
key: cell.id,
|
|
5967
5989
|
style: {
|
|
5968
|
-
maxWidth: mobile ?
|
|
5969
|
-
whiteSpace: cell.column.id === "description" ?
|
|
5990
|
+
maxWidth: mobile ? "100%" : cell.column.getSize(),
|
|
5991
|
+
whiteSpace: cell.column.id === "description" ? "pre-wrap" : "normal"
|
|
5970
5992
|
},
|
|
5971
|
-
className: `${cell.column.id ===
|
|
5972
|
-
headers:
|
|
5973
|
-
stackedTitle: cell.column.id ===
|
|
5993
|
+
className: `${cell.column.id === "titleResizable" ? "ds-u-word-break" : ""}`,
|
|
5994
|
+
headers: "dataDictionary_" + cell.column.id,
|
|
5995
|
+
stackedTitle: cell.column.id === "titleResizable" ? "Title" : cell.column.columnDef.header,
|
|
5974
5996
|
children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
5975
5997
|
});
|
|
5976
5998
|
})
|
|
@@ -5999,7 +6021,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5999
6021
|
table.setPageIndex(page - 1);
|
|
6000
6022
|
},
|
|
6001
6023
|
renderHref: (page)=>`/page=${page}`
|
|
6002
|
-
}) :
|
|
6024
|
+
}) : ""
|
|
6003
6025
|
]
|
|
6004
6026
|
});
|
|
6005
6027
|
};
|
|
@@ -6009,17 +6031,17 @@ var $6765a74df807d015$export$2e2bcd8739ae039 = $6765a74df807d015$var$DataDiction
|
|
|
6009
6031
|
const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
|
|
6010
6032
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
6011
6033
|
const tableColumns = [
|
|
6012
|
-
columnHelper.accessor(
|
|
6013
|
-
header:
|
|
6034
|
+
columnHelper.accessor("name", {
|
|
6035
|
+
header: "Name"
|
|
6014
6036
|
}),
|
|
6015
|
-
columnHelper.accessor(
|
|
6016
|
-
header:
|
|
6037
|
+
columnHelper.accessor("title", {
|
|
6038
|
+
header: "Title"
|
|
6017
6039
|
}),
|
|
6018
|
-
columnHelper.accessor(
|
|
6019
|
-
header:
|
|
6040
|
+
columnHelper.accessor("type", {
|
|
6041
|
+
header: "Type"
|
|
6020
6042
|
}),
|
|
6021
|
-
columnHelper.accessor(
|
|
6022
|
-
header:
|
|
6043
|
+
columnHelper.accessor("format", {
|
|
6044
|
+
header: "Format"
|
|
6023
6045
|
})
|
|
6024
6046
|
];
|
|
6025
6047
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6765a74df807d015$export$2e2bcd8739ae039), {
|
|
@@ -6063,7 +6085,7 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6063
6085
|
});
|
|
6064
6086
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
6065
6087
|
const tableColumns = [
|
|
6066
|
-
columnHelper.accessor(
|
|
6088
|
+
columnHelper.accessor("titleResizable", {
|
|
6067
6089
|
header: ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6068
6090
|
className: "dc-c-tooltip-width-override",
|
|
6069
6091
|
children: [
|
|
@@ -6072,8 +6094,8 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6072
6094
|
title: "Title represents the column headers of the data file",
|
|
6073
6095
|
// @ts-ignore
|
|
6074
6096
|
style: {
|
|
6075
|
-
border:
|
|
6076
|
-
background:
|
|
6097
|
+
border: "none",
|
|
6098
|
+
background: "none"
|
|
6077
6099
|
},
|
|
6078
6100
|
maxWidth: "400px",
|
|
6079
6101
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
|
|
@@ -6083,48 +6105,48 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6083
6105
|
size: 300,
|
|
6084
6106
|
minSize: 132
|
|
6085
6107
|
}),
|
|
6086
|
-
columnHelper.accessor(
|
|
6087
|
-
header:
|
|
6108
|
+
columnHelper.accessor("description", {
|
|
6109
|
+
header: "Description",
|
|
6088
6110
|
minSize: 600
|
|
6089
6111
|
}),
|
|
6090
|
-
columnHelper.accessor(
|
|
6091
|
-
header:
|
|
6112
|
+
columnHelper.accessor("type", {
|
|
6113
|
+
header: "Type",
|
|
6092
6114
|
size: 150,
|
|
6093
6115
|
enableResizing: false
|
|
6094
6116
|
})
|
|
6095
6117
|
];
|
|
6096
6118
|
const typeOptions = [
|
|
6097
6119
|
{
|
|
6098
|
-
value:
|
|
6099
|
-
label:
|
|
6120
|
+
value: "all",
|
|
6121
|
+
label: "All Types"
|
|
6100
6122
|
},
|
|
6101
6123
|
{
|
|
6102
|
-
value:
|
|
6103
|
-
label:
|
|
6124
|
+
value: "string",
|
|
6125
|
+
label: "String"
|
|
6104
6126
|
},
|
|
6105
6127
|
{
|
|
6106
|
-
value:
|
|
6107
|
-
label:
|
|
6128
|
+
value: "date",
|
|
6129
|
+
label: "Date"
|
|
6108
6130
|
},
|
|
6109
6131
|
{
|
|
6110
|
-
value:
|
|
6111
|
-
label:
|
|
6132
|
+
value: "datetime",
|
|
6133
|
+
label: "Datetime"
|
|
6112
6134
|
},
|
|
6113
6135
|
{
|
|
6114
|
-
value:
|
|
6115
|
-
label:
|
|
6136
|
+
value: "year",
|
|
6137
|
+
label: "Year"
|
|
6116
6138
|
},
|
|
6117
6139
|
{
|
|
6118
|
-
value:
|
|
6119
|
-
label:
|
|
6140
|
+
value: "integer",
|
|
6141
|
+
label: "Integer"
|
|
6120
6142
|
},
|
|
6121
6143
|
{
|
|
6122
|
-
value:
|
|
6123
|
-
label:
|
|
6144
|
+
value: "number",
|
|
6145
|
+
label: "Number"
|
|
6124
6146
|
},
|
|
6125
6147
|
{
|
|
6126
|
-
value:
|
|
6127
|
-
label:
|
|
6148
|
+
value: "boolean",
|
|
6149
|
+
label: "Boolean"
|
|
6128
6150
|
}
|
|
6129
6151
|
];
|
|
6130
6152
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -6231,7 +6253,7 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
|
|
|
6231
6253
|
href: datasetDictionaryEndpoint + "/csv",
|
|
6232
6254
|
className: "ds-c-button",
|
|
6233
6255
|
style: {
|
|
6234
|
-
width:
|
|
6256
|
+
width: "100%"
|
|
6235
6257
|
},
|
|
6236
6258
|
children: [
|
|
6237
6259
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
@@ -6288,7 +6310,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6288
6310
|
const [description, setDescription] = (0, $hgUW1$useState)("");
|
|
6289
6311
|
if (!distribution && !dataset?.identifier) return null;
|
|
6290
6312
|
(0, $hgUW1$useEffect)(()=>{
|
|
6291
|
-
let newDescription =
|
|
6313
|
+
let newDescription = "";
|
|
6292
6314
|
if (customDescription) newDescription = customDescription(dataset, distribution, resource);
|
|
6293
6315
|
else {
|
|
6294
6316
|
if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
|
|
@@ -6303,7 +6325,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6303
6325
|
customDescription
|
|
6304
6326
|
]);
|
|
6305
6327
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6306
|
-
className:
|
|
6328
|
+
className: "ds-u-measure--wide ds-u-margin-bottom--7",
|
|
6307
6329
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6308
6330
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
6309
6331
|
dangerouslySetInnerHTML: {
|
|
@@ -6325,7 +6347,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
6325
6347
|
],
|
|
6326
6348
|
queryFn: ()=>{
|
|
6327
6349
|
return fetch(`${dataDictionaryUrl}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA), {
|
|
6328
|
-
arrayFormat:
|
|
6350
|
+
arrayFormat: "comma",
|
|
6329
6351
|
encode: false
|
|
6330
6352
|
})}`).then((res)=>res.json());
|
|
6331
6353
|
}
|
|
@@ -6344,7 +6366,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6344
6366
|
conditions: []
|
|
6345
6367
|
};
|
|
6346
6368
|
const { dataset: dataset, isPending: isPending } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
6347
|
-
const title = dataset.title ? dataset.title :
|
|
6369
|
+
const title = dataset.title ? dataset.title : "";
|
|
6348
6370
|
const metadataMapping = {
|
|
6349
6371
|
...(0, $6da0396069e23175$export$bc27cf7ecf44639d),
|
|
6350
6372
|
...customMetadataMapping
|
|
@@ -6352,7 +6374,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6352
6374
|
let distribution = {};
|
|
6353
6375
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
6354
6376
|
if (distributions.length) distribution = distributions[0];
|
|
6355
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
6377
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
6356
6378
|
...options,
|
|
6357
6379
|
limit: defaultPageSize
|
|
6358
6380
|
});
|
|
@@ -6364,7 +6386,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6364
6386
|
}) : null;
|
|
6365
6387
|
(0, $hgUW1$useEffect)(()=>{
|
|
6366
6388
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6367
|
-
if (localFileFormat ===
|
|
6389
|
+
if (localFileFormat === "csv") resource.setResource(distribution.identifier);
|
|
6368
6390
|
}, [
|
|
6369
6391
|
distribution
|
|
6370
6392
|
]);
|
|
@@ -6419,27 +6441,27 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6419
6441
|
distribution,
|
|
6420
6442
|
window.location.hash
|
|
6421
6443
|
]);
|
|
6422
|
-
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType ===
|
|
6444
|
+
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === "application/vnd.tableschema+json" || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
6423
6445
|
const formatType = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6424
6446
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6425
6447
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
6426
6448
|
content: notFoundContent,
|
|
6427
6449
|
siteUrl: rootUrl
|
|
6428
6450
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6429
|
-
className:
|
|
6451
|
+
className: "ds-l-container",
|
|
6430
6452
|
children: [
|
|
6431
6453
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6432
|
-
className:
|
|
6454
|
+
className: "ds-l-row",
|
|
6433
6455
|
children: [
|
|
6434
6456
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6435
|
-
className:
|
|
6457
|
+
className: "ds-l-md-col--9",
|
|
6436
6458
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
6437
6459
|
className: "ds-text-heading--3xl",
|
|
6438
6460
|
children: title
|
|
6439
6461
|
})
|
|
6440
6462
|
}),
|
|
6441
6463
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6442
|
-
className:
|
|
6464
|
+
className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
|
|
6443
6465
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
6444
6466
|
className: "ds-u-margin--0",
|
|
6445
6467
|
children: [
|
|
@@ -6451,7 +6473,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6451
6473
|
})
|
|
6452
6474
|
}),
|
|
6453
6475
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6454
|
-
className:
|
|
6476
|
+
className: "ds-l-md-col--9",
|
|
6455
6477
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
6456
6478
|
distribution: distribution,
|
|
6457
6479
|
dataset: dataset,
|
|
@@ -6463,9 +6485,9 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6463
6485
|
]
|
|
6464
6486
|
}),
|
|
6465
6487
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6466
|
-
className:
|
|
6488
|
+
className: "ds-l-row",
|
|
6467
6489
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6468
|
-
className:
|
|
6490
|
+
className: "ds-l-md-col--12 dc-dataset",
|
|
6469
6491
|
children: !isPending && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tabs), {
|
|
6470
6492
|
onChange: (selectedId, prevSelectedId)=>{
|
|
6471
6493
|
setSelectedTab(selectedId);
|
|
@@ -6473,7 +6495,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6473
6495
|
selectedId: selectedTab,
|
|
6474
6496
|
children: [
|
|
6475
6497
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6476
|
-
id:
|
|
6498
|
+
id: "data-table",
|
|
6477
6499
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6478
6500
|
className: "ds-u-color--primary",
|
|
6479
6501
|
children: [
|
|
@@ -6483,7 +6505,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6483
6505
|
"Data Table"
|
|
6484
6506
|
]
|
|
6485
6507
|
}),
|
|
6486
|
-
className: borderlessTabs ?
|
|
6508
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6487
6509
|
children: (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
6488
6510
|
value: {
|
|
6489
6511
|
id: id,
|
|
@@ -6500,7 +6522,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6500
6522
|
})
|
|
6501
6523
|
}),
|
|
6502
6524
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6503
|
-
id:
|
|
6525
|
+
id: "overview",
|
|
6504
6526
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6505
6527
|
className: "ds-u-color--primary",
|
|
6506
6528
|
children: [
|
|
@@ -6510,7 +6532,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6510
6532
|
"Overview"
|
|
6511
6533
|
]
|
|
6512
6534
|
}),
|
|
6513
|
-
className: borderlessTabs ?
|
|
6535
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6514
6536
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
|
|
6515
6537
|
resource: resource,
|
|
6516
6538
|
dataset: dataset,
|
|
@@ -6520,7 +6542,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6520
6542
|
})
|
|
6521
6543
|
}),
|
|
6522
6544
|
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6523
|
-
id:
|
|
6545
|
+
id: "data-dictionary",
|
|
6524
6546
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6525
6547
|
className: "ds-u-color--primary",
|
|
6526
6548
|
children: [
|
|
@@ -6530,7 +6552,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6530
6552
|
"Data Dictionary"
|
|
6531
6553
|
]
|
|
6532
6554
|
}),
|
|
6533
|
-
className: borderlessTabs ?
|
|
6555
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6534
6556
|
children: displayDataDictionaryTab ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
6535
6557
|
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
6536
6558
|
datasetDictionaryEndpoint: distribution.data.describedBy,
|
|
@@ -6541,7 +6563,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6541
6563
|
})
|
|
6542
6564
|
}),
|
|
6543
6565
|
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6544
|
-
id:
|
|
6566
|
+
id: "api",
|
|
6545
6567
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6546
6568
|
className: "ds-u-color--primary",
|
|
6547
6569
|
children: [
|
|
@@ -6551,7 +6573,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6551
6573
|
"API"
|
|
6552
6574
|
]
|
|
6553
6575
|
}),
|
|
6554
|
-
className: borderlessTabs ?
|
|
6576
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6555
6577
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
|
|
6556
6578
|
id: id,
|
|
6557
6579
|
rootUrl: rootUrl,
|
|
@@ -6588,13 +6610,13 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6588
6610
|
});
|
|
6589
6611
|
const menu = (0, $hgUW1$useRef)(null);
|
|
6590
6612
|
function closeMobileMenu() {
|
|
6591
|
-
const mobileMenuButtonElement = document.querySelector(
|
|
6613
|
+
const mobileMenuButtonElement = document.querySelector(".dkan-c-mobile-menu-button");
|
|
6592
6614
|
if (!mobileMenuButtonElement) return;
|
|
6593
6615
|
mobileMenuButtonElement.focus();
|
|
6594
6616
|
}
|
|
6595
6617
|
// Close mobile menu with escape.
|
|
6596
6618
|
function handleMenuClose(event) {
|
|
6597
|
-
if (event.key ===
|
|
6619
|
+
if (event.key === "Escape" && mobileMenuOpen) setMobileMenuOpen(false);
|
|
6598
6620
|
}
|
|
6599
6621
|
function handleClick(event) {
|
|
6600
6622
|
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
@@ -6629,7 +6651,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6629
6651
|
const focusableEls = getFocusableElements(menu.current).selectors.visible;
|
|
6630
6652
|
const firstEl = focusableEls[0];
|
|
6631
6653
|
const lastEl = focusableEls[focusableEls.length - 1];
|
|
6632
|
-
if (event.key ===
|
|
6654
|
+
if (event.key === "Tab") {
|
|
6633
6655
|
if (event.shiftKey && document.activeElement === firstEl) {
|
|
6634
6656
|
lastEl?.focus();
|
|
6635
6657
|
event.preventDefault();
|
|
@@ -6641,15 +6663,15 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6641
6663
|
}
|
|
6642
6664
|
};
|
|
6643
6665
|
(0, $hgUW1$useEffect)(()=>{
|
|
6644
|
-
document.addEventListener(
|
|
6645
|
-
document.addEventListener(
|
|
6666
|
+
document.addEventListener("keyup", handleMenuClose);
|
|
6667
|
+
document.addEventListener("mousedown", handleClick);
|
|
6646
6668
|
if (mobileMenuOpen) handleFocusIn();
|
|
6647
6669
|
else closeMobileMenu();
|
|
6648
|
-
if (menu.current) menu.current.addEventListener(
|
|
6670
|
+
if (menu.current) menu.current.addEventListener("keydown", (evt)=>trapFocus(evt));
|
|
6649
6671
|
return ()=>{
|
|
6650
|
-
document.removeEventListener(
|
|
6651
|
-
document.addEventListener(
|
|
6652
|
-
if (menu.current) menu.current.removeEventListener(
|
|
6672
|
+
document.removeEventListener("keyup", handleMenuClose);
|
|
6673
|
+
document.addEventListener("mousedown", handleClick);
|
|
6674
|
+
if (menu.current) menu.current.removeEventListener("keydown", trapFocus);
|
|
6653
6675
|
};
|
|
6654
6676
|
}, [
|
|
6655
6677
|
mobileMenuOpen
|
|
@@ -6664,7 +6686,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6664
6686
|
},
|
|
6665
6687
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
|
|
6666
6688
|
"aria-label": "Site header",
|
|
6667
|
-
className: `dkan-c-header dkan-c-header--${mobileMax ?
|
|
6689
|
+
className: `dkan-c-header dkan-c-header--${mobileMax ? "mobile" : "desktop"}`,
|
|
6668
6690
|
children: [
|
|
6669
6691
|
topNav && topNav,
|
|
6670
6692
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6692,28 +6714,22 @@ var $b9af6ce5e2c06331$export$2e2bcd8739ae039 = $b9af6ce5e2c06331$var$Header;
|
|
|
6692
6714
|
|
|
6693
6715
|
|
|
6694
6716
|
|
|
6695
|
-
|
|
6696
6717
|
const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null, wrapLabel: wrapLabel = false, clickHandler: clickHandler })=>{
|
|
6697
6718
|
const innerHtml = wrapLabel ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
6698
6719
|
children: link.label
|
|
6699
6720
|
}) : link.label;
|
|
6700
|
-
return /*#__PURE__*/ (0, $hgUW1$
|
|
6721
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
6701
6722
|
className: ({ isActive: isActive })=>isActive ? `dc-c-active-link ${className}` : `${className}`,
|
|
6702
6723
|
to: link.url,
|
|
6703
6724
|
onClick: clickHandler ? clickHandler : undefined,
|
|
6704
|
-
children:
|
|
6705
|
-
innerHtml,
|
|
6706
|
-
link?.target === '_blank' && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ExternalLinkIcon), {
|
|
6707
|
-
className: "ds-u-margin-left--05 ds-c-external-link-icon"
|
|
6708
|
-
})
|
|
6709
|
-
]
|
|
6725
|
+
children: innerHtml
|
|
6710
6726
|
});
|
|
6711
6727
|
// }
|
|
6712
6728
|
};
|
|
6713
6729
|
var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
|
|
6714
6730
|
|
|
6715
6731
|
|
|
6716
|
-
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle =
|
|
6732
|
+
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle = "Get Email Updates", emailBody: emailBody = "Sign up to get the latest information from CMS by choosing the topics and frequency of emails that are best for you.", emailLink: emailLink = "", emailButton: emailButton = "Sign up for email updates", socialMediaLinks: socialMediaLinks = null, hhsLogo: hhsLogo, cmsLogo: cmsLogo, trademarkContent: trademarkContent = /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6717
6733
|
children: [
|
|
6718
6734
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6719
6735
|
children: "A federal government website managed and paid for by the U.S. Centers for Medicare & Medicaid Services."
|
|
@@ -6801,14 +6817,14 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6801
6817
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
6802
6818
|
className: "ds-u-font-size--sm",
|
|
6803
6819
|
children: footerAdditionalResourcesLinks.filter((link)=>{
|
|
6804
|
-
const noOnClick = Object.keys(link).findIndex((l)=>l ===
|
|
6820
|
+
const noOnClick = Object.keys(link).findIndex((l)=>l === "onClick");
|
|
6805
6821
|
if (noOnClick === -1 || link.onClick && link.dataTag) return link;
|
|
6806
6822
|
}).map((link)=>{
|
|
6807
6823
|
if (link.onClick && link.dataTag) return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
6808
6824
|
className: "ds-u-margin-bottom--1",
|
|
6809
6825
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
6810
6826
|
href: link.url,
|
|
6811
|
-
[
|
|
6827
|
+
["data-" + link.dataTag.name]: link.dataTag.value,
|
|
6812
6828
|
onClick: link.onClick,
|
|
6813
6829
|
children: link.label
|
|
6814
6830
|
})
|
|
@@ -6908,7 +6924,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6908
6924
|
children: [
|
|
6909
6925
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6910
6926
|
id: "svg-inline--fa-title-iRCARP7h6Kp3",
|
|
6911
|
-
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title :
|
|
6927
|
+
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title : "CMS Facebook"
|
|
6912
6928
|
}),
|
|
6913
6929
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6914
6930
|
transform: "translate(160 256)",
|
|
@@ -6961,7 +6977,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6961
6977
|
children: [
|
|
6962
6978
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6963
6979
|
id: "svg-inline--fa-title-4z03ITiPPTVF",
|
|
6964
|
-
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title :
|
|
6980
|
+
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title : "CMS Twitter"
|
|
6965
6981
|
}),
|
|
6966
6982
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6967
6983
|
transform: "translate(256 256)",
|
|
@@ -7014,7 +7030,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7014
7030
|
children: [
|
|
7015
7031
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7016
7032
|
id: "svg-inline--fa-title-Nm2qsuSKvuRZ",
|
|
7017
|
-
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title :
|
|
7033
|
+
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title : "CMS LinkedIn"
|
|
7018
7034
|
}),
|
|
7019
7035
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
7020
7036
|
transform: "translate(224 256)",
|
|
@@ -7066,7 +7082,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7066
7082
|
children: [
|
|
7067
7083
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7068
7084
|
id: "svg-inline--fa-title-youtube",
|
|
7069
|
-
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title :
|
|
7085
|
+
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title : "CMS youtube"
|
|
7070
7086
|
}),
|
|
7071
7087
|
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
7072
7088
|
fill: "currentColor",
|
|
@@ -7096,15 +7112,10 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7096
7112
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
7097
7113
|
className: "ds-u-padding--0 ds-u-display--flex ds-u-lg-flex-direction--row ds-u-flex-direction--column",
|
|
7098
7114
|
children: footerUtilityLinks.map((link)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
7099
|
-
children: /*#__PURE__*/ (0, $hgUW1$
|
|
7115
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
7100
7116
|
href: link.url,
|
|
7101
7117
|
className: "ds-u-margin-right--2",
|
|
7102
|
-
children:
|
|
7103
|
-
link.label,
|
|
7104
|
-
link?.target === '_blank' && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ExternalLinkIcon), {
|
|
7105
|
-
className: "ds-u-margin-left--05 ds-c-external-link-icon"
|
|
7106
|
-
})
|
|
7107
|
-
]
|
|
7118
|
+
children: link.label
|
|
7108
7119
|
})
|
|
7109
7120
|
}, link.id))
|
|
7110
7121
|
})
|
|
@@ -7171,26 +7182,26 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7171
7182
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
7172
7183
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
7173
7184
|
stackable: true,
|
|
7174
|
-
className:
|
|
7185
|
+
className: "ds-c-table",
|
|
7175
7186
|
children: [
|
|
7176
7187
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
|
|
7177
7188
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
7178
7189
|
children: [
|
|
7179
7190
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7180
|
-
id:
|
|
7181
|
-
headers:
|
|
7191
|
+
id: "application",
|
|
7192
|
+
headers: "Application",
|
|
7182
7193
|
children: "Application"
|
|
7183
|
-
},
|
|
7194
|
+
}, "Application"),
|
|
7184
7195
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7185
|
-
id:
|
|
7186
|
-
headers:
|
|
7196
|
+
id: "notes",
|
|
7197
|
+
headers: "Notes",
|
|
7187
7198
|
children: "Notes"
|
|
7188
|
-
},
|
|
7199
|
+
}, "Notes"),
|
|
7189
7200
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7190
|
-
id:
|
|
7191
|
-
headers:
|
|
7201
|
+
id: "links",
|
|
7202
|
+
headers: "Links",
|
|
7192
7203
|
children: "Links"
|
|
7193
|
-
},
|
|
7204
|
+
}, "Links")
|
|
7194
7205
|
]
|
|
7195
7206
|
})
|
|
7196
7207
|
}),
|
|
@@ -7200,19 +7211,19 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7200
7211
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7201
7212
|
id: d.id,
|
|
7202
7213
|
stackedTitle: "Application",
|
|
7203
|
-
headers:
|
|
7214
|
+
headers: "Application",
|
|
7204
7215
|
children: d.application
|
|
7205
7216
|
}, d.id),
|
|
7206
7217
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7207
7218
|
id: d.id,
|
|
7208
7219
|
stackedTitle: "Notes",
|
|
7209
|
-
headers:
|
|
7220
|
+
headers: "Notes",
|
|
7210
7221
|
children: d.notes
|
|
7211
7222
|
}, `${d.id}-notes`),
|
|
7212
7223
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7213
7224
|
id: d.id,
|
|
7214
7225
|
stackedTitle: "Links",
|
|
7215
|
-
headers:
|
|
7226
|
+
headers: "Links",
|
|
7216
7227
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
7217
7228
|
className: "dkan-newtab",
|
|
7218
7229
|
href: d.link,
|
|
@@ -7240,44 +7251,44 @@ var $5655284dbbb89508$export$2e2bcd8739ae039 = $5655284dbbb89508$var$Documentati
|
|
|
7240
7251
|
|
|
7241
7252
|
const $c7bf75f7e8a68780$export$7850f4d545d994c6 = [
|
|
7242
7253
|
{
|
|
7243
|
-
id:
|
|
7244
|
-
application:
|
|
7245
|
-
notes:
|
|
7246
|
-
link:
|
|
7247
|
-
linkText:
|
|
7248
|
-
screenReaderOnlyText:
|
|
7254
|
+
id: "excel",
|
|
7255
|
+
application: "Microsoft Excel",
|
|
7256
|
+
notes: "Official size limitations for Microsoft Excel",
|
|
7257
|
+
link: "https://support.microsoft.com/en-us/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3?redirectSourcePath=%252fen-us%252farticle%252fExcel-specifications-and-limits-ca36e2dc-1f09-4620-b726-67c00b05040f",
|
|
7258
|
+
linkText: "Excel Specifications and Limits",
|
|
7259
|
+
screenReaderOnlyText: "on microsoft.com"
|
|
7249
7260
|
},
|
|
7250
7261
|
{
|
|
7251
|
-
id:
|
|
7252
|
-
application:
|
|
7253
|
-
notes:
|
|
7254
|
-
link:
|
|
7255
|
-
linkText:
|
|
7256
|
-
screenReaderOnlyText:
|
|
7262
|
+
id: "access",
|
|
7263
|
+
application: "Microsoft Access",
|
|
7264
|
+
notes: "Official size limitations for Microsoft Access",
|
|
7265
|
+
link: "https://support.microsoft.com/en-us/office/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c?ui=en-us&rs=en-us&ad=us",
|
|
7266
|
+
linkText: "Access 2016 Specifications",
|
|
7267
|
+
screenReaderOnlyText: "on microsoft.com"
|
|
7257
7268
|
},
|
|
7258
7269
|
{
|
|
7259
|
-
id:
|
|
7260
|
-
application:
|
|
7261
|
-
notes:
|
|
7262
|
-
link:
|
|
7263
|
-
linkText:
|
|
7264
|
-
screenReaderOnlyText:
|
|
7270
|
+
id: "oracle-sql-developer",
|
|
7271
|
+
application: "Oracle SQL Developer",
|
|
7272
|
+
notes: "Oracle SQL Developer tool",
|
|
7273
|
+
link: "https://www.oracle.com/database/sqldeveloper/",
|
|
7274
|
+
linkText: "Oracle SQL Developer Overview",
|
|
7275
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7265
7276
|
},
|
|
7266
7277
|
{
|
|
7267
|
-
id:
|
|
7268
|
-
application:
|
|
7269
|
-
notes:
|
|
7270
|
-
link:
|
|
7271
|
-
linkText:
|
|
7272
|
-
screenReaderOnlyText:
|
|
7278
|
+
id: "oracle-database",
|
|
7279
|
+
application: "Oracle Database",
|
|
7280
|
+
notes: "Oracle Database official size limitations",
|
|
7281
|
+
link: "https://docs.oracle.com/cd/B28359_01/server.111/b28320/limits002.htm#i287915",
|
|
7282
|
+
linkText: "Oracle Physical Database Limits",
|
|
7283
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7273
7284
|
},
|
|
7274
7285
|
{
|
|
7275
|
-
id:
|
|
7276
|
-
application:
|
|
7277
|
-
notes:
|
|
7278
|
-
link:
|
|
7279
|
-
linkText:
|
|
7280
|
-
screenReaderOnlyText:
|
|
7286
|
+
id: "oracle-sql-client-tools",
|
|
7287
|
+
application: "Oracle SQL Client Tools",
|
|
7288
|
+
notes: "Oracle SQL Client Tools",
|
|
7289
|
+
link: "https://www.oracle.com/database/technologies/oracle-database-software-downloads.html",
|
|
7290
|
+
linkText: "Oracle SQL Client",
|
|
7291
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7281
7292
|
}
|
|
7282
7293
|
];
|
|
7283
7294
|
|
|
@@ -7305,7 +7316,7 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7305
7316
|
}),
|
|
7306
7317
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
7307
7318
|
heading: "Notice",
|
|
7308
|
-
className:
|
|
7319
|
+
className: "ds-u-margin-top--6",
|
|
7309
7320
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
7310
7321
|
className: "ds-c-alert__text",
|
|
7311
7322
|
children: "Be aware of the file size and row limitations of the software you are attempting to import the files into. For information on limitations, look at the software's official documentation."
|
|
@@ -7314,16 +7325,16 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7314
7325
|
]
|
|
7315
7326
|
}),
|
|
7316
7327
|
/*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7317
|
-
className:
|
|
7328
|
+
className: "ds-u-margin-top--4 ds-l-row",
|
|
7318
7329
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7319
|
-
className:
|
|
7330
|
+
className: "ds-l-col--12",
|
|
7320
7331
|
children: [
|
|
7321
7332
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
7322
7333
|
className: "ds-text-heading--2xl ds-text-heading--2xl",
|
|
7323
7334
|
children: "Documentation by Application"
|
|
7324
7335
|
}),
|
|
7325
7336
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7326
|
-
className:
|
|
7337
|
+
className: "ds-u-margin-top--4",
|
|
7327
7338
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5655284dbbb89508$export$2e2bcd8739ae039), {
|
|
7328
7339
|
data: documentationList
|
|
7329
7340
|
})
|
|
@@ -7351,7 +7362,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7351
7362
|
const options = {
|
|
7352
7363
|
conditions: query ? JSON.parse(query).map(({ column: column, operator: operator, ...rest })=>({
|
|
7353
7364
|
property: column,
|
|
7354
|
-
operator: operator ===
|
|
7365
|
+
operator: operator === "is" ? "=" : operator === "is not" ? "<>" : operator === "or" ? "in" : operator,
|
|
7355
7366
|
...rest
|
|
7356
7367
|
})) : []
|
|
7357
7368
|
};
|
|
@@ -7359,13 +7370,13 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7359
7370
|
let distribution = {};
|
|
7360
7371
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
7361
7372
|
if (distributions.length) distribution = distributions[distributionIndex];
|
|
7362
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7373
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
7363
7374
|
...options,
|
|
7364
7375
|
limit: defaultPageSize
|
|
7365
7376
|
});
|
|
7366
7377
|
(0, $hgUW1$useEffect)(()=>{
|
|
7367
7378
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
7368
|
-
if (localFileFormat ===
|
|
7379
|
+
if (localFileFormat === "csv") resource.setResource(distribution.identifier);
|
|
7369
7380
|
}, [
|
|
7370
7381
|
distribution
|
|
7371
7382
|
]);
|
|
@@ -7415,7 +7426,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7415
7426
|
|
|
7416
7427
|
|
|
7417
7428
|
function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
|
|
7418
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7429
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
7419
7430
|
const newDate = new Date(condition.value);
|
|
7420
7431
|
if (newDate instanceof Date && !isNaN(newDate)) return newDate;
|
|
7421
7432
|
}
|
|
@@ -7432,9 +7443,9 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7432
7443
|
const [startDate, setStartDate] = (0, $hgUW1$react).useState($374c4669b044ddf8$var$getStartDate(condition, schema, id));
|
|
7433
7444
|
(0, $hgUW1$useEffect)(()=>{
|
|
7434
7445
|
if (property !== condition.property) {
|
|
7435
|
-
if (property) update(index,
|
|
7436
|
-
else update(index,
|
|
7437
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7446
|
+
if (property) update(index, "property", property);
|
|
7447
|
+
else update(index, "property", "");
|
|
7448
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
7438
7449
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
7439
7450
|
}
|
|
7440
7451
|
}
|
|
@@ -7448,16 +7459,16 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7448
7459
|
]);
|
|
7449
7460
|
(0, $hgUW1$useEffect)(()=>{
|
|
7450
7461
|
if (operator !== condition.operator) {
|
|
7451
|
-
if (operator) update(index,
|
|
7452
|
-
else update(index,
|
|
7462
|
+
if (operator) update(index, "operator", operator);
|
|
7463
|
+
else update(index, "operator", "");
|
|
7453
7464
|
}
|
|
7454
7465
|
}, [
|
|
7455
7466
|
operator
|
|
7456
7467
|
]);
|
|
7457
7468
|
(0, $hgUW1$useEffect)(()=>{
|
|
7458
7469
|
if (value !== condition.value) {
|
|
7459
|
-
if (value) update(index,
|
|
7460
|
-
else update(index,
|
|
7470
|
+
if (value) update(index, "value", value);
|
|
7471
|
+
else update(index, "value", "");
|
|
7461
7472
|
}
|
|
7462
7473
|
}, [
|
|
7463
7474
|
value
|
|
@@ -7481,7 +7492,7 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7481
7492
|
onChange: (e)=>setOperator(e.target.value),
|
|
7482
7493
|
className: "ds-l-sm-col--3 ds-l-md-col--2 ds-l-col--12 ds-u-padding--0 ds-u-md-padding-right--2 ds-u-margin-bottom--0 ds-u-md-margin-bottom--2"
|
|
7483
7494
|
}),
|
|
7484
|
-
schema[id].fields[property].mysql_type ===
|
|
7495
|
+
schema[id].fields[property].mysql_type === "date" ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7485
7496
|
className: "ds-l-md-col--5 ds-l-lg-col--4 ds-l-sm-col--8 ds-l-col--12 ds-u-padding--0 ds-u-sm-padding-right--2 ds-u-md-padding-right--0 ds-u-lg-padding-right--2 ds-u-margin-bottom--2",
|
|
7486
7497
|
children: [
|
|
7487
7498
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
@@ -7571,12 +7582,12 @@ const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions, schema: sche
|
|
|
7571
7582
|
className: "ds-u-font-weight--bold",
|
|
7572
7583
|
children: description
|
|
7573
7584
|
}),
|
|
7574
|
-
|
|
7585
|
+
" ",
|
|
7575
7586
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7576
7587
|
className: "ds-u-font-weight--normal",
|
|
7577
7588
|
children: operator.label.toUpperCase()
|
|
7578
7589
|
}),
|
|
7579
|
-
|
|
7590
|
+
" ",
|
|
7580
7591
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7581
7592
|
className: "ds-u-color--success",
|
|
7582
7593
|
children: formattedText
|
|
@@ -7603,19 +7614,19 @@ var $bef7bff2823feea2$export$2e2bcd8739ae039 = $bef7bff2823feea2$var$QueryTitle;
|
|
|
7603
7614
|
function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
|
|
7604
7615
|
let cond = condition;
|
|
7605
7616
|
delete cond.key;
|
|
7606
|
-
if (cond.operator ===
|
|
7617
|
+
if (cond.operator === "=" || cond.operator === "<>") {
|
|
7607
7618
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7608
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7619
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
7609
7620
|
}
|
|
7610
|
-
if (cond.operator.toLowerCase() ===
|
|
7621
|
+
if (cond.operator.toLowerCase() === "like") {
|
|
7611
7622
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7612
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7623
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
7613
7624
|
cond.value = `%${cleanedValue}%`;
|
|
7614
7625
|
}
|
|
7615
|
-
if (cond.operator.toLowerCase() ===
|
|
7616
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
7626
|
+
if (cond.operator.toLowerCase() === "in") {
|
|
7627
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(",");
|
|
7617
7628
|
}
|
|
7618
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
7629
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
|
|
7619
7630
|
return cond;
|
|
7620
7631
|
}
|
|
7621
7632
|
const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, setOffset: setOffset })=>{
|
|
@@ -7635,7 +7646,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7635
7646
|
...queryConditions,
|
|
7636
7647
|
{
|
|
7637
7648
|
property: fields[0],
|
|
7638
|
-
value:
|
|
7649
|
+
value: "",
|
|
7639
7650
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
7640
7651
|
key: Date.now()
|
|
7641
7652
|
}
|
|
@@ -7675,7 +7686,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7675
7686
|
encodeValuesOnly: true,
|
|
7676
7687
|
addQueryPrefix: true
|
|
7677
7688
|
});
|
|
7678
|
-
window.history.pushState({},
|
|
7689
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
7679
7690
|
};
|
|
7680
7691
|
const updateCondition = (index, key, value)=>{
|
|
7681
7692
|
let newConditions = [
|
|
@@ -7748,7 +7759,7 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
|
|
|
7748
7759
|
|
|
7749
7760
|
|
|
7750
7761
|
const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset, distIndex: distIndex, location: location, customColumns: customColumns, columnSettings: columnSettings, columnWidths: columnWidths, customTitle: customTitle, customDescription: customDescription, rootUrl: rootUrl, updateAriaLive: updateAriaLive })=>{
|
|
7751
|
-
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState(
|
|
7762
|
+
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState("ds-u-padding-y--1");
|
|
7752
7763
|
let apiDocs = (0, $hgUW1$useRef)();
|
|
7753
7764
|
let distribution = {};
|
|
7754
7765
|
let distribution_array = dataset.distribution ? dataset.distribution : [];
|
|
@@ -7760,7 +7771,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7760
7771
|
} : {
|
|
7761
7772
|
conditions: []
|
|
7762
7773
|
};
|
|
7763
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7774
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
7764
7775
|
...options,
|
|
7765
7776
|
limit: 25
|
|
7766
7777
|
});
|
|
@@ -7774,7 +7785,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7774
7785
|
}, {
|
|
7775
7786
|
encode: true
|
|
7776
7787
|
})}&format=csv`;
|
|
7777
|
-
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !==
|
|
7788
|
+
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !== "csv" ? distribution.data.title : dataset.title;
|
|
7778
7789
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
7779
7790
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7780
7791
|
className: "ds-l-container ds-u-padding-bottom--3 ds-u-margin-bottom--2",
|
|
@@ -7783,7 +7794,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7783
7794
|
children: Object.keys(distribution).length && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
7784
7795
|
children: [
|
|
7785
7796
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7786
|
-
className:
|
|
7797
|
+
className: "ds-l-md-col--9",
|
|
7787
7798
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
7788
7799
|
to: `/dataset/${id}`,
|
|
7789
7800
|
className: "ds-u-padding-y--4 ds-u-display--block",
|
|
@@ -7794,14 +7805,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7794
7805
|
})
|
|
7795
7806
|
}),
|
|
7796
7807
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7797
|
-
className:
|
|
7808
|
+
className: "ds-l-md-col--9",
|
|
7798
7809
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
7799
7810
|
className: "ds-text-heading--3xl",
|
|
7800
7811
|
children: customTitle ? customTitle : pageTitle
|
|
7801
7812
|
})
|
|
7802
7813
|
}),
|
|
7803
7814
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7804
|
-
className:
|
|
7815
|
+
className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
|
|
7805
7816
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
7806
7817
|
className: "ds-u-margin--0",
|
|
7807
7818
|
children: [
|
|
@@ -7813,7 +7824,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7813
7824
|
})
|
|
7814
7825
|
}),
|
|
7815
7826
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7816
|
-
className:
|
|
7827
|
+
className: "ds-l-md-col--9",
|
|
7817
7828
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
7818
7829
|
distribution: distribution,
|
|
7819
7830
|
dataset: dataset,
|
|
@@ -7823,13 +7834,13 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7823
7834
|
})
|
|
7824
7835
|
}),
|
|
7825
7836
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7826
|
-
className:
|
|
7837
|
+
className: "ds-l-md-col--12",
|
|
7827
7838
|
children: Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
|
|
7828
7839
|
resource: resource,
|
|
7829
7840
|
id: distribution.identifier,
|
|
7830
7841
|
customColumns: customColumns,
|
|
7831
7842
|
setOffset: resource.setOffset
|
|
7832
|
-
}) :
|
|
7843
|
+
}) : ""
|
|
7833
7844
|
}),
|
|
7834
7845
|
Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
7835
7846
|
value: {
|
|
@@ -7840,7 +7851,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7840
7851
|
customColumns: (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution_array[distIndex].identifier])
|
|
7841
7852
|
},
|
|
7842
7853
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7843
|
-
className:
|
|
7854
|
+
className: "ds-l-md-col--12",
|
|
7844
7855
|
children: [
|
|
7845
7856
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $af099c546cb226c7$export$2e2bcd8739ae039), {
|
|
7846
7857
|
includeDensity: true,
|
|
@@ -7862,14 +7873,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7862
7873
|
]
|
|
7863
7874
|
})
|
|
7864
7875
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7865
|
-
className:
|
|
7876
|
+
className: "ds-l-md-col--12",
|
|
7866
7877
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
7867
7878
|
role: "status",
|
|
7868
7879
|
"aria-valuetext": "Resource loading"
|
|
7869
7880
|
})
|
|
7870
7881
|
}),
|
|
7871
7882
|
dataset.identifier && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7872
|
-
className:
|
|
7883
|
+
className: "ds-l-md-col--12",
|
|
7873
7884
|
ref: apiDocs,
|
|
7874
7885
|
children: [
|
|
7875
7886
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
@@ -7878,7 +7889,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7878
7889
|
}),
|
|
7879
7890
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
7880
7891
|
url: `${rootUrl}/metastore/schemas/dataset/items/${dataset.identifier}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`,
|
|
7881
|
-
docExpansion:
|
|
7892
|
+
docExpansion: "list",
|
|
7882
7893
|
defaultModelsExpandDepth: -1
|
|
7883
7894
|
})
|
|
7884
7895
|
]
|
|
@@ -7897,7 +7908,7 @@ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, loca
|
|
|
7897
7908
|
const [ready, setReady] = (0, $hgUW1$useState)(false);
|
|
7898
7909
|
const [error, setError] = (0, $hgUW1$useState)(false);
|
|
7899
7910
|
const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
7900
|
-
const distIndex = dist_id ===
|
|
7911
|
+
const distIndex = dist_id === "data" ? 0 : dist_id;
|
|
7901
7912
|
(0, $hgUW1$useEffect)(()=>{
|
|
7902
7913
|
if (dataset.error) setError(true);
|
|
7903
7914
|
if (dataset.distribution && dataset.distribution.length) {
|