@civicactions/cmsds-open-data-components 3.8.3-alpha.0 → 3.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.css +3 -3
- package/dist/main.css.map +1 -1
- package/dist/main.js +525 -526
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +42 -44
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
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), {
|
|
@@ -305,18 +305,18 @@ const $4808982eba3feb88$var$DatasetListSubmenuItem = (props)=>{
|
|
|
305
305
|
minWidth: 1024
|
|
306
306
|
});
|
|
307
307
|
const { title: title, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
|
|
308
|
-
let linkContainerClasses =
|
|
309
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
310
|
-
else linkContainerClasses +=
|
|
311
|
-
let linkClasses =
|
|
308
|
+
let linkContainerClasses = "ds-u-margin-bottom--2";
|
|
309
|
+
if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
|
|
310
|
+
else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
|
|
311
|
+
let linkClasses = "ds-u-display--block ds-u-text-align--left";
|
|
312
312
|
if (desktop) {
|
|
313
|
-
linkContainerClasses =
|
|
314
|
-
linkClasses +=
|
|
313
|
+
linkContainerClasses = "ds-u-padding-x--0";
|
|
314
|
+
linkClasses += " ds-l-col--4 ds-l-md-col--auto";
|
|
315
315
|
}
|
|
316
316
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
317
317
|
className: "dc-c-list-item ds-u-padding-top--4",
|
|
318
318
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
319
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
319
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
|
|
320
320
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
321
321
|
className: "ds-l-row ds-u-align-items--start",
|
|
322
322
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
@@ -388,12 +388,12 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
388
388
|
fulltext: fulltext ? fulltext : undefined,
|
|
389
389
|
...selectedFacets,
|
|
390
390
|
sort: sort ? sort : undefined,
|
|
391
|
-
[
|
|
391
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
392
392
|
page: page !== 1 ? page : undefined,
|
|
393
|
-
[
|
|
393
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
394
394
|
};
|
|
395
395
|
return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
396
|
-
arrayFormat:
|
|
396
|
+
arrayFormat: "comma",
|
|
397
397
|
encode: false
|
|
398
398
|
})}`);
|
|
399
399
|
}
|
|
@@ -408,8 +408,8 @@ const $844981eac9b63865$export$eccc29c8d0ff408 = (0, $hgUW1$createContext)({
|
|
|
408
408
|
|
|
409
409
|
const $9384a736d4d6f425$var$DatasetListSubmenu = (props)=>{
|
|
410
410
|
const { rootUrl: rootUrl, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 3, defaultSort: defaultSort = {
|
|
411
|
-
defaultSort:
|
|
412
|
-
defaultOrder:
|
|
411
|
+
defaultSort: "modified",
|
|
412
|
+
defaultOrder: "desc"
|
|
413
413
|
}, dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
414
414
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
415
415
|
const defaultSortBy = "";
|
|
@@ -423,7 +423,7 @@ const $9384a736d4d6f425$var$DatasetListSubmenu = (props)=>{
|
|
|
423
423
|
endingNumber: 0
|
|
424
424
|
});
|
|
425
425
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
426
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
426
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
|
|
427
427
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
428
428
|
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
429
429
|
const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
|
|
@@ -434,7 +434,7 @@ const $9384a736d4d6f425$var$DatasetListSubmenu = (props)=>{
|
|
|
434
434
|
// Update browser URL with current search params
|
|
435
435
|
const params = buildSearchParams(true);
|
|
436
436
|
const url = new URL(window.location.href);
|
|
437
|
-
window.history.pushState({},
|
|
437
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${params}`);
|
|
438
438
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
439
439
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
440
440
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -473,9 +473,9 @@ const $9384a736d4d6f425$var$DatasetListSubmenu = (props)=>{
|
|
|
473
473
|
}
|
|
474
474
|
let params = {
|
|
475
475
|
sort: sort ? sort : undefined,
|
|
476
|
-
[
|
|
476
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
477
477
|
page: page !== 1 ? page : undefined,
|
|
478
|
-
[
|
|
478
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
479
479
|
};
|
|
480
480
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
481
481
|
queryKey: [
|
|
@@ -484,7 +484,7 @@ const $9384a736d4d6f425$var$DatasetListSubmenu = (props)=>{
|
|
|
484
484
|
],
|
|
485
485
|
queryFn: ()=>{
|
|
486
486
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
487
|
-
arrayFormat:
|
|
487
|
+
arrayFormat: "comma",
|
|
488
488
|
encode: false
|
|
489
489
|
})}`);
|
|
490
490
|
}
|
|
@@ -612,11 +612,11 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
612
612
|
function handleFocusOut(event) {
|
|
613
613
|
if (currentMenu && !currentMenu.contains(event.relatedTarget)) setIsExpanded1(false);
|
|
614
614
|
}
|
|
615
|
-
document.addEventListener(
|
|
616
|
-
currentMenu?.addEventListener(
|
|
615
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
616
|
+
currentMenu?.addEventListener("focusout", handleFocusOut);
|
|
617
617
|
return ()=>{
|
|
618
|
-
document.removeEventListener(
|
|
619
|
-
if (currentMenu) currentMenu.removeEventListener(
|
|
618
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
619
|
+
if (currentMenu) currentMenu.removeEventListener("focusout", handleFocusOut);
|
|
620
620
|
};
|
|
621
621
|
}, [
|
|
622
622
|
isExpanded1
|
|
@@ -627,7 +627,7 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
627
627
|
else if (/*#__PURE__*/ (0, $hgUW1$react).isValidElement(link.submenu)) submenuBlock = $4f153ca537d853e5$var$SubMenuDynamicList(link.submenu, subLinkClasses);
|
|
628
628
|
}
|
|
629
629
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
630
|
-
className: `dkan-c-nav-submenu has-submenu${isExpanded1 ?
|
|
630
|
+
className: `dkan-c-nav-submenu has-submenu${isExpanded1 ? " open" : ""}`,
|
|
631
631
|
ref: menu,
|
|
632
632
|
children: [
|
|
633
633
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
@@ -666,12 +666,12 @@ var $4f153ca537d853e5$export$2e2bcd8739ae039 = $4f153ca537d853e5$var$SubMenu;
|
|
|
666
666
|
const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
|
|
667
667
|
const { headingText: headingText = "Dataset Search" } = props;
|
|
668
668
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
669
|
-
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)(
|
|
669
|
+
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)("");
|
|
670
670
|
const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
|
|
671
671
|
function searchForDataset(e) {
|
|
672
672
|
e.preventDefault();
|
|
673
673
|
if (window) {
|
|
674
|
-
if (window.location.pathname !==
|
|
674
|
+
if (window.location.pathname !== "/datasets") navigate(`/datasets?fulltext=${modalSearchTerm}`);
|
|
675
675
|
else {
|
|
676
676
|
window.location.search = `fulltext=${modalSearchTerm}`;
|
|
677
677
|
setModalSearch(false);
|
|
@@ -738,9 +738,9 @@ const $b939b31651e82908$var$HeaderNav = (props)=>{
|
|
|
738
738
|
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
739
739
|
const { links: links, topNavLinks: topNavLinks, wrapperClasses: wrapperClasses, searchInMobile: searchInMobile } = props;
|
|
740
740
|
const navMenuOpenClass = `dkan-c-nav-menu--${headerContext.mobileMenuOpen ? "open" : "close"}`;
|
|
741
|
-
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ?
|
|
742
|
-
const linkClasses =
|
|
743
|
-
const listClasses =
|
|
741
|
+
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ? "mobile" : "desktop"}`;
|
|
742
|
+
const linkClasses = "dkan-c-header--link ds-c-button ds-c-button--ghost";
|
|
743
|
+
const listClasses = "dkan-c-header--link-list ";
|
|
744
744
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
745
745
|
className: `dkan-c-nav-menu ${wrapperClasses} ${navMenuOpenClass} ${isMobileClass}`,
|
|
746
746
|
ref: headerContext.menuRef,
|
|
@@ -910,8 +910,8 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
910
910
|
const { title: title, links: links, mobileMax: mobileMax } = props;
|
|
911
911
|
const active = (0, $hgUW1$useLocation)().pathname;
|
|
912
912
|
const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
|
|
913
|
-
const styleClasses =
|
|
914
|
-
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ?
|
|
913
|
+
const styleClasses = "dkan-c--sidebar-nav-wrapper ds-u-border--1 ds-u-border--color-gray-lightest ds-u-padding--2";
|
|
914
|
+
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ? "mobile" : "desktop"}`;
|
|
915
915
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
916
916
|
className: `dkan-c-sidebar-nav ${mobileClass}`,
|
|
917
917
|
children: [
|
|
@@ -925,7 +925,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
925
925
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
926
926
|
"aria-haspopup": "true",
|
|
927
927
|
variation: "ghost",
|
|
928
|
-
"aria-expanded": `${menuOpen ?
|
|
928
|
+
"aria-expanded": `${menuOpen ? "true" : "false"}`,
|
|
929
929
|
onDark: true,
|
|
930
930
|
onClick: ()=>setMenuOpen(!menuOpen),
|
|
931
931
|
children: [
|
|
@@ -934,7 +934,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
934
934
|
children: "Toggle menu"
|
|
935
935
|
}),
|
|
936
936
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
|
|
937
|
-
direction: menuOpen ?
|
|
937
|
+
direction: menuOpen ? "up" : "down"
|
|
938
938
|
})
|
|
939
939
|
]
|
|
940
940
|
})
|
|
@@ -943,7 +943,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
943
943
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
944
944
|
className: ``,
|
|
945
945
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
|
|
946
|
-
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ?
|
|
946
|
+
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ? "open" : "close"}`,
|
|
947
947
|
children: [
|
|
948
948
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
949
949
|
className: "ds-u-padding--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest",
|
|
@@ -955,7 +955,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
955
955
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
956
956
|
className: "ds-u-padding-bottom--2",
|
|
957
957
|
children: links.map(({ url: url, label: label })=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
958
|
-
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ?
|
|
958
|
+
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ? "active" : ""}`,
|
|
959
959
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
960
960
|
className: "ds-u-display--flex ds-u-padding-y--1",
|
|
961
961
|
children: [
|
|
@@ -990,12 +990,12 @@ const $b0968edc60d7d3a4$var$SidebarPage = (props)=>{
|
|
|
990
990
|
query: `(max-width: ${mobileMaxWidth}px)`
|
|
991
991
|
});
|
|
992
992
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
993
|
-
className: `${mobileMax ? "a" :
|
|
993
|
+
className: `${mobileMax ? "a" : "ds-l-container"}`,
|
|
994
994
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
995
|
-
className: `${mobileMax ? "a" :
|
|
995
|
+
className: `${mobileMax ? "a" : "ds-l-row"}`,
|
|
996
996
|
children: [
|
|
997
997
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
998
|
-
className: `${mobileMax ?
|
|
998
|
+
className: `${mobileMax ? "a" : "ds-l-col--4"}`,
|
|
999
999
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $953b286f7778640e$export$2e2bcd8739ae039), {
|
|
1000
1000
|
links: links,
|
|
1001
1001
|
title: menuTitle,
|
|
@@ -1018,9 +1018,9 @@ var $b0968edc60d7d3a4$export$2e2bcd8739ae039 = $b0968edc60d7d3a4$var$SidebarPage
|
|
|
1018
1018
|
|
|
1019
1019
|
|
|
1020
1020
|
|
|
1021
|
-
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl =
|
|
1021
|
+
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl = "datasets", searchKey: searchKey = "fulltext", textfieldLabel: textfieldLabel = "Search for a dataset", searchButtonText: searchButtonText = "Search" })=>{
|
|
1022
1022
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
1023
|
-
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState(
|
|
1023
|
+
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState("");
|
|
1024
1024
|
function submitHero(e) {
|
|
1025
1025
|
e.preventDefault();
|
|
1026
1026
|
navigate(`/${searchUrl}?${searchKey}=${searchValue}`);
|
|
@@ -1047,24 +1047,24 @@ const $59a079354baa335c$var$Hero = ({ title: title, description: description, se
|
|
|
1047
1047
|
onSubmit: (e)=>submitHero(e),
|
|
1048
1048
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1049
1049
|
style: {
|
|
1050
|
-
position:
|
|
1050
|
+
position: "relative"
|
|
1051
1051
|
},
|
|
1052
1052
|
className: "ds-l-row ds-u-align-items--stretch ds-u-margin-y--4 ds-u-flex-wrap--nowrap",
|
|
1053
1053
|
children: [
|
|
1054
1054
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1055
1055
|
className: "ds-u-padding--0 ds-u-margin-right--1",
|
|
1056
1056
|
style: {
|
|
1057
|
-
flex:
|
|
1058
|
-
maxWidth:
|
|
1057
|
+
flex: "1 1 100%",
|
|
1058
|
+
maxWidth: "100%"
|
|
1059
1059
|
},
|
|
1060
1060
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
1061
1061
|
label: textfieldLabel,
|
|
1062
1062
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
1063
1063
|
name: "search_text_input",
|
|
1064
1064
|
style: {
|
|
1065
|
-
maxWidth:
|
|
1066
|
-
height:
|
|
1067
|
-
margin:
|
|
1065
|
+
maxWidth: "none",
|
|
1066
|
+
height: "61px",
|
|
1067
|
+
margin: "0 20px 0 0"
|
|
1068
1068
|
},
|
|
1069
1069
|
onChange: (e)=>setSearchValue(e.target.value)
|
|
1070
1070
|
})
|
|
@@ -1106,7 +1106,7 @@ var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
|
|
|
1106
1106
|
|
|
1107
1107
|
const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
1108
1108
|
switch(props.id){
|
|
1109
|
-
case
|
|
1109
|
+
case "overview":
|
|
1110
1110
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1111
1111
|
width: "16px",
|
|
1112
1112
|
height: "16px",
|
|
@@ -1148,7 +1148,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1148
1148
|
})
|
|
1149
1149
|
]
|
|
1150
1150
|
});
|
|
1151
|
-
case
|
|
1151
|
+
case "data-table":
|
|
1152
1152
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1153
1153
|
width: "16px",
|
|
1154
1154
|
height: "12px",
|
|
@@ -1180,7 +1180,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1180
1180
|
})
|
|
1181
1181
|
]
|
|
1182
1182
|
});
|
|
1183
|
-
case
|
|
1183
|
+
case "api":
|
|
1184
1184
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1185
1185
|
width: "16px",
|
|
1186
1186
|
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",
|
|
@@ -1241,7 +1241,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1241
1241
|
})
|
|
1242
1242
|
]
|
|
1243
1243
|
});
|
|
1244
|
-
case
|
|
1244
|
+
case "data-dictionary":
|
|
1245
1245
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1246
1246
|
width: "14px",
|
|
1247
1247
|
height: "16px",
|
|
@@ -1340,14 +1340,14 @@ var $b61856b23f5f58a2$export$2e2bcd8739ae039 = $b61856b23f5f58a2$var$LargeFileDi
|
|
|
1340
1340
|
|
|
1341
1341
|
|
|
1342
1342
|
const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date, options: options = {
|
|
1343
|
-
year:
|
|
1344
|
-
month:
|
|
1345
|
-
day:
|
|
1346
|
-
timeZone:
|
|
1343
|
+
year: "numeric",
|
|
1344
|
+
month: "long",
|
|
1345
|
+
day: "numeric",
|
|
1346
|
+
timeZone: "UTC"
|
|
1347
1347
|
} })=>{
|
|
1348
1348
|
const rawDate = new Date(date);
|
|
1349
|
-
let modifiedDate =
|
|
1350
|
-
if (rawDate) modifiedDate = rawDate.toLocaleDateString(
|
|
1349
|
+
let modifiedDate = "";
|
|
1350
|
+
if (rawDate) modifiedDate = rawDate.toLocaleDateString("en-US", options);
|
|
1351
1351
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
1352
1352
|
children: modifiedDate
|
|
1353
1353
|
});
|
|
@@ -1359,13 +1359,13 @@ var $bd76a91923d7e8a7$export$2e2bcd8739ae039 = $bd76a91923d7e8a7$var$Transformed
|
|
|
1359
1359
|
|
|
1360
1360
|
|
|
1361
1361
|
function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240) {
|
|
1362
|
-
if (!textString) return
|
|
1362
|
+
if (!textString) return "";
|
|
1363
1363
|
let cleanedText = textString;
|
|
1364
|
-
if (cleanedText.split(
|
|
1365
|
-
if (cleanedText.split(
|
|
1364
|
+
if (cleanedText.split("</p>").length > 1) cleanedText = cleanedText.split("</p>")[0];
|
|
1365
|
+
if (cleanedText.split("<br/>").length > 1) cleanedText = cleanedText.split("<br/>")[0];
|
|
1366
1366
|
cleanedText = (0, $hgUW1$lodashtruncate)(cleanedText, {
|
|
1367
|
-
|
|
1368
|
-
|
|
1367
|
+
"length": textLength,
|
|
1368
|
+
"separator": " "
|
|
1369
1369
|
});
|
|
1370
1370
|
return (0, $hgUW1$dompurify).sanitize(cleanedText, {
|
|
1371
1371
|
ALLOWED_TAGS: []
|
|
@@ -1379,25 +1379,25 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1379
1379
|
minWidth: 1024
|
|
1380
1380
|
});
|
|
1381
1381
|
const { title: title, modified: modified, description: description, identifier: identifier, downloadUrl: downloadUrl, largeFile: largeFile = false, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
|
|
1382
|
-
let linkContainerClasses =
|
|
1383
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1384
|
-
else linkContainerClasses +=
|
|
1385
|
-
let linkClasses =
|
|
1382
|
+
let linkContainerClasses = "ds-u-margin-bottom--2";
|
|
1383
|
+
if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
|
|
1384
|
+
else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
|
|
1385
|
+
let linkClasses = "ds-u-display--block ds-u-text-align--left";
|
|
1386
1386
|
if (desktop) {
|
|
1387
|
-
linkContainerClasses =
|
|
1388
|
-
linkClasses +=
|
|
1387
|
+
linkContainerClasses = "ds-u-padding-x--0";
|
|
1388
|
+
linkClasses += " ds-l-col--4 ds-l-md-col--auto";
|
|
1389
1389
|
}
|
|
1390
1390
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1391
1391
|
className: "dc-c-search-list-item ds-u-padding-top--3",
|
|
1392
1392
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1393
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1393
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
|
|
1394
1394
|
children: [
|
|
1395
1395
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1396
1396
|
className: "ds-l-row ds-u-align-items--start",
|
|
1397
1397
|
children: [
|
|
1398
1398
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1399
1399
|
id: `dataset-${identifier}-updated-date`,
|
|
1400
|
-
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ?
|
|
1400
|
+
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? "ds-u-padding-top--2" : "ds-u-padding-top--0"}`,
|
|
1401
1401
|
children: [
|
|
1402
1402
|
"Updated ",
|
|
1403
1403
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
@@ -1439,9 +1439,9 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1439
1439
|
"Download"
|
|
1440
1440
|
]
|
|
1441
1441
|
})
|
|
1442
|
-
}) :
|
|
1442
|
+
}) : "",
|
|
1443
1443
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("ul", {
|
|
1444
|
-
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 ?
|
|
1444
|
+
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" : ""}`,
|
|
1445
1445
|
children: [
|
|
1446
1446
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1447
1447
|
className: linkContainerClasses,
|
|
@@ -1487,7 +1487,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1487
1487
|
]
|
|
1488
1488
|
})
|
|
1489
1489
|
})
|
|
1490
|
-
}) :
|
|
1490
|
+
}) : "",
|
|
1491
1491
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1492
1492
|
className: linkContainerClasses,
|
|
1493
1493
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -1522,26 +1522,26 @@ const $c068004d499082cc$var$DatasetListItem = (props)=>{
|
|
|
1522
1522
|
const desktop = (0, $hgUW1$useMediaQuery)({
|
|
1523
1523
|
minWidth: 1024
|
|
1524
1524
|
});
|
|
1525
|
-
const { title: title, modified: modified,
|
|
1526
|
-
let linkContainerClasses =
|
|
1527
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1528
|
-
else linkContainerClasses +=
|
|
1529
|
-
let linkClasses =
|
|
1525
|
+
const { title: title, modified: modified, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
|
|
1526
|
+
let linkContainerClasses = "ds-u-margin-bottom--2";
|
|
1527
|
+
if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
|
|
1528
|
+
else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
|
|
1529
|
+
let linkClasses = "ds-u-display--block ds-u-text-align--left";
|
|
1530
1530
|
if (desktop) {
|
|
1531
|
-
linkContainerClasses =
|
|
1532
|
-
linkClasses +=
|
|
1531
|
+
linkContainerClasses = "ds-u-padding-x--0";
|
|
1532
|
+
linkClasses += " ds-l-col--4 ds-l-md-col--auto";
|
|
1533
1533
|
}
|
|
1534
1534
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1535
1535
|
className: "dc-c-list-item ds-u-padding-top--4",
|
|
1536
1536
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1537
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1537
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
|
|
1538
1538
|
children: [
|
|
1539
1539
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1540
1540
|
className: "ds-l-row ds-u-align-items--start",
|
|
1541
1541
|
children: [
|
|
1542
1542
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1543
1543
|
id: `dataset-${identifier}-updated-date`,
|
|
1544
|
-
className: `ds-l-col--12 ds-u-text-align--left ds-text-heading--sm ${paginationEnabled ?
|
|
1544
|
+
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"}`,
|
|
1545
1545
|
children: [
|
|
1546
1546
|
"Updated ",
|
|
1547
1547
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
@@ -1615,7 +1615,7 @@ var $789279954d8eff7f$export$2e2bcd8739ae039 = $789279954d8eff7f$var$ApiDocument
|
|
|
1615
1615
|
|
|
1616
1616
|
|
|
1617
1617
|
|
|
1618
|
-
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className =
|
|
1618
|
+
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className = "data-table-results" })=>{
|
|
1619
1619
|
const numTotalRows = totalRows;
|
|
1620
1620
|
if (numTotalRows === 0) return /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1621
1621
|
className: className,
|
|
@@ -1633,18 +1633,18 @@ const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limi
|
|
|
1633
1633
|
className: className,
|
|
1634
1634
|
children: [
|
|
1635
1635
|
"Displaying",
|
|
1636
|
-
|
|
1636
|
+
" ",
|
|
1637
1637
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1638
1638
|
className: "ds-u-font-weight--bold",
|
|
1639
1639
|
children: `${startTotal().toLocaleString()} - ${ofTotal().toLocaleString()}`
|
|
1640
1640
|
}),
|
|
1641
|
-
|
|
1641
|
+
" ",
|
|
1642
1642
|
"of ",
|
|
1643
1643
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1644
1644
|
className: "ds-u-font-weight--bold",
|
|
1645
1645
|
children: `${numTotalRows.toLocaleString()}`
|
|
1646
1646
|
}),
|
|
1647
|
-
|
|
1647
|
+
" ",
|
|
1648
1648
|
"results"
|
|
1649
1649
|
]
|
|
1650
1650
|
});
|
|
@@ -1670,16 +1670,16 @@ const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePaddi
|
|
|
1670
1670
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
1671
1671
|
options: [
|
|
1672
1672
|
{
|
|
1673
|
-
label:
|
|
1674
|
-
value:
|
|
1673
|
+
label: "Tight",
|
|
1674
|
+
value: "ds-u-padding-y--0"
|
|
1675
1675
|
},
|
|
1676
1676
|
{
|
|
1677
|
-
label:
|
|
1678
|
-
value:
|
|
1677
|
+
label: "Normal",
|
|
1678
|
+
value: "ds-u-padding-y--1"
|
|
1679
1679
|
},
|
|
1680
1680
|
{
|
|
1681
|
-
label:
|
|
1682
|
-
value:
|
|
1681
|
+
label: "Expanded",
|
|
1682
|
+
value: "ds-u-padding-y--2"
|
|
1683
1683
|
}
|
|
1684
1684
|
],
|
|
1685
1685
|
label: "Display density:",
|
|
@@ -1922,7 +1922,7 @@ function $aa4450dcbeef3ac0$export$385a5aba38cc3325(sortArray) {
|
|
|
1922
1922
|
sortArray.forEach((s)=>{
|
|
1923
1923
|
return newQuery.push({
|
|
1924
1924
|
property: s.id,
|
|
1925
|
-
order: s.desc ?
|
|
1925
|
+
order: s.desc ? "desc" : "asc"
|
|
1926
1926
|
});
|
|
1927
1927
|
});
|
|
1928
1928
|
return newQuery;
|
|
@@ -1960,103 +1960,103 @@ function $7264a673914aa746$export$e284ae5d89467c8f(date) {
|
|
|
1960
1960
|
}
|
|
1961
1961
|
function $7264a673914aa746$export$6b5e57d20078142b(value, operator) {
|
|
1962
1962
|
let newValue = value;
|
|
1963
|
-
if (Array.isArray(newValue)) newValue = newValue.join(
|
|
1963
|
+
if (Array.isArray(newValue)) newValue = newValue.join(",");
|
|
1964
1964
|
// return newValue.replace(/(^\%+|\%+$)/gm, '');
|
|
1965
1965
|
return newValue;
|
|
1966
1966
|
}
|
|
1967
1967
|
const $7264a673914aa746$export$5f89a5ae87bc48e1 = [
|
|
1968
1968
|
{
|
|
1969
|
-
label:
|
|
1970
|
-
value:
|
|
1969
|
+
label: "Is",
|
|
1970
|
+
value: "="
|
|
1971
1971
|
},
|
|
1972
1972
|
{
|
|
1973
|
-
label:
|
|
1974
|
-
value:
|
|
1973
|
+
label: "Starts With",
|
|
1974
|
+
value: "starts with"
|
|
1975
1975
|
},
|
|
1976
1976
|
{
|
|
1977
|
-
label:
|
|
1978
|
-
value:
|
|
1977
|
+
label: "Contains",
|
|
1978
|
+
value: "contains"
|
|
1979
1979
|
},
|
|
1980
1980
|
{
|
|
1981
|
-
label:
|
|
1982
|
-
value:
|
|
1981
|
+
label: "Is Not",
|
|
1982
|
+
value: "<>"
|
|
1983
1983
|
},
|
|
1984
1984
|
{
|
|
1985
|
-
label:
|
|
1986
|
-
value:
|
|
1985
|
+
label: "Or",
|
|
1986
|
+
value: "in"
|
|
1987
1987
|
},
|
|
1988
1988
|
{
|
|
1989
|
-
label:
|
|
1990
|
-
value:
|
|
1989
|
+
label: "Is",
|
|
1990
|
+
value: "="
|
|
1991
1991
|
},
|
|
1992
1992
|
{
|
|
1993
|
-
label:
|
|
1994
|
-
value:
|
|
1993
|
+
label: "Is Not",
|
|
1994
|
+
value: "<>"
|
|
1995
1995
|
},
|
|
1996
1996
|
{
|
|
1997
|
-
label:
|
|
1998
|
-
value:
|
|
1997
|
+
label: "Greater Than",
|
|
1998
|
+
value: ">"
|
|
1999
1999
|
},
|
|
2000
2000
|
{
|
|
2001
|
-
label:
|
|
2002
|
-
value:
|
|
2001
|
+
label: "Less Than",
|
|
2002
|
+
value: "<"
|
|
2003
2003
|
}
|
|
2004
2004
|
];
|
|
2005
2005
|
function $7264a673914aa746$export$2b9377795161999(type) {
|
|
2006
2006
|
switch(type){
|
|
2007
|
-
case
|
|
2008
|
-
case
|
|
2007
|
+
case "text":
|
|
2008
|
+
case "string":
|
|
2009
2009
|
return [
|
|
2010
2010
|
{
|
|
2011
|
-
label:
|
|
2012
|
-
value:
|
|
2011
|
+
label: "Is",
|
|
2012
|
+
value: "="
|
|
2013
2013
|
},
|
|
2014
2014
|
{
|
|
2015
|
-
label:
|
|
2016
|
-
value:
|
|
2015
|
+
label: "Starts With",
|
|
2016
|
+
value: "starts with"
|
|
2017
2017
|
},
|
|
2018
2018
|
{
|
|
2019
|
-
label:
|
|
2020
|
-
value:
|
|
2019
|
+
label: "Contains",
|
|
2020
|
+
value: "contains"
|
|
2021
2021
|
},
|
|
2022
2022
|
{
|
|
2023
|
-
label:
|
|
2024
|
-
value:
|
|
2023
|
+
label: "Is Not",
|
|
2024
|
+
value: "<>"
|
|
2025
2025
|
},
|
|
2026
2026
|
{
|
|
2027
|
-
label:
|
|
2028
|
-
value:
|
|
2027
|
+
label: "Or",
|
|
2028
|
+
value: "in"
|
|
2029
2029
|
}
|
|
2030
2030
|
];
|
|
2031
|
-
case
|
|
2031
|
+
case "date":
|
|
2032
2032
|
return [
|
|
2033
2033
|
{
|
|
2034
|
-
label:
|
|
2035
|
-
value:
|
|
2034
|
+
label: "Is",
|
|
2035
|
+
value: "="
|
|
2036
2036
|
},
|
|
2037
2037
|
{
|
|
2038
|
-
label:
|
|
2039
|
-
value:
|
|
2038
|
+
label: "Is Not",
|
|
2039
|
+
value: "<>"
|
|
2040
2040
|
},
|
|
2041
2041
|
{
|
|
2042
|
-
label:
|
|
2043
|
-
value:
|
|
2042
|
+
label: "Greater Than",
|
|
2043
|
+
value: ">"
|
|
2044
2044
|
},
|
|
2045
2045
|
{
|
|
2046
|
-
label:
|
|
2047
|
-
value:
|
|
2046
|
+
label: "Less Than",
|
|
2047
|
+
value: "<"
|
|
2048
2048
|
}
|
|
2049
2049
|
];
|
|
2050
2050
|
default:
|
|
2051
2051
|
// These 2 should be safe for all data types
|
|
2052
2052
|
return [
|
|
2053
2053
|
{
|
|
2054
|
-
label:
|
|
2055
|
-
value:
|
|
2054
|
+
label: "Is",
|
|
2055
|
+
value: "="
|
|
2056
2056
|
},
|
|
2057
2057
|
{
|
|
2058
|
-
label:
|
|
2059
|
-
value:
|
|
2058
|
+
label: "Is Not",
|
|
2059
|
+
value: "<>"
|
|
2060
2060
|
}
|
|
2061
2061
|
];
|
|
2062
2062
|
}
|
|
@@ -2073,7 +2073,7 @@ function $7264a673914aa746$export$2b9377795161999(type) {
|
|
|
2073
2073
|
|
|
2074
2074
|
|
|
2075
2075
|
const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: header, sortElement: sortElement, setAriaLiveFeedback: setAriaLiveFeedback })=>{
|
|
2076
|
-
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)(
|
|
2076
|
+
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)("");
|
|
2077
2077
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("th", {
|
|
2078
2078
|
key: header.id,
|
|
2079
2079
|
style: {
|
|
@@ -2086,13 +2086,13 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2086
2086
|
children: [
|
|
2087
2087
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2088
2088
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2089
|
-
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header :
|
|
2089
|
+
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : "",
|
|
2090
2090
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
2091
2091
|
})
|
|
2092
2092
|
}),
|
|
2093
2093
|
sortElement && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2094
2094
|
onClick: header.column.getToggleSortingHandler(),
|
|
2095
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
2095
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : "",
|
|
2096
2096
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
2097
2097
|
})
|
|
2098
2098
|
]
|
|
@@ -2100,18 +2100,18 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2100
2100
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2101
2101
|
onMouseDown: header.getResizeHandler(),
|
|
2102
2102
|
onTouchStart: header.getResizeHandler(),
|
|
2103
|
-
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ?
|
|
2103
|
+
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ? "isResizing" : ""}`,
|
|
2104
2104
|
"aria-label": `Resize ${header.column.columnDef.header} column`,
|
|
2105
2105
|
onKeyDown: (e)=>{
|
|
2106
2106
|
const columnSizingObject = table.getState().columnSizing;
|
|
2107
2107
|
switch(e.key){
|
|
2108
|
-
case
|
|
2109
|
-
case
|
|
2108
|
+
case "Enter":
|
|
2109
|
+
case " ":
|
|
2110
2110
|
e.preventDefault();
|
|
2111
2111
|
e.stopPropagation();
|
|
2112
2112
|
if (columnResizing) {
|
|
2113
2113
|
// end resizing
|
|
2114
|
-
setColumnResizing(
|
|
2114
|
+
setColumnResizing("");
|
|
2115
2115
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2116
2116
|
} else {
|
|
2117
2117
|
// start resizing
|
|
@@ -2119,13 +2119,13 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2119
2119
|
setAriaLiveFeedback(`${header.column.columnDef.header} grabbed.`);
|
|
2120
2120
|
}
|
|
2121
2121
|
break;
|
|
2122
|
-
case
|
|
2122
|
+
case "Escape":
|
|
2123
2123
|
if (columnResizing) {
|
|
2124
|
-
setColumnResizing(
|
|
2124
|
+
setColumnResizing("");
|
|
2125
2125
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2126
2126
|
}
|
|
2127
2127
|
break;
|
|
2128
|
-
case
|
|
2128
|
+
case "ArrowRight":
|
|
2129
2129
|
e.preventDefault();
|
|
2130
2130
|
e.stopPropagation();
|
|
2131
2131
|
if (columnResizing) {
|
|
@@ -2134,7 +2134,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2134
2134
|
setAriaLiveFeedback(`${header.column.columnDef.header} has been resized. The new width is ${header.getSize()} pixels.`);
|
|
2135
2135
|
}
|
|
2136
2136
|
break;
|
|
2137
|
-
case
|
|
2137
|
+
case "ArrowLeft":
|
|
2138
2138
|
e.preventDefault();
|
|
2139
2139
|
e.stopPropagation();
|
|
2140
2140
|
if (columnResizing) {
|
|
@@ -2146,7 +2146,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2146
2146
|
}
|
|
2147
2147
|
},
|
|
2148
2148
|
onBlur: ()=>{
|
|
2149
|
-
setColumnResizing(
|
|
2149
|
+
setColumnResizing("");
|
|
2150
2150
|
}
|
|
2151
2151
|
})
|
|
2152
2152
|
]
|
|
@@ -2195,7 +2195,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2195
2195
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
2196
2196
|
}),
|
|
2197
2197
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2198
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` :
|
|
2198
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` : ""
|
|
2199
2199
|
})
|
|
2200
2200
|
]
|
|
2201
2201
|
})
|
|
@@ -2231,9 +2231,9 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2231
2231
|
transition: transition,
|
|
2232
2232
|
opacity: isDragging ? 0.7 : 1,
|
|
2233
2233
|
zIndex: isDragging ? 1 : 0,
|
|
2234
|
-
position:
|
|
2235
|
-
background:
|
|
2236
|
-
touchAction:
|
|
2234
|
+
position: "relative",
|
|
2235
|
+
background: "white",
|
|
2236
|
+
touchAction: "none"
|
|
2237
2237
|
};
|
|
2238
2238
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
2239
2239
|
className: "ds-u-display--flex ds-u-justify-content--between ds-u-border-bottom--1",
|
|
@@ -2248,7 +2248,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2248
2248
|
// this code forces the repaint without user interaction
|
|
2249
2249
|
const target = e.target;
|
|
2250
2250
|
if (isDragging && target.tagName.toLowerCase() === "label") setTimeout(()=>{
|
|
2251
|
-
target.parentNode.querySelector(
|
|
2251
|
+
target.parentNode.querySelector("input").checked = visible;
|
|
2252
2252
|
}, 1);
|
|
2253
2253
|
},
|
|
2254
2254
|
children: [
|
|
@@ -2265,7 +2265,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2265
2265
|
}
|
|
2266
2266
|
}),
|
|
2267
2267
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2268
|
-
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging &&
|
|
2268
|
+
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && "grabbed"}`,
|
|
2269
2269
|
"aria-label": `Reorder ${id} column`,
|
|
2270
2270
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2271
2271
|
className: "fa fa-sort"
|
|
@@ -2287,7 +2287,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor extends (0, $hgUW1$Key
|
|
|
2287
2287
|
// Custom function to exclude checkbox from keyboard dragging
|
|
2288
2288
|
static activators = [
|
|
2289
2289
|
{
|
|
2290
|
-
eventName:
|
|
2290
|
+
eventName: "onKeyDown",
|
|
2291
2291
|
handler: ({ nativeEvent: event })=>{
|
|
2292
2292
|
// prevent scrolling the list
|
|
2293
2293
|
const isCheckbox = [
|
|
@@ -2310,7 +2310,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$Poin
|
|
|
2310
2310
|
// Custom function to stop accidental checkbox clicks on pointer activation
|
|
2311
2311
|
static activators = [
|
|
2312
2312
|
{
|
|
2313
|
-
eventName:
|
|
2313
|
+
eventName: "onPointerDown",
|
|
2314
2314
|
handler: ({ nativeEvent: event })=>{
|
|
2315
2315
|
if (event.target.tagName.toLowerCase() === "input") return false;
|
|
2316
2316
|
if (event.target.tagName.toLowerCase() === "label") event.target.blur();
|
|
@@ -2378,7 +2378,7 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
2378
2378
|
}));
|
|
2379
2379
|
};
|
|
2380
2380
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2381
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2381
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
2382
2382
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
|
|
2383
2383
|
heading: "Manage columns",
|
|
2384
2384
|
isOpen: modalOpen,
|
|
@@ -2712,12 +2712,12 @@ const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions, schema: sche
|
|
|
2712
2712
|
className: "ds-u-font-weight--bold",
|
|
2713
2713
|
children: description
|
|
2714
2714
|
}),
|
|
2715
|
-
|
|
2715
|
+
" ",
|
|
2716
2716
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2717
2717
|
className: "ds-u-font-weight--normal",
|
|
2718
2718
|
children: operator.label.toUpperCase()
|
|
2719
2719
|
}),
|
|
2720
|
-
|
|
2720
|
+
" ",
|
|
2721
2721
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2722
2722
|
className: "ds-u-color--success",
|
|
2723
2723
|
children: formattedText
|
|
@@ -2747,7 +2747,7 @@ var $bef7bff2823feea2$export$2e2bcd8739ae039 = $bef7bff2823feea2$var$QueryTitle;
|
|
|
2747
2747
|
|
|
2748
2748
|
|
|
2749
2749
|
function $6369abf590ca298f$var$getStartDate(condition, schema, id) {
|
|
2750
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2750
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
2751
2751
|
const newDate = new Date(condition.value.toString());
|
|
2752
2752
|
if (newDate instanceof Date && !isNaN(newDate.getTime())) return newDate;
|
|
2753
2753
|
}
|
|
@@ -2763,9 +2763,9 @@ const $6369abf590ca298f$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
2763
2763
|
});
|
|
2764
2764
|
(0, $hgUW1$useEffect)(()=>{
|
|
2765
2765
|
if (property !== condition.property) {
|
|
2766
|
-
if (property) update(index,
|
|
2767
|
-
else update(index,
|
|
2768
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2766
|
+
if (property) update(index, "property", property);
|
|
2767
|
+
else update(index, "property", "");
|
|
2768
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
2769
2769
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
2770
2770
|
}
|
|
2771
2771
|
}
|
|
@@ -2779,16 +2779,16 @@ const $6369abf590ca298f$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
2779
2779
|
]);
|
|
2780
2780
|
(0, $hgUW1$useEffect)(()=>{
|
|
2781
2781
|
if (operator !== condition.operator) {
|
|
2782
|
-
if (operator) update(index,
|
|
2783
|
-
else update(index,
|
|
2782
|
+
if (operator) update(index, "operator", operator);
|
|
2783
|
+
else update(index, "operator", "");
|
|
2784
2784
|
}
|
|
2785
2785
|
}, [
|
|
2786
2786
|
operator
|
|
2787
2787
|
]);
|
|
2788
2788
|
(0, $hgUW1$useEffect)(()=>{
|
|
2789
2789
|
if (value !== condition.value) {
|
|
2790
|
-
if (value) update(index,
|
|
2791
|
-
else update(index,
|
|
2790
|
+
if (value) update(index, "value", value);
|
|
2791
|
+
else update(index, "value", "");
|
|
2792
2792
|
}
|
|
2793
2793
|
}, [
|
|
2794
2794
|
value
|
|
@@ -2820,7 +2820,7 @@ const $6369abf590ca298f$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
2820
2820
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2821
2821
|
className: "ds-l-col--12 ds-l-md-col--4 ds-u-padding-x--0 ds-u-md-padding-left--2 ds-u-display--flex ds-u-justify-content--between",
|
|
2822
2822
|
children: [
|
|
2823
|
-
schema[id].fields[property].mysql_type ===
|
|
2823
|
+
schema[id].fields[property].mysql_type === "date" ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2824
2824
|
children: [
|
|
2825
2825
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
2826
2826
|
className: "ds-c-label",
|
|
@@ -2881,9 +2881,9 @@ const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false,
|
|
|
2881
2881
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
2882
2882
|
disabled: disabled,
|
|
2883
2883
|
className: "ds-u-float--right ds-l-md-col--6 ds-l-col--5",
|
|
2884
|
-
variation: small ?
|
|
2884
|
+
variation: small ? "ghost" : undefined,
|
|
2885
2885
|
onClick: ()=>clearFiltersFn(),
|
|
2886
|
-
children: small ?
|
|
2886
|
+
children: small ? "Clear all" : "Clear all filters"
|
|
2887
2887
|
});
|
|
2888
2888
|
};
|
|
2889
2889
|
var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFiltersButton;
|
|
@@ -2892,19 +2892,19 @@ var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFilter
|
|
|
2892
2892
|
function $ee4ad47aa483e5b5$var$updateQueryForDatastore(condition) {
|
|
2893
2893
|
let cond = condition;
|
|
2894
2894
|
delete cond.key;
|
|
2895
|
-
if (cond.operator ===
|
|
2895
|
+
if (cond.operator === "=" || cond.operator === "<>") {
|
|
2896
2896
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
2897
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
2897
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
2898
2898
|
}
|
|
2899
|
-
if (cond.operator.toLowerCase() ===
|
|
2899
|
+
if (cond.operator.toLowerCase() === "like") {
|
|
2900
2900
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
2901
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
2901
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
2902
2902
|
cond.value = `%${cleanedValue}%`;
|
|
2903
2903
|
}
|
|
2904
|
-
if (cond.operator.toLowerCase() ===
|
|
2905
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
2904
|
+
if (cond.operator.toLowerCase() === "in") {
|
|
2905
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(",");
|
|
2906
2906
|
}
|
|
2907
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
2907
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
|
|
2908
2908
|
return cond;
|
|
2909
2909
|
}
|
|
2910
2910
|
const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, isModal: isModal = false, setPage: setPage, setOffset: setOffset })=>{
|
|
@@ -2923,7 +2923,7 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
2923
2923
|
} else setQueryConditions([
|
|
2924
2924
|
{
|
|
2925
2925
|
property: fields[0],
|
|
2926
|
-
value:
|
|
2926
|
+
value: "",
|
|
2927
2927
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
2928
2928
|
key: Date.now().toString()
|
|
2929
2929
|
}
|
|
@@ -2940,7 +2940,7 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
2940
2940
|
...queryConditions,
|
|
2941
2941
|
{
|
|
2942
2942
|
property: fields[0],
|
|
2943
|
-
value:
|
|
2943
|
+
value: "",
|
|
2944
2944
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
2945
2945
|
key: Date.now().toString()
|
|
2946
2946
|
}
|
|
@@ -2971,7 +2971,7 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
2971
2971
|
encodeValuesOnly: true,
|
|
2972
2972
|
addQueryPrefix: true
|
|
2973
2973
|
});
|
|
2974
|
-
window.history.pushState({},
|
|
2974
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
2975
2975
|
};
|
|
2976
2976
|
const submitConditions = (e)=>{
|
|
2977
2977
|
// only update the data conditions when "Apply filters" is pressed
|
|
@@ -3124,12 +3124,12 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, closeFul
|
|
|
3124
3124
|
showStoredQueryDownloadButton: showStoredQueryDownloadButton
|
|
3125
3125
|
}),
|
|
3126
3126
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3127
|
-
className: `ds-u-border-x--1 ds-u-border-bottom--1 ${isModal &&
|
|
3127
|
+
className: `ds-u-border-x--1 ds-u-border-bottom--1 ${isModal && "dkan-datatable-fullscreen-mode"}`,
|
|
3128
3128
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
|
|
3129
3129
|
canResize: true,
|
|
3130
3130
|
columns: columns,
|
|
3131
3131
|
sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
|
|
3132
|
-
tablePadding:
|
|
3132
|
+
tablePadding: "ds-u-padding-y--2",
|
|
3133
3133
|
loading: resource.loading,
|
|
3134
3134
|
isModal: isModal,
|
|
3135
3135
|
closeFullScreenModal: closeFullScreenModal
|
|
@@ -3162,7 +3162,7 @@ var $a35cf16d1488f54e$export$2e2bcd8739ae039 = $a35cf16d1488f54e$var$DatasetTabl
|
|
|
3162
3162
|
|
|
3163
3163
|
const $16bd41951b91f02d$var$FullScreenDataTable = ({ modalOpen: modalOpen, setModalOpen: setModalOpen })=>{
|
|
3164
3164
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3165
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
3165
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
3166
3166
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
3167
3167
|
heading: "Dataset Explorer",
|
|
3168
3168
|
isOpen: modalOpen,
|
|
@@ -3212,7 +3212,7 @@ const $71b4324f265dec16$var$DataTableControls = ({ id: id, columns: columns, def
|
|
|
3212
3212
|
]
|
|
3213
3213
|
}),
|
|
3214
3214
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
|
|
3215
|
-
"aria-label": isModal ?
|
|
3215
|
+
"aria-label": isModal ? "Close Full Screen dialog" : "Full Screen mode - Opens in a dialog",
|
|
3216
3216
|
className: "ds-c-button ds-c-button--ghost ds-u-margin-y--1",
|
|
3217
3217
|
onClick: ()=>{
|
|
3218
3218
|
if (isModal) closeFullScreenModal();
|
|
@@ -3220,7 +3220,7 @@ const $71b4324f265dec16$var$DataTableControls = ({ id: id, columns: columns, def
|
|
|
3220
3220
|
},
|
|
3221
3221
|
children: [
|
|
3222
3222
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3223
|
-
className: `fa ${isModal ?
|
|
3223
|
+
className: `fa ${isModal ? "fa-compress" : "fa-expand"} ds-u-margin-right--1`
|
|
3224
3224
|
}),
|
|
3225
3225
|
isModal ? "Exit Full Screen" : "Full Screen"
|
|
3226
3226
|
]
|
|
@@ -3257,7 +3257,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3257
3257
|
const { columnOrder: columnOrder, setColumnOrder: setColumnOrder, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility } = (0, $hgUW1$useContext)((0, $ebda441784d176a5$export$2e2bcd8739ae039));
|
|
3258
3258
|
const data = resource.values;
|
|
3259
3259
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
3260
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
3260
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)("");
|
|
3261
3261
|
const dataTableWrapperElement = (0, $hgUW1$useRef)(null);
|
|
3262
3262
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
3263
3263
|
const table_columns = columns.map((col)=>{
|
|
@@ -3276,9 +3276,9 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3276
3276
|
columnOrder
|
|
3277
3277
|
]);
|
|
3278
3278
|
const sortElement = (isSorted, onClickFn)=>{
|
|
3279
|
-
if (isSorted ===
|
|
3280
|
-
if (isSorted ===
|
|
3281
|
-
return
|
|
3279
|
+
if (isSorted === "asc") return "dc-c-sort--asc";
|
|
3280
|
+
if (isSorted === "desc") return "dc-c-sort--desc";
|
|
3281
|
+
return "dc-c-sort--default";
|
|
3282
3282
|
};
|
|
3283
3283
|
const filters = [];
|
|
3284
3284
|
const table = (0, $hgUW1$useReactTable)({
|
|
@@ -3290,7 +3290,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3290
3290
|
columnVisibility: columnVisibility,
|
|
3291
3291
|
sorting: sorting
|
|
3292
3292
|
},
|
|
3293
|
-
columnResizeMode:
|
|
3293
|
+
columnResizeMode: "onChange",
|
|
3294
3294
|
onSortingChange: setSorting,
|
|
3295
3295
|
onColumnOrderChange: setColumnOrder,
|
|
3296
3296
|
onColumnVisibilityChange: setColumnVisibility,
|
|
@@ -3307,7 +3307,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3307
3307
|
const defaultColumnOrder = (0, $hgUW1$useMemo)(()=>table_columns.map((column)=>column.accessorKey), []);
|
|
3308
3308
|
const tableWrapperWidth = ()=>{
|
|
3309
3309
|
if (dataTableWrapperElement.current) return dataTableWrapperElement.current.offsetWidth;
|
|
3310
|
-
return
|
|
3310
|
+
return "auto";
|
|
3311
3311
|
};
|
|
3312
3312
|
(0, $hgUW1$useEffect)(()=>{
|
|
3313
3313
|
setHighlightRow(null);
|
|
@@ -3409,7 +3409,7 @@ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, a
|
|
|
3409
3409
|
},
|
|
3410
3410
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3411
3411
|
name: accessor,
|
|
3412
|
-
value: filterValue ||
|
|
3412
|
+
value: filterValue || ""
|
|
3413
3413
|
});
|
|
3414
3414
|
}
|
|
3415
3415
|
const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true })=>{
|
|
@@ -3485,7 +3485,7 @@ const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage, pageTrail:
|
|
|
3485
3485
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3486
3486
|
children: currentPage
|
|
3487
3487
|
})
|
|
3488
|
-
}) :
|
|
3488
|
+
}) : ""
|
|
3489
3489
|
]
|
|
3490
3490
|
})
|
|
3491
3491
|
});
|
|
@@ -3542,11 +3542,11 @@ var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRigh
|
|
|
3542
3542
|
|
|
3543
3543
|
|
|
3544
3544
|
|
|
3545
|
-
const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder =
|
|
3545
|
+
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", {
|
|
3546
3546
|
className: "search-input-container",
|
|
3547
3547
|
children: [
|
|
3548
3548
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
3549
|
-
className: `${showMagnifyingGlass ?
|
|
3549
|
+
className: `${showMagnifyingGlass ? "left-padding" : ""} ${showSearchButton ? "right-padding" : ""}`,
|
|
3550
3550
|
label: placeholder,
|
|
3551
3551
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3552
3552
|
placeholder: placeholder,
|
|
@@ -3561,7 +3561,7 @@ const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = 'Search
|
|
|
3561
3561
|
}),
|
|
3562
3562
|
showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
3563
3563
|
variation: "solid",
|
|
3564
|
-
className: onDark &&
|
|
3564
|
+
className: onDark && "on-dark",
|
|
3565
3565
|
onClick: onSubmit,
|
|
3566
3566
|
children: [
|
|
3567
3567
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -3680,7 +3680,7 @@ const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: roo
|
|
|
3680
3680
|
url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
3681
3681
|
addQueryPrefix: true
|
|
3682
3682
|
})}`,
|
|
3683
|
-
docExpansion:
|
|
3683
|
+
docExpansion: "list",
|
|
3684
3684
|
defaultModelsExpandDepth: -1,
|
|
3685
3685
|
plugins: [
|
|
3686
3686
|
(0, $hgUW1$SpanOpenAPIVersion),
|
|
@@ -3828,7 +3828,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
3828
3828
|
size: "big",
|
|
3829
3829
|
type: "submit",
|
|
3830
3830
|
style: {
|
|
3831
|
-
width:
|
|
3831
|
+
width: "70px"
|
|
3832
3832
|
},
|
|
3833
3833
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3834
3834
|
className: "fas fa-search small-text"
|
|
@@ -3845,7 +3845,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
3845
3845
|
className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
|
|
3846
3846
|
children: [
|
|
3847
3847
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3848
|
-
children: text ? text :
|
|
3848
|
+
children: text ? text : "Search"
|
|
3849
3849
|
}),
|
|
3850
3850
|
` `,
|
|
3851
3851
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -3891,26 +3891,26 @@ var $5723016a5461c1ca$export$2e2bcd8739ae039 = $5723016a5461c1ca$var$PageHeader;
|
|
|
3891
3891
|
|
|
3892
3892
|
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
3893
3893
|
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
3894
|
-
defaultSort:
|
|
3895
|
-
defaultOrder:
|
|
3896
|
-
}, pageTitle: pageTitle =
|
|
3894
|
+
defaultSort: "modified",
|
|
3895
|
+
defaultOrder: "desc"
|
|
3896
|
+
}, pageTitle: pageTitle = "Dataset Explorer", filterTitle: filterTitle = "Tags", showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = "", showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
3897
3897
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
3898
3898
|
const sortOptions = [
|
|
3899
3899
|
{
|
|
3900
|
-
label:
|
|
3901
|
-
value:
|
|
3900
|
+
label: "Newest",
|
|
3901
|
+
value: "newest"
|
|
3902
3902
|
},
|
|
3903
3903
|
{
|
|
3904
|
-
label:
|
|
3905
|
-
value:
|
|
3904
|
+
label: "Oldest",
|
|
3905
|
+
value: "oldest"
|
|
3906
3906
|
},
|
|
3907
3907
|
{
|
|
3908
|
-
label:
|
|
3909
|
-
value:
|
|
3908
|
+
label: "Title A-Z",
|
|
3909
|
+
value: "titleAZ"
|
|
3910
3910
|
},
|
|
3911
3911
|
{
|
|
3912
|
-
label:
|
|
3913
|
-
value:
|
|
3912
|
+
label: "Title Z-A",
|
|
3913
|
+
value: "titleZA"
|
|
3914
3914
|
}
|
|
3915
3915
|
];
|
|
3916
3916
|
const defaultSortBy = "";
|
|
@@ -3929,7 +3929,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3929
3929
|
endingNumber: 0
|
|
3930
3930
|
});
|
|
3931
3931
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
3932
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
3932
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
|
|
3933
3933
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
3934
3934
|
const [fulltext, setFullText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
3935
3935
|
const [filterText, setFilterText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
@@ -3938,7 +3938,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3938
3938
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
3939
3939
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
3940
3940
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
3941
|
-
return sort ===
|
|
3941
|
+
return sort === "modified" ? sortOrder === "desc" ? "newest" : "oldest" : sortOrder === "desc" ? "titleZA" : "titleAZ";
|
|
3942
3942
|
});
|
|
3943
3943
|
const [selectedFacets, setSelectedFacets] = (0, $hgUW1$useState)(transformedParams.selectedFacets ? transformedParams.selectedFacets : {
|
|
3944
3944
|
theme: [],
|
|
@@ -3947,21 +3947,21 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3947
3947
|
const setSortOptions = (value)=>{
|
|
3948
3948
|
setSortDisplay(value);
|
|
3949
3949
|
switch(value){
|
|
3950
|
-
case
|
|
3951
|
-
setSort(
|
|
3952
|
-
setSortOrder(
|
|
3950
|
+
case "newest":
|
|
3951
|
+
setSort("modified");
|
|
3952
|
+
setSortOrder("desc");
|
|
3953
3953
|
break;
|
|
3954
|
-
case
|
|
3955
|
-
setSort(
|
|
3956
|
-
setSortOrder(
|
|
3954
|
+
case "oldest":
|
|
3955
|
+
setSort("modified");
|
|
3956
|
+
setSortOrder("asc");
|
|
3957
3957
|
break;
|
|
3958
|
-
case
|
|
3959
|
-
setSort(
|
|
3960
|
-
setSortOrder(
|
|
3958
|
+
case "titleAZ":
|
|
3959
|
+
setSort("title");
|
|
3960
|
+
setSortOrder("asc");
|
|
3961
3961
|
break;
|
|
3962
|
-
case
|
|
3963
|
-
setSort(
|
|
3964
|
-
setSortOrder(
|
|
3962
|
+
case "titleZA":
|
|
3963
|
+
setSort("title");
|
|
3964
|
+
setSortOrder("desc");
|
|
3965
3965
|
break;
|
|
3966
3966
|
}
|
|
3967
3967
|
};
|
|
@@ -3969,12 +3969,12 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3969
3969
|
const newFacets = {
|
|
3970
3970
|
...selectedFacets
|
|
3971
3971
|
};
|
|
3972
|
-
if (key ===
|
|
3972
|
+
if (key === "theme") {
|
|
3973
3973
|
const existingFacet = newFacets.theme.findIndex((s)=>s === value);
|
|
3974
3974
|
if (existingFacet > -1) newFacets.theme.splice(existingFacet, 1);
|
|
3975
3975
|
else newFacets.theme.push(value);
|
|
3976
3976
|
}
|
|
3977
|
-
if (key ===
|
|
3977
|
+
if (key === "keyword") {
|
|
3978
3978
|
const existingFacet = newFacets.keyword.findIndex((s)=>s === value);
|
|
3979
3979
|
if (existingFacet > -1) newFacets.keyword.splice(existingFacet, 1);
|
|
3980
3980
|
else newFacets.keyword.push(value);
|
|
@@ -3988,14 +3988,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3988
3988
|
});
|
|
3989
3989
|
setSelectedFacets(newFacets);
|
|
3990
3990
|
const url = new URL(window.location.href);
|
|
3991
|
-
window.history.pushState({},
|
|
3991
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
3992
3992
|
}
|
|
3993
3993
|
const pageSize = defaultPageSize;
|
|
3994
3994
|
(0, $hgUW1$useEffect)(()=>{
|
|
3995
3995
|
// Update browser URL with current search params
|
|
3996
3996
|
const params = buildSearchParams(true);
|
|
3997
3997
|
const url = new URL(window.location.href);
|
|
3998
|
-
window.history.pushState({},
|
|
3998
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${params}`);
|
|
3999
3999
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4000
4000
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4001
4001
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -4034,14 +4034,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4034
4034
|
setSelectedFacets(defaultSelectedFacets);
|
|
4035
4035
|
setPage(defaultPage);
|
|
4036
4036
|
const url = new URL(window.location.href);
|
|
4037
|
-
window.history.pushState({},
|
|
4037
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}`);
|
|
4038
4038
|
}
|
|
4039
4039
|
function buildSearchParams(includePage) {
|
|
4040
4040
|
let newParams = {};
|
|
4041
4041
|
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
4042
4042
|
if (sort !== defaultSort.defaultSort) newParams.sort = sort;
|
|
4043
4043
|
if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
|
|
4044
|
-
if (fulltext !==
|
|
4044
|
+
if (fulltext !== "") newParams.fulltext = fulltext;
|
|
4045
4045
|
if (Object.keys(selectedFacets).length) Object.keys(selectedFacets).forEach((key)=>{
|
|
4046
4046
|
newParams[key] = selectedFacets[key];
|
|
4047
4047
|
});
|
|
@@ -4054,9 +4054,9 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4054
4054
|
fulltext: fulltext ? fulltext : undefined,
|
|
4055
4055
|
...selectedFacets,
|
|
4056
4056
|
sort: sort ? sort : undefined,
|
|
4057
|
-
[
|
|
4057
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4058
4058
|
page: page !== 1 ? page : undefined,
|
|
4059
|
-
[
|
|
4059
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4060
4060
|
};
|
|
4061
4061
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4062
4062
|
queryKey: [
|
|
@@ -4065,7 +4065,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4065
4065
|
],
|
|
4066
4066
|
queryFn: ()=>{
|
|
4067
4067
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4068
|
-
arrayFormat:
|
|
4068
|
+
arrayFormat: "comma",
|
|
4069
4069
|
encode: false
|
|
4070
4070
|
})}`);
|
|
4071
4071
|
}
|
|
@@ -4116,7 +4116,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4116
4116
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4117
4117
|
fieldClassName: "ds-u-margin--0",
|
|
4118
4118
|
value: filterText,
|
|
4119
|
-
className: `ds-u-padding-right--2 ${altMobileSearchButton ?
|
|
4119
|
+
className: `ds-u-padding-right--2 ${altMobileSearchButton ? "ds-l-col--12 ds-l-md-col--10 --alt-style" : "ds-l-col--10"}`,
|
|
4120
4120
|
label: "Search datasets",
|
|
4121
4121
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4122
4122
|
placeholder: "Search datasets",
|
|
@@ -4178,7 +4178,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4178
4178
|
"Showing ",
|
|
4179
4179
|
currentResultNumbers.startingNumber,
|
|
4180
4180
|
" -",
|
|
4181
|
-
|
|
4181
|
+
" ",
|
|
4182
4182
|
currentResultNumbers.endingNumber,
|
|
4183
4183
|
" of ",
|
|
4184
4184
|
data.data.total,
|
|
@@ -4254,7 +4254,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4254
4254
|
},
|
|
4255
4255
|
renderHref: (page)=>{
|
|
4256
4256
|
const searchParams = buildSearchParams(false);
|
|
4257
|
-
const includeAnd = searchParams ?
|
|
4257
|
+
const includeAnd = searchParams ? "&" : "";
|
|
4258
4258
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
4259
4259
|
}
|
|
4260
4260
|
})
|
|
@@ -4289,26 +4289,26 @@ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
4289
4289
|
|
|
4290
4290
|
const $550bcc185f420ff5$var$DatasetList = (props)=>{
|
|
4291
4291
|
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4292
|
-
defaultSort:
|
|
4293
|
-
defaultOrder:
|
|
4294
|
-
}, pageTitle: pageTitle =
|
|
4292
|
+
defaultSort: "modified",
|
|
4293
|
+
defaultOrder: "desc"
|
|
4294
|
+
}, pageTitle: pageTitle = "What's New ", showLargeFileWarning: showLargeFileWarning = false, introText: introText = "", dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
4295
4295
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4296
4296
|
const sortOptions = [
|
|
4297
4297
|
{
|
|
4298
|
-
label:
|
|
4299
|
-
value:
|
|
4298
|
+
label: "Newest",
|
|
4299
|
+
value: "newest"
|
|
4300
4300
|
},
|
|
4301
4301
|
{
|
|
4302
|
-
label:
|
|
4303
|
-
value:
|
|
4302
|
+
label: "Oldest",
|
|
4303
|
+
value: "oldest"
|
|
4304
4304
|
},
|
|
4305
4305
|
{
|
|
4306
|
-
label:
|
|
4307
|
-
value:
|
|
4306
|
+
label: "Title A-Z",
|
|
4307
|
+
value: "titleAZ"
|
|
4308
4308
|
},
|
|
4309
4309
|
{
|
|
4310
|
-
label:
|
|
4311
|
-
value:
|
|
4310
|
+
label: "Title Z-A",
|
|
4311
|
+
value: "titleZA"
|
|
4312
4312
|
}
|
|
4313
4313
|
];
|
|
4314
4314
|
const defaultSortBy = "";
|
|
@@ -4322,33 +4322,33 @@ const $550bcc185f420ff5$var$DatasetList = (props)=>{
|
|
|
4322
4322
|
endingNumber: 0
|
|
4323
4323
|
});
|
|
4324
4324
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4325
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4325
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
|
|
4326
4326
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4327
4327
|
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
4328
4328
|
const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
|
|
4329
4329
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4330
4330
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4331
4331
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4332
|
-
return sort ===
|
|
4332
|
+
return sort === "modified" ? sortOrder === "desc" ? "newest" : "oldest" : sortOrder === "desc" ? "titleZA" : "titleAZ";
|
|
4333
4333
|
});
|
|
4334
4334
|
const setSortOptions = (value)=>{
|
|
4335
4335
|
setSortDisplay(value);
|
|
4336
4336
|
switch(value){
|
|
4337
|
-
case
|
|
4338
|
-
setSort(
|
|
4339
|
-
setSortOrder(
|
|
4337
|
+
case "newest":
|
|
4338
|
+
setSort("modified");
|
|
4339
|
+
setSortOrder("desc");
|
|
4340
4340
|
break;
|
|
4341
|
-
case
|
|
4342
|
-
setSort(
|
|
4343
|
-
setSortOrder(
|
|
4341
|
+
case "oldest":
|
|
4342
|
+
setSort("modified");
|
|
4343
|
+
setSortOrder("asc");
|
|
4344
4344
|
break;
|
|
4345
|
-
case
|
|
4346
|
-
setSort(
|
|
4347
|
-
setSortOrder(
|
|
4345
|
+
case "titleAZ":
|
|
4346
|
+
setSort("title");
|
|
4347
|
+
setSortOrder("asc");
|
|
4348
4348
|
break;
|
|
4349
|
-
case
|
|
4350
|
-
setSort(
|
|
4351
|
-
setSortOrder(
|
|
4349
|
+
case "titleZA":
|
|
4350
|
+
setSort("title");
|
|
4351
|
+
setSortOrder("desc");
|
|
4352
4352
|
break;
|
|
4353
4353
|
}
|
|
4354
4354
|
};
|
|
@@ -4357,7 +4357,7 @@ const $550bcc185f420ff5$var$DatasetList = (props)=>{
|
|
|
4357
4357
|
// Update browser URL with current search params
|
|
4358
4358
|
const params = buildSearchParams(true);
|
|
4359
4359
|
const url = new URL(window.location.href);
|
|
4360
|
-
window.history.pushState({},
|
|
4360
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${params}`);
|
|
4361
4361
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4362
4362
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4363
4363
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -4396,9 +4396,9 @@ const $550bcc185f420ff5$var$DatasetList = (props)=>{
|
|
|
4396
4396
|
}
|
|
4397
4397
|
let params = {
|
|
4398
4398
|
sort: sort ? sort : undefined,
|
|
4399
|
-
[
|
|
4399
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4400
4400
|
page: page !== 1 ? page : undefined,
|
|
4401
|
-
[
|
|
4401
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4402
4402
|
};
|
|
4403
4403
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4404
4404
|
queryKey: [
|
|
@@ -4407,7 +4407,7 @@ const $550bcc185f420ff5$var$DatasetList = (props)=>{
|
|
|
4407
4407
|
],
|
|
4408
4408
|
queryFn: ()=>{
|
|
4409
4409
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4410
|
-
arrayFormat:
|
|
4410
|
+
arrayFormat: "comma",
|
|
4411
4411
|
encode: false
|
|
4412
4412
|
})}`);
|
|
4413
4413
|
}
|
|
@@ -4468,7 +4468,7 @@ const $550bcc185f420ff5$var$DatasetList = (props)=>{
|
|
|
4468
4468
|
"Showing ",
|
|
4469
4469
|
currentResultNumbers.startingNumber,
|
|
4470
4470
|
" -",
|
|
4471
|
-
|
|
4471
|
+
" ",
|
|
4472
4472
|
currentResultNumbers.endingNumber,
|
|
4473
4473
|
" of ",
|
|
4474
4474
|
data.data.total,
|
|
@@ -4513,7 +4513,6 @@ const $550bcc185f420ff5$var$DatasetList = (props)=>{
|
|
|
4513
4513
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $c068004d499082cc$export$2e2bcd8739ae039), {
|
|
4514
4514
|
title: item.title,
|
|
4515
4515
|
modified: item.modified,
|
|
4516
|
-
description: item.description,
|
|
4517
4516
|
identifier: item.identifier,
|
|
4518
4517
|
paginationEnabled: enablePagination,
|
|
4519
4518
|
dataDictionaryLinks: dataDictionaryLinks
|
|
@@ -4534,7 +4533,7 @@ const $550bcc185f420ff5$var$DatasetList = (props)=>{
|
|
|
4534
4533
|
},
|
|
4535
4534
|
renderHref: (page)=>{
|
|
4536
4535
|
const searchParams = buildSearchParams(false);
|
|
4537
|
-
const includeAnd = searchParams ?
|
|
4536
|
+
const includeAnd = searchParams ? "&" : "";
|
|
4538
4537
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
4539
4538
|
}
|
|
4540
4539
|
})
|
|
@@ -4567,12 +4566,12 @@ var $550bcc185f420ff5$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
4567
4566
|
|
|
4568
4567
|
const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
4569
4568
|
const [dataset, setDataset] = (0, $hgUW1$useState)({
|
|
4570
|
-
title:
|
|
4569
|
+
title: "",
|
|
4571
4570
|
distribution: [],
|
|
4572
|
-
error:
|
|
4573
|
-
description:
|
|
4574
|
-
identifier:
|
|
4575
|
-
modified:
|
|
4571
|
+
error: "",
|
|
4572
|
+
description: "",
|
|
4573
|
+
identifier: "",
|
|
4574
|
+
modified: ""
|
|
4576
4575
|
});
|
|
4577
4576
|
const [id, setId] = (0, $hgUW1$useState)(datasetId);
|
|
4578
4577
|
const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
|
|
@@ -4582,7 +4581,7 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
|
4582
4581
|
"metastore" + id
|
|
4583
4582
|
],
|
|
4584
4583
|
queryFn: ()=>{
|
|
4585
|
-
return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ?
|
|
4584
|
+
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)=>{
|
|
4586
4585
|
return {
|
|
4587
4586
|
title: dataset.title,
|
|
4588
4587
|
distribution: dataset.distribution,
|
|
@@ -4648,7 +4647,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
4648
4647
|
...additionalParams
|
|
4649
4648
|
};
|
|
4650
4649
|
params = (0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA);
|
|
4651
|
-
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` :
|
|
4650
|
+
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : "";
|
|
4652
4651
|
let enabled = false;
|
|
4653
4652
|
if (id) {
|
|
4654
4653
|
if (!requireConditions) enabled = true;
|
|
@@ -4728,65 +4727,65 @@ var $1d3d480a9cfaabe0$export$2e2bcd8739ae039 = $1d3d480a9cfaabe0$var$useDatastor
|
|
|
4728
4727
|
|
|
4729
4728
|
|
|
4730
4729
|
const $28f16f59778efa64$export$82b1b1d517e5388a = {
|
|
4731
|
-
|
|
4732
|
-
name:
|
|
4730
|
+
"R/P10Y": {
|
|
4731
|
+
name: "Decennial"
|
|
4733
4732
|
},
|
|
4734
|
-
|
|
4735
|
-
name:
|
|
4733
|
+
"R/P4Y": {
|
|
4734
|
+
name: "Quadrennial"
|
|
4736
4735
|
},
|
|
4737
|
-
|
|
4738
|
-
name:
|
|
4736
|
+
"R/P1Y": {
|
|
4737
|
+
name: "Annual"
|
|
4739
4738
|
},
|
|
4740
|
-
|
|
4741
|
-
name:
|
|
4739
|
+
"R/P2M": {
|
|
4740
|
+
name: "Bimonthly"
|
|
4742
4741
|
},
|
|
4743
|
-
|
|
4744
|
-
name:
|
|
4742
|
+
"R/P3.5D": {
|
|
4743
|
+
name: "Semiweekly"
|
|
4745
4744
|
},
|
|
4746
|
-
|
|
4747
|
-
name:
|
|
4745
|
+
"R/P1D": {
|
|
4746
|
+
name: "Daily"
|
|
4748
4747
|
},
|
|
4749
|
-
|
|
4750
|
-
name:
|
|
4748
|
+
"R/P2W": {
|
|
4749
|
+
name: "Biweekly"
|
|
4751
4750
|
},
|
|
4752
|
-
|
|
4753
|
-
name:
|
|
4751
|
+
"R/P6M": {
|
|
4752
|
+
name: "Semiannual"
|
|
4754
4753
|
},
|
|
4755
|
-
|
|
4756
|
-
name:
|
|
4754
|
+
"R/P2Y": {
|
|
4755
|
+
name: "Biennial"
|
|
4757
4756
|
},
|
|
4758
|
-
|
|
4759
|
-
name:
|
|
4757
|
+
"R/P3Y": {
|
|
4758
|
+
name: "Triennial"
|
|
4760
4759
|
},
|
|
4761
|
-
|
|
4762
|
-
name:
|
|
4760
|
+
"R/P0.33W": {
|
|
4761
|
+
name: "Three times a week"
|
|
4763
4762
|
},
|
|
4764
|
-
|
|
4765
|
-
name:
|
|
4763
|
+
"R/P0.33M": {
|
|
4764
|
+
name: "Three times a month"
|
|
4766
4765
|
},
|
|
4767
|
-
|
|
4768
|
-
name:
|
|
4766
|
+
"R/PT1S": {
|
|
4767
|
+
name: "Continuously updated"
|
|
4769
4768
|
},
|
|
4770
|
-
|
|
4771
|
-
name:
|
|
4769
|
+
"R/P1M": {
|
|
4770
|
+
name: "Monthly"
|
|
4772
4771
|
},
|
|
4773
|
-
|
|
4774
|
-
name:
|
|
4772
|
+
"R/P3M": {
|
|
4773
|
+
name: "Quarterly"
|
|
4775
4774
|
},
|
|
4776
|
-
|
|
4777
|
-
name:
|
|
4775
|
+
"R/P0.5M": {
|
|
4776
|
+
name: "Semimonthly"
|
|
4778
4777
|
},
|
|
4779
|
-
|
|
4780
|
-
name:
|
|
4778
|
+
"R/P4M": {
|
|
4779
|
+
name: "Three times a year"
|
|
4781
4780
|
},
|
|
4782
|
-
|
|
4783
|
-
name:
|
|
4781
|
+
"R/P1W": {
|
|
4782
|
+
name: "Weekly"
|
|
4784
4783
|
},
|
|
4785
|
-
|
|
4786
|
-
name:
|
|
4784
|
+
"R/PT1H": {
|
|
4785
|
+
name: "Hourly"
|
|
4787
4786
|
},
|
|
4788
4787
|
irregular: {
|
|
4789
|
-
name:
|
|
4788
|
+
name: "Irregular"
|
|
4790
4789
|
}
|
|
4791
4790
|
};
|
|
4792
4791
|
|
|
@@ -4795,7 +4794,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4795
4794
|
modified: (data)=>{
|
|
4796
4795
|
return [
|
|
4797
4796
|
{
|
|
4798
|
-
label:
|
|
4797
|
+
label: "Modified",
|
|
4799
4798
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
4800
4799
|
date: data
|
|
4801
4800
|
})
|
|
@@ -4805,7 +4804,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4805
4804
|
issued: (data)=>{
|
|
4806
4805
|
return [
|
|
4807
4806
|
{
|
|
4808
|
-
label:
|
|
4807
|
+
label: "Issued",
|
|
4809
4808
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
4810
4809
|
date: data
|
|
4811
4810
|
})
|
|
@@ -4815,7 +4814,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4815
4814
|
accrualPeriodicity: (data)=>{
|
|
4816
4815
|
return [
|
|
4817
4816
|
{
|
|
4818
|
-
label:
|
|
4817
|
+
label: "Frequency",
|
|
4819
4818
|
value: (0, $28f16f59778efa64$export$82b1b1d517e5388a)[data].name
|
|
4820
4819
|
}
|
|
4821
4820
|
];
|
|
@@ -4823,7 +4822,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4823
4822
|
publisher: (data)=>{
|
|
4824
4823
|
if (data.data && data.data.name) return [
|
|
4825
4824
|
{
|
|
4826
|
-
label:
|
|
4825
|
+
label: "Publisher",
|
|
4827
4826
|
value: data.data.name
|
|
4828
4827
|
}
|
|
4829
4828
|
];
|
|
@@ -4832,7 +4831,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4832
4831
|
identifier: (data)=>{
|
|
4833
4832
|
return [
|
|
4834
4833
|
{
|
|
4835
|
-
label:
|
|
4834
|
+
label: "Identifier",
|
|
4836
4835
|
value: data
|
|
4837
4836
|
}
|
|
4838
4837
|
];
|
|
@@ -4840,11 +4839,11 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4840
4839
|
contactPoint: (data)=>{
|
|
4841
4840
|
let rows = [];
|
|
4842
4841
|
if (data.fn) rows.push({
|
|
4843
|
-
label:
|
|
4842
|
+
label: "Contact",
|
|
4844
4843
|
value: data.fn
|
|
4845
4844
|
});
|
|
4846
4845
|
if (data.hasEmail) rows.push({
|
|
4847
|
-
label:
|
|
4846
|
+
label: "Contact Email",
|
|
4848
4847
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
4849
4848
|
href: data.hasEmail.includes("mailto:") ? data.hasEmail : `mailto:${data.hasEmail}`,
|
|
4850
4849
|
children: data.hasEmail.replace("mailto:", "")
|
|
@@ -4855,7 +4854,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4855
4854
|
bureauCode: (data)=>{
|
|
4856
4855
|
if (data.length) return [
|
|
4857
4856
|
{
|
|
4858
|
-
label:
|
|
4857
|
+
label: "Bureau Code",
|
|
4859
4858
|
value: data[0]
|
|
4860
4859
|
}
|
|
4861
4860
|
];
|
|
@@ -4863,7 +4862,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4863
4862
|
programCode: (data)=>{
|
|
4864
4863
|
if (data.length) return [
|
|
4865
4864
|
{
|
|
4866
|
-
label:
|
|
4865
|
+
label: "Program Code",
|
|
4867
4866
|
value: data[0]
|
|
4868
4867
|
}
|
|
4869
4868
|
];
|
|
@@ -4871,13 +4870,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4871
4870
|
theme: (data)=>{
|
|
4872
4871
|
return [
|
|
4873
4872
|
{
|
|
4874
|
-
label:
|
|
4873
|
+
label: "Category",
|
|
4875
4874
|
value: data.map((theme)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
4876
4875
|
to: `/datasets?theme[]=${theme.data}`,
|
|
4877
4876
|
children: theme.data
|
|
4878
4877
|
}, theme.data)).reduce((prev, curr)=>[
|
|
4879
4878
|
prev,
|
|
4880
|
-
|
|
4879
|
+
", ",
|
|
4881
4880
|
curr
|
|
4882
4881
|
])
|
|
4883
4882
|
}
|
|
@@ -4886,13 +4885,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4886
4885
|
keyword: (data)=>{
|
|
4887
4886
|
return [
|
|
4888
4887
|
{
|
|
4889
|
-
label:
|
|
4888
|
+
label: "Tags",
|
|
4890
4889
|
value: data.map((keyword)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
4891
4890
|
to: `/datasets?keyword[]=${keyword.data}`,
|
|
4892
4891
|
children: keyword.data
|
|
4893
4892
|
}, keyword.data)).reduce((prev, curr)=>[
|
|
4894
4893
|
prev,
|
|
4895
|
-
|
|
4894
|
+
", ",
|
|
4896
4895
|
curr
|
|
4897
4896
|
])
|
|
4898
4897
|
}
|
|
@@ -4901,7 +4900,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4901
4900
|
license: (data)=>{
|
|
4902
4901
|
return [
|
|
4903
4902
|
{
|
|
4904
|
-
label:
|
|
4903
|
+
label: "License",
|
|
4905
4904
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
4906
4905
|
href: data,
|
|
4907
4906
|
children: data
|
|
@@ -4912,7 +4911,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4912
4911
|
accessLevel: (data)=>{
|
|
4913
4912
|
return [
|
|
4914
4913
|
{
|
|
4915
|
-
label:
|
|
4914
|
+
label: "Public Access Level",
|
|
4916
4915
|
value: data
|
|
4917
4916
|
}
|
|
4918
4917
|
];
|
|
@@ -4920,7 +4919,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4920
4919
|
temporal: (data)=>{
|
|
4921
4920
|
return [
|
|
4922
4921
|
{
|
|
4923
|
-
label:
|
|
4922
|
+
label: "Temporal Coverage",
|
|
4924
4923
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4925
4924
|
className: "dc-c-word-break--all",
|
|
4926
4925
|
children: data
|
|
@@ -4931,7 +4930,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4931
4930
|
spatial: (data)=>{
|
|
4932
4931
|
return [
|
|
4933
4932
|
{
|
|
4934
|
-
label:
|
|
4933
|
+
label: "Spacial/Geographical Coverage",
|
|
4935
4934
|
value: data
|
|
4936
4935
|
}
|
|
4937
4936
|
];
|
|
@@ -4939,7 +4938,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4939
4938
|
references: (data)=>{
|
|
4940
4939
|
return [
|
|
4941
4940
|
{
|
|
4942
|
-
label:
|
|
4941
|
+
label: "Related Documents",
|
|
4943
4942
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
4944
4943
|
className: "ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0",
|
|
4945
4944
|
children: data.map((item)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -5020,7 +5019,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
5020
5019
|
if (dist && dist.data) {
|
|
5021
5020
|
if (dist.data.format) return dist.data.format.toLowerCase();
|
|
5022
5021
|
if (dist.data.mediaType) {
|
|
5023
|
-
const mediaType = dist.data.mediaType.split(
|
|
5022
|
+
const mediaType = dist.data.mediaType.split("/");
|
|
5024
5023
|
if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
|
|
5025
5024
|
}
|
|
5026
5025
|
if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
|
|
@@ -5030,7 +5029,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
5030
5029
|
}
|
|
5031
5030
|
}
|
|
5032
5031
|
}
|
|
5033
|
-
return
|
|
5032
|
+
return "";
|
|
5034
5033
|
}
|
|
5035
5034
|
|
|
5036
5035
|
|
|
@@ -5074,8 +5073,8 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5074
5073
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
5075
5074
|
href: dist.data.downloadURL,
|
|
5076
5075
|
style: {
|
|
5077
|
-
order: sm ?
|
|
5078
|
-
width: sm ?
|
|
5076
|
+
order: sm ? "1" : "0",
|
|
5077
|
+
width: sm ? "100%" : "auto"
|
|
5079
5078
|
},
|
|
5080
5079
|
"aria-label": `Download ${dist.data.title || title} ${fileFormat}`,
|
|
5081
5080
|
className: "ds-c-button",
|
|
@@ -5088,7 +5087,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5088
5087
|
})
|
|
5089
5088
|
}),
|
|
5090
5089
|
dist.data.description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5091
|
-
className:
|
|
5090
|
+
className: "ds-u-measure--wide ds-u-margin-bottom--7",
|
|
5092
5091
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5093
5092
|
className: "dc-c-metadata-description ds-u-margin--0",
|
|
5094
5093
|
dangerouslySetInnerHTML: {
|
|
@@ -5160,7 +5159,7 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5160
5159
|
const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
|
|
5161
5160
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
5162
5161
|
children: [
|
|
5163
|
-
md ?
|
|
5162
|
+
md ? "" : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5164
5163
|
component: "th",
|
|
5165
5164
|
className: "ds-u-font-weight--bold",
|
|
5166
5165
|
children: [
|
|
@@ -5171,8 +5170,8 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5171
5170
|
title: tooltip.title,
|
|
5172
5171
|
// @ts-ignore
|
|
5173
5172
|
style: {
|
|
5174
|
-
border:
|
|
5175
|
-
background:
|
|
5173
|
+
border: "none",
|
|
5174
|
+
background: "none"
|
|
5176
5175
|
},
|
|
5177
5176
|
maxWidth: "400px",
|
|
5178
5177
|
placement: "auto",
|
|
@@ -5231,10 +5230,10 @@ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: ap
|
|
|
5231
5230
|
href: apiUrl,
|
|
5232
5231
|
children: [
|
|
5233
5232
|
"View API",
|
|
5234
|
-
|
|
5233
|
+
" ",
|
|
5235
5234
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5236
5235
|
style: {
|
|
5237
|
-
whiteSpace:
|
|
5236
|
+
whiteSpace: "nowrap"
|
|
5238
5237
|
},
|
|
5239
5238
|
children: [
|
|
5240
5239
|
"specification ",
|
|
@@ -5275,20 +5274,20 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
|
|
|
5275
5274
|
|
|
5276
5275
|
const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
|
|
5277
5276
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
5278
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
5277
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)("");
|
|
5279
5278
|
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
5280
5279
|
minWidth: 0,
|
|
5281
5280
|
maxWidth: 544
|
|
5282
5281
|
});
|
|
5283
5282
|
const sortElement = (isSorted)=>{
|
|
5284
|
-
if (isSorted ===
|
|
5285
|
-
if (isSorted ===
|
|
5286
|
-
return
|
|
5283
|
+
if (isSorted === "asc") return "dc-c-sort--asc";
|
|
5284
|
+
if (isSorted === "desc") return "dc-c-sort--desc";
|
|
5285
|
+
return "dc-c-sort--default";
|
|
5287
5286
|
};
|
|
5288
5287
|
const table = (0, $hgUW1$useReactTable)({
|
|
5289
5288
|
data: tableData,
|
|
5290
5289
|
columns: tableColumns,
|
|
5291
|
-
columnResizeMode:
|
|
5290
|
+
columnResizeMode: "onChange",
|
|
5292
5291
|
getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
|
|
5293
5292
|
getFilteredRowModel: (0, $hgUW1$getFilteredRowModel)(),
|
|
5294
5293
|
getPaginationRowModel: (0, $hgUW1$getPaginationRowModel)(),
|
|
@@ -5307,49 +5306,49 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5307
5306
|
});
|
|
5308
5307
|
const sortOptions = [
|
|
5309
5308
|
{
|
|
5310
|
-
value:
|
|
5311
|
-
label:
|
|
5309
|
+
value: "default",
|
|
5310
|
+
label: "No Sort"
|
|
5312
5311
|
},
|
|
5313
5312
|
{
|
|
5314
|
-
value:
|
|
5315
|
-
label:
|
|
5313
|
+
value: "titleasc",
|
|
5314
|
+
label: "Title A-Z"
|
|
5316
5315
|
},
|
|
5317
5316
|
{
|
|
5318
|
-
value:
|
|
5319
|
-
label:
|
|
5317
|
+
value: "titledesc",
|
|
5318
|
+
label: "Title Z-A"
|
|
5320
5319
|
},
|
|
5321
5320
|
{
|
|
5322
|
-
value:
|
|
5323
|
-
label:
|
|
5321
|
+
value: "typeasc",
|
|
5322
|
+
label: "Type A-Z"
|
|
5324
5323
|
},
|
|
5325
5324
|
{
|
|
5326
|
-
value:
|
|
5327
|
-
label:
|
|
5325
|
+
value: "typedesc",
|
|
5326
|
+
label: "Type Z-A"
|
|
5328
5327
|
}
|
|
5329
5328
|
];
|
|
5330
5329
|
const sortStatesLookup = {
|
|
5331
5330
|
default: [],
|
|
5332
5331
|
titleasc: [
|
|
5333
5332
|
{
|
|
5334
|
-
id:
|
|
5333
|
+
id: "titleResizable",
|
|
5335
5334
|
desc: false
|
|
5336
5335
|
}
|
|
5337
5336
|
],
|
|
5338
5337
|
titledesc: [
|
|
5339
5338
|
{
|
|
5340
|
-
id:
|
|
5339
|
+
id: "titleResizable",
|
|
5341
5340
|
desc: true
|
|
5342
5341
|
}
|
|
5343
5342
|
],
|
|
5344
5343
|
typeasc: [
|
|
5345
5344
|
{
|
|
5346
|
-
id:
|
|
5345
|
+
id: "type",
|
|
5347
5346
|
desc: false
|
|
5348
5347
|
}
|
|
5349
5348
|
],
|
|
5350
5349
|
typedesc: [
|
|
5351
5350
|
{
|
|
5352
|
-
id:
|
|
5351
|
+
id: "type",
|
|
5353
5352
|
desc: true
|
|
5354
5353
|
}
|
|
5355
5354
|
]
|
|
@@ -5377,7 +5376,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5377
5376
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
5378
5377
|
className: "dc-c-datatable",
|
|
5379
5378
|
style: {
|
|
5380
|
-
width:
|
|
5379
|
+
width: "100%"
|
|
5381
5380
|
},
|
|
5382
5381
|
stackable: true,
|
|
5383
5382
|
children: [
|
|
@@ -5393,12 +5392,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5393
5392
|
}, header.id + "_resize") : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5394
5393
|
key: header.id,
|
|
5395
5394
|
className: `ds-u-border-y--2 ds-u-border--dark ds-u-border-x--0`,
|
|
5396
|
-
id:
|
|
5395
|
+
id: "dataDictionary_" + header.id,
|
|
5397
5396
|
children: [
|
|
5398
5397
|
(0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext()),
|
|
5399
|
-
header.id ===
|
|
5398
|
+
header.id === "type" && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
5400
5399
|
onClick: header.column.getToggleSortingHandler(),
|
|
5401
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
5400
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : "",
|
|
5402
5401
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
5403
5402
|
})
|
|
5404
5403
|
]
|
|
@@ -5413,12 +5412,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5413
5412
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
5414
5413
|
key: cell.id,
|
|
5415
5414
|
style: {
|
|
5416
|
-
maxWidth: mobile ?
|
|
5417
|
-
whiteSpace: cell.column.id === "description" ?
|
|
5415
|
+
maxWidth: mobile ? "100%" : cell.column.getSize(),
|
|
5416
|
+
whiteSpace: cell.column.id === "description" ? "pre-wrap" : "normal"
|
|
5418
5417
|
},
|
|
5419
|
-
className: `${cell.column.id ===
|
|
5420
|
-
headers:
|
|
5421
|
-
stackedTitle: cell.column.id ===
|
|
5418
|
+
className: `${cell.column.id === "titleResizable" ? "ds-u-word-break" : ""}`,
|
|
5419
|
+
headers: "dataDictionary_" + cell.column.id,
|
|
5420
|
+
stackedTitle: cell.column.id === "titleResizable" ? "Title" : cell.column.columnDef.header,
|
|
5422
5421
|
children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
5423
5422
|
});
|
|
5424
5423
|
})
|
|
@@ -5447,7 +5446,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5447
5446
|
table.setPageIndex(page - 1);
|
|
5448
5447
|
},
|
|
5449
5448
|
renderHref: (page)=>`/page=${page}`
|
|
5450
|
-
}) :
|
|
5449
|
+
}) : ""
|
|
5451
5450
|
]
|
|
5452
5451
|
});
|
|
5453
5452
|
};
|
|
@@ -5457,17 +5456,17 @@ var $6765a74df807d015$export$2e2bcd8739ae039 = $6765a74df807d015$var$DataDiction
|
|
|
5457
5456
|
const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
|
|
5458
5457
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
5459
5458
|
const tableColumns = [
|
|
5460
|
-
columnHelper.accessor(
|
|
5461
|
-
header:
|
|
5459
|
+
columnHelper.accessor("name", {
|
|
5460
|
+
header: "Name"
|
|
5462
5461
|
}),
|
|
5463
|
-
columnHelper.accessor(
|
|
5464
|
-
header:
|
|
5462
|
+
columnHelper.accessor("title", {
|
|
5463
|
+
header: "Title"
|
|
5465
5464
|
}),
|
|
5466
|
-
columnHelper.accessor(
|
|
5467
|
-
header:
|
|
5465
|
+
columnHelper.accessor("type", {
|
|
5466
|
+
header: "Type"
|
|
5468
5467
|
}),
|
|
5469
|
-
columnHelper.accessor(
|
|
5470
|
-
header:
|
|
5468
|
+
columnHelper.accessor("format", {
|
|
5469
|
+
header: "Format"
|
|
5471
5470
|
})
|
|
5472
5471
|
];
|
|
5473
5472
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6765a74df807d015$export$2e2bcd8739ae039), {
|
|
@@ -5511,7 +5510,7 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
5511
5510
|
});
|
|
5512
5511
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
5513
5512
|
const tableColumns = [
|
|
5514
|
-
columnHelper.accessor(
|
|
5513
|
+
columnHelper.accessor("titleResizable", {
|
|
5515
5514
|
header: ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5516
5515
|
className: "dc-c-tooltip-width-override",
|
|
5517
5516
|
children: [
|
|
@@ -5520,8 +5519,8 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
5520
5519
|
title: "Title represents the column headers of the data file",
|
|
5521
5520
|
// @ts-ignore
|
|
5522
5521
|
style: {
|
|
5523
|
-
border:
|
|
5524
|
-
background:
|
|
5522
|
+
border: "none",
|
|
5523
|
+
background: "none"
|
|
5525
5524
|
},
|
|
5526
5525
|
maxWidth: "400px",
|
|
5527
5526
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
|
|
@@ -5531,48 +5530,48 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
5531
5530
|
size: 300,
|
|
5532
5531
|
minSize: 132
|
|
5533
5532
|
}),
|
|
5534
|
-
columnHelper.accessor(
|
|
5535
|
-
header:
|
|
5533
|
+
columnHelper.accessor("description", {
|
|
5534
|
+
header: "Description",
|
|
5536
5535
|
minSize: 600
|
|
5537
5536
|
}),
|
|
5538
|
-
columnHelper.accessor(
|
|
5539
|
-
header:
|
|
5537
|
+
columnHelper.accessor("type", {
|
|
5538
|
+
header: "Type",
|
|
5540
5539
|
size: 150,
|
|
5541
5540
|
enableResizing: false
|
|
5542
5541
|
})
|
|
5543
5542
|
];
|
|
5544
5543
|
const typeOptions = [
|
|
5545
5544
|
{
|
|
5546
|
-
value:
|
|
5547
|
-
label:
|
|
5545
|
+
value: "all",
|
|
5546
|
+
label: "All Types"
|
|
5548
5547
|
},
|
|
5549
5548
|
{
|
|
5550
|
-
value:
|
|
5551
|
-
label:
|
|
5549
|
+
value: "string",
|
|
5550
|
+
label: "String"
|
|
5552
5551
|
},
|
|
5553
5552
|
{
|
|
5554
|
-
value:
|
|
5555
|
-
label:
|
|
5553
|
+
value: "date",
|
|
5554
|
+
label: "Date"
|
|
5556
5555
|
},
|
|
5557
5556
|
{
|
|
5558
|
-
value:
|
|
5559
|
-
label:
|
|
5557
|
+
value: "datetime",
|
|
5558
|
+
label: "Datetime"
|
|
5560
5559
|
},
|
|
5561
5560
|
{
|
|
5562
|
-
value:
|
|
5563
|
-
label:
|
|
5561
|
+
value: "year",
|
|
5562
|
+
label: "Year"
|
|
5564
5563
|
},
|
|
5565
5564
|
{
|
|
5566
|
-
value:
|
|
5567
|
-
label:
|
|
5565
|
+
value: "integer",
|
|
5566
|
+
label: "Integer"
|
|
5568
5567
|
},
|
|
5569
5568
|
{
|
|
5570
|
-
value:
|
|
5571
|
-
label:
|
|
5569
|
+
value: "number",
|
|
5570
|
+
label: "Number"
|
|
5572
5571
|
},
|
|
5573
5572
|
{
|
|
5574
|
-
value:
|
|
5575
|
-
label:
|
|
5573
|
+
value: "boolean",
|
|
5574
|
+
label: "Boolean"
|
|
5576
5575
|
}
|
|
5577
5576
|
];
|
|
5578
5577
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -5679,7 +5678,7 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
|
|
|
5679
5678
|
href: datasetDictionaryEndpoint + "/csv",
|
|
5680
5679
|
className: "ds-c-button",
|
|
5681
5680
|
style: {
|
|
5682
|
-
width:
|
|
5681
|
+
width: "100%"
|
|
5683
5682
|
},
|
|
5684
5683
|
children: [
|
|
5685
5684
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
@@ -5758,7 +5757,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
5758
5757
|
const [description, setDescription] = (0, $hgUW1$useState)("");
|
|
5759
5758
|
if (!distribution && !dataset?.identifier) return null;
|
|
5760
5759
|
(0, $hgUW1$useEffect)(()=>{
|
|
5761
|
-
let newDescription =
|
|
5760
|
+
let newDescription = "";
|
|
5762
5761
|
if (customDescription) newDescription = customDescription(dataset, distribution, resource);
|
|
5763
5762
|
else {
|
|
5764
5763
|
if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
|
|
@@ -5773,7 +5772,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
5773
5772
|
customDescription
|
|
5774
5773
|
]);
|
|
5775
5774
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5776
|
-
className:
|
|
5775
|
+
className: "ds-u-measure--wide ds-u-margin-bottom--7",
|
|
5777
5776
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5778
5777
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
5779
5778
|
dangerouslySetInnerHTML: {
|
|
@@ -5795,7 +5794,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
5795
5794
|
],
|
|
5796
5795
|
queryFn: ()=>{
|
|
5797
5796
|
return fetch(`${dataDictionaryUrl}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA), {
|
|
5798
|
-
arrayFormat:
|
|
5797
|
+
arrayFormat: "comma",
|
|
5799
5798
|
encode: false
|
|
5800
5799
|
})}`).then((res)=>res.json());
|
|
5801
5800
|
}
|
|
@@ -5814,7 +5813,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5814
5813
|
conditions: []
|
|
5815
5814
|
};
|
|
5816
5815
|
const { dataset: dataset, isPending: isPending } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
5817
|
-
const title = dataset.title ? dataset.title :
|
|
5816
|
+
const title = dataset.title ? dataset.title : "";
|
|
5818
5817
|
const metadataMapping = {
|
|
5819
5818
|
...(0, $6da0396069e23175$export$bc27cf7ecf44639d),
|
|
5820
5819
|
...customMetadataMapping
|
|
@@ -5822,7 +5821,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5822
5821
|
let distribution = {};
|
|
5823
5822
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
5824
5823
|
if (distributions.length) distribution = distributions[0];
|
|
5825
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
5824
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
5826
5825
|
...options,
|
|
5827
5826
|
limit: defaultPageSize
|
|
5828
5827
|
});
|
|
@@ -5834,7 +5833,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5834
5833
|
}) : null;
|
|
5835
5834
|
(0, $hgUW1$useEffect)(()=>{
|
|
5836
5835
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
5837
|
-
if (localFileFormat ===
|
|
5836
|
+
if (localFileFormat === "csv") resource.setResource(distribution.identifier);
|
|
5838
5837
|
}, [
|
|
5839
5838
|
distribution
|
|
5840
5839
|
]);
|
|
@@ -5889,26 +5888,26 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5889
5888
|
distribution,
|
|
5890
5889
|
window.location.hash
|
|
5891
5890
|
]);
|
|
5892
|
-
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType ===
|
|
5891
|
+
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === "application/vnd.tableschema+json" || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
5893
5892
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
5894
5893
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
5895
5894
|
content: notFoundContent,
|
|
5896
5895
|
siteUrl: rootUrl
|
|
5897
5896
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5898
|
-
className:
|
|
5897
|
+
className: "ds-l-container",
|
|
5899
5898
|
children: [
|
|
5900
5899
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5901
|
-
className:
|
|
5900
|
+
className: "ds-l-row",
|
|
5902
5901
|
children: [
|
|
5903
5902
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5904
|
-
className:
|
|
5903
|
+
className: "ds-l-md-col--9",
|
|
5905
5904
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
5906
5905
|
className: "ds-text-heading--3xl",
|
|
5907
5906
|
children: title
|
|
5908
5907
|
})
|
|
5909
5908
|
}),
|
|
5910
5909
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5911
|
-
className:
|
|
5910
|
+
className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
|
|
5912
5911
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
5913
5912
|
className: "ds-u-margin--0",
|
|
5914
5913
|
children: [
|
|
@@ -5920,7 +5919,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5920
5919
|
})
|
|
5921
5920
|
}),
|
|
5922
5921
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5923
|
-
className:
|
|
5922
|
+
className: "ds-l-md-col--9",
|
|
5924
5923
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
5925
5924
|
distribution: distribution,
|
|
5926
5925
|
dataset: dataset,
|
|
@@ -5932,9 +5931,9 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5932
5931
|
]
|
|
5933
5932
|
}),
|
|
5934
5933
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5935
|
-
className:
|
|
5934
|
+
className: "ds-l-row",
|
|
5936
5935
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5937
|
-
className:
|
|
5936
|
+
className: "ds-l-md-col--12 dc-dataset",
|
|
5938
5937
|
children: !isPending && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tabs), {
|
|
5939
5938
|
onChange: (selectedId, prevSelectedId)=>{
|
|
5940
5939
|
setSelectedTab(selectedId);
|
|
@@ -5942,7 +5941,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5942
5941
|
selectedId: selectedTab,
|
|
5943
5942
|
children: [
|
|
5944
5943
|
(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
5945
|
-
id:
|
|
5944
|
+
id: "data-table",
|
|
5946
5945
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5947
5946
|
className: "ds-u-color--primary",
|
|
5948
5947
|
children: [
|
|
@@ -5952,7 +5951,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5952
5951
|
"Data Table"
|
|
5953
5952
|
]
|
|
5954
5953
|
}),
|
|
5955
|
-
className: borderlessTabs ?
|
|
5954
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
5956
5955
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
5957
5956
|
value: {
|
|
5958
5957
|
id: id,
|
|
@@ -5967,7 +5966,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5967
5966
|
})
|
|
5968
5967
|
}),
|
|
5969
5968
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
5970
|
-
id:
|
|
5969
|
+
id: "overview",
|
|
5971
5970
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5972
5971
|
className: "ds-u-color--primary",
|
|
5973
5972
|
children: [
|
|
@@ -5977,7 +5976,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5977
5976
|
"Overview"
|
|
5978
5977
|
]
|
|
5979
5978
|
}),
|
|
5980
|
-
className: borderlessTabs ?
|
|
5979
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
5981
5980
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
|
|
5982
5981
|
resource: resource,
|
|
5983
5982
|
dataset: dataset,
|
|
@@ -5986,7 +5985,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5986
5985
|
})
|
|
5987
5986
|
}),
|
|
5988
5987
|
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TabPanel), {
|
|
5989
|
-
id:
|
|
5988
|
+
id: "data-dictionary",
|
|
5990
5989
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5991
5990
|
className: "ds-u-color--primary",
|
|
5992
5991
|
children: [
|
|
@@ -5996,7 +5995,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5996
5995
|
"Data Dictionary"
|
|
5997
5996
|
]
|
|
5998
5997
|
}),
|
|
5999
|
-
className: borderlessTabs ?
|
|
5998
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6000
5999
|
children: [
|
|
6001
6000
|
displayDataDictionaryTab && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
6002
6001
|
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
@@ -6010,7 +6009,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6010
6009
|
]
|
|
6011
6010
|
}),
|
|
6012
6011
|
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6013
|
-
id:
|
|
6012
|
+
id: "api",
|
|
6014
6013
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6015
6014
|
className: "ds-u-color--primary",
|
|
6016
6015
|
children: [
|
|
@@ -6020,7 +6019,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6020
6019
|
"API"
|
|
6021
6020
|
]
|
|
6022
6021
|
}),
|
|
6023
|
-
className: borderlessTabs ?
|
|
6022
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6024
6023
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
|
|
6025
6024
|
id: id,
|
|
6026
6025
|
rootUrl: rootUrl,
|
|
@@ -6057,13 +6056,13 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6057
6056
|
});
|
|
6058
6057
|
const menu = (0, $hgUW1$useRef)(null);
|
|
6059
6058
|
function closeMobileMenu() {
|
|
6060
|
-
const mobileMenuButtonElement = document.querySelector(
|
|
6059
|
+
const mobileMenuButtonElement = document.querySelector(".dkan-c-mobile-menu-button");
|
|
6061
6060
|
if (!mobileMenuButtonElement) return;
|
|
6062
6061
|
mobileMenuButtonElement.focus();
|
|
6063
6062
|
}
|
|
6064
6063
|
// Close mobile menu with escape.
|
|
6065
6064
|
function handleMenuClose(event) {
|
|
6066
|
-
if (event.key ===
|
|
6065
|
+
if (event.key === "Escape" && mobileMenuOpen) setMobileMenuOpen(false);
|
|
6067
6066
|
}
|
|
6068
6067
|
function handleClick(event) {
|
|
6069
6068
|
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
@@ -6098,7 +6097,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6098
6097
|
const focusableEls = getFocusableElements(menu.current).selectors.visible;
|
|
6099
6098
|
const firstEl = focusableEls[0];
|
|
6100
6099
|
const lastEl = focusableEls[focusableEls.length - 1];
|
|
6101
|
-
if (event.key ===
|
|
6100
|
+
if (event.key === "Tab") {
|
|
6102
6101
|
if (event.shiftKey && document.activeElement === firstEl) {
|
|
6103
6102
|
lastEl?.focus();
|
|
6104
6103
|
event.preventDefault();
|
|
@@ -6110,15 +6109,15 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6110
6109
|
}
|
|
6111
6110
|
};
|
|
6112
6111
|
(0, $hgUW1$useEffect)(()=>{
|
|
6113
|
-
document.addEventListener(
|
|
6114
|
-
document.addEventListener(
|
|
6112
|
+
document.addEventListener("keyup", handleMenuClose);
|
|
6113
|
+
document.addEventListener("mousedown", handleClick);
|
|
6115
6114
|
if (mobileMenuOpen) handleFocusIn();
|
|
6116
6115
|
else closeMobileMenu();
|
|
6117
|
-
if (menu.current) menu.current.addEventListener(
|
|
6116
|
+
if (menu.current) menu.current.addEventListener("keydown", (evt)=>trapFocus(evt));
|
|
6118
6117
|
return ()=>{
|
|
6119
|
-
document.removeEventListener(
|
|
6120
|
-
document.addEventListener(
|
|
6121
|
-
if (menu.current) menu.current.removeEventListener(
|
|
6118
|
+
document.removeEventListener("keyup", handleMenuClose);
|
|
6119
|
+
document.addEventListener("mousedown", handleClick);
|
|
6120
|
+
if (menu.current) menu.current.removeEventListener("keydown", trapFocus);
|
|
6122
6121
|
};
|
|
6123
6122
|
}, [
|
|
6124
6123
|
mobileMenuOpen
|
|
@@ -6133,7 +6132,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6133
6132
|
},
|
|
6134
6133
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
|
|
6135
6134
|
"aria-label": "Site header",
|
|
6136
|
-
className: `dkan-c-header dkan-c-header--${mobileMax ?
|
|
6135
|
+
className: `dkan-c-header dkan-c-header--${mobileMax ? "mobile" : "desktop"}`,
|
|
6137
6136
|
children: [
|
|
6138
6137
|
topNav && topNav,
|
|
6139
6138
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6176,7 +6175,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6176
6175
|
var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
|
|
6177
6176
|
|
|
6178
6177
|
|
|
6179
|
-
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle =
|
|
6178
|
+
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", {
|
|
6180
6179
|
children: [
|
|
6181
6180
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6182
6181
|
children: "A federal government website managed and paid for by the U.S. Centers for Medicare & Medicaid Services."
|
|
@@ -6264,14 +6263,14 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6264
6263
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
6265
6264
|
className: "ds-u-font-size--sm",
|
|
6266
6265
|
children: footerAdditionalResourcesLinks.filter((link)=>{
|
|
6267
|
-
const noOnClick = Object.keys(link).findIndex((l)=>l ===
|
|
6266
|
+
const noOnClick = Object.keys(link).findIndex((l)=>l === "onClick");
|
|
6268
6267
|
if (noOnClick === -1 || link.onClick && link.dataTag) return link;
|
|
6269
6268
|
}).map((link)=>{
|
|
6270
6269
|
if (link.onClick && link.dataTag) return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
6271
6270
|
className: "ds-u-margin-bottom--1",
|
|
6272
6271
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
6273
6272
|
href: link.url,
|
|
6274
|
-
[
|
|
6273
|
+
["data-" + link.dataTag.name]: link.dataTag.value,
|
|
6275
6274
|
onClick: link.onClick,
|
|
6276
6275
|
children: link.label
|
|
6277
6276
|
})
|
|
@@ -6371,7 +6370,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6371
6370
|
children: [
|
|
6372
6371
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6373
6372
|
id: "svg-inline--fa-title-iRCARP7h6Kp3",
|
|
6374
|
-
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title :
|
|
6373
|
+
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title : "CMS Facebook"
|
|
6375
6374
|
}),
|
|
6376
6375
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6377
6376
|
transform: "translate(160 256)",
|
|
@@ -6424,7 +6423,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6424
6423
|
children: [
|
|
6425
6424
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6426
6425
|
id: "svg-inline--fa-title-4z03ITiPPTVF",
|
|
6427
|
-
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title :
|
|
6426
|
+
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title : "CMS Twitter"
|
|
6428
6427
|
}),
|
|
6429
6428
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6430
6429
|
transform: "translate(256 256)",
|
|
@@ -6477,7 +6476,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6477
6476
|
children: [
|
|
6478
6477
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6479
6478
|
id: "svg-inline--fa-title-Nm2qsuSKvuRZ",
|
|
6480
|
-
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title :
|
|
6479
|
+
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title : "CMS LinkedIn"
|
|
6481
6480
|
}),
|
|
6482
6481
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6483
6482
|
transform: "translate(224 256)",
|
|
@@ -6529,7 +6528,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6529
6528
|
children: [
|
|
6530
6529
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6531
6530
|
id: "svg-inline--fa-title-youtube",
|
|
6532
|
-
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title :
|
|
6531
|
+
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title : "CMS youtube"
|
|
6533
6532
|
}),
|
|
6534
6533
|
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
6535
6534
|
fill: "currentColor",
|
|
@@ -6629,26 +6628,26 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
6629
6628
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6630
6629
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
6631
6630
|
stackable: true,
|
|
6632
|
-
className:
|
|
6631
|
+
className: "ds-c-table",
|
|
6633
6632
|
children: [
|
|
6634
6633
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
|
|
6635
6634
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
6636
6635
|
children: [
|
|
6637
6636
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6638
|
-
id:
|
|
6639
|
-
headers:
|
|
6637
|
+
id: "application",
|
|
6638
|
+
headers: "Application",
|
|
6640
6639
|
children: "Application"
|
|
6641
|
-
},
|
|
6640
|
+
}, "Application"),
|
|
6642
6641
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6643
|
-
id:
|
|
6644
|
-
headers:
|
|
6642
|
+
id: "notes",
|
|
6643
|
+
headers: "Notes",
|
|
6645
6644
|
children: "Notes"
|
|
6646
|
-
},
|
|
6645
|
+
}, "Notes"),
|
|
6647
6646
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6648
|
-
id:
|
|
6649
|
-
headers:
|
|
6647
|
+
id: "links",
|
|
6648
|
+
headers: "Links",
|
|
6650
6649
|
children: "Links"
|
|
6651
|
-
},
|
|
6650
|
+
}, "Links")
|
|
6652
6651
|
]
|
|
6653
6652
|
})
|
|
6654
6653
|
}),
|
|
@@ -6658,19 +6657,19 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
6658
6657
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6659
6658
|
id: d.id,
|
|
6660
6659
|
stackedTitle: "Application",
|
|
6661
|
-
headers:
|
|
6660
|
+
headers: "Application",
|
|
6662
6661
|
children: d.application
|
|
6663
6662
|
}, d.id),
|
|
6664
6663
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6665
6664
|
id: d.id,
|
|
6666
6665
|
stackedTitle: "Notes",
|
|
6667
|
-
headers:
|
|
6666
|
+
headers: "Notes",
|
|
6668
6667
|
children: d.notes
|
|
6669
6668
|
}, `${d.id}-notes`),
|
|
6670
6669
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6671
6670
|
id: d.id,
|
|
6672
6671
|
stackedTitle: "Links",
|
|
6673
|
-
headers:
|
|
6672
|
+
headers: "Links",
|
|
6674
6673
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
6675
6674
|
className: "dkan-newtab",
|
|
6676
6675
|
href: d.link,
|
|
@@ -6698,44 +6697,44 @@ var $5655284dbbb89508$export$2e2bcd8739ae039 = $5655284dbbb89508$var$Documentati
|
|
|
6698
6697
|
|
|
6699
6698
|
const $c7bf75f7e8a68780$export$7850f4d545d994c6 = [
|
|
6700
6699
|
{
|
|
6701
|
-
id:
|
|
6702
|
-
application:
|
|
6703
|
-
notes:
|
|
6704
|
-
link:
|
|
6705
|
-
linkText:
|
|
6706
|
-
screenReaderOnlyText:
|
|
6700
|
+
id: "excel",
|
|
6701
|
+
application: "Microsoft Excel",
|
|
6702
|
+
notes: "Official size limitations for Microsoft Excel",
|
|
6703
|
+
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",
|
|
6704
|
+
linkText: "Excel Specifications and Limits",
|
|
6705
|
+
screenReaderOnlyText: "on microsoft.com"
|
|
6707
6706
|
},
|
|
6708
6707
|
{
|
|
6709
|
-
id:
|
|
6710
|
-
application:
|
|
6711
|
-
notes:
|
|
6712
|
-
link:
|
|
6713
|
-
linkText:
|
|
6714
|
-
screenReaderOnlyText:
|
|
6708
|
+
id: "access",
|
|
6709
|
+
application: "Microsoft Access",
|
|
6710
|
+
notes: "Official size limitations for Microsoft Access",
|
|
6711
|
+
link: "https://support.microsoft.com/en-us/office/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c?ui=en-us&rs=en-us&ad=us",
|
|
6712
|
+
linkText: "Access 2016 Specifications",
|
|
6713
|
+
screenReaderOnlyText: "on microsoft.com"
|
|
6715
6714
|
},
|
|
6716
6715
|
{
|
|
6717
|
-
id:
|
|
6718
|
-
application:
|
|
6719
|
-
notes:
|
|
6720
|
-
link:
|
|
6721
|
-
linkText:
|
|
6722
|
-
screenReaderOnlyText:
|
|
6716
|
+
id: "oracle-sql-developer",
|
|
6717
|
+
application: "Oracle SQL Developer",
|
|
6718
|
+
notes: "Oracle SQL Developer tool",
|
|
6719
|
+
link: "https://www.oracle.com/database/sqldeveloper/",
|
|
6720
|
+
linkText: "Oracle SQL Developer Overview",
|
|
6721
|
+
screenReaderOnlyText: "on oracle.com"
|
|
6723
6722
|
},
|
|
6724
6723
|
{
|
|
6725
|
-
id:
|
|
6726
|
-
application:
|
|
6727
|
-
notes:
|
|
6728
|
-
link:
|
|
6729
|
-
linkText:
|
|
6730
|
-
screenReaderOnlyText:
|
|
6724
|
+
id: "oracle-database",
|
|
6725
|
+
application: "Oracle Database",
|
|
6726
|
+
notes: "Oracle Database official size limitations",
|
|
6727
|
+
link: "https://docs.oracle.com/cd/B28359_01/server.111/b28320/limits002.htm#i287915",
|
|
6728
|
+
linkText: "Oracle Physical Database Limits",
|
|
6729
|
+
screenReaderOnlyText: "on oracle.com"
|
|
6731
6730
|
},
|
|
6732
6731
|
{
|
|
6733
|
-
id:
|
|
6734
|
-
application:
|
|
6735
|
-
notes:
|
|
6736
|
-
link:
|
|
6737
|
-
linkText:
|
|
6738
|
-
screenReaderOnlyText:
|
|
6732
|
+
id: "oracle-sql-client-tools",
|
|
6733
|
+
application: "Oracle SQL Client Tools",
|
|
6734
|
+
notes: "Oracle SQL Client Tools",
|
|
6735
|
+
link: "https://www.oracle.com/database/technologies/oracle-database-software-downloads.html",
|
|
6736
|
+
linkText: "Oracle SQL Client",
|
|
6737
|
+
screenReaderOnlyText: "on oracle.com"
|
|
6739
6738
|
}
|
|
6740
6739
|
];
|
|
6741
6740
|
|
|
@@ -6763,7 +6762,7 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
6763
6762
|
}),
|
|
6764
6763
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
6765
6764
|
heading: "Notice",
|
|
6766
|
-
className:
|
|
6765
|
+
className: "ds-u-margin-top--6",
|
|
6767
6766
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6768
6767
|
className: "ds-c-alert__text",
|
|
6769
6768
|
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."
|
|
@@ -6772,16 +6771,16 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
6772
6771
|
]
|
|
6773
6772
|
}),
|
|
6774
6773
|
/*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
6775
|
-
className:
|
|
6774
|
+
className: "ds-u-margin-top--4 ds-l-row",
|
|
6776
6775
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6777
|
-
className:
|
|
6776
|
+
className: "ds-l-col--12",
|
|
6778
6777
|
children: [
|
|
6779
6778
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
6780
6779
|
className: "ds-text-heading--2xl ds-text-heading--2xl",
|
|
6781
6780
|
children: "Documentation by Application"
|
|
6782
6781
|
}),
|
|
6783
6782
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6784
|
-
className:
|
|
6783
|
+
className: "ds-u-margin-top--4",
|
|
6785
6784
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5655284dbbb89508$export$2e2bcd8739ae039), {
|
|
6786
6785
|
data: documentationList
|
|
6787
6786
|
})
|
|
@@ -6809,7 +6808,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
6809
6808
|
const options = {
|
|
6810
6809
|
conditions: query ? JSON.parse(query).map(({ column: column, operator: operator, ...rest })=>({
|
|
6811
6810
|
property: column,
|
|
6812
|
-
operator: operator ===
|
|
6811
|
+
operator: operator === "is" ? "=" : operator === "is not" ? "<>" : operator === "or" ? "in" : operator,
|
|
6813
6812
|
...rest
|
|
6814
6813
|
})) : []
|
|
6815
6814
|
};
|
|
@@ -6817,13 +6816,13 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
6817
6816
|
let distribution = {};
|
|
6818
6817
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
6819
6818
|
if (distributions.length) distribution = distributions[distributionIndex];
|
|
6820
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
6819
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
6821
6820
|
...options,
|
|
6822
6821
|
limit: defaultPageSize
|
|
6823
6822
|
});
|
|
6824
6823
|
(0, $hgUW1$useEffect)(()=>{
|
|
6825
6824
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6826
|
-
if (localFileFormat ===
|
|
6825
|
+
if (localFileFormat === "csv") resource.setResource(distribution.identifier);
|
|
6827
6826
|
}, [
|
|
6828
6827
|
distribution
|
|
6829
6828
|
]);
|
|
@@ -6874,7 +6873,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
6874
6873
|
|
|
6875
6874
|
|
|
6876
6875
|
function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
|
|
6877
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
6876
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
6878
6877
|
const newDate = new Date(condition.value);
|
|
6879
6878
|
if (newDate instanceof Date && !isNaN(newDate)) return newDate;
|
|
6880
6879
|
}
|
|
@@ -6891,9 +6890,9 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
6891
6890
|
const [startDate, setStartDate] = (0, $hgUW1$react).useState($374c4669b044ddf8$var$getStartDate(condition, schema, id));
|
|
6892
6891
|
(0, $hgUW1$useEffect)(()=>{
|
|
6893
6892
|
if (property !== condition.property) {
|
|
6894
|
-
if (property) update(index,
|
|
6895
|
-
else update(index,
|
|
6896
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
6893
|
+
if (property) update(index, "property", property);
|
|
6894
|
+
else update(index, "property", "");
|
|
6895
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
6897
6896
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
6898
6897
|
}
|
|
6899
6898
|
}
|
|
@@ -6907,16 +6906,16 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
6907
6906
|
]);
|
|
6908
6907
|
(0, $hgUW1$useEffect)(()=>{
|
|
6909
6908
|
if (operator !== condition.operator) {
|
|
6910
|
-
if (operator) update(index,
|
|
6911
|
-
else update(index,
|
|
6909
|
+
if (operator) update(index, "operator", operator);
|
|
6910
|
+
else update(index, "operator", "");
|
|
6912
6911
|
}
|
|
6913
6912
|
}, [
|
|
6914
6913
|
operator
|
|
6915
6914
|
]);
|
|
6916
6915
|
(0, $hgUW1$useEffect)(()=>{
|
|
6917
6916
|
if (value !== condition.value) {
|
|
6918
|
-
if (value) update(index,
|
|
6919
|
-
else update(index,
|
|
6917
|
+
if (value) update(index, "value", value);
|
|
6918
|
+
else update(index, "value", "");
|
|
6920
6919
|
}
|
|
6921
6920
|
}, [
|
|
6922
6921
|
value
|
|
@@ -6940,7 +6939,7 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
6940
6939
|
onChange: (e)=>setOperator(e.target.value),
|
|
6941
6940
|
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"
|
|
6942
6941
|
}),
|
|
6943
|
-
schema[id].fields[property].mysql_type ===
|
|
6942
|
+
schema[id].fields[property].mysql_type === "date" ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6944
6943
|
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",
|
|
6945
6944
|
children: [
|
|
6946
6945
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
@@ -6990,19 +6989,19 @@ var $374c4669b044ddf8$export$2e2bcd8739ae039 = $374c4669b044ddf8$var$QueryRow;
|
|
|
6990
6989
|
function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
|
|
6991
6990
|
let cond = condition;
|
|
6992
6991
|
delete cond.key;
|
|
6993
|
-
if (cond.operator ===
|
|
6992
|
+
if (cond.operator === "=" || cond.operator === "<>") {
|
|
6994
6993
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
6995
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
6994
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
6996
6995
|
}
|
|
6997
|
-
if (cond.operator.toLowerCase() ===
|
|
6996
|
+
if (cond.operator.toLowerCase() === "like") {
|
|
6998
6997
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
6999
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
6998
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
7000
6999
|
cond.value = `%${cleanedValue}%`;
|
|
7001
7000
|
}
|
|
7002
|
-
if (cond.operator.toLowerCase() ===
|
|
7003
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
7001
|
+
if (cond.operator.toLowerCase() === "in") {
|
|
7002
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(",");
|
|
7004
7003
|
}
|
|
7005
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
7004
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
|
|
7006
7005
|
return cond;
|
|
7007
7006
|
}
|
|
7008
7007
|
const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, setOffset: setOffset })=>{
|
|
@@ -7022,7 +7021,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7022
7021
|
...queryConditions,
|
|
7023
7022
|
{
|
|
7024
7023
|
property: fields[0],
|
|
7025
|
-
value:
|
|
7024
|
+
value: "",
|
|
7026
7025
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
7027
7026
|
key: Date.now()
|
|
7028
7027
|
}
|
|
@@ -7062,7 +7061,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7062
7061
|
encodeValuesOnly: true,
|
|
7063
7062
|
addQueryPrefix: true
|
|
7064
7063
|
});
|
|
7065
|
-
window.history.pushState({},
|
|
7064
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
7066
7065
|
};
|
|
7067
7066
|
const updateCondition = (index, key, value)=>{
|
|
7068
7067
|
let newConditions = [
|
|
@@ -7135,7 +7134,7 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
|
|
|
7135
7134
|
|
|
7136
7135
|
|
|
7137
7136
|
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 })=>{
|
|
7138
|
-
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState(
|
|
7137
|
+
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState("ds-u-padding-y--1");
|
|
7139
7138
|
let apiDocs = (0, $hgUW1$useRef)();
|
|
7140
7139
|
let distribution = {};
|
|
7141
7140
|
let distribution_array = dataset.distribution ? dataset.distribution : [];
|
|
@@ -7147,7 +7146,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7147
7146
|
} : {
|
|
7148
7147
|
conditions: []
|
|
7149
7148
|
};
|
|
7150
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7149
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
7151
7150
|
...options,
|
|
7152
7151
|
limit: 25
|
|
7153
7152
|
});
|
|
@@ -7161,7 +7160,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7161
7160
|
}, {
|
|
7162
7161
|
encode: true
|
|
7163
7162
|
})}&format=csv`;
|
|
7164
|
-
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !==
|
|
7163
|
+
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !== "csv" ? distribution.data.title : dataset.title;
|
|
7165
7164
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
7166
7165
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7167
7166
|
className: "ds-l-container ds-u-padding-bottom--3 ds-u-margin-bottom--2",
|
|
@@ -7170,7 +7169,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7170
7169
|
children: Object.keys(distribution).length && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
7171
7170
|
children: [
|
|
7172
7171
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7173
|
-
className:
|
|
7172
|
+
className: "ds-l-md-col--9",
|
|
7174
7173
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
7175
7174
|
to: `/dataset/${id}`,
|
|
7176
7175
|
className: "ds-u-padding-y--4 ds-u-display--block",
|
|
@@ -7181,14 +7180,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7181
7180
|
})
|
|
7182
7181
|
}),
|
|
7183
7182
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7184
|
-
className:
|
|
7183
|
+
className: "ds-l-md-col--9",
|
|
7185
7184
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
7186
7185
|
className: "ds-text-heading--3xl",
|
|
7187
7186
|
children: customTitle ? customTitle : pageTitle
|
|
7188
7187
|
})
|
|
7189
7188
|
}),
|
|
7190
7189
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7191
|
-
className:
|
|
7190
|
+
className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
|
|
7192
7191
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
7193
7192
|
className: "ds-u-margin--0",
|
|
7194
7193
|
children: [
|
|
@@ -7200,7 +7199,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7200
7199
|
})
|
|
7201
7200
|
}),
|
|
7202
7201
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7203
|
-
className:
|
|
7202
|
+
className: "ds-l-md-col--9",
|
|
7204
7203
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
7205
7204
|
distribution: distribution,
|
|
7206
7205
|
dataset: dataset,
|
|
@@ -7210,13 +7209,13 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7210
7209
|
})
|
|
7211
7210
|
}),
|
|
7212
7211
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7213
|
-
className:
|
|
7212
|
+
className: "ds-l-md-col--12",
|
|
7214
7213
|
children: Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
|
|
7215
7214
|
resource: resource,
|
|
7216
7215
|
id: distribution.identifier,
|
|
7217
7216
|
customColumns: customColumns,
|
|
7218
7217
|
setOffset: resource.setOffset
|
|
7219
|
-
}) :
|
|
7218
|
+
}) : ""
|
|
7220
7219
|
}),
|
|
7221
7220
|
Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
7222
7221
|
value: {
|
|
@@ -7227,7 +7226,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7227
7226
|
customColumns: (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution_array[distIndex].identifier])
|
|
7228
7227
|
},
|
|
7229
7228
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7230
|
-
className:
|
|
7229
|
+
className: "ds-l-md-col--12",
|
|
7231
7230
|
children: [
|
|
7232
7231
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $af099c546cb226c7$export$2e2bcd8739ae039), {
|
|
7233
7232
|
includeDensity: true,
|
|
@@ -7249,14 +7248,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7249
7248
|
]
|
|
7250
7249
|
})
|
|
7251
7250
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7252
|
-
className:
|
|
7251
|
+
className: "ds-l-md-col--12",
|
|
7253
7252
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
7254
7253
|
role: "status",
|
|
7255
7254
|
"aria-valuetext": "Resource loading"
|
|
7256
7255
|
})
|
|
7257
7256
|
}),
|
|
7258
7257
|
dataset.identifier && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7259
|
-
className:
|
|
7258
|
+
className: "ds-l-md-col--12",
|
|
7260
7259
|
ref: apiDocs,
|
|
7261
7260
|
children: [
|
|
7262
7261
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
@@ -7265,7 +7264,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7265
7264
|
}),
|
|
7266
7265
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
7267
7266
|
url: `${rootUrl}/metastore/schemas/dataset/items/${dataset.identifier}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`,
|
|
7268
|
-
docExpansion:
|
|
7267
|
+
docExpansion: "list",
|
|
7269
7268
|
defaultModelsExpandDepth: -1
|
|
7270
7269
|
})
|
|
7271
7270
|
]
|
|
@@ -7284,7 +7283,7 @@ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, loca
|
|
|
7284
7283
|
const [ready, setReady] = (0, $hgUW1$useState)(false);
|
|
7285
7284
|
const [error, setError] = (0, $hgUW1$useState)(false);
|
|
7286
7285
|
const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
7287
|
-
const distIndex = dist_id ===
|
|
7286
|
+
const distIndex = dist_id === "data" ? 0 : dist_id;
|
|
7288
7287
|
(0, $hgUW1$useEffect)(()=>{
|
|
7289
7288
|
if (dataset.error) setError(true);
|
|
7290
7289
|
if (dataset.distribution && dataset.distribution.length) {
|