@civicactions/cmsds-open-data-components 4.0.0-alpha.4 → 4.0.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/dist/main.css.map +1 -1
- package/dist/main.js +559 -551
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +44 -45
- package/dist/types.d.ts.map +1 -1
- package/package.json +10 -3
package/dist/main.js
CHANGED
|
@@ -41,7 +41,7 @@ function $e49d4387bed21287$export$2e2bcd8739ae039() {
|
|
|
41
41
|
/*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
|
|
42
42
|
children: "offset"
|
|
43
43
|
}),
|
|
44
|
-
|
|
44
|
+
" ",
|
|
45
45
|
"parameters to iterate through result sets that are larger than the row limit when running queries against the datastore API."
|
|
46
46
|
]
|
|
47
47
|
})
|
|
@@ -72,7 +72,7 @@ var $3c72c298c3a7f21f$export$2e2bcd8739ae039 = $3c72c298c3a7f21f$var$HeaderTagli
|
|
|
72
72
|
const $1555e1cb3eb7b3e3$var$HeaderNavIconLink = (props)=>{
|
|
73
73
|
const { url: url, urlTitle: urlTitle, logoFilePath: logoFilePath, logoAltText: logoAltText, backArrow: backArrow } = props;
|
|
74
74
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
75
|
-
className: `dkan-c-header-nav-icon-link ${backArrow ?
|
|
75
|
+
className: `dkan-c-header-nav-icon-link ${backArrow ? "show-back-arrow" : ""} ds-u-valign--middle `,
|
|
76
76
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
77
77
|
href: url,
|
|
78
78
|
title: urlTitle,
|
|
@@ -232,7 +232,7 @@ const $046ded0064bd0a3d$var$FAQAccordion = (props)=>{
|
|
|
232
232
|
type: "button",
|
|
233
233
|
variation: "ghost",
|
|
234
234
|
onClick: ()=>toggleAll(),
|
|
235
|
-
children: `${expanded ?
|
|
235
|
+
children: `${expanded ? "Collapse" : "Expand"} all FAQs`
|
|
236
236
|
}),
|
|
237
237
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
|
|
238
238
|
children: faqItems.map((faq)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
@@ -333,8 +333,8 @@ const $844981eac9b63865$export$eccc29c8d0ff408 = (0, $hgUW1$createContext)({
|
|
|
333
333
|
|
|
334
334
|
|
|
335
335
|
const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 4, defaultSort: defaultSort = {
|
|
336
|
-
defaultSort:
|
|
337
|
-
defaultOrder:
|
|
336
|
+
defaultSort: "modified",
|
|
337
|
+
defaultOrder: "desc"
|
|
338
338
|
}, subLinkClasses: subLinkClasses })=>{
|
|
339
339
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
340
340
|
const [currentResultNumbers, setCurrentResultNumbers] = (0, $hgUW1$useState)({
|
|
@@ -354,8 +354,8 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
|
|
|
354
354
|
]);
|
|
355
355
|
let params = {
|
|
356
356
|
sort: defaultSort.defaultSort,
|
|
357
|
-
[
|
|
358
|
-
[
|
|
357
|
+
["sort-order"]: defaultSort.defaultOrder,
|
|
358
|
+
["page-size"]: defaultPageSize
|
|
359
359
|
};
|
|
360
360
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
361
361
|
queryKey: [
|
|
@@ -364,7 +364,7 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
|
|
|
364
364
|
],
|
|
365
365
|
queryFn: ()=>{
|
|
366
366
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
367
|
-
arrayFormat:
|
|
367
|
+
arrayFormat: "comma",
|
|
368
368
|
encode: false
|
|
369
369
|
})}`);
|
|
370
370
|
}
|
|
@@ -507,11 +507,11 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
507
507
|
function handleFocusOut(event) {
|
|
508
508
|
if (currentMenu && !currentMenu.contains(event.relatedTarget)) setIsExpanded(false);
|
|
509
509
|
}
|
|
510
|
-
document.addEventListener(
|
|
511
|
-
currentMenu?.addEventListener(
|
|
510
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
511
|
+
currentMenu?.addEventListener("focusout", handleFocusOut);
|
|
512
512
|
return ()=>{
|
|
513
|
-
document.removeEventListener(
|
|
514
|
-
if (currentMenu) currentMenu.removeEventListener(
|
|
513
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
514
|
+
if (currentMenu) currentMenu.removeEventListener("focusout", handleFocusOut);
|
|
515
515
|
};
|
|
516
516
|
}, [
|
|
517
517
|
isExpanded
|
|
@@ -533,7 +533,7 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
536
|
-
className: `dkan-c-nav-submenu has-submenu${isExpanded ?
|
|
536
|
+
className: `dkan-c-nav-submenu has-submenu${isExpanded ? " open" : ""}`,
|
|
537
537
|
ref: menu,
|
|
538
538
|
children: [
|
|
539
539
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
@@ -569,12 +569,12 @@ var $4f153ca537d853e5$export$2e2bcd8739ae039 = $4f153ca537d853e5$var$SubMenu;
|
|
|
569
569
|
const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
|
|
570
570
|
const { headingText: headingText = "Dataset Search" } = props;
|
|
571
571
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
572
|
-
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)(
|
|
572
|
+
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)("");
|
|
573
573
|
const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
|
|
574
574
|
function searchForDataset(e) {
|
|
575
575
|
e.preventDefault();
|
|
576
576
|
if (window) {
|
|
577
|
-
if (window.location.pathname !==
|
|
577
|
+
if (window.location.pathname !== "/datasets") navigate(`/datasets?fulltext=${modalSearchTerm}`);
|
|
578
578
|
else {
|
|
579
579
|
window.location.search = `fulltext=${modalSearchTerm}`;
|
|
580
580
|
setModalSearch(false);
|
|
@@ -642,9 +642,9 @@ const $b939b31651e82908$var$HeaderNav = (props)=>{
|
|
|
642
642
|
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
643
643
|
const { links: links, topNavLinks: topNavLinks, wrapperClasses: wrapperClasses, searchInMobile: searchInMobile } = props;
|
|
644
644
|
const navMenuOpenClass = `dkan-c-nav-menu--${headerContext.mobileMenuOpen ? "open" : "close"}`;
|
|
645
|
-
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ?
|
|
646
|
-
const linkClasses =
|
|
647
|
-
const listClasses =
|
|
645
|
+
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ? "mobile" : "desktop"}`;
|
|
646
|
+
const linkClasses = "dkan-c-header--link ds-c-button ds-c-button--ghost";
|
|
647
|
+
const listClasses = "dkan-c-header--link-list ";
|
|
648
648
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
649
649
|
className: `dkan-c-nav-menu ${wrapperClasses} ${navMenuOpenClass} ${isMobileClass}`,
|
|
650
650
|
ref: headerContext.menuRef,
|
|
@@ -814,8 +814,8 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
814
814
|
const { title: title, links: links, mobileMax: mobileMax } = props;
|
|
815
815
|
const active = (0, $hgUW1$useLocation)().pathname;
|
|
816
816
|
const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
|
|
817
|
-
const styleClasses =
|
|
818
|
-
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ?
|
|
817
|
+
const styleClasses = "dkan-c--sidebar-nav-wrapper ds-u-border--1 ds-u-border--color-gray-lightest ds-u-padding--2";
|
|
818
|
+
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ? "mobile" : "desktop"}`;
|
|
819
819
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
820
820
|
className: `dkan-c-sidebar-nav ${mobileClass}`,
|
|
821
821
|
children: [
|
|
@@ -829,7 +829,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
829
829
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
830
830
|
"aria-haspopup": "true",
|
|
831
831
|
variation: "ghost",
|
|
832
|
-
"aria-expanded": `${menuOpen ?
|
|
832
|
+
"aria-expanded": `${menuOpen ? "true" : "false"}`,
|
|
833
833
|
onDark: true,
|
|
834
834
|
onClick: ()=>setMenuOpen(!menuOpen),
|
|
835
835
|
children: [
|
|
@@ -838,7 +838,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
838
838
|
children: "Toggle menu"
|
|
839
839
|
}),
|
|
840
840
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
|
|
841
|
-
direction: menuOpen ?
|
|
841
|
+
direction: menuOpen ? "up" : "down"
|
|
842
842
|
})
|
|
843
843
|
]
|
|
844
844
|
})
|
|
@@ -847,7 +847,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
847
847
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
848
848
|
className: ``,
|
|
849
849
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
|
|
850
|
-
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ?
|
|
850
|
+
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ? "open" : "close"}`,
|
|
851
851
|
children: [
|
|
852
852
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
853
853
|
className: "ds-u-padding--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest",
|
|
@@ -859,7 +859,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
859
859
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
860
860
|
className: "ds-u-padding-bottom--2",
|
|
861
861
|
children: links.map(({ url: url, label: label })=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
862
|
-
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ?
|
|
862
|
+
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ? "active" : ""}`,
|
|
863
863
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
864
864
|
className: "ds-u-display--flex ds-u-padding-y--1",
|
|
865
865
|
children: [
|
|
@@ -894,12 +894,12 @@ const $b0968edc60d7d3a4$var$SidebarPage = (props)=>{
|
|
|
894
894
|
query: `(max-width: ${mobileMaxWidth}px)`
|
|
895
895
|
});
|
|
896
896
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
897
|
-
className: `${mobileMax ? "a" :
|
|
897
|
+
className: `${mobileMax ? "a" : "ds-l-container"}`,
|
|
898
898
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
899
|
-
className: `${mobileMax ? "a" :
|
|
899
|
+
className: `${mobileMax ? "a" : "ds-l-row"}`,
|
|
900
900
|
children: [
|
|
901
901
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
902
|
-
className: `${mobileMax ?
|
|
902
|
+
className: `${mobileMax ? "a" : "ds-l-col--4"}`,
|
|
903
903
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $953b286f7778640e$export$2e2bcd8739ae039), {
|
|
904
904
|
links: links,
|
|
905
905
|
title: menuTitle,
|
|
@@ -922,9 +922,9 @@ var $b0968edc60d7d3a4$export$2e2bcd8739ae039 = $b0968edc60d7d3a4$var$SidebarPage
|
|
|
922
922
|
|
|
923
923
|
|
|
924
924
|
|
|
925
|
-
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl =
|
|
925
|
+
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl = "datasets", searchKey: searchKey = "fulltext", textfieldLabel: textfieldLabel = "Search for a dataset", searchButtonText: searchButtonText = "Search" })=>{
|
|
926
926
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
927
|
-
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState(
|
|
927
|
+
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState("");
|
|
928
928
|
function submitHero(e) {
|
|
929
929
|
e.preventDefault();
|
|
930
930
|
navigate(`/${searchUrl}?${searchKey}=${searchValue}`);
|
|
@@ -951,24 +951,24 @@ const $59a079354baa335c$var$Hero = ({ title: title, description: description, se
|
|
|
951
951
|
onSubmit: (e)=>submitHero(e),
|
|
952
952
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
953
953
|
style: {
|
|
954
|
-
position:
|
|
954
|
+
position: "relative"
|
|
955
955
|
},
|
|
956
956
|
className: "ds-l-row ds-u-align-items--stretch ds-u-margin-y--4 ds-u-flex-wrap--nowrap",
|
|
957
957
|
children: [
|
|
958
958
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
959
959
|
className: "ds-u-padding--0 ds-u-margin-right--1",
|
|
960
960
|
style: {
|
|
961
|
-
flex:
|
|
962
|
-
maxWidth:
|
|
961
|
+
flex: "1 1 100%",
|
|
962
|
+
maxWidth: "100%"
|
|
963
963
|
},
|
|
964
964
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
965
965
|
label: textfieldLabel,
|
|
966
966
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
967
967
|
name: "search_text_input",
|
|
968
968
|
style: {
|
|
969
|
-
maxWidth:
|
|
970
|
-
height:
|
|
971
|
-
margin:
|
|
969
|
+
maxWidth: "none",
|
|
970
|
+
height: "61px",
|
|
971
|
+
margin: "0 20px 0 0"
|
|
972
972
|
},
|
|
973
973
|
onChange: (e)=>setSearchValue(e.target.value)
|
|
974
974
|
})
|
|
@@ -1006,14 +1006,14 @@ var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
|
|
|
1006
1006
|
|
|
1007
1007
|
|
|
1008
1008
|
const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date, options: options = {
|
|
1009
|
-
year:
|
|
1010
|
-
month:
|
|
1011
|
-
day:
|
|
1012
|
-
timeZone:
|
|
1009
|
+
year: "numeric",
|
|
1010
|
+
month: "long",
|
|
1011
|
+
day: "numeric",
|
|
1012
|
+
timeZone: "UTC"
|
|
1013
1013
|
} })=>{
|
|
1014
1014
|
const rawDate = new Date(date);
|
|
1015
|
-
let modifiedDate =
|
|
1016
|
-
if (rawDate) modifiedDate = rawDate.toLocaleDateString(
|
|
1015
|
+
let modifiedDate = "";
|
|
1016
|
+
if (rawDate) modifiedDate = rawDate.toLocaleDateString("en-US", options);
|
|
1017
1017
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
1018
1018
|
children: modifiedDate
|
|
1019
1019
|
});
|
|
@@ -1027,25 +1027,25 @@ const $c068004d499082cc$var$DatasetListItem = (props)=>{
|
|
|
1027
1027
|
minWidth: 1024
|
|
1028
1028
|
});
|
|
1029
1029
|
const { title: title, modified: modified, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
|
|
1030
|
-
let linkContainerClasses =
|
|
1031
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1032
|
-
else linkContainerClasses +=
|
|
1033
|
-
let linkClasses =
|
|
1030
|
+
let linkContainerClasses = "ds-u-margin-bottom--2";
|
|
1031
|
+
if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
|
|
1032
|
+
else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
|
|
1033
|
+
let linkClasses = "ds-u-display--block ds-u-text-align--left";
|
|
1034
1034
|
if (desktop) {
|
|
1035
|
-
linkContainerClasses =
|
|
1036
|
-
linkClasses +=
|
|
1035
|
+
linkContainerClasses = "ds-u-padding-x--0";
|
|
1036
|
+
linkClasses += " ds-l-col--4 ds-l-md-col--auto";
|
|
1037
1037
|
}
|
|
1038
1038
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1039
1039
|
className: "dc-c-list-item ds-u-padding-top--4",
|
|
1040
1040
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1041
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1041
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
|
|
1042
1042
|
children: [
|
|
1043
1043
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1044
1044
|
className: "ds-l-row ds-u-align-items--start",
|
|
1045
1045
|
children: [
|
|
1046
1046
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1047
1047
|
id: `dataset-${identifier}-updated-date`,
|
|
1048
|
-
className: `ds-l-col--12 ds-u-text-align--left ds-text-heading--sm ${paginationEnabled ?
|
|
1048
|
+
className: `ds-l-col--12 ds-u-text-align--left ds-text-heading--sm ${paginationEnabled ? "ds-u-padding-top--3" : "ds-u-padding-top--0"}`,
|
|
1049
1049
|
children: [
|
|
1050
1050
|
"Updated ",
|
|
1051
1051
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
@@ -1103,7 +1103,7 @@ var $c068004d499082cc$export$2e2bcd8739ae039 = $c068004d499082cc$var$DatasetList
|
|
|
1103
1103
|
|
|
1104
1104
|
const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
1105
1105
|
switch(props.id){
|
|
1106
|
-
case
|
|
1106
|
+
case "overview":
|
|
1107
1107
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1108
1108
|
width: "16px",
|
|
1109
1109
|
height: "16px",
|
|
@@ -1146,7 +1146,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1146
1146
|
})
|
|
1147
1147
|
]
|
|
1148
1148
|
});
|
|
1149
|
-
case
|
|
1149
|
+
case "data-table":
|
|
1150
1150
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1151
1151
|
width: "16px",
|
|
1152
1152
|
height: "12px",
|
|
@@ -1179,7 +1179,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1179
1179
|
})
|
|
1180
1180
|
]
|
|
1181
1181
|
});
|
|
1182
|
-
case
|
|
1182
|
+
case "api":
|
|
1183
1183
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1184
1184
|
width: "16px",
|
|
1185
1185
|
height: "13px",
|
|
@@ -1212,7 +1212,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1212
1212
|
})
|
|
1213
1213
|
]
|
|
1214
1214
|
});
|
|
1215
|
-
case
|
|
1215
|
+
case "download":
|
|
1216
1216
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1217
1217
|
width: "16px",
|
|
1218
1218
|
height: "16px",
|
|
@@ -1242,7 +1242,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1242
1242
|
})
|
|
1243
1243
|
]
|
|
1244
1244
|
});
|
|
1245
|
-
case
|
|
1245
|
+
case "data-dictionary":
|
|
1246
1246
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1247
1247
|
width: "14px",
|
|
1248
1248
|
height: "16px",
|
|
@@ -1345,13 +1345,13 @@ var $b61856b23f5f58a2$export$2e2bcd8739ae039 = $b61856b23f5f58a2$var$LargeFileDi
|
|
|
1345
1345
|
|
|
1346
1346
|
|
|
1347
1347
|
function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240) {
|
|
1348
|
-
if (!textString) return
|
|
1348
|
+
if (!textString) return "";
|
|
1349
1349
|
let cleanedText = textString;
|
|
1350
|
-
if (cleanedText.split(
|
|
1351
|
-
if (cleanedText.split(
|
|
1350
|
+
if (cleanedText.split("</p>").length > 1) cleanedText = cleanedText.split("</p>")[0];
|
|
1351
|
+
if (cleanedText.split("<br/>").length > 1) cleanedText = cleanedText.split("<br/>")[0];
|
|
1352
1352
|
cleanedText = (0, $hgUW1$lodashtruncate)(cleanedText, {
|
|
1353
|
-
|
|
1354
|
-
|
|
1353
|
+
"length": textLength,
|
|
1354
|
+
"separator": " "
|
|
1355
1355
|
});
|
|
1356
1356
|
return (0, $hgUW1$dompurify).sanitize(cleanedText, {
|
|
1357
1357
|
ALLOWED_TAGS: []
|
|
@@ -1369,9 +1369,9 @@ function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240)
|
|
|
1369
1369
|
const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
1370
1370
|
const { type: type, date: date, boldLabel: boldLabel = false, displayTooltips: displayTooltips = true } = props;
|
|
1371
1371
|
const dateText = {
|
|
1372
|
-
modified:
|
|
1373
|
-
released:
|
|
1374
|
-
refresh:
|
|
1372
|
+
modified: "Last Modified",
|
|
1373
|
+
released: "Released",
|
|
1374
|
+
refresh: "Planned Update"
|
|
1375
1375
|
};
|
|
1376
1376
|
const tooltipContent = {
|
|
1377
1377
|
modified: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -1408,7 +1408,7 @@ const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
|
1408
1408
|
})
|
|
1409
1409
|
};
|
|
1410
1410
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1411
|
-
className: `dataset-date-item${boldLabel ?
|
|
1411
|
+
className: `dataset-date-item${boldLabel ? " bold-label" : ""}`,
|
|
1412
1412
|
children: [
|
|
1413
1413
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1414
1414
|
className: "dataset-data-item-label",
|
|
@@ -1478,7 +1478,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
1478
1478
|
if (dist && dist.data) {
|
|
1479
1479
|
if (dist.data.format) return dist.data.format.toLowerCase();
|
|
1480
1480
|
if (dist.data.mediaType) {
|
|
1481
|
-
const mediaType = dist.data.mediaType.split(
|
|
1481
|
+
const mediaType = dist.data.mediaType.split("/");
|
|
1482
1482
|
if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
|
|
1483
1483
|
}
|
|
1484
1484
|
if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
|
|
@@ -1488,7 +1488,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
|
-
return
|
|
1491
|
+
return "";
|
|
1492
1492
|
}
|
|
1493
1493
|
|
|
1494
1494
|
|
|
@@ -1498,20 +1498,20 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1498
1498
|
});
|
|
1499
1499
|
const { title: title, modified: modified, description: description, downloadUrl: downloadUrl, largeFile: largeFile = false, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks, identifier: identifier, refresh: refresh, released: released, showDateDetails: showDateDetails = false, showTopics: showTopics = false, theme: theme, topicSlugs: topicSlugs, distribution: distribution } = props;
|
|
1500
1500
|
const location = (0, $hgUW1$useLocation)();
|
|
1501
|
-
let linkContainerClasses =
|
|
1502
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1503
|
-
else linkContainerClasses +=
|
|
1504
|
-
let linkClasses =
|
|
1501
|
+
let linkContainerClasses = "ds-u-margin-bottom--2";
|
|
1502
|
+
if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
|
|
1503
|
+
else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
|
|
1504
|
+
let linkClasses = "ds-u-display--block ds-u-text-align--left";
|
|
1505
1505
|
if (desktop) {
|
|
1506
|
-
linkContainerClasses =
|
|
1507
|
-
linkClasses +=
|
|
1506
|
+
linkContainerClasses = "ds-u-padding-x--0";
|
|
1507
|
+
linkClasses += " ds-l-col--4 ds-l-md-col--auto";
|
|
1508
1508
|
}
|
|
1509
1509
|
let themes;
|
|
1510
1510
|
if (theme && showTopics) themes = /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
1511
1511
|
className: "theme-list item-theme",
|
|
1512
1512
|
children: theme.map((topic, index)=>{
|
|
1513
|
-
const title = topic ||
|
|
1514
|
-
const prefix =
|
|
1513
|
+
const title = topic || "Unknown Topic";
|
|
1514
|
+
const prefix = "topics";
|
|
1515
1515
|
// Use the provided slug or fallback to a simple slug generation
|
|
1516
1516
|
const slug = topicSlugs?.[title];
|
|
1517
1517
|
const link = `/${prefix}/${slug}`;
|
|
@@ -1522,7 +1522,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1522
1522
|
state: {
|
|
1523
1523
|
fromUrl: location.pathname,
|
|
1524
1524
|
fromTitle: false,
|
|
1525
|
-
fromSearchList: location.pathname.includes(
|
|
1525
|
+
fromSearchList: location.pathname.includes("search")
|
|
1526
1526
|
},
|
|
1527
1527
|
children: title
|
|
1528
1528
|
})
|
|
@@ -1564,7 +1564,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1564
1564
|
};
|
|
1565
1565
|
const dataDictionaryExists = ()=>{
|
|
1566
1566
|
if (distribution && "data" in distribution) {
|
|
1567
|
-
if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType ===
|
|
1567
|
+
if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType === "application/vnd.tableschema+json";
|
|
1568
1568
|
}
|
|
1569
1569
|
return false;
|
|
1570
1570
|
};
|
|
@@ -1598,7 +1598,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1598
1598
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1599
1599
|
className: "dc-c-search-list-item ds-u-padding-top--3",
|
|
1600
1600
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1601
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1601
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
|
|
1602
1602
|
children: [
|
|
1603
1603
|
themes,
|
|
1604
1604
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
@@ -1606,7 +1606,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1606
1606
|
children: [
|
|
1607
1607
|
!showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1608
1608
|
id: `dataset-${identifier}-updated-date`,
|
|
1609
|
-
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ?
|
|
1609
|
+
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? "ds-u-padding-top--2" : "ds-u-padding-top--0"}`,
|
|
1610
1610
|
children: [
|
|
1611
1611
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1612
1612
|
children: "Updated:"
|
|
@@ -1635,13 +1635,13 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1635
1635
|
(0, $1a2bf34e2a8f6b80$export$59a943b34a82e690)(description),
|
|
1636
1636
|
description.length > 240 ? /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1637
1637
|
children: [
|
|
1638
|
-
|
|
1638
|
+
" ",
|
|
1639
1639
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1640
1640
|
to: `/dataset/${identifier}`,
|
|
1641
1641
|
children: "See more"
|
|
1642
1642
|
})
|
|
1643
1643
|
]
|
|
1644
|
-
}) :
|
|
1644
|
+
}) : ""
|
|
1645
1645
|
]
|
|
1646
1646
|
})
|
|
1647
1647
|
}),
|
|
@@ -1669,14 +1669,14 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1669
1669
|
"Download"
|
|
1670
1670
|
]
|
|
1671
1671
|
})
|
|
1672
|
-
}) :
|
|
1672
|
+
}) : "",
|
|
1673
1673
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("ul", {
|
|
1674
|
-
className: `ds-l-row ds-u-padding--0 ds-u-flex-direction--row ds-u-justify-content--between ds-u-md-justify-content--start ds-u-margin-top--3 ds-u-margin-x--0 ${!dataDictionaryLinks ?
|
|
1674
|
+
className: `ds-l-row ds-u-padding--0 ds-u-flex-direction--row ds-u-justify-content--between ds-u-md-justify-content--start ds-u-margin-top--3 ds-u-margin-x--0 ${!dataDictionaryLinks ? "ds-u-justify-content--center ds-u-md-justify-content--start" : ""}`,
|
|
1675
1675
|
children: [
|
|
1676
1676
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1677
1677
|
className: linkContainerClasses,
|
|
1678
1678
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1679
|
-
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ?
|
|
1679
|
+
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? "" : " dkan-disabled-link-wrapper"}`,
|
|
1680
1680
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataTableLink, {})
|
|
1681
1681
|
})
|
|
1682
1682
|
}),
|
|
@@ -1698,10 +1698,10 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1698
1698
|
dataDictionaryLinks ? /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1699
1699
|
className: linkContainerClasses,
|
|
1700
1700
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1701
|
-
className: `${linkClasses}${dataDictionaryExists() ?
|
|
1701
|
+
className: `${linkClasses}${dataDictionaryExists() ? "" : " dkan-disabled-link-wrapper"}`,
|
|
1702
1702
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataDictionaryLink, {})
|
|
1703
1703
|
})
|
|
1704
|
-
}) :
|
|
1704
|
+
}) : "",
|
|
1705
1705
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1706
1706
|
className: linkContainerClasses,
|
|
1707
1707
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -1797,7 +1797,7 @@ var $789279954d8eff7f$export$2e2bcd8739ae039 = $789279954d8eff7f$var$ApiDocument
|
|
|
1797
1797
|
|
|
1798
1798
|
|
|
1799
1799
|
|
|
1800
|
-
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className =
|
|
1800
|
+
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className = "data-table-results" })=>{
|
|
1801
1801
|
const numTotalRows = totalRows;
|
|
1802
1802
|
if (numTotalRows === 0) return /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1803
1803
|
className: className,
|
|
@@ -1815,18 +1815,18 @@ const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limi
|
|
|
1815
1815
|
className: className,
|
|
1816
1816
|
children: [
|
|
1817
1817
|
"Displaying",
|
|
1818
|
-
|
|
1818
|
+
" ",
|
|
1819
1819
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1820
1820
|
className: "ds-u-font-weight--bold",
|
|
1821
1821
|
children: `${startTotal().toLocaleString()} - ${ofTotal().toLocaleString()}`
|
|
1822
1822
|
}),
|
|
1823
|
-
|
|
1823
|
+
" ",
|
|
1824
1824
|
"of ",
|
|
1825
1825
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1826
1826
|
className: "ds-u-font-weight--bold",
|
|
1827
1827
|
children: `${numTotalRows.toLocaleString()}`
|
|
1828
1828
|
}),
|
|
1829
|
-
|
|
1829
|
+
" ",
|
|
1830
1830
|
"rows"
|
|
1831
1831
|
]
|
|
1832
1832
|
});
|
|
@@ -1852,16 +1852,16 @@ const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePaddi
|
|
|
1852
1852
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
1853
1853
|
options: [
|
|
1854
1854
|
{
|
|
1855
|
-
label:
|
|
1856
|
-
value:
|
|
1855
|
+
label: "Tight",
|
|
1856
|
+
value: "ds-u-padding-y--0"
|
|
1857
1857
|
},
|
|
1858
1858
|
{
|
|
1859
|
-
label:
|
|
1860
|
-
value:
|
|
1859
|
+
label: "Normal",
|
|
1860
|
+
value: "ds-u-padding-y--1"
|
|
1861
1861
|
},
|
|
1862
1862
|
{
|
|
1863
|
-
label:
|
|
1864
|
-
value:
|
|
1863
|
+
label: "Expanded",
|
|
1864
|
+
value: "ds-u-padding-y--2"
|
|
1865
1865
|
}
|
|
1866
1866
|
],
|
|
1867
1867
|
label: "Display density:",
|
|
@@ -2104,7 +2104,7 @@ function $aa4450dcbeef3ac0$export$385a5aba38cc3325(sortArray) {
|
|
|
2104
2104
|
sortArray.forEach((s)=>{
|
|
2105
2105
|
return newQuery.push({
|
|
2106
2106
|
property: s.id,
|
|
2107
|
-
order: s.desc ?
|
|
2107
|
+
order: s.desc ? "desc" : "asc"
|
|
2108
2108
|
});
|
|
2109
2109
|
});
|
|
2110
2110
|
return newQuery;
|
|
@@ -2142,46 +2142,46 @@ function $7264a673914aa746$export$e284ae5d89467c8f(date) {
|
|
|
2142
2142
|
}
|
|
2143
2143
|
function $7264a673914aa746$export$6b5e57d20078142b(value, operator) {
|
|
2144
2144
|
let newValue = value;
|
|
2145
|
-
if (Array.isArray(newValue)) newValue = newValue.join(
|
|
2145
|
+
if (Array.isArray(newValue)) newValue = newValue.join(",");
|
|
2146
2146
|
// return newValue.replace(/(^\%+|\%+$)/gm, '');
|
|
2147
2147
|
return newValue;
|
|
2148
2148
|
}
|
|
2149
2149
|
const $7264a673914aa746$export$5f89a5ae87bc48e1 = [
|
|
2150
2150
|
{
|
|
2151
|
-
label:
|
|
2152
|
-
value:
|
|
2151
|
+
label: "Is",
|
|
2152
|
+
value: "="
|
|
2153
2153
|
},
|
|
2154
2154
|
{
|
|
2155
|
-
label:
|
|
2156
|
-
value:
|
|
2155
|
+
label: "Starts With",
|
|
2156
|
+
value: "starts with"
|
|
2157
2157
|
},
|
|
2158
2158
|
{
|
|
2159
|
-
label:
|
|
2160
|
-
value:
|
|
2159
|
+
label: "Contains",
|
|
2160
|
+
value: "contains"
|
|
2161
2161
|
},
|
|
2162
2162
|
{
|
|
2163
|
-
label:
|
|
2164
|
-
value:
|
|
2163
|
+
label: "Is Not",
|
|
2164
|
+
value: "<>"
|
|
2165
2165
|
},
|
|
2166
2166
|
{
|
|
2167
|
-
label:
|
|
2168
|
-
value:
|
|
2167
|
+
label: "Or",
|
|
2168
|
+
value: "in"
|
|
2169
2169
|
},
|
|
2170
2170
|
{
|
|
2171
|
-
label:
|
|
2172
|
-
value:
|
|
2171
|
+
label: "Is",
|
|
2172
|
+
value: "="
|
|
2173
2173
|
},
|
|
2174
2174
|
{
|
|
2175
|
-
label:
|
|
2176
|
-
value:
|
|
2175
|
+
label: "Is Not",
|
|
2176
|
+
value: "<>"
|
|
2177
2177
|
},
|
|
2178
2178
|
{
|
|
2179
|
-
label:
|
|
2180
|
-
value:
|
|
2179
|
+
label: "Greater Than",
|
|
2180
|
+
value: ">"
|
|
2181
2181
|
},
|
|
2182
2182
|
{
|
|
2183
|
-
label:
|
|
2184
|
-
value:
|
|
2183
|
+
label: "Less Than",
|
|
2184
|
+
value: "<"
|
|
2185
2185
|
}
|
|
2186
2186
|
];
|
|
2187
2187
|
function $7264a673914aa746$export$d243819c3ad678fb(operatorValue) {
|
|
@@ -2190,59 +2190,59 @@ function $7264a673914aa746$export$d243819c3ad678fb(operatorValue) {
|
|
|
2190
2190
|
}
|
|
2191
2191
|
function $7264a673914aa746$export$2b9377795161999(type) {
|
|
2192
2192
|
switch(type){
|
|
2193
|
-
case
|
|
2194
|
-
case
|
|
2193
|
+
case "text":
|
|
2194
|
+
case "string":
|
|
2195
2195
|
return [
|
|
2196
2196
|
{
|
|
2197
|
-
label:
|
|
2198
|
-
value:
|
|
2197
|
+
label: "Is",
|
|
2198
|
+
value: "="
|
|
2199
2199
|
},
|
|
2200
2200
|
{
|
|
2201
|
-
label:
|
|
2202
|
-
value:
|
|
2201
|
+
label: "Starts With",
|
|
2202
|
+
value: "starts with"
|
|
2203
2203
|
},
|
|
2204
2204
|
{
|
|
2205
|
-
label:
|
|
2206
|
-
value:
|
|
2205
|
+
label: "Contains",
|
|
2206
|
+
value: "contains"
|
|
2207
2207
|
},
|
|
2208
2208
|
{
|
|
2209
|
-
label:
|
|
2210
|
-
value:
|
|
2209
|
+
label: "Is Not",
|
|
2210
|
+
value: "<>"
|
|
2211
2211
|
},
|
|
2212
2212
|
{
|
|
2213
|
-
label:
|
|
2214
|
-
value:
|
|
2213
|
+
label: "Or",
|
|
2214
|
+
value: "in"
|
|
2215
2215
|
}
|
|
2216
2216
|
];
|
|
2217
|
-
case
|
|
2217
|
+
case "date":
|
|
2218
2218
|
return [
|
|
2219
2219
|
{
|
|
2220
|
-
label:
|
|
2221
|
-
value:
|
|
2220
|
+
label: "Is",
|
|
2221
|
+
value: "="
|
|
2222
2222
|
},
|
|
2223
2223
|
{
|
|
2224
|
-
label:
|
|
2225
|
-
value:
|
|
2224
|
+
label: "Is Not",
|
|
2225
|
+
value: "<>"
|
|
2226
2226
|
},
|
|
2227
2227
|
{
|
|
2228
|
-
label:
|
|
2229
|
-
value:
|
|
2228
|
+
label: "Greater Than",
|
|
2229
|
+
value: ">"
|
|
2230
2230
|
},
|
|
2231
2231
|
{
|
|
2232
|
-
label:
|
|
2233
|
-
value:
|
|
2232
|
+
label: "Less Than",
|
|
2233
|
+
value: "<"
|
|
2234
2234
|
}
|
|
2235
2235
|
];
|
|
2236
2236
|
default:
|
|
2237
2237
|
// These 2 should be safe for all data types
|
|
2238
2238
|
return [
|
|
2239
2239
|
{
|
|
2240
|
-
label:
|
|
2241
|
-
value:
|
|
2240
|
+
label: "Is",
|
|
2241
|
+
value: "="
|
|
2242
2242
|
},
|
|
2243
2243
|
{
|
|
2244
|
-
label:
|
|
2245
|
-
value:
|
|
2244
|
+
label: "Is Not",
|
|
2245
|
+
value: "<>"
|
|
2246
2246
|
}
|
|
2247
2247
|
];
|
|
2248
2248
|
}
|
|
@@ -2259,13 +2259,13 @@ function $7264a673914aa746$export$2b9377795161999(type) {
|
|
|
2259
2259
|
|
|
2260
2260
|
|
|
2261
2261
|
const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: header, sortElement: sortElement, setAriaLiveFeedback: setAriaLiveFeedback })=>{
|
|
2262
|
-
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)(
|
|
2262
|
+
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)("");
|
|
2263
2263
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("th", {
|
|
2264
2264
|
key: header.id,
|
|
2265
2265
|
style: {
|
|
2266
2266
|
width: header.getSize()
|
|
2267
2267
|
},
|
|
2268
|
-
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header :
|
|
2268
|
+
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : "",
|
|
2269
2269
|
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
|
|
2270
2270
|
children: [
|
|
2271
2271
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
@@ -2278,7 +2278,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2278
2278
|
}),
|
|
2279
2279
|
sortElement && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2280
2280
|
onClick: header.column.getToggleSortingHandler(),
|
|
2281
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
2281
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : "",
|
|
2282
2282
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
2283
2283
|
})
|
|
2284
2284
|
]
|
|
@@ -2286,18 +2286,18 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2286
2286
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2287
2287
|
onMouseDown: header.getResizeHandler(),
|
|
2288
2288
|
onTouchStart: header.getResizeHandler(),
|
|
2289
|
-
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ?
|
|
2289
|
+
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ? "isResizing" : ""}`,
|
|
2290
2290
|
"aria-label": `Resize ${header.column.columnDef.header} column`,
|
|
2291
2291
|
onKeyDown: (e)=>{
|
|
2292
2292
|
const columnSizingObject = table.getState().columnSizing;
|
|
2293
2293
|
switch(e.key){
|
|
2294
|
-
case
|
|
2295
|
-
case
|
|
2294
|
+
case "Enter":
|
|
2295
|
+
case " ":
|
|
2296
2296
|
e.preventDefault();
|
|
2297
2297
|
e.stopPropagation();
|
|
2298
2298
|
if (columnResizing) {
|
|
2299
2299
|
// end resizing
|
|
2300
|
-
setColumnResizing(
|
|
2300
|
+
setColumnResizing("");
|
|
2301
2301
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2302
2302
|
} else {
|
|
2303
2303
|
// start resizing
|
|
@@ -2305,13 +2305,13 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2305
2305
|
setAriaLiveFeedback(`${header.column.columnDef.header} grabbed.`);
|
|
2306
2306
|
}
|
|
2307
2307
|
break;
|
|
2308
|
-
case
|
|
2308
|
+
case "Escape":
|
|
2309
2309
|
if (columnResizing) {
|
|
2310
|
-
setColumnResizing(
|
|
2310
|
+
setColumnResizing("");
|
|
2311
2311
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2312
2312
|
}
|
|
2313
2313
|
break;
|
|
2314
|
-
case
|
|
2314
|
+
case "ArrowRight":
|
|
2315
2315
|
e.preventDefault();
|
|
2316
2316
|
e.stopPropagation();
|
|
2317
2317
|
if (columnResizing) {
|
|
@@ -2320,7 +2320,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2320
2320
|
setAriaLiveFeedback(`${header.column.columnDef.header} has been resized. The new width is ${header.getSize()} pixels.`);
|
|
2321
2321
|
}
|
|
2322
2322
|
break;
|
|
2323
|
-
case
|
|
2323
|
+
case "ArrowLeft":
|
|
2324
2324
|
e.preventDefault();
|
|
2325
2325
|
e.stopPropagation();
|
|
2326
2326
|
if (columnResizing) {
|
|
@@ -2332,7 +2332,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2332
2332
|
}
|
|
2333
2333
|
},
|
|
2334
2334
|
onBlur: ()=>{
|
|
2335
|
-
setColumnResizing(
|
|
2335
|
+
setColumnResizing("");
|
|
2336
2336
|
}
|
|
2337
2337
|
})
|
|
2338
2338
|
]
|
|
@@ -2381,7 +2381,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2381
2381
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
2382
2382
|
}),
|
|
2383
2383
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2384
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` :
|
|
2384
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` : ""
|
|
2385
2385
|
})
|
|
2386
2386
|
]
|
|
2387
2387
|
})
|
|
@@ -2412,7 +2412,7 @@ const $ee0d4d4f34048447$var$DataTableActionsContextDefaults = {
|
|
|
2412
2412
|
setColumnVisibility: ()=>{},
|
|
2413
2413
|
page: 1,
|
|
2414
2414
|
setPage: ()=>{},
|
|
2415
|
-
tableDensity:
|
|
2415
|
+
tableDensity: "normal",
|
|
2416
2416
|
setTableDensity: ()=>{}
|
|
2417
2417
|
};
|
|
2418
2418
|
const $ee0d4d4f34048447$export$f814ea079e65d8fe = /*#__PURE__*/ (0, $hgUW1$createContext)($ee0d4d4f34048447$var$DataTableActionsContextDefaults);
|
|
@@ -2431,7 +2431,7 @@ const $ee0d4d4f34048447$var$DataTableActionsProvider = ({ children: children })=
|
|
|
2431
2431
|
if (datasetTableControls && localStorageData) return localStorageData.tableColumnVisibility;
|
|
2432
2432
|
else return {};
|
|
2433
2433
|
});
|
|
2434
|
-
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)(
|
|
2434
|
+
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)("normal");
|
|
2435
2435
|
const providerValue = {
|
|
2436
2436
|
columnOrder: columnOrder,
|
|
2437
2437
|
setColumnOrder: setColumnOrder,
|
|
@@ -2478,9 +2478,9 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2478
2478
|
transition: transition,
|
|
2479
2479
|
opacity: isDragging ? 0.7 : 1,
|
|
2480
2480
|
zIndex: isDragging ? 1 : 0,
|
|
2481
|
-
position:
|
|
2482
|
-
background:
|
|
2483
|
-
touchAction:
|
|
2481
|
+
position: "relative",
|
|
2482
|
+
background: "white",
|
|
2483
|
+
touchAction: "none"
|
|
2484
2484
|
};
|
|
2485
2485
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
2486
2486
|
className: "ds-u-display--flex ds-u-justify-content--between ds-u-border-bottom--1",
|
|
@@ -2496,7 +2496,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2496
2496
|
// this code forces the repaint without user interaction
|
|
2497
2497
|
const target = e.target;
|
|
2498
2498
|
if (isDragging && target.tagName.toLowerCase() === "label") setTimeout(()=>{
|
|
2499
|
-
target.parentNode.querySelector(
|
|
2499
|
+
target.parentNode.querySelector("input").checked = visible;
|
|
2500
2500
|
}, 1);
|
|
2501
2501
|
},
|
|
2502
2502
|
children: [
|
|
@@ -2513,7 +2513,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2513
2513
|
}
|
|
2514
2514
|
}),
|
|
2515
2515
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2516
|
-
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging &&
|
|
2516
|
+
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && "grabbed"}`,
|
|
2517
2517
|
"aria-label": `Reorder ${id} column`,
|
|
2518
2518
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2519
2519
|
className: "fa fa-sort"
|
|
@@ -2531,7 +2531,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor extends (0, $hgUW1$Key
|
|
|
2531
2531
|
// Custom function to exclude checkbox from keyboard dragging
|
|
2532
2532
|
static activators = [
|
|
2533
2533
|
{
|
|
2534
|
-
eventName:
|
|
2534
|
+
eventName: "onKeyDown",
|
|
2535
2535
|
handler: ({ nativeEvent: event })=>{
|
|
2536
2536
|
// prevent scrolling the list
|
|
2537
2537
|
const isCheckbox = [
|
|
@@ -2554,7 +2554,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$Poin
|
|
|
2554
2554
|
// Custom function to stop accidental checkbox clicks on pointer activation
|
|
2555
2555
|
static activators = [
|
|
2556
2556
|
{
|
|
2557
|
-
eventName:
|
|
2557
|
+
eventName: "onPointerDown",
|
|
2558
2558
|
handler: ({ nativeEvent: event })=>{
|
|
2559
2559
|
if (event.target.tagName.toLowerCase() === "input") return false;
|
|
2560
2560
|
if (event.target.tagName.toLowerCase() === "label") event.target.blur();
|
|
@@ -2638,6 +2638,7 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
2638
2638
|
children: [
|
|
2639
2639
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
|
|
2640
2640
|
"aria-haspopup": "dialog",
|
|
2641
|
+
"aria-labelledby": "manage-columns",
|
|
2641
2642
|
className: "dkan-filter-dataset-toolbar-button ds-u-color--primary ds-u-text-decoration--underline ds-u-font-size--sm ds-u-padding-x--2 ds-u-margin--0 ds-u-border--0 ds-u-fill--transparent",
|
|
2642
2643
|
onClick: ()=>{
|
|
2643
2644
|
setModalOpen(true);
|
|
@@ -2649,16 +2650,17 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
2649
2650
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
2650
2651
|
children: [
|
|
2651
2652
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2653
|
+
id: "manage-columns",
|
|
2652
2654
|
className: "ds-u-display--none ds-u-lg-display--inline-block",
|
|
2653
2655
|
children: "Manage Columns"
|
|
2654
2656
|
}),
|
|
2655
|
-
hiddenColumns ? ` (${hiddenColumns})` :
|
|
2657
|
+
hiddenColumns ? ` (${hiddenColumns})` : ""
|
|
2656
2658
|
]
|
|
2657
2659
|
})
|
|
2658
2660
|
]
|
|
2659
2661
|
}),
|
|
2660
2662
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2661
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2663
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
2662
2664
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
|
|
2663
2665
|
heading: "Manage columns",
|
|
2664
2666
|
isOpen: modalOpen,
|
|
@@ -2831,12 +2833,12 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
2831
2833
|
if (Object.keys(resource).length && columns.length && resource.schema && Object.keys(distribution).length) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
2832
2834
|
children: [
|
|
2833
2835
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2834
|
-
className: isModal ?
|
|
2836
|
+
className: isModal ? "dkan-datatable-fullscreen-mode" : "",
|
|
2835
2837
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
|
|
2836
2838
|
canResize: true,
|
|
2837
2839
|
columns: columns,
|
|
2838
2840
|
sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
|
|
2839
|
-
tablePadding: tableDensity ===
|
|
2841
|
+
tablePadding: tableDensity === "normal" ? "ds-u-padding-y--2" : tableDensity === "compact" ? "ds-u-padding-y--1" : "ds-u-padding-y--3",
|
|
2840
2842
|
loading: resource.loading,
|
|
2841
2843
|
isModal: isModal,
|
|
2842
2844
|
downloadURL: downloadURL,
|
|
@@ -2851,14 +2853,14 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
2851
2853
|
}),
|
|
2852
2854
|
!resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2853
2855
|
className: [
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
isModal &&
|
|
2861
|
-
].filter(Boolean).join(
|
|
2856
|
+
"ds-u-display--flex",
|
|
2857
|
+
"ds-u-flex-wrap--wrap",
|
|
2858
|
+
"ds-u-justify-content--end",
|
|
2859
|
+
"ds-u-md-justify-content--between",
|
|
2860
|
+
"ds-u-margin-top--2",
|
|
2861
|
+
"ds-u-align-items--center",
|
|
2862
|
+
isModal && "ds-u-margin-bottom--2"
|
|
2863
|
+
].filter(Boolean).join(" "),
|
|
2862
2864
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
2863
2865
|
totalPages: Math.ceil(resource.count ? resource.count / pageSize : 1),
|
|
2864
2866
|
currentPage: Number(page),
|
|
@@ -2890,6 +2892,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
2890
2892
|
children: [
|
|
2891
2893
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
|
|
2892
2894
|
"aria-haspopup": "dialog",
|
|
2895
|
+
"aria-labelledby": "full-screen",
|
|
2893
2896
|
className: "dkan-filter-dataset-toolbar-button ds-u-color--primary ds-u-text-decoration--underline ds-u-font-size--sm ds-u-padding-x--2 ds-u-margin--0 ds-u-border--0 ds-u-fill--transparent",
|
|
2894
2897
|
onClick: ()=>{
|
|
2895
2898
|
if (modalOpen) setModalOpen(false);
|
|
@@ -2897,16 +2900,17 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
2897
2900
|
},
|
|
2898
2901
|
children: [
|
|
2899
2902
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2900
|
-
className: `far ${modalOpen ?
|
|
2903
|
+
className: `far ${modalOpen ? "fa-compress" : "fa-expand"} ds-u-margin-right--1`
|
|
2901
2904
|
}),
|
|
2902
2905
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2906
|
+
id: "full-screen",
|
|
2903
2907
|
className: "ds-u-display--none ds-u-lg-display--inline-block",
|
|
2904
2908
|
children: modalOpen ? "Exit Full Screen" : "Full Screen"
|
|
2905
2909
|
})
|
|
2906
2910
|
]
|
|
2907
2911
|
}),
|
|
2908
2912
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2909
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2913
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
2910
2914
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
2911
2915
|
heading: "Dataset Explorer",
|
|
2912
2916
|
isOpen: modalOpen,
|
|
@@ -2941,13 +2945,13 @@ var $16bd41951b91f02d$export$2e2bcd8739ae039 = $16bd41951b91f02d$var$FullScreenD
|
|
|
2941
2945
|
|
|
2942
2946
|
|
|
2943
2947
|
function $eadd6431fddf4b6c$var$getStartDate(condition, schema, id) {
|
|
2944
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2948
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
2945
2949
|
const newDate = new Date(condition.value.toString());
|
|
2946
2950
|
if (newDate instanceof Date && !isNaN(newDate.getTime())) return newDate;
|
|
2947
2951
|
}
|
|
2948
2952
|
return new Date();
|
|
2949
2953
|
}
|
|
2950
|
-
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className =
|
|
2954
|
+
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className = "" })=>{
|
|
2951
2955
|
const [operator, setOperator] = (0, $hgUW1$useState)(condition.operator);
|
|
2952
2956
|
const [property, setProperty] = (0, $hgUW1$useState)(condition.property);
|
|
2953
2957
|
const [value, setValue] = (0, $hgUW1$useState)(condition.value);
|
|
@@ -2957,9 +2961,9 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
2957
2961
|
});
|
|
2958
2962
|
(0, $hgUW1$useEffect)(()=>{
|
|
2959
2963
|
if (property !== condition.property) {
|
|
2960
|
-
if (property) update(index,
|
|
2961
|
-
else update(index,
|
|
2962
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2964
|
+
if (property) update(index, "property", property);
|
|
2965
|
+
else update(index, "property", "");
|
|
2966
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
2963
2967
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
2964
2968
|
}
|
|
2965
2969
|
}
|
|
@@ -2973,22 +2977,22 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
2973
2977
|
]);
|
|
2974
2978
|
(0, $hgUW1$useEffect)(()=>{
|
|
2975
2979
|
if (operator !== condition.operator) {
|
|
2976
|
-
if (operator) update(index,
|
|
2977
|
-
else update(index,
|
|
2980
|
+
if (operator) update(index, "operator", operator);
|
|
2981
|
+
else update(index, "operator", "");
|
|
2978
2982
|
}
|
|
2979
2983
|
}, [
|
|
2980
2984
|
operator
|
|
2981
2985
|
]);
|
|
2982
2986
|
(0, $hgUW1$useEffect)(()=>{
|
|
2983
2987
|
if (value !== condition.value) {
|
|
2984
|
-
if (value) update(index,
|
|
2985
|
-
else update(index,
|
|
2988
|
+
if (value) update(index, "value", value);
|
|
2989
|
+
else update(index, "value", "");
|
|
2986
2990
|
}
|
|
2987
2991
|
}, [
|
|
2988
2992
|
value
|
|
2989
2993
|
]);
|
|
2990
2994
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("fieldset", {
|
|
2991
|
-
className: `dkan-filter-dataset-control ds-u-padding-x--2 ds-u-md-padding-x--3 ds-u-padding-y--1 ds-u-margin-top--05${className !==
|
|
2995
|
+
className: `dkan-filter-dataset-control ds-u-padding-x--2 ds-u-md-padding-x--3 ds-u-padding-y--1 ds-u-margin-top--05${className !== "" ? ` ${className}` : ""}`,
|
|
2992
2996
|
children: [
|
|
2993
2997
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
2994
2998
|
options: propertyOptions,
|
|
@@ -3006,7 +3010,7 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
3006
3010
|
name: `${condition.key}_operator`,
|
|
3007
3011
|
onChange: (e)=>setOperator(e.target.value)
|
|
3008
3012
|
}),
|
|
3009
|
-
schema[id].fields[property].mysql_type ===
|
|
3013
|
+
schema[id].fields[property].mysql_type === "date" ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
3010
3014
|
children: [
|
|
3011
3015
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
3012
3016
|
className: "ds-c-label",
|
|
@@ -3059,15 +3063,15 @@ var $eadd6431fddf4b6c$export$2e2bcd8739ae039 = $eadd6431fddf4b6c$var$FilterItem;
|
|
|
3059
3063
|
|
|
3060
3064
|
|
|
3061
3065
|
|
|
3062
|
-
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className =
|
|
3066
|
+
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className = "" })=>{
|
|
3063
3067
|
const small = (0, $hgUW1$useMediaQuery)({
|
|
3064
3068
|
minWidth: 0,
|
|
3065
3069
|
maxWidth: 544
|
|
3066
3070
|
});
|
|
3067
3071
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
3068
3072
|
disabled: disabled,
|
|
3069
|
-
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ?
|
|
3070
|
-
variation: small ?
|
|
3073
|
+
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ? "" : " ds-u-float--right ds-l-md-col--6 ds-l-col--5"}${className !== "" ? ` ${className}` : ""}`,
|
|
3074
|
+
variation: small ? "ghost" : undefined,
|
|
3071
3075
|
onClick: ()=>clearFiltersFn(),
|
|
3072
3076
|
children: "Reset"
|
|
3073
3077
|
});
|
|
@@ -3079,19 +3083,19 @@ var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFilter
|
|
|
3079
3083
|
function $6f4318b1e14124e5$var$updateQueryForDatastore(condition) {
|
|
3080
3084
|
let cond = condition;
|
|
3081
3085
|
delete cond.key;
|
|
3082
|
-
if (cond.operator ===
|
|
3086
|
+
if (cond.operator === "=" || cond.operator === "<>") {
|
|
3083
3087
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3084
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3088
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
3085
3089
|
}
|
|
3086
|
-
if (cond.operator.toLowerCase() ===
|
|
3090
|
+
if (cond.operator.toLowerCase() === "like") {
|
|
3087
3091
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3088
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3092
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
3089
3093
|
cond.value = `%${cleanedValue}%`;
|
|
3090
3094
|
}
|
|
3091
|
-
if (cond.operator.toLowerCase() ===
|
|
3092
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
3095
|
+
if (cond.operator.toLowerCase() === "in") {
|
|
3096
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(",");
|
|
3093
3097
|
}
|
|
3094
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
3098
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
|
|
3095
3099
|
return cond;
|
|
3096
3100
|
}
|
|
3097
3101
|
const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
@@ -3117,7 +3121,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3117
3121
|
} else setQueryConditions([
|
|
3118
3122
|
{
|
|
3119
3123
|
property: fields[0],
|
|
3120
|
-
value:
|
|
3124
|
+
value: "",
|
|
3121
3125
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3122
3126
|
key: Date.now().toString()
|
|
3123
3127
|
}
|
|
@@ -3134,7 +3138,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3134
3138
|
...queryConditions,
|
|
3135
3139
|
{
|
|
3136
3140
|
property: fields[0],
|
|
3137
|
-
value:
|
|
3141
|
+
value: "",
|
|
3138
3142
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3139
3143
|
key: Date.now().toString()
|
|
3140
3144
|
}
|
|
@@ -3165,7 +3169,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3165
3169
|
encodeValuesOnly: true,
|
|
3166
3170
|
addQueryPrefix: true
|
|
3167
3171
|
});
|
|
3168
|
-
window.history.pushState({},
|
|
3172
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
3169
3173
|
};
|
|
3170
3174
|
const submitConditions = ()=>{
|
|
3171
3175
|
// only update the data conditions when "Apply filters" is pressed
|
|
@@ -3227,6 +3231,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3227
3231
|
children: [
|
|
3228
3232
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
|
|
3229
3233
|
"aria-haspopup": "dialog",
|
|
3234
|
+
"aria-labelledby": "filter-dataset",
|
|
3230
3235
|
className: "dkan-filter-dataset-toolbar-button ds-u-color--primary ds-u-text-decoration--underline ds-u-font-size--sm ds-u-padding-x--2 ds-u-margin--0 ds-u-border--0 ds-u-fill--transparent",
|
|
3231
3236
|
onClick: ()=>{
|
|
3232
3237
|
setModalOpen(true);
|
|
@@ -3238,8 +3243,9 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3238
3243
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
3239
3244
|
children: [
|
|
3240
3245
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3246
|
+
id: "filter-dataset",
|
|
3241
3247
|
className: "ds-u-display--none ds-u-lg-display--inline-block",
|
|
3242
|
-
children: conditions.length > 0 ? `Edit Filters` :
|
|
3248
|
+
children: conditions.length > 0 ? `Edit Filters` : "Filter Dataset"
|
|
3243
3249
|
}),
|
|
3244
3250
|
conditions.length > 0 && ` (${conditions.length})`
|
|
3245
3251
|
]
|
|
@@ -3247,7 +3253,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3247
3253
|
]
|
|
3248
3254
|
}),
|
|
3249
3255
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3250
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
3256
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
3251
3257
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
3252
3258
|
heading: "Filter Dataset",
|
|
3253
3259
|
isOpen: modalOpen,
|
|
@@ -3273,7 +3279,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3273
3279
|
className: "dkan-apply-dataset-filters-button ds-u-float--right ds-l-md-col--auto ds-l-col--auto",
|
|
3274
3280
|
onClick: submitConditions,
|
|
3275
3281
|
variation: "solid",
|
|
3276
|
-
children: `Apply ${conditionsReadyToSubmit(queryConditions).length ||
|
|
3282
|
+
children: `Apply ${conditionsReadyToSubmit(queryConditions).length || ""} filter${conditionsReadyToSubmit(queryConditions).length === 1 ? "" : "s"}`
|
|
3277
3283
|
})
|
|
3278
3284
|
]
|
|
3279
3285
|
})
|
|
@@ -3395,6 +3401,7 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3395
3401
|
placement: "bottom-start",
|
|
3396
3402
|
maxWidth: "350px",
|
|
3397
3403
|
"aria-haspopup": "dialog",
|
|
3404
|
+
"aria-labelledby": "display-settings",
|
|
3398
3405
|
title: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
3399
3406
|
className: "ds-u-display--flex ds-u-flex-direction--column",
|
|
3400
3407
|
children: [
|
|
@@ -3412,9 +3419,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3412
3419
|
className: "ds-u-display--flex ds-u-align-items--start",
|
|
3413
3420
|
children: [
|
|
3414
3421
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3415
|
-
onClick: ()=>setTableDensity(
|
|
3422
|
+
onClick: ()=>setTableDensity("expanded"),
|
|
3416
3423
|
"aria-label": "Row height, Expanded",
|
|
3417
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3424
|
+
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === "expanded" ? "active ds-u-fill--primary-lightest" : ""}`,
|
|
3418
3425
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3419
3426
|
className: "ds-u-display--block",
|
|
3420
3427
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3433,9 +3440,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3433
3440
|
})
|
|
3434
3441
|
}),
|
|
3435
3442
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3436
|
-
onClick: ()=>setTableDensity(
|
|
3443
|
+
onClick: ()=>setTableDensity("normal"),
|
|
3437
3444
|
"aria-label": "Row height, Normal",
|
|
3438
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3445
|
+
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === "normal" ? "active ds-u-fill--primary-lightest" : ""}`,
|
|
3439
3446
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3440
3447
|
className: "ds-u-display--block",
|
|
3441
3448
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3454,9 +3461,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3454
3461
|
})
|
|
3455
3462
|
}),
|
|
3456
3463
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3457
|
-
onClick: ()=>setTableDensity(
|
|
3464
|
+
onClick: ()=>setTableDensity("compact"),
|
|
3458
3465
|
"aria-label": "Row height, Compact",
|
|
3459
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3466
|
+
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === "compact" ? "active ds-u-fill--primary-lightest " : ""}`,
|
|
3460
3467
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3461
3468
|
className: "ds-u-display--block",
|
|
3462
3469
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3515,6 +3522,7 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3515
3522
|
className: "far fa-sliders-h ds-u-margin-right--1"
|
|
3516
3523
|
}),
|
|
3517
3524
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3525
|
+
id: "display-settings",
|
|
3518
3526
|
className: "ds-u-display--none ds-u-lg-display--inline-block",
|
|
3519
3527
|
children: "Display Settings"
|
|
3520
3528
|
}),
|
|
@@ -3541,7 +3549,7 @@ const $85f8ff1ff89899c7$var$updateBrowserURL = (newConditions)=>{
|
|
|
3541
3549
|
encodeValuesOnly: true,
|
|
3542
3550
|
addQueryPrefix: true
|
|
3543
3551
|
});
|
|
3544
|
-
window.history.pushState({},
|
|
3552
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
3545
3553
|
};
|
|
3546
3554
|
const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, columns: columns, defaultColumnOrder: defaultColumnOrder, isModal: isModal, datasetTableControls: datasetTableControls, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility })=>{
|
|
3547
3555
|
const { limit: limit, offset: offset, count: count, conditions: conditions, setConditions: setConditions } = resource;
|
|
@@ -3627,7 +3635,7 @@ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, co
|
|
|
3627
3635
|
}, index)) : null,
|
|
3628
3636
|
hiddenColumns > 0 ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $c5b172e8d1a8197c$export$2e2bcd8739ae039), {
|
|
3629
3637
|
iconClass: "fa fa-columns",
|
|
3630
|
-
text: `${hiddenColumns} Column${hiddenColumns === 1 ?
|
|
3638
|
+
text: `${hiddenColumns} Column${hiddenColumns === 1 ? "" : "s"} Hidden`,
|
|
3631
3639
|
onClick: ()=>{
|
|
3632
3640
|
resetColumnVisibility();
|
|
3633
3641
|
}
|
|
@@ -3662,7 +3670,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3662
3670
|
const { conditions: conditions } = resource;
|
|
3663
3671
|
const data = resource.values;
|
|
3664
3672
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
3665
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
3673
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)("");
|
|
3666
3674
|
const dataTableWrapperElement = (0, $hgUW1$useRef)(null);
|
|
3667
3675
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
3668
3676
|
const table_columns = columns.map((col)=>{
|
|
@@ -3681,9 +3689,9 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3681
3689
|
columnOrder
|
|
3682
3690
|
]);
|
|
3683
3691
|
const sortElement = (isSorted, onClickFn)=>{
|
|
3684
|
-
if (isSorted ===
|
|
3685
|
-
if (isSorted ===
|
|
3686
|
-
return
|
|
3692
|
+
if (isSorted === "asc") return "dc-c-sort--asc";
|
|
3693
|
+
if (isSorted === "desc") return "dc-c-sort--desc";
|
|
3694
|
+
return "dc-c-sort--default";
|
|
3687
3695
|
};
|
|
3688
3696
|
const filters = [];
|
|
3689
3697
|
const table = (0, $hgUW1$useReactTable)({
|
|
@@ -3695,7 +3703,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3695
3703
|
columnVisibility: columnVisibility,
|
|
3696
3704
|
sorting: sorting
|
|
3697
3705
|
},
|
|
3698
|
-
columnResizeMode:
|
|
3706
|
+
columnResizeMode: "onChange",
|
|
3699
3707
|
onSortingChange: setSorting,
|
|
3700
3708
|
onColumnOrderChange: setColumnOrder,
|
|
3701
3709
|
onColumnVisibilityChange: setColumnVisibility,
|
|
@@ -3712,7 +3720,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3712
3720
|
const defaultColumnOrder = (0, $hgUW1$useMemo)(()=>table_columns.map((column)=>column.accessorKey), []);
|
|
3713
3721
|
const tableWrapperWidth = ()=>{
|
|
3714
3722
|
if (dataTableWrapperElement.current) return dataTableWrapperElement.current.offsetWidth;
|
|
3715
|
-
return
|
|
3723
|
+
return "auto";
|
|
3716
3724
|
};
|
|
3717
3725
|
(0, $hgUW1$useEffect)(()=>{
|
|
3718
3726
|
setHighlightRow(null);
|
|
@@ -3942,7 +3950,7 @@ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, a
|
|
|
3942
3950
|
},
|
|
3943
3951
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3944
3952
|
name: accessor,
|
|
3945
|
-
value: filterValue ||
|
|
3953
|
+
value: filterValue || ""
|
|
3946
3954
|
});
|
|
3947
3955
|
}
|
|
3948
3956
|
const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true })=>{
|
|
@@ -4018,7 +4026,7 @@ const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage, pageTrail:
|
|
|
4018
4026
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4019
4027
|
children: currentPage
|
|
4020
4028
|
})
|
|
4021
|
-
}) :
|
|
4029
|
+
}) : ""
|
|
4022
4030
|
]
|
|
4023
4031
|
})
|
|
4024
4032
|
});
|
|
@@ -4075,11 +4083,11 @@ var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRigh
|
|
|
4075
4083
|
|
|
4076
4084
|
|
|
4077
4085
|
|
|
4078
|
-
const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder =
|
|
4086
|
+
const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = "Search the Data", showMagnifyingGlass: showMagnifyingGlass, showSearchButton: showSearchButton, onDark: onDark, onChange: onChange, onSubmit: onSubmit, onKeyDown: onKeyDown, defaultValue: defaultValue = "" })=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4079
4087
|
className: "search-input-container",
|
|
4080
4088
|
children: [
|
|
4081
4089
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4082
|
-
className: `${showMagnifyingGlass ?
|
|
4090
|
+
className: `${showMagnifyingGlass ? "left-padding" : ""} ${showSearchButton ? "right-padding" : ""}`,
|
|
4083
4091
|
label: placeholder,
|
|
4084
4092
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4085
4093
|
placeholder: placeholder,
|
|
@@ -4094,7 +4102,7 @@ const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = 'Search
|
|
|
4094
4102
|
}),
|
|
4095
4103
|
showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
4096
4104
|
variation: "solid",
|
|
4097
|
-
className: onDark &&
|
|
4105
|
+
className: onDark && "on-dark",
|
|
4098
4106
|
onClick: onSubmit,
|
|
4099
4107
|
children: [
|
|
4100
4108
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4213,7 +4221,7 @@ const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: roo
|
|
|
4213
4221
|
url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4214
4222
|
addQueryPrefix: true
|
|
4215
4223
|
})}`,
|
|
4216
|
-
docExpansion:
|
|
4224
|
+
docExpansion: "list",
|
|
4217
4225
|
defaultModelsExpandDepth: -1,
|
|
4218
4226
|
plugins: [
|
|
4219
4227
|
(0, $hgUW1$SpanOpenAPIVersion),
|
|
@@ -4321,7 +4329,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4321
4329
|
size: "big",
|
|
4322
4330
|
type: "submit",
|
|
4323
4331
|
style: {
|
|
4324
|
-
width:
|
|
4332
|
+
width: "70px"
|
|
4325
4333
|
},
|
|
4326
4334
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4327
4335
|
className: "fas fa-search small-text"
|
|
@@ -4338,7 +4346,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4338
4346
|
className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
|
|
4339
4347
|
children: [
|
|
4340
4348
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4341
|
-
children: text ? text :
|
|
4349
|
+
children: text ? text : "Search"
|
|
4342
4350
|
}),
|
|
4343
4351
|
` `,
|
|
4344
4352
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4423,12 +4431,12 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
4423
4431
|
fulltext: fulltext ? fulltext : undefined,
|
|
4424
4432
|
...selectedFacets,
|
|
4425
4433
|
sort: sort ? sort : undefined,
|
|
4426
|
-
[
|
|
4434
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4427
4435
|
page: page !== 1 ? page : undefined,
|
|
4428
|
-
[
|
|
4436
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4429
4437
|
};
|
|
4430
4438
|
return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4431
|
-
arrayFormat:
|
|
4439
|
+
arrayFormat: "comma",
|
|
4432
4440
|
encode: false
|
|
4433
4441
|
})}`);
|
|
4434
4442
|
}
|
|
@@ -4439,26 +4447,26 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
4439
4447
|
|
|
4440
4448
|
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
4441
4449
|
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4442
|
-
defaultSort:
|
|
4443
|
-
defaultOrder:
|
|
4444
|
-
}, pageTitle: pageTitle =
|
|
4450
|
+
defaultSort: "modified",
|
|
4451
|
+
defaultOrder: "desc"
|
|
4452
|
+
}, pageTitle: pageTitle = "Dataset Explorer", filterTitle: filterTitle = "Tags", showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = "", showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
4445
4453
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4446
4454
|
const sortOptions = [
|
|
4447
4455
|
{
|
|
4448
|
-
label:
|
|
4449
|
-
value:
|
|
4456
|
+
label: "Newest",
|
|
4457
|
+
value: "newest"
|
|
4450
4458
|
},
|
|
4451
4459
|
{
|
|
4452
|
-
label:
|
|
4453
|
-
value:
|
|
4460
|
+
label: "Oldest",
|
|
4461
|
+
value: "oldest"
|
|
4454
4462
|
},
|
|
4455
4463
|
{
|
|
4456
|
-
label:
|
|
4457
|
-
value:
|
|
4464
|
+
label: "Title A-Z",
|
|
4465
|
+
value: "titleAZ"
|
|
4458
4466
|
},
|
|
4459
4467
|
{
|
|
4460
|
-
label:
|
|
4461
|
-
value:
|
|
4468
|
+
label: "Title Z-A",
|
|
4469
|
+
value: "titleZA"
|
|
4462
4470
|
}
|
|
4463
4471
|
];
|
|
4464
4472
|
const defaultSortBy = "";
|
|
@@ -4477,7 +4485,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4477
4485
|
endingNumber: 0
|
|
4478
4486
|
});
|
|
4479
4487
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4480
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4488
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
|
|
4481
4489
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4482
4490
|
const [fulltext, setFullText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
4483
4491
|
const [filterText, setFilterText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
@@ -4486,7 +4494,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4486
4494
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4487
4495
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4488
4496
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4489
|
-
return sort ===
|
|
4497
|
+
return sort === "modified" ? sortOrder === "desc" ? "newest" : "oldest" : sortOrder === "desc" ? "titleZA" : "titleAZ";
|
|
4490
4498
|
});
|
|
4491
4499
|
const [selectedFacets, setSelectedFacets] = (0, $hgUW1$useState)(transformedParams.selectedFacets ? transformedParams.selectedFacets : {
|
|
4492
4500
|
theme: [],
|
|
@@ -4495,21 +4503,21 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4495
4503
|
const setSortOptions = (value)=>{
|
|
4496
4504
|
setSortDisplay(value);
|
|
4497
4505
|
switch(value){
|
|
4498
|
-
case
|
|
4499
|
-
setSort(
|
|
4500
|
-
setSortOrder(
|
|
4506
|
+
case "newest":
|
|
4507
|
+
setSort("modified");
|
|
4508
|
+
setSortOrder("desc");
|
|
4501
4509
|
break;
|
|
4502
|
-
case
|
|
4503
|
-
setSort(
|
|
4504
|
-
setSortOrder(
|
|
4510
|
+
case "oldest":
|
|
4511
|
+
setSort("modified");
|
|
4512
|
+
setSortOrder("asc");
|
|
4505
4513
|
break;
|
|
4506
|
-
case
|
|
4507
|
-
setSort(
|
|
4508
|
-
setSortOrder(
|
|
4514
|
+
case "titleAZ":
|
|
4515
|
+
setSort("title");
|
|
4516
|
+
setSortOrder("asc");
|
|
4509
4517
|
break;
|
|
4510
|
-
case
|
|
4511
|
-
setSort(
|
|
4512
|
-
setSortOrder(
|
|
4518
|
+
case "titleZA":
|
|
4519
|
+
setSort("title");
|
|
4520
|
+
setSortOrder("desc");
|
|
4513
4521
|
break;
|
|
4514
4522
|
}
|
|
4515
4523
|
};
|
|
@@ -4517,12 +4525,12 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4517
4525
|
const newFacets = {
|
|
4518
4526
|
...selectedFacets
|
|
4519
4527
|
};
|
|
4520
|
-
if (key ===
|
|
4528
|
+
if (key === "theme") {
|
|
4521
4529
|
const existingFacet = newFacets.theme.findIndex((s)=>s === value);
|
|
4522
4530
|
if (existingFacet > -1) newFacets.theme.splice(existingFacet, 1);
|
|
4523
4531
|
else newFacets.theme.push(value);
|
|
4524
4532
|
}
|
|
4525
|
-
if (key ===
|
|
4533
|
+
if (key === "keyword") {
|
|
4526
4534
|
const existingFacet = newFacets.keyword.findIndex((s)=>s === value);
|
|
4527
4535
|
if (existingFacet > -1) newFacets.keyword.splice(existingFacet, 1);
|
|
4528
4536
|
else newFacets.keyword.push(value);
|
|
@@ -4536,14 +4544,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4536
4544
|
});
|
|
4537
4545
|
setSelectedFacets(newFacets);
|
|
4538
4546
|
const url = new URL(window.location.href);
|
|
4539
|
-
window.history.pushState({},
|
|
4547
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
4540
4548
|
}
|
|
4541
4549
|
const pageSize = defaultPageSize;
|
|
4542
4550
|
(0, $hgUW1$useEffect)(()=>{
|
|
4543
4551
|
// Update browser URL with current search params
|
|
4544
4552
|
const params = buildSearchParams(true);
|
|
4545
4553
|
const url = new URL(window.location.href);
|
|
4546
|
-
window.history.pushState({},
|
|
4554
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${params}`);
|
|
4547
4555
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4548
4556
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4549
4557
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -4582,14 +4590,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4582
4590
|
setSelectedFacets(defaultSelectedFacets);
|
|
4583
4591
|
setPage(defaultPage);
|
|
4584
4592
|
const url = new URL(window.location.href);
|
|
4585
|
-
window.history.pushState({},
|
|
4593
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}`);
|
|
4586
4594
|
}
|
|
4587
4595
|
function buildSearchParams(includePage) {
|
|
4588
4596
|
let newParams = {};
|
|
4589
4597
|
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
4590
4598
|
if (sort !== defaultSort.defaultSort) newParams.sort = sort;
|
|
4591
4599
|
if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
|
|
4592
|
-
if (fulltext !==
|
|
4600
|
+
if (fulltext !== "") newParams.fulltext = fulltext;
|
|
4593
4601
|
if (Object.keys(selectedFacets).length) Object.keys(selectedFacets).forEach((key)=>{
|
|
4594
4602
|
newParams[key] = selectedFacets[key];
|
|
4595
4603
|
});
|
|
@@ -4602,9 +4610,9 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4602
4610
|
fulltext: fulltext ? fulltext : undefined,
|
|
4603
4611
|
...selectedFacets,
|
|
4604
4612
|
sort: sort ? sort : undefined,
|
|
4605
|
-
[
|
|
4613
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4606
4614
|
page: page !== 1 ? page : undefined,
|
|
4607
|
-
[
|
|
4615
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4608
4616
|
};
|
|
4609
4617
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4610
4618
|
queryKey: [
|
|
@@ -4613,7 +4621,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4613
4621
|
],
|
|
4614
4622
|
queryFn: ()=>{
|
|
4615
4623
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4616
|
-
arrayFormat:
|
|
4624
|
+
arrayFormat: "comma",
|
|
4617
4625
|
encode: false
|
|
4618
4626
|
})}`);
|
|
4619
4627
|
}
|
|
@@ -4664,7 +4672,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4664
4672
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4665
4673
|
fieldClassName: "ds-u-margin--0",
|
|
4666
4674
|
value: filterText,
|
|
4667
|
-
className: `ds-u-padding-right--2 ${altMobileSearchButton ?
|
|
4675
|
+
className: `ds-u-padding-right--2 ${altMobileSearchButton ? "ds-l-col--12 ds-l-md-col--10 --alt-style" : "ds-l-col--10"}`,
|
|
4668
4676
|
label: "Search datasets",
|
|
4669
4677
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4670
4678
|
placeholder: "Search datasets",
|
|
@@ -4726,7 +4734,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4726
4734
|
"Showing ",
|
|
4727
4735
|
currentResultNumbers.startingNumber,
|
|
4728
4736
|
" -",
|
|
4729
|
-
|
|
4737
|
+
" ",
|
|
4730
4738
|
currentResultNumbers.endingNumber,
|
|
4731
4739
|
" of ",
|
|
4732
4740
|
data.data.total,
|
|
@@ -4804,7 +4812,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4804
4812
|
},
|
|
4805
4813
|
renderHref: (page)=>{
|
|
4806
4814
|
const searchParams = buildSearchParams(false);
|
|
4807
|
-
const includeAnd = searchParams ?
|
|
4815
|
+
const includeAnd = searchParams ? "&" : "";
|
|
4808
4816
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
4809
4817
|
}
|
|
4810
4818
|
})
|
|
@@ -4838,26 +4846,26 @@ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
4838
4846
|
|
|
4839
4847
|
|
|
4840
4848
|
const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4841
|
-
defaultSort:
|
|
4842
|
-
defaultOrder:
|
|
4843
|
-
}, pageTitle: pageTitle =
|
|
4849
|
+
defaultSort: "modified",
|
|
4850
|
+
defaultOrder: "desc"
|
|
4851
|
+
}, pageTitle: pageTitle = "What's New ", showLargeFileWarning: showLargeFileWarning = false, introText: introText = "", dataDictionaryLinks: dataDictionaryLinks = false })=>{
|
|
4844
4852
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4845
4853
|
const sortOptions = [
|
|
4846
4854
|
{
|
|
4847
|
-
label:
|
|
4848
|
-
value:
|
|
4855
|
+
label: "Newest",
|
|
4856
|
+
value: "newest"
|
|
4849
4857
|
},
|
|
4850
4858
|
{
|
|
4851
|
-
label:
|
|
4852
|
-
value:
|
|
4859
|
+
label: "Oldest",
|
|
4860
|
+
value: "oldest"
|
|
4853
4861
|
},
|
|
4854
4862
|
{
|
|
4855
|
-
label:
|
|
4856
|
-
value:
|
|
4863
|
+
label: "Title A-Z",
|
|
4864
|
+
value: "titleAZ"
|
|
4857
4865
|
},
|
|
4858
4866
|
{
|
|
4859
|
-
label:
|
|
4860
|
-
value:
|
|
4867
|
+
label: "Title Z-A",
|
|
4868
|
+
value: "titleZA"
|
|
4861
4869
|
}
|
|
4862
4870
|
];
|
|
4863
4871
|
const defaultSortBy = "";
|
|
@@ -4871,33 +4879,33 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4871
4879
|
endingNumber: 0
|
|
4872
4880
|
});
|
|
4873
4881
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4874
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4882
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
|
|
4875
4883
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4876
4884
|
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
4877
4885
|
const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
|
|
4878
4886
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4879
4887
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4880
4888
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4881
|
-
return sort ===
|
|
4889
|
+
return sort === "modified" ? sortOrder === "desc" ? "newest" : "oldest" : sortOrder === "desc" ? "titleZA" : "titleAZ";
|
|
4882
4890
|
});
|
|
4883
4891
|
const setSortOptions = (value)=>{
|
|
4884
4892
|
setSortDisplay(value);
|
|
4885
4893
|
switch(value){
|
|
4886
|
-
case
|
|
4887
|
-
setSort(
|
|
4888
|
-
setSortOrder(
|
|
4894
|
+
case "newest":
|
|
4895
|
+
setSort("modified");
|
|
4896
|
+
setSortOrder("desc");
|
|
4889
4897
|
break;
|
|
4890
|
-
case
|
|
4891
|
-
setSort(
|
|
4892
|
-
setSortOrder(
|
|
4898
|
+
case "oldest":
|
|
4899
|
+
setSort("modified");
|
|
4900
|
+
setSortOrder("asc");
|
|
4893
4901
|
break;
|
|
4894
|
-
case
|
|
4895
|
-
setSort(
|
|
4896
|
-
setSortOrder(
|
|
4902
|
+
case "titleAZ":
|
|
4903
|
+
setSort("title");
|
|
4904
|
+
setSortOrder("asc");
|
|
4897
4905
|
break;
|
|
4898
|
-
case
|
|
4899
|
-
setSort(
|
|
4900
|
-
setSortOrder(
|
|
4906
|
+
case "titleZA":
|
|
4907
|
+
setSort("title");
|
|
4908
|
+
setSortOrder("desc");
|
|
4901
4909
|
break;
|
|
4902
4910
|
}
|
|
4903
4911
|
};
|
|
@@ -4906,7 +4914,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4906
4914
|
// Update browser URL with current search params
|
|
4907
4915
|
const params = buildSearchParams(true);
|
|
4908
4916
|
const url = new URL(window.location.href);
|
|
4909
|
-
window.history.pushState({},
|
|
4917
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${params}`);
|
|
4910
4918
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4911
4919
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4912
4920
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -4945,9 +4953,9 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4945
4953
|
}
|
|
4946
4954
|
let params = {
|
|
4947
4955
|
sort: sort ? sort : undefined,
|
|
4948
|
-
[
|
|
4956
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4949
4957
|
page: page !== 1 ? page : undefined,
|
|
4950
|
-
[
|
|
4958
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4951
4959
|
};
|
|
4952
4960
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4953
4961
|
queryKey: [
|
|
@@ -4956,7 +4964,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4956
4964
|
],
|
|
4957
4965
|
queryFn: ()=>{
|
|
4958
4966
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4959
|
-
arrayFormat:
|
|
4967
|
+
arrayFormat: "comma",
|
|
4960
4968
|
encode: false
|
|
4961
4969
|
})}`);
|
|
4962
4970
|
}
|
|
@@ -5020,7 +5028,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5020
5028
|
"Showing ",
|
|
5021
5029
|
currentResultNumbers.startingNumber,
|
|
5022
5030
|
" -",
|
|
5023
|
-
|
|
5031
|
+
" ",
|
|
5024
5032
|
currentResultNumbers.endingNumber,
|
|
5025
5033
|
" of ",
|
|
5026
5034
|
data.data.total,
|
|
@@ -5087,7 +5095,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5087
5095
|
},
|
|
5088
5096
|
renderHref: (page)=>{
|
|
5089
5097
|
const searchParams = buildSearchParams(false);
|
|
5090
|
-
const includeAnd = searchParams ?
|
|
5098
|
+
const includeAnd = searchParams ? "&" : "";
|
|
5091
5099
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
5092
5100
|
}
|
|
5093
5101
|
})
|
|
@@ -5119,12 +5127,12 @@ var $550bcc185f420ff5$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
5119
5127
|
|
|
5120
5128
|
const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
5121
5129
|
const [dataset, setDataset] = (0, $hgUW1$useState)({
|
|
5122
|
-
title:
|
|
5130
|
+
title: "",
|
|
5123
5131
|
distribution: [],
|
|
5124
|
-
error:
|
|
5125
|
-
description:
|
|
5126
|
-
identifier:
|
|
5127
|
-
modified:
|
|
5132
|
+
error: "",
|
|
5133
|
+
description: "",
|
|
5134
|
+
identifier: "",
|
|
5135
|
+
modified: ""
|
|
5128
5136
|
});
|
|
5129
5137
|
const [id, setId] = (0, $hgUW1$useState)(datasetId);
|
|
5130
5138
|
const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
|
|
@@ -5134,7 +5142,7 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
|
5134
5142
|
"metastore" + id
|
|
5135
5143
|
],
|
|
5136
5144
|
queryFn: ()=>{
|
|
5137
|
-
return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ?
|
|
5145
|
+
return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ? "&" : ""}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`).then((res)=>res.data).catch((error)=>{
|
|
5138
5146
|
return {
|
|
5139
5147
|
title: dataset.title,
|
|
5140
5148
|
distribution: dataset.distribution,
|
|
@@ -5200,7 +5208,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5200
5208
|
...additionalParams
|
|
5201
5209
|
};
|
|
5202
5210
|
params = (0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA);
|
|
5203
|
-
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` :
|
|
5211
|
+
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : "";
|
|
5204
5212
|
let enabled = false;
|
|
5205
5213
|
if (id) {
|
|
5206
5214
|
if (!requireConditions) enabled = true;
|
|
@@ -5280,65 +5288,65 @@ var $1d3d480a9cfaabe0$export$2e2bcd8739ae039 = $1d3d480a9cfaabe0$var$useDatastor
|
|
|
5280
5288
|
|
|
5281
5289
|
|
|
5282
5290
|
const $28f16f59778efa64$export$82b1b1d517e5388a = {
|
|
5283
|
-
|
|
5284
|
-
name:
|
|
5291
|
+
"R/P10Y": {
|
|
5292
|
+
name: "Decennial"
|
|
5285
5293
|
},
|
|
5286
|
-
|
|
5287
|
-
name:
|
|
5294
|
+
"R/P4Y": {
|
|
5295
|
+
name: "Quadrennial"
|
|
5288
5296
|
},
|
|
5289
|
-
|
|
5290
|
-
name:
|
|
5297
|
+
"R/P1Y": {
|
|
5298
|
+
name: "Annual"
|
|
5291
5299
|
},
|
|
5292
|
-
|
|
5293
|
-
name:
|
|
5300
|
+
"R/P2M": {
|
|
5301
|
+
name: "Bimonthly"
|
|
5294
5302
|
},
|
|
5295
|
-
|
|
5296
|
-
name:
|
|
5303
|
+
"R/P3.5D": {
|
|
5304
|
+
name: "Semiweekly"
|
|
5297
5305
|
},
|
|
5298
|
-
|
|
5299
|
-
name:
|
|
5306
|
+
"R/P1D": {
|
|
5307
|
+
name: "Daily"
|
|
5300
5308
|
},
|
|
5301
|
-
|
|
5302
|
-
name:
|
|
5309
|
+
"R/P2W": {
|
|
5310
|
+
name: "Biweekly"
|
|
5303
5311
|
},
|
|
5304
|
-
|
|
5305
|
-
name:
|
|
5312
|
+
"R/P6M": {
|
|
5313
|
+
name: "Semiannual"
|
|
5306
5314
|
},
|
|
5307
|
-
|
|
5308
|
-
name:
|
|
5315
|
+
"R/P2Y": {
|
|
5316
|
+
name: "Biennial"
|
|
5309
5317
|
},
|
|
5310
|
-
|
|
5311
|
-
name:
|
|
5318
|
+
"R/P3Y": {
|
|
5319
|
+
name: "Triennial"
|
|
5312
5320
|
},
|
|
5313
|
-
|
|
5314
|
-
name:
|
|
5321
|
+
"R/P0.33W": {
|
|
5322
|
+
name: "Three times a week"
|
|
5315
5323
|
},
|
|
5316
|
-
|
|
5317
|
-
name:
|
|
5324
|
+
"R/P0.33M": {
|
|
5325
|
+
name: "Three times a month"
|
|
5318
5326
|
},
|
|
5319
|
-
|
|
5320
|
-
name:
|
|
5327
|
+
"R/PT1S": {
|
|
5328
|
+
name: "Continuously updated"
|
|
5321
5329
|
},
|
|
5322
|
-
|
|
5323
|
-
name:
|
|
5330
|
+
"R/P1M": {
|
|
5331
|
+
name: "Monthly"
|
|
5324
5332
|
},
|
|
5325
|
-
|
|
5326
|
-
name:
|
|
5333
|
+
"R/P3M": {
|
|
5334
|
+
name: "Quarterly"
|
|
5327
5335
|
},
|
|
5328
|
-
|
|
5329
|
-
name:
|
|
5336
|
+
"R/P0.5M": {
|
|
5337
|
+
name: "Semimonthly"
|
|
5330
5338
|
},
|
|
5331
|
-
|
|
5332
|
-
name:
|
|
5339
|
+
"R/P4M": {
|
|
5340
|
+
name: "Three times a year"
|
|
5333
5341
|
},
|
|
5334
|
-
|
|
5335
|
-
name:
|
|
5342
|
+
"R/P1W": {
|
|
5343
|
+
name: "Weekly"
|
|
5336
5344
|
},
|
|
5337
|
-
|
|
5338
|
-
name:
|
|
5345
|
+
"R/PT1H": {
|
|
5346
|
+
name: "Hourly"
|
|
5339
5347
|
},
|
|
5340
5348
|
irregular: {
|
|
5341
|
-
name:
|
|
5349
|
+
name: "Irregular"
|
|
5342
5350
|
}
|
|
5343
5351
|
};
|
|
5344
5352
|
|
|
@@ -5347,7 +5355,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5347
5355
|
modified: (data)=>{
|
|
5348
5356
|
return [
|
|
5349
5357
|
{
|
|
5350
|
-
label:
|
|
5358
|
+
label: "Modified",
|
|
5351
5359
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5352
5360
|
date: data
|
|
5353
5361
|
})
|
|
@@ -5357,7 +5365,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5357
5365
|
issued: (data)=>{
|
|
5358
5366
|
return [
|
|
5359
5367
|
{
|
|
5360
|
-
label:
|
|
5368
|
+
label: "Issued",
|
|
5361
5369
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5362
5370
|
date: data
|
|
5363
5371
|
})
|
|
@@ -5367,7 +5375,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5367
5375
|
accrualPeriodicity: (data)=>{
|
|
5368
5376
|
return [
|
|
5369
5377
|
{
|
|
5370
|
-
label:
|
|
5378
|
+
label: "Frequency",
|
|
5371
5379
|
value: (0, $28f16f59778efa64$export$82b1b1d517e5388a)[data].name
|
|
5372
5380
|
}
|
|
5373
5381
|
];
|
|
@@ -5375,7 +5383,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5375
5383
|
publisher: (data)=>{
|
|
5376
5384
|
if (data.data && data.data.name) return [
|
|
5377
5385
|
{
|
|
5378
|
-
label:
|
|
5386
|
+
label: "Publisher",
|
|
5379
5387
|
value: data.data.name
|
|
5380
5388
|
}
|
|
5381
5389
|
];
|
|
@@ -5384,7 +5392,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5384
5392
|
identifier: (data)=>{
|
|
5385
5393
|
return [
|
|
5386
5394
|
{
|
|
5387
|
-
label:
|
|
5395
|
+
label: "Identifier",
|
|
5388
5396
|
value: data
|
|
5389
5397
|
}
|
|
5390
5398
|
];
|
|
@@ -5392,11 +5400,11 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5392
5400
|
contactPoint: (data)=>{
|
|
5393
5401
|
let rows = [];
|
|
5394
5402
|
if (data.fn) rows.push({
|
|
5395
|
-
label:
|
|
5403
|
+
label: "Contact",
|
|
5396
5404
|
value: data.fn
|
|
5397
5405
|
});
|
|
5398
5406
|
if (data.hasEmail) rows.push({
|
|
5399
|
-
label:
|
|
5407
|
+
label: "Contact Email",
|
|
5400
5408
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5401
5409
|
href: data.hasEmail.includes("mailto:") ? data.hasEmail : `mailto:${data.hasEmail}`,
|
|
5402
5410
|
children: data.hasEmail.replace("mailto:", "")
|
|
@@ -5407,7 +5415,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5407
5415
|
bureauCode: (data)=>{
|
|
5408
5416
|
if (data.length) return [
|
|
5409
5417
|
{
|
|
5410
|
-
label:
|
|
5418
|
+
label: "Bureau Code",
|
|
5411
5419
|
value: data[0]
|
|
5412
5420
|
}
|
|
5413
5421
|
];
|
|
@@ -5415,7 +5423,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5415
5423
|
programCode: (data)=>{
|
|
5416
5424
|
if (data.length) return [
|
|
5417
5425
|
{
|
|
5418
|
-
label:
|
|
5426
|
+
label: "Program Code",
|
|
5419
5427
|
value: data[0]
|
|
5420
5428
|
}
|
|
5421
5429
|
];
|
|
@@ -5423,13 +5431,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5423
5431
|
theme: (data)=>{
|
|
5424
5432
|
return [
|
|
5425
5433
|
{
|
|
5426
|
-
label:
|
|
5434
|
+
label: "Category",
|
|
5427
5435
|
value: data.map((theme)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5428
5436
|
to: `/datasets?theme[]=${theme.data}`,
|
|
5429
5437
|
children: theme.data
|
|
5430
5438
|
}, theme.data)).reduce((prev, curr)=>[
|
|
5431
5439
|
prev,
|
|
5432
|
-
|
|
5440
|
+
", ",
|
|
5433
5441
|
curr
|
|
5434
5442
|
])
|
|
5435
5443
|
}
|
|
@@ -5438,13 +5446,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5438
5446
|
keyword: (data)=>{
|
|
5439
5447
|
return [
|
|
5440
5448
|
{
|
|
5441
|
-
label:
|
|
5449
|
+
label: "Tags",
|
|
5442
5450
|
value: data.map((keyword)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5443
5451
|
to: `/datasets?keyword[]=${keyword.data}`,
|
|
5444
5452
|
children: keyword.data
|
|
5445
5453
|
}, keyword.data)).reduce((prev, curr)=>[
|
|
5446
5454
|
prev,
|
|
5447
|
-
|
|
5455
|
+
", ",
|
|
5448
5456
|
curr
|
|
5449
5457
|
])
|
|
5450
5458
|
}
|
|
@@ -5453,7 +5461,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5453
5461
|
license: (data)=>{
|
|
5454
5462
|
return [
|
|
5455
5463
|
{
|
|
5456
|
-
label:
|
|
5464
|
+
label: "License",
|
|
5457
5465
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5458
5466
|
href: data,
|
|
5459
5467
|
children: data
|
|
@@ -5464,7 +5472,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5464
5472
|
accessLevel: (data)=>{
|
|
5465
5473
|
return [
|
|
5466
5474
|
{
|
|
5467
|
-
label:
|
|
5475
|
+
label: "Public Access Level",
|
|
5468
5476
|
value: data
|
|
5469
5477
|
}
|
|
5470
5478
|
];
|
|
@@ -5472,7 +5480,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5472
5480
|
temporal: (data)=>{
|
|
5473
5481
|
return [
|
|
5474
5482
|
{
|
|
5475
|
-
label:
|
|
5483
|
+
label: "Temporal Coverage",
|
|
5476
5484
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5477
5485
|
className: "dc-c-word-break--all",
|
|
5478
5486
|
children: data
|
|
@@ -5483,7 +5491,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5483
5491
|
spatial: (data)=>{
|
|
5484
5492
|
return [
|
|
5485
5493
|
{
|
|
5486
|
-
label:
|
|
5494
|
+
label: "Spacial/Geographical Coverage",
|
|
5487
5495
|
value: data
|
|
5488
5496
|
}
|
|
5489
5497
|
];
|
|
@@ -5491,7 +5499,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5491
5499
|
references: (data)=>{
|
|
5492
5500
|
return [
|
|
5493
5501
|
{
|
|
5494
|
-
label:
|
|
5502
|
+
label: "Related Documents",
|
|
5495
5503
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
5496
5504
|
className: "ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0",
|
|
5497
5505
|
children: data.map((item)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -5609,8 +5617,8 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5609
5617
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
5610
5618
|
href: dist.data.downloadURL,
|
|
5611
5619
|
style: {
|
|
5612
|
-
order: sm ?
|
|
5613
|
-
width: sm ?
|
|
5620
|
+
order: sm ? "1" : "0",
|
|
5621
|
+
width: sm ? "100%" : "auto"
|
|
5614
5622
|
},
|
|
5615
5623
|
"aria-label": `Download ${dist.data.title || title} ${fileFormat}`,
|
|
5616
5624
|
className: "ds-c-button",
|
|
@@ -5623,7 +5631,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5623
5631
|
})
|
|
5624
5632
|
}),
|
|
5625
5633
|
dist.data.description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5626
|
-
className:
|
|
5634
|
+
className: "ds-u-measure--wide ds-u-margin-bottom--7",
|
|
5627
5635
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5628
5636
|
className: "dc-c-metadata-description ds-u-margin--0",
|
|
5629
5637
|
dangerouslySetInnerHTML: {
|
|
@@ -5695,7 +5703,7 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5695
5703
|
const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
|
|
5696
5704
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
5697
5705
|
children: [
|
|
5698
|
-
md ?
|
|
5706
|
+
md ? "" : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5699
5707
|
component: "th",
|
|
5700
5708
|
className: "ds-u-font-weight--bold",
|
|
5701
5709
|
children: [
|
|
@@ -5706,8 +5714,8 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5706
5714
|
title: tooltip.title,
|
|
5707
5715
|
// @ts-ignore
|
|
5708
5716
|
style: {
|
|
5709
|
-
border:
|
|
5710
|
-
background:
|
|
5717
|
+
border: "none",
|
|
5718
|
+
background: "none"
|
|
5711
5719
|
},
|
|
5712
5720
|
maxWidth: "400px",
|
|
5713
5721
|
placement: "auto",
|
|
@@ -5766,10 +5774,10 @@ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: ap
|
|
|
5766
5774
|
href: apiUrl,
|
|
5767
5775
|
children: [
|
|
5768
5776
|
"View API",
|
|
5769
|
-
|
|
5777
|
+
" ",
|
|
5770
5778
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5771
5779
|
style: {
|
|
5772
|
-
whiteSpace:
|
|
5780
|
+
whiteSpace: "nowrap"
|
|
5773
5781
|
},
|
|
5774
5782
|
children: [
|
|
5775
5783
|
"specification ",
|
|
@@ -5810,20 +5818,20 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
|
|
|
5810
5818
|
|
|
5811
5819
|
const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
|
|
5812
5820
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
5813
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
5821
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)("");
|
|
5814
5822
|
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
5815
5823
|
minWidth: 0,
|
|
5816
5824
|
maxWidth: 544
|
|
5817
5825
|
});
|
|
5818
5826
|
const sortElement = (isSorted)=>{
|
|
5819
|
-
if (isSorted ===
|
|
5820
|
-
if (isSorted ===
|
|
5821
|
-
return
|
|
5827
|
+
if (isSorted === "asc") return "dc-c-sort--asc";
|
|
5828
|
+
if (isSorted === "desc") return "dc-c-sort--desc";
|
|
5829
|
+
return "dc-c-sort--default";
|
|
5822
5830
|
};
|
|
5823
5831
|
const table = (0, $hgUW1$useReactTable)({
|
|
5824
5832
|
data: tableData,
|
|
5825
5833
|
columns: tableColumns,
|
|
5826
|
-
columnResizeMode:
|
|
5834
|
+
columnResizeMode: "onChange",
|
|
5827
5835
|
getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
|
|
5828
5836
|
getFilteredRowModel: (0, $hgUW1$getFilteredRowModel)(),
|
|
5829
5837
|
getPaginationRowModel: (0, $hgUW1$getPaginationRowModel)(),
|
|
@@ -5842,49 +5850,49 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5842
5850
|
});
|
|
5843
5851
|
const sortOptions = [
|
|
5844
5852
|
{
|
|
5845
|
-
value:
|
|
5846
|
-
label:
|
|
5853
|
+
value: "default",
|
|
5854
|
+
label: "No Sort"
|
|
5847
5855
|
},
|
|
5848
5856
|
{
|
|
5849
|
-
value:
|
|
5850
|
-
label:
|
|
5857
|
+
value: "titleasc",
|
|
5858
|
+
label: "Title A-Z"
|
|
5851
5859
|
},
|
|
5852
5860
|
{
|
|
5853
|
-
value:
|
|
5854
|
-
label:
|
|
5861
|
+
value: "titledesc",
|
|
5862
|
+
label: "Title Z-A"
|
|
5855
5863
|
},
|
|
5856
5864
|
{
|
|
5857
|
-
value:
|
|
5858
|
-
label:
|
|
5865
|
+
value: "typeasc",
|
|
5866
|
+
label: "Type A-Z"
|
|
5859
5867
|
},
|
|
5860
5868
|
{
|
|
5861
|
-
value:
|
|
5862
|
-
label:
|
|
5869
|
+
value: "typedesc",
|
|
5870
|
+
label: "Type Z-A"
|
|
5863
5871
|
}
|
|
5864
5872
|
];
|
|
5865
5873
|
const sortStatesLookup = {
|
|
5866
5874
|
default: [],
|
|
5867
5875
|
titleasc: [
|
|
5868
5876
|
{
|
|
5869
|
-
id:
|
|
5877
|
+
id: "titleResizable",
|
|
5870
5878
|
desc: false
|
|
5871
5879
|
}
|
|
5872
5880
|
],
|
|
5873
5881
|
titledesc: [
|
|
5874
5882
|
{
|
|
5875
|
-
id:
|
|
5883
|
+
id: "titleResizable",
|
|
5876
5884
|
desc: true
|
|
5877
5885
|
}
|
|
5878
5886
|
],
|
|
5879
5887
|
typeasc: [
|
|
5880
5888
|
{
|
|
5881
|
-
id:
|
|
5889
|
+
id: "type",
|
|
5882
5890
|
desc: false
|
|
5883
5891
|
}
|
|
5884
5892
|
],
|
|
5885
5893
|
typedesc: [
|
|
5886
5894
|
{
|
|
5887
|
-
id:
|
|
5895
|
+
id: "type",
|
|
5888
5896
|
desc: true
|
|
5889
5897
|
}
|
|
5890
5898
|
]
|
|
@@ -5912,7 +5920,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5912
5920
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
5913
5921
|
className: "dc-c-datatable",
|
|
5914
5922
|
style: {
|
|
5915
|
-
width:
|
|
5923
|
+
width: "100%"
|
|
5916
5924
|
},
|
|
5917
5925
|
stackable: true,
|
|
5918
5926
|
children: [
|
|
@@ -5928,12 +5936,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5928
5936
|
}, header.id + "_resize") : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5929
5937
|
key: header.id,
|
|
5930
5938
|
className: `ds-u-border-y--2 ds-u-border--dark ds-u-border-x--0`,
|
|
5931
|
-
id:
|
|
5939
|
+
id: "dataDictionary_" + header.id,
|
|
5932
5940
|
children: [
|
|
5933
5941
|
(0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext()),
|
|
5934
|
-
header.id ===
|
|
5942
|
+
header.id === "type" && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
5935
5943
|
onClick: header.column.getToggleSortingHandler(),
|
|
5936
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
5944
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : "",
|
|
5937
5945
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
5938
5946
|
})
|
|
5939
5947
|
]
|
|
@@ -5948,12 +5956,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5948
5956
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
5949
5957
|
key: cell.id,
|
|
5950
5958
|
style: {
|
|
5951
|
-
maxWidth: mobile ?
|
|
5952
|
-
whiteSpace: cell.column.id === "description" ?
|
|
5959
|
+
maxWidth: mobile ? "100%" : cell.column.getSize(),
|
|
5960
|
+
whiteSpace: cell.column.id === "description" ? "pre-wrap" : "normal"
|
|
5953
5961
|
},
|
|
5954
|
-
className: `${cell.column.id ===
|
|
5955
|
-
headers:
|
|
5956
|
-
stackedTitle: cell.column.id ===
|
|
5962
|
+
className: `${cell.column.id === "titleResizable" ? "ds-u-word-break" : ""}`,
|
|
5963
|
+
headers: "dataDictionary_" + cell.column.id,
|
|
5964
|
+
stackedTitle: cell.column.id === "titleResizable" ? "Title" : cell.column.columnDef.header,
|
|
5957
5965
|
children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
5958
5966
|
});
|
|
5959
5967
|
})
|
|
@@ -5982,7 +5990,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5982
5990
|
table.setPageIndex(page - 1);
|
|
5983
5991
|
},
|
|
5984
5992
|
renderHref: (page)=>`/page=${page}`
|
|
5985
|
-
}) :
|
|
5993
|
+
}) : ""
|
|
5986
5994
|
]
|
|
5987
5995
|
});
|
|
5988
5996
|
};
|
|
@@ -5992,17 +6000,17 @@ var $6765a74df807d015$export$2e2bcd8739ae039 = $6765a74df807d015$var$DataDiction
|
|
|
5992
6000
|
const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
|
|
5993
6001
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
5994
6002
|
const tableColumns = [
|
|
5995
|
-
columnHelper.accessor(
|
|
5996
|
-
header:
|
|
6003
|
+
columnHelper.accessor("name", {
|
|
6004
|
+
header: "Name"
|
|
5997
6005
|
}),
|
|
5998
|
-
columnHelper.accessor(
|
|
5999
|
-
header:
|
|
6006
|
+
columnHelper.accessor("title", {
|
|
6007
|
+
header: "Title"
|
|
6000
6008
|
}),
|
|
6001
|
-
columnHelper.accessor(
|
|
6002
|
-
header:
|
|
6009
|
+
columnHelper.accessor("type", {
|
|
6010
|
+
header: "Type"
|
|
6003
6011
|
}),
|
|
6004
|
-
columnHelper.accessor(
|
|
6005
|
-
header:
|
|
6012
|
+
columnHelper.accessor("format", {
|
|
6013
|
+
header: "Format"
|
|
6006
6014
|
})
|
|
6007
6015
|
];
|
|
6008
6016
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6765a74df807d015$export$2e2bcd8739ae039), {
|
|
@@ -6046,7 +6054,7 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6046
6054
|
});
|
|
6047
6055
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
6048
6056
|
const tableColumns = [
|
|
6049
|
-
columnHelper.accessor(
|
|
6057
|
+
columnHelper.accessor("titleResizable", {
|
|
6050
6058
|
header: ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6051
6059
|
className: "dc-c-tooltip-width-override",
|
|
6052
6060
|
children: [
|
|
@@ -6055,8 +6063,8 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6055
6063
|
title: "Title represents the column headers of the data file",
|
|
6056
6064
|
// @ts-ignore
|
|
6057
6065
|
style: {
|
|
6058
|
-
border:
|
|
6059
|
-
background:
|
|
6066
|
+
border: "none",
|
|
6067
|
+
background: "none"
|
|
6060
6068
|
},
|
|
6061
6069
|
maxWidth: "400px",
|
|
6062
6070
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
|
|
@@ -6066,48 +6074,48 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6066
6074
|
size: 300,
|
|
6067
6075
|
minSize: 132
|
|
6068
6076
|
}),
|
|
6069
|
-
columnHelper.accessor(
|
|
6070
|
-
header:
|
|
6077
|
+
columnHelper.accessor("description", {
|
|
6078
|
+
header: "Description",
|
|
6071
6079
|
minSize: 600
|
|
6072
6080
|
}),
|
|
6073
|
-
columnHelper.accessor(
|
|
6074
|
-
header:
|
|
6081
|
+
columnHelper.accessor("type", {
|
|
6082
|
+
header: "Type",
|
|
6075
6083
|
size: 150,
|
|
6076
6084
|
enableResizing: false
|
|
6077
6085
|
})
|
|
6078
6086
|
];
|
|
6079
6087
|
const typeOptions = [
|
|
6080
6088
|
{
|
|
6081
|
-
value:
|
|
6082
|
-
label:
|
|
6089
|
+
value: "all",
|
|
6090
|
+
label: "All Types"
|
|
6083
6091
|
},
|
|
6084
6092
|
{
|
|
6085
|
-
value:
|
|
6086
|
-
label:
|
|
6093
|
+
value: "string",
|
|
6094
|
+
label: "String"
|
|
6087
6095
|
},
|
|
6088
6096
|
{
|
|
6089
|
-
value:
|
|
6090
|
-
label:
|
|
6097
|
+
value: "date",
|
|
6098
|
+
label: "Date"
|
|
6091
6099
|
},
|
|
6092
6100
|
{
|
|
6093
|
-
value:
|
|
6094
|
-
label:
|
|
6101
|
+
value: "datetime",
|
|
6102
|
+
label: "Datetime"
|
|
6095
6103
|
},
|
|
6096
6104
|
{
|
|
6097
|
-
value:
|
|
6098
|
-
label:
|
|
6105
|
+
value: "year",
|
|
6106
|
+
label: "Year"
|
|
6099
6107
|
},
|
|
6100
6108
|
{
|
|
6101
|
-
value:
|
|
6102
|
-
label:
|
|
6109
|
+
value: "integer",
|
|
6110
|
+
label: "Integer"
|
|
6103
6111
|
},
|
|
6104
6112
|
{
|
|
6105
|
-
value:
|
|
6106
|
-
label:
|
|
6113
|
+
value: "number",
|
|
6114
|
+
label: "Number"
|
|
6107
6115
|
},
|
|
6108
6116
|
{
|
|
6109
|
-
value:
|
|
6110
|
-
label:
|
|
6117
|
+
value: "boolean",
|
|
6118
|
+
label: "Boolean"
|
|
6111
6119
|
}
|
|
6112
6120
|
];
|
|
6113
6121
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -6214,7 +6222,7 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
|
|
|
6214
6222
|
href: datasetDictionaryEndpoint + "/csv",
|
|
6215
6223
|
className: "ds-c-button",
|
|
6216
6224
|
style: {
|
|
6217
|
-
width:
|
|
6225
|
+
width: "100%"
|
|
6218
6226
|
},
|
|
6219
6227
|
children: [
|
|
6220
6228
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
@@ -6271,7 +6279,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6271
6279
|
const [description, setDescription] = (0, $hgUW1$useState)("");
|
|
6272
6280
|
if (!distribution && !dataset?.identifier) return null;
|
|
6273
6281
|
(0, $hgUW1$useEffect)(()=>{
|
|
6274
|
-
let newDescription =
|
|
6282
|
+
let newDescription = "";
|
|
6275
6283
|
if (customDescription) newDescription = customDescription(dataset, distribution, resource);
|
|
6276
6284
|
else {
|
|
6277
6285
|
if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
|
|
@@ -6286,7 +6294,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6286
6294
|
customDescription
|
|
6287
6295
|
]);
|
|
6288
6296
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6289
|
-
className:
|
|
6297
|
+
className: "ds-u-measure--wide ds-u-margin-bottom--7",
|
|
6290
6298
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6291
6299
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
6292
6300
|
dangerouslySetInnerHTML: {
|
|
@@ -6308,7 +6316,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
6308
6316
|
],
|
|
6309
6317
|
queryFn: ()=>{
|
|
6310
6318
|
return fetch(`${dataDictionaryUrl}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA), {
|
|
6311
|
-
arrayFormat:
|
|
6319
|
+
arrayFormat: "comma",
|
|
6312
6320
|
encode: false
|
|
6313
6321
|
})}`).then((res)=>res.json());
|
|
6314
6322
|
}
|
|
@@ -6327,7 +6335,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6327
6335
|
conditions: []
|
|
6328
6336
|
};
|
|
6329
6337
|
const { dataset: dataset, isPending: isPending } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
6330
|
-
const title = dataset.title ? dataset.title :
|
|
6338
|
+
const title = dataset.title ? dataset.title : "";
|
|
6331
6339
|
const metadataMapping = {
|
|
6332
6340
|
...(0, $6da0396069e23175$export$bc27cf7ecf44639d),
|
|
6333
6341
|
...customMetadataMapping
|
|
@@ -6335,7 +6343,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6335
6343
|
let distribution = {};
|
|
6336
6344
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
6337
6345
|
if (distributions.length) distribution = distributions[0];
|
|
6338
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
6346
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
6339
6347
|
...options,
|
|
6340
6348
|
limit: defaultPageSize
|
|
6341
6349
|
});
|
|
@@ -6347,7 +6355,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6347
6355
|
}) : null;
|
|
6348
6356
|
(0, $hgUW1$useEffect)(()=>{
|
|
6349
6357
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6350
|
-
if (localFileFormat ===
|
|
6358
|
+
if (localFileFormat === "csv") resource.setResource(distribution.identifier);
|
|
6351
6359
|
}, [
|
|
6352
6360
|
distribution
|
|
6353
6361
|
]);
|
|
@@ -6402,27 +6410,27 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6402
6410
|
distribution,
|
|
6403
6411
|
window.location.hash
|
|
6404
6412
|
]);
|
|
6405
|
-
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType ===
|
|
6413
|
+
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === "application/vnd.tableschema+json" || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
6406
6414
|
const formatType = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6407
6415
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6408
6416
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
6409
6417
|
content: notFoundContent,
|
|
6410
6418
|
siteUrl: rootUrl
|
|
6411
6419
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6412
|
-
className:
|
|
6420
|
+
className: "ds-l-container",
|
|
6413
6421
|
children: [
|
|
6414
6422
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6415
|
-
className:
|
|
6423
|
+
className: "ds-l-row",
|
|
6416
6424
|
children: [
|
|
6417
6425
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6418
|
-
className:
|
|
6426
|
+
className: "ds-l-md-col--9",
|
|
6419
6427
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
6420
6428
|
className: "ds-text-heading--3xl",
|
|
6421
6429
|
children: title
|
|
6422
6430
|
})
|
|
6423
6431
|
}),
|
|
6424
6432
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6425
|
-
className:
|
|
6433
|
+
className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
|
|
6426
6434
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
6427
6435
|
className: "ds-u-margin--0",
|
|
6428
6436
|
children: [
|
|
@@ -6434,7 +6442,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6434
6442
|
})
|
|
6435
6443
|
}),
|
|
6436
6444
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6437
|
-
className:
|
|
6445
|
+
className: "ds-l-md-col--9",
|
|
6438
6446
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
6439
6447
|
distribution: distribution,
|
|
6440
6448
|
dataset: dataset,
|
|
@@ -6446,9 +6454,9 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6446
6454
|
]
|
|
6447
6455
|
}),
|
|
6448
6456
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6449
|
-
className:
|
|
6457
|
+
className: "ds-l-row",
|
|
6450
6458
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6451
|
-
className:
|
|
6459
|
+
className: "ds-l-md-col--12 dc-dataset",
|
|
6452
6460
|
children: !isPending && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tabs), {
|
|
6453
6461
|
onChange: (selectedId, prevSelectedId)=>{
|
|
6454
6462
|
setSelectedTab(selectedId);
|
|
@@ -6456,7 +6464,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6456
6464
|
selectedId: selectedTab,
|
|
6457
6465
|
children: [
|
|
6458
6466
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6459
|
-
id:
|
|
6467
|
+
id: "data-table",
|
|
6460
6468
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6461
6469
|
className: "ds-u-color--primary",
|
|
6462
6470
|
children: [
|
|
@@ -6466,7 +6474,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6466
6474
|
"Data Table"
|
|
6467
6475
|
]
|
|
6468
6476
|
}),
|
|
6469
|
-
className: borderlessTabs ?
|
|
6477
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6470
6478
|
children: (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
6471
6479
|
value: {
|
|
6472
6480
|
id: id,
|
|
@@ -6483,7 +6491,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6483
6491
|
})
|
|
6484
6492
|
}),
|
|
6485
6493
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6486
|
-
id:
|
|
6494
|
+
id: "overview",
|
|
6487
6495
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6488
6496
|
className: "ds-u-color--primary",
|
|
6489
6497
|
children: [
|
|
@@ -6493,7 +6501,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6493
6501
|
"Overview"
|
|
6494
6502
|
]
|
|
6495
6503
|
}),
|
|
6496
|
-
className: borderlessTabs ?
|
|
6504
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6497
6505
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
|
|
6498
6506
|
resource: resource,
|
|
6499
6507
|
dataset: dataset,
|
|
@@ -6502,7 +6510,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6502
6510
|
})
|
|
6503
6511
|
}),
|
|
6504
6512
|
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6505
|
-
id:
|
|
6513
|
+
id: "data-dictionary",
|
|
6506
6514
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6507
6515
|
className: "ds-u-color--primary",
|
|
6508
6516
|
children: [
|
|
@@ -6512,7 +6520,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6512
6520
|
"Data Dictionary"
|
|
6513
6521
|
]
|
|
6514
6522
|
}),
|
|
6515
|
-
className: borderlessTabs ?
|
|
6523
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6516
6524
|
children: displayDataDictionaryTab ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
6517
6525
|
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
6518
6526
|
datasetDictionaryEndpoint: distribution.data.describedBy,
|
|
@@ -6523,7 +6531,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6523
6531
|
})
|
|
6524
6532
|
}),
|
|
6525
6533
|
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6526
|
-
id:
|
|
6534
|
+
id: "api",
|
|
6527
6535
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6528
6536
|
className: "ds-u-color--primary",
|
|
6529
6537
|
children: [
|
|
@@ -6533,7 +6541,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6533
6541
|
"API"
|
|
6534
6542
|
]
|
|
6535
6543
|
}),
|
|
6536
|
-
className: borderlessTabs ?
|
|
6544
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6537
6545
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
|
|
6538
6546
|
id: id,
|
|
6539
6547
|
rootUrl: rootUrl,
|
|
@@ -6570,13 +6578,13 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6570
6578
|
});
|
|
6571
6579
|
const menu = (0, $hgUW1$useRef)(null);
|
|
6572
6580
|
function closeMobileMenu() {
|
|
6573
|
-
const mobileMenuButtonElement = document.querySelector(
|
|
6581
|
+
const mobileMenuButtonElement = document.querySelector(".dkan-c-mobile-menu-button");
|
|
6574
6582
|
if (!mobileMenuButtonElement) return;
|
|
6575
6583
|
mobileMenuButtonElement.focus();
|
|
6576
6584
|
}
|
|
6577
6585
|
// Close mobile menu with escape.
|
|
6578
6586
|
function handleMenuClose(event) {
|
|
6579
|
-
if (event.key ===
|
|
6587
|
+
if (event.key === "Escape" && mobileMenuOpen) setMobileMenuOpen(false);
|
|
6580
6588
|
}
|
|
6581
6589
|
function handleClick(event) {
|
|
6582
6590
|
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
@@ -6611,7 +6619,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6611
6619
|
const focusableEls = getFocusableElements(menu.current).selectors.visible;
|
|
6612
6620
|
const firstEl = focusableEls[0];
|
|
6613
6621
|
const lastEl = focusableEls[focusableEls.length - 1];
|
|
6614
|
-
if (event.key ===
|
|
6622
|
+
if (event.key === "Tab") {
|
|
6615
6623
|
if (event.shiftKey && document.activeElement === firstEl) {
|
|
6616
6624
|
lastEl?.focus();
|
|
6617
6625
|
event.preventDefault();
|
|
@@ -6623,15 +6631,15 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6623
6631
|
}
|
|
6624
6632
|
};
|
|
6625
6633
|
(0, $hgUW1$useEffect)(()=>{
|
|
6626
|
-
document.addEventListener(
|
|
6627
|
-
document.addEventListener(
|
|
6634
|
+
document.addEventListener("keyup", handleMenuClose);
|
|
6635
|
+
document.addEventListener("mousedown", handleClick);
|
|
6628
6636
|
if (mobileMenuOpen) handleFocusIn();
|
|
6629
6637
|
else closeMobileMenu();
|
|
6630
|
-
if (menu.current) menu.current.addEventListener(
|
|
6638
|
+
if (menu.current) menu.current.addEventListener("keydown", (evt)=>trapFocus(evt));
|
|
6631
6639
|
return ()=>{
|
|
6632
|
-
document.removeEventListener(
|
|
6633
|
-
document.addEventListener(
|
|
6634
|
-
if (menu.current) menu.current.removeEventListener(
|
|
6640
|
+
document.removeEventListener("keyup", handleMenuClose);
|
|
6641
|
+
document.addEventListener("mousedown", handleClick);
|
|
6642
|
+
if (menu.current) menu.current.removeEventListener("keydown", trapFocus);
|
|
6635
6643
|
};
|
|
6636
6644
|
}, [
|
|
6637
6645
|
mobileMenuOpen
|
|
@@ -6646,7 +6654,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6646
6654
|
},
|
|
6647
6655
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
|
|
6648
6656
|
"aria-label": "Site header",
|
|
6649
|
-
className: `dkan-c-header dkan-c-header--${mobileMax ?
|
|
6657
|
+
className: `dkan-c-header dkan-c-header--${mobileMax ? "mobile" : "desktop"}`,
|
|
6650
6658
|
children: [
|
|
6651
6659
|
topNav && topNav,
|
|
6652
6660
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6689,7 +6697,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6689
6697
|
var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
|
|
6690
6698
|
|
|
6691
6699
|
|
|
6692
|
-
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle =
|
|
6700
|
+
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle = "Get Email Updates", emailBody: emailBody = "Sign up to get the latest information from CMS by choosing the topics and frequency of emails that are best for you.", emailLink: emailLink = "", emailButton: emailButton = "Sign up for email updates", socialMediaLinks: socialMediaLinks = null, hhsLogo: hhsLogo, cmsLogo: cmsLogo, trademarkContent: trademarkContent = /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6693
6701
|
children: [
|
|
6694
6702
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6695
6703
|
children: "A federal government website managed and paid for by the U.S. Centers for Medicare & Medicaid Services."
|
|
@@ -6777,14 +6785,14 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6777
6785
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
6778
6786
|
className: "ds-u-font-size--sm",
|
|
6779
6787
|
children: footerAdditionalResourcesLinks.filter((link)=>{
|
|
6780
|
-
const noOnClick = Object.keys(link).findIndex((l)=>l ===
|
|
6788
|
+
const noOnClick = Object.keys(link).findIndex((l)=>l === "onClick");
|
|
6781
6789
|
if (noOnClick === -1 || link.onClick && link.dataTag) return link;
|
|
6782
6790
|
}).map((link)=>{
|
|
6783
6791
|
if (link.onClick && link.dataTag) return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
6784
6792
|
className: "ds-u-margin-bottom--1",
|
|
6785
6793
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
6786
6794
|
href: link.url,
|
|
6787
|
-
[
|
|
6795
|
+
["data-" + link.dataTag.name]: link.dataTag.value,
|
|
6788
6796
|
onClick: link.onClick,
|
|
6789
6797
|
children: link.label
|
|
6790
6798
|
})
|
|
@@ -6884,7 +6892,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6884
6892
|
children: [
|
|
6885
6893
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6886
6894
|
id: "svg-inline--fa-title-iRCARP7h6Kp3",
|
|
6887
|
-
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title :
|
|
6895
|
+
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title : "CMS Facebook"
|
|
6888
6896
|
}),
|
|
6889
6897
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6890
6898
|
transform: "translate(160 256)",
|
|
@@ -6937,7 +6945,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6937
6945
|
children: [
|
|
6938
6946
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6939
6947
|
id: "svg-inline--fa-title-4z03ITiPPTVF",
|
|
6940
|
-
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title :
|
|
6948
|
+
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title : "CMS Twitter"
|
|
6941
6949
|
}),
|
|
6942
6950
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6943
6951
|
transform: "translate(256 256)",
|
|
@@ -6990,7 +6998,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6990
6998
|
children: [
|
|
6991
6999
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6992
7000
|
id: "svg-inline--fa-title-Nm2qsuSKvuRZ",
|
|
6993
|
-
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title :
|
|
7001
|
+
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title : "CMS LinkedIn"
|
|
6994
7002
|
}),
|
|
6995
7003
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6996
7004
|
transform: "translate(224 256)",
|
|
@@ -7042,7 +7050,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7042
7050
|
children: [
|
|
7043
7051
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7044
7052
|
id: "svg-inline--fa-title-youtube",
|
|
7045
|
-
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title :
|
|
7053
|
+
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title : "CMS youtube"
|
|
7046
7054
|
}),
|
|
7047
7055
|
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
7048
7056
|
fill: "currentColor",
|
|
@@ -7142,26 +7150,26 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7142
7150
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
7143
7151
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
7144
7152
|
stackable: true,
|
|
7145
|
-
className:
|
|
7153
|
+
className: "ds-c-table",
|
|
7146
7154
|
children: [
|
|
7147
7155
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
|
|
7148
7156
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
7149
7157
|
children: [
|
|
7150
7158
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7151
|
-
id:
|
|
7152
|
-
headers:
|
|
7159
|
+
id: "application",
|
|
7160
|
+
headers: "Application",
|
|
7153
7161
|
children: "Application"
|
|
7154
|
-
},
|
|
7162
|
+
}, "Application"),
|
|
7155
7163
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7156
|
-
id:
|
|
7157
|
-
headers:
|
|
7164
|
+
id: "notes",
|
|
7165
|
+
headers: "Notes",
|
|
7158
7166
|
children: "Notes"
|
|
7159
|
-
},
|
|
7167
|
+
}, "Notes"),
|
|
7160
7168
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7161
|
-
id:
|
|
7162
|
-
headers:
|
|
7169
|
+
id: "links",
|
|
7170
|
+
headers: "Links",
|
|
7163
7171
|
children: "Links"
|
|
7164
|
-
},
|
|
7172
|
+
}, "Links")
|
|
7165
7173
|
]
|
|
7166
7174
|
})
|
|
7167
7175
|
}),
|
|
@@ -7171,19 +7179,19 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7171
7179
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7172
7180
|
id: d.id,
|
|
7173
7181
|
stackedTitle: "Application",
|
|
7174
|
-
headers:
|
|
7182
|
+
headers: "Application",
|
|
7175
7183
|
children: d.application
|
|
7176
7184
|
}, d.id),
|
|
7177
7185
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7178
7186
|
id: d.id,
|
|
7179
7187
|
stackedTitle: "Notes",
|
|
7180
|
-
headers:
|
|
7188
|
+
headers: "Notes",
|
|
7181
7189
|
children: d.notes
|
|
7182
7190
|
}, `${d.id}-notes`),
|
|
7183
7191
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7184
7192
|
id: d.id,
|
|
7185
7193
|
stackedTitle: "Links",
|
|
7186
|
-
headers:
|
|
7194
|
+
headers: "Links",
|
|
7187
7195
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
7188
7196
|
className: "dkan-newtab",
|
|
7189
7197
|
href: d.link,
|
|
@@ -7211,44 +7219,44 @@ var $5655284dbbb89508$export$2e2bcd8739ae039 = $5655284dbbb89508$var$Documentati
|
|
|
7211
7219
|
|
|
7212
7220
|
const $c7bf75f7e8a68780$export$7850f4d545d994c6 = [
|
|
7213
7221
|
{
|
|
7214
|
-
id:
|
|
7215
|
-
application:
|
|
7216
|
-
notes:
|
|
7217
|
-
link:
|
|
7218
|
-
linkText:
|
|
7219
|
-
screenReaderOnlyText:
|
|
7222
|
+
id: "excel",
|
|
7223
|
+
application: "Microsoft Excel",
|
|
7224
|
+
notes: "Official size limitations for Microsoft Excel",
|
|
7225
|
+
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",
|
|
7226
|
+
linkText: "Excel Specifications and Limits",
|
|
7227
|
+
screenReaderOnlyText: "on microsoft.com"
|
|
7220
7228
|
},
|
|
7221
7229
|
{
|
|
7222
|
-
id:
|
|
7223
|
-
application:
|
|
7224
|
-
notes:
|
|
7225
|
-
link:
|
|
7226
|
-
linkText:
|
|
7227
|
-
screenReaderOnlyText:
|
|
7230
|
+
id: "access",
|
|
7231
|
+
application: "Microsoft Access",
|
|
7232
|
+
notes: "Official size limitations for Microsoft Access",
|
|
7233
|
+
link: "https://support.microsoft.com/en-us/office/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c?ui=en-us&rs=en-us&ad=us",
|
|
7234
|
+
linkText: "Access 2016 Specifications",
|
|
7235
|
+
screenReaderOnlyText: "on microsoft.com"
|
|
7228
7236
|
},
|
|
7229
7237
|
{
|
|
7230
|
-
id:
|
|
7231
|
-
application:
|
|
7232
|
-
notes:
|
|
7233
|
-
link:
|
|
7234
|
-
linkText:
|
|
7235
|
-
screenReaderOnlyText:
|
|
7238
|
+
id: "oracle-sql-developer",
|
|
7239
|
+
application: "Oracle SQL Developer",
|
|
7240
|
+
notes: "Oracle SQL Developer tool",
|
|
7241
|
+
link: "https://www.oracle.com/database/sqldeveloper/",
|
|
7242
|
+
linkText: "Oracle SQL Developer Overview",
|
|
7243
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7236
7244
|
},
|
|
7237
7245
|
{
|
|
7238
|
-
id:
|
|
7239
|
-
application:
|
|
7240
|
-
notes:
|
|
7241
|
-
link:
|
|
7242
|
-
linkText:
|
|
7243
|
-
screenReaderOnlyText:
|
|
7246
|
+
id: "oracle-database",
|
|
7247
|
+
application: "Oracle Database",
|
|
7248
|
+
notes: "Oracle Database official size limitations",
|
|
7249
|
+
link: "https://docs.oracle.com/cd/B28359_01/server.111/b28320/limits002.htm#i287915",
|
|
7250
|
+
linkText: "Oracle Physical Database Limits",
|
|
7251
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7244
7252
|
},
|
|
7245
7253
|
{
|
|
7246
|
-
id:
|
|
7247
|
-
application:
|
|
7248
|
-
notes:
|
|
7249
|
-
link:
|
|
7250
|
-
linkText:
|
|
7251
|
-
screenReaderOnlyText:
|
|
7254
|
+
id: "oracle-sql-client-tools",
|
|
7255
|
+
application: "Oracle SQL Client Tools",
|
|
7256
|
+
notes: "Oracle SQL Client Tools",
|
|
7257
|
+
link: "https://www.oracle.com/database/technologies/oracle-database-software-downloads.html",
|
|
7258
|
+
linkText: "Oracle SQL Client",
|
|
7259
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7252
7260
|
}
|
|
7253
7261
|
];
|
|
7254
7262
|
|
|
@@ -7276,7 +7284,7 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7276
7284
|
}),
|
|
7277
7285
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
7278
7286
|
heading: "Notice",
|
|
7279
|
-
className:
|
|
7287
|
+
className: "ds-u-margin-top--6",
|
|
7280
7288
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
7281
7289
|
className: "ds-c-alert__text",
|
|
7282
7290
|
children: "Be aware of the file size and row limitations of the software you are attempting to import the files into. For information on limitations, look at the software's official documentation."
|
|
@@ -7285,16 +7293,16 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7285
7293
|
]
|
|
7286
7294
|
}),
|
|
7287
7295
|
/*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7288
|
-
className:
|
|
7296
|
+
className: "ds-u-margin-top--4 ds-l-row",
|
|
7289
7297
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7290
|
-
className:
|
|
7298
|
+
className: "ds-l-col--12",
|
|
7291
7299
|
children: [
|
|
7292
7300
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
7293
7301
|
className: "ds-text-heading--2xl ds-text-heading--2xl",
|
|
7294
7302
|
children: "Documentation by Application"
|
|
7295
7303
|
}),
|
|
7296
7304
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7297
|
-
className:
|
|
7305
|
+
className: "ds-u-margin-top--4",
|
|
7298
7306
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5655284dbbb89508$export$2e2bcd8739ae039), {
|
|
7299
7307
|
data: documentationList
|
|
7300
7308
|
})
|
|
@@ -7322,7 +7330,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7322
7330
|
const options = {
|
|
7323
7331
|
conditions: query ? JSON.parse(query).map(({ column: column, operator: operator, ...rest })=>({
|
|
7324
7332
|
property: column,
|
|
7325
|
-
operator: operator ===
|
|
7333
|
+
operator: operator === "is" ? "=" : operator === "is not" ? "<>" : operator === "or" ? "in" : operator,
|
|
7326
7334
|
...rest
|
|
7327
7335
|
})) : []
|
|
7328
7336
|
};
|
|
@@ -7330,13 +7338,13 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7330
7338
|
let distribution = {};
|
|
7331
7339
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
7332
7340
|
if (distributions.length) distribution = distributions[distributionIndex];
|
|
7333
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7341
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
7334
7342
|
...options,
|
|
7335
7343
|
limit: defaultPageSize
|
|
7336
7344
|
});
|
|
7337
7345
|
(0, $hgUW1$useEffect)(()=>{
|
|
7338
7346
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
7339
|
-
if (localFileFormat ===
|
|
7347
|
+
if (localFileFormat === "csv") resource.setResource(distribution.identifier);
|
|
7340
7348
|
}, [
|
|
7341
7349
|
distribution
|
|
7342
7350
|
]);
|
|
@@ -7386,7 +7394,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7386
7394
|
|
|
7387
7395
|
|
|
7388
7396
|
function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
|
|
7389
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7397
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
7390
7398
|
const newDate = new Date(condition.value);
|
|
7391
7399
|
if (newDate instanceof Date && !isNaN(newDate)) return newDate;
|
|
7392
7400
|
}
|
|
@@ -7403,9 +7411,9 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7403
7411
|
const [startDate, setStartDate] = (0, $hgUW1$react).useState($374c4669b044ddf8$var$getStartDate(condition, schema, id));
|
|
7404
7412
|
(0, $hgUW1$useEffect)(()=>{
|
|
7405
7413
|
if (property !== condition.property) {
|
|
7406
|
-
if (property) update(index,
|
|
7407
|
-
else update(index,
|
|
7408
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7414
|
+
if (property) update(index, "property", property);
|
|
7415
|
+
else update(index, "property", "");
|
|
7416
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
7409
7417
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
7410
7418
|
}
|
|
7411
7419
|
}
|
|
@@ -7419,16 +7427,16 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7419
7427
|
]);
|
|
7420
7428
|
(0, $hgUW1$useEffect)(()=>{
|
|
7421
7429
|
if (operator !== condition.operator) {
|
|
7422
|
-
if (operator) update(index,
|
|
7423
|
-
else update(index,
|
|
7430
|
+
if (operator) update(index, "operator", operator);
|
|
7431
|
+
else update(index, "operator", "");
|
|
7424
7432
|
}
|
|
7425
7433
|
}, [
|
|
7426
7434
|
operator
|
|
7427
7435
|
]);
|
|
7428
7436
|
(0, $hgUW1$useEffect)(()=>{
|
|
7429
7437
|
if (value !== condition.value) {
|
|
7430
|
-
if (value) update(index,
|
|
7431
|
-
else update(index,
|
|
7438
|
+
if (value) update(index, "value", value);
|
|
7439
|
+
else update(index, "value", "");
|
|
7432
7440
|
}
|
|
7433
7441
|
}, [
|
|
7434
7442
|
value
|
|
@@ -7452,7 +7460,7 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7452
7460
|
onChange: (e)=>setOperator(e.target.value),
|
|
7453
7461
|
className: "ds-l-sm-col--3 ds-l-md-col--2 ds-l-col--12 ds-u-padding--0 ds-u-md-padding-right--2 ds-u-margin-bottom--0 ds-u-md-margin-bottom--2"
|
|
7454
7462
|
}),
|
|
7455
|
-
schema[id].fields[property].mysql_type ===
|
|
7463
|
+
schema[id].fields[property].mysql_type === "date" ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7456
7464
|
className: "ds-l-md-col--5 ds-l-lg-col--4 ds-l-sm-col--8 ds-l-col--12 ds-u-padding--0 ds-u-sm-padding-right--2 ds-u-md-padding-right--0 ds-u-lg-padding-right--2 ds-u-margin-bottom--2",
|
|
7457
7465
|
children: [
|
|
7458
7466
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
@@ -7542,12 +7550,12 @@ const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions, schema: sche
|
|
|
7542
7550
|
className: "ds-u-font-weight--bold",
|
|
7543
7551
|
children: description
|
|
7544
7552
|
}),
|
|
7545
|
-
|
|
7553
|
+
" ",
|
|
7546
7554
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7547
7555
|
className: "ds-u-font-weight--normal",
|
|
7548
7556
|
children: operator.label.toUpperCase()
|
|
7549
7557
|
}),
|
|
7550
|
-
|
|
7558
|
+
" ",
|
|
7551
7559
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7552
7560
|
className: "ds-u-color--success",
|
|
7553
7561
|
children: formattedText
|
|
@@ -7574,19 +7582,19 @@ var $bef7bff2823feea2$export$2e2bcd8739ae039 = $bef7bff2823feea2$var$QueryTitle;
|
|
|
7574
7582
|
function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
|
|
7575
7583
|
let cond = condition;
|
|
7576
7584
|
delete cond.key;
|
|
7577
|
-
if (cond.operator ===
|
|
7585
|
+
if (cond.operator === "=" || cond.operator === "<>") {
|
|
7578
7586
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7579
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7587
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
7580
7588
|
}
|
|
7581
|
-
if (cond.operator.toLowerCase() ===
|
|
7589
|
+
if (cond.operator.toLowerCase() === "like") {
|
|
7582
7590
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7583
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7591
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
7584
7592
|
cond.value = `%${cleanedValue}%`;
|
|
7585
7593
|
}
|
|
7586
|
-
if (cond.operator.toLowerCase() ===
|
|
7587
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
7594
|
+
if (cond.operator.toLowerCase() === "in") {
|
|
7595
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(",");
|
|
7588
7596
|
}
|
|
7589
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
7597
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
|
|
7590
7598
|
return cond;
|
|
7591
7599
|
}
|
|
7592
7600
|
const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, setOffset: setOffset })=>{
|
|
@@ -7606,7 +7614,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7606
7614
|
...queryConditions,
|
|
7607
7615
|
{
|
|
7608
7616
|
property: fields[0],
|
|
7609
|
-
value:
|
|
7617
|
+
value: "",
|
|
7610
7618
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
7611
7619
|
key: Date.now()
|
|
7612
7620
|
}
|
|
@@ -7646,7 +7654,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7646
7654
|
encodeValuesOnly: true,
|
|
7647
7655
|
addQueryPrefix: true
|
|
7648
7656
|
});
|
|
7649
|
-
window.history.pushState({},
|
|
7657
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
7650
7658
|
};
|
|
7651
7659
|
const updateCondition = (index, key, value)=>{
|
|
7652
7660
|
let newConditions = [
|
|
@@ -7719,7 +7727,7 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
|
|
|
7719
7727
|
|
|
7720
7728
|
|
|
7721
7729
|
const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset, distIndex: distIndex, location: location, customColumns: customColumns, columnSettings: columnSettings, columnWidths: columnWidths, customTitle: customTitle, customDescription: customDescription, rootUrl: rootUrl, updateAriaLive: updateAriaLive })=>{
|
|
7722
|
-
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState(
|
|
7730
|
+
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState("ds-u-padding-y--1");
|
|
7723
7731
|
let apiDocs = (0, $hgUW1$useRef)();
|
|
7724
7732
|
let distribution = {};
|
|
7725
7733
|
let distribution_array = dataset.distribution ? dataset.distribution : [];
|
|
@@ -7731,7 +7739,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7731
7739
|
} : {
|
|
7732
7740
|
conditions: []
|
|
7733
7741
|
};
|
|
7734
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7742
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
7735
7743
|
...options,
|
|
7736
7744
|
limit: 25
|
|
7737
7745
|
});
|
|
@@ -7745,7 +7753,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7745
7753
|
}, {
|
|
7746
7754
|
encode: true
|
|
7747
7755
|
})}&format=csv`;
|
|
7748
|
-
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !==
|
|
7756
|
+
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !== "csv" ? distribution.data.title : dataset.title;
|
|
7749
7757
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
7750
7758
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7751
7759
|
className: "ds-l-container ds-u-padding-bottom--3 ds-u-margin-bottom--2",
|
|
@@ -7754,7 +7762,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7754
7762
|
children: Object.keys(distribution).length && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
7755
7763
|
children: [
|
|
7756
7764
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7757
|
-
className:
|
|
7765
|
+
className: "ds-l-md-col--9",
|
|
7758
7766
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
7759
7767
|
to: `/dataset/${id}`,
|
|
7760
7768
|
className: "ds-u-padding-y--4 ds-u-display--block",
|
|
@@ -7765,14 +7773,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7765
7773
|
})
|
|
7766
7774
|
}),
|
|
7767
7775
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7768
|
-
className:
|
|
7776
|
+
className: "ds-l-md-col--9",
|
|
7769
7777
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
7770
7778
|
className: "ds-text-heading--3xl",
|
|
7771
7779
|
children: customTitle ? customTitle : pageTitle
|
|
7772
7780
|
})
|
|
7773
7781
|
}),
|
|
7774
7782
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7775
|
-
className:
|
|
7783
|
+
className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
|
|
7776
7784
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
7777
7785
|
className: "ds-u-margin--0",
|
|
7778
7786
|
children: [
|
|
@@ -7784,7 +7792,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7784
7792
|
})
|
|
7785
7793
|
}),
|
|
7786
7794
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7787
|
-
className:
|
|
7795
|
+
className: "ds-l-md-col--9",
|
|
7788
7796
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
7789
7797
|
distribution: distribution,
|
|
7790
7798
|
dataset: dataset,
|
|
@@ -7794,13 +7802,13 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7794
7802
|
})
|
|
7795
7803
|
}),
|
|
7796
7804
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7797
|
-
className:
|
|
7805
|
+
className: "ds-l-md-col--12",
|
|
7798
7806
|
children: Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
|
|
7799
7807
|
resource: resource,
|
|
7800
7808
|
id: distribution.identifier,
|
|
7801
7809
|
customColumns: customColumns,
|
|
7802
7810
|
setOffset: resource.setOffset
|
|
7803
|
-
}) :
|
|
7811
|
+
}) : ""
|
|
7804
7812
|
}),
|
|
7805
7813
|
Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
7806
7814
|
value: {
|
|
@@ -7811,7 +7819,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7811
7819
|
customColumns: (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution_array[distIndex].identifier])
|
|
7812
7820
|
},
|
|
7813
7821
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7814
|
-
className:
|
|
7822
|
+
className: "ds-l-md-col--12",
|
|
7815
7823
|
children: [
|
|
7816
7824
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $af099c546cb226c7$export$2e2bcd8739ae039), {
|
|
7817
7825
|
includeDensity: true,
|
|
@@ -7833,14 +7841,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7833
7841
|
]
|
|
7834
7842
|
})
|
|
7835
7843
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7836
|
-
className:
|
|
7844
|
+
className: "ds-l-md-col--12",
|
|
7837
7845
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
7838
7846
|
role: "status",
|
|
7839
7847
|
"aria-valuetext": "Resource loading"
|
|
7840
7848
|
})
|
|
7841
7849
|
}),
|
|
7842
7850
|
dataset.identifier && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7843
|
-
className:
|
|
7851
|
+
className: "ds-l-md-col--12",
|
|
7844
7852
|
ref: apiDocs,
|
|
7845
7853
|
children: [
|
|
7846
7854
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
@@ -7849,7 +7857,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7849
7857
|
}),
|
|
7850
7858
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
7851
7859
|
url: `${rootUrl}/metastore/schemas/dataset/items/${dataset.identifier}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`,
|
|
7852
|
-
docExpansion:
|
|
7860
|
+
docExpansion: "list",
|
|
7853
7861
|
defaultModelsExpandDepth: -1
|
|
7854
7862
|
})
|
|
7855
7863
|
]
|
|
@@ -7868,7 +7876,7 @@ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, loca
|
|
|
7868
7876
|
const [ready, setReady] = (0, $hgUW1$useState)(false);
|
|
7869
7877
|
const [error, setError] = (0, $hgUW1$useState)(false);
|
|
7870
7878
|
const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
7871
|
-
const distIndex = dist_id ===
|
|
7879
|
+
const distIndex = dist_id === "data" ? 0 : dist_id;
|
|
7872
7880
|
(0, $hgUW1$useEffect)(()=>{
|
|
7873
7881
|
if (dataset.error) setError(true);
|
|
7874
7882
|
if (dataset.distribution && dataset.distribution.length) {
|