@civicactions/cmsds-open-data-components 4.0.0-alpha.4 → 4.0.0
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/README.md +33 -0
- package/dist/main.css.map +1 -1
- package/dist/main.js +551 -551
- 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 +10 -3
package/dist/main.js
CHANGED
|
@@ -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
|
}
|
|
@@ -2259,13 +2259,13 @@ function $7264a673914aa746$export$2b9377795161999(type) {
|
|
|
2259
2259
|
|
|
2260
2260
|
|
|
2261
2261
|
const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: header, sortElement: sortElement, setAriaLiveFeedback: setAriaLiveFeedback })=>{
|
|
2262
|
-
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)(
|
|
2262
|
+
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)("");
|
|
2263
2263
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("th", {
|
|
2264
2264
|
key: header.id,
|
|
2265
2265
|
style: {
|
|
2266
2266
|
width: header.getSize()
|
|
2267
2267
|
},
|
|
2268
|
-
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header :
|
|
2268
|
+
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : "",
|
|
2269
2269
|
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
|
|
2270
2270
|
children: [
|
|
2271
2271
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
@@ -2278,7 +2278,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2278
2278
|
}),
|
|
2279
2279
|
sortElement && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2280
2280
|
onClick: header.column.getToggleSortingHandler(),
|
|
2281
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
2281
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : "",
|
|
2282
2282
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
2283
2283
|
})
|
|
2284
2284
|
]
|
|
@@ -2286,18 +2286,18 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2286
2286
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2287
2287
|
onMouseDown: header.getResizeHandler(),
|
|
2288
2288
|
onTouchStart: header.getResizeHandler(),
|
|
2289
|
-
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ?
|
|
2289
|
+
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ? "isResizing" : ""}`,
|
|
2290
2290
|
"aria-label": `Resize ${header.column.columnDef.header} column`,
|
|
2291
2291
|
onKeyDown: (e)=>{
|
|
2292
2292
|
const columnSizingObject = table.getState().columnSizing;
|
|
2293
2293
|
switch(e.key){
|
|
2294
|
-
case
|
|
2295
|
-
case
|
|
2294
|
+
case "Enter":
|
|
2295
|
+
case " ":
|
|
2296
2296
|
e.preventDefault();
|
|
2297
2297
|
e.stopPropagation();
|
|
2298
2298
|
if (columnResizing) {
|
|
2299
2299
|
// end resizing
|
|
2300
|
-
setColumnResizing(
|
|
2300
|
+
setColumnResizing("");
|
|
2301
2301
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2302
2302
|
} else {
|
|
2303
2303
|
// start resizing
|
|
@@ -2305,13 +2305,13 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2305
2305
|
setAriaLiveFeedback(`${header.column.columnDef.header} grabbed.`);
|
|
2306
2306
|
}
|
|
2307
2307
|
break;
|
|
2308
|
-
case
|
|
2308
|
+
case "Escape":
|
|
2309
2309
|
if (columnResizing) {
|
|
2310
|
-
setColumnResizing(
|
|
2310
|
+
setColumnResizing("");
|
|
2311
2311
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2312
2312
|
}
|
|
2313
2313
|
break;
|
|
2314
|
-
case
|
|
2314
|
+
case "ArrowRight":
|
|
2315
2315
|
e.preventDefault();
|
|
2316
2316
|
e.stopPropagation();
|
|
2317
2317
|
if (columnResizing) {
|
|
@@ -2320,7 +2320,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2320
2320
|
setAriaLiveFeedback(`${header.column.columnDef.header} has been resized. The new width is ${header.getSize()} pixels.`);
|
|
2321
2321
|
}
|
|
2322
2322
|
break;
|
|
2323
|
-
case
|
|
2323
|
+
case "ArrowLeft":
|
|
2324
2324
|
e.preventDefault();
|
|
2325
2325
|
e.stopPropagation();
|
|
2326
2326
|
if (columnResizing) {
|
|
@@ -2332,7 +2332,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2332
2332
|
}
|
|
2333
2333
|
},
|
|
2334
2334
|
onBlur: ()=>{
|
|
2335
|
-
setColumnResizing(
|
|
2335
|
+
setColumnResizing("");
|
|
2336
2336
|
}
|
|
2337
2337
|
})
|
|
2338
2338
|
]
|
|
@@ -2381,7 +2381,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2381
2381
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
2382
2382
|
}),
|
|
2383
2383
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2384
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` :
|
|
2384
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` : ""
|
|
2385
2385
|
})
|
|
2386
2386
|
]
|
|
2387
2387
|
})
|
|
@@ -2412,7 +2412,7 @@ const $ee0d4d4f34048447$var$DataTableActionsContextDefaults = {
|
|
|
2412
2412
|
setColumnVisibility: ()=>{},
|
|
2413
2413
|
page: 1,
|
|
2414
2414
|
setPage: ()=>{},
|
|
2415
|
-
tableDensity:
|
|
2415
|
+
tableDensity: "normal",
|
|
2416
2416
|
setTableDensity: ()=>{}
|
|
2417
2417
|
};
|
|
2418
2418
|
const $ee0d4d4f34048447$export$f814ea079e65d8fe = /*#__PURE__*/ (0, $hgUW1$createContext)($ee0d4d4f34048447$var$DataTableActionsContextDefaults);
|
|
@@ -2431,7 +2431,7 @@ const $ee0d4d4f34048447$var$DataTableActionsProvider = ({ children: children })=
|
|
|
2431
2431
|
if (datasetTableControls && localStorageData) return localStorageData.tableColumnVisibility;
|
|
2432
2432
|
else return {};
|
|
2433
2433
|
});
|
|
2434
|
-
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)(
|
|
2434
|
+
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)("normal");
|
|
2435
2435
|
const providerValue = {
|
|
2436
2436
|
columnOrder: columnOrder,
|
|
2437
2437
|
setColumnOrder: setColumnOrder,
|
|
@@ -2478,9 +2478,9 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2478
2478
|
transition: transition,
|
|
2479
2479
|
opacity: isDragging ? 0.7 : 1,
|
|
2480
2480
|
zIndex: isDragging ? 1 : 0,
|
|
2481
|
-
position:
|
|
2482
|
-
background:
|
|
2483
|
-
touchAction:
|
|
2481
|
+
position: "relative",
|
|
2482
|
+
background: "white",
|
|
2483
|
+
touchAction: "none"
|
|
2484
2484
|
};
|
|
2485
2485
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
2486
2486
|
className: "ds-u-display--flex ds-u-justify-content--between ds-u-border-bottom--1",
|
|
@@ -2496,7 +2496,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2496
2496
|
// this code forces the repaint without user interaction
|
|
2497
2497
|
const target = e.target;
|
|
2498
2498
|
if (isDragging && target.tagName.toLowerCase() === "label") setTimeout(()=>{
|
|
2499
|
-
target.parentNode.querySelector(
|
|
2499
|
+
target.parentNode.querySelector("input").checked = visible;
|
|
2500
2500
|
}, 1);
|
|
2501
2501
|
},
|
|
2502
2502
|
children: [
|
|
@@ -2513,7 +2513,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2513
2513
|
}
|
|
2514
2514
|
}),
|
|
2515
2515
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2516
|
-
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging &&
|
|
2516
|
+
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && "grabbed"}`,
|
|
2517
2517
|
"aria-label": `Reorder ${id} column`,
|
|
2518
2518
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2519
2519
|
className: "fa fa-sort"
|
|
@@ -2531,7 +2531,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor extends (0, $hgUW1$Key
|
|
|
2531
2531
|
// Custom function to exclude checkbox from keyboard dragging
|
|
2532
2532
|
static activators = [
|
|
2533
2533
|
{
|
|
2534
|
-
eventName:
|
|
2534
|
+
eventName: "onKeyDown",
|
|
2535
2535
|
handler: ({ nativeEvent: event })=>{
|
|
2536
2536
|
// prevent scrolling the list
|
|
2537
2537
|
const isCheckbox = [
|
|
@@ -2554,7 +2554,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$Poin
|
|
|
2554
2554
|
// Custom function to stop accidental checkbox clicks on pointer activation
|
|
2555
2555
|
static activators = [
|
|
2556
2556
|
{
|
|
2557
|
-
eventName:
|
|
2557
|
+
eventName: "onPointerDown",
|
|
2558
2558
|
handler: ({ nativeEvent: event })=>{
|
|
2559
2559
|
if (event.target.tagName.toLowerCase() === "input") return false;
|
|
2560
2560
|
if (event.target.tagName.toLowerCase() === "label") event.target.blur();
|
|
@@ -2652,13 +2652,13 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
2652
2652
|
className: "ds-u-display--none ds-u-lg-display--inline-block",
|
|
2653
2653
|
children: "Manage Columns"
|
|
2654
2654
|
}),
|
|
2655
|
-
hiddenColumns ? ` (${hiddenColumns})` :
|
|
2655
|
+
hiddenColumns ? ` (${hiddenColumns})` : ""
|
|
2656
2656
|
]
|
|
2657
2657
|
})
|
|
2658
2658
|
]
|
|
2659
2659
|
}),
|
|
2660
2660
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2661
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2661
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
2662
2662
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
|
|
2663
2663
|
heading: "Manage columns",
|
|
2664
2664
|
isOpen: modalOpen,
|
|
@@ -2831,12 +2831,12 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
2831
2831
|
if (Object.keys(resource).length && columns.length && resource.schema && Object.keys(distribution).length) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
2832
2832
|
children: [
|
|
2833
2833
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2834
|
-
className: isModal ?
|
|
2834
|
+
className: isModal ? "dkan-datatable-fullscreen-mode" : "",
|
|
2835
2835
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
|
|
2836
2836
|
canResize: true,
|
|
2837
2837
|
columns: columns,
|
|
2838
2838
|
sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
|
|
2839
|
-
tablePadding: tableDensity ===
|
|
2839
|
+
tablePadding: tableDensity === "normal" ? "ds-u-padding-y--2" : tableDensity === "compact" ? "ds-u-padding-y--1" : "ds-u-padding-y--3",
|
|
2840
2840
|
loading: resource.loading,
|
|
2841
2841
|
isModal: isModal,
|
|
2842
2842
|
downloadURL: downloadURL,
|
|
@@ -2851,14 +2851,14 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
2851
2851
|
}),
|
|
2852
2852
|
!resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2853
2853
|
className: [
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
isModal &&
|
|
2861
|
-
].filter(Boolean).join(
|
|
2854
|
+
"ds-u-display--flex",
|
|
2855
|
+
"ds-u-flex-wrap--wrap",
|
|
2856
|
+
"ds-u-justify-content--end",
|
|
2857
|
+
"ds-u-md-justify-content--between",
|
|
2858
|
+
"ds-u-margin-top--2",
|
|
2859
|
+
"ds-u-align-items--center",
|
|
2860
|
+
isModal && "ds-u-margin-bottom--2"
|
|
2861
|
+
].filter(Boolean).join(" "),
|
|
2862
2862
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
2863
2863
|
totalPages: Math.ceil(resource.count ? resource.count / pageSize : 1),
|
|
2864
2864
|
currentPage: Number(page),
|
|
@@ -2897,7 +2897,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
2897
2897
|
},
|
|
2898
2898
|
children: [
|
|
2899
2899
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2900
|
-
className: `far ${modalOpen ?
|
|
2900
|
+
className: `far ${modalOpen ? "fa-compress" : "fa-expand"} ds-u-margin-right--1`
|
|
2901
2901
|
}),
|
|
2902
2902
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2903
2903
|
className: "ds-u-display--none ds-u-lg-display--inline-block",
|
|
@@ -2906,7 +2906,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
2906
2906
|
]
|
|
2907
2907
|
}),
|
|
2908
2908
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2909
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2909
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
2910
2910
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
2911
2911
|
heading: "Dataset Explorer",
|
|
2912
2912
|
isOpen: modalOpen,
|
|
@@ -2941,13 +2941,13 @@ var $16bd41951b91f02d$export$2e2bcd8739ae039 = $16bd41951b91f02d$var$FullScreenD
|
|
|
2941
2941
|
|
|
2942
2942
|
|
|
2943
2943
|
function $eadd6431fddf4b6c$var$getStartDate(condition, schema, id) {
|
|
2944
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2944
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
2945
2945
|
const newDate = new Date(condition.value.toString());
|
|
2946
2946
|
if (newDate instanceof Date && !isNaN(newDate.getTime())) return newDate;
|
|
2947
2947
|
}
|
|
2948
2948
|
return new Date();
|
|
2949
2949
|
}
|
|
2950
|
-
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className =
|
|
2950
|
+
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className = "" })=>{
|
|
2951
2951
|
const [operator, setOperator] = (0, $hgUW1$useState)(condition.operator);
|
|
2952
2952
|
const [property, setProperty] = (0, $hgUW1$useState)(condition.property);
|
|
2953
2953
|
const [value, setValue] = (0, $hgUW1$useState)(condition.value);
|
|
@@ -2957,9 +2957,9 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
2957
2957
|
});
|
|
2958
2958
|
(0, $hgUW1$useEffect)(()=>{
|
|
2959
2959
|
if (property !== condition.property) {
|
|
2960
|
-
if (property) update(index,
|
|
2961
|
-
else update(index,
|
|
2962
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2960
|
+
if (property) update(index, "property", property);
|
|
2961
|
+
else update(index, "property", "");
|
|
2962
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
2963
2963
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
2964
2964
|
}
|
|
2965
2965
|
}
|
|
@@ -2973,22 +2973,22 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
2973
2973
|
]);
|
|
2974
2974
|
(0, $hgUW1$useEffect)(()=>{
|
|
2975
2975
|
if (operator !== condition.operator) {
|
|
2976
|
-
if (operator) update(index,
|
|
2977
|
-
else update(index,
|
|
2976
|
+
if (operator) update(index, "operator", operator);
|
|
2977
|
+
else update(index, "operator", "");
|
|
2978
2978
|
}
|
|
2979
2979
|
}, [
|
|
2980
2980
|
operator
|
|
2981
2981
|
]);
|
|
2982
2982
|
(0, $hgUW1$useEffect)(()=>{
|
|
2983
2983
|
if (value !== condition.value) {
|
|
2984
|
-
if (value) update(index,
|
|
2985
|
-
else update(index,
|
|
2984
|
+
if (value) update(index, "value", value);
|
|
2985
|
+
else update(index, "value", "");
|
|
2986
2986
|
}
|
|
2987
2987
|
}, [
|
|
2988
2988
|
value
|
|
2989
2989
|
]);
|
|
2990
2990
|
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 !==
|
|
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 !== "" ? ` ${className}` : ""}`,
|
|
2992
2992
|
children: [
|
|
2993
2993
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
2994
2994
|
options: propertyOptions,
|
|
@@ -3006,7 +3006,7 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
3006
3006
|
name: `${condition.key}_operator`,
|
|
3007
3007
|
onChange: (e)=>setOperator(e.target.value)
|
|
3008
3008
|
}),
|
|
3009
|
-
schema[id].fields[property].mysql_type ===
|
|
3009
|
+
schema[id].fields[property].mysql_type === "date" ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
3010
3010
|
children: [
|
|
3011
3011
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
3012
3012
|
className: "ds-c-label",
|
|
@@ -3059,15 +3059,15 @@ var $eadd6431fddf4b6c$export$2e2bcd8739ae039 = $eadd6431fddf4b6c$var$FilterItem;
|
|
|
3059
3059
|
|
|
3060
3060
|
|
|
3061
3061
|
|
|
3062
|
-
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className =
|
|
3062
|
+
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className = "" })=>{
|
|
3063
3063
|
const small = (0, $hgUW1$useMediaQuery)({
|
|
3064
3064
|
minWidth: 0,
|
|
3065
3065
|
maxWidth: 544
|
|
3066
3066
|
});
|
|
3067
3067
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
3068
3068
|
disabled: disabled,
|
|
3069
|
-
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ?
|
|
3070
|
-
variation: small ?
|
|
3069
|
+
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ? "" : " ds-u-float--right ds-l-md-col--6 ds-l-col--5"}${className !== "" ? ` ${className}` : ""}`,
|
|
3070
|
+
variation: small ? "ghost" : undefined,
|
|
3071
3071
|
onClick: ()=>clearFiltersFn(),
|
|
3072
3072
|
children: "Reset"
|
|
3073
3073
|
});
|
|
@@ -3079,19 +3079,19 @@ var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFilter
|
|
|
3079
3079
|
function $6f4318b1e14124e5$var$updateQueryForDatastore(condition) {
|
|
3080
3080
|
let cond = condition;
|
|
3081
3081
|
delete cond.key;
|
|
3082
|
-
if (cond.operator ===
|
|
3082
|
+
if (cond.operator === "=" || cond.operator === "<>") {
|
|
3083
3083
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3084
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3084
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
3085
3085
|
}
|
|
3086
|
-
if (cond.operator.toLowerCase() ===
|
|
3086
|
+
if (cond.operator.toLowerCase() === "like") {
|
|
3087
3087
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3088
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3088
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
3089
3089
|
cond.value = `%${cleanedValue}%`;
|
|
3090
3090
|
}
|
|
3091
|
-
if (cond.operator.toLowerCase() ===
|
|
3092
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
3091
|
+
if (cond.operator.toLowerCase() === "in") {
|
|
3092
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(",");
|
|
3093
3093
|
}
|
|
3094
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
3094
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
|
|
3095
3095
|
return cond;
|
|
3096
3096
|
}
|
|
3097
3097
|
const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
@@ -3117,7 +3117,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3117
3117
|
} else setQueryConditions([
|
|
3118
3118
|
{
|
|
3119
3119
|
property: fields[0],
|
|
3120
|
-
value:
|
|
3120
|
+
value: "",
|
|
3121
3121
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3122
3122
|
key: Date.now().toString()
|
|
3123
3123
|
}
|
|
@@ -3134,7 +3134,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3134
3134
|
...queryConditions,
|
|
3135
3135
|
{
|
|
3136
3136
|
property: fields[0],
|
|
3137
|
-
value:
|
|
3137
|
+
value: "",
|
|
3138
3138
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3139
3139
|
key: Date.now().toString()
|
|
3140
3140
|
}
|
|
@@ -3165,7 +3165,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3165
3165
|
encodeValuesOnly: true,
|
|
3166
3166
|
addQueryPrefix: true
|
|
3167
3167
|
});
|
|
3168
|
-
window.history.pushState({},
|
|
3168
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
3169
3169
|
};
|
|
3170
3170
|
const submitConditions = ()=>{
|
|
3171
3171
|
// only update the data conditions when "Apply filters" is pressed
|
|
@@ -3239,7 +3239,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3239
3239
|
children: [
|
|
3240
3240
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3241
3241
|
className: "ds-u-display--none ds-u-lg-display--inline-block",
|
|
3242
|
-
children: conditions.length > 0 ? `Edit Filters` :
|
|
3242
|
+
children: conditions.length > 0 ? `Edit Filters` : "Filter Dataset"
|
|
3243
3243
|
}),
|
|
3244
3244
|
conditions.length > 0 && ` (${conditions.length})`
|
|
3245
3245
|
]
|
|
@@ -3247,7 +3247,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3247
3247
|
]
|
|
3248
3248
|
}),
|
|
3249
3249
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3250
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
3250
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
3251
3251
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
3252
3252
|
heading: "Filter Dataset",
|
|
3253
3253
|
isOpen: modalOpen,
|
|
@@ -3273,7 +3273,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3273
3273
|
className: "dkan-apply-dataset-filters-button ds-u-float--right ds-l-md-col--auto ds-l-col--auto",
|
|
3274
3274
|
onClick: submitConditions,
|
|
3275
3275
|
variation: "solid",
|
|
3276
|
-
children: `Apply ${conditionsReadyToSubmit(queryConditions).length ||
|
|
3276
|
+
children: `Apply ${conditionsReadyToSubmit(queryConditions).length || ""} filter${conditionsReadyToSubmit(queryConditions).length === 1 ? "" : "s"}`
|
|
3277
3277
|
})
|
|
3278
3278
|
]
|
|
3279
3279
|
})
|
|
@@ -3412,9 +3412,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3412
3412
|
className: "ds-u-display--flex ds-u-align-items--start",
|
|
3413
3413
|
children: [
|
|
3414
3414
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3415
|
-
onClick: ()=>setTableDensity(
|
|
3415
|
+
onClick: ()=>setTableDensity("expanded"),
|
|
3416
3416
|
"aria-label": "Row height, Expanded",
|
|
3417
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3417
|
+
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
3418
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3419
3419
|
className: "ds-u-display--block",
|
|
3420
3420
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3433,9 +3433,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3433
3433
|
})
|
|
3434
3434
|
}),
|
|
3435
3435
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3436
|
-
onClick: ()=>setTableDensity(
|
|
3436
|
+
onClick: ()=>setTableDensity("normal"),
|
|
3437
3437
|
"aria-label": "Row height, Normal",
|
|
3438
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3438
|
+
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
3439
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3440
3440
|
className: "ds-u-display--block",
|
|
3441
3441
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3454,9 +3454,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3454
3454
|
})
|
|
3455
3455
|
}),
|
|
3456
3456
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3457
|
-
onClick: ()=>setTableDensity(
|
|
3457
|
+
onClick: ()=>setTableDensity("compact"),
|
|
3458
3458
|
"aria-label": "Row height, Compact",
|
|
3459
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3459
|
+
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
3460
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3461
3461
|
className: "ds-u-display--block",
|
|
3462
3462
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3541,7 +3541,7 @@ const $85f8ff1ff89899c7$var$updateBrowserURL = (newConditions)=>{
|
|
|
3541
3541
|
encodeValuesOnly: true,
|
|
3542
3542
|
addQueryPrefix: true
|
|
3543
3543
|
});
|
|
3544
|
-
window.history.pushState({},
|
|
3544
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
3545
3545
|
};
|
|
3546
3546
|
const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, columns: columns, defaultColumnOrder: defaultColumnOrder, isModal: isModal, datasetTableControls: datasetTableControls, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility })=>{
|
|
3547
3547
|
const { limit: limit, offset: offset, count: count, conditions: conditions, setConditions: setConditions } = resource;
|
|
@@ -3627,7 +3627,7 @@ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, co
|
|
|
3627
3627
|
}, index)) : null,
|
|
3628
3628
|
hiddenColumns > 0 ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $c5b172e8d1a8197c$export$2e2bcd8739ae039), {
|
|
3629
3629
|
iconClass: "fa fa-columns",
|
|
3630
|
-
text: `${hiddenColumns} Column${hiddenColumns === 1 ?
|
|
3630
|
+
text: `${hiddenColumns} Column${hiddenColumns === 1 ? "" : "s"} Hidden`,
|
|
3631
3631
|
onClick: ()=>{
|
|
3632
3632
|
resetColumnVisibility();
|
|
3633
3633
|
}
|
|
@@ -3662,7 +3662,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3662
3662
|
const { conditions: conditions } = resource;
|
|
3663
3663
|
const data = resource.values;
|
|
3664
3664
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
3665
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
3665
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)("");
|
|
3666
3666
|
const dataTableWrapperElement = (0, $hgUW1$useRef)(null);
|
|
3667
3667
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
3668
3668
|
const table_columns = columns.map((col)=>{
|
|
@@ -3681,9 +3681,9 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3681
3681
|
columnOrder
|
|
3682
3682
|
]);
|
|
3683
3683
|
const sortElement = (isSorted, onClickFn)=>{
|
|
3684
|
-
if (isSorted ===
|
|
3685
|
-
if (isSorted ===
|
|
3686
|
-
return
|
|
3684
|
+
if (isSorted === "asc") return "dc-c-sort--asc";
|
|
3685
|
+
if (isSorted === "desc") return "dc-c-sort--desc";
|
|
3686
|
+
return "dc-c-sort--default";
|
|
3687
3687
|
};
|
|
3688
3688
|
const filters = [];
|
|
3689
3689
|
const table = (0, $hgUW1$useReactTable)({
|
|
@@ -3695,7 +3695,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3695
3695
|
columnVisibility: columnVisibility,
|
|
3696
3696
|
sorting: sorting
|
|
3697
3697
|
},
|
|
3698
|
-
columnResizeMode:
|
|
3698
|
+
columnResizeMode: "onChange",
|
|
3699
3699
|
onSortingChange: setSorting,
|
|
3700
3700
|
onColumnOrderChange: setColumnOrder,
|
|
3701
3701
|
onColumnVisibilityChange: setColumnVisibility,
|
|
@@ -3712,7 +3712,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3712
3712
|
const defaultColumnOrder = (0, $hgUW1$useMemo)(()=>table_columns.map((column)=>column.accessorKey), []);
|
|
3713
3713
|
const tableWrapperWidth = ()=>{
|
|
3714
3714
|
if (dataTableWrapperElement.current) return dataTableWrapperElement.current.offsetWidth;
|
|
3715
|
-
return
|
|
3715
|
+
return "auto";
|
|
3716
3716
|
};
|
|
3717
3717
|
(0, $hgUW1$useEffect)(()=>{
|
|
3718
3718
|
setHighlightRow(null);
|
|
@@ -3942,7 +3942,7 @@ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, a
|
|
|
3942
3942
|
},
|
|
3943
3943
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3944
3944
|
name: accessor,
|
|
3945
|
-
value: filterValue ||
|
|
3945
|
+
value: filterValue || ""
|
|
3946
3946
|
});
|
|
3947
3947
|
}
|
|
3948
3948
|
const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true })=>{
|
|
@@ -4018,7 +4018,7 @@ const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage, pageTrail:
|
|
|
4018
4018
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4019
4019
|
children: currentPage
|
|
4020
4020
|
})
|
|
4021
|
-
}) :
|
|
4021
|
+
}) : ""
|
|
4022
4022
|
]
|
|
4023
4023
|
})
|
|
4024
4024
|
});
|
|
@@ -4075,11 +4075,11 @@ var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRigh
|
|
|
4075
4075
|
|
|
4076
4076
|
|
|
4077
4077
|
|
|
4078
|
-
const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder =
|
|
4078
|
+
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
4079
|
className: "search-input-container",
|
|
4080
4080
|
children: [
|
|
4081
4081
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4082
|
-
className: `${showMagnifyingGlass ?
|
|
4082
|
+
className: `${showMagnifyingGlass ? "left-padding" : ""} ${showSearchButton ? "right-padding" : ""}`,
|
|
4083
4083
|
label: placeholder,
|
|
4084
4084
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4085
4085
|
placeholder: placeholder,
|
|
@@ -4094,7 +4094,7 @@ const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = 'Search
|
|
|
4094
4094
|
}),
|
|
4095
4095
|
showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
4096
4096
|
variation: "solid",
|
|
4097
|
-
className: onDark &&
|
|
4097
|
+
className: onDark && "on-dark",
|
|
4098
4098
|
onClick: onSubmit,
|
|
4099
4099
|
children: [
|
|
4100
4100
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4213,7 +4213,7 @@ const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: roo
|
|
|
4213
4213
|
url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4214
4214
|
addQueryPrefix: true
|
|
4215
4215
|
})}`,
|
|
4216
|
-
docExpansion:
|
|
4216
|
+
docExpansion: "list",
|
|
4217
4217
|
defaultModelsExpandDepth: -1,
|
|
4218
4218
|
plugins: [
|
|
4219
4219
|
(0, $hgUW1$SpanOpenAPIVersion),
|
|
@@ -4321,7 +4321,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4321
4321
|
size: "big",
|
|
4322
4322
|
type: "submit",
|
|
4323
4323
|
style: {
|
|
4324
|
-
width:
|
|
4324
|
+
width: "70px"
|
|
4325
4325
|
},
|
|
4326
4326
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4327
4327
|
className: "fas fa-search small-text"
|
|
@@ -4338,7 +4338,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4338
4338
|
className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
|
|
4339
4339
|
children: [
|
|
4340
4340
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4341
|
-
children: text ? text :
|
|
4341
|
+
children: text ? text : "Search"
|
|
4342
4342
|
}),
|
|
4343
4343
|
` `,
|
|
4344
4344
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4423,12 +4423,12 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
4423
4423
|
fulltext: fulltext ? fulltext : undefined,
|
|
4424
4424
|
...selectedFacets,
|
|
4425
4425
|
sort: sort ? sort : undefined,
|
|
4426
|
-
[
|
|
4426
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4427
4427
|
page: page !== 1 ? page : undefined,
|
|
4428
|
-
[
|
|
4428
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4429
4429
|
};
|
|
4430
4430
|
return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4431
|
-
arrayFormat:
|
|
4431
|
+
arrayFormat: "comma",
|
|
4432
4432
|
encode: false
|
|
4433
4433
|
})}`);
|
|
4434
4434
|
}
|
|
@@ -4439,26 +4439,26 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
4439
4439
|
|
|
4440
4440
|
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
4441
4441
|
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4442
|
-
defaultSort:
|
|
4443
|
-
defaultOrder:
|
|
4444
|
-
}, pageTitle: pageTitle =
|
|
4442
|
+
defaultSort: "modified",
|
|
4443
|
+
defaultOrder: "desc"
|
|
4444
|
+
}, pageTitle: pageTitle = "Dataset Explorer", filterTitle: filterTitle = "Tags", showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = "", showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
4445
4445
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4446
4446
|
const sortOptions = [
|
|
4447
4447
|
{
|
|
4448
|
-
label:
|
|
4449
|
-
value:
|
|
4448
|
+
label: "Newest",
|
|
4449
|
+
value: "newest"
|
|
4450
4450
|
},
|
|
4451
4451
|
{
|
|
4452
|
-
label:
|
|
4453
|
-
value:
|
|
4452
|
+
label: "Oldest",
|
|
4453
|
+
value: "oldest"
|
|
4454
4454
|
},
|
|
4455
4455
|
{
|
|
4456
|
-
label:
|
|
4457
|
-
value:
|
|
4456
|
+
label: "Title A-Z",
|
|
4457
|
+
value: "titleAZ"
|
|
4458
4458
|
},
|
|
4459
4459
|
{
|
|
4460
|
-
label:
|
|
4461
|
-
value:
|
|
4460
|
+
label: "Title Z-A",
|
|
4461
|
+
value: "titleZA"
|
|
4462
4462
|
}
|
|
4463
4463
|
];
|
|
4464
4464
|
const defaultSortBy = "";
|
|
@@ -4477,7 +4477,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4477
4477
|
endingNumber: 0
|
|
4478
4478
|
});
|
|
4479
4479
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4480
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4480
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
|
|
4481
4481
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4482
4482
|
const [fulltext, setFullText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
4483
4483
|
const [filterText, setFilterText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
@@ -4486,7 +4486,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4486
4486
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4487
4487
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4488
4488
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4489
|
-
return sort ===
|
|
4489
|
+
return sort === "modified" ? sortOrder === "desc" ? "newest" : "oldest" : sortOrder === "desc" ? "titleZA" : "titleAZ";
|
|
4490
4490
|
});
|
|
4491
4491
|
const [selectedFacets, setSelectedFacets] = (0, $hgUW1$useState)(transformedParams.selectedFacets ? transformedParams.selectedFacets : {
|
|
4492
4492
|
theme: [],
|
|
@@ -4495,21 +4495,21 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4495
4495
|
const setSortOptions = (value)=>{
|
|
4496
4496
|
setSortDisplay(value);
|
|
4497
4497
|
switch(value){
|
|
4498
|
-
case
|
|
4499
|
-
setSort(
|
|
4500
|
-
setSortOrder(
|
|
4498
|
+
case "newest":
|
|
4499
|
+
setSort("modified");
|
|
4500
|
+
setSortOrder("desc");
|
|
4501
4501
|
break;
|
|
4502
|
-
case
|
|
4503
|
-
setSort(
|
|
4504
|
-
setSortOrder(
|
|
4502
|
+
case "oldest":
|
|
4503
|
+
setSort("modified");
|
|
4504
|
+
setSortOrder("asc");
|
|
4505
4505
|
break;
|
|
4506
|
-
case
|
|
4507
|
-
setSort(
|
|
4508
|
-
setSortOrder(
|
|
4506
|
+
case "titleAZ":
|
|
4507
|
+
setSort("title");
|
|
4508
|
+
setSortOrder("asc");
|
|
4509
4509
|
break;
|
|
4510
|
-
case
|
|
4511
|
-
setSort(
|
|
4512
|
-
setSortOrder(
|
|
4510
|
+
case "titleZA":
|
|
4511
|
+
setSort("title");
|
|
4512
|
+
setSortOrder("desc");
|
|
4513
4513
|
break;
|
|
4514
4514
|
}
|
|
4515
4515
|
};
|
|
@@ -4517,12 +4517,12 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4517
4517
|
const newFacets = {
|
|
4518
4518
|
...selectedFacets
|
|
4519
4519
|
};
|
|
4520
|
-
if (key ===
|
|
4520
|
+
if (key === "theme") {
|
|
4521
4521
|
const existingFacet = newFacets.theme.findIndex((s)=>s === value);
|
|
4522
4522
|
if (existingFacet > -1) newFacets.theme.splice(existingFacet, 1);
|
|
4523
4523
|
else newFacets.theme.push(value);
|
|
4524
4524
|
}
|
|
4525
|
-
if (key ===
|
|
4525
|
+
if (key === "keyword") {
|
|
4526
4526
|
const existingFacet = newFacets.keyword.findIndex((s)=>s === value);
|
|
4527
4527
|
if (existingFacet > -1) newFacets.keyword.splice(existingFacet, 1);
|
|
4528
4528
|
else newFacets.keyword.push(value);
|
|
@@ -4536,14 +4536,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4536
4536
|
});
|
|
4537
4537
|
setSelectedFacets(newFacets);
|
|
4538
4538
|
const url = new URL(window.location.href);
|
|
4539
|
-
window.history.pushState({},
|
|
4539
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
4540
4540
|
}
|
|
4541
4541
|
const pageSize = defaultPageSize;
|
|
4542
4542
|
(0, $hgUW1$useEffect)(()=>{
|
|
4543
4543
|
// Update browser URL with current search params
|
|
4544
4544
|
const params = buildSearchParams(true);
|
|
4545
4545
|
const url = new URL(window.location.href);
|
|
4546
|
-
window.history.pushState({},
|
|
4546
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${params}`);
|
|
4547
4547
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4548
4548
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4549
4549
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -4582,14 +4582,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4582
4582
|
setSelectedFacets(defaultSelectedFacets);
|
|
4583
4583
|
setPage(defaultPage);
|
|
4584
4584
|
const url = new URL(window.location.href);
|
|
4585
|
-
window.history.pushState({},
|
|
4585
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}`);
|
|
4586
4586
|
}
|
|
4587
4587
|
function buildSearchParams(includePage) {
|
|
4588
4588
|
let newParams = {};
|
|
4589
4589
|
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
4590
4590
|
if (sort !== defaultSort.defaultSort) newParams.sort = sort;
|
|
4591
4591
|
if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
|
|
4592
|
-
if (fulltext !==
|
|
4592
|
+
if (fulltext !== "") newParams.fulltext = fulltext;
|
|
4593
4593
|
if (Object.keys(selectedFacets).length) Object.keys(selectedFacets).forEach((key)=>{
|
|
4594
4594
|
newParams[key] = selectedFacets[key];
|
|
4595
4595
|
});
|
|
@@ -4602,9 +4602,9 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4602
4602
|
fulltext: fulltext ? fulltext : undefined,
|
|
4603
4603
|
...selectedFacets,
|
|
4604
4604
|
sort: sort ? sort : undefined,
|
|
4605
|
-
[
|
|
4605
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4606
4606
|
page: page !== 1 ? page : undefined,
|
|
4607
|
-
[
|
|
4607
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4608
4608
|
};
|
|
4609
4609
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4610
4610
|
queryKey: [
|
|
@@ -4613,7 +4613,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4613
4613
|
],
|
|
4614
4614
|
queryFn: ()=>{
|
|
4615
4615
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4616
|
-
arrayFormat:
|
|
4616
|
+
arrayFormat: "comma",
|
|
4617
4617
|
encode: false
|
|
4618
4618
|
})}`);
|
|
4619
4619
|
}
|
|
@@ -4664,7 +4664,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4664
4664
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4665
4665
|
fieldClassName: "ds-u-margin--0",
|
|
4666
4666
|
value: filterText,
|
|
4667
|
-
className: `ds-u-padding-right--2 ${altMobileSearchButton ?
|
|
4667
|
+
className: `ds-u-padding-right--2 ${altMobileSearchButton ? "ds-l-col--12 ds-l-md-col--10 --alt-style" : "ds-l-col--10"}`,
|
|
4668
4668
|
label: "Search datasets",
|
|
4669
4669
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4670
4670
|
placeholder: "Search datasets",
|
|
@@ -4726,7 +4726,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4726
4726
|
"Showing ",
|
|
4727
4727
|
currentResultNumbers.startingNumber,
|
|
4728
4728
|
" -",
|
|
4729
|
-
|
|
4729
|
+
" ",
|
|
4730
4730
|
currentResultNumbers.endingNumber,
|
|
4731
4731
|
" of ",
|
|
4732
4732
|
data.data.total,
|
|
@@ -4804,7 +4804,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4804
4804
|
},
|
|
4805
4805
|
renderHref: (page)=>{
|
|
4806
4806
|
const searchParams = buildSearchParams(false);
|
|
4807
|
-
const includeAnd = searchParams ?
|
|
4807
|
+
const includeAnd = searchParams ? "&" : "";
|
|
4808
4808
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
4809
4809
|
}
|
|
4810
4810
|
})
|
|
@@ -4838,26 +4838,26 @@ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
4838
4838
|
|
|
4839
4839
|
|
|
4840
4840
|
const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4841
|
-
defaultSort:
|
|
4842
|
-
defaultOrder:
|
|
4843
|
-
}, pageTitle: pageTitle =
|
|
4841
|
+
defaultSort: "modified",
|
|
4842
|
+
defaultOrder: "desc"
|
|
4843
|
+
}, pageTitle: pageTitle = "What's New ", showLargeFileWarning: showLargeFileWarning = false, introText: introText = "", dataDictionaryLinks: dataDictionaryLinks = false })=>{
|
|
4844
4844
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4845
4845
|
const sortOptions = [
|
|
4846
4846
|
{
|
|
4847
|
-
label:
|
|
4848
|
-
value:
|
|
4847
|
+
label: "Newest",
|
|
4848
|
+
value: "newest"
|
|
4849
4849
|
},
|
|
4850
4850
|
{
|
|
4851
|
-
label:
|
|
4852
|
-
value:
|
|
4851
|
+
label: "Oldest",
|
|
4852
|
+
value: "oldest"
|
|
4853
4853
|
},
|
|
4854
4854
|
{
|
|
4855
|
-
label:
|
|
4856
|
-
value:
|
|
4855
|
+
label: "Title A-Z",
|
|
4856
|
+
value: "titleAZ"
|
|
4857
4857
|
},
|
|
4858
4858
|
{
|
|
4859
|
-
label:
|
|
4860
|
-
value:
|
|
4859
|
+
label: "Title Z-A",
|
|
4860
|
+
value: "titleZA"
|
|
4861
4861
|
}
|
|
4862
4862
|
];
|
|
4863
4863
|
const defaultSortBy = "";
|
|
@@ -4871,33 +4871,33 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4871
4871
|
endingNumber: 0
|
|
4872
4872
|
});
|
|
4873
4873
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4874
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4874
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
|
|
4875
4875
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4876
4876
|
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
4877
4877
|
const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
|
|
4878
4878
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4879
4879
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4880
4880
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4881
|
-
return sort ===
|
|
4881
|
+
return sort === "modified" ? sortOrder === "desc" ? "newest" : "oldest" : sortOrder === "desc" ? "titleZA" : "titleAZ";
|
|
4882
4882
|
});
|
|
4883
4883
|
const setSortOptions = (value)=>{
|
|
4884
4884
|
setSortDisplay(value);
|
|
4885
4885
|
switch(value){
|
|
4886
|
-
case
|
|
4887
|
-
setSort(
|
|
4888
|
-
setSortOrder(
|
|
4886
|
+
case "newest":
|
|
4887
|
+
setSort("modified");
|
|
4888
|
+
setSortOrder("desc");
|
|
4889
4889
|
break;
|
|
4890
|
-
case
|
|
4891
|
-
setSort(
|
|
4892
|
-
setSortOrder(
|
|
4890
|
+
case "oldest":
|
|
4891
|
+
setSort("modified");
|
|
4892
|
+
setSortOrder("asc");
|
|
4893
4893
|
break;
|
|
4894
|
-
case
|
|
4895
|
-
setSort(
|
|
4896
|
-
setSortOrder(
|
|
4894
|
+
case "titleAZ":
|
|
4895
|
+
setSort("title");
|
|
4896
|
+
setSortOrder("asc");
|
|
4897
4897
|
break;
|
|
4898
|
-
case
|
|
4899
|
-
setSort(
|
|
4900
|
-
setSortOrder(
|
|
4898
|
+
case "titleZA":
|
|
4899
|
+
setSort("title");
|
|
4900
|
+
setSortOrder("desc");
|
|
4901
4901
|
break;
|
|
4902
4902
|
}
|
|
4903
4903
|
};
|
|
@@ -4906,7 +4906,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4906
4906
|
// Update browser URL with current search params
|
|
4907
4907
|
const params = buildSearchParams(true);
|
|
4908
4908
|
const url = new URL(window.location.href);
|
|
4909
|
-
window.history.pushState({},
|
|
4909
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${params}`);
|
|
4910
4910
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4911
4911
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4912
4912
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -4945,9 +4945,9 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4945
4945
|
}
|
|
4946
4946
|
let params = {
|
|
4947
4947
|
sort: sort ? sort : undefined,
|
|
4948
|
-
[
|
|
4948
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4949
4949
|
page: page !== 1 ? page : undefined,
|
|
4950
|
-
[
|
|
4950
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4951
4951
|
};
|
|
4952
4952
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4953
4953
|
queryKey: [
|
|
@@ -4956,7 +4956,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4956
4956
|
],
|
|
4957
4957
|
queryFn: ()=>{
|
|
4958
4958
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4959
|
-
arrayFormat:
|
|
4959
|
+
arrayFormat: "comma",
|
|
4960
4960
|
encode: false
|
|
4961
4961
|
})}`);
|
|
4962
4962
|
}
|
|
@@ -5020,7 +5020,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5020
5020
|
"Showing ",
|
|
5021
5021
|
currentResultNumbers.startingNumber,
|
|
5022
5022
|
" -",
|
|
5023
|
-
|
|
5023
|
+
" ",
|
|
5024
5024
|
currentResultNumbers.endingNumber,
|
|
5025
5025
|
" of ",
|
|
5026
5026
|
data.data.total,
|
|
@@ -5087,7 +5087,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5087
5087
|
},
|
|
5088
5088
|
renderHref: (page)=>{
|
|
5089
5089
|
const searchParams = buildSearchParams(false);
|
|
5090
|
-
const includeAnd = searchParams ?
|
|
5090
|
+
const includeAnd = searchParams ? "&" : "";
|
|
5091
5091
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
5092
5092
|
}
|
|
5093
5093
|
})
|
|
@@ -5119,12 +5119,12 @@ var $550bcc185f420ff5$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
5119
5119
|
|
|
5120
5120
|
const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
5121
5121
|
const [dataset, setDataset] = (0, $hgUW1$useState)({
|
|
5122
|
-
title:
|
|
5122
|
+
title: "",
|
|
5123
5123
|
distribution: [],
|
|
5124
|
-
error:
|
|
5125
|
-
description:
|
|
5126
|
-
identifier:
|
|
5127
|
-
modified:
|
|
5124
|
+
error: "",
|
|
5125
|
+
description: "",
|
|
5126
|
+
identifier: "",
|
|
5127
|
+
modified: ""
|
|
5128
5128
|
});
|
|
5129
5129
|
const [id, setId] = (0, $hgUW1$useState)(datasetId);
|
|
5130
5130
|
const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
|
|
@@ -5134,7 +5134,7 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
|
5134
5134
|
"metastore" + id
|
|
5135
5135
|
],
|
|
5136
5136
|
queryFn: ()=>{
|
|
5137
|
-
return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ?
|
|
5137
|
+
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)=>{
|
|
5138
5138
|
return {
|
|
5139
5139
|
title: dataset.title,
|
|
5140
5140
|
distribution: dataset.distribution,
|
|
@@ -5200,7 +5200,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5200
5200
|
...additionalParams
|
|
5201
5201
|
};
|
|
5202
5202
|
params = (0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA);
|
|
5203
|
-
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` :
|
|
5203
|
+
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : "";
|
|
5204
5204
|
let enabled = false;
|
|
5205
5205
|
if (id) {
|
|
5206
5206
|
if (!requireConditions) enabled = true;
|
|
@@ -5280,65 +5280,65 @@ var $1d3d480a9cfaabe0$export$2e2bcd8739ae039 = $1d3d480a9cfaabe0$var$useDatastor
|
|
|
5280
5280
|
|
|
5281
5281
|
|
|
5282
5282
|
const $28f16f59778efa64$export$82b1b1d517e5388a = {
|
|
5283
|
-
|
|
5284
|
-
name:
|
|
5283
|
+
"R/P10Y": {
|
|
5284
|
+
name: "Decennial"
|
|
5285
5285
|
},
|
|
5286
|
-
|
|
5287
|
-
name:
|
|
5286
|
+
"R/P4Y": {
|
|
5287
|
+
name: "Quadrennial"
|
|
5288
5288
|
},
|
|
5289
|
-
|
|
5290
|
-
name:
|
|
5289
|
+
"R/P1Y": {
|
|
5290
|
+
name: "Annual"
|
|
5291
5291
|
},
|
|
5292
|
-
|
|
5293
|
-
name:
|
|
5292
|
+
"R/P2M": {
|
|
5293
|
+
name: "Bimonthly"
|
|
5294
5294
|
},
|
|
5295
|
-
|
|
5296
|
-
name:
|
|
5295
|
+
"R/P3.5D": {
|
|
5296
|
+
name: "Semiweekly"
|
|
5297
5297
|
},
|
|
5298
|
-
|
|
5299
|
-
name:
|
|
5298
|
+
"R/P1D": {
|
|
5299
|
+
name: "Daily"
|
|
5300
5300
|
},
|
|
5301
|
-
|
|
5302
|
-
name:
|
|
5301
|
+
"R/P2W": {
|
|
5302
|
+
name: "Biweekly"
|
|
5303
5303
|
},
|
|
5304
|
-
|
|
5305
|
-
name:
|
|
5304
|
+
"R/P6M": {
|
|
5305
|
+
name: "Semiannual"
|
|
5306
5306
|
},
|
|
5307
|
-
|
|
5308
|
-
name:
|
|
5307
|
+
"R/P2Y": {
|
|
5308
|
+
name: "Biennial"
|
|
5309
5309
|
},
|
|
5310
|
-
|
|
5311
|
-
name:
|
|
5310
|
+
"R/P3Y": {
|
|
5311
|
+
name: "Triennial"
|
|
5312
5312
|
},
|
|
5313
|
-
|
|
5314
|
-
name:
|
|
5313
|
+
"R/P0.33W": {
|
|
5314
|
+
name: "Three times a week"
|
|
5315
5315
|
},
|
|
5316
|
-
|
|
5317
|
-
name:
|
|
5316
|
+
"R/P0.33M": {
|
|
5317
|
+
name: "Three times a month"
|
|
5318
5318
|
},
|
|
5319
|
-
|
|
5320
|
-
name:
|
|
5319
|
+
"R/PT1S": {
|
|
5320
|
+
name: "Continuously updated"
|
|
5321
5321
|
},
|
|
5322
|
-
|
|
5323
|
-
name:
|
|
5322
|
+
"R/P1M": {
|
|
5323
|
+
name: "Monthly"
|
|
5324
5324
|
},
|
|
5325
|
-
|
|
5326
|
-
name:
|
|
5325
|
+
"R/P3M": {
|
|
5326
|
+
name: "Quarterly"
|
|
5327
5327
|
},
|
|
5328
|
-
|
|
5329
|
-
name:
|
|
5328
|
+
"R/P0.5M": {
|
|
5329
|
+
name: "Semimonthly"
|
|
5330
5330
|
},
|
|
5331
|
-
|
|
5332
|
-
name:
|
|
5331
|
+
"R/P4M": {
|
|
5332
|
+
name: "Three times a year"
|
|
5333
5333
|
},
|
|
5334
|
-
|
|
5335
|
-
name:
|
|
5334
|
+
"R/P1W": {
|
|
5335
|
+
name: "Weekly"
|
|
5336
5336
|
},
|
|
5337
|
-
|
|
5338
|
-
name:
|
|
5337
|
+
"R/PT1H": {
|
|
5338
|
+
name: "Hourly"
|
|
5339
5339
|
},
|
|
5340
5340
|
irregular: {
|
|
5341
|
-
name:
|
|
5341
|
+
name: "Irregular"
|
|
5342
5342
|
}
|
|
5343
5343
|
};
|
|
5344
5344
|
|
|
@@ -5347,7 +5347,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5347
5347
|
modified: (data)=>{
|
|
5348
5348
|
return [
|
|
5349
5349
|
{
|
|
5350
|
-
label:
|
|
5350
|
+
label: "Modified",
|
|
5351
5351
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5352
5352
|
date: data
|
|
5353
5353
|
})
|
|
@@ -5357,7 +5357,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5357
5357
|
issued: (data)=>{
|
|
5358
5358
|
return [
|
|
5359
5359
|
{
|
|
5360
|
-
label:
|
|
5360
|
+
label: "Issued",
|
|
5361
5361
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5362
5362
|
date: data
|
|
5363
5363
|
})
|
|
@@ -5367,7 +5367,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5367
5367
|
accrualPeriodicity: (data)=>{
|
|
5368
5368
|
return [
|
|
5369
5369
|
{
|
|
5370
|
-
label:
|
|
5370
|
+
label: "Frequency",
|
|
5371
5371
|
value: (0, $28f16f59778efa64$export$82b1b1d517e5388a)[data].name
|
|
5372
5372
|
}
|
|
5373
5373
|
];
|
|
@@ -5375,7 +5375,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5375
5375
|
publisher: (data)=>{
|
|
5376
5376
|
if (data.data && data.data.name) return [
|
|
5377
5377
|
{
|
|
5378
|
-
label:
|
|
5378
|
+
label: "Publisher",
|
|
5379
5379
|
value: data.data.name
|
|
5380
5380
|
}
|
|
5381
5381
|
];
|
|
@@ -5384,7 +5384,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5384
5384
|
identifier: (data)=>{
|
|
5385
5385
|
return [
|
|
5386
5386
|
{
|
|
5387
|
-
label:
|
|
5387
|
+
label: "Identifier",
|
|
5388
5388
|
value: data
|
|
5389
5389
|
}
|
|
5390
5390
|
];
|
|
@@ -5392,11 +5392,11 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5392
5392
|
contactPoint: (data)=>{
|
|
5393
5393
|
let rows = [];
|
|
5394
5394
|
if (data.fn) rows.push({
|
|
5395
|
-
label:
|
|
5395
|
+
label: "Contact",
|
|
5396
5396
|
value: data.fn
|
|
5397
5397
|
});
|
|
5398
5398
|
if (data.hasEmail) rows.push({
|
|
5399
|
-
label:
|
|
5399
|
+
label: "Contact Email",
|
|
5400
5400
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5401
5401
|
href: data.hasEmail.includes("mailto:") ? data.hasEmail : `mailto:${data.hasEmail}`,
|
|
5402
5402
|
children: data.hasEmail.replace("mailto:", "")
|
|
@@ -5407,7 +5407,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5407
5407
|
bureauCode: (data)=>{
|
|
5408
5408
|
if (data.length) return [
|
|
5409
5409
|
{
|
|
5410
|
-
label:
|
|
5410
|
+
label: "Bureau Code",
|
|
5411
5411
|
value: data[0]
|
|
5412
5412
|
}
|
|
5413
5413
|
];
|
|
@@ -5415,7 +5415,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5415
5415
|
programCode: (data)=>{
|
|
5416
5416
|
if (data.length) return [
|
|
5417
5417
|
{
|
|
5418
|
-
label:
|
|
5418
|
+
label: "Program Code",
|
|
5419
5419
|
value: data[0]
|
|
5420
5420
|
}
|
|
5421
5421
|
];
|
|
@@ -5423,13 +5423,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5423
5423
|
theme: (data)=>{
|
|
5424
5424
|
return [
|
|
5425
5425
|
{
|
|
5426
|
-
label:
|
|
5426
|
+
label: "Category",
|
|
5427
5427
|
value: data.map((theme)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5428
5428
|
to: `/datasets?theme[]=${theme.data}`,
|
|
5429
5429
|
children: theme.data
|
|
5430
5430
|
}, theme.data)).reduce((prev, curr)=>[
|
|
5431
5431
|
prev,
|
|
5432
|
-
|
|
5432
|
+
", ",
|
|
5433
5433
|
curr
|
|
5434
5434
|
])
|
|
5435
5435
|
}
|
|
@@ -5438,13 +5438,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5438
5438
|
keyword: (data)=>{
|
|
5439
5439
|
return [
|
|
5440
5440
|
{
|
|
5441
|
-
label:
|
|
5441
|
+
label: "Tags",
|
|
5442
5442
|
value: data.map((keyword)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5443
5443
|
to: `/datasets?keyword[]=${keyword.data}`,
|
|
5444
5444
|
children: keyword.data
|
|
5445
5445
|
}, keyword.data)).reduce((prev, curr)=>[
|
|
5446
5446
|
prev,
|
|
5447
|
-
|
|
5447
|
+
", ",
|
|
5448
5448
|
curr
|
|
5449
5449
|
])
|
|
5450
5450
|
}
|
|
@@ -5453,7 +5453,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5453
5453
|
license: (data)=>{
|
|
5454
5454
|
return [
|
|
5455
5455
|
{
|
|
5456
|
-
label:
|
|
5456
|
+
label: "License",
|
|
5457
5457
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5458
5458
|
href: data,
|
|
5459
5459
|
children: data
|
|
@@ -5464,7 +5464,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5464
5464
|
accessLevel: (data)=>{
|
|
5465
5465
|
return [
|
|
5466
5466
|
{
|
|
5467
|
-
label:
|
|
5467
|
+
label: "Public Access Level",
|
|
5468
5468
|
value: data
|
|
5469
5469
|
}
|
|
5470
5470
|
];
|
|
@@ -5472,7 +5472,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5472
5472
|
temporal: (data)=>{
|
|
5473
5473
|
return [
|
|
5474
5474
|
{
|
|
5475
|
-
label:
|
|
5475
|
+
label: "Temporal Coverage",
|
|
5476
5476
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5477
5477
|
className: "dc-c-word-break--all",
|
|
5478
5478
|
children: data
|
|
@@ -5483,7 +5483,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5483
5483
|
spatial: (data)=>{
|
|
5484
5484
|
return [
|
|
5485
5485
|
{
|
|
5486
|
-
label:
|
|
5486
|
+
label: "Spacial/Geographical Coverage",
|
|
5487
5487
|
value: data
|
|
5488
5488
|
}
|
|
5489
5489
|
];
|
|
@@ -5491,7 +5491,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5491
5491
|
references: (data)=>{
|
|
5492
5492
|
return [
|
|
5493
5493
|
{
|
|
5494
|
-
label:
|
|
5494
|
+
label: "Related Documents",
|
|
5495
5495
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
5496
5496
|
className: "ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0",
|
|
5497
5497
|
children: data.map((item)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -5609,8 +5609,8 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5609
5609
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
5610
5610
|
href: dist.data.downloadURL,
|
|
5611
5611
|
style: {
|
|
5612
|
-
order: sm ?
|
|
5613
|
-
width: sm ?
|
|
5612
|
+
order: sm ? "1" : "0",
|
|
5613
|
+
width: sm ? "100%" : "auto"
|
|
5614
5614
|
},
|
|
5615
5615
|
"aria-label": `Download ${dist.data.title || title} ${fileFormat}`,
|
|
5616
5616
|
className: "ds-c-button",
|
|
@@ -5623,7 +5623,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5623
5623
|
})
|
|
5624
5624
|
}),
|
|
5625
5625
|
dist.data.description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5626
|
-
className:
|
|
5626
|
+
className: "ds-u-measure--wide ds-u-margin-bottom--7",
|
|
5627
5627
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5628
5628
|
className: "dc-c-metadata-description ds-u-margin--0",
|
|
5629
5629
|
dangerouslySetInnerHTML: {
|
|
@@ -5695,7 +5695,7 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5695
5695
|
const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
|
|
5696
5696
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
5697
5697
|
children: [
|
|
5698
|
-
md ?
|
|
5698
|
+
md ? "" : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5699
5699
|
component: "th",
|
|
5700
5700
|
className: "ds-u-font-weight--bold",
|
|
5701
5701
|
children: [
|
|
@@ -5706,8 +5706,8 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5706
5706
|
title: tooltip.title,
|
|
5707
5707
|
// @ts-ignore
|
|
5708
5708
|
style: {
|
|
5709
|
-
border:
|
|
5710
|
-
background:
|
|
5709
|
+
border: "none",
|
|
5710
|
+
background: "none"
|
|
5711
5711
|
},
|
|
5712
5712
|
maxWidth: "400px",
|
|
5713
5713
|
placement: "auto",
|
|
@@ -5766,10 +5766,10 @@ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: ap
|
|
|
5766
5766
|
href: apiUrl,
|
|
5767
5767
|
children: [
|
|
5768
5768
|
"View API",
|
|
5769
|
-
|
|
5769
|
+
" ",
|
|
5770
5770
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5771
5771
|
style: {
|
|
5772
|
-
whiteSpace:
|
|
5772
|
+
whiteSpace: "nowrap"
|
|
5773
5773
|
},
|
|
5774
5774
|
children: [
|
|
5775
5775
|
"specification ",
|
|
@@ -5810,20 +5810,20 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
|
|
|
5810
5810
|
|
|
5811
5811
|
const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
|
|
5812
5812
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
5813
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
5813
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)("");
|
|
5814
5814
|
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
5815
5815
|
minWidth: 0,
|
|
5816
5816
|
maxWidth: 544
|
|
5817
5817
|
});
|
|
5818
5818
|
const sortElement = (isSorted)=>{
|
|
5819
|
-
if (isSorted ===
|
|
5820
|
-
if (isSorted ===
|
|
5821
|
-
return
|
|
5819
|
+
if (isSorted === "asc") return "dc-c-sort--asc";
|
|
5820
|
+
if (isSorted === "desc") return "dc-c-sort--desc";
|
|
5821
|
+
return "dc-c-sort--default";
|
|
5822
5822
|
};
|
|
5823
5823
|
const table = (0, $hgUW1$useReactTable)({
|
|
5824
5824
|
data: tableData,
|
|
5825
5825
|
columns: tableColumns,
|
|
5826
|
-
columnResizeMode:
|
|
5826
|
+
columnResizeMode: "onChange",
|
|
5827
5827
|
getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
|
|
5828
5828
|
getFilteredRowModel: (0, $hgUW1$getFilteredRowModel)(),
|
|
5829
5829
|
getPaginationRowModel: (0, $hgUW1$getPaginationRowModel)(),
|
|
@@ -5842,49 +5842,49 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5842
5842
|
});
|
|
5843
5843
|
const sortOptions = [
|
|
5844
5844
|
{
|
|
5845
|
-
value:
|
|
5846
|
-
label:
|
|
5845
|
+
value: "default",
|
|
5846
|
+
label: "No Sort"
|
|
5847
5847
|
},
|
|
5848
5848
|
{
|
|
5849
|
-
value:
|
|
5850
|
-
label:
|
|
5849
|
+
value: "titleasc",
|
|
5850
|
+
label: "Title A-Z"
|
|
5851
5851
|
},
|
|
5852
5852
|
{
|
|
5853
|
-
value:
|
|
5854
|
-
label:
|
|
5853
|
+
value: "titledesc",
|
|
5854
|
+
label: "Title Z-A"
|
|
5855
5855
|
},
|
|
5856
5856
|
{
|
|
5857
|
-
value:
|
|
5858
|
-
label:
|
|
5857
|
+
value: "typeasc",
|
|
5858
|
+
label: "Type A-Z"
|
|
5859
5859
|
},
|
|
5860
5860
|
{
|
|
5861
|
-
value:
|
|
5862
|
-
label:
|
|
5861
|
+
value: "typedesc",
|
|
5862
|
+
label: "Type Z-A"
|
|
5863
5863
|
}
|
|
5864
5864
|
];
|
|
5865
5865
|
const sortStatesLookup = {
|
|
5866
5866
|
default: [],
|
|
5867
5867
|
titleasc: [
|
|
5868
5868
|
{
|
|
5869
|
-
id:
|
|
5869
|
+
id: "titleResizable",
|
|
5870
5870
|
desc: false
|
|
5871
5871
|
}
|
|
5872
5872
|
],
|
|
5873
5873
|
titledesc: [
|
|
5874
5874
|
{
|
|
5875
|
-
id:
|
|
5875
|
+
id: "titleResizable",
|
|
5876
5876
|
desc: true
|
|
5877
5877
|
}
|
|
5878
5878
|
],
|
|
5879
5879
|
typeasc: [
|
|
5880
5880
|
{
|
|
5881
|
-
id:
|
|
5881
|
+
id: "type",
|
|
5882
5882
|
desc: false
|
|
5883
5883
|
}
|
|
5884
5884
|
],
|
|
5885
5885
|
typedesc: [
|
|
5886
5886
|
{
|
|
5887
|
-
id:
|
|
5887
|
+
id: "type",
|
|
5888
5888
|
desc: true
|
|
5889
5889
|
}
|
|
5890
5890
|
]
|
|
@@ -5912,7 +5912,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5912
5912
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
5913
5913
|
className: "dc-c-datatable",
|
|
5914
5914
|
style: {
|
|
5915
|
-
width:
|
|
5915
|
+
width: "100%"
|
|
5916
5916
|
},
|
|
5917
5917
|
stackable: true,
|
|
5918
5918
|
children: [
|
|
@@ -5928,12 +5928,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5928
5928
|
}, header.id + "_resize") : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5929
5929
|
key: header.id,
|
|
5930
5930
|
className: `ds-u-border-y--2 ds-u-border--dark ds-u-border-x--0`,
|
|
5931
|
-
id:
|
|
5931
|
+
id: "dataDictionary_" + header.id,
|
|
5932
5932
|
children: [
|
|
5933
5933
|
(0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext()),
|
|
5934
|
-
header.id ===
|
|
5934
|
+
header.id === "type" && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
5935
5935
|
onClick: header.column.getToggleSortingHandler(),
|
|
5936
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
5936
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : "",
|
|
5937
5937
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
5938
5938
|
})
|
|
5939
5939
|
]
|
|
@@ -5948,12 +5948,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5948
5948
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
5949
5949
|
key: cell.id,
|
|
5950
5950
|
style: {
|
|
5951
|
-
maxWidth: mobile ?
|
|
5952
|
-
whiteSpace: cell.column.id === "description" ?
|
|
5951
|
+
maxWidth: mobile ? "100%" : cell.column.getSize(),
|
|
5952
|
+
whiteSpace: cell.column.id === "description" ? "pre-wrap" : "normal"
|
|
5953
5953
|
},
|
|
5954
|
-
className: `${cell.column.id ===
|
|
5955
|
-
headers:
|
|
5956
|
-
stackedTitle: cell.column.id ===
|
|
5954
|
+
className: `${cell.column.id === "titleResizable" ? "ds-u-word-break" : ""}`,
|
|
5955
|
+
headers: "dataDictionary_" + cell.column.id,
|
|
5956
|
+
stackedTitle: cell.column.id === "titleResizable" ? "Title" : cell.column.columnDef.header,
|
|
5957
5957
|
children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
5958
5958
|
});
|
|
5959
5959
|
})
|
|
@@ -5982,7 +5982,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5982
5982
|
table.setPageIndex(page - 1);
|
|
5983
5983
|
},
|
|
5984
5984
|
renderHref: (page)=>`/page=${page}`
|
|
5985
|
-
}) :
|
|
5985
|
+
}) : ""
|
|
5986
5986
|
]
|
|
5987
5987
|
});
|
|
5988
5988
|
};
|
|
@@ -5992,17 +5992,17 @@ var $6765a74df807d015$export$2e2bcd8739ae039 = $6765a74df807d015$var$DataDiction
|
|
|
5992
5992
|
const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
|
|
5993
5993
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
5994
5994
|
const tableColumns = [
|
|
5995
|
-
columnHelper.accessor(
|
|
5996
|
-
header:
|
|
5995
|
+
columnHelper.accessor("name", {
|
|
5996
|
+
header: "Name"
|
|
5997
5997
|
}),
|
|
5998
|
-
columnHelper.accessor(
|
|
5999
|
-
header:
|
|
5998
|
+
columnHelper.accessor("title", {
|
|
5999
|
+
header: "Title"
|
|
6000
6000
|
}),
|
|
6001
|
-
columnHelper.accessor(
|
|
6002
|
-
header:
|
|
6001
|
+
columnHelper.accessor("type", {
|
|
6002
|
+
header: "Type"
|
|
6003
6003
|
}),
|
|
6004
|
-
columnHelper.accessor(
|
|
6005
|
-
header:
|
|
6004
|
+
columnHelper.accessor("format", {
|
|
6005
|
+
header: "Format"
|
|
6006
6006
|
})
|
|
6007
6007
|
];
|
|
6008
6008
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6765a74df807d015$export$2e2bcd8739ae039), {
|
|
@@ -6046,7 +6046,7 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6046
6046
|
});
|
|
6047
6047
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
6048
6048
|
const tableColumns = [
|
|
6049
|
-
columnHelper.accessor(
|
|
6049
|
+
columnHelper.accessor("titleResizable", {
|
|
6050
6050
|
header: ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6051
6051
|
className: "dc-c-tooltip-width-override",
|
|
6052
6052
|
children: [
|
|
@@ -6055,8 +6055,8 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6055
6055
|
title: "Title represents the column headers of the data file",
|
|
6056
6056
|
// @ts-ignore
|
|
6057
6057
|
style: {
|
|
6058
|
-
border:
|
|
6059
|
-
background:
|
|
6058
|
+
border: "none",
|
|
6059
|
+
background: "none"
|
|
6060
6060
|
},
|
|
6061
6061
|
maxWidth: "400px",
|
|
6062
6062
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
|
|
@@ -6066,48 +6066,48 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6066
6066
|
size: 300,
|
|
6067
6067
|
minSize: 132
|
|
6068
6068
|
}),
|
|
6069
|
-
columnHelper.accessor(
|
|
6070
|
-
header:
|
|
6069
|
+
columnHelper.accessor("description", {
|
|
6070
|
+
header: "Description",
|
|
6071
6071
|
minSize: 600
|
|
6072
6072
|
}),
|
|
6073
|
-
columnHelper.accessor(
|
|
6074
|
-
header:
|
|
6073
|
+
columnHelper.accessor("type", {
|
|
6074
|
+
header: "Type",
|
|
6075
6075
|
size: 150,
|
|
6076
6076
|
enableResizing: false
|
|
6077
6077
|
})
|
|
6078
6078
|
];
|
|
6079
6079
|
const typeOptions = [
|
|
6080
6080
|
{
|
|
6081
|
-
value:
|
|
6082
|
-
label:
|
|
6081
|
+
value: "all",
|
|
6082
|
+
label: "All Types"
|
|
6083
6083
|
},
|
|
6084
6084
|
{
|
|
6085
|
-
value:
|
|
6086
|
-
label:
|
|
6085
|
+
value: "string",
|
|
6086
|
+
label: "String"
|
|
6087
6087
|
},
|
|
6088
6088
|
{
|
|
6089
|
-
value:
|
|
6090
|
-
label:
|
|
6089
|
+
value: "date",
|
|
6090
|
+
label: "Date"
|
|
6091
6091
|
},
|
|
6092
6092
|
{
|
|
6093
|
-
value:
|
|
6094
|
-
label:
|
|
6093
|
+
value: "datetime",
|
|
6094
|
+
label: "Datetime"
|
|
6095
6095
|
},
|
|
6096
6096
|
{
|
|
6097
|
-
value:
|
|
6098
|
-
label:
|
|
6097
|
+
value: "year",
|
|
6098
|
+
label: "Year"
|
|
6099
6099
|
},
|
|
6100
6100
|
{
|
|
6101
|
-
value:
|
|
6102
|
-
label:
|
|
6101
|
+
value: "integer",
|
|
6102
|
+
label: "Integer"
|
|
6103
6103
|
},
|
|
6104
6104
|
{
|
|
6105
|
-
value:
|
|
6106
|
-
label:
|
|
6105
|
+
value: "number",
|
|
6106
|
+
label: "Number"
|
|
6107
6107
|
},
|
|
6108
6108
|
{
|
|
6109
|
-
value:
|
|
6110
|
-
label:
|
|
6109
|
+
value: "boolean",
|
|
6110
|
+
label: "Boolean"
|
|
6111
6111
|
}
|
|
6112
6112
|
];
|
|
6113
6113
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -6214,7 +6214,7 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
|
|
|
6214
6214
|
href: datasetDictionaryEndpoint + "/csv",
|
|
6215
6215
|
className: "ds-c-button",
|
|
6216
6216
|
style: {
|
|
6217
|
-
width:
|
|
6217
|
+
width: "100%"
|
|
6218
6218
|
},
|
|
6219
6219
|
children: [
|
|
6220
6220
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
@@ -6271,7 +6271,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6271
6271
|
const [description, setDescription] = (0, $hgUW1$useState)("");
|
|
6272
6272
|
if (!distribution && !dataset?.identifier) return null;
|
|
6273
6273
|
(0, $hgUW1$useEffect)(()=>{
|
|
6274
|
-
let newDescription =
|
|
6274
|
+
let newDescription = "";
|
|
6275
6275
|
if (customDescription) newDescription = customDescription(dataset, distribution, resource);
|
|
6276
6276
|
else {
|
|
6277
6277
|
if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
|
|
@@ -6286,7 +6286,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6286
6286
|
customDescription
|
|
6287
6287
|
]);
|
|
6288
6288
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6289
|
-
className:
|
|
6289
|
+
className: "ds-u-measure--wide ds-u-margin-bottom--7",
|
|
6290
6290
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6291
6291
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
6292
6292
|
dangerouslySetInnerHTML: {
|
|
@@ -6308,7 +6308,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
6308
6308
|
],
|
|
6309
6309
|
queryFn: ()=>{
|
|
6310
6310
|
return fetch(`${dataDictionaryUrl}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA), {
|
|
6311
|
-
arrayFormat:
|
|
6311
|
+
arrayFormat: "comma",
|
|
6312
6312
|
encode: false
|
|
6313
6313
|
})}`).then((res)=>res.json());
|
|
6314
6314
|
}
|
|
@@ -6327,7 +6327,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6327
6327
|
conditions: []
|
|
6328
6328
|
};
|
|
6329
6329
|
const { dataset: dataset, isPending: isPending } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
6330
|
-
const title = dataset.title ? dataset.title :
|
|
6330
|
+
const title = dataset.title ? dataset.title : "";
|
|
6331
6331
|
const metadataMapping = {
|
|
6332
6332
|
...(0, $6da0396069e23175$export$bc27cf7ecf44639d),
|
|
6333
6333
|
...customMetadataMapping
|
|
@@ -6335,7 +6335,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6335
6335
|
let distribution = {};
|
|
6336
6336
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
6337
6337
|
if (distributions.length) distribution = distributions[0];
|
|
6338
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
6338
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
6339
6339
|
...options,
|
|
6340
6340
|
limit: defaultPageSize
|
|
6341
6341
|
});
|
|
@@ -6347,7 +6347,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6347
6347
|
}) : null;
|
|
6348
6348
|
(0, $hgUW1$useEffect)(()=>{
|
|
6349
6349
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6350
|
-
if (localFileFormat ===
|
|
6350
|
+
if (localFileFormat === "csv") resource.setResource(distribution.identifier);
|
|
6351
6351
|
}, [
|
|
6352
6352
|
distribution
|
|
6353
6353
|
]);
|
|
@@ -6402,27 +6402,27 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6402
6402
|
distribution,
|
|
6403
6403
|
window.location.hash
|
|
6404
6404
|
]);
|
|
6405
|
-
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType ===
|
|
6405
|
+
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === "application/vnd.tableschema+json" || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
6406
6406
|
const formatType = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6407
6407
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6408
6408
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
6409
6409
|
content: notFoundContent,
|
|
6410
6410
|
siteUrl: rootUrl
|
|
6411
6411
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6412
|
-
className:
|
|
6412
|
+
className: "ds-l-container",
|
|
6413
6413
|
children: [
|
|
6414
6414
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6415
|
-
className:
|
|
6415
|
+
className: "ds-l-row",
|
|
6416
6416
|
children: [
|
|
6417
6417
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6418
|
-
className:
|
|
6418
|
+
className: "ds-l-md-col--9",
|
|
6419
6419
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
6420
6420
|
className: "ds-text-heading--3xl",
|
|
6421
6421
|
children: title
|
|
6422
6422
|
})
|
|
6423
6423
|
}),
|
|
6424
6424
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6425
|
-
className:
|
|
6425
|
+
className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
|
|
6426
6426
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
6427
6427
|
className: "ds-u-margin--0",
|
|
6428
6428
|
children: [
|
|
@@ -6434,7 +6434,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6434
6434
|
})
|
|
6435
6435
|
}),
|
|
6436
6436
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6437
|
-
className:
|
|
6437
|
+
className: "ds-l-md-col--9",
|
|
6438
6438
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
6439
6439
|
distribution: distribution,
|
|
6440
6440
|
dataset: dataset,
|
|
@@ -6446,9 +6446,9 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6446
6446
|
]
|
|
6447
6447
|
}),
|
|
6448
6448
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6449
|
-
className:
|
|
6449
|
+
className: "ds-l-row",
|
|
6450
6450
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6451
|
-
className:
|
|
6451
|
+
className: "ds-l-md-col--12 dc-dataset",
|
|
6452
6452
|
children: !isPending && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tabs), {
|
|
6453
6453
|
onChange: (selectedId, prevSelectedId)=>{
|
|
6454
6454
|
setSelectedTab(selectedId);
|
|
@@ -6456,7 +6456,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6456
6456
|
selectedId: selectedTab,
|
|
6457
6457
|
children: [
|
|
6458
6458
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6459
|
-
id:
|
|
6459
|
+
id: "data-table",
|
|
6460
6460
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6461
6461
|
className: "ds-u-color--primary",
|
|
6462
6462
|
children: [
|
|
@@ -6466,7 +6466,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6466
6466
|
"Data Table"
|
|
6467
6467
|
]
|
|
6468
6468
|
}),
|
|
6469
|
-
className: borderlessTabs ?
|
|
6469
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6470
6470
|
children: (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
6471
6471
|
value: {
|
|
6472
6472
|
id: id,
|
|
@@ -6483,7 +6483,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6483
6483
|
})
|
|
6484
6484
|
}),
|
|
6485
6485
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6486
|
-
id:
|
|
6486
|
+
id: "overview",
|
|
6487
6487
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6488
6488
|
className: "ds-u-color--primary",
|
|
6489
6489
|
children: [
|
|
@@ -6493,7 +6493,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6493
6493
|
"Overview"
|
|
6494
6494
|
]
|
|
6495
6495
|
}),
|
|
6496
|
-
className: borderlessTabs ?
|
|
6496
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6497
6497
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
|
|
6498
6498
|
resource: resource,
|
|
6499
6499
|
dataset: dataset,
|
|
@@ -6502,7 +6502,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6502
6502
|
})
|
|
6503
6503
|
}),
|
|
6504
6504
|
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6505
|
-
id:
|
|
6505
|
+
id: "data-dictionary",
|
|
6506
6506
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6507
6507
|
className: "ds-u-color--primary",
|
|
6508
6508
|
children: [
|
|
@@ -6512,7 +6512,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6512
6512
|
"Data Dictionary"
|
|
6513
6513
|
]
|
|
6514
6514
|
}),
|
|
6515
|
-
className: borderlessTabs ?
|
|
6515
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6516
6516
|
children: displayDataDictionaryTab ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
6517
6517
|
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
6518
6518
|
datasetDictionaryEndpoint: distribution.data.describedBy,
|
|
@@ -6523,7 +6523,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6523
6523
|
})
|
|
6524
6524
|
}),
|
|
6525
6525
|
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6526
|
-
id:
|
|
6526
|
+
id: "api",
|
|
6527
6527
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6528
6528
|
className: "ds-u-color--primary",
|
|
6529
6529
|
children: [
|
|
@@ -6533,7 +6533,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6533
6533
|
"API"
|
|
6534
6534
|
]
|
|
6535
6535
|
}),
|
|
6536
|
-
className: borderlessTabs ?
|
|
6536
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6537
6537
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
|
|
6538
6538
|
id: id,
|
|
6539
6539
|
rootUrl: rootUrl,
|
|
@@ -6570,13 +6570,13 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6570
6570
|
});
|
|
6571
6571
|
const menu = (0, $hgUW1$useRef)(null);
|
|
6572
6572
|
function closeMobileMenu() {
|
|
6573
|
-
const mobileMenuButtonElement = document.querySelector(
|
|
6573
|
+
const mobileMenuButtonElement = document.querySelector(".dkan-c-mobile-menu-button");
|
|
6574
6574
|
if (!mobileMenuButtonElement) return;
|
|
6575
6575
|
mobileMenuButtonElement.focus();
|
|
6576
6576
|
}
|
|
6577
6577
|
// Close mobile menu with escape.
|
|
6578
6578
|
function handleMenuClose(event) {
|
|
6579
|
-
if (event.key ===
|
|
6579
|
+
if (event.key === "Escape" && mobileMenuOpen) setMobileMenuOpen(false);
|
|
6580
6580
|
}
|
|
6581
6581
|
function handleClick(event) {
|
|
6582
6582
|
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
@@ -6611,7 +6611,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6611
6611
|
const focusableEls = getFocusableElements(menu.current).selectors.visible;
|
|
6612
6612
|
const firstEl = focusableEls[0];
|
|
6613
6613
|
const lastEl = focusableEls[focusableEls.length - 1];
|
|
6614
|
-
if (event.key ===
|
|
6614
|
+
if (event.key === "Tab") {
|
|
6615
6615
|
if (event.shiftKey && document.activeElement === firstEl) {
|
|
6616
6616
|
lastEl?.focus();
|
|
6617
6617
|
event.preventDefault();
|
|
@@ -6623,15 +6623,15 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6623
6623
|
}
|
|
6624
6624
|
};
|
|
6625
6625
|
(0, $hgUW1$useEffect)(()=>{
|
|
6626
|
-
document.addEventListener(
|
|
6627
|
-
document.addEventListener(
|
|
6626
|
+
document.addEventListener("keyup", handleMenuClose);
|
|
6627
|
+
document.addEventListener("mousedown", handleClick);
|
|
6628
6628
|
if (mobileMenuOpen) handleFocusIn();
|
|
6629
6629
|
else closeMobileMenu();
|
|
6630
|
-
if (menu.current) menu.current.addEventListener(
|
|
6630
|
+
if (menu.current) menu.current.addEventListener("keydown", (evt)=>trapFocus(evt));
|
|
6631
6631
|
return ()=>{
|
|
6632
|
-
document.removeEventListener(
|
|
6633
|
-
document.addEventListener(
|
|
6634
|
-
if (menu.current) menu.current.removeEventListener(
|
|
6632
|
+
document.removeEventListener("keyup", handleMenuClose);
|
|
6633
|
+
document.addEventListener("mousedown", handleClick);
|
|
6634
|
+
if (menu.current) menu.current.removeEventListener("keydown", trapFocus);
|
|
6635
6635
|
};
|
|
6636
6636
|
}, [
|
|
6637
6637
|
mobileMenuOpen
|
|
@@ -6646,7 +6646,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6646
6646
|
},
|
|
6647
6647
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
|
|
6648
6648
|
"aria-label": "Site header",
|
|
6649
|
-
className: `dkan-c-header dkan-c-header--${mobileMax ?
|
|
6649
|
+
className: `dkan-c-header dkan-c-header--${mobileMax ? "mobile" : "desktop"}`,
|
|
6650
6650
|
children: [
|
|
6651
6651
|
topNav && topNav,
|
|
6652
6652
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6689,7 +6689,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6689
6689
|
var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
|
|
6690
6690
|
|
|
6691
6691
|
|
|
6692
|
-
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle =
|
|
6692
|
+
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", {
|
|
6693
6693
|
children: [
|
|
6694
6694
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6695
6695
|
children: "A federal government website managed and paid for by the U.S. Centers for Medicare & Medicaid Services."
|
|
@@ -6777,14 +6777,14 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6777
6777
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
6778
6778
|
className: "ds-u-font-size--sm",
|
|
6779
6779
|
children: footerAdditionalResourcesLinks.filter((link)=>{
|
|
6780
|
-
const noOnClick = Object.keys(link).findIndex((l)=>l ===
|
|
6780
|
+
const noOnClick = Object.keys(link).findIndex((l)=>l === "onClick");
|
|
6781
6781
|
if (noOnClick === -1 || link.onClick && link.dataTag) return link;
|
|
6782
6782
|
}).map((link)=>{
|
|
6783
6783
|
if (link.onClick && link.dataTag) return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
6784
6784
|
className: "ds-u-margin-bottom--1",
|
|
6785
6785
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
6786
6786
|
href: link.url,
|
|
6787
|
-
[
|
|
6787
|
+
["data-" + link.dataTag.name]: link.dataTag.value,
|
|
6788
6788
|
onClick: link.onClick,
|
|
6789
6789
|
children: link.label
|
|
6790
6790
|
})
|
|
@@ -6884,7 +6884,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6884
6884
|
children: [
|
|
6885
6885
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6886
6886
|
id: "svg-inline--fa-title-iRCARP7h6Kp3",
|
|
6887
|
-
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title :
|
|
6887
|
+
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title : "CMS Facebook"
|
|
6888
6888
|
}),
|
|
6889
6889
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6890
6890
|
transform: "translate(160 256)",
|
|
@@ -6937,7 +6937,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6937
6937
|
children: [
|
|
6938
6938
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6939
6939
|
id: "svg-inline--fa-title-4z03ITiPPTVF",
|
|
6940
|
-
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title :
|
|
6940
|
+
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title : "CMS Twitter"
|
|
6941
6941
|
}),
|
|
6942
6942
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6943
6943
|
transform: "translate(256 256)",
|
|
@@ -6990,7 +6990,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6990
6990
|
children: [
|
|
6991
6991
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6992
6992
|
id: "svg-inline--fa-title-Nm2qsuSKvuRZ",
|
|
6993
|
-
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title :
|
|
6993
|
+
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title : "CMS LinkedIn"
|
|
6994
6994
|
}),
|
|
6995
6995
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6996
6996
|
transform: "translate(224 256)",
|
|
@@ -7042,7 +7042,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7042
7042
|
children: [
|
|
7043
7043
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7044
7044
|
id: "svg-inline--fa-title-youtube",
|
|
7045
|
-
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title :
|
|
7045
|
+
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title : "CMS youtube"
|
|
7046
7046
|
}),
|
|
7047
7047
|
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
7048
7048
|
fill: "currentColor",
|
|
@@ -7142,26 +7142,26 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7142
7142
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
7143
7143
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
7144
7144
|
stackable: true,
|
|
7145
|
-
className:
|
|
7145
|
+
className: "ds-c-table",
|
|
7146
7146
|
children: [
|
|
7147
7147
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
|
|
7148
7148
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
7149
7149
|
children: [
|
|
7150
7150
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7151
|
-
id:
|
|
7152
|
-
headers:
|
|
7151
|
+
id: "application",
|
|
7152
|
+
headers: "Application",
|
|
7153
7153
|
children: "Application"
|
|
7154
|
-
},
|
|
7154
|
+
}, "Application"),
|
|
7155
7155
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7156
|
-
id:
|
|
7157
|
-
headers:
|
|
7156
|
+
id: "notes",
|
|
7157
|
+
headers: "Notes",
|
|
7158
7158
|
children: "Notes"
|
|
7159
|
-
},
|
|
7159
|
+
}, "Notes"),
|
|
7160
7160
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7161
|
-
id:
|
|
7162
|
-
headers:
|
|
7161
|
+
id: "links",
|
|
7162
|
+
headers: "Links",
|
|
7163
7163
|
children: "Links"
|
|
7164
|
-
},
|
|
7164
|
+
}, "Links")
|
|
7165
7165
|
]
|
|
7166
7166
|
})
|
|
7167
7167
|
}),
|
|
@@ -7171,19 +7171,19 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7171
7171
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7172
7172
|
id: d.id,
|
|
7173
7173
|
stackedTitle: "Application",
|
|
7174
|
-
headers:
|
|
7174
|
+
headers: "Application",
|
|
7175
7175
|
children: d.application
|
|
7176
7176
|
}, d.id),
|
|
7177
7177
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7178
7178
|
id: d.id,
|
|
7179
7179
|
stackedTitle: "Notes",
|
|
7180
|
-
headers:
|
|
7180
|
+
headers: "Notes",
|
|
7181
7181
|
children: d.notes
|
|
7182
7182
|
}, `${d.id}-notes`),
|
|
7183
7183
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7184
7184
|
id: d.id,
|
|
7185
7185
|
stackedTitle: "Links",
|
|
7186
|
-
headers:
|
|
7186
|
+
headers: "Links",
|
|
7187
7187
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
7188
7188
|
className: "dkan-newtab",
|
|
7189
7189
|
href: d.link,
|
|
@@ -7211,44 +7211,44 @@ var $5655284dbbb89508$export$2e2bcd8739ae039 = $5655284dbbb89508$var$Documentati
|
|
|
7211
7211
|
|
|
7212
7212
|
const $c7bf75f7e8a68780$export$7850f4d545d994c6 = [
|
|
7213
7213
|
{
|
|
7214
|
-
id:
|
|
7215
|
-
application:
|
|
7216
|
-
notes:
|
|
7217
|
-
link:
|
|
7218
|
-
linkText:
|
|
7219
|
-
screenReaderOnlyText:
|
|
7214
|
+
id: "excel",
|
|
7215
|
+
application: "Microsoft Excel",
|
|
7216
|
+
notes: "Official size limitations for Microsoft Excel",
|
|
7217
|
+
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",
|
|
7218
|
+
linkText: "Excel Specifications and Limits",
|
|
7219
|
+
screenReaderOnlyText: "on microsoft.com"
|
|
7220
7220
|
},
|
|
7221
7221
|
{
|
|
7222
|
-
id:
|
|
7223
|
-
application:
|
|
7224
|
-
notes:
|
|
7225
|
-
link:
|
|
7226
|
-
linkText:
|
|
7227
|
-
screenReaderOnlyText:
|
|
7222
|
+
id: "access",
|
|
7223
|
+
application: "Microsoft Access",
|
|
7224
|
+
notes: "Official size limitations for Microsoft Access",
|
|
7225
|
+
link: "https://support.microsoft.com/en-us/office/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c?ui=en-us&rs=en-us&ad=us",
|
|
7226
|
+
linkText: "Access 2016 Specifications",
|
|
7227
|
+
screenReaderOnlyText: "on microsoft.com"
|
|
7228
7228
|
},
|
|
7229
7229
|
{
|
|
7230
|
-
id:
|
|
7231
|
-
application:
|
|
7232
|
-
notes:
|
|
7233
|
-
link:
|
|
7234
|
-
linkText:
|
|
7235
|
-
screenReaderOnlyText:
|
|
7230
|
+
id: "oracle-sql-developer",
|
|
7231
|
+
application: "Oracle SQL Developer",
|
|
7232
|
+
notes: "Oracle SQL Developer tool",
|
|
7233
|
+
link: "https://www.oracle.com/database/sqldeveloper/",
|
|
7234
|
+
linkText: "Oracle SQL Developer Overview",
|
|
7235
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7236
7236
|
},
|
|
7237
7237
|
{
|
|
7238
|
-
id:
|
|
7239
|
-
application:
|
|
7240
|
-
notes:
|
|
7241
|
-
link:
|
|
7242
|
-
linkText:
|
|
7243
|
-
screenReaderOnlyText:
|
|
7238
|
+
id: "oracle-database",
|
|
7239
|
+
application: "Oracle Database",
|
|
7240
|
+
notes: "Oracle Database official size limitations",
|
|
7241
|
+
link: "https://docs.oracle.com/cd/B28359_01/server.111/b28320/limits002.htm#i287915",
|
|
7242
|
+
linkText: "Oracle Physical Database Limits",
|
|
7243
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7244
7244
|
},
|
|
7245
7245
|
{
|
|
7246
|
-
id:
|
|
7247
|
-
application:
|
|
7248
|
-
notes:
|
|
7249
|
-
link:
|
|
7250
|
-
linkText:
|
|
7251
|
-
screenReaderOnlyText:
|
|
7246
|
+
id: "oracle-sql-client-tools",
|
|
7247
|
+
application: "Oracle SQL Client Tools",
|
|
7248
|
+
notes: "Oracle SQL Client Tools",
|
|
7249
|
+
link: "https://www.oracle.com/database/technologies/oracle-database-software-downloads.html",
|
|
7250
|
+
linkText: "Oracle SQL Client",
|
|
7251
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7252
7252
|
}
|
|
7253
7253
|
];
|
|
7254
7254
|
|
|
@@ -7276,7 +7276,7 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7276
7276
|
}),
|
|
7277
7277
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
7278
7278
|
heading: "Notice",
|
|
7279
|
-
className:
|
|
7279
|
+
className: "ds-u-margin-top--6",
|
|
7280
7280
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
7281
7281
|
className: "ds-c-alert__text",
|
|
7282
7282
|
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."
|
|
@@ -7285,16 +7285,16 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7285
7285
|
]
|
|
7286
7286
|
}),
|
|
7287
7287
|
/*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7288
|
-
className:
|
|
7288
|
+
className: "ds-u-margin-top--4 ds-l-row",
|
|
7289
7289
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7290
|
-
className:
|
|
7290
|
+
className: "ds-l-col--12",
|
|
7291
7291
|
children: [
|
|
7292
7292
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
7293
7293
|
className: "ds-text-heading--2xl ds-text-heading--2xl",
|
|
7294
7294
|
children: "Documentation by Application"
|
|
7295
7295
|
}),
|
|
7296
7296
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7297
|
-
className:
|
|
7297
|
+
className: "ds-u-margin-top--4",
|
|
7298
7298
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5655284dbbb89508$export$2e2bcd8739ae039), {
|
|
7299
7299
|
data: documentationList
|
|
7300
7300
|
})
|
|
@@ -7322,7 +7322,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7322
7322
|
const options = {
|
|
7323
7323
|
conditions: query ? JSON.parse(query).map(({ column: column, operator: operator, ...rest })=>({
|
|
7324
7324
|
property: column,
|
|
7325
|
-
operator: operator ===
|
|
7325
|
+
operator: operator === "is" ? "=" : operator === "is not" ? "<>" : operator === "or" ? "in" : operator,
|
|
7326
7326
|
...rest
|
|
7327
7327
|
})) : []
|
|
7328
7328
|
};
|
|
@@ -7330,13 +7330,13 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7330
7330
|
let distribution = {};
|
|
7331
7331
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
7332
7332
|
if (distributions.length) distribution = distributions[distributionIndex];
|
|
7333
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7333
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
7334
7334
|
...options,
|
|
7335
7335
|
limit: defaultPageSize
|
|
7336
7336
|
});
|
|
7337
7337
|
(0, $hgUW1$useEffect)(()=>{
|
|
7338
7338
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
7339
|
-
if (localFileFormat ===
|
|
7339
|
+
if (localFileFormat === "csv") resource.setResource(distribution.identifier);
|
|
7340
7340
|
}, [
|
|
7341
7341
|
distribution
|
|
7342
7342
|
]);
|
|
@@ -7386,7 +7386,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7386
7386
|
|
|
7387
7387
|
|
|
7388
7388
|
function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
|
|
7389
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7389
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
7390
7390
|
const newDate = new Date(condition.value);
|
|
7391
7391
|
if (newDate instanceof Date && !isNaN(newDate)) return newDate;
|
|
7392
7392
|
}
|
|
@@ -7403,9 +7403,9 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7403
7403
|
const [startDate, setStartDate] = (0, $hgUW1$react).useState($374c4669b044ddf8$var$getStartDate(condition, schema, id));
|
|
7404
7404
|
(0, $hgUW1$useEffect)(()=>{
|
|
7405
7405
|
if (property !== condition.property) {
|
|
7406
|
-
if (property) update(index,
|
|
7407
|
-
else update(index,
|
|
7408
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7406
|
+
if (property) update(index, "property", property);
|
|
7407
|
+
else update(index, "property", "");
|
|
7408
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
7409
7409
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
7410
7410
|
}
|
|
7411
7411
|
}
|
|
@@ -7419,16 +7419,16 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7419
7419
|
]);
|
|
7420
7420
|
(0, $hgUW1$useEffect)(()=>{
|
|
7421
7421
|
if (operator !== condition.operator) {
|
|
7422
|
-
if (operator) update(index,
|
|
7423
|
-
else update(index,
|
|
7422
|
+
if (operator) update(index, "operator", operator);
|
|
7423
|
+
else update(index, "operator", "");
|
|
7424
7424
|
}
|
|
7425
7425
|
}, [
|
|
7426
7426
|
operator
|
|
7427
7427
|
]);
|
|
7428
7428
|
(0, $hgUW1$useEffect)(()=>{
|
|
7429
7429
|
if (value !== condition.value) {
|
|
7430
|
-
if (value) update(index,
|
|
7431
|
-
else update(index,
|
|
7430
|
+
if (value) update(index, "value", value);
|
|
7431
|
+
else update(index, "value", "");
|
|
7432
7432
|
}
|
|
7433
7433
|
}, [
|
|
7434
7434
|
value
|
|
@@ -7452,7 +7452,7 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7452
7452
|
onChange: (e)=>setOperator(e.target.value),
|
|
7453
7453
|
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"
|
|
7454
7454
|
}),
|
|
7455
|
-
schema[id].fields[property].mysql_type ===
|
|
7455
|
+
schema[id].fields[property].mysql_type === "date" ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7456
7456
|
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",
|
|
7457
7457
|
children: [
|
|
7458
7458
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
@@ -7542,12 +7542,12 @@ const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions, schema: sche
|
|
|
7542
7542
|
className: "ds-u-font-weight--bold",
|
|
7543
7543
|
children: description
|
|
7544
7544
|
}),
|
|
7545
|
-
|
|
7545
|
+
" ",
|
|
7546
7546
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7547
7547
|
className: "ds-u-font-weight--normal",
|
|
7548
7548
|
children: operator.label.toUpperCase()
|
|
7549
7549
|
}),
|
|
7550
|
-
|
|
7550
|
+
" ",
|
|
7551
7551
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7552
7552
|
className: "ds-u-color--success",
|
|
7553
7553
|
children: formattedText
|
|
@@ -7574,19 +7574,19 @@ var $bef7bff2823feea2$export$2e2bcd8739ae039 = $bef7bff2823feea2$var$QueryTitle;
|
|
|
7574
7574
|
function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
|
|
7575
7575
|
let cond = condition;
|
|
7576
7576
|
delete cond.key;
|
|
7577
|
-
if (cond.operator ===
|
|
7577
|
+
if (cond.operator === "=" || cond.operator === "<>") {
|
|
7578
7578
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7579
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7579
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
7580
7580
|
}
|
|
7581
|
-
if (cond.operator.toLowerCase() ===
|
|
7581
|
+
if (cond.operator.toLowerCase() === "like") {
|
|
7582
7582
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7583
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7583
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
7584
7584
|
cond.value = `%${cleanedValue}%`;
|
|
7585
7585
|
}
|
|
7586
|
-
if (cond.operator.toLowerCase() ===
|
|
7587
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
7586
|
+
if (cond.operator.toLowerCase() === "in") {
|
|
7587
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(",");
|
|
7588
7588
|
}
|
|
7589
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
7589
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
|
|
7590
7590
|
return cond;
|
|
7591
7591
|
}
|
|
7592
7592
|
const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, setOffset: setOffset })=>{
|
|
@@ -7606,7 +7606,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7606
7606
|
...queryConditions,
|
|
7607
7607
|
{
|
|
7608
7608
|
property: fields[0],
|
|
7609
|
-
value:
|
|
7609
|
+
value: "",
|
|
7610
7610
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
7611
7611
|
key: Date.now()
|
|
7612
7612
|
}
|
|
@@ -7646,7 +7646,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7646
7646
|
encodeValuesOnly: true,
|
|
7647
7647
|
addQueryPrefix: true
|
|
7648
7648
|
});
|
|
7649
|
-
window.history.pushState({},
|
|
7649
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
7650
7650
|
};
|
|
7651
7651
|
const updateCondition = (index, key, value)=>{
|
|
7652
7652
|
let newConditions = [
|
|
@@ -7719,7 +7719,7 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
|
|
|
7719
7719
|
|
|
7720
7720
|
|
|
7721
7721
|
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 })=>{
|
|
7722
|
-
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState(
|
|
7722
|
+
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState("ds-u-padding-y--1");
|
|
7723
7723
|
let apiDocs = (0, $hgUW1$useRef)();
|
|
7724
7724
|
let distribution = {};
|
|
7725
7725
|
let distribution_array = dataset.distribution ? dataset.distribution : [];
|
|
@@ -7731,7 +7731,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7731
7731
|
} : {
|
|
7732
7732
|
conditions: []
|
|
7733
7733
|
};
|
|
7734
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7734
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
7735
7735
|
...options,
|
|
7736
7736
|
limit: 25
|
|
7737
7737
|
});
|
|
@@ -7745,7 +7745,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7745
7745
|
}, {
|
|
7746
7746
|
encode: true
|
|
7747
7747
|
})}&format=csv`;
|
|
7748
|
-
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !==
|
|
7748
|
+
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !== "csv" ? distribution.data.title : dataset.title;
|
|
7749
7749
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
7750
7750
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7751
7751
|
className: "ds-l-container ds-u-padding-bottom--3 ds-u-margin-bottom--2",
|
|
@@ -7754,7 +7754,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7754
7754
|
children: Object.keys(distribution).length && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
7755
7755
|
children: [
|
|
7756
7756
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7757
|
-
className:
|
|
7757
|
+
className: "ds-l-md-col--9",
|
|
7758
7758
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
7759
7759
|
to: `/dataset/${id}`,
|
|
7760
7760
|
className: "ds-u-padding-y--4 ds-u-display--block",
|
|
@@ -7765,14 +7765,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7765
7765
|
})
|
|
7766
7766
|
}),
|
|
7767
7767
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7768
|
-
className:
|
|
7768
|
+
className: "ds-l-md-col--9",
|
|
7769
7769
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
7770
7770
|
className: "ds-text-heading--3xl",
|
|
7771
7771
|
children: customTitle ? customTitle : pageTitle
|
|
7772
7772
|
})
|
|
7773
7773
|
}),
|
|
7774
7774
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7775
|
-
className:
|
|
7775
|
+
className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
|
|
7776
7776
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
7777
7777
|
className: "ds-u-margin--0",
|
|
7778
7778
|
children: [
|
|
@@ -7784,7 +7784,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7784
7784
|
})
|
|
7785
7785
|
}),
|
|
7786
7786
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7787
|
-
className:
|
|
7787
|
+
className: "ds-l-md-col--9",
|
|
7788
7788
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
7789
7789
|
distribution: distribution,
|
|
7790
7790
|
dataset: dataset,
|
|
@@ -7794,13 +7794,13 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7794
7794
|
})
|
|
7795
7795
|
}),
|
|
7796
7796
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7797
|
-
className:
|
|
7797
|
+
className: "ds-l-md-col--12",
|
|
7798
7798
|
children: Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
|
|
7799
7799
|
resource: resource,
|
|
7800
7800
|
id: distribution.identifier,
|
|
7801
7801
|
customColumns: customColumns,
|
|
7802
7802
|
setOffset: resource.setOffset
|
|
7803
|
-
}) :
|
|
7803
|
+
}) : ""
|
|
7804
7804
|
}),
|
|
7805
7805
|
Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
7806
7806
|
value: {
|
|
@@ -7811,7 +7811,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7811
7811
|
customColumns: (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution_array[distIndex].identifier])
|
|
7812
7812
|
},
|
|
7813
7813
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7814
|
-
className:
|
|
7814
|
+
className: "ds-l-md-col--12",
|
|
7815
7815
|
children: [
|
|
7816
7816
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $af099c546cb226c7$export$2e2bcd8739ae039), {
|
|
7817
7817
|
includeDensity: true,
|
|
@@ -7833,14 +7833,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7833
7833
|
]
|
|
7834
7834
|
})
|
|
7835
7835
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7836
|
-
className:
|
|
7836
|
+
className: "ds-l-md-col--12",
|
|
7837
7837
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
7838
7838
|
role: "status",
|
|
7839
7839
|
"aria-valuetext": "Resource loading"
|
|
7840
7840
|
})
|
|
7841
7841
|
}),
|
|
7842
7842
|
dataset.identifier && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7843
|
-
className:
|
|
7843
|
+
className: "ds-l-md-col--12",
|
|
7844
7844
|
ref: apiDocs,
|
|
7845
7845
|
children: [
|
|
7846
7846
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
@@ -7849,7 +7849,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7849
7849
|
}),
|
|
7850
7850
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
7851
7851
|
url: `${rootUrl}/metastore/schemas/dataset/items/${dataset.identifier}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`,
|
|
7852
|
-
docExpansion:
|
|
7852
|
+
docExpansion: "list",
|
|
7853
7853
|
defaultModelsExpandDepth: -1
|
|
7854
7854
|
})
|
|
7855
7855
|
]
|
|
@@ -7868,7 +7868,7 @@ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, loca
|
|
|
7868
7868
|
const [ready, setReady] = (0, $hgUW1$useState)(false);
|
|
7869
7869
|
const [error, setError] = (0, $hgUW1$useState)(false);
|
|
7870
7870
|
const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
7871
|
-
const distIndex = dist_id ===
|
|
7871
|
+
const distIndex = dist_id === "data" ? 0 : dist_id;
|
|
7872
7872
|
(0, $hgUW1$useEffect)(()=>{
|
|
7873
7873
|
if (dataset.error) setError(true);
|
|
7874
7874
|
if (dataset.distribution && dataset.distribution.length) {
|