@civicactions/cmsds-open-data-components 4.0.13-alpha.3 → 4.0.13-alpha.6
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 +2 -8
- package/dist/main.css.map +1 -1
- package/dist/main.js +562 -562
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +44 -45
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -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), {
|
|
@@ -342,8 +342,8 @@ const $844981eac9b63865$export$eccc29c8d0ff408 = (0, $hgUW1$createContext)({
|
|
|
342
342
|
|
|
343
343
|
|
|
344
344
|
const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 4, defaultSort: defaultSort = {
|
|
345
|
-
defaultSort:
|
|
346
|
-
defaultOrder:
|
|
345
|
+
defaultSort: "modified",
|
|
346
|
+
defaultOrder: "desc"
|
|
347
347
|
}, subLinkClasses: subLinkClasses })=>{
|
|
348
348
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
349
349
|
const [currentResultNumbers, setCurrentResultNumbers] = (0, $hgUW1$useState)({
|
|
@@ -363,8 +363,8 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
|
|
|
363
363
|
]);
|
|
364
364
|
let params = {
|
|
365
365
|
sort: defaultSort.defaultSort,
|
|
366
|
-
[
|
|
367
|
-
[
|
|
366
|
+
["sort-order"]: defaultSort.defaultOrder,
|
|
367
|
+
["page-size"]: defaultPageSize
|
|
368
368
|
};
|
|
369
369
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
370
370
|
queryKey: [
|
|
@@ -373,7 +373,7 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
|
|
|
373
373
|
],
|
|
374
374
|
queryFn: ()=>{
|
|
375
375
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
376
|
-
arrayFormat:
|
|
376
|
+
arrayFormat: "comma",
|
|
377
377
|
encode: false
|
|
378
378
|
})}`);
|
|
379
379
|
}
|
|
@@ -522,11 +522,11 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
522
522
|
function handleFocusOut(event) {
|
|
523
523
|
if (currentMenu && !currentMenu.contains(event.relatedTarget)) setIsExpanded(false);
|
|
524
524
|
}
|
|
525
|
-
document.addEventListener(
|
|
526
|
-
currentMenu?.addEventListener(
|
|
525
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
526
|
+
currentMenu?.addEventListener("focusout", handleFocusOut);
|
|
527
527
|
return ()=>{
|
|
528
|
-
document.removeEventListener(
|
|
529
|
-
if (currentMenu) currentMenu.removeEventListener(
|
|
528
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
529
|
+
if (currentMenu) currentMenu.removeEventListener("focusout", handleFocusOut);
|
|
530
530
|
};
|
|
531
531
|
}, [
|
|
532
532
|
isExpanded
|
|
@@ -548,7 +548,7 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
551
|
-
className: `dkan-c-nav-submenu has-submenu${isExpanded ?
|
|
551
|
+
className: `dkan-c-nav-submenu has-submenu${isExpanded ? " open" : ""}`,
|
|
552
552
|
ref: menu,
|
|
553
553
|
children: [
|
|
554
554
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
@@ -584,12 +584,12 @@ var $4f153ca537d853e5$export$2e2bcd8739ae039 = $4f153ca537d853e5$var$SubMenu;
|
|
|
584
584
|
const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
|
|
585
585
|
const { headingText: headingText = "Dataset Search" } = props;
|
|
586
586
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
587
|
-
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)(
|
|
587
|
+
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)("");
|
|
588
588
|
const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
|
|
589
589
|
function searchForDataset(e) {
|
|
590
590
|
e.preventDefault();
|
|
591
591
|
if (window) {
|
|
592
|
-
if (window.location.pathname !==
|
|
592
|
+
if (window.location.pathname !== "/datasets") navigate(`/datasets?fulltext=${modalSearchTerm}`);
|
|
593
593
|
else {
|
|
594
594
|
window.location.search = `fulltext=${modalSearchTerm}`;
|
|
595
595
|
setModalSearch(false);
|
|
@@ -657,9 +657,9 @@ const $b939b31651e82908$var$HeaderNav = (props)=>{
|
|
|
657
657
|
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
658
658
|
const { links: links, topNavLinks: topNavLinks, wrapperClasses: wrapperClasses, searchInMobile: searchInMobile } = props;
|
|
659
659
|
const navMenuOpenClass = `dkan-c-nav-menu--${headerContext.mobileMenuOpen ? "open" : "close"}`;
|
|
660
|
-
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ?
|
|
661
|
-
const linkClasses =
|
|
662
|
-
const listClasses =
|
|
660
|
+
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ? "mobile" : "desktop"}`;
|
|
661
|
+
const linkClasses = "dkan-c-header--link ds-c-button ds-c-button--ghost";
|
|
662
|
+
const listClasses = "dkan-c-header--link-list ";
|
|
663
663
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
664
664
|
className: `dkan-c-nav-menu ${wrapperClasses} ${navMenuOpenClass} ${isMobileClass}`,
|
|
665
665
|
ref: headerContext.menuRef,
|
|
@@ -829,8 +829,8 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
829
829
|
const { title: title, links: links, mobileMax: mobileMax } = props;
|
|
830
830
|
const active = (0, $hgUW1$useLocation)().pathname;
|
|
831
831
|
const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
|
|
832
|
-
const styleClasses =
|
|
833
|
-
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ?
|
|
832
|
+
const styleClasses = "dkan-c--sidebar-nav-wrapper ds-u-border--1 ds-u-border--color-gray-lightest ds-u-padding--2";
|
|
833
|
+
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ? "mobile" : "desktop"}`;
|
|
834
834
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
835
835
|
className: `dkan-c-sidebar-nav ${mobileClass}`,
|
|
836
836
|
children: [
|
|
@@ -844,7 +844,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
844
844
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
845
845
|
"aria-haspopup": "true",
|
|
846
846
|
variation: "ghost",
|
|
847
|
-
"aria-expanded": `${menuOpen ?
|
|
847
|
+
"aria-expanded": `${menuOpen ? "true" : "false"}`,
|
|
848
848
|
onDark: true,
|
|
849
849
|
onClick: ()=>setMenuOpen(!menuOpen),
|
|
850
850
|
children: [
|
|
@@ -853,7 +853,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
853
853
|
children: "Toggle menu"
|
|
854
854
|
}),
|
|
855
855
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
|
|
856
|
-
direction: menuOpen ?
|
|
856
|
+
direction: menuOpen ? "up" : "down"
|
|
857
857
|
})
|
|
858
858
|
]
|
|
859
859
|
})
|
|
@@ -862,7 +862,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
862
862
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
863
863
|
className: ``,
|
|
864
864
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
|
|
865
|
-
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ?
|
|
865
|
+
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ? "open" : "close"}`,
|
|
866
866
|
children: [
|
|
867
867
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
868
868
|
className: "ds-u-padding--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest",
|
|
@@ -874,7 +874,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
874
874
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
875
875
|
className: "ds-u-padding-bottom--2",
|
|
876
876
|
children: links.map(({ url: url, label: label })=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
877
|
-
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ?
|
|
877
|
+
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ? "active" : ""}`,
|
|
878
878
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
879
879
|
className: "ds-u-display--flex ds-u-padding-y--1",
|
|
880
880
|
children: [
|
|
@@ -909,12 +909,12 @@ const $b0968edc60d7d3a4$var$SidebarPage = (props)=>{
|
|
|
909
909
|
query: `(max-width: ${mobileMaxWidth}px)`
|
|
910
910
|
});
|
|
911
911
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
912
|
-
className: `${mobileMax ? "a" :
|
|
912
|
+
className: `${mobileMax ? "a" : "ds-l-container"}`,
|
|
913
913
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
914
|
-
className: `${mobileMax ? "a" :
|
|
914
|
+
className: `${mobileMax ? "a" : "ds-l-row"}`,
|
|
915
915
|
children: [
|
|
916
916
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
917
|
-
className: `${mobileMax ?
|
|
917
|
+
className: `${mobileMax ? "a" : "ds-l-col--4"}`,
|
|
918
918
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $953b286f7778640e$export$2e2bcd8739ae039), {
|
|
919
919
|
links: links,
|
|
920
920
|
title: menuTitle,
|
|
@@ -937,9 +937,9 @@ var $b0968edc60d7d3a4$export$2e2bcd8739ae039 = $b0968edc60d7d3a4$var$SidebarPage
|
|
|
937
937
|
|
|
938
938
|
|
|
939
939
|
|
|
940
|
-
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl =
|
|
940
|
+
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl = "datasets", searchKey: searchKey = "fulltext", textfieldLabel: textfieldLabel = "Search for a dataset", searchButtonText: searchButtonText = "Search" })=>{
|
|
941
941
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
942
|
-
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState(
|
|
942
|
+
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState("");
|
|
943
943
|
function submitHero(e) {
|
|
944
944
|
e.preventDefault();
|
|
945
945
|
navigate(`/${searchUrl}?${searchKey}=${searchValue}`);
|
|
@@ -966,24 +966,24 @@ const $59a079354baa335c$var$Hero = ({ title: title, description: description, se
|
|
|
966
966
|
onSubmit: (e)=>submitHero(e),
|
|
967
967
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
968
968
|
style: {
|
|
969
|
-
position:
|
|
969
|
+
position: "relative"
|
|
970
970
|
},
|
|
971
971
|
className: "ds-l-row ds-u-align-items--stretch ds-u-margin-y--4 ds-u-flex-wrap--nowrap",
|
|
972
972
|
children: [
|
|
973
973
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
974
974
|
className: "ds-u-padding--0 ds-u-margin-right--1",
|
|
975
975
|
style: {
|
|
976
|
-
flex:
|
|
977
|
-
maxWidth:
|
|
976
|
+
flex: "1 1 100%",
|
|
977
|
+
maxWidth: "100%"
|
|
978
978
|
},
|
|
979
979
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
980
980
|
label: textfieldLabel,
|
|
981
981
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
982
982
|
name: "search_text_input",
|
|
983
983
|
style: {
|
|
984
|
-
maxWidth:
|
|
985
|
-
height:
|
|
986
|
-
margin:
|
|
984
|
+
maxWidth: "none",
|
|
985
|
+
height: "61px",
|
|
986
|
+
margin: "0 20px 0 0"
|
|
987
987
|
},
|
|
988
988
|
onChange: (e)=>setSearchValue(e.target.value)
|
|
989
989
|
})
|
|
@@ -1021,14 +1021,14 @@ var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
|
|
|
1021
1021
|
|
|
1022
1022
|
|
|
1023
1023
|
const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date, options: options = {
|
|
1024
|
-
year:
|
|
1025
|
-
month:
|
|
1026
|
-
day:
|
|
1027
|
-
timeZone:
|
|
1024
|
+
year: "numeric",
|
|
1025
|
+
month: "long",
|
|
1026
|
+
day: "numeric",
|
|
1027
|
+
timeZone: "UTC"
|
|
1028
1028
|
} })=>{
|
|
1029
1029
|
const rawDate = new Date(date);
|
|
1030
|
-
let modifiedDate =
|
|
1031
|
-
if (rawDate) modifiedDate = rawDate.toLocaleDateString(
|
|
1030
|
+
let modifiedDate = "";
|
|
1031
|
+
if (rawDate) modifiedDate = rawDate.toLocaleDateString("en-US", options);
|
|
1032
1032
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
1033
1033
|
children: modifiedDate
|
|
1034
1034
|
});
|
|
@@ -1042,25 +1042,25 @@ const $c068004d499082cc$var$DatasetListItem = (props)=>{
|
|
|
1042
1042
|
minWidth: 1024
|
|
1043
1043
|
});
|
|
1044
1044
|
const { title: title, modified: modified, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
|
|
1045
|
-
let linkContainerClasses =
|
|
1046
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1047
|
-
else linkContainerClasses +=
|
|
1048
|
-
let linkClasses =
|
|
1045
|
+
let linkContainerClasses = "ds-u-margin-bottom--2";
|
|
1046
|
+
if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
|
|
1047
|
+
else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
|
|
1048
|
+
let linkClasses = "ds-u-display--block ds-u-text-align--left";
|
|
1049
1049
|
if (desktop) {
|
|
1050
|
-
linkContainerClasses =
|
|
1051
|
-
linkClasses +=
|
|
1050
|
+
linkContainerClasses = "ds-u-padding-x--0";
|
|
1051
|
+
linkClasses += " ds-l-col--4 ds-l-md-col--auto";
|
|
1052
1052
|
}
|
|
1053
1053
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1054
1054
|
className: "dc-c-list-item ds-u-padding-top--4",
|
|
1055
1055
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1056
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1056
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
|
|
1057
1057
|
children: [
|
|
1058
1058
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1059
1059
|
className: "ds-l-row ds-u-align-items--start",
|
|
1060
1060
|
children: [
|
|
1061
1061
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1062
1062
|
id: `dataset-${identifier}-updated-date`,
|
|
1063
|
-
className: `ds-l-col--12 ds-u-text-align--left ds-text-heading--sm ${paginationEnabled ?
|
|
1063
|
+
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"}`,
|
|
1064
1064
|
children: [
|
|
1065
1065
|
"Updated ",
|
|
1066
1066
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
@@ -1118,7 +1118,7 @@ var $c068004d499082cc$export$2e2bcd8739ae039 = $c068004d499082cc$var$DatasetList
|
|
|
1118
1118
|
|
|
1119
1119
|
const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
1120
1120
|
switch(props.id){
|
|
1121
|
-
case
|
|
1121
|
+
case "overview":
|
|
1122
1122
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1123
1123
|
width: "16px",
|
|
1124
1124
|
height: "16px",
|
|
@@ -1161,7 +1161,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1161
1161
|
})
|
|
1162
1162
|
]
|
|
1163
1163
|
});
|
|
1164
|
-
case
|
|
1164
|
+
case "data-table":
|
|
1165
1165
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1166
1166
|
width: "16px",
|
|
1167
1167
|
height: "12px",
|
|
@@ -1194,7 +1194,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1194
1194
|
})
|
|
1195
1195
|
]
|
|
1196
1196
|
});
|
|
1197
|
-
case
|
|
1197
|
+
case "api":
|
|
1198
1198
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1199
1199
|
width: "16px",
|
|
1200
1200
|
height: "13px",
|
|
@@ -1227,7 +1227,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1227
1227
|
})
|
|
1228
1228
|
]
|
|
1229
1229
|
});
|
|
1230
|
-
case
|
|
1230
|
+
case "download":
|
|
1231
1231
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1232
1232
|
width: "16px",
|
|
1233
1233
|
height: "16px",
|
|
@@ -1257,7 +1257,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1257
1257
|
})
|
|
1258
1258
|
]
|
|
1259
1259
|
});
|
|
1260
|
-
case
|
|
1260
|
+
case "data-dictionary":
|
|
1261
1261
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1262
1262
|
width: "14px",
|
|
1263
1263
|
height: "16px",
|
|
@@ -1360,13 +1360,13 @@ var $b61856b23f5f58a2$export$2e2bcd8739ae039 = $b61856b23f5f58a2$var$LargeFileDi
|
|
|
1360
1360
|
|
|
1361
1361
|
|
|
1362
1362
|
function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240) {
|
|
1363
|
-
if (!textString) return
|
|
1363
|
+
if (!textString) return "";
|
|
1364
1364
|
let cleanedText = textString;
|
|
1365
|
-
if (cleanedText.split(
|
|
1366
|
-
if (cleanedText.split(
|
|
1365
|
+
if (cleanedText.split("</p>").length > 1) cleanedText = cleanedText.split("</p>")[0];
|
|
1366
|
+
if (cleanedText.split("<br/>").length > 1) cleanedText = cleanedText.split("<br/>")[0];
|
|
1367
1367
|
cleanedText = (0, $hgUW1$lodashtruncate)(cleanedText, {
|
|
1368
|
-
|
|
1369
|
-
|
|
1368
|
+
"length": textLength,
|
|
1369
|
+
"separator": " "
|
|
1370
1370
|
});
|
|
1371
1371
|
return (0, $hgUW1$dompurify).sanitize(cleanedText, {
|
|
1372
1372
|
ALLOWED_TAGS: []
|
|
@@ -1384,9 +1384,9 @@ function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240)
|
|
|
1384
1384
|
const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
1385
1385
|
const { type: type, date: date, boldLabel: boldLabel = false, displayTooltips: displayTooltips = true } = props;
|
|
1386
1386
|
const dateText = {
|
|
1387
|
-
modified:
|
|
1388
|
-
released:
|
|
1389
|
-
refresh:
|
|
1387
|
+
modified: "Last Modified",
|
|
1388
|
+
released: "Released",
|
|
1389
|
+
refresh: "Planned Update"
|
|
1390
1390
|
};
|
|
1391
1391
|
const tooltipContent = {
|
|
1392
1392
|
modified: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -1423,7 +1423,7 @@ const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
|
1423
1423
|
})
|
|
1424
1424
|
};
|
|
1425
1425
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1426
|
-
className: `dataset-date-item${boldLabel ?
|
|
1426
|
+
className: `dataset-date-item${boldLabel ? " bold-label" : ""}`,
|
|
1427
1427
|
children: [
|
|
1428
1428
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1429
1429
|
className: "dataset-data-item-label",
|
|
@@ -1493,7 +1493,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
1493
1493
|
if (dist && dist.data) {
|
|
1494
1494
|
if (dist.data.format) return dist.data.format.toLowerCase();
|
|
1495
1495
|
if (dist.data.mediaType) {
|
|
1496
|
-
const mediaType = dist.data.mediaType.split(
|
|
1496
|
+
const mediaType = dist.data.mediaType.split("/");
|
|
1497
1497
|
if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
|
|
1498
1498
|
}
|
|
1499
1499
|
if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
|
|
@@ -1503,7 +1503,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
1503
1503
|
}
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
1506
|
-
return
|
|
1506
|
+
return "";
|
|
1507
1507
|
}
|
|
1508
1508
|
|
|
1509
1509
|
|
|
@@ -1513,20 +1513,20 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1513
1513
|
});
|
|
1514
1514
|
const { title: title, modified: modified, description: description, downloadUrl: downloadUrl, largeFile: largeFile = false, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks, identifier: identifier, refresh: refresh, released: released, showDateDetails: showDateDetails = false, showTopics: showTopics = false, theme: theme, topicSlugs: topicSlugs, distribution: distribution } = props;
|
|
1515
1515
|
const location = (0, $hgUW1$useLocation)();
|
|
1516
|
-
let linkContainerClasses =
|
|
1517
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1518
|
-
else linkContainerClasses +=
|
|
1519
|
-
let linkClasses =
|
|
1516
|
+
let linkContainerClasses = "ds-u-margin-bottom--2";
|
|
1517
|
+
if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
|
|
1518
|
+
else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
|
|
1519
|
+
let linkClasses = "ds-u-display--block ds-u-text-align--left";
|
|
1520
1520
|
if (desktop) {
|
|
1521
|
-
linkContainerClasses =
|
|
1522
|
-
linkClasses +=
|
|
1521
|
+
linkContainerClasses = "ds-u-padding-x--0";
|
|
1522
|
+
linkClasses += " ds-l-col--4 ds-l-md-col--auto";
|
|
1523
1523
|
}
|
|
1524
1524
|
let themes;
|
|
1525
1525
|
if (theme && showTopics) themes = /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
1526
1526
|
className: "theme-list item-theme",
|
|
1527
1527
|
children: theme.map((topic, index)=>{
|
|
1528
|
-
const title = topic ||
|
|
1529
|
-
const prefix =
|
|
1528
|
+
const title = topic || "Unknown Topic";
|
|
1529
|
+
const prefix = "topics";
|
|
1530
1530
|
// Use the provided slug or fallback to a simple slug generation
|
|
1531
1531
|
const slug = topicSlugs?.[title];
|
|
1532
1532
|
const link = `/${prefix}/${slug}`;
|
|
@@ -1537,7 +1537,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1537
1537
|
state: {
|
|
1538
1538
|
fromUrl: location.pathname,
|
|
1539
1539
|
fromTitle: false,
|
|
1540
|
-
fromSearchList: location.pathname.includes(
|
|
1540
|
+
fromSearchList: location.pathname.includes("search")
|
|
1541
1541
|
},
|
|
1542
1542
|
children: title
|
|
1543
1543
|
})
|
|
@@ -1579,7 +1579,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1579
1579
|
};
|
|
1580
1580
|
const dataDictionaryExists = ()=>{
|
|
1581
1581
|
if (distribution && "data" in distribution) {
|
|
1582
|
-
if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType ===
|
|
1582
|
+
if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType === "application/vnd.tableschema+json";
|
|
1583
1583
|
}
|
|
1584
1584
|
return false;
|
|
1585
1585
|
};
|
|
@@ -1613,7 +1613,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1613
1613
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1614
1614
|
className: "dc-c-search-list-item ds-u-padding-top--3",
|
|
1615
1615
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1616
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1616
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
|
|
1617
1617
|
children: [
|
|
1618
1618
|
themes,
|
|
1619
1619
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
@@ -1621,7 +1621,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1621
1621
|
children: [
|
|
1622
1622
|
!showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1623
1623
|
id: `dataset-${identifier}-updated-date`,
|
|
1624
|
-
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ?
|
|
1624
|
+
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? "ds-u-padding-top--2" : "ds-u-padding-top--0"}`,
|
|
1625
1625
|
children: [
|
|
1626
1626
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1627
1627
|
children: "Updated:"
|
|
@@ -1650,13 +1650,13 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1650
1650
|
(0, $1a2bf34e2a8f6b80$export$59a943b34a82e690)(description),
|
|
1651
1651
|
description.length > 240 ? /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1652
1652
|
children: [
|
|
1653
|
-
|
|
1653
|
+
" ",
|
|
1654
1654
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1655
1655
|
to: `/dataset/${identifier}`,
|
|
1656
1656
|
children: "See more"
|
|
1657
1657
|
})
|
|
1658
1658
|
]
|
|
1659
|
-
}) :
|
|
1659
|
+
}) : ""
|
|
1660
1660
|
]
|
|
1661
1661
|
})
|
|
1662
1662
|
}),
|
|
@@ -1684,14 +1684,14 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1684
1684
|
"Download"
|
|
1685
1685
|
]
|
|
1686
1686
|
})
|
|
1687
|
-
}) :
|
|
1687
|
+
}) : "",
|
|
1688
1688
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("ul", {
|
|
1689
|
-
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 ?
|
|
1689
|
+
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" : ""}`,
|
|
1690
1690
|
children: [
|
|
1691
1691
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1692
1692
|
className: linkContainerClasses,
|
|
1693
1693
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1694
|
-
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ?
|
|
1694
|
+
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? "" : " dkan-disabled-link-wrapper"}`,
|
|
1695
1695
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataTableLink, {})
|
|
1696
1696
|
})
|
|
1697
1697
|
}),
|
|
@@ -1713,10 +1713,10 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1713
1713
|
dataDictionaryLinks ? /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1714
1714
|
className: linkContainerClasses,
|
|
1715
1715
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1716
|
-
className: `${linkClasses}${dataDictionaryExists() ?
|
|
1716
|
+
className: `${linkClasses}${dataDictionaryExists() ? "" : " dkan-disabled-link-wrapper"}`,
|
|
1717
1717
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataDictionaryLink, {})
|
|
1718
1718
|
})
|
|
1719
|
-
}) :
|
|
1719
|
+
}) : "",
|
|
1720
1720
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1721
1721
|
className: linkContainerClasses,
|
|
1722
1722
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -1812,7 +1812,7 @@ var $789279954d8eff7f$export$2e2bcd8739ae039 = $789279954d8eff7f$var$ApiDocument
|
|
|
1812
1812
|
|
|
1813
1813
|
|
|
1814
1814
|
|
|
1815
|
-
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className =
|
|
1815
|
+
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className = "data-table-results" })=>{
|
|
1816
1816
|
const numTotalRows = totalRows;
|
|
1817
1817
|
if (numTotalRows === 0) return /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1818
1818
|
className: className,
|
|
@@ -1830,18 +1830,18 @@ const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limi
|
|
|
1830
1830
|
className: className,
|
|
1831
1831
|
children: [
|
|
1832
1832
|
"Displaying",
|
|
1833
|
-
|
|
1833
|
+
" ",
|
|
1834
1834
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1835
1835
|
className: "ds-u-font-weight--bold",
|
|
1836
1836
|
children: `${startTotal().toLocaleString()} - ${ofTotal().toLocaleString()}`
|
|
1837
1837
|
}),
|
|
1838
|
-
|
|
1838
|
+
" ",
|
|
1839
1839
|
"of ",
|
|
1840
1840
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1841
1841
|
className: "ds-u-font-weight--bold",
|
|
1842
1842
|
children: `${numTotalRows.toLocaleString()}`
|
|
1843
1843
|
}),
|
|
1844
|
-
|
|
1844
|
+
" ",
|
|
1845
1845
|
"rows"
|
|
1846
1846
|
]
|
|
1847
1847
|
});
|
|
@@ -1867,16 +1867,16 @@ const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePaddi
|
|
|
1867
1867
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
1868
1868
|
options: [
|
|
1869
1869
|
{
|
|
1870
|
-
label:
|
|
1871
|
-
value:
|
|
1870
|
+
label: "Tight",
|
|
1871
|
+
value: "ds-u-padding-y--0"
|
|
1872
1872
|
},
|
|
1873
1873
|
{
|
|
1874
|
-
label:
|
|
1875
|
-
value:
|
|
1874
|
+
label: "Normal",
|
|
1875
|
+
value: "ds-u-padding-y--1"
|
|
1876
1876
|
},
|
|
1877
1877
|
{
|
|
1878
|
-
label:
|
|
1879
|
-
value:
|
|
1878
|
+
label: "Expanded",
|
|
1879
|
+
value: "ds-u-padding-y--2"
|
|
1880
1880
|
}
|
|
1881
1881
|
],
|
|
1882
1882
|
label: "Display density:",
|
|
@@ -2119,7 +2119,7 @@ function $aa4450dcbeef3ac0$export$385a5aba38cc3325(sortArray) {
|
|
|
2119
2119
|
sortArray.forEach((s)=>{
|
|
2120
2120
|
return newQuery.push({
|
|
2121
2121
|
property: s.id,
|
|
2122
|
-
order: s.desc ?
|
|
2122
|
+
order: s.desc ? "desc" : "asc"
|
|
2123
2123
|
});
|
|
2124
2124
|
});
|
|
2125
2125
|
return newQuery;
|
|
@@ -2157,46 +2157,46 @@ function $7264a673914aa746$export$e284ae5d89467c8f(date) {
|
|
|
2157
2157
|
}
|
|
2158
2158
|
function $7264a673914aa746$export$6b5e57d20078142b(value, operator) {
|
|
2159
2159
|
let newValue = value;
|
|
2160
|
-
if (Array.isArray(newValue)) newValue = newValue.join(
|
|
2160
|
+
if (Array.isArray(newValue)) newValue = newValue.join(",");
|
|
2161
2161
|
// return newValue.replace(/(^\%+|\%+$)/gm, '');
|
|
2162
2162
|
return newValue;
|
|
2163
2163
|
}
|
|
2164
2164
|
const $7264a673914aa746$export$5f89a5ae87bc48e1 = [
|
|
2165
2165
|
{
|
|
2166
|
-
label:
|
|
2167
|
-
value:
|
|
2166
|
+
label: "Is",
|
|
2167
|
+
value: "="
|
|
2168
2168
|
},
|
|
2169
2169
|
{
|
|
2170
|
-
label:
|
|
2171
|
-
value:
|
|
2170
|
+
label: "Starts With",
|
|
2171
|
+
value: "starts with"
|
|
2172
2172
|
},
|
|
2173
2173
|
{
|
|
2174
|
-
label:
|
|
2175
|
-
value:
|
|
2174
|
+
label: "Contains",
|
|
2175
|
+
value: "contains"
|
|
2176
2176
|
},
|
|
2177
2177
|
{
|
|
2178
|
-
label:
|
|
2179
|
-
value:
|
|
2178
|
+
label: "Is Not",
|
|
2179
|
+
value: "<>"
|
|
2180
2180
|
},
|
|
2181
2181
|
{
|
|
2182
|
-
label:
|
|
2183
|
-
value:
|
|
2182
|
+
label: "Or",
|
|
2183
|
+
value: "in"
|
|
2184
2184
|
},
|
|
2185
2185
|
{
|
|
2186
|
-
label:
|
|
2187
|
-
value:
|
|
2186
|
+
label: "Is",
|
|
2187
|
+
value: "="
|
|
2188
2188
|
},
|
|
2189
2189
|
{
|
|
2190
|
-
label:
|
|
2191
|
-
value:
|
|
2190
|
+
label: "Is Not",
|
|
2191
|
+
value: "<>"
|
|
2192
2192
|
},
|
|
2193
2193
|
{
|
|
2194
|
-
label:
|
|
2195
|
-
value:
|
|
2194
|
+
label: "Greater Than",
|
|
2195
|
+
value: ">"
|
|
2196
2196
|
},
|
|
2197
2197
|
{
|
|
2198
|
-
label:
|
|
2199
|
-
value:
|
|
2198
|
+
label: "Less Than",
|
|
2199
|
+
value: "<"
|
|
2200
2200
|
}
|
|
2201
2201
|
];
|
|
2202
2202
|
function $7264a673914aa746$export$d243819c3ad678fb(operatorValue) {
|
|
@@ -2205,59 +2205,59 @@ function $7264a673914aa746$export$d243819c3ad678fb(operatorValue) {
|
|
|
2205
2205
|
}
|
|
2206
2206
|
function $7264a673914aa746$export$2b9377795161999(type) {
|
|
2207
2207
|
switch(type){
|
|
2208
|
-
case
|
|
2209
|
-
case
|
|
2208
|
+
case "text":
|
|
2209
|
+
case "string":
|
|
2210
2210
|
return [
|
|
2211
2211
|
{
|
|
2212
|
-
label:
|
|
2213
|
-
value:
|
|
2212
|
+
label: "Is",
|
|
2213
|
+
value: "="
|
|
2214
2214
|
},
|
|
2215
2215
|
{
|
|
2216
|
-
label:
|
|
2217
|
-
value:
|
|
2216
|
+
label: "Starts With",
|
|
2217
|
+
value: "starts with"
|
|
2218
2218
|
},
|
|
2219
2219
|
{
|
|
2220
|
-
label:
|
|
2221
|
-
value:
|
|
2220
|
+
label: "Contains",
|
|
2221
|
+
value: "contains"
|
|
2222
2222
|
},
|
|
2223
2223
|
{
|
|
2224
|
-
label:
|
|
2225
|
-
value:
|
|
2224
|
+
label: "Is Not",
|
|
2225
|
+
value: "<>"
|
|
2226
2226
|
},
|
|
2227
2227
|
{
|
|
2228
|
-
label:
|
|
2229
|
-
value:
|
|
2228
|
+
label: "Or",
|
|
2229
|
+
value: "in"
|
|
2230
2230
|
}
|
|
2231
2231
|
];
|
|
2232
|
-
case
|
|
2232
|
+
case "date":
|
|
2233
2233
|
return [
|
|
2234
2234
|
{
|
|
2235
|
-
label:
|
|
2236
|
-
value:
|
|
2235
|
+
label: "Is",
|
|
2236
|
+
value: "="
|
|
2237
2237
|
},
|
|
2238
2238
|
{
|
|
2239
|
-
label:
|
|
2240
|
-
value:
|
|
2239
|
+
label: "Is Not",
|
|
2240
|
+
value: "<>"
|
|
2241
2241
|
},
|
|
2242
2242
|
{
|
|
2243
|
-
label:
|
|
2244
|
-
value:
|
|
2243
|
+
label: "Greater Than",
|
|
2244
|
+
value: ">"
|
|
2245
2245
|
},
|
|
2246
2246
|
{
|
|
2247
|
-
label:
|
|
2248
|
-
value:
|
|
2247
|
+
label: "Less Than",
|
|
2248
|
+
value: "<"
|
|
2249
2249
|
}
|
|
2250
2250
|
];
|
|
2251
2251
|
default:
|
|
2252
2252
|
// These 2 should be safe for all data types
|
|
2253
2253
|
return [
|
|
2254
2254
|
{
|
|
2255
|
-
label:
|
|
2256
|
-
value:
|
|
2255
|
+
label: "Is",
|
|
2256
|
+
value: "="
|
|
2257
2257
|
},
|
|
2258
2258
|
{
|
|
2259
|
-
label:
|
|
2260
|
-
value:
|
|
2259
|
+
label: "Is Not",
|
|
2260
|
+
value: "<>"
|
|
2261
2261
|
}
|
|
2262
2262
|
];
|
|
2263
2263
|
}
|
|
@@ -2274,7 +2274,7 @@ function $7264a673914aa746$export$2b9377795161999(type) {
|
|
|
2274
2274
|
|
|
2275
2275
|
|
|
2276
2276
|
const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: header, sortElement: sortElement, setAriaLiveFeedback: setAriaLiveFeedback, id: id })=>{
|
|
2277
|
-
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)(
|
|
2277
|
+
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)("");
|
|
2278
2278
|
// Fix for JSX in Data Dictionary Title header cell
|
|
2279
2279
|
const ariaLabel = header.id === "titleResizable" ? "Title" : header.column.columnDef.header;
|
|
2280
2280
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("th", {
|
|
@@ -2283,9 +2283,9 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2283
2283
|
width: header.getSize()
|
|
2284
2284
|
},
|
|
2285
2285
|
id: id,
|
|
2286
|
-
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header :
|
|
2286
|
+
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : "",
|
|
2287
2287
|
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
|
|
2288
|
-
"aria-sort": header.column.getIsSorted() ===
|
|
2288
|
+
"aria-sort": header.column.getIsSorted() === "asc" ? "ascending" : header.column.getIsSorted() === "desc" ? "descending" : "none",
|
|
2289
2289
|
children: [
|
|
2290
2290
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2291
2291
|
className: "ds-u-display--flex",
|
|
@@ -2297,7 +2297,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2297
2297
|
}),
|
|
2298
2298
|
sortElement && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2299
2299
|
onClick: header.column.getToggleSortingHandler(),
|
|
2300
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
2300
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : "",
|
|
2301
2301
|
"aria-label": `${ariaLabel} sort order`
|
|
2302
2302
|
})
|
|
2303
2303
|
]
|
|
@@ -2305,18 +2305,18 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2305
2305
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2306
2306
|
onMouseDown: header.getResizeHandler(),
|
|
2307
2307
|
onTouchStart: header.getResizeHandler(),
|
|
2308
|
-
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ?
|
|
2308
|
+
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ? "isResizing" : ""}`,
|
|
2309
2309
|
"aria-label": `Resize ${ariaLabel} column`,
|
|
2310
2310
|
onKeyDown: (e)=>{
|
|
2311
2311
|
const columnSizingObject = table.getState().columnSizing;
|
|
2312
2312
|
switch(e.key){
|
|
2313
|
-
case
|
|
2314
|
-
case
|
|
2313
|
+
case "Enter":
|
|
2314
|
+
case " ":
|
|
2315
2315
|
e.preventDefault();
|
|
2316
2316
|
e.stopPropagation();
|
|
2317
2317
|
if (columnResizing) {
|
|
2318
2318
|
// end resizing
|
|
2319
|
-
setColumnResizing(
|
|
2319
|
+
setColumnResizing("");
|
|
2320
2320
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2321
2321
|
} else {
|
|
2322
2322
|
// start resizing
|
|
@@ -2324,13 +2324,13 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2324
2324
|
setAriaLiveFeedback(`${header.column.columnDef.header} grabbed.`);
|
|
2325
2325
|
}
|
|
2326
2326
|
break;
|
|
2327
|
-
case
|
|
2327
|
+
case "Escape":
|
|
2328
2328
|
if (columnResizing) {
|
|
2329
|
-
setColumnResizing(
|
|
2329
|
+
setColumnResizing("");
|
|
2330
2330
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2331
2331
|
}
|
|
2332
2332
|
break;
|
|
2333
|
-
case
|
|
2333
|
+
case "ArrowRight":
|
|
2334
2334
|
e.preventDefault();
|
|
2335
2335
|
e.stopPropagation();
|
|
2336
2336
|
if (columnResizing) {
|
|
@@ -2339,7 +2339,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2339
2339
|
setAriaLiveFeedback(`${header.column.columnDef.header} has been resized. The new width is ${header.getSize()} pixels.`);
|
|
2340
2340
|
}
|
|
2341
2341
|
break;
|
|
2342
|
-
case
|
|
2342
|
+
case "ArrowLeft":
|
|
2343
2343
|
e.preventDefault();
|
|
2344
2344
|
e.stopPropagation();
|
|
2345
2345
|
if (columnResizing) {
|
|
@@ -2351,7 +2351,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2351
2351
|
}
|
|
2352
2352
|
},
|
|
2353
2353
|
onBlur: ()=>{
|
|
2354
|
-
setColumnResizing(
|
|
2354
|
+
setColumnResizing("");
|
|
2355
2355
|
}
|
|
2356
2356
|
})
|
|
2357
2357
|
]
|
|
@@ -2392,7 +2392,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2392
2392
|
},
|
|
2393
2393
|
title: header.column.columnDef.header,
|
|
2394
2394
|
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
|
|
2395
|
-
"aria-sort": header.column.getIsSorted() ===
|
|
2395
|
+
"aria-sort": header.column.getIsSorted() === "asc" ? "ascending" : header.column.getIsSorted() === "desc" ? "descending" : "none",
|
|
2396
2396
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2397
2397
|
onClick: header.column.getToggleSortingHandler(),
|
|
2398
2398
|
className: "ds-u-display--flex",
|
|
@@ -2401,7 +2401,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2401
2401
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
2402
2402
|
}),
|
|
2403
2403
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2404
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` :
|
|
2404
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` : ""
|
|
2405
2405
|
})
|
|
2406
2406
|
]
|
|
2407
2407
|
})
|
|
@@ -2432,7 +2432,7 @@ const $ee0d4d4f34048447$var$DataTableActionsContextDefaults = {
|
|
|
2432
2432
|
setColumnVisibility: ()=>{},
|
|
2433
2433
|
page: 1,
|
|
2434
2434
|
setPage: ()=>{},
|
|
2435
|
-
tableDensity:
|
|
2435
|
+
tableDensity: "normal",
|
|
2436
2436
|
setTableDensity: ()=>{}
|
|
2437
2437
|
};
|
|
2438
2438
|
const $ee0d4d4f34048447$export$f814ea079e65d8fe = /*#__PURE__*/ (0, $hgUW1$createContext)($ee0d4d4f34048447$var$DataTableActionsContextDefaults);
|
|
@@ -2451,7 +2451,7 @@ const $ee0d4d4f34048447$var$DataTableActionsProvider = ({ children: children })=
|
|
|
2451
2451
|
if (datasetTableControls && localStorageData) return localStorageData.tableColumnVisibility;
|
|
2452
2452
|
else return {};
|
|
2453
2453
|
});
|
|
2454
|
-
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)(
|
|
2454
|
+
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)("normal");
|
|
2455
2455
|
const providerValue = {
|
|
2456
2456
|
columnOrder: columnOrder,
|
|
2457
2457
|
setColumnOrder: setColumnOrder,
|
|
@@ -2498,9 +2498,9 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2498
2498
|
transition: transition,
|
|
2499
2499
|
opacity: isDragging ? 0.7 : 1,
|
|
2500
2500
|
zIndex: isDragging ? 1 : 0,
|
|
2501
|
-
position:
|
|
2502
|
-
background:
|
|
2503
|
-
touchAction:
|
|
2501
|
+
position: "relative",
|
|
2502
|
+
background: "white",
|
|
2503
|
+
touchAction: "none"
|
|
2504
2504
|
};
|
|
2505
2505
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
2506
2506
|
className: "ds-u-display--flex ds-u-justify-content--between ds-u-border-bottom--1",
|
|
@@ -2516,7 +2516,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2516
2516
|
// this code forces the repaint without user interaction
|
|
2517
2517
|
const target = e.target;
|
|
2518
2518
|
if (isDragging && target.tagName.toLowerCase() === "label") setTimeout(()=>{
|
|
2519
|
-
target.parentNode.querySelector(
|
|
2519
|
+
target.parentNode.querySelector("input").checked = visible;
|
|
2520
2520
|
}, 1);
|
|
2521
2521
|
},
|
|
2522
2522
|
children: [
|
|
@@ -2533,7 +2533,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2533
2533
|
}
|
|
2534
2534
|
}),
|
|
2535
2535
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2536
|
-
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging &&
|
|
2536
|
+
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && "grabbed"}`,
|
|
2537
2537
|
"aria-label": `Reorder ${id} column`,
|
|
2538
2538
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2539
2539
|
className: "fa fa-sort"
|
|
@@ -2551,7 +2551,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor extends (0, $hgUW1$Key
|
|
|
2551
2551
|
// Custom function to exclude checkbox from keyboard dragging
|
|
2552
2552
|
static activators = [
|
|
2553
2553
|
{
|
|
2554
|
-
eventName:
|
|
2554
|
+
eventName: "onKeyDown",
|
|
2555
2555
|
handler: ({ nativeEvent: event })=>{
|
|
2556
2556
|
// prevent scrolling the list
|
|
2557
2557
|
const isCheckbox = [
|
|
@@ -2574,7 +2574,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$Poin
|
|
|
2574
2574
|
// Custom function to stop accidental checkbox clicks on pointer activation
|
|
2575
2575
|
static activators = [
|
|
2576
2576
|
{
|
|
2577
|
-
eventName:
|
|
2577
|
+
eventName: "onPointerDown",
|
|
2578
2578
|
handler: ({ nativeEvent: event })=>{
|
|
2579
2579
|
if (event.target.tagName.toLowerCase() === "input") return false;
|
|
2580
2580
|
if (event.target.tagName.toLowerCase() === "label") event.target.blur();
|
|
@@ -2672,13 +2672,13 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
2672
2672
|
className: "dkan-dataset-toolbar-button-label",
|
|
2673
2673
|
children: "Manage Columns"
|
|
2674
2674
|
}),
|
|
2675
|
-
hiddenColumns ? ` (${hiddenColumns})` :
|
|
2675
|
+
hiddenColumns ? ` (${hiddenColumns})` : ""
|
|
2676
2676
|
]
|
|
2677
2677
|
})
|
|
2678
2678
|
]
|
|
2679
2679
|
}),
|
|
2680
2680
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2681
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2681
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
2682
2682
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
|
|
2683
2683
|
heading: "Manage columns",
|
|
2684
2684
|
isOpen: modalOpen,
|
|
@@ -2851,12 +2851,12 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
2851
2851
|
if (Object.keys(resource).length && columns.length && resource.schema && Object.keys(distribution).length) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
2852
2852
|
children: [
|
|
2853
2853
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2854
|
-
className: isModal ?
|
|
2854
|
+
className: isModal ? "dkan-datatable-fullscreen-mode" : "",
|
|
2855
2855
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
|
|
2856
2856
|
canResize: true,
|
|
2857
2857
|
columns: columns,
|
|
2858
2858
|
sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
|
|
2859
|
-
tablePadding: tableDensity ===
|
|
2859
|
+
tablePadding: tableDensity === "normal" ? "ds-u-padding-y--2" : tableDensity === "compact" ? "ds-u-padding-y--1" : "ds-u-padding-y--3",
|
|
2860
2860
|
loading: resource.loading,
|
|
2861
2861
|
isModal: isModal,
|
|
2862
2862
|
downloadURL: downloadURL,
|
|
@@ -2871,14 +2871,14 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
2871
2871
|
}),
|
|
2872
2872
|
!resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2873
2873
|
className: [
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
isModal &&
|
|
2881
|
-
].filter(Boolean).join(
|
|
2874
|
+
"ds-u-display--flex",
|
|
2875
|
+
"ds-u-flex-wrap--wrap",
|
|
2876
|
+
"ds-u-justify-content--end",
|
|
2877
|
+
"ds-u-md-justify-content--between",
|
|
2878
|
+
"ds-u-margin-top--2",
|
|
2879
|
+
"ds-u-align-items--center",
|
|
2880
|
+
isModal && "ds-u-margin-bottom--2"
|
|
2881
|
+
].filter(Boolean).join(" "),
|
|
2882
2882
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
2883
2883
|
totalPages: Math.ceil(resource.count ? resource.count / pageSize : 1),
|
|
2884
2884
|
currentPage: Number(page),
|
|
@@ -2917,7 +2917,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
2917
2917
|
},
|
|
2918
2918
|
children: [
|
|
2919
2919
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2920
|
-
className: `far ${modalOpen ?
|
|
2920
|
+
className: `far ${modalOpen ? "fa-compress" : "fa-expand"} ds-u-margin-right--1`
|
|
2921
2921
|
}),
|
|
2922
2922
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2923
2923
|
className: "dkan-dataset-toolbar-button-label",
|
|
@@ -2926,7 +2926,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
2926
2926
|
]
|
|
2927
2927
|
}),
|
|
2928
2928
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2929
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2929
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
2930
2930
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
2931
2931
|
heading: "Dataset Explorer",
|
|
2932
2932
|
isOpen: modalOpen,
|
|
@@ -2961,13 +2961,13 @@ var $16bd41951b91f02d$export$2e2bcd8739ae039 = $16bd41951b91f02d$var$FullScreenD
|
|
|
2961
2961
|
|
|
2962
2962
|
|
|
2963
2963
|
function $eadd6431fddf4b6c$var$getStartDate(condition, schema, id) {
|
|
2964
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2964
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
2965
2965
|
const newDate = new Date(condition.value.toString());
|
|
2966
2966
|
if (newDate instanceof Date && !isNaN(newDate.getTime())) return newDate;
|
|
2967
2967
|
}
|
|
2968
2968
|
return new Date();
|
|
2969
2969
|
}
|
|
2970
|
-
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className =
|
|
2970
|
+
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className = "" })=>{
|
|
2971
2971
|
const [operator, setOperator] = (0, $hgUW1$useState)(condition.operator);
|
|
2972
2972
|
const [property, setProperty] = (0, $hgUW1$useState)(condition.property);
|
|
2973
2973
|
const [value, setValue] = (0, $hgUW1$useState)(condition.value);
|
|
@@ -2977,9 +2977,9 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
2977
2977
|
});
|
|
2978
2978
|
(0, $hgUW1$useEffect)(()=>{
|
|
2979
2979
|
if (property !== condition.property) {
|
|
2980
|
-
if (property) update(index,
|
|
2981
|
-
else update(index,
|
|
2982
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2980
|
+
if (property) update(index, "property", property);
|
|
2981
|
+
else update(index, "property", "");
|
|
2982
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
2983
2983
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
2984
2984
|
}
|
|
2985
2985
|
}
|
|
@@ -2993,22 +2993,22 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
2993
2993
|
]);
|
|
2994
2994
|
(0, $hgUW1$useEffect)(()=>{
|
|
2995
2995
|
if (operator !== condition.operator) {
|
|
2996
|
-
if (operator) update(index,
|
|
2997
|
-
else update(index,
|
|
2996
|
+
if (operator) update(index, "operator", operator);
|
|
2997
|
+
else update(index, "operator", "");
|
|
2998
2998
|
}
|
|
2999
2999
|
}, [
|
|
3000
3000
|
operator
|
|
3001
3001
|
]);
|
|
3002
3002
|
(0, $hgUW1$useEffect)(()=>{
|
|
3003
3003
|
if (value !== condition.value) {
|
|
3004
|
-
if (value) update(index,
|
|
3005
|
-
else update(index,
|
|
3004
|
+
if (value) update(index, "value", value);
|
|
3005
|
+
else update(index, "value", "");
|
|
3006
3006
|
}
|
|
3007
3007
|
}, [
|
|
3008
3008
|
value
|
|
3009
3009
|
]);
|
|
3010
3010
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("fieldset", {
|
|
3011
|
-
className: `dkan-filter-dataset-control ds-u-padding-x--2 ds-u-md-padding-x--3 ds-u-padding-y--1 ds-u-margin-top--05${className !==
|
|
3011
|
+
className: `dkan-filter-dataset-control ds-u-padding-x--2 ds-u-md-padding-x--3 ds-u-padding-y--1 ds-u-margin-top--05${className !== "" ? ` ${className}` : ""}`,
|
|
3012
3012
|
children: [
|
|
3013
3013
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
3014
3014
|
options: propertyOptions,
|
|
@@ -3026,7 +3026,7 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
3026
3026
|
name: `${condition.key}_operator`,
|
|
3027
3027
|
onChange: (e)=>setOperator(e.target.value)
|
|
3028
3028
|
}),
|
|
3029
|
-
schema[id].fields[property].mysql_type ===
|
|
3029
|
+
schema[id].fields[property].mysql_type === "date" ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
3030
3030
|
children: [
|
|
3031
3031
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
3032
3032
|
className: "ds-c-label",
|
|
@@ -3079,15 +3079,15 @@ var $eadd6431fddf4b6c$export$2e2bcd8739ae039 = $eadd6431fddf4b6c$var$FilterItem;
|
|
|
3079
3079
|
|
|
3080
3080
|
|
|
3081
3081
|
|
|
3082
|
-
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className =
|
|
3082
|
+
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className = "" })=>{
|
|
3083
3083
|
const small = (0, $hgUW1$useMediaQuery)({
|
|
3084
3084
|
minWidth: 0,
|
|
3085
3085
|
maxWidth: 544
|
|
3086
3086
|
});
|
|
3087
3087
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
3088
3088
|
disabled: disabled,
|
|
3089
|
-
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ?
|
|
3090
|
-
variation: small ?
|
|
3089
|
+
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ? "" : " ds-u-float--right ds-l-md-col--6 ds-l-col--5"}${className !== "" ? ` ${className}` : ""}`,
|
|
3090
|
+
variation: small ? "ghost" : undefined,
|
|
3091
3091
|
onClick: ()=>clearFiltersFn(),
|
|
3092
3092
|
children: "Reset"
|
|
3093
3093
|
});
|
|
@@ -3099,19 +3099,19 @@ var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFilter
|
|
|
3099
3099
|
function $6f4318b1e14124e5$var$updateQueryForDatastore(condition) {
|
|
3100
3100
|
let cond = condition;
|
|
3101
3101
|
delete cond.key;
|
|
3102
|
-
if (cond.operator ===
|
|
3102
|
+
if (cond.operator === "=" || cond.operator === "<>") {
|
|
3103
3103
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3104
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3104
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
3105
3105
|
}
|
|
3106
|
-
if (cond.operator.toLowerCase() ===
|
|
3106
|
+
if (cond.operator.toLowerCase() === "like") {
|
|
3107
3107
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3108
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3108
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
3109
3109
|
cond.value = `%${cleanedValue}%`;
|
|
3110
3110
|
}
|
|
3111
|
-
if (cond.operator.toLowerCase() ===
|
|
3112
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
3111
|
+
if (cond.operator.toLowerCase() === "in") {
|
|
3112
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(",");
|
|
3113
3113
|
}
|
|
3114
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
3114
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
|
|
3115
3115
|
return cond;
|
|
3116
3116
|
}
|
|
3117
3117
|
const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
@@ -3137,7 +3137,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3137
3137
|
} else setQueryConditions([
|
|
3138
3138
|
{
|
|
3139
3139
|
property: fields[0],
|
|
3140
|
-
value:
|
|
3140
|
+
value: "",
|
|
3141
3141
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3142
3142
|
key: Date.now().toString()
|
|
3143
3143
|
}
|
|
@@ -3154,7 +3154,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3154
3154
|
...queryConditions,
|
|
3155
3155
|
{
|
|
3156
3156
|
property: fields[0],
|
|
3157
|
-
value:
|
|
3157
|
+
value: "",
|
|
3158
3158
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3159
3159
|
key: Date.now().toString()
|
|
3160
3160
|
}
|
|
@@ -3185,7 +3185,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3185
3185
|
encodeValuesOnly: true,
|
|
3186
3186
|
addQueryPrefix: true
|
|
3187
3187
|
});
|
|
3188
|
-
window.history.pushState({},
|
|
3188
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
3189
3189
|
};
|
|
3190
3190
|
const submitConditions = ()=>{
|
|
3191
3191
|
// only update the data conditions when "Apply filters" is pressed
|
|
@@ -3259,7 +3259,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3259
3259
|
children: [
|
|
3260
3260
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3261
3261
|
className: "dkan-dataset-toolbar-button-label",
|
|
3262
|
-
children: conditions.length > 0 ? `Edit Filters` :
|
|
3262
|
+
children: conditions.length > 0 ? `Edit Filters` : "Filter Dataset"
|
|
3263
3263
|
}),
|
|
3264
3264
|
conditions.length > 0 && ` (${conditions.length})`
|
|
3265
3265
|
]
|
|
@@ -3267,7 +3267,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3267
3267
|
]
|
|
3268
3268
|
}),
|
|
3269
3269
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3270
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
3270
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
3271
3271
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
3272
3272
|
heading: "Filter Dataset",
|
|
3273
3273
|
isOpen: modalOpen,
|
|
@@ -3293,7 +3293,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3293
3293
|
className: "dkan-apply-dataset-filters-button ds-u-float--right ds-l-md-col--auto ds-l-col--auto",
|
|
3294
3294
|
onClick: submitConditions,
|
|
3295
3295
|
variation: "solid",
|
|
3296
|
-
children: `Apply ${conditionsReadyToSubmit(queryConditions).length ||
|
|
3296
|
+
children: `Apply ${conditionsReadyToSubmit(queryConditions).length || ""} filter${conditionsReadyToSubmit(queryConditions).length === 1 ? "" : "s"}`
|
|
3297
3297
|
})
|
|
3298
3298
|
]
|
|
3299
3299
|
})
|
|
@@ -3432,9 +3432,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3432
3432
|
className: "ds-u-display--flex ds-u-align-items--start",
|
|
3433
3433
|
children: [
|
|
3434
3434
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3435
|
-
onClick: ()=>setTableDensity(
|
|
3435
|
+
onClick: ()=>setTableDensity("expanded"),
|
|
3436
3436
|
"aria-label": "Row height, Expanded",
|
|
3437
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3437
|
+
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === "expanded" ? "active ds-u-fill--primary-lightest" : ""}`,
|
|
3438
3438
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3439
3439
|
className: "ds-u-display--block",
|
|
3440
3440
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3453,9 +3453,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3453
3453
|
})
|
|
3454
3454
|
}),
|
|
3455
3455
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3456
|
-
onClick: ()=>setTableDensity(
|
|
3456
|
+
onClick: ()=>setTableDensity("normal"),
|
|
3457
3457
|
"aria-label": "Row height, Normal",
|
|
3458
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3458
|
+
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === "normal" ? "active ds-u-fill--primary-lightest" : ""}`,
|
|
3459
3459
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3460
3460
|
className: "ds-u-display--block",
|
|
3461
3461
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3474,9 +3474,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3474
3474
|
})
|
|
3475
3475
|
}),
|
|
3476
3476
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3477
|
-
onClick: ()=>setTableDensity(
|
|
3477
|
+
onClick: ()=>setTableDensity("compact"),
|
|
3478
3478
|
"aria-label": "Row height, Compact",
|
|
3479
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3479
|
+
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === "compact" ? "active ds-u-fill--primary-lightest " : ""}`,
|
|
3480
3480
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3481
3481
|
className: "ds-u-display--block",
|
|
3482
3482
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3561,7 +3561,7 @@ const $85f8ff1ff89899c7$var$updateBrowserURL = (newConditions)=>{
|
|
|
3561
3561
|
encodeValuesOnly: true,
|
|
3562
3562
|
addQueryPrefix: true
|
|
3563
3563
|
});
|
|
3564
|
-
window.history.pushState({},
|
|
3564
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
3565
3565
|
};
|
|
3566
3566
|
const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, columns: columns, defaultColumnOrder: defaultColumnOrder, isModal: isModal, datasetTableControls: datasetTableControls, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility })=>{
|
|
3567
3567
|
const { limit: limit, offset: offset, count: count, conditions: conditions, setConditions: setConditions } = resource;
|
|
@@ -3647,7 +3647,7 @@ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, co
|
|
|
3647
3647
|
}, index)) : null,
|
|
3648
3648
|
hiddenColumns > 0 ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $c5b172e8d1a8197c$export$2e2bcd8739ae039), {
|
|
3649
3649
|
iconClass: "fa fa-columns",
|
|
3650
|
-
text: `${hiddenColumns} Column${hiddenColumns === 1 ?
|
|
3650
|
+
text: `${hiddenColumns} Column${hiddenColumns === 1 ? "" : "s"} Hidden`,
|
|
3651
3651
|
onClick: ()=>{
|
|
3652
3652
|
resetColumnVisibility();
|
|
3653
3653
|
}
|
|
@@ -3682,7 +3682,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3682
3682
|
const { conditions: conditions } = resource;
|
|
3683
3683
|
const data = resource.values;
|
|
3684
3684
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
3685
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
3685
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)("");
|
|
3686
3686
|
const dataTableWrapperElement = (0, $hgUW1$useRef)(null);
|
|
3687
3687
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
3688
3688
|
const table_columns = columns.map((col)=>{
|
|
@@ -3701,9 +3701,9 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3701
3701
|
columnOrder
|
|
3702
3702
|
]);
|
|
3703
3703
|
const sortElement = (isSorted, onClickFn)=>{
|
|
3704
|
-
if (isSorted ===
|
|
3705
|
-
if (isSorted ===
|
|
3706
|
-
return
|
|
3704
|
+
if (isSorted === "asc") return "dc-c-sort--asc";
|
|
3705
|
+
if (isSorted === "desc") return "dc-c-sort--desc";
|
|
3706
|
+
return "dc-c-sort--default";
|
|
3707
3707
|
};
|
|
3708
3708
|
const filters = [];
|
|
3709
3709
|
const table = (0, $hgUW1$useReactTable)({
|
|
@@ -3715,7 +3715,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3715
3715
|
columnVisibility: columnVisibility,
|
|
3716
3716
|
sorting: sorting
|
|
3717
3717
|
},
|
|
3718
|
-
columnResizeMode:
|
|
3718
|
+
columnResizeMode: "onChange",
|
|
3719
3719
|
onSortingChange: setSorting,
|
|
3720
3720
|
onColumnOrderChange: setColumnOrder,
|
|
3721
3721
|
onColumnVisibilityChange: setColumnVisibility,
|
|
@@ -3732,7 +3732,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3732
3732
|
const defaultColumnOrder = (0, $hgUW1$useMemo)(()=>table_columns.map((column)=>column.accessorKey), []);
|
|
3733
3733
|
const tableWrapperWidth = ()=>{
|
|
3734
3734
|
if (dataTableWrapperElement.current) return dataTableWrapperElement.current.offsetWidth;
|
|
3735
|
-
return
|
|
3735
|
+
return "auto";
|
|
3736
3736
|
};
|
|
3737
3737
|
(0, $hgUW1$useEffect)(()=>{
|
|
3738
3738
|
setHighlightRow(null);
|
|
@@ -3962,7 +3962,7 @@ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, a
|
|
|
3962
3962
|
},
|
|
3963
3963
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3964
3964
|
name: accessor,
|
|
3965
|
-
value: filterValue ||
|
|
3965
|
+
value: filterValue || ""
|
|
3966
3966
|
});
|
|
3967
3967
|
}
|
|
3968
3968
|
const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true })=>{
|
|
@@ -4038,7 +4038,7 @@ const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage, pageTrail:
|
|
|
4038
4038
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4039
4039
|
children: currentPage
|
|
4040
4040
|
})
|
|
4041
|
-
}) :
|
|
4041
|
+
}) : ""
|
|
4042
4042
|
]
|
|
4043
4043
|
})
|
|
4044
4044
|
});
|
|
@@ -4095,11 +4095,11 @@ var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRigh
|
|
|
4095
4095
|
|
|
4096
4096
|
|
|
4097
4097
|
|
|
4098
|
-
const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder =
|
|
4098
|
+
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", {
|
|
4099
4099
|
className: "search-input-container",
|
|
4100
4100
|
children: [
|
|
4101
4101
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4102
|
-
className: `${showMagnifyingGlass ?
|
|
4102
|
+
className: `${showMagnifyingGlass ? "left-padding" : ""} ${showSearchButton ? "right-padding" : ""}`,
|
|
4103
4103
|
label: placeholder,
|
|
4104
4104
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4105
4105
|
placeholder: placeholder,
|
|
@@ -4114,7 +4114,7 @@ const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = 'Search
|
|
|
4114
4114
|
}),
|
|
4115
4115
|
showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
4116
4116
|
variation: "solid",
|
|
4117
|
-
className: onDark &&
|
|
4117
|
+
className: onDark && "on-dark",
|
|
4118
4118
|
onClick: onSubmit,
|
|
4119
4119
|
children: [
|
|
4120
4120
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4233,7 +4233,7 @@ const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: roo
|
|
|
4233
4233
|
url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4234
4234
|
addQueryPrefix: true
|
|
4235
4235
|
})}`,
|
|
4236
|
-
docExpansion:
|
|
4236
|
+
docExpansion: "list",
|
|
4237
4237
|
defaultModelsExpandDepth: -1,
|
|
4238
4238
|
plugins: [
|
|
4239
4239
|
(0, $hgUW1$SpanOpenAPIVersion),
|
|
@@ -4341,7 +4341,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4341
4341
|
size: "big",
|
|
4342
4342
|
type: "submit",
|
|
4343
4343
|
style: {
|
|
4344
|
-
width:
|
|
4344
|
+
width: "70px"
|
|
4345
4345
|
},
|
|
4346
4346
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4347
4347
|
className: "fas fa-search small-text"
|
|
@@ -4358,7 +4358,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4358
4358
|
className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
|
|
4359
4359
|
children: [
|
|
4360
4360
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4361
|
-
children: text ? text :
|
|
4361
|
+
children: text ? text : "Search"
|
|
4362
4362
|
}),
|
|
4363
4363
|
` `,
|
|
4364
4364
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4443,12 +4443,12 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
4443
4443
|
fulltext: fulltext ? fulltext : undefined,
|
|
4444
4444
|
...selectedFacets,
|
|
4445
4445
|
sort: sort ? sort : undefined,
|
|
4446
|
-
[
|
|
4446
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4447
4447
|
page: page !== 1 ? page : undefined,
|
|
4448
|
-
[
|
|
4448
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4449
4449
|
};
|
|
4450
4450
|
return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4451
|
-
arrayFormat:
|
|
4451
|
+
arrayFormat: "comma",
|
|
4452
4452
|
encode: false
|
|
4453
4453
|
})}`);
|
|
4454
4454
|
}
|
|
@@ -4459,26 +4459,26 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
4459
4459
|
|
|
4460
4460
|
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
4461
4461
|
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4462
|
-
defaultSort:
|
|
4463
|
-
defaultOrder:
|
|
4464
|
-
}, pageTitle: pageTitle =
|
|
4462
|
+
defaultSort: "modified",
|
|
4463
|
+
defaultOrder: "desc"
|
|
4464
|
+
}, pageTitle: pageTitle = "Dataset Explorer", filterTitle: filterTitle = "Tags", showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = "", showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
4465
4465
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4466
4466
|
const sortOptions = [
|
|
4467
4467
|
{
|
|
4468
|
-
label:
|
|
4469
|
-
value:
|
|
4468
|
+
label: "Newest",
|
|
4469
|
+
value: "newest"
|
|
4470
4470
|
},
|
|
4471
4471
|
{
|
|
4472
|
-
label:
|
|
4473
|
-
value:
|
|
4472
|
+
label: "Oldest",
|
|
4473
|
+
value: "oldest"
|
|
4474
4474
|
},
|
|
4475
4475
|
{
|
|
4476
|
-
label:
|
|
4477
|
-
value:
|
|
4476
|
+
label: "Title A-Z",
|
|
4477
|
+
value: "titleAZ"
|
|
4478
4478
|
},
|
|
4479
4479
|
{
|
|
4480
|
-
label:
|
|
4481
|
-
value:
|
|
4480
|
+
label: "Title Z-A",
|
|
4481
|
+
value: "titleZA"
|
|
4482
4482
|
}
|
|
4483
4483
|
];
|
|
4484
4484
|
const defaultSortBy = "";
|
|
@@ -4497,7 +4497,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4497
4497
|
endingNumber: 0
|
|
4498
4498
|
});
|
|
4499
4499
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4500
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4500
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
|
|
4501
4501
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4502
4502
|
const [fulltext, setFullText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
4503
4503
|
const [filterText, setFilterText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
@@ -4506,7 +4506,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4506
4506
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4507
4507
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4508
4508
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4509
|
-
return sort ===
|
|
4509
|
+
return sort === "modified" ? sortOrder === "desc" ? "newest" : "oldest" : sortOrder === "desc" ? "titleZA" : "titleAZ";
|
|
4510
4510
|
});
|
|
4511
4511
|
const [selectedFacets, setSelectedFacets] = (0, $hgUW1$useState)(transformedParams.selectedFacets ? transformedParams.selectedFacets : {
|
|
4512
4512
|
theme: [],
|
|
@@ -4515,21 +4515,21 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4515
4515
|
const setSortOptions = (value)=>{
|
|
4516
4516
|
setSortDisplay(value);
|
|
4517
4517
|
switch(value){
|
|
4518
|
-
case
|
|
4519
|
-
setSort(
|
|
4520
|
-
setSortOrder(
|
|
4518
|
+
case "newest":
|
|
4519
|
+
setSort("modified");
|
|
4520
|
+
setSortOrder("desc");
|
|
4521
4521
|
break;
|
|
4522
|
-
case
|
|
4523
|
-
setSort(
|
|
4524
|
-
setSortOrder(
|
|
4522
|
+
case "oldest":
|
|
4523
|
+
setSort("modified");
|
|
4524
|
+
setSortOrder("asc");
|
|
4525
4525
|
break;
|
|
4526
|
-
case
|
|
4527
|
-
setSort(
|
|
4528
|
-
setSortOrder(
|
|
4526
|
+
case "titleAZ":
|
|
4527
|
+
setSort("title");
|
|
4528
|
+
setSortOrder("asc");
|
|
4529
4529
|
break;
|
|
4530
|
-
case
|
|
4531
|
-
setSort(
|
|
4532
|
-
setSortOrder(
|
|
4530
|
+
case "titleZA":
|
|
4531
|
+
setSort("title");
|
|
4532
|
+
setSortOrder("desc");
|
|
4533
4533
|
break;
|
|
4534
4534
|
}
|
|
4535
4535
|
};
|
|
@@ -4537,12 +4537,12 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4537
4537
|
const newFacets = {
|
|
4538
4538
|
...selectedFacets
|
|
4539
4539
|
};
|
|
4540
|
-
if (key ===
|
|
4540
|
+
if (key === "theme") {
|
|
4541
4541
|
const existingFacet = newFacets.theme.findIndex((s)=>s === value);
|
|
4542
4542
|
if (existingFacet > -1) newFacets.theme.splice(existingFacet, 1);
|
|
4543
4543
|
else newFacets.theme.push(value);
|
|
4544
4544
|
}
|
|
4545
|
-
if (key ===
|
|
4545
|
+
if (key === "keyword") {
|
|
4546
4546
|
const existingFacet = newFacets.keyword.findIndex((s)=>s === value);
|
|
4547
4547
|
if (existingFacet > -1) newFacets.keyword.splice(existingFacet, 1);
|
|
4548
4548
|
else newFacets.keyword.push(value);
|
|
@@ -4556,7 +4556,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4556
4556
|
});
|
|
4557
4557
|
setSelectedFacets(newFacets);
|
|
4558
4558
|
const url = new URL(window.location.href);
|
|
4559
|
-
window.history.pushState({},
|
|
4559
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
4560
4560
|
}
|
|
4561
4561
|
const pageSize = defaultPageSize;
|
|
4562
4562
|
function resetFilters() {
|
|
@@ -4565,14 +4565,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4565
4565
|
setSelectedFacets(defaultSelectedFacets);
|
|
4566
4566
|
setPage(defaultPage);
|
|
4567
4567
|
const url = new URL(window.location.href);
|
|
4568
|
-
window.history.pushState({},
|
|
4568
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}`);
|
|
4569
4569
|
}
|
|
4570
4570
|
function buildSearchParams(includePage) {
|
|
4571
4571
|
let newParams = {};
|
|
4572
4572
|
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
4573
4573
|
if (sort !== defaultSort.defaultSort) newParams.sort = sort;
|
|
4574
4574
|
if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
|
|
4575
|
-
if (fulltext !==
|
|
4575
|
+
if (fulltext !== "") newParams.fulltext = fulltext;
|
|
4576
4576
|
if (Object.keys(selectedFacets).length) Object.keys(selectedFacets).forEach((key)=>{
|
|
4577
4577
|
newParams[key] = selectedFacets[key];
|
|
4578
4578
|
});
|
|
@@ -4585,9 +4585,9 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4585
4585
|
fulltext: fulltext ? fulltext : undefined,
|
|
4586
4586
|
...selectedFacets,
|
|
4587
4587
|
sort: sort ? sort : undefined,
|
|
4588
|
-
[
|
|
4588
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4589
4589
|
page: page !== 1 ? page : undefined,
|
|
4590
|
-
[
|
|
4590
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4591
4591
|
};
|
|
4592
4592
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4593
4593
|
queryKey: [
|
|
@@ -4596,7 +4596,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4596
4596
|
],
|
|
4597
4597
|
queryFn: ()=>{
|
|
4598
4598
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4599
|
-
arrayFormat:
|
|
4599
|
+
arrayFormat: "comma",
|
|
4600
4600
|
encode: false
|
|
4601
4601
|
})}`);
|
|
4602
4602
|
}
|
|
@@ -4647,8 +4647,8 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4647
4647
|
]);
|
|
4648
4648
|
(0, $hgUW1$useEffect)(()=>{
|
|
4649
4649
|
// No results found
|
|
4650
|
-
if (noResults) setAnnouncementText(
|
|
4651
|
-
else if (!isPending && (!data || !data.data.results)) setAnnouncementText(
|
|
4650
|
+
if (noResults) setAnnouncementText("No results found.");
|
|
4651
|
+
else if (!isPending && (!data || !data.data.results)) setAnnouncementText("Could not connect to the API.");
|
|
4652
4652
|
else setAnnouncementText(`Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`);
|
|
4653
4653
|
}, [
|
|
4654
4654
|
data,
|
|
@@ -4706,7 +4706,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4706
4706
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4707
4707
|
fieldClassName: "ds-u-margin--0",
|
|
4708
4708
|
value: filterText,
|
|
4709
|
-
className: `ds-u-padding-right--2 ${altMobileSearchButton ?
|
|
4709
|
+
className: `ds-u-padding-right--2 ${altMobileSearchButton ? "ds-l-col--12 ds-l-md-col--10 --alt-style" : "ds-l-col--10"}`,
|
|
4710
4710
|
label: "Search datasets",
|
|
4711
4711
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4712
4712
|
placeholder: "Search datasets",
|
|
@@ -4766,7 +4766,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4766
4766
|
"Showing ",
|
|
4767
4767
|
currentResultNumbers.startingNumber,
|
|
4768
4768
|
" -",
|
|
4769
|
-
|
|
4769
|
+
" ",
|
|
4770
4770
|
currentResultNumbers.endingNumber,
|
|
4771
4771
|
" of ",
|
|
4772
4772
|
data.data.total,
|
|
@@ -4837,7 +4837,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4837
4837
|
},
|
|
4838
4838
|
renderHref: (page)=>{
|
|
4839
4839
|
const searchParams = buildSearchParams(false);
|
|
4840
|
-
const includeAnd = searchParams ?
|
|
4840
|
+
const includeAnd = searchParams ? "&" : "";
|
|
4841
4841
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
4842
4842
|
}
|
|
4843
4843
|
})
|
|
@@ -4871,26 +4871,26 @@ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
4871
4871
|
|
|
4872
4872
|
|
|
4873
4873
|
const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4874
|
-
defaultSort:
|
|
4875
|
-
defaultOrder:
|
|
4876
|
-
}, pageTitle: pageTitle =
|
|
4874
|
+
defaultSort: "modified",
|
|
4875
|
+
defaultOrder: "desc"
|
|
4876
|
+
}, pageTitle: pageTitle = "What's New ", showLargeFileWarning: showLargeFileWarning = false, introText: introText = "", dataDictionaryLinks: dataDictionaryLinks = false })=>{
|
|
4877
4877
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4878
4878
|
const sortOptions = [
|
|
4879
4879
|
{
|
|
4880
|
-
label:
|
|
4881
|
-
value:
|
|
4880
|
+
label: "Newest",
|
|
4881
|
+
value: "newest"
|
|
4882
4882
|
},
|
|
4883
4883
|
{
|
|
4884
|
-
label:
|
|
4885
|
-
value:
|
|
4884
|
+
label: "Oldest",
|
|
4885
|
+
value: "oldest"
|
|
4886
4886
|
},
|
|
4887
4887
|
{
|
|
4888
|
-
label:
|
|
4889
|
-
value:
|
|
4888
|
+
label: "Title A-Z",
|
|
4889
|
+
value: "titleAZ"
|
|
4890
4890
|
},
|
|
4891
4891
|
{
|
|
4892
|
-
label:
|
|
4893
|
-
value:
|
|
4892
|
+
label: "Title Z-A",
|
|
4893
|
+
value: "titleZA"
|
|
4894
4894
|
}
|
|
4895
4895
|
];
|
|
4896
4896
|
const defaultSortBy = "";
|
|
@@ -4904,33 +4904,33 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4904
4904
|
endingNumber: 0
|
|
4905
4905
|
});
|
|
4906
4906
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4907
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4907
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
|
|
4908
4908
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4909
4909
|
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
4910
4910
|
const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
|
|
4911
4911
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4912
4912
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4913
4913
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4914
|
-
return sort ===
|
|
4914
|
+
return sort === "modified" ? sortOrder === "desc" ? "newest" : "oldest" : sortOrder === "desc" ? "titleZA" : "titleAZ";
|
|
4915
4915
|
});
|
|
4916
4916
|
const setSortOptions = (value)=>{
|
|
4917
4917
|
setSortDisplay(value);
|
|
4918
4918
|
switch(value){
|
|
4919
|
-
case
|
|
4920
|
-
setSort(
|
|
4921
|
-
setSortOrder(
|
|
4919
|
+
case "newest":
|
|
4920
|
+
setSort("modified");
|
|
4921
|
+
setSortOrder("desc");
|
|
4922
4922
|
break;
|
|
4923
|
-
case
|
|
4924
|
-
setSort(
|
|
4925
|
-
setSortOrder(
|
|
4923
|
+
case "oldest":
|
|
4924
|
+
setSort("modified");
|
|
4925
|
+
setSortOrder("asc");
|
|
4926
4926
|
break;
|
|
4927
|
-
case
|
|
4928
|
-
setSort(
|
|
4929
|
-
setSortOrder(
|
|
4927
|
+
case "titleAZ":
|
|
4928
|
+
setSort("title");
|
|
4929
|
+
setSortOrder("asc");
|
|
4930
4930
|
break;
|
|
4931
|
-
case
|
|
4932
|
-
setSort(
|
|
4933
|
-
setSortOrder(
|
|
4931
|
+
case "titleZA":
|
|
4932
|
+
setSort("title");
|
|
4933
|
+
setSortOrder("desc");
|
|
4934
4934
|
break;
|
|
4935
4935
|
}
|
|
4936
4936
|
};
|
|
@@ -4947,9 +4947,9 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4947
4947
|
}
|
|
4948
4948
|
let params = {
|
|
4949
4949
|
sort: sort ? sort : undefined,
|
|
4950
|
-
[
|
|
4950
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4951
4951
|
page: page !== 1 ? page : undefined,
|
|
4952
|
-
[
|
|
4952
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4953
4953
|
};
|
|
4954
4954
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4955
4955
|
queryKey: [
|
|
@@ -4958,7 +4958,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4958
4958
|
],
|
|
4959
4959
|
queryFn: ()=>{
|
|
4960
4960
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4961
|
-
arrayFormat:
|
|
4961
|
+
arrayFormat: "comma",
|
|
4962
4962
|
encode: false
|
|
4963
4963
|
})}`);
|
|
4964
4964
|
}
|
|
@@ -4974,7 +4974,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4974
4974
|
// Update browser URL with current search params
|
|
4975
4975
|
const params = buildSearchParams(true);
|
|
4976
4976
|
const url = new URL(window.location.href);
|
|
4977
|
-
window.history.pushState({},
|
|
4977
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${params}`);
|
|
4978
4978
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4979
4979
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4980
4980
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -5000,8 +5000,8 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5000
5000
|
]);
|
|
5001
5001
|
(0, $hgUW1$useEffect)(()=>{
|
|
5002
5002
|
// No results found
|
|
5003
|
-
if (noResults) setAnnouncementText(
|
|
5004
|
-
else if (!isPending && (!data || !data.data.results)) setAnnouncementText(
|
|
5003
|
+
if (noResults) setAnnouncementText("No results found.");
|
|
5004
|
+
else if (!isPending && (!data || !data.data.results)) setAnnouncementText("Could not connect to the API.");
|
|
5005
5005
|
else setAnnouncementText(`Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`);
|
|
5006
5006
|
}, [
|
|
5007
5007
|
data,
|
|
@@ -5074,7 +5074,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5074
5074
|
"Showing ",
|
|
5075
5075
|
currentResultNumbers.startingNumber,
|
|
5076
5076
|
" -",
|
|
5077
|
-
|
|
5077
|
+
" ",
|
|
5078
5078
|
currentResultNumbers.endingNumber,
|
|
5079
5079
|
" of ",
|
|
5080
5080
|
data.data.total,
|
|
@@ -5134,7 +5134,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5134
5134
|
},
|
|
5135
5135
|
renderHref: (page)=>{
|
|
5136
5136
|
const searchParams = buildSearchParams(false);
|
|
5137
|
-
const includeAnd = searchParams ?
|
|
5137
|
+
const includeAnd = searchParams ? "&" : "";
|
|
5138
5138
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
5139
5139
|
}
|
|
5140
5140
|
})
|
|
@@ -5166,12 +5166,12 @@ var $550bcc185f420ff5$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
5166
5166
|
|
|
5167
5167
|
const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
5168
5168
|
const [dataset, setDataset] = (0, $hgUW1$useState)({
|
|
5169
|
-
title:
|
|
5169
|
+
title: "",
|
|
5170
5170
|
distribution: [],
|
|
5171
|
-
error:
|
|
5172
|
-
description:
|
|
5173
|
-
identifier:
|
|
5174
|
-
modified:
|
|
5171
|
+
error: "",
|
|
5172
|
+
description: "",
|
|
5173
|
+
identifier: "",
|
|
5174
|
+
modified: ""
|
|
5175
5175
|
});
|
|
5176
5176
|
const [id, setId] = (0, $hgUW1$useState)(datasetId);
|
|
5177
5177
|
const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
|
|
@@ -5181,7 +5181,7 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
|
5181
5181
|
"metastore" + id
|
|
5182
5182
|
],
|
|
5183
5183
|
queryFn: ()=>{
|
|
5184
|
-
return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ?
|
|
5184
|
+
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)=>{
|
|
5185
5185
|
return {
|
|
5186
5186
|
title: dataset.title,
|
|
5187
5187
|
distribution: dataset.distribution,
|
|
@@ -5237,7 +5237,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5237
5237
|
// const [joins, setJoins] = useState()
|
|
5238
5238
|
const [properties, setProperties] = (0, $hgUW1$useState)(options.properties ? options.properties : undefined);
|
|
5239
5239
|
// Check drupalSettings for datastore_query_api
|
|
5240
|
-
const useDatasetAPI = typeof window !==
|
|
5240
|
+
const useDatasetAPI = typeof window !== "undefined" && window.drupalSettings?.datastore_query_api === true;
|
|
5241
5241
|
const datasetID = additionalParams.datasetID;
|
|
5242
5242
|
// Remove datasetID from params to avoid sending it to the API
|
|
5243
5243
|
const { datasetID: _, ...restAdditionalParams } = additionalParams;
|
|
@@ -5252,7 +5252,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5252
5252
|
...restAdditionalParams
|
|
5253
5253
|
};
|
|
5254
5254
|
params = (0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA);
|
|
5255
|
-
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` :
|
|
5255
|
+
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : "";
|
|
5256
5256
|
let enabled = false;
|
|
5257
5257
|
if (id) {
|
|
5258
5258
|
if (!requireConditions) enabled = true;
|
|
@@ -5334,65 +5334,65 @@ var $1d3d480a9cfaabe0$export$2e2bcd8739ae039 = $1d3d480a9cfaabe0$var$useDatastor
|
|
|
5334
5334
|
|
|
5335
5335
|
|
|
5336
5336
|
const $28f16f59778efa64$export$82b1b1d517e5388a = {
|
|
5337
|
-
|
|
5338
|
-
name:
|
|
5337
|
+
"R/P10Y": {
|
|
5338
|
+
name: "Decennial"
|
|
5339
5339
|
},
|
|
5340
|
-
|
|
5341
|
-
name:
|
|
5340
|
+
"R/P4Y": {
|
|
5341
|
+
name: "Quadrennial"
|
|
5342
5342
|
},
|
|
5343
|
-
|
|
5344
|
-
name:
|
|
5343
|
+
"R/P1Y": {
|
|
5344
|
+
name: "Annual"
|
|
5345
5345
|
},
|
|
5346
|
-
|
|
5347
|
-
name:
|
|
5346
|
+
"R/P2M": {
|
|
5347
|
+
name: "Bimonthly"
|
|
5348
5348
|
},
|
|
5349
|
-
|
|
5350
|
-
name:
|
|
5349
|
+
"R/P3.5D": {
|
|
5350
|
+
name: "Semiweekly"
|
|
5351
5351
|
},
|
|
5352
|
-
|
|
5353
|
-
name:
|
|
5352
|
+
"R/P1D": {
|
|
5353
|
+
name: "Daily"
|
|
5354
5354
|
},
|
|
5355
|
-
|
|
5356
|
-
name:
|
|
5355
|
+
"R/P2W": {
|
|
5356
|
+
name: "Biweekly"
|
|
5357
5357
|
},
|
|
5358
|
-
|
|
5359
|
-
name:
|
|
5358
|
+
"R/P6M": {
|
|
5359
|
+
name: "Semiannual"
|
|
5360
5360
|
},
|
|
5361
|
-
|
|
5362
|
-
name:
|
|
5361
|
+
"R/P2Y": {
|
|
5362
|
+
name: "Biennial"
|
|
5363
5363
|
},
|
|
5364
|
-
|
|
5365
|
-
name:
|
|
5364
|
+
"R/P3Y": {
|
|
5365
|
+
name: "Triennial"
|
|
5366
5366
|
},
|
|
5367
|
-
|
|
5368
|
-
name:
|
|
5367
|
+
"R/P0.33W": {
|
|
5368
|
+
name: "Three times a week"
|
|
5369
5369
|
},
|
|
5370
|
-
|
|
5371
|
-
name:
|
|
5370
|
+
"R/P0.33M": {
|
|
5371
|
+
name: "Three times a month"
|
|
5372
5372
|
},
|
|
5373
|
-
|
|
5374
|
-
name:
|
|
5373
|
+
"R/PT1S": {
|
|
5374
|
+
name: "Continuously updated"
|
|
5375
5375
|
},
|
|
5376
|
-
|
|
5377
|
-
name:
|
|
5376
|
+
"R/P1M": {
|
|
5377
|
+
name: "Monthly"
|
|
5378
5378
|
},
|
|
5379
|
-
|
|
5380
|
-
name:
|
|
5379
|
+
"R/P3M": {
|
|
5380
|
+
name: "Quarterly"
|
|
5381
5381
|
},
|
|
5382
|
-
|
|
5383
|
-
name:
|
|
5382
|
+
"R/P0.5M": {
|
|
5383
|
+
name: "Semimonthly"
|
|
5384
5384
|
},
|
|
5385
|
-
|
|
5386
|
-
name:
|
|
5385
|
+
"R/P4M": {
|
|
5386
|
+
name: "Three times a year"
|
|
5387
5387
|
},
|
|
5388
|
-
|
|
5389
|
-
name:
|
|
5388
|
+
"R/P1W": {
|
|
5389
|
+
name: "Weekly"
|
|
5390
5390
|
},
|
|
5391
|
-
|
|
5392
|
-
name:
|
|
5391
|
+
"R/PT1H": {
|
|
5392
|
+
name: "Hourly"
|
|
5393
5393
|
},
|
|
5394
5394
|
irregular: {
|
|
5395
|
-
name:
|
|
5395
|
+
name: "Irregular"
|
|
5396
5396
|
}
|
|
5397
5397
|
};
|
|
5398
5398
|
|
|
@@ -5401,7 +5401,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5401
5401
|
modified: (data)=>{
|
|
5402
5402
|
return [
|
|
5403
5403
|
{
|
|
5404
|
-
label:
|
|
5404
|
+
label: "Modified",
|
|
5405
5405
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5406
5406
|
date: data
|
|
5407
5407
|
})
|
|
@@ -5411,7 +5411,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5411
5411
|
issued: (data)=>{
|
|
5412
5412
|
return [
|
|
5413
5413
|
{
|
|
5414
|
-
label:
|
|
5414
|
+
label: "Issued",
|
|
5415
5415
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5416
5416
|
date: data
|
|
5417
5417
|
})
|
|
@@ -5421,7 +5421,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5421
5421
|
accrualPeriodicity: (data)=>{
|
|
5422
5422
|
return [
|
|
5423
5423
|
{
|
|
5424
|
-
label:
|
|
5424
|
+
label: "Frequency",
|
|
5425
5425
|
value: (0, $28f16f59778efa64$export$82b1b1d517e5388a)[data].name
|
|
5426
5426
|
}
|
|
5427
5427
|
];
|
|
@@ -5429,7 +5429,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5429
5429
|
publisher: (data)=>{
|
|
5430
5430
|
if (data.data && data.data.name) return [
|
|
5431
5431
|
{
|
|
5432
|
-
label:
|
|
5432
|
+
label: "Publisher",
|
|
5433
5433
|
value: data.data.name
|
|
5434
5434
|
}
|
|
5435
5435
|
];
|
|
@@ -5438,7 +5438,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5438
5438
|
identifier: (data)=>{
|
|
5439
5439
|
return [
|
|
5440
5440
|
{
|
|
5441
|
-
label:
|
|
5441
|
+
label: "Identifier",
|
|
5442
5442
|
value: data
|
|
5443
5443
|
}
|
|
5444
5444
|
];
|
|
@@ -5446,11 +5446,11 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5446
5446
|
contactPoint: (data)=>{
|
|
5447
5447
|
let rows = [];
|
|
5448
5448
|
if (data.fn) rows.push({
|
|
5449
|
-
label:
|
|
5449
|
+
label: "Contact",
|
|
5450
5450
|
value: data.fn
|
|
5451
5451
|
});
|
|
5452
5452
|
if (data.hasEmail) rows.push({
|
|
5453
|
-
label:
|
|
5453
|
+
label: "Contact Email",
|
|
5454
5454
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5455
5455
|
href: data.hasEmail.includes("mailto:") ? data.hasEmail : `mailto:${data.hasEmail}`,
|
|
5456
5456
|
children: data.hasEmail.replace("mailto:", "")
|
|
@@ -5461,7 +5461,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5461
5461
|
bureauCode: (data)=>{
|
|
5462
5462
|
if (data.length) return [
|
|
5463
5463
|
{
|
|
5464
|
-
label:
|
|
5464
|
+
label: "Bureau Code",
|
|
5465
5465
|
value: data[0]
|
|
5466
5466
|
}
|
|
5467
5467
|
];
|
|
@@ -5469,7 +5469,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5469
5469
|
programCode: (data)=>{
|
|
5470
5470
|
if (data.length) return [
|
|
5471
5471
|
{
|
|
5472
|
-
label:
|
|
5472
|
+
label: "Program Code",
|
|
5473
5473
|
value: data[0]
|
|
5474
5474
|
}
|
|
5475
5475
|
];
|
|
@@ -5477,13 +5477,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5477
5477
|
theme: (data)=>{
|
|
5478
5478
|
return [
|
|
5479
5479
|
{
|
|
5480
|
-
label:
|
|
5480
|
+
label: "Category",
|
|
5481
5481
|
value: data.map((theme)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5482
5482
|
to: `/datasets?theme[]=${theme.data}`,
|
|
5483
5483
|
children: theme.data
|
|
5484
5484
|
}, theme.data)).reduce((prev, curr)=>[
|
|
5485
5485
|
prev,
|
|
5486
|
-
|
|
5486
|
+
", ",
|
|
5487
5487
|
curr
|
|
5488
5488
|
])
|
|
5489
5489
|
}
|
|
@@ -5492,13 +5492,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5492
5492
|
keyword: (data)=>{
|
|
5493
5493
|
return [
|
|
5494
5494
|
{
|
|
5495
|
-
label:
|
|
5495
|
+
label: "Tags",
|
|
5496
5496
|
value: data.map((keyword)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5497
5497
|
to: `/datasets?keyword[]=${keyword.data}`,
|
|
5498
5498
|
children: keyword.data
|
|
5499
5499
|
}, keyword.data)).reduce((prev, curr)=>[
|
|
5500
5500
|
prev,
|
|
5501
|
-
|
|
5501
|
+
", ",
|
|
5502
5502
|
curr
|
|
5503
5503
|
])
|
|
5504
5504
|
}
|
|
@@ -5507,7 +5507,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5507
5507
|
license: (data)=>{
|
|
5508
5508
|
return [
|
|
5509
5509
|
{
|
|
5510
|
-
label:
|
|
5510
|
+
label: "License",
|
|
5511
5511
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5512
5512
|
href: data,
|
|
5513
5513
|
children: data
|
|
@@ -5518,7 +5518,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5518
5518
|
accessLevel: (data)=>{
|
|
5519
5519
|
return [
|
|
5520
5520
|
{
|
|
5521
|
-
label:
|
|
5521
|
+
label: "Public Access Level",
|
|
5522
5522
|
value: data
|
|
5523
5523
|
}
|
|
5524
5524
|
];
|
|
@@ -5526,7 +5526,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5526
5526
|
temporal: (data)=>{
|
|
5527
5527
|
return [
|
|
5528
5528
|
{
|
|
5529
|
-
label:
|
|
5529
|
+
label: "Temporal Coverage",
|
|
5530
5530
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5531
5531
|
className: "dc-c-word-break--all",
|
|
5532
5532
|
children: data
|
|
@@ -5537,7 +5537,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5537
5537
|
spatial: (data)=>{
|
|
5538
5538
|
return [
|
|
5539
5539
|
{
|
|
5540
|
-
label:
|
|
5540
|
+
label: "Spacial/Geographical Coverage",
|
|
5541
5541
|
value: data
|
|
5542
5542
|
}
|
|
5543
5543
|
];
|
|
@@ -5545,7 +5545,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5545
5545
|
references: (data)=>{
|
|
5546
5546
|
return [
|
|
5547
5547
|
{
|
|
5548
|
-
label:
|
|
5548
|
+
label: "Related Documents",
|
|
5549
5549
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
5550
5550
|
className: "ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0",
|
|
5551
5551
|
children: data.map((item)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -5583,7 +5583,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ distribution: distribution,
|
|
|
5583
5583
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
5584
5584
|
const { data: resource } = (0, $hgUW1$useQuery)({
|
|
5585
5585
|
queryKey: [
|
|
5586
|
-
|
|
5586
|
+
"resource-information",
|
|
5587
5587
|
distribution.identifier
|
|
5588
5588
|
],
|
|
5589
5589
|
queryFn: ()=>(0, $hgUW1$axios).get(`${rootUrl}/datastore/query/${distribution.identifier}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({
|
|
@@ -5610,7 +5610,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ distribution: distribution,
|
|
|
5610
5610
|
}),
|
|
5611
5611
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5612
5612
|
className: "ds-u-font-weight--bold",
|
|
5613
|
-
children: resource?.count ? Number(resource.count).toLocaleString() :
|
|
5613
|
+
children: resource?.count ? Number(resource.count).toLocaleString() : ""
|
|
5614
5614
|
})
|
|
5615
5615
|
]
|
|
5616
5616
|
}),
|
|
@@ -5678,8 +5678,8 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5678
5678
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
5679
5679
|
href: dist.data.downloadURL,
|
|
5680
5680
|
style: {
|
|
5681
|
-
order: sm ?
|
|
5682
|
-
width: sm ?
|
|
5681
|
+
order: sm ? "1" : "0",
|
|
5682
|
+
width: sm ? "100%" : "auto"
|
|
5683
5683
|
},
|
|
5684
5684
|
"aria-label": `Download ${dist.data.title || title} ${fileFormat}`,
|
|
5685
5685
|
className: "ds-c-button",
|
|
@@ -5692,7 +5692,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5692
5692
|
})
|
|
5693
5693
|
}),
|
|
5694
5694
|
dist.data.description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5695
|
-
className:
|
|
5695
|
+
className: "ds-u-measure--wide ds-u-margin-bottom--7",
|
|
5696
5696
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5697
5697
|
className: "dc-c-metadata-description ds-u-margin--0",
|
|
5698
5698
|
dangerouslySetInnerHTML: {
|
|
@@ -5766,7 +5766,7 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5766
5766
|
const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
|
|
5767
5767
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
5768
5768
|
children: [
|
|
5769
|
-
md ?
|
|
5769
|
+
md ? "" : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5770
5770
|
component: "th",
|
|
5771
5771
|
className: "ds-u-font-weight--bold",
|
|
5772
5772
|
children: [
|
|
@@ -5778,8 +5778,8 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5778
5778
|
ariaLabel: r.label,
|
|
5779
5779
|
// @ts-ignore
|
|
5780
5780
|
style: {
|
|
5781
|
-
border:
|
|
5782
|
-
background:
|
|
5781
|
+
border: "none",
|
|
5782
|
+
background: "none"
|
|
5783
5783
|
},
|
|
5784
5784
|
maxWidth: "400px",
|
|
5785
5785
|
placement: "auto",
|
|
@@ -5838,10 +5838,10 @@ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: ap
|
|
|
5838
5838
|
href: apiUrl,
|
|
5839
5839
|
children: [
|
|
5840
5840
|
"View API",
|
|
5841
|
-
|
|
5841
|
+
" ",
|
|
5842
5842
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5843
5843
|
style: {
|
|
5844
|
-
whiteSpace:
|
|
5844
|
+
whiteSpace: "nowrap"
|
|
5845
5845
|
},
|
|
5846
5846
|
children: [
|
|
5847
5847
|
"specification ",
|
|
@@ -5882,20 +5882,20 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
|
|
|
5882
5882
|
|
|
5883
5883
|
const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
|
|
5884
5884
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
5885
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
5885
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)("");
|
|
5886
5886
|
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
5887
5887
|
minWidth: 0,
|
|
5888
5888
|
maxWidth: 544
|
|
5889
5889
|
});
|
|
5890
5890
|
const sortElement = (isSorted)=>{
|
|
5891
|
-
if (isSorted ===
|
|
5892
|
-
if (isSorted ===
|
|
5893
|
-
return
|
|
5891
|
+
if (isSorted === "asc") return "dc-c-sort--asc";
|
|
5892
|
+
if (isSorted === "desc") return "dc-c-sort--desc";
|
|
5893
|
+
return "dc-c-sort--default";
|
|
5894
5894
|
};
|
|
5895
5895
|
const table = (0, $hgUW1$useReactTable)({
|
|
5896
5896
|
data: tableData,
|
|
5897
5897
|
columns: tableColumns,
|
|
5898
|
-
columnResizeMode:
|
|
5898
|
+
columnResizeMode: "onChange",
|
|
5899
5899
|
getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
|
|
5900
5900
|
getFilteredRowModel: (0, $hgUW1$getFilteredRowModel)(),
|
|
5901
5901
|
getPaginationRowModel: (0, $hgUW1$getPaginationRowModel)(),
|
|
@@ -5914,49 +5914,49 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5914
5914
|
});
|
|
5915
5915
|
const sortOptions = [
|
|
5916
5916
|
{
|
|
5917
|
-
value:
|
|
5918
|
-
label:
|
|
5917
|
+
value: "default",
|
|
5918
|
+
label: "No Sort"
|
|
5919
5919
|
},
|
|
5920
5920
|
{
|
|
5921
|
-
value:
|
|
5922
|
-
label:
|
|
5921
|
+
value: "titleasc",
|
|
5922
|
+
label: "Title A-Z"
|
|
5923
5923
|
},
|
|
5924
5924
|
{
|
|
5925
|
-
value:
|
|
5926
|
-
label:
|
|
5925
|
+
value: "titledesc",
|
|
5926
|
+
label: "Title Z-A"
|
|
5927
5927
|
},
|
|
5928
5928
|
{
|
|
5929
|
-
value:
|
|
5930
|
-
label:
|
|
5929
|
+
value: "typeasc",
|
|
5930
|
+
label: "Type A-Z"
|
|
5931
5931
|
},
|
|
5932
5932
|
{
|
|
5933
|
-
value:
|
|
5934
|
-
label:
|
|
5933
|
+
value: "typedesc",
|
|
5934
|
+
label: "Type Z-A"
|
|
5935
5935
|
}
|
|
5936
5936
|
];
|
|
5937
5937
|
const sortStatesLookup = {
|
|
5938
5938
|
default: [],
|
|
5939
5939
|
titleasc: [
|
|
5940
5940
|
{
|
|
5941
|
-
id:
|
|
5941
|
+
id: "titleResizable",
|
|
5942
5942
|
desc: false
|
|
5943
5943
|
}
|
|
5944
5944
|
],
|
|
5945
5945
|
titledesc: [
|
|
5946
5946
|
{
|
|
5947
|
-
id:
|
|
5947
|
+
id: "titleResizable",
|
|
5948
5948
|
desc: true
|
|
5949
5949
|
}
|
|
5950
5950
|
],
|
|
5951
5951
|
typeasc: [
|
|
5952
5952
|
{
|
|
5953
|
-
id:
|
|
5953
|
+
id: "type",
|
|
5954
5954
|
desc: false
|
|
5955
5955
|
}
|
|
5956
5956
|
],
|
|
5957
5957
|
typedesc: [
|
|
5958
5958
|
{
|
|
5959
|
-
id:
|
|
5959
|
+
id: "type",
|
|
5960
5960
|
desc: true
|
|
5961
5961
|
}
|
|
5962
5962
|
]
|
|
@@ -5984,7 +5984,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5984
5984
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
5985
5985
|
className: "dc-c-datatable",
|
|
5986
5986
|
style: {
|
|
5987
|
-
width:
|
|
5987
|
+
width: "100%"
|
|
5988
5988
|
},
|
|
5989
5989
|
stackable: true,
|
|
5990
5990
|
children: [
|
|
@@ -5997,16 +5997,16 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5997
5997
|
header: header,
|
|
5998
5998
|
setAriaLiveFeedback: setAriaLiveFeedback,
|
|
5999
5999
|
sortElement: sortElement,
|
|
6000
|
-
id:
|
|
6000
|
+
id: "dataDictionary_" + header.id
|
|
6001
6001
|
}, header.id + "_resize") : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
6002
6002
|
key: header.id,
|
|
6003
6003
|
className: `ds-u-border-y--2 ds-u-border--dark ds-u-border-x--0`,
|
|
6004
|
-
id:
|
|
6004
|
+
id: "dataDictionary_" + header.id,
|
|
6005
6005
|
children: [
|
|
6006
6006
|
(0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext()),
|
|
6007
|
-
header.id ===
|
|
6007
|
+
header.id === "type" && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
6008
6008
|
onClick: header.column.getToggleSortingHandler(),
|
|
6009
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
6009
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : "",
|
|
6010
6010
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
6011
6011
|
})
|
|
6012
6012
|
]
|
|
@@ -6021,12 +6021,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
6021
6021
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6022
6022
|
key: cell.id,
|
|
6023
6023
|
style: {
|
|
6024
|
-
maxWidth: mobile ?
|
|
6025
|
-
whiteSpace: cell.column.id === "description" ?
|
|
6024
|
+
maxWidth: mobile ? "100%" : cell.column.getSize(),
|
|
6025
|
+
whiteSpace: cell.column.id === "description" ? "pre-wrap" : "normal"
|
|
6026
6026
|
},
|
|
6027
|
-
className: `${cell.column.id ===
|
|
6028
|
-
headers:
|
|
6029
|
-
stackedTitle: cell.column.id ===
|
|
6027
|
+
className: `${cell.column.id === "titleResizable" ? "ds-u-word-break" : ""}`,
|
|
6028
|
+
headers: "dataDictionary_" + cell.column.id,
|
|
6029
|
+
stackedTitle: cell.column.id === "titleResizable" ? "Title" : cell.column.columnDef.header,
|
|
6030
6030
|
children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
6031
6031
|
});
|
|
6032
6032
|
})
|
|
@@ -6055,7 +6055,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
6055
6055
|
table.setPageIndex(page - 1);
|
|
6056
6056
|
},
|
|
6057
6057
|
renderHref: (page)=>`/page=${page}`
|
|
6058
|
-
}) :
|
|
6058
|
+
}) : ""
|
|
6059
6059
|
]
|
|
6060
6060
|
});
|
|
6061
6061
|
};
|
|
@@ -6065,17 +6065,17 @@ var $6765a74df807d015$export$2e2bcd8739ae039 = $6765a74df807d015$var$DataDiction
|
|
|
6065
6065
|
const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
|
|
6066
6066
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
6067
6067
|
const tableColumns = [
|
|
6068
|
-
columnHelper.accessor(
|
|
6069
|
-
header:
|
|
6068
|
+
columnHelper.accessor("name", {
|
|
6069
|
+
header: "Name"
|
|
6070
6070
|
}),
|
|
6071
|
-
columnHelper.accessor(
|
|
6072
|
-
header:
|
|
6071
|
+
columnHelper.accessor("title", {
|
|
6072
|
+
header: "Title"
|
|
6073
6073
|
}),
|
|
6074
|
-
columnHelper.accessor(
|
|
6075
|
-
header:
|
|
6074
|
+
columnHelper.accessor("type", {
|
|
6075
|
+
header: "Type"
|
|
6076
6076
|
}),
|
|
6077
|
-
columnHelper.accessor(
|
|
6078
|
-
header:
|
|
6077
|
+
columnHelper.accessor("format", {
|
|
6078
|
+
header: "Format"
|
|
6079
6079
|
})
|
|
6080
6080
|
];
|
|
6081
6081
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6765a74df807d015$export$2e2bcd8739ae039), {
|
|
@@ -6119,7 +6119,7 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6119
6119
|
});
|
|
6120
6120
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
6121
6121
|
const tableColumns = [
|
|
6122
|
-
columnHelper.accessor(
|
|
6122
|
+
columnHelper.accessor("titleResizable", {
|
|
6123
6123
|
header: ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6124
6124
|
className: "dc-c-tooltip-width-override",
|
|
6125
6125
|
children: [
|
|
@@ -6128,8 +6128,8 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6128
6128
|
title: "Title represents the column headers of the data file",
|
|
6129
6129
|
// @ts-ignore
|
|
6130
6130
|
style: {
|
|
6131
|
-
border:
|
|
6132
|
-
background:
|
|
6131
|
+
border: "none",
|
|
6132
|
+
background: "none"
|
|
6133
6133
|
},
|
|
6134
6134
|
maxWidth: "400px",
|
|
6135
6135
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
|
|
@@ -6139,48 +6139,48 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6139
6139
|
size: 300,
|
|
6140
6140
|
minSize: 132
|
|
6141
6141
|
}),
|
|
6142
|
-
columnHelper.accessor(
|
|
6143
|
-
header:
|
|
6142
|
+
columnHelper.accessor("description", {
|
|
6143
|
+
header: "Description",
|
|
6144
6144
|
minSize: 600
|
|
6145
6145
|
}),
|
|
6146
|
-
columnHelper.accessor(
|
|
6147
|
-
header:
|
|
6146
|
+
columnHelper.accessor("type", {
|
|
6147
|
+
header: "Type",
|
|
6148
6148
|
size: 150,
|
|
6149
6149
|
enableResizing: false
|
|
6150
6150
|
})
|
|
6151
6151
|
];
|
|
6152
6152
|
const typeOptions = [
|
|
6153
6153
|
{
|
|
6154
|
-
value:
|
|
6155
|
-
label:
|
|
6154
|
+
value: "all",
|
|
6155
|
+
label: "All Types"
|
|
6156
6156
|
},
|
|
6157
6157
|
{
|
|
6158
|
-
value:
|
|
6159
|
-
label:
|
|
6158
|
+
value: "string",
|
|
6159
|
+
label: "String"
|
|
6160
6160
|
},
|
|
6161
6161
|
{
|
|
6162
|
-
value:
|
|
6163
|
-
label:
|
|
6162
|
+
value: "date",
|
|
6163
|
+
label: "Date"
|
|
6164
6164
|
},
|
|
6165
6165
|
{
|
|
6166
|
-
value:
|
|
6167
|
-
label:
|
|
6166
|
+
value: "datetime",
|
|
6167
|
+
label: "Datetime"
|
|
6168
6168
|
},
|
|
6169
6169
|
{
|
|
6170
|
-
value:
|
|
6171
|
-
label:
|
|
6170
|
+
value: "year",
|
|
6171
|
+
label: "Year"
|
|
6172
6172
|
},
|
|
6173
6173
|
{
|
|
6174
|
-
value:
|
|
6175
|
-
label:
|
|
6174
|
+
value: "integer",
|
|
6175
|
+
label: "Integer"
|
|
6176
6176
|
},
|
|
6177
6177
|
{
|
|
6178
|
-
value:
|
|
6179
|
-
label:
|
|
6178
|
+
value: "number",
|
|
6179
|
+
label: "Number"
|
|
6180
6180
|
},
|
|
6181
6181
|
{
|
|
6182
|
-
value:
|
|
6183
|
-
label:
|
|
6182
|
+
value: "boolean",
|
|
6183
|
+
label: "Boolean"
|
|
6184
6184
|
}
|
|
6185
6185
|
];
|
|
6186
6186
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -6287,7 +6287,7 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
|
|
|
6287
6287
|
href: datasetDictionaryEndpoint + "/csv",
|
|
6288
6288
|
className: "ds-c-button",
|
|
6289
6289
|
style: {
|
|
6290
|
-
width:
|
|
6290
|
+
width: "100%"
|
|
6291
6291
|
},
|
|
6292
6292
|
children: [
|
|
6293
6293
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
@@ -6344,7 +6344,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6344
6344
|
const [description, setDescription] = (0, $hgUW1$useState)("");
|
|
6345
6345
|
if (!distribution && !dataset?.identifier) return null;
|
|
6346
6346
|
(0, $hgUW1$useEffect)(()=>{
|
|
6347
|
-
let newDescription =
|
|
6347
|
+
let newDescription = "";
|
|
6348
6348
|
if (customDescription) newDescription = customDescription(dataset, distribution, resource);
|
|
6349
6349
|
else {
|
|
6350
6350
|
if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
|
|
@@ -6359,7 +6359,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6359
6359
|
customDescription
|
|
6360
6360
|
]);
|
|
6361
6361
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6362
|
-
className:
|
|
6362
|
+
className: "ds-u-measure--wide ds-u-margin-bottom--7",
|
|
6363
6363
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6364
6364
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
6365
6365
|
children: typeof description === "string" ? /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6383,7 +6383,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
6383
6383
|
],
|
|
6384
6384
|
queryFn: ()=>{
|
|
6385
6385
|
return fetch(`${dataDictionaryUrl}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA), {
|
|
6386
|
-
arrayFormat:
|
|
6386
|
+
arrayFormat: "comma",
|
|
6387
6387
|
encode: false
|
|
6388
6388
|
})}`).then((res)=>res.json());
|
|
6389
6389
|
}
|
|
@@ -6402,7 +6402,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6402
6402
|
conditions: []
|
|
6403
6403
|
};
|
|
6404
6404
|
const { dataset: dataset, isPending: isPending } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
6405
|
-
const title = dataset.title ? dataset.title :
|
|
6405
|
+
const title = dataset.title ? dataset.title : "";
|
|
6406
6406
|
const metadataMapping = {
|
|
6407
6407
|
...(0, $6da0396069e23175$export$bc27cf7ecf44639d),
|
|
6408
6408
|
...customMetadataMapping
|
|
@@ -6410,7 +6410,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6410
6410
|
let distribution = {};
|
|
6411
6411
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
6412
6412
|
if (distributions.length) distribution = distributions[0];
|
|
6413
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
6413
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
6414
6414
|
...options,
|
|
6415
6415
|
limit: defaultPageSize
|
|
6416
6416
|
}, {
|
|
@@ -6424,7 +6424,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6424
6424
|
}) : null;
|
|
6425
6425
|
(0, $hgUW1$useEffect)(()=>{
|
|
6426
6426
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6427
|
-
if (localFileFormat ===
|
|
6427
|
+
if (localFileFormat === "csv") resource.setResource(distribution.identifier);
|
|
6428
6428
|
}, [
|
|
6429
6429
|
distribution
|
|
6430
6430
|
]);
|
|
@@ -6479,26 +6479,26 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6479
6479
|
distribution,
|
|
6480
6480
|
window.location.hash
|
|
6481
6481
|
]);
|
|
6482
|
-
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType ===
|
|
6482
|
+
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === "application/vnd.tableschema+json" || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
6483
6483
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6484
6484
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
6485
6485
|
content: notFoundContent,
|
|
6486
6486
|
siteUrl: rootUrl
|
|
6487
6487
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6488
|
-
className:
|
|
6488
|
+
className: "ds-l-container",
|
|
6489
6489
|
children: [
|
|
6490
6490
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6491
|
-
className:
|
|
6491
|
+
className: "ds-l-row",
|
|
6492
6492
|
children: [
|
|
6493
6493
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6494
|
-
className:
|
|
6494
|
+
className: "ds-l-md-col--9",
|
|
6495
6495
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
6496
6496
|
className: "ds-text-heading--3xl",
|
|
6497
6497
|
children: title
|
|
6498
6498
|
})
|
|
6499
6499
|
}),
|
|
6500
6500
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6501
|
-
className:
|
|
6501
|
+
className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
|
|
6502
6502
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
6503
6503
|
className: "ds-u-margin--0",
|
|
6504
6504
|
children: [
|
|
@@ -6510,7 +6510,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6510
6510
|
})
|
|
6511
6511
|
}),
|
|
6512
6512
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6513
|
-
className:
|
|
6513
|
+
className: "ds-l-md-col--9",
|
|
6514
6514
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
6515
6515
|
distribution: distribution,
|
|
6516
6516
|
dataset: dataset,
|
|
@@ -6522,9 +6522,9 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6522
6522
|
]
|
|
6523
6523
|
}),
|
|
6524
6524
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6525
|
-
className:
|
|
6525
|
+
className: "ds-l-row",
|
|
6526
6526
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6527
|
-
className:
|
|
6527
|
+
className: "ds-l-md-col--12 dc-dataset",
|
|
6528
6528
|
children: !isPending && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tabs), {
|
|
6529
6529
|
onChange: (selectedId, prevSelectedId)=>{
|
|
6530
6530
|
setSelectedTab(selectedId);
|
|
@@ -6532,7 +6532,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6532
6532
|
selectedId: selectedTab,
|
|
6533
6533
|
children: [
|
|
6534
6534
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6535
|
-
id:
|
|
6535
|
+
id: "data-table",
|
|
6536
6536
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6537
6537
|
className: "ds-u-color--primary",
|
|
6538
6538
|
children: [
|
|
@@ -6542,7 +6542,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6542
6542
|
"Data Table"
|
|
6543
6543
|
]
|
|
6544
6544
|
}),
|
|
6545
|
-
className: borderlessTabs ?
|
|
6545
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6546
6546
|
children: (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
6547
6547
|
value: {
|
|
6548
6548
|
id: id,
|
|
@@ -6559,7 +6559,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6559
6559
|
})
|
|
6560
6560
|
}),
|
|
6561
6561
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6562
|
-
id:
|
|
6562
|
+
id: "overview",
|
|
6563
6563
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6564
6564
|
className: "ds-u-color--primary",
|
|
6565
6565
|
children: [
|
|
@@ -6569,7 +6569,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6569
6569
|
"Overview"
|
|
6570
6570
|
]
|
|
6571
6571
|
}),
|
|
6572
|
-
className: borderlessTabs ?
|
|
6572
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6573
6573
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
|
|
6574
6574
|
resource: resource,
|
|
6575
6575
|
dataset: dataset,
|
|
@@ -6579,7 +6579,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6579
6579
|
})
|
|
6580
6580
|
}),
|
|
6581
6581
|
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6582
|
-
id:
|
|
6582
|
+
id: "data-dictionary",
|
|
6583
6583
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6584
6584
|
className: "ds-u-color--primary",
|
|
6585
6585
|
children: [
|
|
@@ -6589,7 +6589,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6589
6589
|
"Data Dictionary"
|
|
6590
6590
|
]
|
|
6591
6591
|
}),
|
|
6592
|
-
className: borderlessTabs ?
|
|
6592
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6593
6593
|
children: displayDataDictionaryTab ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
6594
6594
|
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
6595
6595
|
datasetDictionaryEndpoint: distribution.data.describedBy,
|
|
@@ -6600,7 +6600,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6600
6600
|
})
|
|
6601
6601
|
}),
|
|
6602
6602
|
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6603
|
-
id:
|
|
6603
|
+
id: "api",
|
|
6604
6604
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6605
6605
|
className: "ds-u-color--primary",
|
|
6606
6606
|
children: [
|
|
@@ -6610,7 +6610,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6610
6610
|
"API"
|
|
6611
6611
|
]
|
|
6612
6612
|
}),
|
|
6613
|
-
className: borderlessTabs ?
|
|
6613
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6614
6614
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
|
|
6615
6615
|
id: id,
|
|
6616
6616
|
rootUrl: rootUrl,
|
|
@@ -6647,13 +6647,13 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6647
6647
|
});
|
|
6648
6648
|
const menu = (0, $hgUW1$useRef)(null);
|
|
6649
6649
|
function closeMobileMenu() {
|
|
6650
|
-
const mobileMenuButtonElement = document.querySelector(
|
|
6650
|
+
const mobileMenuButtonElement = document.querySelector(".dkan-c-mobile-menu-button");
|
|
6651
6651
|
if (!mobileMenuButtonElement) return;
|
|
6652
6652
|
mobileMenuButtonElement.focus();
|
|
6653
6653
|
}
|
|
6654
6654
|
// Close mobile menu with escape.
|
|
6655
6655
|
function handleMenuClose(event) {
|
|
6656
|
-
if (event.key ===
|
|
6656
|
+
if (event.key === "Escape" && mobileMenuOpen) setMobileMenuOpen(false);
|
|
6657
6657
|
}
|
|
6658
6658
|
function handleClick(event) {
|
|
6659
6659
|
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
@@ -6688,7 +6688,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6688
6688
|
const focusableEls = getFocusableElements(menu.current).selectors.visible;
|
|
6689
6689
|
const firstEl = focusableEls[0];
|
|
6690
6690
|
const lastEl = focusableEls[focusableEls.length - 1];
|
|
6691
|
-
if (event.key ===
|
|
6691
|
+
if (event.key === "Tab") {
|
|
6692
6692
|
if (event.shiftKey && document.activeElement === firstEl) {
|
|
6693
6693
|
lastEl?.focus();
|
|
6694
6694
|
event.preventDefault();
|
|
@@ -6700,15 +6700,15 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6700
6700
|
}
|
|
6701
6701
|
};
|
|
6702
6702
|
(0, $hgUW1$useEffect)(()=>{
|
|
6703
|
-
document.addEventListener(
|
|
6704
|
-
document.addEventListener(
|
|
6703
|
+
document.addEventListener("keyup", handleMenuClose);
|
|
6704
|
+
document.addEventListener("mousedown", handleClick);
|
|
6705
6705
|
if (mobileMenuOpen) handleFocusIn();
|
|
6706
6706
|
else closeMobileMenu();
|
|
6707
|
-
if (menu.current) menu.current.addEventListener(
|
|
6707
|
+
if (menu.current) menu.current.addEventListener("keydown", (evt)=>trapFocus(evt));
|
|
6708
6708
|
return ()=>{
|
|
6709
|
-
document.removeEventListener(
|
|
6710
|
-
document.addEventListener(
|
|
6711
|
-
if (menu.current) menu.current.removeEventListener(
|
|
6709
|
+
document.removeEventListener("keyup", handleMenuClose);
|
|
6710
|
+
document.addEventListener("mousedown", handleClick);
|
|
6711
|
+
if (menu.current) menu.current.removeEventListener("keydown", trapFocus);
|
|
6712
6712
|
};
|
|
6713
6713
|
}, [
|
|
6714
6714
|
mobileMenuOpen
|
|
@@ -6723,7 +6723,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6723
6723
|
},
|
|
6724
6724
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
|
|
6725
6725
|
"aria-label": "Site header",
|
|
6726
|
-
className: `dkan-c-header dkan-c-header--${mobileMax ?
|
|
6726
|
+
className: `dkan-c-header dkan-c-header--${mobileMax ? "mobile" : "desktop"}`,
|
|
6727
6727
|
children: [
|
|
6728
6728
|
topNav && topNav,
|
|
6729
6729
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6762,7 +6762,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6762
6762
|
onClick: clickHandler ? clickHandler : undefined,
|
|
6763
6763
|
children: [
|
|
6764
6764
|
innerHtml,
|
|
6765
|
-
link?.target ===
|
|
6765
|
+
link?.target === "_blank" && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ExternalLinkIcon), {
|
|
6766
6766
|
className: "ds-u-margin-left--05 ds-c-external-link-icon"
|
|
6767
6767
|
})
|
|
6768
6768
|
]
|
|
@@ -6772,7 +6772,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6772
6772
|
var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
|
|
6773
6773
|
|
|
6774
6774
|
|
|
6775
|
-
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle =
|
|
6775
|
+
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", {
|
|
6776
6776
|
children: [
|
|
6777
6777
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6778
6778
|
children: "A federal government website managed and paid for by the U.S. Centers for Medicare & Medicaid Services."
|
|
@@ -6860,14 +6860,14 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6860
6860
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
6861
6861
|
className: "ds-u-font-size--sm",
|
|
6862
6862
|
children: footerAdditionalResourcesLinks.filter((link)=>{
|
|
6863
|
-
const noOnClick = Object.keys(link).findIndex((l)=>l ===
|
|
6863
|
+
const noOnClick = Object.keys(link).findIndex((l)=>l === "onClick");
|
|
6864
6864
|
if (noOnClick === -1 || link.onClick && link.dataTag) return link;
|
|
6865
6865
|
}).map((link)=>{
|
|
6866
6866
|
if (link.onClick && link.dataTag) return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
6867
6867
|
className: "ds-u-margin-bottom--1",
|
|
6868
6868
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
6869
6869
|
href: link.url,
|
|
6870
|
-
[
|
|
6870
|
+
["data-" + link.dataTag.name]: link.dataTag.value,
|
|
6871
6871
|
onClick: link.onClick,
|
|
6872
6872
|
children: link.label
|
|
6873
6873
|
})
|
|
@@ -6967,7 +6967,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6967
6967
|
children: [
|
|
6968
6968
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6969
6969
|
id: "svg-inline--fa-title-iRCARP7h6Kp3",
|
|
6970
|
-
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title :
|
|
6970
|
+
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title : "CMS Facebook"
|
|
6971
6971
|
}),
|
|
6972
6972
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6973
6973
|
transform: "translate(160 256)",
|
|
@@ -7020,7 +7020,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7020
7020
|
children: [
|
|
7021
7021
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7022
7022
|
id: "svg-inline--fa-title-4z03ITiPPTVF",
|
|
7023
|
-
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title :
|
|
7023
|
+
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title : "CMS Twitter"
|
|
7024
7024
|
}),
|
|
7025
7025
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
7026
7026
|
transform: "translate(256 256)",
|
|
@@ -7073,7 +7073,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7073
7073
|
children: [
|
|
7074
7074
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7075
7075
|
id: "svg-inline--fa-title-Nm2qsuSKvuRZ",
|
|
7076
|
-
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title :
|
|
7076
|
+
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title : "CMS LinkedIn"
|
|
7077
7077
|
}),
|
|
7078
7078
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
7079
7079
|
transform: "translate(224 256)",
|
|
@@ -7125,7 +7125,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7125
7125
|
children: [
|
|
7126
7126
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7127
7127
|
id: "svg-inline--fa-title-youtube",
|
|
7128
|
-
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title :
|
|
7128
|
+
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title : "CMS youtube"
|
|
7129
7129
|
}),
|
|
7130
7130
|
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
7131
7131
|
fill: "currentColor",
|
|
@@ -7160,7 +7160,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7160
7160
|
className: "ds-u-margin-right--2",
|
|
7161
7161
|
children: [
|
|
7162
7162
|
link.label,
|
|
7163
|
-
link?.target ===
|
|
7163
|
+
link?.target === "_blank" && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ExternalLinkIcon), {
|
|
7164
7164
|
className: "ds-u-margin-left--05 ds-c-external-link-icon"
|
|
7165
7165
|
})
|
|
7166
7166
|
]
|
|
@@ -7230,26 +7230,26 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7230
7230
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
7231
7231
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
7232
7232
|
stackable: true,
|
|
7233
|
-
className:
|
|
7233
|
+
className: "ds-c-table",
|
|
7234
7234
|
children: [
|
|
7235
7235
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
|
|
7236
7236
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
7237
7237
|
children: [
|
|
7238
7238
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7239
|
-
id:
|
|
7240
|
-
headers:
|
|
7239
|
+
id: "application",
|
|
7240
|
+
headers: "Application",
|
|
7241
7241
|
children: "Application"
|
|
7242
|
-
},
|
|
7242
|
+
}, "Application"),
|
|
7243
7243
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7244
|
-
id:
|
|
7245
|
-
headers:
|
|
7244
|
+
id: "notes",
|
|
7245
|
+
headers: "Notes",
|
|
7246
7246
|
children: "Notes"
|
|
7247
|
-
},
|
|
7247
|
+
}, "Notes"),
|
|
7248
7248
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7249
|
-
id:
|
|
7250
|
-
headers:
|
|
7249
|
+
id: "links",
|
|
7250
|
+
headers: "Links",
|
|
7251
7251
|
children: "Links"
|
|
7252
|
-
},
|
|
7252
|
+
}, "Links")
|
|
7253
7253
|
]
|
|
7254
7254
|
})
|
|
7255
7255
|
}),
|
|
@@ -7259,19 +7259,19 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7259
7259
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7260
7260
|
id: d.id,
|
|
7261
7261
|
stackedTitle: "Application",
|
|
7262
|
-
headers:
|
|
7262
|
+
headers: "Application",
|
|
7263
7263
|
children: d.application
|
|
7264
7264
|
}, d.id),
|
|
7265
7265
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7266
7266
|
id: d.id,
|
|
7267
7267
|
stackedTitle: "Notes",
|
|
7268
|
-
headers:
|
|
7268
|
+
headers: "Notes",
|
|
7269
7269
|
children: d.notes
|
|
7270
7270
|
}, `${d.id}-notes`),
|
|
7271
7271
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7272
7272
|
id: d.id,
|
|
7273
7273
|
stackedTitle: "Links",
|
|
7274
|
-
headers:
|
|
7274
|
+
headers: "Links",
|
|
7275
7275
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
7276
7276
|
className: "dkan-newtab",
|
|
7277
7277
|
href: d.link,
|
|
@@ -7299,44 +7299,44 @@ var $5655284dbbb89508$export$2e2bcd8739ae039 = $5655284dbbb89508$var$Documentati
|
|
|
7299
7299
|
|
|
7300
7300
|
const $c7bf75f7e8a68780$export$7850f4d545d994c6 = [
|
|
7301
7301
|
{
|
|
7302
|
-
id:
|
|
7303
|
-
application:
|
|
7304
|
-
notes:
|
|
7305
|
-
link:
|
|
7306
|
-
linkText:
|
|
7307
|
-
screenReaderOnlyText:
|
|
7302
|
+
id: "excel",
|
|
7303
|
+
application: "Microsoft Excel",
|
|
7304
|
+
notes: "Official size limitations for Microsoft Excel",
|
|
7305
|
+
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",
|
|
7306
|
+
linkText: "Excel Specifications and Limits",
|
|
7307
|
+
screenReaderOnlyText: "on microsoft.com"
|
|
7308
7308
|
},
|
|
7309
7309
|
{
|
|
7310
|
-
id:
|
|
7311
|
-
application:
|
|
7312
|
-
notes:
|
|
7313
|
-
link:
|
|
7314
|
-
linkText:
|
|
7315
|
-
screenReaderOnlyText:
|
|
7310
|
+
id: "access",
|
|
7311
|
+
application: "Microsoft Access",
|
|
7312
|
+
notes: "Official size limitations for Microsoft Access",
|
|
7313
|
+
link: "https://support.microsoft.com/en-us/office/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c?ui=en-us&rs=en-us&ad=us",
|
|
7314
|
+
linkText: "Access 2016 Specifications",
|
|
7315
|
+
screenReaderOnlyText: "on microsoft.com"
|
|
7316
7316
|
},
|
|
7317
7317
|
{
|
|
7318
|
-
id:
|
|
7319
|
-
application:
|
|
7320
|
-
notes:
|
|
7321
|
-
link:
|
|
7322
|
-
linkText:
|
|
7323
|
-
screenReaderOnlyText:
|
|
7318
|
+
id: "oracle-sql-developer",
|
|
7319
|
+
application: "Oracle SQL Developer",
|
|
7320
|
+
notes: "Oracle SQL Developer tool",
|
|
7321
|
+
link: "https://www.oracle.com/database/sqldeveloper/",
|
|
7322
|
+
linkText: "Oracle SQL Developer Overview",
|
|
7323
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7324
7324
|
},
|
|
7325
7325
|
{
|
|
7326
|
-
id:
|
|
7327
|
-
application:
|
|
7328
|
-
notes:
|
|
7329
|
-
link:
|
|
7330
|
-
linkText:
|
|
7331
|
-
screenReaderOnlyText:
|
|
7326
|
+
id: "oracle-database",
|
|
7327
|
+
application: "Oracle Database",
|
|
7328
|
+
notes: "Oracle Database official size limitations",
|
|
7329
|
+
link: "https://docs.oracle.com/cd/B28359_01/server.111/b28320/limits002.htm#i287915",
|
|
7330
|
+
linkText: "Oracle Physical Database Limits",
|
|
7331
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7332
7332
|
},
|
|
7333
7333
|
{
|
|
7334
|
-
id:
|
|
7335
|
-
application:
|
|
7336
|
-
notes:
|
|
7337
|
-
link:
|
|
7338
|
-
linkText:
|
|
7339
|
-
screenReaderOnlyText:
|
|
7334
|
+
id: "oracle-sql-client-tools",
|
|
7335
|
+
application: "Oracle SQL Client Tools",
|
|
7336
|
+
notes: "Oracle SQL Client Tools",
|
|
7337
|
+
link: "https://www.oracle.com/database/technologies/oracle-database-software-downloads.html",
|
|
7338
|
+
linkText: "Oracle SQL Client",
|
|
7339
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7340
7340
|
}
|
|
7341
7341
|
];
|
|
7342
7342
|
|
|
@@ -7364,7 +7364,7 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7364
7364
|
}),
|
|
7365
7365
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
7366
7366
|
heading: "Notice",
|
|
7367
|
-
className:
|
|
7367
|
+
className: "ds-u-margin-top--6",
|
|
7368
7368
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
7369
7369
|
className: "ds-c-alert__text",
|
|
7370
7370
|
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."
|
|
@@ -7373,16 +7373,16 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7373
7373
|
]
|
|
7374
7374
|
}),
|
|
7375
7375
|
/*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7376
|
-
className:
|
|
7376
|
+
className: "ds-u-margin-top--4 ds-l-row",
|
|
7377
7377
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7378
|
-
className:
|
|
7378
|
+
className: "ds-l-col--12",
|
|
7379
7379
|
children: [
|
|
7380
7380
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
7381
7381
|
className: "ds-text-heading--2xl ds-text-heading--2xl",
|
|
7382
7382
|
children: "Documentation by Application"
|
|
7383
7383
|
}),
|
|
7384
7384
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7385
|
-
className:
|
|
7385
|
+
className: "ds-u-margin-top--4",
|
|
7386
7386
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5655284dbbb89508$export$2e2bcd8739ae039), {
|
|
7387
7387
|
data: documentationList
|
|
7388
7388
|
})
|
|
@@ -7410,7 +7410,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7410
7410
|
const options = {
|
|
7411
7411
|
conditions: query ? JSON.parse(query).map(({ column: column, operator: operator, ...rest })=>({
|
|
7412
7412
|
property: column,
|
|
7413
|
-
operator: operator ===
|
|
7413
|
+
operator: operator === "is" ? "=" : operator === "is not" ? "<>" : operator === "or" ? "in" : operator,
|
|
7414
7414
|
...rest
|
|
7415
7415
|
})) : []
|
|
7416
7416
|
};
|
|
@@ -7418,13 +7418,13 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7418
7418
|
let distribution = {};
|
|
7419
7419
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
7420
7420
|
if (distributions.length) distribution = distributions[distributionIndex];
|
|
7421
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7421
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
7422
7422
|
...options,
|
|
7423
7423
|
limit: defaultPageSize
|
|
7424
7424
|
});
|
|
7425
7425
|
(0, $hgUW1$useEffect)(()=>{
|
|
7426
7426
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
7427
|
-
if (localFileFormat ===
|
|
7427
|
+
if (localFileFormat === "csv") resource.setResource(distribution.identifier);
|
|
7428
7428
|
}, [
|
|
7429
7429
|
distribution
|
|
7430
7430
|
]);
|
|
@@ -7474,7 +7474,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7474
7474
|
|
|
7475
7475
|
|
|
7476
7476
|
function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
|
|
7477
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7477
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
7478
7478
|
const newDate = new Date(condition.value);
|
|
7479
7479
|
if (newDate instanceof Date && !isNaN(newDate)) return newDate;
|
|
7480
7480
|
}
|
|
@@ -7491,9 +7491,9 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7491
7491
|
const [startDate, setStartDate] = (0, $hgUW1$react).useState($374c4669b044ddf8$var$getStartDate(condition, schema, id));
|
|
7492
7492
|
(0, $hgUW1$useEffect)(()=>{
|
|
7493
7493
|
if (property !== condition.property) {
|
|
7494
|
-
if (property) update(index,
|
|
7495
|
-
else update(index,
|
|
7496
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7494
|
+
if (property) update(index, "property", property);
|
|
7495
|
+
else update(index, "property", "");
|
|
7496
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
7497
7497
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
7498
7498
|
}
|
|
7499
7499
|
}
|
|
@@ -7507,16 +7507,16 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7507
7507
|
]);
|
|
7508
7508
|
(0, $hgUW1$useEffect)(()=>{
|
|
7509
7509
|
if (operator !== condition.operator) {
|
|
7510
|
-
if (operator) update(index,
|
|
7511
|
-
else update(index,
|
|
7510
|
+
if (operator) update(index, "operator", operator);
|
|
7511
|
+
else update(index, "operator", "");
|
|
7512
7512
|
}
|
|
7513
7513
|
}, [
|
|
7514
7514
|
operator
|
|
7515
7515
|
]);
|
|
7516
7516
|
(0, $hgUW1$useEffect)(()=>{
|
|
7517
7517
|
if (value !== condition.value) {
|
|
7518
|
-
if (value) update(index,
|
|
7519
|
-
else update(index,
|
|
7518
|
+
if (value) update(index, "value", value);
|
|
7519
|
+
else update(index, "value", "");
|
|
7520
7520
|
}
|
|
7521
7521
|
}, [
|
|
7522
7522
|
value
|
|
@@ -7540,7 +7540,7 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7540
7540
|
onChange: (e)=>setOperator(e.target.value),
|
|
7541
7541
|
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"
|
|
7542
7542
|
}),
|
|
7543
|
-
schema[id].fields[property].mysql_type ===
|
|
7543
|
+
schema[id].fields[property].mysql_type === "date" ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7544
7544
|
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",
|
|
7545
7545
|
children: [
|
|
7546
7546
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
@@ -7630,12 +7630,12 @@ const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions, schema: sche
|
|
|
7630
7630
|
className: "ds-u-font-weight--bold",
|
|
7631
7631
|
children: description
|
|
7632
7632
|
}),
|
|
7633
|
-
|
|
7633
|
+
" ",
|
|
7634
7634
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7635
7635
|
className: "ds-u-font-weight--normal",
|
|
7636
7636
|
children: operator.label.toUpperCase()
|
|
7637
7637
|
}),
|
|
7638
|
-
|
|
7638
|
+
" ",
|
|
7639
7639
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7640
7640
|
className: "ds-u-color--success",
|
|
7641
7641
|
children: formattedText
|
|
@@ -7662,19 +7662,19 @@ var $bef7bff2823feea2$export$2e2bcd8739ae039 = $bef7bff2823feea2$var$QueryTitle;
|
|
|
7662
7662
|
function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
|
|
7663
7663
|
let cond = condition;
|
|
7664
7664
|
delete cond.key;
|
|
7665
|
-
if (cond.operator ===
|
|
7665
|
+
if (cond.operator === "=" || cond.operator === "<>") {
|
|
7666
7666
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7667
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7667
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
7668
7668
|
}
|
|
7669
|
-
if (cond.operator.toLowerCase() ===
|
|
7669
|
+
if (cond.operator.toLowerCase() === "like") {
|
|
7670
7670
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7671
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7671
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
7672
7672
|
cond.value = `%${cleanedValue}%`;
|
|
7673
7673
|
}
|
|
7674
|
-
if (cond.operator.toLowerCase() ===
|
|
7675
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
7674
|
+
if (cond.operator.toLowerCase() === "in") {
|
|
7675
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(",");
|
|
7676
7676
|
}
|
|
7677
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
7677
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
|
|
7678
7678
|
return cond;
|
|
7679
7679
|
}
|
|
7680
7680
|
const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, setOffset: setOffset })=>{
|
|
@@ -7694,7 +7694,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7694
7694
|
...queryConditions,
|
|
7695
7695
|
{
|
|
7696
7696
|
property: fields[0],
|
|
7697
|
-
value:
|
|
7697
|
+
value: "",
|
|
7698
7698
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
7699
7699
|
key: Date.now()
|
|
7700
7700
|
}
|
|
@@ -7734,7 +7734,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7734
7734
|
encodeValuesOnly: true,
|
|
7735
7735
|
addQueryPrefix: true
|
|
7736
7736
|
});
|
|
7737
|
-
window.history.pushState({},
|
|
7737
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
7738
7738
|
};
|
|
7739
7739
|
const updateCondition = (index, key, value)=>{
|
|
7740
7740
|
let newConditions = [
|
|
@@ -7807,7 +7807,7 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
|
|
|
7807
7807
|
|
|
7808
7808
|
|
|
7809
7809
|
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 })=>{
|
|
7810
|
-
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState(
|
|
7810
|
+
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState("ds-u-padding-y--1");
|
|
7811
7811
|
let apiDocs = (0, $hgUW1$useRef)();
|
|
7812
7812
|
let distribution = {};
|
|
7813
7813
|
let distribution_array = dataset.distribution ? dataset.distribution : [];
|
|
@@ -7819,7 +7819,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7819
7819
|
} : {
|
|
7820
7820
|
conditions: []
|
|
7821
7821
|
};
|
|
7822
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7822
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
7823
7823
|
...options,
|
|
7824
7824
|
limit: 25
|
|
7825
7825
|
}, {
|
|
@@ -7835,7 +7835,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7835
7835
|
}, {
|
|
7836
7836
|
encode: true
|
|
7837
7837
|
})}&format=csv`;
|
|
7838
|
-
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !==
|
|
7838
|
+
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !== "csv" ? distribution.data.title : dataset.title;
|
|
7839
7839
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
7840
7840
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7841
7841
|
className: "ds-l-container ds-u-padding-bottom--3 ds-u-margin-bottom--2",
|
|
@@ -7844,7 +7844,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7844
7844
|
children: Object.keys(distribution).length && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
7845
7845
|
children: [
|
|
7846
7846
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7847
|
-
className:
|
|
7847
|
+
className: "ds-l-md-col--9",
|
|
7848
7848
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
7849
7849
|
to: `/dataset/${id}`,
|
|
7850
7850
|
className: "ds-u-padding-y--4 ds-u-display--block",
|
|
@@ -7855,14 +7855,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7855
7855
|
})
|
|
7856
7856
|
}),
|
|
7857
7857
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7858
|
-
className:
|
|
7858
|
+
className: "ds-l-md-col--9",
|
|
7859
7859
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
7860
7860
|
className: "ds-text-heading--3xl",
|
|
7861
7861
|
children: customTitle ? customTitle : pageTitle
|
|
7862
7862
|
})
|
|
7863
7863
|
}),
|
|
7864
7864
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7865
|
-
className:
|
|
7865
|
+
className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
|
|
7866
7866
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
7867
7867
|
className: "ds-u-margin--0",
|
|
7868
7868
|
children: [
|
|
@@ -7874,7 +7874,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7874
7874
|
})
|
|
7875
7875
|
}),
|
|
7876
7876
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7877
|
-
className:
|
|
7877
|
+
className: "ds-l-md-col--9",
|
|
7878
7878
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
7879
7879
|
distribution: distribution,
|
|
7880
7880
|
dataset: dataset,
|
|
@@ -7884,13 +7884,13 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7884
7884
|
})
|
|
7885
7885
|
}),
|
|
7886
7886
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7887
|
-
className:
|
|
7887
|
+
className: "ds-l-md-col--12",
|
|
7888
7888
|
children: Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
|
|
7889
7889
|
resource: resource,
|
|
7890
7890
|
id: distribution.identifier,
|
|
7891
7891
|
customColumns: customColumns,
|
|
7892
7892
|
setOffset: resource.setOffset
|
|
7893
|
-
}) :
|
|
7893
|
+
}) : ""
|
|
7894
7894
|
}),
|
|
7895
7895
|
Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
7896
7896
|
value: {
|
|
@@ -7901,7 +7901,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7901
7901
|
customColumns: (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution_array[distIndex].identifier])
|
|
7902
7902
|
},
|
|
7903
7903
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7904
|
-
className:
|
|
7904
|
+
className: "ds-l-md-col--12",
|
|
7905
7905
|
children: [
|
|
7906
7906
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $af099c546cb226c7$export$2e2bcd8739ae039), {
|
|
7907
7907
|
includeDensity: true,
|
|
@@ -7923,14 +7923,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7923
7923
|
]
|
|
7924
7924
|
})
|
|
7925
7925
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7926
|
-
className:
|
|
7926
|
+
className: "ds-l-md-col--12",
|
|
7927
7927
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
7928
7928
|
role: "status",
|
|
7929
7929
|
"aria-valuetext": "Resource loading"
|
|
7930
7930
|
})
|
|
7931
7931
|
}),
|
|
7932
7932
|
dataset.identifier && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7933
|
-
className:
|
|
7933
|
+
className: "ds-l-md-col--12",
|
|
7934
7934
|
ref: apiDocs,
|
|
7935
7935
|
children: [
|
|
7936
7936
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
@@ -7939,7 +7939,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7939
7939
|
}),
|
|
7940
7940
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
7941
7941
|
url: `${rootUrl}/metastore/schemas/dataset/items/${dataset.identifier}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`,
|
|
7942
|
-
docExpansion:
|
|
7942
|
+
docExpansion: "list",
|
|
7943
7943
|
defaultModelsExpandDepth: -1
|
|
7944
7944
|
})
|
|
7945
7945
|
]
|
|
@@ -7958,7 +7958,7 @@ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, loca
|
|
|
7958
7958
|
const [ready, setReady] = (0, $hgUW1$useState)(false);
|
|
7959
7959
|
const [error, setError] = (0, $hgUW1$useState)(false);
|
|
7960
7960
|
const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
7961
|
-
const distIndex = dist_id ===
|
|
7961
|
+
const distIndex = dist_id === "data" ? 0 : dist_id;
|
|
7962
7962
|
(0, $hgUW1$useEffect)(()=>{
|
|
7963
7963
|
if (dataset.error) setError(true);
|
|
7964
7964
|
if (dataset.distribution && dataset.distribution.length) {
|