@civicactions/cmsds-open-data-components 4.1.0-alpha.1 → 4.1.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.css +28 -3
- package/dist/main.css.map +1 -1
- package/dist/main.js +668 -622
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +43 -43
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -41,7 +41,7 @@ function $e49d4387bed21287$export$2e2bcd8739ae039() {
|
|
|
41
41
|
/*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
|
|
42
42
|
children: "offset"
|
|
43
43
|
}),
|
|
44
|
-
|
|
44
|
+
' ',
|
|
45
45
|
"parameters to iterate through result sets that are larger than the row limit when running queries against the datastore API."
|
|
46
46
|
]
|
|
47
47
|
})
|
|
@@ -72,7 +72,7 @@ var $3c72c298c3a7f21f$export$2e2bcd8739ae039 = $3c72c298c3a7f21f$var$HeaderTagli
|
|
|
72
72
|
const $1555e1cb3eb7b3e3$var$HeaderNavIconLink = (props)=>{
|
|
73
73
|
const { url: url, urlTitle: urlTitle, logoFilePath: logoFilePath, logoAltText: logoAltText, backArrow: backArrow } = props;
|
|
74
74
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
75
|
-
className: `dkan-c-header-nav-icon-link ${backArrow ?
|
|
75
|
+
className: `dkan-c-header-nav-icon-link ${backArrow ? 'show-back-arrow' : ''} ds-u-valign--middle `,
|
|
76
76
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
77
77
|
href: url,
|
|
78
78
|
title: urlTitle,
|
|
@@ -232,7 +232,7 @@ const $046ded0064bd0a3d$var$FAQAccordion = (props)=>{
|
|
|
232
232
|
type: "button",
|
|
233
233
|
variation: "ghost",
|
|
234
234
|
onClick: ()=>toggleAll(),
|
|
235
|
-
children: `${expanded ?
|
|
235
|
+
children: `${expanded ? 'Collapse' : 'Expand'} all FAQs`
|
|
236
236
|
}),
|
|
237
237
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
|
|
238
238
|
children: faqItems.map((faq)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
@@ -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), {
|
|
@@ -1411,7 +1411,7 @@ const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
|
1411
1411
|
className: "dataset-date-item",
|
|
1412
1412
|
children: [
|
|
1413
1413
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1414
|
-
className: `dataset-
|
|
1414
|
+
className: `dataset-date-item-label ${boldLabel ? 'ds-u-font-weight--bold' : ''}`,
|
|
1415
1415
|
children: [
|
|
1416
1416
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1417
1417
|
children: dateText[type]
|
|
@@ -1471,7 +1471,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
1471
1471
|
if (dist && dist.data) {
|
|
1472
1472
|
if (dist.data.format) return dist.data.format.toLowerCase();
|
|
1473
1473
|
if (dist.data.mediaType) {
|
|
1474
|
-
const mediaType = dist.data.mediaType.split(
|
|
1474
|
+
const mediaType = dist.data.mediaType.split('/');
|
|
1475
1475
|
if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
|
|
1476
1476
|
}
|
|
1477
1477
|
if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
|
|
@@ -1481,7 +1481,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
|
1483
1483
|
}
|
|
1484
|
-
return
|
|
1484
|
+
return '';
|
|
1485
1485
|
}
|
|
1486
1486
|
|
|
1487
1487
|
|
|
@@ -1491,20 +1491,20 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1491
1491
|
});
|
|
1492
1492
|
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;
|
|
1493
1493
|
const location = (0, $hgUW1$useLocation)();
|
|
1494
|
-
let linkContainerClasses =
|
|
1495
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1496
|
-
else linkContainerClasses +=
|
|
1497
|
-
let linkClasses =
|
|
1494
|
+
let linkContainerClasses = 'ds-u-margin-bottom--2';
|
|
1495
|
+
if (dataDictionaryLinks) linkContainerClasses += ' ds-l-col--6 ds-u-padding-right--0';
|
|
1496
|
+
else linkContainerClasses += ' ds-l-col--auto ds-u-padding-left--0';
|
|
1497
|
+
let linkClasses = 'ds-u-display--block ds-u-text-align--left';
|
|
1498
1498
|
if (desktop) {
|
|
1499
|
-
linkContainerClasses =
|
|
1500
|
-
linkClasses +=
|
|
1499
|
+
linkContainerClasses = 'ds-u-padding-x--0';
|
|
1500
|
+
linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
|
|
1501
1501
|
}
|
|
1502
1502
|
let themes;
|
|
1503
1503
|
if (theme && showTopics) themes = /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
1504
|
-
className: "theme-list
|
|
1504
|
+
className: "theme-list ds-u-font-size--sm",
|
|
1505
1505
|
children: theme.map((topic, index)=>{
|
|
1506
|
-
const title = topic ||
|
|
1507
|
-
const prefix =
|
|
1506
|
+
const title = topic || 'Unknown Topic';
|
|
1507
|
+
const prefix = 'topics';
|
|
1508
1508
|
// Use the provided slug or fallback to a simple slug generation
|
|
1509
1509
|
const slug = topicSlugs?.[title];
|
|
1510
1510
|
const link = `/${prefix}/${slug}`;
|
|
@@ -1515,7 +1515,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1515
1515
|
state: {
|
|
1516
1516
|
fromUrl: location.pathname,
|
|
1517
1517
|
fromTitle: false,
|
|
1518
|
-
fromSearchList: location.pathname.includes(
|
|
1518
|
+
fromSearchList: location.pathname.includes('search')
|
|
1519
1519
|
},
|
|
1520
1520
|
children: title
|
|
1521
1521
|
})
|
|
@@ -1557,7 +1557,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1557
1557
|
};
|
|
1558
1558
|
const dataDictionaryExists = ()=>{
|
|
1559
1559
|
if (distribution && "data" in distribution) {
|
|
1560
|
-
if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType ===
|
|
1560
|
+
if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType === 'application/vnd.tableschema+json' || distribution.data.describedByType === "application/pdf";
|
|
1561
1561
|
}
|
|
1562
1562
|
return false;
|
|
1563
1563
|
};
|
|
@@ -1591,7 +1591,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1591
1591
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1592
1592
|
className: "dc-c-search-list-item ds-u-padding-top--3",
|
|
1593
1593
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1594
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1594
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? 'ds-u-border-top--1' : 'ds-u-border-bottom--1 ds-u-padding-bottom--3'}`,
|
|
1595
1595
|
children: [
|
|
1596
1596
|
themes,
|
|
1597
1597
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
@@ -1599,7 +1599,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1599
1599
|
children: [
|
|
1600
1600
|
!showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1601
1601
|
id: `dataset-${identifier}-updated-date`,
|
|
1602
|
-
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ?
|
|
1602
|
+
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? 'ds-u-padding-top--2' : 'ds-u-padding-top--0'}`,
|
|
1603
1603
|
children: [
|
|
1604
1604
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1605
1605
|
children: "Updated:"
|
|
@@ -1628,18 +1628,18 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1628
1628
|
(0, $1a2bf34e2a8f6b80$export$59a943b34a82e690)(description),
|
|
1629
1629
|
description.length > 240 ? /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1630
1630
|
children: [
|
|
1631
|
-
|
|
1631
|
+
' ',
|
|
1632
1632
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1633
1633
|
to: `/dataset/${identifier}`,
|
|
1634
1634
|
children: "See more"
|
|
1635
1635
|
})
|
|
1636
1636
|
]
|
|
1637
|
-
}) :
|
|
1637
|
+
}) : ''
|
|
1638
1638
|
]
|
|
1639
1639
|
})
|
|
1640
1640
|
}),
|
|
1641
1641
|
showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1642
|
-
className: "
|
|
1642
|
+
className: "ds-u-margin-top--2",
|
|
1643
1643
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $20de4fedf33d4f9a$export$2e2bcd8739ae039), {
|
|
1644
1644
|
date: date,
|
|
1645
1645
|
displayTooltips: false
|
|
@@ -1662,14 +1662,14 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1662
1662
|
"Download"
|
|
1663
1663
|
]
|
|
1664
1664
|
})
|
|
1665
|
-
}) :
|
|
1665
|
+
}) : '',
|
|
1666
1666
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("ul", {
|
|
1667
|
-
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 ?
|
|
1667
|
+
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' : ''}`,
|
|
1668
1668
|
children: [
|
|
1669
1669
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1670
1670
|
className: linkContainerClasses,
|
|
1671
1671
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1672
|
-
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ?
|
|
1672
|
+
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? '' : ' dkan-disabled-link-wrapper'}`,
|
|
1673
1673
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataTableLink, {})
|
|
1674
1674
|
})
|
|
1675
1675
|
}),
|
|
@@ -1691,10 +1691,10 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1691
1691
|
dataDictionaryLinks ? /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1692
1692
|
className: linkContainerClasses,
|
|
1693
1693
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1694
|
-
className: `${linkClasses}${dataDictionaryExists() ?
|
|
1694
|
+
className: `${linkClasses}${dataDictionaryExists() ? '' : ' dkan-disabled-link-wrapper'}`,
|
|
1695
1695
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataDictionaryLink, {})
|
|
1696
1696
|
})
|
|
1697
|
-
}) :
|
|
1697
|
+
}) : '',
|
|
1698
1698
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1699
1699
|
className: linkContainerClasses,
|
|
1700
1700
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -1790,7 +1790,7 @@ var $789279954d8eff7f$export$2e2bcd8739ae039 = $789279954d8eff7f$var$ApiDocument
|
|
|
1790
1790
|
|
|
1791
1791
|
|
|
1792
1792
|
|
|
1793
|
-
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className =
|
|
1793
|
+
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className = 'data-table-results' })=>{
|
|
1794
1794
|
const numTotalRows = totalRows;
|
|
1795
1795
|
if (numTotalRows === 0) return /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1796
1796
|
className: className,
|
|
@@ -1808,18 +1808,18 @@ const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limi
|
|
|
1808
1808
|
className: className,
|
|
1809
1809
|
children: [
|
|
1810
1810
|
"Displaying",
|
|
1811
|
-
|
|
1811
|
+
' ',
|
|
1812
1812
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1813
1813
|
className: "ds-u-font-weight--bold",
|
|
1814
1814
|
children: `${startTotal().toLocaleString()} - ${ofTotal().toLocaleString()}`
|
|
1815
1815
|
}),
|
|
1816
|
-
|
|
1816
|
+
' ',
|
|
1817
1817
|
"of ",
|
|
1818
1818
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1819
1819
|
className: "ds-u-font-weight--bold",
|
|
1820
1820
|
children: `${numTotalRows.toLocaleString()}`
|
|
1821
1821
|
}),
|
|
1822
|
-
|
|
1822
|
+
' ',
|
|
1823
1823
|
"rows"
|
|
1824
1824
|
]
|
|
1825
1825
|
});
|
|
@@ -1845,16 +1845,16 @@ const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePaddi
|
|
|
1845
1845
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
1846
1846
|
options: [
|
|
1847
1847
|
{
|
|
1848
|
-
label:
|
|
1849
|
-
value:
|
|
1848
|
+
label: 'Tight',
|
|
1849
|
+
value: 'ds-u-padding-y--0'
|
|
1850
1850
|
},
|
|
1851
1851
|
{
|
|
1852
|
-
label:
|
|
1853
|
-
value:
|
|
1852
|
+
label: 'Normal',
|
|
1853
|
+
value: 'ds-u-padding-y--1'
|
|
1854
1854
|
},
|
|
1855
1855
|
{
|
|
1856
|
-
label:
|
|
1857
|
-
value:
|
|
1856
|
+
label: 'Expanded',
|
|
1857
|
+
value: 'ds-u-padding-y--2'
|
|
1858
1858
|
}
|
|
1859
1859
|
],
|
|
1860
1860
|
label: "Display density:",
|
|
@@ -2097,7 +2097,7 @@ function $aa4450dcbeef3ac0$export$385a5aba38cc3325(sortArray) {
|
|
|
2097
2097
|
sortArray.forEach((s)=>{
|
|
2098
2098
|
return newQuery.push({
|
|
2099
2099
|
property: s.id,
|
|
2100
|
-
order: s.desc ?
|
|
2100
|
+
order: s.desc ? 'desc' : 'asc'
|
|
2101
2101
|
});
|
|
2102
2102
|
});
|
|
2103
2103
|
return newQuery;
|
|
@@ -2135,46 +2135,46 @@ function $7264a673914aa746$export$e284ae5d89467c8f(date) {
|
|
|
2135
2135
|
}
|
|
2136
2136
|
function $7264a673914aa746$export$6b5e57d20078142b(value, operator) {
|
|
2137
2137
|
let newValue = value;
|
|
2138
|
-
if (Array.isArray(newValue)) newValue = newValue.join(
|
|
2138
|
+
if (Array.isArray(newValue)) newValue = newValue.join(',');
|
|
2139
2139
|
// return newValue.replace(/(^\%+|\%+$)/gm, '');
|
|
2140
2140
|
return newValue;
|
|
2141
2141
|
}
|
|
2142
2142
|
const $7264a673914aa746$export$5f89a5ae87bc48e1 = [
|
|
2143
2143
|
{
|
|
2144
|
-
label:
|
|
2145
|
-
value:
|
|
2144
|
+
label: 'Is',
|
|
2145
|
+
value: '='
|
|
2146
2146
|
},
|
|
2147
2147
|
{
|
|
2148
|
-
label:
|
|
2149
|
-
value:
|
|
2148
|
+
label: 'Starts With',
|
|
2149
|
+
value: 'starts with'
|
|
2150
2150
|
},
|
|
2151
2151
|
{
|
|
2152
|
-
label:
|
|
2153
|
-
value:
|
|
2152
|
+
label: 'Contains',
|
|
2153
|
+
value: 'contains'
|
|
2154
2154
|
},
|
|
2155
2155
|
{
|
|
2156
|
-
label:
|
|
2157
|
-
value:
|
|
2156
|
+
label: 'Is Not',
|
|
2157
|
+
value: '<>'
|
|
2158
2158
|
},
|
|
2159
2159
|
{
|
|
2160
|
-
label:
|
|
2161
|
-
value:
|
|
2160
|
+
label: 'Or',
|
|
2161
|
+
value: 'in'
|
|
2162
2162
|
},
|
|
2163
2163
|
{
|
|
2164
|
-
label:
|
|
2165
|
-
value:
|
|
2164
|
+
label: 'Is',
|
|
2165
|
+
value: '='
|
|
2166
2166
|
},
|
|
2167
2167
|
{
|
|
2168
|
-
label:
|
|
2169
|
-
value:
|
|
2168
|
+
label: 'Is Not',
|
|
2169
|
+
value: '<>'
|
|
2170
2170
|
},
|
|
2171
2171
|
{
|
|
2172
|
-
label:
|
|
2173
|
-
value:
|
|
2172
|
+
label: 'Greater Than',
|
|
2173
|
+
value: '>'
|
|
2174
2174
|
},
|
|
2175
2175
|
{
|
|
2176
|
-
label:
|
|
2177
|
-
value:
|
|
2176
|
+
label: 'Less Than',
|
|
2177
|
+
value: '<'
|
|
2178
2178
|
}
|
|
2179
2179
|
];
|
|
2180
2180
|
function $7264a673914aa746$export$d243819c3ad678fb(operatorValue) {
|
|
@@ -2183,59 +2183,59 @@ function $7264a673914aa746$export$d243819c3ad678fb(operatorValue) {
|
|
|
2183
2183
|
}
|
|
2184
2184
|
function $7264a673914aa746$export$2b9377795161999(type) {
|
|
2185
2185
|
switch(type){
|
|
2186
|
-
case
|
|
2187
|
-
case
|
|
2186
|
+
case 'text':
|
|
2187
|
+
case 'string':
|
|
2188
2188
|
return [
|
|
2189
2189
|
{
|
|
2190
|
-
label:
|
|
2191
|
-
value:
|
|
2190
|
+
label: 'Is',
|
|
2191
|
+
value: '='
|
|
2192
2192
|
},
|
|
2193
2193
|
{
|
|
2194
|
-
label:
|
|
2195
|
-
value:
|
|
2194
|
+
label: 'Starts With',
|
|
2195
|
+
value: 'starts with'
|
|
2196
2196
|
},
|
|
2197
2197
|
{
|
|
2198
|
-
label:
|
|
2199
|
-
value:
|
|
2198
|
+
label: 'Contains',
|
|
2199
|
+
value: 'contains'
|
|
2200
2200
|
},
|
|
2201
2201
|
{
|
|
2202
|
-
label:
|
|
2203
|
-
value:
|
|
2202
|
+
label: 'Is Not',
|
|
2203
|
+
value: '<>'
|
|
2204
2204
|
},
|
|
2205
2205
|
{
|
|
2206
|
-
label:
|
|
2207
|
-
value:
|
|
2206
|
+
label: 'Or',
|
|
2207
|
+
value: 'in'
|
|
2208
2208
|
}
|
|
2209
2209
|
];
|
|
2210
|
-
case
|
|
2210
|
+
case 'date':
|
|
2211
2211
|
return [
|
|
2212
2212
|
{
|
|
2213
|
-
label:
|
|
2214
|
-
value:
|
|
2213
|
+
label: 'Is',
|
|
2214
|
+
value: '='
|
|
2215
2215
|
},
|
|
2216
2216
|
{
|
|
2217
|
-
label:
|
|
2218
|
-
value:
|
|
2217
|
+
label: 'Is Not',
|
|
2218
|
+
value: '<>'
|
|
2219
2219
|
},
|
|
2220
2220
|
{
|
|
2221
|
-
label:
|
|
2222
|
-
value:
|
|
2221
|
+
label: 'Greater Than',
|
|
2222
|
+
value: '>'
|
|
2223
2223
|
},
|
|
2224
2224
|
{
|
|
2225
|
-
label:
|
|
2226
|
-
value:
|
|
2225
|
+
label: 'Less Than',
|
|
2226
|
+
value: '<'
|
|
2227
2227
|
}
|
|
2228
2228
|
];
|
|
2229
2229
|
default:
|
|
2230
2230
|
// These 2 should be safe for all data types
|
|
2231
2231
|
return [
|
|
2232
2232
|
{
|
|
2233
|
-
label:
|
|
2234
|
-
value:
|
|
2233
|
+
label: 'Is',
|
|
2234
|
+
value: '='
|
|
2235
2235
|
},
|
|
2236
2236
|
{
|
|
2237
|
-
label:
|
|
2238
|
-
value:
|
|
2237
|
+
label: 'Is Not',
|
|
2238
|
+
value: '<>'
|
|
2239
2239
|
}
|
|
2240
2240
|
];
|
|
2241
2241
|
}
|
|
@@ -2252,7 +2252,7 @@ function $7264a673914aa746$export$2b9377795161999(type) {
|
|
|
2252
2252
|
|
|
2253
2253
|
|
|
2254
2254
|
const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: header, sortElement: sortElement, setAriaLiveFeedback: setAriaLiveFeedback, id: id })=>{
|
|
2255
|
-
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)(
|
|
2255
|
+
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)('');
|
|
2256
2256
|
// Fix for JSX in Data Dictionary Title header cell
|
|
2257
2257
|
const ariaLabel = header.id === "titleResizable" ? "Title" : header.column.columnDef.header;
|
|
2258
2258
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("th", {
|
|
@@ -2261,9 +2261,9 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2261
2261
|
width: header.getSize()
|
|
2262
2262
|
},
|
|
2263
2263
|
id: id,
|
|
2264
|
-
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header :
|
|
2264
|
+
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : '',
|
|
2265
2265
|
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
|
|
2266
|
-
"aria-sort": header.column.getIsSorted() ===
|
|
2266
|
+
"aria-sort": header.column.getIsSorted() === 'asc' ? 'ascending' : header.column.getIsSorted() === 'desc' ? 'descending' : 'none',
|
|
2267
2267
|
children: [
|
|
2268
2268
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2269
2269
|
className: "ds-u-display--flex",
|
|
@@ -2275,7 +2275,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2275
2275
|
}),
|
|
2276
2276
|
sortElement && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2277
2277
|
onClick: header.column.getToggleSortingHandler(),
|
|
2278
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
2278
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : '',
|
|
2279
2279
|
"aria-label": `${ariaLabel} sort order`
|
|
2280
2280
|
})
|
|
2281
2281
|
]
|
|
@@ -2283,18 +2283,18 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2283
2283
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2284
2284
|
onMouseDown: header.getResizeHandler(),
|
|
2285
2285
|
onTouchStart: header.getResizeHandler(),
|
|
2286
|
-
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ?
|
|
2286
|
+
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ? 'isResizing' : ''}`,
|
|
2287
2287
|
"aria-label": `Resize ${ariaLabel} column`,
|
|
2288
2288
|
onKeyDown: (e)=>{
|
|
2289
2289
|
const columnSizingObject = table.getState().columnSizing;
|
|
2290
2290
|
switch(e.key){
|
|
2291
|
-
case
|
|
2292
|
-
case
|
|
2291
|
+
case 'Enter':
|
|
2292
|
+
case ' ':
|
|
2293
2293
|
e.preventDefault();
|
|
2294
2294
|
e.stopPropagation();
|
|
2295
2295
|
if (columnResizing) {
|
|
2296
2296
|
// end resizing
|
|
2297
|
-
setColumnResizing(
|
|
2297
|
+
setColumnResizing('');
|
|
2298
2298
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2299
2299
|
} else {
|
|
2300
2300
|
// start resizing
|
|
@@ -2302,13 +2302,13 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2302
2302
|
setAriaLiveFeedback(`${header.column.columnDef.header} grabbed.`);
|
|
2303
2303
|
}
|
|
2304
2304
|
break;
|
|
2305
|
-
case
|
|
2305
|
+
case 'Escape':
|
|
2306
2306
|
if (columnResizing) {
|
|
2307
|
-
setColumnResizing(
|
|
2307
|
+
setColumnResizing('');
|
|
2308
2308
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2309
2309
|
}
|
|
2310
2310
|
break;
|
|
2311
|
-
case
|
|
2311
|
+
case 'ArrowRight':
|
|
2312
2312
|
e.preventDefault();
|
|
2313
2313
|
e.stopPropagation();
|
|
2314
2314
|
if (columnResizing) {
|
|
@@ -2317,7 +2317,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2317
2317
|
setAriaLiveFeedback(`${header.column.columnDef.header} has been resized. The new width is ${header.getSize()} pixels.`);
|
|
2318
2318
|
}
|
|
2319
2319
|
break;
|
|
2320
|
-
case
|
|
2320
|
+
case 'ArrowLeft':
|
|
2321
2321
|
e.preventDefault();
|
|
2322
2322
|
e.stopPropagation();
|
|
2323
2323
|
if (columnResizing) {
|
|
@@ -2329,7 +2329,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2329
2329
|
}
|
|
2330
2330
|
},
|
|
2331
2331
|
onBlur: ()=>{
|
|
2332
|
-
setColumnResizing(
|
|
2332
|
+
setColumnResizing('');
|
|
2333
2333
|
}
|
|
2334
2334
|
})
|
|
2335
2335
|
]
|
|
@@ -2370,7 +2370,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2370
2370
|
},
|
|
2371
2371
|
title: header.column.columnDef.header,
|
|
2372
2372
|
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
|
|
2373
|
-
"aria-sort": header.column.getIsSorted() ===
|
|
2373
|
+
"aria-sort": header.column.getIsSorted() === 'asc' ? 'ascending' : header.column.getIsSorted() === 'desc' ? 'descending' : 'none',
|
|
2374
2374
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2375
2375
|
onClick: header.column.getToggleSortingHandler(),
|
|
2376
2376
|
className: "ds-u-display--flex",
|
|
@@ -2379,7 +2379,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2379
2379
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
2380
2380
|
}),
|
|
2381
2381
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2382
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` :
|
|
2382
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` : ''
|
|
2383
2383
|
})
|
|
2384
2384
|
]
|
|
2385
2385
|
})
|
|
@@ -2410,7 +2410,7 @@ const $ee0d4d4f34048447$var$DataTableActionsContextDefaults = {
|
|
|
2410
2410
|
setColumnVisibility: ()=>{},
|
|
2411
2411
|
page: 1,
|
|
2412
2412
|
setPage: ()=>{},
|
|
2413
|
-
tableDensity:
|
|
2413
|
+
tableDensity: 'normal',
|
|
2414
2414
|
setTableDensity: ()=>{}
|
|
2415
2415
|
};
|
|
2416
2416
|
const $ee0d4d4f34048447$export$f814ea079e65d8fe = /*#__PURE__*/ (0, $hgUW1$createContext)($ee0d4d4f34048447$var$DataTableActionsContextDefaults);
|
|
@@ -2429,7 +2429,7 @@ const $ee0d4d4f34048447$var$DataTableActionsProvider = ({ children: children })=
|
|
|
2429
2429
|
if (datasetTableControls && localStorageData) return localStorageData.tableColumnVisibility;
|
|
2430
2430
|
else return {};
|
|
2431
2431
|
});
|
|
2432
|
-
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)(
|
|
2432
|
+
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)('normal');
|
|
2433
2433
|
const providerValue = {
|
|
2434
2434
|
columnOrder: columnOrder,
|
|
2435
2435
|
setColumnOrder: setColumnOrder,
|
|
@@ -2476,9 +2476,9 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2476
2476
|
transition: transition,
|
|
2477
2477
|
opacity: isDragging ? 0.7 : 1,
|
|
2478
2478
|
zIndex: isDragging ? 1 : 0,
|
|
2479
|
-
position:
|
|
2480
|
-
background:
|
|
2481
|
-
touchAction:
|
|
2479
|
+
position: 'relative',
|
|
2480
|
+
background: 'white',
|
|
2481
|
+
touchAction: 'none'
|
|
2482
2482
|
};
|
|
2483
2483
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
2484
2484
|
className: "ds-u-display--flex ds-u-justify-content--between ds-u-border-bottom--1",
|
|
@@ -2494,7 +2494,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2494
2494
|
// this code forces the repaint without user interaction
|
|
2495
2495
|
const target = e.target;
|
|
2496
2496
|
if (isDragging && target.tagName.toLowerCase() === "label") setTimeout(()=>{
|
|
2497
|
-
target.parentNode.querySelector(
|
|
2497
|
+
target.parentNode.querySelector('input').checked = visible;
|
|
2498
2498
|
}, 1);
|
|
2499
2499
|
},
|
|
2500
2500
|
children: [
|
|
@@ -2511,7 +2511,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2511
2511
|
}
|
|
2512
2512
|
}),
|
|
2513
2513
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2514
|
-
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging &&
|
|
2514
|
+
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && 'grabbed'}`,
|
|
2515
2515
|
"aria-label": `Reorder ${id} column`,
|
|
2516
2516
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2517
2517
|
className: "fa fa-sort"
|
|
@@ -2529,7 +2529,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor extends (0, $hgUW1$Key
|
|
|
2529
2529
|
// Custom function to exclude checkbox from keyboard dragging
|
|
2530
2530
|
static activators = [
|
|
2531
2531
|
{
|
|
2532
|
-
eventName:
|
|
2532
|
+
eventName: 'onKeyDown',
|
|
2533
2533
|
handler: ({ nativeEvent: event })=>{
|
|
2534
2534
|
// prevent scrolling the list
|
|
2535
2535
|
const isCheckbox = [
|
|
@@ -2552,7 +2552,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$Poin
|
|
|
2552
2552
|
// Custom function to stop accidental checkbox clicks on pointer activation
|
|
2553
2553
|
static activators = [
|
|
2554
2554
|
{
|
|
2555
|
-
eventName:
|
|
2555
|
+
eventName: 'onPointerDown',
|
|
2556
2556
|
handler: ({ nativeEvent: event })=>{
|
|
2557
2557
|
if (event.target.tagName.toLowerCase() === "input") return false;
|
|
2558
2558
|
if (event.target.tagName.toLowerCase() === "label") event.target.blur();
|
|
@@ -2650,13 +2650,13 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
2650
2650
|
className: "dkan-dataset-toolbar-button-label",
|
|
2651
2651
|
children: "Manage Columns"
|
|
2652
2652
|
}),
|
|
2653
|
-
hiddenColumns ? ` (${hiddenColumns})` :
|
|
2653
|
+
hiddenColumns ? ` (${hiddenColumns})` : ''
|
|
2654
2654
|
]
|
|
2655
2655
|
})
|
|
2656
2656
|
]
|
|
2657
2657
|
}),
|
|
2658
2658
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2659
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2659
|
+
className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
|
|
2660
2660
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
|
|
2661
2661
|
heading: "Manage columns",
|
|
2662
2662
|
isOpen: modalOpen,
|
|
@@ -2829,12 +2829,12 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
2829
2829
|
if (Object.keys(resource).length && columns.length && resource.schema && Object.keys(distribution).length) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
2830
2830
|
children: [
|
|
2831
2831
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2832
|
-
className: isModal ?
|
|
2832
|
+
className: isModal ? 'dkan-datatable-fullscreen-mode' : '',
|
|
2833
2833
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
|
|
2834
2834
|
canResize: true,
|
|
2835
2835
|
columns: columns,
|
|
2836
2836
|
sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
|
|
2837
|
-
tablePadding: tableDensity ===
|
|
2837
|
+
tablePadding: tableDensity === 'normal' ? 'ds-u-padding-y--2' : tableDensity === 'compact' ? 'ds-u-padding-y--1' : 'ds-u-padding-y--3',
|
|
2838
2838
|
loading: resource.loading,
|
|
2839
2839
|
isModal: isModal,
|
|
2840
2840
|
downloadURL: downloadURL,
|
|
@@ -2849,14 +2849,14 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
2849
2849
|
}),
|
|
2850
2850
|
!resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2851
2851
|
className: [
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
isModal &&
|
|
2859
|
-
].filter(Boolean).join(
|
|
2852
|
+
'ds-u-display--flex',
|
|
2853
|
+
'ds-u-flex-wrap--wrap',
|
|
2854
|
+
'ds-u-justify-content--end',
|
|
2855
|
+
'ds-u-md-justify-content--between',
|
|
2856
|
+
'ds-u-margin-top--2',
|
|
2857
|
+
'ds-u-align-items--center',
|
|
2858
|
+
isModal && 'ds-u-margin-bottom--2'
|
|
2859
|
+
].filter(Boolean).join(' '),
|
|
2860
2860
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
2861
2861
|
totalPages: Math.ceil(resource.count ? resource.count / pageSize : 1),
|
|
2862
2862
|
currentPage: Number(page),
|
|
@@ -2895,7 +2895,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
2895
2895
|
},
|
|
2896
2896
|
children: [
|
|
2897
2897
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2898
|
-
className: `far ${modalOpen ?
|
|
2898
|
+
className: `far ${modalOpen ? 'fa-compress' : 'fa-expand'} ds-u-margin-right--1`
|
|
2899
2899
|
}),
|
|
2900
2900
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2901
2901
|
className: "dkan-dataset-toolbar-button-label",
|
|
@@ -2904,7 +2904,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
2904
2904
|
]
|
|
2905
2905
|
}),
|
|
2906
2906
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2907
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2907
|
+
className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
|
|
2908
2908
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
2909
2909
|
heading: "Dataset Explorer",
|
|
2910
2910
|
isOpen: modalOpen,
|
|
@@ -2939,13 +2939,13 @@ var $16bd41951b91f02d$export$2e2bcd8739ae039 = $16bd41951b91f02d$var$FullScreenD
|
|
|
2939
2939
|
|
|
2940
2940
|
|
|
2941
2941
|
function $eadd6431fddf4b6c$var$getStartDate(condition, schema, id) {
|
|
2942
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2942
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
2943
2943
|
const newDate = new Date(condition.value.toString());
|
|
2944
2944
|
if (newDate instanceof Date && !isNaN(newDate.getTime())) return newDate;
|
|
2945
2945
|
}
|
|
2946
2946
|
return new Date();
|
|
2947
2947
|
}
|
|
2948
|
-
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className =
|
|
2948
|
+
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className = '' })=>{
|
|
2949
2949
|
const [operator, setOperator] = (0, $hgUW1$useState)(condition.operator);
|
|
2950
2950
|
const [property, setProperty] = (0, $hgUW1$useState)(condition.property);
|
|
2951
2951
|
const [value, setValue] = (0, $hgUW1$useState)(condition.value);
|
|
@@ -2955,9 +2955,9 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
2955
2955
|
});
|
|
2956
2956
|
(0, $hgUW1$useEffect)(()=>{
|
|
2957
2957
|
if (property !== condition.property) {
|
|
2958
|
-
if (property) update(index,
|
|
2959
|
-
else update(index,
|
|
2960
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2958
|
+
if (property) update(index, 'property', property);
|
|
2959
|
+
else update(index, 'property', '');
|
|
2960
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
2961
2961
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
2962
2962
|
}
|
|
2963
2963
|
}
|
|
@@ -2971,22 +2971,22 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
2971
2971
|
]);
|
|
2972
2972
|
(0, $hgUW1$useEffect)(()=>{
|
|
2973
2973
|
if (operator !== condition.operator) {
|
|
2974
|
-
if (operator) update(index,
|
|
2975
|
-
else update(index,
|
|
2974
|
+
if (operator) update(index, 'operator', operator);
|
|
2975
|
+
else update(index, 'operator', '');
|
|
2976
2976
|
}
|
|
2977
2977
|
}, [
|
|
2978
2978
|
operator
|
|
2979
2979
|
]);
|
|
2980
2980
|
(0, $hgUW1$useEffect)(()=>{
|
|
2981
2981
|
if (value !== condition.value) {
|
|
2982
|
-
if (value) update(index,
|
|
2983
|
-
else update(index,
|
|
2982
|
+
if (value) update(index, 'value', value);
|
|
2983
|
+
else update(index, 'value', '');
|
|
2984
2984
|
}
|
|
2985
2985
|
}, [
|
|
2986
2986
|
value
|
|
2987
2987
|
]);
|
|
2988
2988
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("fieldset", {
|
|
2989
|
-
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 !==
|
|
2989
|
+
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}` : ''}`,
|
|
2990
2990
|
children: [
|
|
2991
2991
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
2992
2992
|
options: propertyOptions,
|
|
@@ -3004,7 +3004,7 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
3004
3004
|
name: `${condition.key}_operator`,
|
|
3005
3005
|
onChange: (e)=>setOperator(e.target.value)
|
|
3006
3006
|
}),
|
|
3007
|
-
schema[id].fields[property].mysql_type ===
|
|
3007
|
+
schema[id].fields[property].mysql_type === 'date' ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
3008
3008
|
children: [
|
|
3009
3009
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
3010
3010
|
className: "ds-c-label",
|
|
@@ -3057,15 +3057,15 @@ var $eadd6431fddf4b6c$export$2e2bcd8739ae039 = $eadd6431fddf4b6c$var$FilterItem;
|
|
|
3057
3057
|
|
|
3058
3058
|
|
|
3059
3059
|
|
|
3060
|
-
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className =
|
|
3060
|
+
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className = '' })=>{
|
|
3061
3061
|
const small = (0, $hgUW1$useMediaQuery)({
|
|
3062
3062
|
minWidth: 0,
|
|
3063
3063
|
maxWidth: 544
|
|
3064
3064
|
});
|
|
3065
3065
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
3066
3066
|
disabled: disabled,
|
|
3067
|
-
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ?
|
|
3068
|
-
variation: small ?
|
|
3067
|
+
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ? '' : ' ds-u-float--right ds-l-md-col--6 ds-l-col--5'}${className !== '' ? ` ${className}` : ''}`,
|
|
3068
|
+
variation: small ? 'ghost' : undefined,
|
|
3069
3069
|
onClick: ()=>clearFiltersFn(),
|
|
3070
3070
|
children: "Reset"
|
|
3071
3071
|
});
|
|
@@ -3077,19 +3077,19 @@ var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFilter
|
|
|
3077
3077
|
function $6f4318b1e14124e5$var$updateQueryForDatastore(condition) {
|
|
3078
3078
|
let cond = condition;
|
|
3079
3079
|
delete cond.key;
|
|
3080
|
-
if (cond.operator ===
|
|
3080
|
+
if (cond.operator === '=' || cond.operator === '<>') {
|
|
3081
3081
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3082
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3082
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
3083
3083
|
}
|
|
3084
|
-
if (cond.operator.toLowerCase() ===
|
|
3084
|
+
if (cond.operator.toLowerCase() === 'like') {
|
|
3085
3085
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3086
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3086
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
3087
3087
|
cond.value = `%${cleanedValue}%`;
|
|
3088
3088
|
}
|
|
3089
|
-
if (cond.operator.toLowerCase() ===
|
|
3090
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
3089
|
+
if (cond.operator.toLowerCase() === 'in') {
|
|
3090
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(',');
|
|
3091
3091
|
}
|
|
3092
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
3092
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ''));
|
|
3093
3093
|
return cond;
|
|
3094
3094
|
}
|
|
3095
3095
|
const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
@@ -3115,7 +3115,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3115
3115
|
} else setQueryConditions([
|
|
3116
3116
|
{
|
|
3117
3117
|
property: fields[0],
|
|
3118
|
-
value:
|
|
3118
|
+
value: '',
|
|
3119
3119
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3120
3120
|
key: Date.now().toString()
|
|
3121
3121
|
}
|
|
@@ -3132,7 +3132,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3132
3132
|
...queryConditions,
|
|
3133
3133
|
{
|
|
3134
3134
|
property: fields[0],
|
|
3135
|
-
value:
|
|
3135
|
+
value: '',
|
|
3136
3136
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3137
3137
|
key: Date.now().toString()
|
|
3138
3138
|
}
|
|
@@ -3163,7 +3163,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3163
3163
|
encodeValuesOnly: true,
|
|
3164
3164
|
addQueryPrefix: true
|
|
3165
3165
|
});
|
|
3166
|
-
window.history.pushState({},
|
|
3166
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
3167
3167
|
};
|
|
3168
3168
|
const submitConditions = ()=>{
|
|
3169
3169
|
// only update the data conditions when "Apply filters" is pressed
|
|
@@ -3237,7 +3237,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3237
3237
|
children: [
|
|
3238
3238
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3239
3239
|
className: "dkan-dataset-toolbar-button-label",
|
|
3240
|
-
children: conditions.length > 0 ? `Edit Filters` :
|
|
3240
|
+
children: conditions.length > 0 ? `Edit Filters` : 'Filter Dataset'
|
|
3241
3241
|
}),
|
|
3242
3242
|
conditions.length > 0 && ` (${conditions.length})`
|
|
3243
3243
|
]
|
|
@@ -3245,7 +3245,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3245
3245
|
]
|
|
3246
3246
|
}),
|
|
3247
3247
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3248
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
3248
|
+
className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
|
|
3249
3249
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
3250
3250
|
heading: "Filter Dataset",
|
|
3251
3251
|
isOpen: modalOpen,
|
|
@@ -3271,7 +3271,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3271
3271
|
className: "dkan-apply-dataset-filters-button ds-u-float--right ds-l-md-col--auto ds-l-col--auto",
|
|
3272
3272
|
onClick: submitConditions,
|
|
3273
3273
|
variation: "solid",
|
|
3274
|
-
children: `Apply ${conditionsReadyToSubmit(queryConditions).length ||
|
|
3274
|
+
children: `Apply ${conditionsReadyToSubmit(queryConditions).length || ''} filter${conditionsReadyToSubmit(queryConditions).length === 1 ? '' : 's'}`
|
|
3275
3275
|
})
|
|
3276
3276
|
]
|
|
3277
3277
|
})
|
|
@@ -3410,9 +3410,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3410
3410
|
className: "ds-u-display--flex ds-u-align-items--start",
|
|
3411
3411
|
children: [
|
|
3412
3412
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3413
|
-
onClick: ()=>setTableDensity(
|
|
3413
|
+
onClick: ()=>setTableDensity('expanded'),
|
|
3414
3414
|
"aria-label": "Row height, Expanded",
|
|
3415
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3415
|
+
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' : ''}`,
|
|
3416
3416
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3417
3417
|
className: "ds-u-display--block",
|
|
3418
3418
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3431,9 +3431,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3431
3431
|
})
|
|
3432
3432
|
}),
|
|
3433
3433
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3434
|
-
onClick: ()=>setTableDensity(
|
|
3434
|
+
onClick: ()=>setTableDensity('normal'),
|
|
3435
3435
|
"aria-label": "Row height, Normal",
|
|
3436
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3436
|
+
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' : ''}`,
|
|
3437
3437
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3438
3438
|
className: "ds-u-display--block",
|
|
3439
3439
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3452,9 +3452,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3452
3452
|
})
|
|
3453
3453
|
}),
|
|
3454
3454
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3455
|
-
onClick: ()=>setTableDensity(
|
|
3455
|
+
onClick: ()=>setTableDensity('compact'),
|
|
3456
3456
|
"aria-label": "Row height, Compact",
|
|
3457
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3457
|
+
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 ' : ''}`,
|
|
3458
3458
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3459
3459
|
className: "ds-u-display--block",
|
|
3460
3460
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3539,7 +3539,7 @@ const $85f8ff1ff89899c7$var$updateBrowserURL = (newConditions)=>{
|
|
|
3539
3539
|
encodeValuesOnly: true,
|
|
3540
3540
|
addQueryPrefix: true
|
|
3541
3541
|
});
|
|
3542
|
-
window.history.pushState({},
|
|
3542
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
3543
3543
|
};
|
|
3544
3544
|
const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, columns: columns, defaultColumnOrder: defaultColumnOrder, isModal: isModal, datasetTableControls: datasetTableControls, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility })=>{
|
|
3545
3545
|
const { limit: limit, offset: offset, count: count, conditions: conditions, setConditions: setConditions } = resource;
|
|
@@ -3625,7 +3625,7 @@ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, co
|
|
|
3625
3625
|
}, index)) : null,
|
|
3626
3626
|
hiddenColumns > 0 ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $c5b172e8d1a8197c$export$2e2bcd8739ae039), {
|
|
3627
3627
|
iconClass: "fa fa-columns",
|
|
3628
|
-
text: `${hiddenColumns} Column${hiddenColumns === 1 ?
|
|
3628
|
+
text: `${hiddenColumns} Column${hiddenColumns === 1 ? '' : 's'} Hidden`,
|
|
3629
3629
|
onClick: ()=>{
|
|
3630
3630
|
resetColumnVisibility();
|
|
3631
3631
|
}
|
|
@@ -3660,7 +3660,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3660
3660
|
const { conditions: conditions } = resource;
|
|
3661
3661
|
const data = resource.values;
|
|
3662
3662
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
3663
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
3663
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
|
|
3664
3664
|
const dataTableWrapperElement = (0, $hgUW1$useRef)(null);
|
|
3665
3665
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
3666
3666
|
const table_columns = columns.map((col)=>{
|
|
@@ -3679,9 +3679,9 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3679
3679
|
columnOrder
|
|
3680
3680
|
]);
|
|
3681
3681
|
const sortElement = (isSorted, onClickFn)=>{
|
|
3682
|
-
if (isSorted ===
|
|
3683
|
-
if (isSorted ===
|
|
3684
|
-
return
|
|
3682
|
+
if (isSorted === 'asc') return 'dc-c-sort--asc';
|
|
3683
|
+
if (isSorted === 'desc') return 'dc-c-sort--desc';
|
|
3684
|
+
return 'dc-c-sort--default';
|
|
3685
3685
|
};
|
|
3686
3686
|
const filters = [];
|
|
3687
3687
|
const table = (0, $hgUW1$useReactTable)({
|
|
@@ -3693,7 +3693,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3693
3693
|
columnVisibility: columnVisibility,
|
|
3694
3694
|
sorting: sorting
|
|
3695
3695
|
},
|
|
3696
|
-
columnResizeMode:
|
|
3696
|
+
columnResizeMode: 'onChange',
|
|
3697
3697
|
onSortingChange: setSorting,
|
|
3698
3698
|
onColumnOrderChange: setColumnOrder,
|
|
3699
3699
|
onColumnVisibilityChange: setColumnVisibility,
|
|
@@ -3710,7 +3710,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3710
3710
|
const defaultColumnOrder = (0, $hgUW1$useMemo)(()=>table_columns.map((column)=>column.accessorKey), []);
|
|
3711
3711
|
const tableWrapperWidth = ()=>{
|
|
3712
3712
|
if (dataTableWrapperElement.current) return dataTableWrapperElement.current.offsetWidth;
|
|
3713
|
-
return
|
|
3713
|
+
return 'auto';
|
|
3714
3714
|
};
|
|
3715
3715
|
(0, $hgUW1$useEffect)(()=>{
|
|
3716
3716
|
setHighlightRow(null);
|
|
@@ -3940,7 +3940,7 @@ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, a
|
|
|
3940
3940
|
},
|
|
3941
3941
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3942
3942
|
name: accessor,
|
|
3943
|
-
value: filterValue ||
|
|
3943
|
+
value: filterValue || ''
|
|
3944
3944
|
});
|
|
3945
3945
|
}
|
|
3946
3946
|
const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true })=>{
|
|
@@ -4016,7 +4016,7 @@ const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage, pageTrail:
|
|
|
4016
4016
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4017
4017
|
children: currentPage
|
|
4018
4018
|
})
|
|
4019
|
-
}) :
|
|
4019
|
+
}) : ''
|
|
4020
4020
|
]
|
|
4021
4021
|
})
|
|
4022
4022
|
});
|
|
@@ -4073,11 +4073,11 @@ var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRigh
|
|
|
4073
4073
|
|
|
4074
4074
|
|
|
4075
4075
|
|
|
4076
|
-
const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder =
|
|
4076
|
+
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", {
|
|
4077
4077
|
className: "search-input-container",
|
|
4078
4078
|
children: [
|
|
4079
4079
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4080
|
-
className: `${showMagnifyingGlass ?
|
|
4080
|
+
className: `${showMagnifyingGlass ? 'left-padding' : ''} ${showSearchButton ? 'right-padding' : ''}`,
|
|
4081
4081
|
label: placeholder,
|
|
4082
4082
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4083
4083
|
placeholder: placeholder,
|
|
@@ -4092,7 +4092,7 @@ const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = "Search
|
|
|
4092
4092
|
}),
|
|
4093
4093
|
showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
4094
4094
|
variation: "solid",
|
|
4095
|
-
className: onDark &&
|
|
4095
|
+
className: onDark && 'on-dark',
|
|
4096
4096
|
onClick: onSubmit,
|
|
4097
4097
|
children: [
|
|
4098
4098
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4211,7 +4211,7 @@ const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: roo
|
|
|
4211
4211
|
url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4212
4212
|
addQueryPrefix: true
|
|
4213
4213
|
})}`,
|
|
4214
|
-
docExpansion:
|
|
4214
|
+
docExpansion: 'list',
|
|
4215
4215
|
defaultModelsExpandDepth: -1,
|
|
4216
4216
|
plugins: [
|
|
4217
4217
|
(0, $hgUW1$SpanOpenAPIVersion),
|
|
@@ -4319,7 +4319,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4319
4319
|
size: "big",
|
|
4320
4320
|
type: "submit",
|
|
4321
4321
|
style: {
|
|
4322
|
-
width:
|
|
4322
|
+
width: '70px'
|
|
4323
4323
|
},
|
|
4324
4324
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4325
4325
|
className: "fas fa-search small-text"
|
|
@@ -4336,7 +4336,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4336
4336
|
className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
|
|
4337
4337
|
children: [
|
|
4338
4338
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4339
|
-
children: text ? text :
|
|
4339
|
+
children: text ? text : 'Search'
|
|
4340
4340
|
}),
|
|
4341
4341
|
` `,
|
|
4342
4342
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4421,12 +4421,12 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
4421
4421
|
fulltext: fulltext ? fulltext : undefined,
|
|
4422
4422
|
...selectedFacets,
|
|
4423
4423
|
sort: sort ? sort : undefined,
|
|
4424
|
-
[
|
|
4424
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
4425
4425
|
page: page !== 1 ? page : undefined,
|
|
4426
|
-
[
|
|
4426
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
4427
4427
|
};
|
|
4428
4428
|
return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4429
|
-
arrayFormat:
|
|
4429
|
+
arrayFormat: 'comma',
|
|
4430
4430
|
encode: false
|
|
4431
4431
|
})}`);
|
|
4432
4432
|
}
|
|
@@ -4437,26 +4437,26 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
4437
4437
|
|
|
4438
4438
|
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
4439
4439
|
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4440
|
-
defaultSort:
|
|
4441
|
-
defaultOrder:
|
|
4442
|
-
}, pageTitle: pageTitle =
|
|
4440
|
+
defaultSort: 'modified',
|
|
4441
|
+
defaultOrder: 'desc'
|
|
4442
|
+
}, pageTitle: pageTitle = 'Dataset Explorer', filterTitle: filterTitle = 'Tags', showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = '', showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
4443
4443
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4444
4444
|
const sortOptions = [
|
|
4445
4445
|
{
|
|
4446
|
-
label:
|
|
4447
|
-
value:
|
|
4446
|
+
label: 'Newest',
|
|
4447
|
+
value: 'newest'
|
|
4448
4448
|
},
|
|
4449
4449
|
{
|
|
4450
|
-
label:
|
|
4451
|
-
value:
|
|
4450
|
+
label: 'Oldest',
|
|
4451
|
+
value: 'oldest'
|
|
4452
4452
|
},
|
|
4453
4453
|
{
|
|
4454
|
-
label:
|
|
4455
|
-
value:
|
|
4454
|
+
label: 'Title A-Z',
|
|
4455
|
+
value: 'titleAZ'
|
|
4456
4456
|
},
|
|
4457
4457
|
{
|
|
4458
|
-
label:
|
|
4459
|
-
value:
|
|
4458
|
+
label: 'Title Z-A',
|
|
4459
|
+
value: 'titleZA'
|
|
4460
4460
|
}
|
|
4461
4461
|
];
|
|
4462
4462
|
const defaultSortBy = "";
|
|
@@ -4475,7 +4475,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4475
4475
|
endingNumber: 0
|
|
4476
4476
|
});
|
|
4477
4477
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4478
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4478
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)('');
|
|
4479
4479
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4480
4480
|
const [fulltext, setFullText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
4481
4481
|
const [filterText, setFilterText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
@@ -4484,7 +4484,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4484
4484
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4485
4485
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4486
4486
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4487
|
-
return sort ===
|
|
4487
|
+
return sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
|
|
4488
4488
|
});
|
|
4489
4489
|
const [selectedFacets, setSelectedFacets] = (0, $hgUW1$useState)(transformedParams.selectedFacets ? transformedParams.selectedFacets : {
|
|
4490
4490
|
theme: [],
|
|
@@ -4493,21 +4493,21 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4493
4493
|
const setSortOptions = (value)=>{
|
|
4494
4494
|
setSortDisplay(value);
|
|
4495
4495
|
switch(value){
|
|
4496
|
-
case
|
|
4497
|
-
setSort(
|
|
4498
|
-
setSortOrder(
|
|
4496
|
+
case 'newest':
|
|
4497
|
+
setSort('modified');
|
|
4498
|
+
setSortOrder('desc');
|
|
4499
4499
|
break;
|
|
4500
|
-
case
|
|
4501
|
-
setSort(
|
|
4502
|
-
setSortOrder(
|
|
4500
|
+
case 'oldest':
|
|
4501
|
+
setSort('modified');
|
|
4502
|
+
setSortOrder('asc');
|
|
4503
4503
|
break;
|
|
4504
|
-
case
|
|
4505
|
-
setSort(
|
|
4506
|
-
setSortOrder(
|
|
4504
|
+
case 'titleAZ':
|
|
4505
|
+
setSort('title');
|
|
4506
|
+
setSortOrder('asc');
|
|
4507
4507
|
break;
|
|
4508
|
-
case
|
|
4509
|
-
setSort(
|
|
4510
|
-
setSortOrder(
|
|
4508
|
+
case 'titleZA':
|
|
4509
|
+
setSort('title');
|
|
4510
|
+
setSortOrder('desc');
|
|
4511
4511
|
break;
|
|
4512
4512
|
}
|
|
4513
4513
|
};
|
|
@@ -4515,12 +4515,12 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4515
4515
|
const newFacets = {
|
|
4516
4516
|
...selectedFacets
|
|
4517
4517
|
};
|
|
4518
|
-
if (key ===
|
|
4518
|
+
if (key === 'theme') {
|
|
4519
4519
|
const existingFacet = newFacets.theme.findIndex((s)=>s === value);
|
|
4520
4520
|
if (existingFacet > -1) newFacets.theme.splice(existingFacet, 1);
|
|
4521
4521
|
else newFacets.theme.push(value);
|
|
4522
4522
|
}
|
|
4523
|
-
if (key ===
|
|
4523
|
+
if (key === 'keyword') {
|
|
4524
4524
|
const existingFacet = newFacets.keyword.findIndex((s)=>s === value);
|
|
4525
4525
|
if (existingFacet > -1) newFacets.keyword.splice(existingFacet, 1);
|
|
4526
4526
|
else newFacets.keyword.push(value);
|
|
@@ -4534,7 +4534,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4534
4534
|
});
|
|
4535
4535
|
setSelectedFacets(newFacets);
|
|
4536
4536
|
const url = new URL(window.location.href);
|
|
4537
|
-
window.history.pushState({},
|
|
4537
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
4538
4538
|
}
|
|
4539
4539
|
const pageSize = defaultPageSize;
|
|
4540
4540
|
function resetFilters() {
|
|
@@ -4543,14 +4543,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4543
4543
|
setSelectedFacets(defaultSelectedFacets);
|
|
4544
4544
|
setPage(defaultPage);
|
|
4545
4545
|
const url = new URL(window.location.href);
|
|
4546
|
-
window.history.pushState({},
|
|
4546
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}`);
|
|
4547
4547
|
}
|
|
4548
4548
|
function buildSearchParams(includePage) {
|
|
4549
4549
|
let newParams = {};
|
|
4550
4550
|
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
4551
4551
|
if (sort !== defaultSort.defaultSort) newParams.sort = sort;
|
|
4552
4552
|
if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
|
|
4553
|
-
if (fulltext !==
|
|
4553
|
+
if (fulltext !== '') newParams.fulltext = fulltext;
|
|
4554
4554
|
if (Object.keys(selectedFacets).length) Object.keys(selectedFacets).forEach((key)=>{
|
|
4555
4555
|
newParams[key] = selectedFacets[key];
|
|
4556
4556
|
});
|
|
@@ -4563,9 +4563,9 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4563
4563
|
fulltext: fulltext ? fulltext : undefined,
|
|
4564
4564
|
...selectedFacets,
|
|
4565
4565
|
sort: sort ? sort : undefined,
|
|
4566
|
-
[
|
|
4566
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
4567
4567
|
page: page !== 1 ? page : undefined,
|
|
4568
|
-
[
|
|
4568
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
4569
4569
|
};
|
|
4570
4570
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4571
4571
|
queryKey: [
|
|
@@ -4574,7 +4574,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4574
4574
|
],
|
|
4575
4575
|
queryFn: ()=>{
|
|
4576
4576
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4577
|
-
arrayFormat:
|
|
4577
|
+
arrayFormat: 'comma',
|
|
4578
4578
|
encode: false
|
|
4579
4579
|
})}`);
|
|
4580
4580
|
}
|
|
@@ -4619,8 +4619,8 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4619
4619
|
]);
|
|
4620
4620
|
(0, $hgUW1$useEffect)(()=>{
|
|
4621
4621
|
// No results found
|
|
4622
|
-
if (noResults) setAnnouncementText(
|
|
4623
|
-
else if (!isPending && (!data || !data.data.results)) setAnnouncementText(
|
|
4622
|
+
if (noResults) setAnnouncementText('No results found.');
|
|
4623
|
+
else if (!isPending && (!data || !data.data.results)) setAnnouncementText('Could not connect to the API.');
|
|
4624
4624
|
else setAnnouncementText(`Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`);
|
|
4625
4625
|
}, [
|
|
4626
4626
|
data,
|
|
@@ -4678,7 +4678,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4678
4678
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4679
4679
|
fieldClassName: "ds-u-margin--0",
|
|
4680
4680
|
value: filterText,
|
|
4681
|
-
className: `ds-u-padding-right--2 ${altMobileSearchButton ?
|
|
4681
|
+
className: `ds-u-padding-right--2 ${altMobileSearchButton ? 'ds-l-col--12 ds-l-md-col--10 --alt-style' : 'ds-l-col--10'}`,
|
|
4682
4682
|
label: "Search datasets",
|
|
4683
4683
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4684
4684
|
placeholder: "Search datasets",
|
|
@@ -4738,7 +4738,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4738
4738
|
"Showing ",
|
|
4739
4739
|
currentResultNumbers.startingNumber,
|
|
4740
4740
|
" -",
|
|
4741
|
-
|
|
4741
|
+
' ',
|
|
4742
4742
|
currentResultNumbers.endingNumber,
|
|
4743
4743
|
" of ",
|
|
4744
4744
|
data.data.total,
|
|
@@ -4809,7 +4809,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4809
4809
|
},
|
|
4810
4810
|
renderHref: (page)=>{
|
|
4811
4811
|
const searchParams = buildSearchParams(false);
|
|
4812
|
-
const includeAnd = searchParams ?
|
|
4812
|
+
const includeAnd = searchParams ? '&' : '';
|
|
4813
4813
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
4814
4814
|
}
|
|
4815
4815
|
})
|
|
@@ -4843,26 +4843,26 @@ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
4843
4843
|
|
|
4844
4844
|
|
|
4845
4845
|
const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4846
|
-
defaultSort:
|
|
4847
|
-
defaultOrder:
|
|
4848
|
-
}, pageTitle: pageTitle =
|
|
4846
|
+
defaultSort: 'modified',
|
|
4847
|
+
defaultOrder: 'desc'
|
|
4848
|
+
}, pageTitle: pageTitle = 'What\'s New ', showLargeFileWarning: showLargeFileWarning = false, introText: introText = '', dataDictionaryLinks: dataDictionaryLinks = false })=>{
|
|
4849
4849
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4850
4850
|
const sortOptions = [
|
|
4851
4851
|
{
|
|
4852
|
-
label:
|
|
4853
|
-
value:
|
|
4852
|
+
label: 'Newest',
|
|
4853
|
+
value: 'newest'
|
|
4854
4854
|
},
|
|
4855
4855
|
{
|
|
4856
|
-
label:
|
|
4857
|
-
value:
|
|
4856
|
+
label: 'Oldest',
|
|
4857
|
+
value: 'oldest'
|
|
4858
4858
|
},
|
|
4859
4859
|
{
|
|
4860
|
-
label:
|
|
4861
|
-
value:
|
|
4860
|
+
label: 'Title A-Z',
|
|
4861
|
+
value: 'titleAZ'
|
|
4862
4862
|
},
|
|
4863
4863
|
{
|
|
4864
|
-
label:
|
|
4865
|
-
value:
|
|
4864
|
+
label: 'Title Z-A',
|
|
4865
|
+
value: 'titleZA'
|
|
4866
4866
|
}
|
|
4867
4867
|
];
|
|
4868
4868
|
const defaultSortBy = "";
|
|
@@ -4876,33 +4876,33 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4876
4876
|
endingNumber: 0
|
|
4877
4877
|
});
|
|
4878
4878
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4879
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4879
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)('');
|
|
4880
4880
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4881
4881
|
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
4882
4882
|
const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
|
|
4883
4883
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4884
4884
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4885
4885
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4886
|
-
return sort ===
|
|
4886
|
+
return sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
|
|
4887
4887
|
});
|
|
4888
4888
|
const setSortOptions = (value)=>{
|
|
4889
4889
|
setSortDisplay(value);
|
|
4890
4890
|
switch(value){
|
|
4891
|
-
case
|
|
4892
|
-
setSort(
|
|
4893
|
-
setSortOrder(
|
|
4891
|
+
case 'newest':
|
|
4892
|
+
setSort('modified');
|
|
4893
|
+
setSortOrder('desc');
|
|
4894
4894
|
break;
|
|
4895
|
-
case
|
|
4896
|
-
setSort(
|
|
4897
|
-
setSortOrder(
|
|
4895
|
+
case 'oldest':
|
|
4896
|
+
setSort('modified');
|
|
4897
|
+
setSortOrder('asc');
|
|
4898
4898
|
break;
|
|
4899
|
-
case
|
|
4900
|
-
setSort(
|
|
4901
|
-
setSortOrder(
|
|
4899
|
+
case 'titleAZ':
|
|
4900
|
+
setSort('title');
|
|
4901
|
+
setSortOrder('asc');
|
|
4902
4902
|
break;
|
|
4903
|
-
case
|
|
4904
|
-
setSort(
|
|
4905
|
-
setSortOrder(
|
|
4903
|
+
case 'titleZA':
|
|
4904
|
+
setSort('title');
|
|
4905
|
+
setSortOrder('desc');
|
|
4906
4906
|
break;
|
|
4907
4907
|
}
|
|
4908
4908
|
};
|
|
@@ -4919,9 +4919,9 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4919
4919
|
}
|
|
4920
4920
|
let params = {
|
|
4921
4921
|
sort: sort ? sort : undefined,
|
|
4922
|
-
[
|
|
4922
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
4923
4923
|
page: page !== 1 ? page : undefined,
|
|
4924
|
-
[
|
|
4924
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
4925
4925
|
};
|
|
4926
4926
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4927
4927
|
queryKey: [
|
|
@@ -4930,7 +4930,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4930
4930
|
],
|
|
4931
4931
|
queryFn: ()=>{
|
|
4932
4932
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4933
|
-
arrayFormat:
|
|
4933
|
+
arrayFormat: 'comma',
|
|
4934
4934
|
encode: false
|
|
4935
4935
|
})}`);
|
|
4936
4936
|
}
|
|
@@ -4940,7 +4940,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4940
4940
|
// Update browser URL with current search params
|
|
4941
4941
|
const params = buildSearchParams(true);
|
|
4942
4942
|
const url = new URL(window.location.href);
|
|
4943
|
-
window.history.pushState({},
|
|
4943
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${params}`);
|
|
4944
4944
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4945
4945
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4946
4946
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -4966,8 +4966,8 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4966
4966
|
]);
|
|
4967
4967
|
(0, $hgUW1$useEffect)(()=>{
|
|
4968
4968
|
// No results found
|
|
4969
|
-
if (noResults) setAnnouncementText(
|
|
4970
|
-
else if (!isPending && (!data || !data.data.results)) setAnnouncementText(
|
|
4969
|
+
if (noResults) setAnnouncementText('No results found.');
|
|
4970
|
+
else if (!isPending && (!data || !data.data.results)) setAnnouncementText('Could not connect to the API.');
|
|
4971
4971
|
else setAnnouncementText(`Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`);
|
|
4972
4972
|
}, [
|
|
4973
4973
|
data,
|
|
@@ -5040,7 +5040,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5040
5040
|
"Showing ",
|
|
5041
5041
|
currentResultNumbers.startingNumber,
|
|
5042
5042
|
" -",
|
|
5043
|
-
|
|
5043
|
+
' ',
|
|
5044
5044
|
currentResultNumbers.endingNumber,
|
|
5045
5045
|
" of ",
|
|
5046
5046
|
data.data.total,
|
|
@@ -5100,7 +5100,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5100
5100
|
},
|
|
5101
5101
|
renderHref: (page)=>{
|
|
5102
5102
|
const searchParams = buildSearchParams(false);
|
|
5103
|
-
const includeAnd = searchParams ?
|
|
5103
|
+
const includeAnd = searchParams ? '&' : '';
|
|
5104
5104
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
5105
5105
|
}
|
|
5106
5106
|
})
|
|
@@ -5132,12 +5132,12 @@ var $550bcc185f420ff5$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
5132
5132
|
|
|
5133
5133
|
const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
5134
5134
|
const [dataset, setDataset] = (0, $hgUW1$useState)({
|
|
5135
|
-
title:
|
|
5135
|
+
title: '',
|
|
5136
5136
|
distribution: [],
|
|
5137
|
-
error:
|
|
5138
|
-
description:
|
|
5139
|
-
identifier:
|
|
5140
|
-
modified:
|
|
5137
|
+
error: '',
|
|
5138
|
+
description: '',
|
|
5139
|
+
identifier: '',
|
|
5140
|
+
modified: ''
|
|
5141
5141
|
});
|
|
5142
5142
|
const [id, setId] = (0, $hgUW1$useState)(datasetId);
|
|
5143
5143
|
const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
|
|
@@ -5147,7 +5147,7 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
|
5147
5147
|
"metastore" + id
|
|
5148
5148
|
],
|
|
5149
5149
|
queryFn: ()=>{
|
|
5150
|
-
return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ?
|
|
5150
|
+
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)=>{
|
|
5151
5151
|
return {
|
|
5152
5152
|
title: dataset.title,
|
|
5153
5153
|
distribution: dataset.distribution,
|
|
@@ -5213,7 +5213,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5213
5213
|
...additionalParams
|
|
5214
5214
|
};
|
|
5215
5215
|
params = (0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA);
|
|
5216
|
-
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` :
|
|
5216
|
+
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : '';
|
|
5217
5217
|
let enabled = false;
|
|
5218
5218
|
if (id) {
|
|
5219
5219
|
if (!requireConditions) enabled = true;
|
|
@@ -5293,65 +5293,65 @@ var $1d3d480a9cfaabe0$export$2e2bcd8739ae039 = $1d3d480a9cfaabe0$var$useDatastor
|
|
|
5293
5293
|
|
|
5294
5294
|
|
|
5295
5295
|
const $28f16f59778efa64$export$82b1b1d517e5388a = {
|
|
5296
|
-
|
|
5297
|
-
name:
|
|
5296
|
+
'R/P10Y': {
|
|
5297
|
+
name: 'Decennial'
|
|
5298
5298
|
},
|
|
5299
|
-
|
|
5300
|
-
name:
|
|
5299
|
+
'R/P4Y': {
|
|
5300
|
+
name: 'Quadrennial'
|
|
5301
5301
|
},
|
|
5302
|
-
|
|
5303
|
-
name:
|
|
5302
|
+
'R/P1Y': {
|
|
5303
|
+
name: 'Annual'
|
|
5304
5304
|
},
|
|
5305
|
-
|
|
5306
|
-
name:
|
|
5305
|
+
'R/P2M': {
|
|
5306
|
+
name: 'Bimonthly'
|
|
5307
5307
|
},
|
|
5308
|
-
|
|
5309
|
-
name:
|
|
5308
|
+
'R/P3.5D': {
|
|
5309
|
+
name: 'Semiweekly'
|
|
5310
5310
|
},
|
|
5311
|
-
|
|
5312
|
-
name:
|
|
5311
|
+
'R/P1D': {
|
|
5312
|
+
name: 'Daily'
|
|
5313
5313
|
},
|
|
5314
|
-
|
|
5315
|
-
name:
|
|
5314
|
+
'R/P2W': {
|
|
5315
|
+
name: 'Biweekly'
|
|
5316
5316
|
},
|
|
5317
|
-
|
|
5318
|
-
name:
|
|
5317
|
+
'R/P6M': {
|
|
5318
|
+
name: 'Semiannual'
|
|
5319
5319
|
},
|
|
5320
|
-
|
|
5321
|
-
name:
|
|
5320
|
+
'R/P2Y': {
|
|
5321
|
+
name: 'Biennial'
|
|
5322
5322
|
},
|
|
5323
|
-
|
|
5324
|
-
name:
|
|
5323
|
+
'R/P3Y': {
|
|
5324
|
+
name: 'Triennial'
|
|
5325
5325
|
},
|
|
5326
|
-
|
|
5327
|
-
name:
|
|
5326
|
+
'R/P0.33W': {
|
|
5327
|
+
name: 'Three times a week'
|
|
5328
5328
|
},
|
|
5329
|
-
|
|
5330
|
-
name:
|
|
5329
|
+
'R/P0.33M': {
|
|
5330
|
+
name: 'Three times a month'
|
|
5331
5331
|
},
|
|
5332
|
-
|
|
5333
|
-
name:
|
|
5332
|
+
'R/PT1S': {
|
|
5333
|
+
name: 'Continuously updated'
|
|
5334
5334
|
},
|
|
5335
|
-
|
|
5336
|
-
name:
|
|
5335
|
+
'R/P1M': {
|
|
5336
|
+
name: 'Monthly'
|
|
5337
5337
|
},
|
|
5338
|
-
|
|
5339
|
-
name:
|
|
5338
|
+
'R/P3M': {
|
|
5339
|
+
name: 'Quarterly'
|
|
5340
5340
|
},
|
|
5341
|
-
|
|
5342
|
-
name:
|
|
5341
|
+
'R/P0.5M': {
|
|
5342
|
+
name: 'Semimonthly'
|
|
5343
5343
|
},
|
|
5344
|
-
|
|
5345
|
-
name:
|
|
5344
|
+
'R/P4M': {
|
|
5345
|
+
name: 'Three times a year'
|
|
5346
5346
|
},
|
|
5347
|
-
|
|
5348
|
-
name:
|
|
5347
|
+
'R/P1W': {
|
|
5348
|
+
name: 'Weekly'
|
|
5349
5349
|
},
|
|
5350
|
-
|
|
5351
|
-
name:
|
|
5350
|
+
'R/PT1H': {
|
|
5351
|
+
name: 'Hourly'
|
|
5352
5352
|
},
|
|
5353
5353
|
irregular: {
|
|
5354
|
-
name:
|
|
5354
|
+
name: 'Irregular'
|
|
5355
5355
|
}
|
|
5356
5356
|
};
|
|
5357
5357
|
|
|
@@ -5360,7 +5360,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5360
5360
|
modified: (data)=>{
|
|
5361
5361
|
return [
|
|
5362
5362
|
{
|
|
5363
|
-
label:
|
|
5363
|
+
label: 'Modified',
|
|
5364
5364
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5365
5365
|
date: data
|
|
5366
5366
|
})
|
|
@@ -5370,7 +5370,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5370
5370
|
issued: (data)=>{
|
|
5371
5371
|
return [
|
|
5372
5372
|
{
|
|
5373
|
-
label:
|
|
5373
|
+
label: 'Issued',
|
|
5374
5374
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5375
5375
|
date: data
|
|
5376
5376
|
})
|
|
@@ -5380,7 +5380,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5380
5380
|
accrualPeriodicity: (data)=>{
|
|
5381
5381
|
return [
|
|
5382
5382
|
{
|
|
5383
|
-
label:
|
|
5383
|
+
label: 'Frequency',
|
|
5384
5384
|
value: (0, $28f16f59778efa64$export$82b1b1d517e5388a)[data].name
|
|
5385
5385
|
}
|
|
5386
5386
|
];
|
|
@@ -5388,7 +5388,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5388
5388
|
publisher: (data)=>{
|
|
5389
5389
|
if (data.data && data.data.name) return [
|
|
5390
5390
|
{
|
|
5391
|
-
label:
|
|
5391
|
+
label: 'Publisher',
|
|
5392
5392
|
value: data.data.name
|
|
5393
5393
|
}
|
|
5394
5394
|
];
|
|
@@ -5397,7 +5397,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5397
5397
|
identifier: (data)=>{
|
|
5398
5398
|
return [
|
|
5399
5399
|
{
|
|
5400
|
-
label:
|
|
5400
|
+
label: 'Identifier',
|
|
5401
5401
|
value: data
|
|
5402
5402
|
}
|
|
5403
5403
|
];
|
|
@@ -5405,11 +5405,11 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5405
5405
|
contactPoint: (data)=>{
|
|
5406
5406
|
let rows = [];
|
|
5407
5407
|
if (data.fn) rows.push({
|
|
5408
|
-
label:
|
|
5408
|
+
label: 'Contact',
|
|
5409
5409
|
value: data.fn
|
|
5410
5410
|
});
|
|
5411
5411
|
if (data.hasEmail) rows.push({
|
|
5412
|
-
label:
|
|
5412
|
+
label: 'Contact Email',
|
|
5413
5413
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5414
5414
|
href: data.hasEmail.includes("mailto:") ? data.hasEmail : `mailto:${data.hasEmail}`,
|
|
5415
5415
|
children: data.hasEmail.replace("mailto:", "")
|
|
@@ -5420,7 +5420,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5420
5420
|
bureauCode: (data)=>{
|
|
5421
5421
|
if (data.length) return [
|
|
5422
5422
|
{
|
|
5423
|
-
label:
|
|
5423
|
+
label: 'Bureau Code',
|
|
5424
5424
|
value: data[0]
|
|
5425
5425
|
}
|
|
5426
5426
|
];
|
|
@@ -5428,7 +5428,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5428
5428
|
programCode: (data)=>{
|
|
5429
5429
|
if (data.length) return [
|
|
5430
5430
|
{
|
|
5431
|
-
label:
|
|
5431
|
+
label: 'Program Code',
|
|
5432
5432
|
value: data[0]
|
|
5433
5433
|
}
|
|
5434
5434
|
];
|
|
@@ -5436,13 +5436,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5436
5436
|
theme: (data)=>{
|
|
5437
5437
|
return [
|
|
5438
5438
|
{
|
|
5439
|
-
label:
|
|
5439
|
+
label: 'Category',
|
|
5440
5440
|
value: data.map((theme)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5441
5441
|
to: `/datasets?theme[]=${theme.data}`,
|
|
5442
5442
|
children: theme.data
|
|
5443
5443
|
}, theme.data)).reduce((prev, curr)=>[
|
|
5444
5444
|
prev,
|
|
5445
|
-
|
|
5445
|
+
', ',
|
|
5446
5446
|
curr
|
|
5447
5447
|
])
|
|
5448
5448
|
}
|
|
@@ -5451,13 +5451,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5451
5451
|
keyword: (data)=>{
|
|
5452
5452
|
return [
|
|
5453
5453
|
{
|
|
5454
|
-
label:
|
|
5454
|
+
label: 'Tags',
|
|
5455
5455
|
value: data.map((keyword)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5456
5456
|
to: `/datasets?keyword[]=${keyword.data}`,
|
|
5457
5457
|
children: keyword.data
|
|
5458
5458
|
}, keyword.data)).reduce((prev, curr)=>[
|
|
5459
5459
|
prev,
|
|
5460
|
-
|
|
5460
|
+
', ',
|
|
5461
5461
|
curr
|
|
5462
5462
|
])
|
|
5463
5463
|
}
|
|
@@ -5466,7 +5466,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5466
5466
|
license: (data)=>{
|
|
5467
5467
|
return [
|
|
5468
5468
|
{
|
|
5469
|
-
label:
|
|
5469
|
+
label: 'License',
|
|
5470
5470
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5471
5471
|
href: data,
|
|
5472
5472
|
children: data
|
|
@@ -5477,7 +5477,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5477
5477
|
accessLevel: (data)=>{
|
|
5478
5478
|
return [
|
|
5479
5479
|
{
|
|
5480
|
-
label:
|
|
5480
|
+
label: 'Public Access Level',
|
|
5481
5481
|
value: data
|
|
5482
5482
|
}
|
|
5483
5483
|
];
|
|
@@ -5485,7 +5485,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5485
5485
|
temporal: (data)=>{
|
|
5486
5486
|
return [
|
|
5487
5487
|
{
|
|
5488
|
-
label:
|
|
5488
|
+
label: 'Temporal Coverage',
|
|
5489
5489
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5490
5490
|
className: "dc-c-word-break--all",
|
|
5491
5491
|
children: data
|
|
@@ -5496,7 +5496,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5496
5496
|
spatial: (data)=>{
|
|
5497
5497
|
return [
|
|
5498
5498
|
{
|
|
5499
|
-
label:
|
|
5499
|
+
label: 'Spacial/Geographical Coverage',
|
|
5500
5500
|
value: data
|
|
5501
5501
|
}
|
|
5502
5502
|
];
|
|
@@ -5504,7 +5504,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5504
5504
|
references: (data)=>{
|
|
5505
5505
|
return [
|
|
5506
5506
|
{
|
|
5507
|
-
label:
|
|
5507
|
+
label: 'Related Documents',
|
|
5508
5508
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
5509
5509
|
className: "ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0",
|
|
5510
5510
|
children: data.map((item)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -5542,7 +5542,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ distribution: distribution,
|
|
|
5542
5542
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
5543
5543
|
const { data: resource } = (0, $hgUW1$useQuery)({
|
|
5544
5544
|
queryKey: [
|
|
5545
|
-
|
|
5545
|
+
'resource-information',
|
|
5546
5546
|
distribution.identifier
|
|
5547
5547
|
],
|
|
5548
5548
|
queryFn: ()=>(0, $hgUW1$axios).get(`${rootUrl}/datastore/query/${distribution.identifier}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({
|
|
@@ -5569,7 +5569,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ distribution: distribution,
|
|
|
5569
5569
|
}),
|
|
5570
5570
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5571
5571
|
className: "ds-u-font-weight--bold",
|
|
5572
|
-
children: resource?.count ? Number(resource.count).toLocaleString() :
|
|
5572
|
+
children: resource?.count ? Number(resource.count).toLocaleString() : ''
|
|
5573
5573
|
})
|
|
5574
5574
|
]
|
|
5575
5575
|
}),
|
|
@@ -5637,8 +5637,8 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5637
5637
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
5638
5638
|
href: dist.data.downloadURL,
|
|
5639
5639
|
style: {
|
|
5640
|
-
order: sm ?
|
|
5641
|
-
width: sm ?
|
|
5640
|
+
order: sm ? '1' : '0',
|
|
5641
|
+
width: sm ? '100%' : 'auto'
|
|
5642
5642
|
},
|
|
5643
5643
|
"aria-label": `Download ${dist.data.title || title} ${fileFormat}`,
|
|
5644
5644
|
className: "ds-c-button",
|
|
@@ -5651,7 +5651,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5651
5651
|
})
|
|
5652
5652
|
}),
|
|
5653
5653
|
dist.data.description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5654
|
-
className:
|
|
5654
|
+
className: 'ds-u-measure--wide ds-u-margin-bottom--7',
|
|
5655
5655
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5656
5656
|
className: "dc-c-metadata-description ds-u-margin--0",
|
|
5657
5657
|
dangerouslySetInnerHTML: {
|
|
@@ -5725,7 +5725,7 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5725
5725
|
const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
|
|
5726
5726
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
5727
5727
|
children: [
|
|
5728
|
-
md ?
|
|
5728
|
+
md ? '' : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5729
5729
|
component: "th",
|
|
5730
5730
|
className: "ds-u-font-weight--bold",
|
|
5731
5731
|
children: [
|
|
@@ -5737,8 +5737,8 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5737
5737
|
ariaLabel: r.label,
|
|
5738
5738
|
// @ts-ignore
|
|
5739
5739
|
style: {
|
|
5740
|
-
border:
|
|
5741
|
-
background:
|
|
5740
|
+
border: 'none',
|
|
5741
|
+
background: 'none'
|
|
5742
5742
|
},
|
|
5743
5743
|
maxWidth: "400px",
|
|
5744
5744
|
placement: "auto",
|
|
@@ -5797,10 +5797,10 @@ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: ap
|
|
|
5797
5797
|
href: apiUrl,
|
|
5798
5798
|
children: [
|
|
5799
5799
|
"View API",
|
|
5800
|
-
|
|
5800
|
+
' ',
|
|
5801
5801
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5802
5802
|
style: {
|
|
5803
|
-
whiteSpace:
|
|
5803
|
+
whiteSpace: 'nowrap'
|
|
5804
5804
|
},
|
|
5805
5805
|
children: [
|
|
5806
5806
|
"specification ",
|
|
@@ -5836,25 +5836,22 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
|
|
|
5836
5836
|
|
|
5837
5837
|
|
|
5838
5838
|
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
|
|
5839
|
+
const $1253cd791a90b9cc$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
|
|
5843
5840
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
5844
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
5841
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
|
|
5845
5842
|
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
5846
5843
|
minWidth: 0,
|
|
5847
5844
|
maxWidth: 544
|
|
5848
5845
|
});
|
|
5849
5846
|
const sortElement = (isSorted)=>{
|
|
5850
|
-
if (isSorted ===
|
|
5851
|
-
if (isSorted ===
|
|
5852
|
-
return
|
|
5847
|
+
if (isSorted === 'asc') return 'dc-c-sort--asc';
|
|
5848
|
+
if (isSorted === 'desc') return 'dc-c-sort--desc';
|
|
5849
|
+
return 'dc-c-sort--default';
|
|
5853
5850
|
};
|
|
5854
5851
|
const table = (0, $hgUW1$useReactTable)({
|
|
5855
5852
|
data: tableData,
|
|
5856
5853
|
columns: tableColumns,
|
|
5857
|
-
columnResizeMode:
|
|
5854
|
+
columnResizeMode: 'onChange',
|
|
5858
5855
|
getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
|
|
5859
5856
|
getFilteredRowModel: (0, $hgUW1$getFilteredRowModel)(),
|
|
5860
5857
|
getPaginationRowModel: (0, $hgUW1$getPaginationRowModel)(),
|
|
@@ -5873,49 +5870,49 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5873
5870
|
});
|
|
5874
5871
|
const sortOptions = [
|
|
5875
5872
|
{
|
|
5876
|
-
value:
|
|
5877
|
-
label:
|
|
5873
|
+
value: 'default',
|
|
5874
|
+
label: 'No Sort'
|
|
5878
5875
|
},
|
|
5879
5876
|
{
|
|
5880
|
-
value:
|
|
5881
|
-
label:
|
|
5877
|
+
value: 'titleasc',
|
|
5878
|
+
label: 'Title A-Z'
|
|
5882
5879
|
},
|
|
5883
5880
|
{
|
|
5884
|
-
value:
|
|
5885
|
-
label:
|
|
5881
|
+
value: 'titledesc',
|
|
5882
|
+
label: 'Title Z-A'
|
|
5886
5883
|
},
|
|
5887
5884
|
{
|
|
5888
|
-
value:
|
|
5889
|
-
label:
|
|
5885
|
+
value: 'typeasc',
|
|
5886
|
+
label: 'Type A-Z'
|
|
5890
5887
|
},
|
|
5891
5888
|
{
|
|
5892
|
-
value:
|
|
5893
|
-
label:
|
|
5889
|
+
value: 'typedesc',
|
|
5890
|
+
label: 'Type Z-A'
|
|
5894
5891
|
}
|
|
5895
5892
|
];
|
|
5896
5893
|
const sortStatesLookup = {
|
|
5897
5894
|
default: [],
|
|
5898
5895
|
titleasc: [
|
|
5899
5896
|
{
|
|
5900
|
-
id:
|
|
5897
|
+
id: 'titleResizable',
|
|
5901
5898
|
desc: false
|
|
5902
5899
|
}
|
|
5903
5900
|
],
|
|
5904
5901
|
titledesc: [
|
|
5905
5902
|
{
|
|
5906
|
-
id:
|
|
5903
|
+
id: 'titleResizable',
|
|
5907
5904
|
desc: true
|
|
5908
5905
|
}
|
|
5909
5906
|
],
|
|
5910
5907
|
typeasc: [
|
|
5911
5908
|
{
|
|
5912
|
-
id:
|
|
5909
|
+
id: 'type',
|
|
5913
5910
|
desc: false
|
|
5914
5911
|
}
|
|
5915
5912
|
],
|
|
5916
5913
|
typedesc: [
|
|
5917
5914
|
{
|
|
5918
|
-
id:
|
|
5915
|
+
id: 'type',
|
|
5919
5916
|
desc: true
|
|
5920
5917
|
}
|
|
5921
5918
|
]
|
|
@@ -5943,7 +5940,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5943
5940
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
5944
5941
|
className: "dc-c-datatable",
|
|
5945
5942
|
style: {
|
|
5946
|
-
width:
|
|
5943
|
+
width: '100%'
|
|
5947
5944
|
},
|
|
5948
5945
|
stackable: true,
|
|
5949
5946
|
children: [
|
|
@@ -5956,16 +5953,16 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5956
5953
|
header: header,
|
|
5957
5954
|
setAriaLiveFeedback: setAriaLiveFeedback,
|
|
5958
5955
|
sortElement: sortElement,
|
|
5959
|
-
id:
|
|
5956
|
+
id: 'dataDictionary_' + header.id
|
|
5960
5957
|
}, header.id + "_resize") : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5961
5958
|
key: header.id,
|
|
5962
5959
|
className: `ds-u-border-y--2 ds-u-border--dark ds-u-border-x--0`,
|
|
5963
|
-
id:
|
|
5960
|
+
id: 'dataDictionary_' + header.id,
|
|
5964
5961
|
children: [
|
|
5965
5962
|
(0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext()),
|
|
5966
|
-
header.id ===
|
|
5963
|
+
header.id === 'type' && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
5967
5964
|
onClick: header.column.getToggleSortingHandler(),
|
|
5968
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
5965
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : '',
|
|
5969
5966
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
5970
5967
|
})
|
|
5971
5968
|
]
|
|
@@ -5980,12 +5977,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5980
5977
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
5981
5978
|
key: cell.id,
|
|
5982
5979
|
style: {
|
|
5983
|
-
maxWidth: mobile ?
|
|
5984
|
-
whiteSpace: cell.column.id === "description" ?
|
|
5980
|
+
maxWidth: mobile ? '100%' : cell.column.getSize(),
|
|
5981
|
+
whiteSpace: cell.column.id === "description" ? 'pre-wrap' : 'normal'
|
|
5985
5982
|
},
|
|
5986
|
-
className: `${cell.column.id ===
|
|
5987
|
-
headers:
|
|
5988
|
-
stackedTitle: cell.column.id ===
|
|
5983
|
+
className: `${cell.column.id === 'titleResizable' ? 'ds-u-word-break' : ''}`,
|
|
5984
|
+
headers: 'dataDictionary_' + cell.column.id,
|
|
5985
|
+
stackedTitle: cell.column.id === 'titleResizable' ? 'Title' : cell.column.columnDef.header,
|
|
5989
5986
|
children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
5990
5987
|
});
|
|
5991
5988
|
})
|
|
@@ -6014,30 +6011,30 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
6014
6011
|
table.setPageIndex(page - 1);
|
|
6015
6012
|
},
|
|
6016
6013
|
renderHref: (page)=>`/page=${page}`
|
|
6017
|
-
}) :
|
|
6014
|
+
}) : ''
|
|
6018
6015
|
]
|
|
6019
6016
|
});
|
|
6020
6017
|
};
|
|
6021
|
-
var $
|
|
6018
|
+
var $1253cd791a90b9cc$export$2e2bcd8739ae039 = $1253cd791a90b9cc$var$DataDictionaryTable;
|
|
6022
6019
|
|
|
6023
6020
|
|
|
6024
6021
|
const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
|
|
6025
6022
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
6026
6023
|
const tableColumns = [
|
|
6027
|
-
columnHelper.accessor(
|
|
6028
|
-
header:
|
|
6024
|
+
columnHelper.accessor('name', {
|
|
6025
|
+
header: 'Name'
|
|
6029
6026
|
}),
|
|
6030
|
-
columnHelper.accessor(
|
|
6031
|
-
header:
|
|
6027
|
+
columnHelper.accessor('title', {
|
|
6028
|
+
header: 'Title'
|
|
6032
6029
|
}),
|
|
6033
|
-
columnHelper.accessor(
|
|
6034
|
-
header:
|
|
6030
|
+
columnHelper.accessor('type', {
|
|
6031
|
+
header: 'Type'
|
|
6035
6032
|
}),
|
|
6036
|
-
columnHelper.accessor(
|
|
6037
|
-
header:
|
|
6033
|
+
columnHelper.accessor('format', {
|
|
6034
|
+
header: 'Format'
|
|
6038
6035
|
})
|
|
6039
6036
|
];
|
|
6040
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $
|
|
6037
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $1253cd791a90b9cc$export$2e2bcd8739ae039), {
|
|
6041
6038
|
tableColumns: tableColumns,
|
|
6042
6039
|
tableData: datasetDictionary,
|
|
6043
6040
|
pageSize: pageSize
|
|
@@ -6053,7 +6050,12 @@ var $a24829b27758fe6c$export$2e2bcd8739ae039 = $a24829b27758fe6c$var$SitewideDat
|
|
|
6053
6050
|
|
|
6054
6051
|
|
|
6055
6052
|
|
|
6056
|
-
|
|
6053
|
+
|
|
6054
|
+
|
|
6055
|
+
|
|
6056
|
+
|
|
6057
|
+
|
|
6058
|
+
const $c08f91c7fd0895d8$var$DatasetDictionaryTable = ({ datasetDictionaryEndpoint: datasetDictionaryEndpoint, pageSize: pageSize, showDownloadButton: showDownloadButton })=>{
|
|
6057
6059
|
const [titleFilter, setTitleFilter] = (0, $hgUW1$useState)("");
|
|
6058
6060
|
const [typeFilter, setTypeFilter] = (0, $hgUW1$useState)("all");
|
|
6059
6061
|
const columnFilters = (0, $hgUW1$useMemo)(()=>[
|
|
@@ -6069,6 +6071,18 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6069
6071
|
titleFilter,
|
|
6070
6072
|
typeFilter
|
|
6071
6073
|
]);
|
|
6074
|
+
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
6075
|
+
const { data: data } = (0, $hgUW1$useQuery)({
|
|
6076
|
+
queryKey: [
|
|
6077
|
+
"dictionary" + datasetDictionaryEndpoint
|
|
6078
|
+
],
|
|
6079
|
+
queryFn: ()=>{
|
|
6080
|
+
return (0, $hgUW1$axios).get(`${datasetDictionaryEndpoint}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`).then((res)=>res.data).catch((error)=>console.error(error));
|
|
6081
|
+
},
|
|
6082
|
+
enabled: datasetDictionaryEndpoint !== undefined
|
|
6083
|
+
});
|
|
6084
|
+
const datasetDictionary = data && data.data && data.data.fields && data.data.fields.length ? data.data.fields : null;
|
|
6085
|
+
if (!datasetDictionary) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {});
|
|
6072
6086
|
const tableData = datasetDictionary.map((item)=>{
|
|
6073
6087
|
return {
|
|
6074
6088
|
titleResizable: item.title,
|
|
@@ -6078,7 +6092,7 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6078
6092
|
});
|
|
6079
6093
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
6080
6094
|
const tableColumns = [
|
|
6081
|
-
columnHelper.accessor(
|
|
6095
|
+
columnHelper.accessor('titleResizable', {
|
|
6082
6096
|
header: ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6083
6097
|
className: "dc-c-tooltip-width-override",
|
|
6084
6098
|
children: [
|
|
@@ -6087,8 +6101,8 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6087
6101
|
title: "Title represents the column headers of the data file",
|
|
6088
6102
|
// @ts-ignore
|
|
6089
6103
|
style: {
|
|
6090
|
-
border:
|
|
6091
|
-
background:
|
|
6104
|
+
border: 'none',
|
|
6105
|
+
background: 'none'
|
|
6092
6106
|
},
|
|
6093
6107
|
maxWidth: "400px",
|
|
6094
6108
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
|
|
@@ -6098,52 +6112,84 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6098
6112
|
size: 300,
|
|
6099
6113
|
minSize: 132
|
|
6100
6114
|
}),
|
|
6101
|
-
columnHelper.accessor(
|
|
6102
|
-
header:
|
|
6115
|
+
columnHelper.accessor('description', {
|
|
6116
|
+
header: 'Description',
|
|
6103
6117
|
minSize: 600
|
|
6104
6118
|
}),
|
|
6105
|
-
columnHelper.accessor(
|
|
6106
|
-
header:
|
|
6119
|
+
columnHelper.accessor('type', {
|
|
6120
|
+
header: 'Type',
|
|
6107
6121
|
size: 150,
|
|
6108
6122
|
enableResizing: false
|
|
6109
6123
|
})
|
|
6110
6124
|
];
|
|
6111
6125
|
const typeOptions = [
|
|
6112
6126
|
{
|
|
6113
|
-
value:
|
|
6114
|
-
label:
|
|
6127
|
+
value: 'all',
|
|
6128
|
+
label: 'All Types'
|
|
6115
6129
|
},
|
|
6116
6130
|
{
|
|
6117
|
-
value:
|
|
6118
|
-
label:
|
|
6131
|
+
value: 'string',
|
|
6132
|
+
label: 'String'
|
|
6119
6133
|
},
|
|
6120
6134
|
{
|
|
6121
|
-
value:
|
|
6122
|
-
label:
|
|
6135
|
+
value: 'date',
|
|
6136
|
+
label: 'Date'
|
|
6123
6137
|
},
|
|
6124
6138
|
{
|
|
6125
|
-
value:
|
|
6126
|
-
label:
|
|
6139
|
+
value: 'datetime',
|
|
6140
|
+
label: 'Datetime'
|
|
6127
6141
|
},
|
|
6128
6142
|
{
|
|
6129
|
-
value:
|
|
6130
|
-
label:
|
|
6143
|
+
value: 'year',
|
|
6144
|
+
label: 'Year'
|
|
6131
6145
|
},
|
|
6132
6146
|
{
|
|
6133
|
-
value:
|
|
6134
|
-
label:
|
|
6147
|
+
value: 'integer',
|
|
6148
|
+
label: 'Integer'
|
|
6135
6149
|
},
|
|
6136
6150
|
{
|
|
6137
|
-
value:
|
|
6138
|
-
label:
|
|
6151
|
+
value: 'number',
|
|
6152
|
+
label: 'Number'
|
|
6139
6153
|
},
|
|
6140
6154
|
{
|
|
6141
|
-
value:
|
|
6142
|
-
label:
|
|
6155
|
+
value: 'boolean',
|
|
6156
|
+
label: 'Boolean'
|
|
6143
6157
|
}
|
|
6144
6158
|
];
|
|
6145
6159
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
6146
6160
|
children: [
|
|
6161
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6162
|
+
className: "ds-u-margin-bottom--1 ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--end",
|
|
6163
|
+
children: [
|
|
6164
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
6165
|
+
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4",
|
|
6166
|
+
onClick: ()=>window.open(datasetDictionaryEndpoint),
|
|
6167
|
+
type: "button",
|
|
6168
|
+
children: [
|
|
6169
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
6170
|
+
className: "fa fa-file-download ds-u-color--primary ds-u-padding-right--1"
|
|
6171
|
+
}),
|
|
6172
|
+
" View Dictionary JSON"
|
|
6173
|
+
]
|
|
6174
|
+
}),
|
|
6175
|
+
showDownloadButton && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6176
|
+
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4 ds-u-margin-top--2 ds-u-sm-margin-top--0 ds-u-padding--0 ds-u-sm-padding-left--2",
|
|
6177
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
6178
|
+
href: datasetDictionaryEndpoint + "/csv",
|
|
6179
|
+
className: "ds-c-button",
|
|
6180
|
+
style: {
|
|
6181
|
+
width: '100%'
|
|
6182
|
+
},
|
|
6183
|
+
children: [
|
|
6184
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
6185
|
+
className: "fa fa-file-download ds-u-color--primary ds-u-padding-right--1"
|
|
6186
|
+
}),
|
|
6187
|
+
"Download Dictionary CSV"
|
|
6188
|
+
]
|
|
6189
|
+
})
|
|
6190
|
+
})
|
|
6191
|
+
]
|
|
6192
|
+
}),
|
|
6147
6193
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6148
6194
|
className: "dc-query-builder ds-u-margin-bottom--3",
|
|
6149
6195
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6190,7 +6236,7 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6190
6236
|
})
|
|
6191
6237
|
})
|
|
6192
6238
|
}),
|
|
6193
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $
|
|
6239
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $1253cd791a90b9cc$export$2e2bcd8739ae039), {
|
|
6194
6240
|
tableColumns: tableColumns,
|
|
6195
6241
|
tableData: tableData,
|
|
6196
6242
|
pageSize: pageSize,
|
|
@@ -6199,24 +6245,51 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6199
6245
|
]
|
|
6200
6246
|
});
|
|
6201
6247
|
};
|
|
6202
|
-
var $
|
|
6248
|
+
var $c08f91c7fd0895d8$export$2e2bcd8739ae039 = $c08f91c7fd0895d8$var$DatasetDictionaryTable;
|
|
6203
6249
|
|
|
6204
6250
|
|
|
6205
6251
|
|
|
6206
6252
|
|
|
6207
6253
|
|
|
6208
|
-
const $
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6254
|
+
const $78457092a09654a6$var$DatasetDictionaryPDF = ({ datasetDictionaryEndpoint: datasetDictionaryEndpoint })=>{
|
|
6255
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
6256
|
+
children: [
|
|
6257
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6258
|
+
className: "ds-u-margin-bottom--1 ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--end",
|
|
6259
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6260
|
+
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4 ds-u-margin-top--2 ds-u-sm-margin-top--0 ds-u-padding--0 ds-u-sm-padding-left--2",
|
|
6261
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
6262
|
+
href: datasetDictionaryEndpoint,
|
|
6263
|
+
target: "_blank",
|
|
6264
|
+
rel: "noopener noreferrer",
|
|
6265
|
+
className: "ds-c-button",
|
|
6266
|
+
children: [
|
|
6267
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
6268
|
+
className: "fa fa-file-download ds-u-color--primary ds-u-padding-right--1"
|
|
6269
|
+
}),
|
|
6270
|
+
" Download Dictionary PDF"
|
|
6271
|
+
]
|
|
6272
|
+
})
|
|
6273
|
+
})
|
|
6274
|
+
}),
|
|
6275
|
+
!window.location.host.includes('cms.gov') && datasetDictionaryEndpoint ? // We can not iframe the data dictionary file on a domain other than https://*.cms.gov
|
|
6276
|
+
// because there is a Content Security Policy directive set
|
|
6277
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6278
|
+
children: "The data dictionary file can not be displayed at this time."
|
|
6279
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6280
|
+
className: "data-dictionary-iframe-container ds-u-margin-top--3",
|
|
6281
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("iframe", {
|
|
6282
|
+
src: datasetDictionaryEndpoint,
|
|
6283
|
+
className: "data-dictionary-iframe"
|
|
6284
|
+
})
|
|
6285
|
+
})
|
|
6286
|
+
]
|
|
6218
6287
|
});
|
|
6219
|
-
|
|
6288
|
+
};
|
|
6289
|
+
var $78457092a09654a6$export$2e2bcd8739ae039 = $78457092a09654a6$var$DatasetDictionaryPDF;
|
|
6290
|
+
|
|
6291
|
+
|
|
6292
|
+
const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datasetDictionaryEndpoint, datasetSitewideDictionary: datasetSitewideDictionary, datasetDictionaryFileType: datasetDictionaryFileType, title: title, pageSize: pageSize = 20, csvDownload: csvDownload })=>{
|
|
6220
6293
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6221
6294
|
"data-testid": "dataset-dictionary-tab",
|
|
6222
6295
|
children: [
|
|
@@ -6224,45 +6297,13 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
|
|
|
6224
6297
|
className: "ds-text-heading--2xl ds-u-margin-y--3",
|
|
6225
6298
|
children: title
|
|
6226
6299
|
}),
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
onClick: ()=>window.open(datasetDictionaryEndpoint),
|
|
6235
|
-
type: "button",
|
|
6236
|
-
children: [
|
|
6237
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
6238
|
-
className: "fa fa-file-download ds-u-color--primary ds-u-padding-right--1"
|
|
6239
|
-
}),
|
|
6240
|
-
" View Dictionary JSON"
|
|
6241
|
-
]
|
|
6242
|
-
}),
|
|
6243
|
-
csvDownload && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6244
|
-
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4 ds-u-margin-top--2 ds-u-sm-margin-top--0 ds-u-padding--0 ds-u-sm-padding-left--2",
|
|
6245
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
6246
|
-
href: datasetDictionaryEndpoint + "/csv",
|
|
6247
|
-
className: "ds-c-button",
|
|
6248
|
-
style: {
|
|
6249
|
-
width: "100%"
|
|
6250
|
-
},
|
|
6251
|
-
children: [
|
|
6252
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
6253
|
-
className: "fa fa-file-download ds-u-color--primary ds-u-padding-right--1"
|
|
6254
|
-
}),
|
|
6255
|
-
"Download Dictionary CSV"
|
|
6256
|
-
]
|
|
6257
|
-
})
|
|
6258
|
-
})
|
|
6259
|
-
]
|
|
6260
|
-
}),
|
|
6261
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $a6e312940f7003ef$export$2e2bcd8739ae039), {
|
|
6262
|
-
datasetDictionary: datasetDictionary,
|
|
6263
|
-
pageSize: pageSize
|
|
6264
|
-
})
|
|
6265
|
-
]
|
|
6300
|
+
datasetDictionaryFileType === 'application/vnd.tableschema+json' && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $c08f91c7fd0895d8$export$2e2bcd8739ae039), {
|
|
6301
|
+
datasetDictionaryEndpoint: datasetDictionaryEndpoint,
|
|
6302
|
+
pageSize: pageSize,
|
|
6303
|
+
showDownloadButton: csvDownload
|
|
6304
|
+
}),
|
|
6305
|
+
datasetDictionaryFileType === 'application/pdf' && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $78457092a09654a6$export$2e2bcd8739ae039), {
|
|
6306
|
+
datasetDictionaryEndpoint: datasetDictionaryEndpoint
|
|
6266
6307
|
}),
|
|
6267
6308
|
datasetSitewideDictionary && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $a24829b27758fe6c$export$2e2bcd8739ae039), {
|
|
6268
6309
|
datasetDictionary: datasetSitewideDictionary,
|
|
@@ -6303,7 +6344,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6303
6344
|
const [description, setDescription] = (0, $hgUW1$useState)("");
|
|
6304
6345
|
if (!distribution && !dataset?.identifier) return null;
|
|
6305
6346
|
(0, $hgUW1$useEffect)(()=>{
|
|
6306
|
-
let newDescription =
|
|
6347
|
+
let newDescription = '';
|
|
6307
6348
|
if (customDescription) newDescription = customDescription(dataset, distribution, resource);
|
|
6308
6349
|
else {
|
|
6309
6350
|
if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
|
|
@@ -6318,7 +6359,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6318
6359
|
customDescription
|
|
6319
6360
|
]);
|
|
6320
6361
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6321
|
-
className:
|
|
6362
|
+
className: 'ds-u-measure--wide ds-u-margin-bottom--7',
|
|
6322
6363
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6323
6364
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
6324
6365
|
children: typeof description === "string" ? /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6343,7 +6384,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
6343
6384
|
],
|
|
6344
6385
|
queryFn: ()=>{
|
|
6345
6386
|
return fetch(`${dataDictionaryUrl}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA), {
|
|
6346
|
-
arrayFormat:
|
|
6387
|
+
arrayFormat: 'comma',
|
|
6347
6388
|
encode: false
|
|
6348
6389
|
})}`).then((res)=>res.json());
|
|
6349
6390
|
}
|
|
@@ -6353,7 +6394,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
6353
6394
|
dataDictionaryLoading: isPending
|
|
6354
6395
|
};
|
|
6355
6396
|
};
|
|
6356
|
-
const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns: customColumns, setDatasetTitle: setDatasetTitle, customMetadataMapping: customMetadataMapping, apiPageUrl: apiPageUrl = "/api", dataDictionaryUrl: dataDictionaryUrl, borderlessTabs: borderlessTabs = false, defaultPageSize: defaultPageSize = 25, dataDictionaryCSV: dataDictionaryCSV = false, dataDictionaryBanner: dataDictionaryBanner = false, disableTableControls: disableTableControls = false, hideDataDictionary: hideDataDictionary = false, customDescription: customDescription, updateAriaLive: updateAriaLive, showRowLimitNotice: showRowLimitNotice = false, tabHrefPrepend: tabHrefPrepend =
|
|
6397
|
+
const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns: customColumns, setDatasetTitle: setDatasetTitle, customMetadataMapping: customMetadataMapping, apiPageUrl: apiPageUrl = "/api", dataDictionaryUrl: dataDictionaryUrl, borderlessTabs: borderlessTabs = false, defaultPageSize: defaultPageSize = 25, dataDictionaryCSV: dataDictionaryCSV = false, dataDictionaryBanner: dataDictionaryBanner = false, disableTableControls: disableTableControls = false, hideDataDictionary: hideDataDictionary = false, customDescription: customDescription, updateAriaLive: updateAriaLive, showRowLimitNotice: showRowLimitNotice = false, tabHrefPrepend: tabHrefPrepend = '', showDateDetails: showDateDetails = false })=>{
|
|
6357
6398
|
const tabHref = `/dataset/${id}`;
|
|
6358
6399
|
const options = location.search ? {
|
|
6359
6400
|
...(0, $hgUW1$qs).parse(location.search, {
|
|
@@ -6362,8 +6403,12 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6362
6403
|
} : {
|
|
6363
6404
|
conditions: []
|
|
6364
6405
|
};
|
|
6406
|
+
const dataDictionaryTypes = [
|
|
6407
|
+
'application/vnd.tableschema+json',
|
|
6408
|
+
'application/pdf'
|
|
6409
|
+
];
|
|
6365
6410
|
const { dataset: dataset, isPending: isPending } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
6366
|
-
const title = dataset.title ? dataset.title :
|
|
6411
|
+
const title = dataset.title ? dataset.title : '';
|
|
6367
6412
|
const metadataMapping = {
|
|
6368
6413
|
...(0, $6da0396069e23175$export$bc27cf7ecf44639d),
|
|
6369
6414
|
...customMetadataMapping
|
|
@@ -6371,7 +6416,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6371
6416
|
let distribution = {};
|
|
6372
6417
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
6373
6418
|
if (distributions.length) distribution = distributions[0];
|
|
6374
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
6419
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
6375
6420
|
...options,
|
|
6376
6421
|
limit: defaultPageSize
|
|
6377
6422
|
});
|
|
@@ -6383,7 +6428,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6383
6428
|
}) : null;
|
|
6384
6429
|
(0, $hgUW1$useEffect)(()=>{
|
|
6385
6430
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6386
|
-
if (localFileFormat ===
|
|
6431
|
+
if (localFileFormat === 'csv') resource.setResource(distribution.identifier);
|
|
6387
6432
|
}, [
|
|
6388
6433
|
distribution
|
|
6389
6434
|
]);
|
|
@@ -6438,7 +6483,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6438
6483
|
distribution,
|
|
6439
6484
|
window.location.hash
|
|
6440
6485
|
]);
|
|
6441
|
-
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType
|
|
6486
|
+
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && dataDictionaryTypes.includes(distribution.data.describedByType) || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
6442
6487
|
const date = {
|
|
6443
6488
|
modified: dataset.modified,
|
|
6444
6489
|
released: dataset.released,
|
|
@@ -6449,20 +6494,20 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6449
6494
|
content: notFoundContent,
|
|
6450
6495
|
siteUrl: rootUrl
|
|
6451
6496
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6452
|
-
className:
|
|
6497
|
+
className: 'ds-l-container',
|
|
6453
6498
|
children: [
|
|
6454
6499
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6455
|
-
className:
|
|
6500
|
+
className: 'ds-l-row',
|
|
6456
6501
|
children: [
|
|
6457
6502
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6458
|
-
className:
|
|
6503
|
+
className: 'ds-l-md-col--9',
|
|
6459
6504
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
6460
6505
|
className: "ds-text-heading--3xl",
|
|
6461
6506
|
children: title
|
|
6462
6507
|
})
|
|
6463
6508
|
}),
|
|
6464
6509
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6465
|
-
className:
|
|
6510
|
+
className: 'ds-l-md-col--12 ds-u-margin-y--2',
|
|
6466
6511
|
children: showDateDetails ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $20de4fedf33d4f9a$export$2e2bcd8739ae039), {
|
|
6467
6512
|
date: date,
|
|
6468
6513
|
modifiedBoldLabel: true,
|
|
@@ -6478,7 +6523,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6478
6523
|
})
|
|
6479
6524
|
}),
|
|
6480
6525
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6481
|
-
className:
|
|
6526
|
+
className: 'ds-l-md-col--9',
|
|
6482
6527
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
6483
6528
|
distribution: distribution,
|
|
6484
6529
|
dataset: dataset,
|
|
@@ -6490,9 +6535,9 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6490
6535
|
]
|
|
6491
6536
|
}),
|
|
6492
6537
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6493
|
-
className:
|
|
6538
|
+
className: 'ds-l-row',
|
|
6494
6539
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6495
|
-
className:
|
|
6540
|
+
className: 'ds-l-md-col--12 dc-dataset',
|
|
6496
6541
|
children: !isPending && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tabs), {
|
|
6497
6542
|
onChange: (selectedId, prevSelectedId)=>{
|
|
6498
6543
|
setSelectedTab(selectedId);
|
|
@@ -6500,7 +6545,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6500
6545
|
selectedId: selectedTab,
|
|
6501
6546
|
children: [
|
|
6502
6547
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6503
|
-
id:
|
|
6548
|
+
id: 'data-table',
|
|
6504
6549
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6505
6550
|
className: "ds-u-color--primary",
|
|
6506
6551
|
children: [
|
|
@@ -6511,7 +6556,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6511
6556
|
]
|
|
6512
6557
|
}),
|
|
6513
6558
|
tabHref: `${tabHrefPrepend}${tabHref}#data-table`,
|
|
6514
|
-
className: borderlessTabs ?
|
|
6559
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6515
6560
|
children: (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
6516
6561
|
value: {
|
|
6517
6562
|
id: id,
|
|
@@ -6528,7 +6573,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6528
6573
|
})
|
|
6529
6574
|
}),
|
|
6530
6575
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6531
|
-
id:
|
|
6576
|
+
id: 'overview',
|
|
6532
6577
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6533
6578
|
className: "ds-u-color--primary",
|
|
6534
6579
|
children: [
|
|
@@ -6539,7 +6584,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6539
6584
|
]
|
|
6540
6585
|
}),
|
|
6541
6586
|
tabHref: `${tabHrefPrepend}${tabHref}#overview`,
|
|
6542
|
-
className: borderlessTabs ?
|
|
6587
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6543
6588
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
|
|
6544
6589
|
resource: resource,
|
|
6545
6590
|
dataset: dataset,
|
|
@@ -6549,7 +6594,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6549
6594
|
})
|
|
6550
6595
|
}),
|
|
6551
6596
|
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6552
|
-
id:
|
|
6597
|
+
id: 'data-dictionary',
|
|
6553
6598
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6554
6599
|
className: "ds-u-color--primary",
|
|
6555
6600
|
children: [
|
|
@@ -6560,10 +6605,11 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6560
6605
|
]
|
|
6561
6606
|
}),
|
|
6562
6607
|
tabHref: `${tabHrefPrepend}${tabHref}#data-dictionary`,
|
|
6563
|
-
className: borderlessTabs ?
|
|
6608
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6564
6609
|
children: displayDataDictionaryTab ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
6565
6610
|
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
6566
6611
|
datasetDictionaryEndpoint: distribution.data.describedBy,
|
|
6612
|
+
datasetDictionaryFileType: distribution.data.describedByType,
|
|
6567
6613
|
title: "Data Dictionary",
|
|
6568
6614
|
csvDownload: dataDictionaryCSV
|
|
6569
6615
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
@@ -6571,7 +6617,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6571
6617
|
})
|
|
6572
6618
|
}),
|
|
6573
6619
|
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6574
|
-
id:
|
|
6620
|
+
id: 'api',
|
|
6575
6621
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6576
6622
|
className: "ds-u-color--primary",
|
|
6577
6623
|
children: [
|
|
@@ -6582,7 +6628,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6582
6628
|
]
|
|
6583
6629
|
}),
|
|
6584
6630
|
tabHref: `${tabHrefPrepend}${tabHref}#api`,
|
|
6585
|
-
className: borderlessTabs ?
|
|
6631
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6586
6632
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
|
|
6587
6633
|
id: id,
|
|
6588
6634
|
rootUrl: rootUrl,
|
|
@@ -6619,13 +6665,13 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6619
6665
|
});
|
|
6620
6666
|
const menu = (0, $hgUW1$useRef)(null);
|
|
6621
6667
|
function closeMobileMenu() {
|
|
6622
|
-
const mobileMenuButtonElement = document.querySelector(
|
|
6668
|
+
const mobileMenuButtonElement = document.querySelector('.dkan-c-mobile-menu-button');
|
|
6623
6669
|
if (!mobileMenuButtonElement) return;
|
|
6624
6670
|
mobileMenuButtonElement.focus();
|
|
6625
6671
|
}
|
|
6626
6672
|
// Close mobile menu with escape.
|
|
6627
6673
|
function handleMenuClose(event) {
|
|
6628
|
-
if (event.key ===
|
|
6674
|
+
if (event.key === 'Escape' && mobileMenuOpen) setMobileMenuOpen(false);
|
|
6629
6675
|
}
|
|
6630
6676
|
function handleClick(event) {
|
|
6631
6677
|
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
@@ -6660,7 +6706,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6660
6706
|
const focusableEls = getFocusableElements(menu.current).selectors.visible;
|
|
6661
6707
|
const firstEl = focusableEls[0];
|
|
6662
6708
|
const lastEl = focusableEls[focusableEls.length - 1];
|
|
6663
|
-
if (event.key ===
|
|
6709
|
+
if (event.key === 'Tab') {
|
|
6664
6710
|
if (event.shiftKey && document.activeElement === firstEl) {
|
|
6665
6711
|
lastEl?.focus();
|
|
6666
6712
|
event.preventDefault();
|
|
@@ -6672,15 +6718,15 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6672
6718
|
}
|
|
6673
6719
|
};
|
|
6674
6720
|
(0, $hgUW1$useEffect)(()=>{
|
|
6675
|
-
document.addEventListener(
|
|
6676
|
-
document.addEventListener(
|
|
6721
|
+
document.addEventListener('keyup', handleMenuClose);
|
|
6722
|
+
document.addEventListener('mousedown', handleClick);
|
|
6677
6723
|
if (mobileMenuOpen) handleFocusIn();
|
|
6678
6724
|
else closeMobileMenu();
|
|
6679
|
-
if (menu.current) menu.current.addEventListener(
|
|
6725
|
+
if (menu.current) menu.current.addEventListener('keydown', (evt)=>trapFocus(evt));
|
|
6680
6726
|
return ()=>{
|
|
6681
|
-
document.removeEventListener(
|
|
6682
|
-
document.addEventListener(
|
|
6683
|
-
if (menu.current) menu.current.removeEventListener(
|
|
6727
|
+
document.removeEventListener('keyup', handleMenuClose);
|
|
6728
|
+
document.addEventListener('mousedown', handleClick);
|
|
6729
|
+
if (menu.current) menu.current.removeEventListener('keydown', trapFocus);
|
|
6684
6730
|
};
|
|
6685
6731
|
}, [
|
|
6686
6732
|
mobileMenuOpen
|
|
@@ -6695,7 +6741,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6695
6741
|
},
|
|
6696
6742
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
|
|
6697
6743
|
"aria-label": "Site header",
|
|
6698
|
-
className: `dkan-c-header dkan-c-header--${mobileMax ?
|
|
6744
|
+
className: `dkan-c-header dkan-c-header--${mobileMax ? 'mobile' : 'desktop'}`,
|
|
6699
6745
|
children: [
|
|
6700
6746
|
topNav && topNav,
|
|
6701
6747
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6734,7 +6780,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6734
6780
|
onClick: clickHandler ? clickHandler : undefined,
|
|
6735
6781
|
children: [
|
|
6736
6782
|
innerHtml,
|
|
6737
|
-
link?.target ===
|
|
6783
|
+
link?.target === '_blank' && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ExternalLinkIcon), {
|
|
6738
6784
|
className: "ds-u-margin-left--05 ds-c-external-link-icon"
|
|
6739
6785
|
})
|
|
6740
6786
|
]
|
|
@@ -6744,7 +6790,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6744
6790
|
var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
|
|
6745
6791
|
|
|
6746
6792
|
|
|
6747
|
-
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle =
|
|
6793
|
+
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", {
|
|
6748
6794
|
children: [
|
|
6749
6795
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6750
6796
|
children: "A federal government website managed and paid for by the U.S. Centers for Medicare & Medicaid Services."
|
|
@@ -6832,14 +6878,14 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6832
6878
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
6833
6879
|
className: "ds-u-font-size--sm",
|
|
6834
6880
|
children: footerAdditionalResourcesLinks.filter((link)=>{
|
|
6835
|
-
const noOnClick = Object.keys(link).findIndex((l)=>l ===
|
|
6881
|
+
const noOnClick = Object.keys(link).findIndex((l)=>l === 'onClick');
|
|
6836
6882
|
if (noOnClick === -1 || link.onClick && link.dataTag) return link;
|
|
6837
6883
|
}).map((link)=>{
|
|
6838
6884
|
if (link.onClick && link.dataTag) return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
6839
6885
|
className: "ds-u-margin-bottom--1",
|
|
6840
6886
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
6841
6887
|
href: link.url,
|
|
6842
|
-
[
|
|
6888
|
+
['data-' + link.dataTag.name]: link.dataTag.value,
|
|
6843
6889
|
onClick: link.onClick,
|
|
6844
6890
|
children: link.label
|
|
6845
6891
|
})
|
|
@@ -6939,7 +6985,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6939
6985
|
children: [
|
|
6940
6986
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6941
6987
|
id: "svg-inline--fa-title-iRCARP7h6Kp3",
|
|
6942
|
-
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title :
|
|
6988
|
+
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title : 'CMS Facebook'
|
|
6943
6989
|
}),
|
|
6944
6990
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6945
6991
|
transform: "translate(160 256)",
|
|
@@ -6992,7 +7038,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6992
7038
|
children: [
|
|
6993
7039
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6994
7040
|
id: "svg-inline--fa-title-4z03ITiPPTVF",
|
|
6995
|
-
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title :
|
|
7041
|
+
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title : 'CMS Twitter'
|
|
6996
7042
|
}),
|
|
6997
7043
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6998
7044
|
transform: "translate(256 256)",
|
|
@@ -7045,7 +7091,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7045
7091
|
children: [
|
|
7046
7092
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7047
7093
|
id: "svg-inline--fa-title-Nm2qsuSKvuRZ",
|
|
7048
|
-
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title :
|
|
7094
|
+
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title : 'CMS LinkedIn'
|
|
7049
7095
|
}),
|
|
7050
7096
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
7051
7097
|
transform: "translate(224 256)",
|
|
@@ -7097,7 +7143,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7097
7143
|
children: [
|
|
7098
7144
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7099
7145
|
id: "svg-inline--fa-title-youtube",
|
|
7100
|
-
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title :
|
|
7146
|
+
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title : 'CMS youtube'
|
|
7101
7147
|
}),
|
|
7102
7148
|
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
7103
7149
|
fill: "currentColor",
|
|
@@ -7132,7 +7178,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7132
7178
|
className: "ds-u-margin-right--2",
|
|
7133
7179
|
children: [
|
|
7134
7180
|
link.label,
|
|
7135
|
-
link?.target ===
|
|
7181
|
+
link?.target === '_blank' && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ExternalLinkIcon), {
|
|
7136
7182
|
className: "ds-u-margin-left--05 ds-c-external-link-icon"
|
|
7137
7183
|
})
|
|
7138
7184
|
]
|
|
@@ -7202,26 +7248,26 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7202
7248
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
7203
7249
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
7204
7250
|
stackable: true,
|
|
7205
|
-
className:
|
|
7251
|
+
className: 'ds-c-table',
|
|
7206
7252
|
children: [
|
|
7207
7253
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
|
|
7208
7254
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
7209
7255
|
children: [
|
|
7210
7256
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7211
|
-
id:
|
|
7212
|
-
headers:
|
|
7257
|
+
id: 'application',
|
|
7258
|
+
headers: 'Application',
|
|
7213
7259
|
children: "Application"
|
|
7214
|
-
},
|
|
7260
|
+
}, 'Application'),
|
|
7215
7261
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7216
|
-
id:
|
|
7217
|
-
headers:
|
|
7262
|
+
id: 'notes',
|
|
7263
|
+
headers: 'Notes',
|
|
7218
7264
|
children: "Notes"
|
|
7219
|
-
},
|
|
7265
|
+
}, 'Notes'),
|
|
7220
7266
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7221
|
-
id:
|
|
7222
|
-
headers:
|
|
7267
|
+
id: 'links',
|
|
7268
|
+
headers: 'Links',
|
|
7223
7269
|
children: "Links"
|
|
7224
|
-
},
|
|
7270
|
+
}, 'Links')
|
|
7225
7271
|
]
|
|
7226
7272
|
})
|
|
7227
7273
|
}),
|
|
@@ -7231,19 +7277,19 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7231
7277
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7232
7278
|
id: d.id,
|
|
7233
7279
|
stackedTitle: "Application",
|
|
7234
|
-
headers:
|
|
7280
|
+
headers: 'Application',
|
|
7235
7281
|
children: d.application
|
|
7236
7282
|
}, d.id),
|
|
7237
7283
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7238
7284
|
id: d.id,
|
|
7239
7285
|
stackedTitle: "Notes",
|
|
7240
|
-
headers:
|
|
7286
|
+
headers: 'Notes',
|
|
7241
7287
|
children: d.notes
|
|
7242
7288
|
}, `${d.id}-notes`),
|
|
7243
7289
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7244
7290
|
id: d.id,
|
|
7245
7291
|
stackedTitle: "Links",
|
|
7246
|
-
headers:
|
|
7292
|
+
headers: 'Links',
|
|
7247
7293
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
7248
7294
|
className: "dkan-newtab",
|
|
7249
7295
|
href: d.link,
|
|
@@ -7271,44 +7317,44 @@ var $5655284dbbb89508$export$2e2bcd8739ae039 = $5655284dbbb89508$var$Documentati
|
|
|
7271
7317
|
|
|
7272
7318
|
const $c7bf75f7e8a68780$export$7850f4d545d994c6 = [
|
|
7273
7319
|
{
|
|
7274
|
-
id:
|
|
7275
|
-
application:
|
|
7276
|
-
notes:
|
|
7277
|
-
link:
|
|
7278
|
-
linkText:
|
|
7279
|
-
screenReaderOnlyText:
|
|
7320
|
+
id: 'excel',
|
|
7321
|
+
application: 'Microsoft Excel',
|
|
7322
|
+
notes: 'Official size limitations for Microsoft Excel',
|
|
7323
|
+
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',
|
|
7324
|
+
linkText: 'Excel Specifications and Limits',
|
|
7325
|
+
screenReaderOnlyText: 'on microsoft.com'
|
|
7280
7326
|
},
|
|
7281
7327
|
{
|
|
7282
|
-
id:
|
|
7283
|
-
application:
|
|
7284
|
-
notes:
|
|
7285
|
-
link:
|
|
7286
|
-
linkText:
|
|
7287
|
-
screenReaderOnlyText:
|
|
7328
|
+
id: 'access',
|
|
7329
|
+
application: 'Microsoft Access',
|
|
7330
|
+
notes: 'Official size limitations for Microsoft Access',
|
|
7331
|
+
link: 'https://support.microsoft.com/en-us/office/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c?ui=en-us&rs=en-us&ad=us',
|
|
7332
|
+
linkText: 'Access 2016 Specifications',
|
|
7333
|
+
screenReaderOnlyText: 'on microsoft.com'
|
|
7288
7334
|
},
|
|
7289
7335
|
{
|
|
7290
|
-
id:
|
|
7291
|
-
application:
|
|
7292
|
-
notes:
|
|
7293
|
-
link:
|
|
7294
|
-
linkText:
|
|
7295
|
-
screenReaderOnlyText:
|
|
7336
|
+
id: 'oracle-sql-developer',
|
|
7337
|
+
application: 'Oracle SQL Developer',
|
|
7338
|
+
notes: 'Oracle SQL Developer tool',
|
|
7339
|
+
link: 'https://www.oracle.com/database/sqldeveloper/',
|
|
7340
|
+
linkText: 'Oracle SQL Developer Overview',
|
|
7341
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
7296
7342
|
},
|
|
7297
7343
|
{
|
|
7298
|
-
id:
|
|
7299
|
-
application:
|
|
7300
|
-
notes:
|
|
7301
|
-
link:
|
|
7302
|
-
linkText:
|
|
7303
|
-
screenReaderOnlyText:
|
|
7344
|
+
id: 'oracle-database',
|
|
7345
|
+
application: 'Oracle Database',
|
|
7346
|
+
notes: 'Oracle Database official size limitations',
|
|
7347
|
+
link: 'https://docs.oracle.com/cd/B28359_01/server.111/b28320/limits002.htm#i287915',
|
|
7348
|
+
linkText: 'Oracle Physical Database Limits',
|
|
7349
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
7304
7350
|
},
|
|
7305
7351
|
{
|
|
7306
|
-
id:
|
|
7307
|
-
application:
|
|
7308
|
-
notes:
|
|
7309
|
-
link:
|
|
7310
|
-
linkText:
|
|
7311
|
-
screenReaderOnlyText:
|
|
7352
|
+
id: 'oracle-sql-client-tools',
|
|
7353
|
+
application: 'Oracle SQL Client Tools',
|
|
7354
|
+
notes: 'Oracle SQL Client Tools',
|
|
7355
|
+
link: 'https://www.oracle.com/database/technologies/oracle-database-software-downloads.html',
|
|
7356
|
+
linkText: 'Oracle SQL Client',
|
|
7357
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
7312
7358
|
}
|
|
7313
7359
|
];
|
|
7314
7360
|
|
|
@@ -7336,7 +7382,7 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7336
7382
|
}),
|
|
7337
7383
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
7338
7384
|
heading: "Notice",
|
|
7339
|
-
className:
|
|
7385
|
+
className: 'ds-u-margin-top--6',
|
|
7340
7386
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
7341
7387
|
className: "ds-c-alert__text",
|
|
7342
7388
|
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."
|
|
@@ -7345,16 +7391,16 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7345
7391
|
]
|
|
7346
7392
|
}),
|
|
7347
7393
|
/*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7348
|
-
className:
|
|
7394
|
+
className: 'ds-u-margin-top--4 ds-l-row',
|
|
7349
7395
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7350
|
-
className:
|
|
7396
|
+
className: 'ds-l-col--12',
|
|
7351
7397
|
children: [
|
|
7352
7398
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
7353
7399
|
className: "ds-text-heading--2xl ds-text-heading--2xl",
|
|
7354
7400
|
children: "Documentation by Application"
|
|
7355
7401
|
}),
|
|
7356
7402
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7357
|
-
className:
|
|
7403
|
+
className: 'ds-u-margin-top--4',
|
|
7358
7404
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5655284dbbb89508$export$2e2bcd8739ae039), {
|
|
7359
7405
|
data: documentationList
|
|
7360
7406
|
})
|
|
@@ -7382,7 +7428,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7382
7428
|
const options = {
|
|
7383
7429
|
conditions: query ? JSON.parse(query).map(({ column: column, operator: operator, ...rest })=>({
|
|
7384
7430
|
property: column,
|
|
7385
|
-
operator: operator ===
|
|
7431
|
+
operator: operator === 'is' ? '=' : operator === 'is not' ? '<>' : operator === 'or' ? 'in' : operator,
|
|
7386
7432
|
...rest
|
|
7387
7433
|
})) : []
|
|
7388
7434
|
};
|
|
@@ -7390,13 +7436,13 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7390
7436
|
let distribution = {};
|
|
7391
7437
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
7392
7438
|
if (distributions.length) distribution = distributions[distributionIndex];
|
|
7393
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7439
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
7394
7440
|
...options,
|
|
7395
7441
|
limit: defaultPageSize
|
|
7396
7442
|
});
|
|
7397
7443
|
(0, $hgUW1$useEffect)(()=>{
|
|
7398
7444
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
7399
|
-
if (localFileFormat ===
|
|
7445
|
+
if (localFileFormat === 'csv') resource.setResource(distribution.identifier);
|
|
7400
7446
|
}, [
|
|
7401
7447
|
distribution
|
|
7402
7448
|
]);
|
|
@@ -7446,7 +7492,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7446
7492
|
|
|
7447
7493
|
|
|
7448
7494
|
function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
|
|
7449
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7495
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
7450
7496
|
const newDate = new Date(condition.value);
|
|
7451
7497
|
if (newDate instanceof Date && !isNaN(newDate)) return newDate;
|
|
7452
7498
|
}
|
|
@@ -7463,9 +7509,9 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7463
7509
|
const [startDate, setStartDate] = (0, $hgUW1$react).useState($374c4669b044ddf8$var$getStartDate(condition, schema, id));
|
|
7464
7510
|
(0, $hgUW1$useEffect)(()=>{
|
|
7465
7511
|
if (property !== condition.property) {
|
|
7466
|
-
if (property) update(index,
|
|
7467
|
-
else update(index,
|
|
7468
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7512
|
+
if (property) update(index, 'property', property);
|
|
7513
|
+
else update(index, 'property', '');
|
|
7514
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
7469
7515
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
7470
7516
|
}
|
|
7471
7517
|
}
|
|
@@ -7479,16 +7525,16 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7479
7525
|
]);
|
|
7480
7526
|
(0, $hgUW1$useEffect)(()=>{
|
|
7481
7527
|
if (operator !== condition.operator) {
|
|
7482
|
-
if (operator) update(index,
|
|
7483
|
-
else update(index,
|
|
7528
|
+
if (operator) update(index, 'operator', operator);
|
|
7529
|
+
else update(index, 'operator', '');
|
|
7484
7530
|
}
|
|
7485
7531
|
}, [
|
|
7486
7532
|
operator
|
|
7487
7533
|
]);
|
|
7488
7534
|
(0, $hgUW1$useEffect)(()=>{
|
|
7489
7535
|
if (value !== condition.value) {
|
|
7490
|
-
if (value) update(index,
|
|
7491
|
-
else update(index,
|
|
7536
|
+
if (value) update(index, 'value', value);
|
|
7537
|
+
else update(index, 'value', '');
|
|
7492
7538
|
}
|
|
7493
7539
|
}, [
|
|
7494
7540
|
value
|
|
@@ -7512,7 +7558,7 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7512
7558
|
onChange: (e)=>setOperator(e.target.value),
|
|
7513
7559
|
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"
|
|
7514
7560
|
}),
|
|
7515
|
-
schema[id].fields[property].mysql_type ===
|
|
7561
|
+
schema[id].fields[property].mysql_type === 'date' ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7516
7562
|
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",
|
|
7517
7563
|
children: [
|
|
7518
7564
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
@@ -7602,12 +7648,12 @@ const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions, schema: sche
|
|
|
7602
7648
|
className: "ds-u-font-weight--bold",
|
|
7603
7649
|
children: description
|
|
7604
7650
|
}),
|
|
7605
|
-
|
|
7651
|
+
' ',
|
|
7606
7652
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7607
7653
|
className: "ds-u-font-weight--normal",
|
|
7608
7654
|
children: operator.label.toUpperCase()
|
|
7609
7655
|
}),
|
|
7610
|
-
|
|
7656
|
+
' ',
|
|
7611
7657
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7612
7658
|
className: "ds-u-color--success",
|
|
7613
7659
|
children: formattedText
|
|
@@ -7634,19 +7680,19 @@ var $bef7bff2823feea2$export$2e2bcd8739ae039 = $bef7bff2823feea2$var$QueryTitle;
|
|
|
7634
7680
|
function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
|
|
7635
7681
|
let cond = condition;
|
|
7636
7682
|
delete cond.key;
|
|
7637
|
-
if (cond.operator ===
|
|
7683
|
+
if (cond.operator === '=' || cond.operator === '<>') {
|
|
7638
7684
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7639
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7685
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
7640
7686
|
}
|
|
7641
|
-
if (cond.operator.toLowerCase() ===
|
|
7687
|
+
if (cond.operator.toLowerCase() === 'like') {
|
|
7642
7688
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7643
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7689
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
7644
7690
|
cond.value = `%${cleanedValue}%`;
|
|
7645
7691
|
}
|
|
7646
|
-
if (cond.operator.toLowerCase() ===
|
|
7647
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
7692
|
+
if (cond.operator.toLowerCase() === 'in') {
|
|
7693
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(',');
|
|
7648
7694
|
}
|
|
7649
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
7695
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ''));
|
|
7650
7696
|
return cond;
|
|
7651
7697
|
}
|
|
7652
7698
|
const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, setOffset: setOffset })=>{
|
|
@@ -7666,7 +7712,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7666
7712
|
...queryConditions,
|
|
7667
7713
|
{
|
|
7668
7714
|
property: fields[0],
|
|
7669
|
-
value:
|
|
7715
|
+
value: '',
|
|
7670
7716
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
7671
7717
|
key: Date.now()
|
|
7672
7718
|
}
|
|
@@ -7706,7 +7752,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7706
7752
|
encodeValuesOnly: true,
|
|
7707
7753
|
addQueryPrefix: true
|
|
7708
7754
|
});
|
|
7709
|
-
window.history.pushState({},
|
|
7755
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
7710
7756
|
};
|
|
7711
7757
|
const updateCondition = (index, key, value)=>{
|
|
7712
7758
|
let newConditions = [
|
|
@@ -7779,7 +7825,7 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
|
|
|
7779
7825
|
|
|
7780
7826
|
|
|
7781
7827
|
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 })=>{
|
|
7782
|
-
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState(
|
|
7828
|
+
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState('ds-u-padding-y--1');
|
|
7783
7829
|
let apiDocs = (0, $hgUW1$useRef)();
|
|
7784
7830
|
let distribution = {};
|
|
7785
7831
|
let distribution_array = dataset.distribution ? dataset.distribution : [];
|
|
@@ -7791,7 +7837,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7791
7837
|
} : {
|
|
7792
7838
|
conditions: []
|
|
7793
7839
|
};
|
|
7794
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7840
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
7795
7841
|
...options,
|
|
7796
7842
|
limit: 25
|
|
7797
7843
|
});
|
|
@@ -7805,7 +7851,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7805
7851
|
}, {
|
|
7806
7852
|
encode: true
|
|
7807
7853
|
})}&format=csv`;
|
|
7808
|
-
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !==
|
|
7854
|
+
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !== 'csv' ? distribution.data.title : dataset.title;
|
|
7809
7855
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
7810
7856
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7811
7857
|
className: "ds-l-container ds-u-padding-bottom--3 ds-u-margin-bottom--2",
|
|
@@ -7814,7 +7860,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7814
7860
|
children: Object.keys(distribution).length && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
7815
7861
|
children: [
|
|
7816
7862
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7817
|
-
className:
|
|
7863
|
+
className: 'ds-l-md-col--9',
|
|
7818
7864
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
7819
7865
|
to: `/dataset/${id}`,
|
|
7820
7866
|
className: "ds-u-padding-y--4 ds-u-display--block",
|
|
@@ -7825,14 +7871,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7825
7871
|
})
|
|
7826
7872
|
}),
|
|
7827
7873
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7828
|
-
className:
|
|
7874
|
+
className: 'ds-l-md-col--9',
|
|
7829
7875
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
7830
7876
|
className: "ds-text-heading--3xl",
|
|
7831
7877
|
children: customTitle ? customTitle : pageTitle
|
|
7832
7878
|
})
|
|
7833
7879
|
}),
|
|
7834
7880
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7835
|
-
className:
|
|
7881
|
+
className: 'ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right',
|
|
7836
7882
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
7837
7883
|
className: "ds-u-margin--0",
|
|
7838
7884
|
children: [
|
|
@@ -7844,7 +7890,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7844
7890
|
})
|
|
7845
7891
|
}),
|
|
7846
7892
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7847
|
-
className:
|
|
7893
|
+
className: 'ds-l-md-col--9',
|
|
7848
7894
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
7849
7895
|
distribution: distribution,
|
|
7850
7896
|
dataset: dataset,
|
|
@@ -7854,13 +7900,13 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7854
7900
|
})
|
|
7855
7901
|
}),
|
|
7856
7902
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7857
|
-
className:
|
|
7903
|
+
className: 'ds-l-md-col--12',
|
|
7858
7904
|
children: Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
|
|
7859
7905
|
resource: resource,
|
|
7860
7906
|
id: distribution.identifier,
|
|
7861
7907
|
customColumns: customColumns,
|
|
7862
7908
|
setOffset: resource.setOffset
|
|
7863
|
-
}) :
|
|
7909
|
+
}) : ''
|
|
7864
7910
|
}),
|
|
7865
7911
|
Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
7866
7912
|
value: {
|
|
@@ -7871,7 +7917,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7871
7917
|
customColumns: (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution_array[distIndex].identifier])
|
|
7872
7918
|
},
|
|
7873
7919
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7874
|
-
className:
|
|
7920
|
+
className: 'ds-l-md-col--12',
|
|
7875
7921
|
children: [
|
|
7876
7922
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $af099c546cb226c7$export$2e2bcd8739ae039), {
|
|
7877
7923
|
includeDensity: true,
|
|
@@ -7893,14 +7939,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7893
7939
|
]
|
|
7894
7940
|
})
|
|
7895
7941
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7896
|
-
className:
|
|
7942
|
+
className: 'ds-l-md-col--12',
|
|
7897
7943
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
7898
7944
|
role: "status",
|
|
7899
7945
|
"aria-valuetext": "Resource loading"
|
|
7900
7946
|
})
|
|
7901
7947
|
}),
|
|
7902
7948
|
dataset.identifier && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7903
|
-
className:
|
|
7949
|
+
className: 'ds-l-md-col--12',
|
|
7904
7950
|
ref: apiDocs,
|
|
7905
7951
|
children: [
|
|
7906
7952
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
@@ -7909,7 +7955,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7909
7955
|
}),
|
|
7910
7956
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
7911
7957
|
url: `${rootUrl}/metastore/schemas/dataset/items/${dataset.identifier}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`,
|
|
7912
|
-
docExpansion:
|
|
7958
|
+
docExpansion: 'list',
|
|
7913
7959
|
defaultModelsExpandDepth: -1
|
|
7914
7960
|
})
|
|
7915
7961
|
]
|
|
@@ -7928,7 +7974,7 @@ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, loca
|
|
|
7928
7974
|
const [ready, setReady] = (0, $hgUW1$useState)(false);
|
|
7929
7975
|
const [error, setError] = (0, $hgUW1$useState)(false);
|
|
7930
7976
|
const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
7931
|
-
const distIndex = dist_id ===
|
|
7977
|
+
const distIndex = dist_id === 'data' ? 0 : dist_id;
|
|
7932
7978
|
(0, $hgUW1$useEffect)(()=>{
|
|
7933
7979
|
if (dataset.error) setError(true);
|
|
7934
7980
|
if (dataset.distribution && dataset.distribution.length) {
|