@civicactions/cmsds-open-data-components 4.0.12 → 4.0.13-alpha.1
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 +8 -2
- package/dist/main.css.map +1 -1
- package/dist/main.js +579 -562
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +45 -44
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -41,7 +41,7 @@ function $e49d4387bed21287$export$2e2bcd8739ae039() {
|
|
|
41
41
|
/*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
|
|
42
42
|
children: "offset"
|
|
43
43
|
}),
|
|
44
|
-
|
|
44
|
+
' ',
|
|
45
45
|
"parameters to iterate through result sets that are larger than the row limit when running queries against the datastore API."
|
|
46
46
|
]
|
|
47
47
|
})
|
|
@@ -72,7 +72,7 @@ var $3c72c298c3a7f21f$export$2e2bcd8739ae039 = $3c72c298c3a7f21f$var$HeaderTagli
|
|
|
72
72
|
const $1555e1cb3eb7b3e3$var$HeaderNavIconLink = (props)=>{
|
|
73
73
|
const { url: url, urlTitle: urlTitle, logoFilePath: logoFilePath, logoAltText: logoAltText, backArrow: backArrow } = props;
|
|
74
74
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
75
|
-
className: `dkan-c-header-nav-icon-link ${backArrow ?
|
|
75
|
+
className: `dkan-c-header-nav-icon-link ${backArrow ? 'show-back-arrow' : ''} ds-u-valign--middle `,
|
|
76
76
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
77
77
|
href: url,
|
|
78
78
|
title: urlTitle,
|
|
@@ -232,7 +232,7 @@ const $046ded0064bd0a3d$var$FAQAccordion = (props)=>{
|
|
|
232
232
|
type: "button",
|
|
233
233
|
variation: "ghost",
|
|
234
234
|
onClick: ()=>toggleAll(),
|
|
235
|
-
children: `${expanded ?
|
|
235
|
+
children: `${expanded ? 'Collapse' : 'Expand'} all FAQs`
|
|
236
236
|
}),
|
|
237
237
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
|
|
238
238
|
children: faqItems.map((faq)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
@@ -333,8 +333,8 @@ const $844981eac9b63865$export$eccc29c8d0ff408 = (0, $hgUW1$createContext)({
|
|
|
333
333
|
|
|
334
334
|
|
|
335
335
|
const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 4, defaultSort: defaultSort = {
|
|
336
|
-
defaultSort:
|
|
337
|
-
defaultOrder:
|
|
336
|
+
defaultSort: 'modified',
|
|
337
|
+
defaultOrder: 'desc'
|
|
338
338
|
}, subLinkClasses: subLinkClasses })=>{
|
|
339
339
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
340
340
|
const [currentResultNumbers, setCurrentResultNumbers] = (0, $hgUW1$useState)({
|
|
@@ -354,8 +354,8 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
|
|
|
354
354
|
]);
|
|
355
355
|
let params = {
|
|
356
356
|
sort: defaultSort.defaultSort,
|
|
357
|
-
[
|
|
358
|
-
[
|
|
357
|
+
['sort-order']: defaultSort.defaultOrder,
|
|
358
|
+
['page-size']: defaultPageSize
|
|
359
359
|
};
|
|
360
360
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
361
361
|
queryKey: [
|
|
@@ -364,7 +364,7 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
|
|
|
364
364
|
],
|
|
365
365
|
queryFn: ()=>{
|
|
366
366
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
367
|
-
arrayFormat:
|
|
367
|
+
arrayFormat: 'comma',
|
|
368
368
|
encode: false
|
|
369
369
|
})}`);
|
|
370
370
|
}
|
|
@@ -507,11 +507,11 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
507
507
|
function handleFocusOut(event) {
|
|
508
508
|
if (currentMenu && !currentMenu.contains(event.relatedTarget)) setIsExpanded(false);
|
|
509
509
|
}
|
|
510
|
-
document.addEventListener(
|
|
511
|
-
currentMenu?.addEventListener(
|
|
510
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
511
|
+
currentMenu?.addEventListener('focusout', handleFocusOut);
|
|
512
512
|
return ()=>{
|
|
513
|
-
document.removeEventListener(
|
|
514
|
-
if (currentMenu) currentMenu.removeEventListener(
|
|
513
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
514
|
+
if (currentMenu) currentMenu.removeEventListener('focusout', handleFocusOut);
|
|
515
515
|
};
|
|
516
516
|
}, [
|
|
517
517
|
isExpanded
|
|
@@ -533,7 +533,7 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
536
|
-
className: `dkan-c-nav-submenu has-submenu${isExpanded ?
|
|
536
|
+
className: `dkan-c-nav-submenu has-submenu${isExpanded ? ' open' : ''}`,
|
|
537
537
|
ref: menu,
|
|
538
538
|
children: [
|
|
539
539
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
@@ -569,12 +569,12 @@ var $4f153ca537d853e5$export$2e2bcd8739ae039 = $4f153ca537d853e5$var$SubMenu;
|
|
|
569
569
|
const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
|
|
570
570
|
const { headingText: headingText = "Dataset Search" } = props;
|
|
571
571
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
572
|
-
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)(
|
|
572
|
+
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)('');
|
|
573
573
|
const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
|
|
574
574
|
function searchForDataset(e) {
|
|
575
575
|
e.preventDefault();
|
|
576
576
|
if (window) {
|
|
577
|
-
if (window.location.pathname !==
|
|
577
|
+
if (window.location.pathname !== '/datasets') navigate(`/datasets?fulltext=${modalSearchTerm}`);
|
|
578
578
|
else {
|
|
579
579
|
window.location.search = `fulltext=${modalSearchTerm}`;
|
|
580
580
|
setModalSearch(false);
|
|
@@ -642,9 +642,9 @@ const $b939b31651e82908$var$HeaderNav = (props)=>{
|
|
|
642
642
|
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
643
643
|
const { links: links, topNavLinks: topNavLinks, wrapperClasses: wrapperClasses, searchInMobile: searchInMobile } = props;
|
|
644
644
|
const navMenuOpenClass = `dkan-c-nav-menu--${headerContext.mobileMenuOpen ? "open" : "close"}`;
|
|
645
|
-
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ?
|
|
646
|
-
const linkClasses =
|
|
647
|
-
const listClasses =
|
|
645
|
+
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ? 'mobile' : 'desktop'}`;
|
|
646
|
+
const linkClasses = 'dkan-c-header--link ds-c-button ds-c-button--ghost';
|
|
647
|
+
const listClasses = 'dkan-c-header--link-list ';
|
|
648
648
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
649
649
|
className: `dkan-c-nav-menu ${wrapperClasses} ${navMenuOpenClass} ${isMobileClass}`,
|
|
650
650
|
ref: headerContext.menuRef,
|
|
@@ -814,8 +814,8 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
814
814
|
const { title: title, links: links, mobileMax: mobileMax } = props;
|
|
815
815
|
const active = (0, $hgUW1$useLocation)().pathname;
|
|
816
816
|
const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
|
|
817
|
-
const styleClasses =
|
|
818
|
-
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ?
|
|
817
|
+
const styleClasses = 'dkan-c--sidebar-nav-wrapper ds-u-border--1 ds-u-border--color-gray-lightest ds-u-padding--2';
|
|
818
|
+
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ? 'mobile' : 'desktop'}`;
|
|
819
819
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
820
820
|
className: `dkan-c-sidebar-nav ${mobileClass}`,
|
|
821
821
|
children: [
|
|
@@ -829,7 +829,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
829
829
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
830
830
|
"aria-haspopup": "true",
|
|
831
831
|
variation: "ghost",
|
|
832
|
-
"aria-expanded": `${menuOpen ?
|
|
832
|
+
"aria-expanded": `${menuOpen ? 'true' : 'false'}`,
|
|
833
833
|
onDark: true,
|
|
834
834
|
onClick: ()=>setMenuOpen(!menuOpen),
|
|
835
835
|
children: [
|
|
@@ -838,7 +838,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
838
838
|
children: "Toggle menu"
|
|
839
839
|
}),
|
|
840
840
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
|
|
841
|
-
direction: menuOpen ?
|
|
841
|
+
direction: menuOpen ? 'up' : 'down'
|
|
842
842
|
})
|
|
843
843
|
]
|
|
844
844
|
})
|
|
@@ -847,7 +847,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
847
847
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
848
848
|
className: ``,
|
|
849
849
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
|
|
850
|
-
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ?
|
|
850
|
+
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ? 'open' : 'close'}`,
|
|
851
851
|
children: [
|
|
852
852
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
853
853
|
className: "ds-u-padding--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest",
|
|
@@ -859,7 +859,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
859
859
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
860
860
|
className: "ds-u-padding-bottom--2",
|
|
861
861
|
children: links.map(({ url: url, label: label })=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
862
|
-
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ?
|
|
862
|
+
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ? 'active' : ''}`,
|
|
863
863
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
864
864
|
className: "ds-u-display--flex ds-u-padding-y--1",
|
|
865
865
|
children: [
|
|
@@ -894,12 +894,12 @@ const $b0968edc60d7d3a4$var$SidebarPage = (props)=>{
|
|
|
894
894
|
query: `(max-width: ${mobileMaxWidth}px)`
|
|
895
895
|
});
|
|
896
896
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
897
|
-
className: `${mobileMax ? "a" :
|
|
897
|
+
className: `${mobileMax ? "a" : 'ds-l-container'}`,
|
|
898
898
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
899
|
-
className: `${mobileMax ? "a" :
|
|
899
|
+
className: `${mobileMax ? "a" : 'ds-l-row'}`,
|
|
900
900
|
children: [
|
|
901
901
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
902
|
-
className: `${mobileMax ?
|
|
902
|
+
className: `${mobileMax ? 'a' : "ds-l-col--4"}`,
|
|
903
903
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $953b286f7778640e$export$2e2bcd8739ae039), {
|
|
904
904
|
links: links,
|
|
905
905
|
title: menuTitle,
|
|
@@ -922,9 +922,9 @@ var $b0968edc60d7d3a4$export$2e2bcd8739ae039 = $b0968edc60d7d3a4$var$SidebarPage
|
|
|
922
922
|
|
|
923
923
|
|
|
924
924
|
|
|
925
|
-
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl =
|
|
925
|
+
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl = 'datasets', searchKey: searchKey = 'fulltext', textfieldLabel: textfieldLabel = 'Search for a dataset', searchButtonText: searchButtonText = 'Search' })=>{
|
|
926
926
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
927
|
-
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState(
|
|
927
|
+
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState('');
|
|
928
928
|
function submitHero(e) {
|
|
929
929
|
e.preventDefault();
|
|
930
930
|
navigate(`/${searchUrl}?${searchKey}=${searchValue}`);
|
|
@@ -951,24 +951,24 @@ const $59a079354baa335c$var$Hero = ({ title: title, description: description, se
|
|
|
951
951
|
onSubmit: (e)=>submitHero(e),
|
|
952
952
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
953
953
|
style: {
|
|
954
|
-
position:
|
|
954
|
+
position: 'relative'
|
|
955
955
|
},
|
|
956
956
|
className: "ds-l-row ds-u-align-items--stretch ds-u-margin-y--4 ds-u-flex-wrap--nowrap",
|
|
957
957
|
children: [
|
|
958
958
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
959
959
|
className: "ds-u-padding--0 ds-u-margin-right--1",
|
|
960
960
|
style: {
|
|
961
|
-
flex:
|
|
962
|
-
maxWidth:
|
|
961
|
+
flex: '1 1 100%',
|
|
962
|
+
maxWidth: '100%'
|
|
963
963
|
},
|
|
964
964
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
965
965
|
label: textfieldLabel,
|
|
966
966
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
967
967
|
name: "search_text_input",
|
|
968
968
|
style: {
|
|
969
|
-
maxWidth:
|
|
970
|
-
height:
|
|
971
|
-
margin:
|
|
969
|
+
maxWidth: 'none',
|
|
970
|
+
height: '61px',
|
|
971
|
+
margin: '0 20px 0 0'
|
|
972
972
|
},
|
|
973
973
|
onChange: (e)=>setSearchValue(e.target.value)
|
|
974
974
|
})
|
|
@@ -1006,14 +1006,14 @@ var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
|
|
|
1006
1006
|
|
|
1007
1007
|
|
|
1008
1008
|
const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date, options: options = {
|
|
1009
|
-
year:
|
|
1010
|
-
month:
|
|
1011
|
-
day:
|
|
1012
|
-
timeZone:
|
|
1009
|
+
year: 'numeric',
|
|
1010
|
+
month: 'long',
|
|
1011
|
+
day: 'numeric',
|
|
1012
|
+
timeZone: 'UTC'
|
|
1013
1013
|
} })=>{
|
|
1014
1014
|
const rawDate = new Date(date);
|
|
1015
|
-
let modifiedDate =
|
|
1016
|
-
if (rawDate) modifiedDate = rawDate.toLocaleDateString(
|
|
1015
|
+
let modifiedDate = '';
|
|
1016
|
+
if (rawDate) modifiedDate = rawDate.toLocaleDateString('en-US', options);
|
|
1017
1017
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
1018
1018
|
children: modifiedDate
|
|
1019
1019
|
});
|
|
@@ -1027,25 +1027,25 @@ const $c068004d499082cc$var$DatasetListItem = (props)=>{
|
|
|
1027
1027
|
minWidth: 1024
|
|
1028
1028
|
});
|
|
1029
1029
|
const { title: title, modified: modified, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
|
|
1030
|
-
let linkContainerClasses =
|
|
1031
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1032
|
-
else linkContainerClasses +=
|
|
1033
|
-
let linkClasses =
|
|
1030
|
+
let linkContainerClasses = 'ds-u-margin-bottom--2';
|
|
1031
|
+
if (dataDictionaryLinks) linkContainerClasses += ' ds-l-col--6 ds-u-padding-right--0';
|
|
1032
|
+
else linkContainerClasses += ' ds-l-col--auto ds-u-padding-left--0';
|
|
1033
|
+
let linkClasses = 'ds-u-display--block ds-u-text-align--left';
|
|
1034
1034
|
if (desktop) {
|
|
1035
|
-
linkContainerClasses =
|
|
1036
|
-
linkClasses +=
|
|
1035
|
+
linkContainerClasses = 'ds-u-padding-x--0';
|
|
1036
|
+
linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
|
|
1037
1037
|
}
|
|
1038
1038
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1039
1039
|
className: "dc-c-list-item ds-u-padding-top--4",
|
|
1040
1040
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1041
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1041
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? 'ds-u-border-top--1' : 'ds-u-border-bottom--1 ds-u-padding-bottom--3'}`,
|
|
1042
1042
|
children: [
|
|
1043
1043
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1044
1044
|
className: "ds-l-row ds-u-align-items--start",
|
|
1045
1045
|
children: [
|
|
1046
1046
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1047
1047
|
id: `dataset-${identifier}-updated-date`,
|
|
1048
|
-
className: `ds-l-col--12 ds-u-text-align--left ds-text-heading--sm ${paginationEnabled ?
|
|
1048
|
+
className: `ds-l-col--12 ds-u-text-align--left ds-text-heading--sm ${paginationEnabled ? 'ds-u-padding-top--3' : 'ds-u-padding-top--0'}`,
|
|
1049
1049
|
children: [
|
|
1050
1050
|
"Updated ",
|
|
1051
1051
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
@@ -1103,7 +1103,7 @@ var $c068004d499082cc$export$2e2bcd8739ae039 = $c068004d499082cc$var$DatasetList
|
|
|
1103
1103
|
|
|
1104
1104
|
const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
1105
1105
|
switch(props.id){
|
|
1106
|
-
case
|
|
1106
|
+
case 'overview':
|
|
1107
1107
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1108
1108
|
width: "16px",
|
|
1109
1109
|
height: "16px",
|
|
@@ -1146,7 +1146,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1146
1146
|
})
|
|
1147
1147
|
]
|
|
1148
1148
|
});
|
|
1149
|
-
case
|
|
1149
|
+
case 'data-table':
|
|
1150
1150
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1151
1151
|
width: "16px",
|
|
1152
1152
|
height: "12px",
|
|
@@ -1179,7 +1179,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1179
1179
|
})
|
|
1180
1180
|
]
|
|
1181
1181
|
});
|
|
1182
|
-
case
|
|
1182
|
+
case 'api':
|
|
1183
1183
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1184
1184
|
width: "16px",
|
|
1185
1185
|
height: "13px",
|
|
@@ -1212,7 +1212,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1212
1212
|
})
|
|
1213
1213
|
]
|
|
1214
1214
|
});
|
|
1215
|
-
case
|
|
1215
|
+
case 'download':
|
|
1216
1216
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1217
1217
|
width: "16px",
|
|
1218
1218
|
height: "16px",
|
|
@@ -1242,7 +1242,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1242
1242
|
})
|
|
1243
1243
|
]
|
|
1244
1244
|
});
|
|
1245
|
-
case
|
|
1245
|
+
case 'data-dictionary':
|
|
1246
1246
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1247
1247
|
width: "14px",
|
|
1248
1248
|
height: "16px",
|
|
@@ -1345,13 +1345,13 @@ var $b61856b23f5f58a2$export$2e2bcd8739ae039 = $b61856b23f5f58a2$var$LargeFileDi
|
|
|
1345
1345
|
|
|
1346
1346
|
|
|
1347
1347
|
function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240) {
|
|
1348
|
-
if (!textString) return
|
|
1348
|
+
if (!textString) return '';
|
|
1349
1349
|
let cleanedText = textString;
|
|
1350
|
-
if (cleanedText.split(
|
|
1351
|
-
if (cleanedText.split(
|
|
1350
|
+
if (cleanedText.split('</p>').length > 1) cleanedText = cleanedText.split('</p>')[0];
|
|
1351
|
+
if (cleanedText.split('<br/>').length > 1) cleanedText = cleanedText.split('<br/>')[0];
|
|
1352
1352
|
cleanedText = (0, $hgUW1$lodashtruncate)(cleanedText, {
|
|
1353
|
-
|
|
1354
|
-
|
|
1353
|
+
'length': textLength,
|
|
1354
|
+
'separator': ' '
|
|
1355
1355
|
});
|
|
1356
1356
|
return (0, $hgUW1$dompurify).sanitize(cleanedText, {
|
|
1357
1357
|
ALLOWED_TAGS: []
|
|
@@ -1369,9 +1369,9 @@ function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240)
|
|
|
1369
1369
|
const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
1370
1370
|
const { type: type, date: date, boldLabel: boldLabel = false, displayTooltips: displayTooltips = true } = props;
|
|
1371
1371
|
const dateText = {
|
|
1372
|
-
modified:
|
|
1373
|
-
released:
|
|
1374
|
-
refresh:
|
|
1372
|
+
modified: 'Last Modified',
|
|
1373
|
+
released: 'Released',
|
|
1374
|
+
refresh: 'Planned Update'
|
|
1375
1375
|
};
|
|
1376
1376
|
const tooltipContent = {
|
|
1377
1377
|
modified: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -1408,7 +1408,7 @@ const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
|
1408
1408
|
})
|
|
1409
1409
|
};
|
|
1410
1410
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1411
|
-
className: `dataset-date-item${boldLabel ?
|
|
1411
|
+
className: `dataset-date-item${boldLabel ? ' bold-label' : ''}`,
|
|
1412
1412
|
children: [
|
|
1413
1413
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1414
1414
|
className: "dataset-data-item-label",
|
|
@@ -1478,7 +1478,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
1478
1478
|
if (dist && dist.data) {
|
|
1479
1479
|
if (dist.data.format) return dist.data.format.toLowerCase();
|
|
1480
1480
|
if (dist.data.mediaType) {
|
|
1481
|
-
const mediaType = dist.data.mediaType.split(
|
|
1481
|
+
const mediaType = dist.data.mediaType.split('/');
|
|
1482
1482
|
if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
|
|
1483
1483
|
}
|
|
1484
1484
|
if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
|
|
@@ -1488,7 +1488,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
|
-
return
|
|
1491
|
+
return '';
|
|
1492
1492
|
}
|
|
1493
1493
|
|
|
1494
1494
|
|
|
@@ -1498,20 +1498,20 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1498
1498
|
});
|
|
1499
1499
|
const { title: title, modified: modified, description: description, downloadUrl: downloadUrl, largeFile: largeFile = false, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks, identifier: identifier, refresh: refresh, released: released, showDateDetails: showDateDetails = false, showTopics: showTopics = false, theme: theme, topicSlugs: topicSlugs, distribution: distribution } = props;
|
|
1500
1500
|
const location = (0, $hgUW1$useLocation)();
|
|
1501
|
-
let linkContainerClasses =
|
|
1502
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1503
|
-
else linkContainerClasses +=
|
|
1504
|
-
let linkClasses =
|
|
1501
|
+
let linkContainerClasses = 'ds-u-margin-bottom--2';
|
|
1502
|
+
if (dataDictionaryLinks) linkContainerClasses += ' ds-l-col--6 ds-u-padding-right--0';
|
|
1503
|
+
else linkContainerClasses += ' ds-l-col--auto ds-u-padding-left--0';
|
|
1504
|
+
let linkClasses = 'ds-u-display--block ds-u-text-align--left';
|
|
1505
1505
|
if (desktop) {
|
|
1506
|
-
linkContainerClasses =
|
|
1507
|
-
linkClasses +=
|
|
1506
|
+
linkContainerClasses = 'ds-u-padding-x--0';
|
|
1507
|
+
linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
|
|
1508
1508
|
}
|
|
1509
1509
|
let themes;
|
|
1510
1510
|
if (theme && showTopics) themes = /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
1511
1511
|
className: "theme-list item-theme",
|
|
1512
1512
|
children: theme.map((topic, index)=>{
|
|
1513
|
-
const title = topic ||
|
|
1514
|
-
const prefix =
|
|
1513
|
+
const title = topic || 'Unknown Topic';
|
|
1514
|
+
const prefix = 'topics';
|
|
1515
1515
|
// Use the provided slug or fallback to a simple slug generation
|
|
1516
1516
|
const slug = topicSlugs?.[title];
|
|
1517
1517
|
const link = `/${prefix}/${slug}`;
|
|
@@ -1522,7 +1522,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1522
1522
|
state: {
|
|
1523
1523
|
fromUrl: location.pathname,
|
|
1524
1524
|
fromTitle: false,
|
|
1525
|
-
fromSearchList: location.pathname.includes(
|
|
1525
|
+
fromSearchList: location.pathname.includes('search')
|
|
1526
1526
|
},
|
|
1527
1527
|
children: title
|
|
1528
1528
|
})
|
|
@@ -1564,7 +1564,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1564
1564
|
};
|
|
1565
1565
|
const dataDictionaryExists = ()=>{
|
|
1566
1566
|
if (distribution && "data" in distribution) {
|
|
1567
|
-
if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType ===
|
|
1567
|
+
if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType === 'application/vnd.tableschema+json';
|
|
1568
1568
|
}
|
|
1569
1569
|
return false;
|
|
1570
1570
|
};
|
|
@@ -1598,7 +1598,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1598
1598
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1599
1599
|
className: "dc-c-search-list-item ds-u-padding-top--3",
|
|
1600
1600
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1601
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1601
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? 'ds-u-border-top--1' : 'ds-u-border-bottom--1 ds-u-padding-bottom--3'}`,
|
|
1602
1602
|
children: [
|
|
1603
1603
|
themes,
|
|
1604
1604
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
@@ -1606,7 +1606,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1606
1606
|
children: [
|
|
1607
1607
|
!showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1608
1608
|
id: `dataset-${identifier}-updated-date`,
|
|
1609
|
-
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ?
|
|
1609
|
+
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? 'ds-u-padding-top--2' : 'ds-u-padding-top--0'}`,
|
|
1610
1610
|
children: [
|
|
1611
1611
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1612
1612
|
children: "Updated:"
|
|
@@ -1635,13 +1635,13 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1635
1635
|
(0, $1a2bf34e2a8f6b80$export$59a943b34a82e690)(description),
|
|
1636
1636
|
description.length > 240 ? /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1637
1637
|
children: [
|
|
1638
|
-
|
|
1638
|
+
' ',
|
|
1639
1639
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1640
1640
|
to: `/dataset/${identifier}`,
|
|
1641
1641
|
children: "See more"
|
|
1642
1642
|
})
|
|
1643
1643
|
]
|
|
1644
|
-
}) :
|
|
1644
|
+
}) : ''
|
|
1645
1645
|
]
|
|
1646
1646
|
})
|
|
1647
1647
|
}),
|
|
@@ -1669,14 +1669,14 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1669
1669
|
"Download"
|
|
1670
1670
|
]
|
|
1671
1671
|
})
|
|
1672
|
-
}) :
|
|
1672
|
+
}) : '',
|
|
1673
1673
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("ul", {
|
|
1674
|
-
className: `ds-l-row ds-u-padding--0 ds-u-flex-direction--row ds-u-justify-content--between ds-u-md-justify-content--start ds-u-margin-top--3 ds-u-margin-x--0 ${!dataDictionaryLinks ?
|
|
1674
|
+
className: `ds-l-row ds-u-padding--0 ds-u-flex-direction--row ds-u-justify-content--between ds-u-md-justify-content--start ds-u-margin-top--3 ds-u-margin-x--0 ${!dataDictionaryLinks ? 'ds-u-justify-content--center ds-u-md-justify-content--start' : ''}`,
|
|
1675
1675
|
children: [
|
|
1676
1676
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1677
1677
|
className: linkContainerClasses,
|
|
1678
1678
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1679
|
-
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ?
|
|
1679
|
+
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? '' : ' dkan-disabled-link-wrapper'}`,
|
|
1680
1680
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataTableLink, {})
|
|
1681
1681
|
})
|
|
1682
1682
|
}),
|
|
@@ -1698,10 +1698,10 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1698
1698
|
dataDictionaryLinks ? /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1699
1699
|
className: linkContainerClasses,
|
|
1700
1700
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1701
|
-
className: `${linkClasses}${dataDictionaryExists() ?
|
|
1701
|
+
className: `${linkClasses}${dataDictionaryExists() ? '' : ' dkan-disabled-link-wrapper'}`,
|
|
1702
1702
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataDictionaryLink, {})
|
|
1703
1703
|
})
|
|
1704
|
-
}) :
|
|
1704
|
+
}) : '',
|
|
1705
1705
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1706
1706
|
className: linkContainerClasses,
|
|
1707
1707
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -1797,7 +1797,7 @@ var $789279954d8eff7f$export$2e2bcd8739ae039 = $789279954d8eff7f$var$ApiDocument
|
|
|
1797
1797
|
|
|
1798
1798
|
|
|
1799
1799
|
|
|
1800
|
-
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className =
|
|
1800
|
+
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className = 'data-table-results' })=>{
|
|
1801
1801
|
const numTotalRows = totalRows;
|
|
1802
1802
|
if (numTotalRows === 0) return /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1803
1803
|
className: className,
|
|
@@ -1815,18 +1815,18 @@ const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limi
|
|
|
1815
1815
|
className: className,
|
|
1816
1816
|
children: [
|
|
1817
1817
|
"Displaying",
|
|
1818
|
-
|
|
1818
|
+
' ',
|
|
1819
1819
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1820
1820
|
className: "ds-u-font-weight--bold",
|
|
1821
1821
|
children: `${startTotal().toLocaleString()} - ${ofTotal().toLocaleString()}`
|
|
1822
1822
|
}),
|
|
1823
|
-
|
|
1823
|
+
' ',
|
|
1824
1824
|
"of ",
|
|
1825
1825
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1826
1826
|
className: "ds-u-font-weight--bold",
|
|
1827
1827
|
children: `${numTotalRows.toLocaleString()}`
|
|
1828
1828
|
}),
|
|
1829
|
-
|
|
1829
|
+
' ',
|
|
1830
1830
|
"rows"
|
|
1831
1831
|
]
|
|
1832
1832
|
});
|
|
@@ -1852,16 +1852,16 @@ const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePaddi
|
|
|
1852
1852
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
1853
1853
|
options: [
|
|
1854
1854
|
{
|
|
1855
|
-
label:
|
|
1856
|
-
value:
|
|
1855
|
+
label: 'Tight',
|
|
1856
|
+
value: 'ds-u-padding-y--0'
|
|
1857
1857
|
},
|
|
1858
1858
|
{
|
|
1859
|
-
label:
|
|
1860
|
-
value:
|
|
1859
|
+
label: 'Normal',
|
|
1860
|
+
value: 'ds-u-padding-y--1'
|
|
1861
1861
|
},
|
|
1862
1862
|
{
|
|
1863
|
-
label:
|
|
1864
|
-
value:
|
|
1863
|
+
label: 'Expanded',
|
|
1864
|
+
value: 'ds-u-padding-y--2'
|
|
1865
1865
|
}
|
|
1866
1866
|
],
|
|
1867
1867
|
label: "Display density:",
|
|
@@ -2104,7 +2104,7 @@ function $aa4450dcbeef3ac0$export$385a5aba38cc3325(sortArray) {
|
|
|
2104
2104
|
sortArray.forEach((s)=>{
|
|
2105
2105
|
return newQuery.push({
|
|
2106
2106
|
property: s.id,
|
|
2107
|
-
order: s.desc ?
|
|
2107
|
+
order: s.desc ? 'desc' : 'asc'
|
|
2108
2108
|
});
|
|
2109
2109
|
});
|
|
2110
2110
|
return newQuery;
|
|
@@ -2142,46 +2142,46 @@ function $7264a673914aa746$export$e284ae5d89467c8f(date) {
|
|
|
2142
2142
|
}
|
|
2143
2143
|
function $7264a673914aa746$export$6b5e57d20078142b(value, operator) {
|
|
2144
2144
|
let newValue = value;
|
|
2145
|
-
if (Array.isArray(newValue)) newValue = newValue.join(
|
|
2145
|
+
if (Array.isArray(newValue)) newValue = newValue.join(',');
|
|
2146
2146
|
// return newValue.replace(/(^\%+|\%+$)/gm, '');
|
|
2147
2147
|
return newValue;
|
|
2148
2148
|
}
|
|
2149
2149
|
const $7264a673914aa746$export$5f89a5ae87bc48e1 = [
|
|
2150
2150
|
{
|
|
2151
|
-
label:
|
|
2152
|
-
value:
|
|
2151
|
+
label: 'Is',
|
|
2152
|
+
value: '='
|
|
2153
2153
|
},
|
|
2154
2154
|
{
|
|
2155
|
-
label:
|
|
2156
|
-
value:
|
|
2155
|
+
label: 'Starts With',
|
|
2156
|
+
value: 'starts with'
|
|
2157
2157
|
},
|
|
2158
2158
|
{
|
|
2159
|
-
label:
|
|
2160
|
-
value:
|
|
2159
|
+
label: 'Contains',
|
|
2160
|
+
value: 'contains'
|
|
2161
2161
|
},
|
|
2162
2162
|
{
|
|
2163
|
-
label:
|
|
2164
|
-
value:
|
|
2163
|
+
label: 'Is Not',
|
|
2164
|
+
value: '<>'
|
|
2165
2165
|
},
|
|
2166
2166
|
{
|
|
2167
|
-
label:
|
|
2168
|
-
value:
|
|
2167
|
+
label: 'Or',
|
|
2168
|
+
value: 'in'
|
|
2169
2169
|
},
|
|
2170
2170
|
{
|
|
2171
|
-
label:
|
|
2172
|
-
value:
|
|
2171
|
+
label: 'Is',
|
|
2172
|
+
value: '='
|
|
2173
2173
|
},
|
|
2174
2174
|
{
|
|
2175
|
-
label:
|
|
2176
|
-
value:
|
|
2175
|
+
label: 'Is Not',
|
|
2176
|
+
value: '<>'
|
|
2177
2177
|
},
|
|
2178
2178
|
{
|
|
2179
|
-
label:
|
|
2180
|
-
value:
|
|
2179
|
+
label: 'Greater Than',
|
|
2180
|
+
value: '>'
|
|
2181
2181
|
},
|
|
2182
2182
|
{
|
|
2183
|
-
label:
|
|
2184
|
-
value:
|
|
2183
|
+
label: 'Less Than',
|
|
2184
|
+
value: '<'
|
|
2185
2185
|
}
|
|
2186
2186
|
];
|
|
2187
2187
|
function $7264a673914aa746$export$d243819c3ad678fb(operatorValue) {
|
|
@@ -2190,59 +2190,59 @@ function $7264a673914aa746$export$d243819c3ad678fb(operatorValue) {
|
|
|
2190
2190
|
}
|
|
2191
2191
|
function $7264a673914aa746$export$2b9377795161999(type) {
|
|
2192
2192
|
switch(type){
|
|
2193
|
-
case
|
|
2194
|
-
case
|
|
2193
|
+
case 'text':
|
|
2194
|
+
case 'string':
|
|
2195
2195
|
return [
|
|
2196
2196
|
{
|
|
2197
|
-
label:
|
|
2198
|
-
value:
|
|
2197
|
+
label: 'Is',
|
|
2198
|
+
value: '='
|
|
2199
2199
|
},
|
|
2200
2200
|
{
|
|
2201
|
-
label:
|
|
2202
|
-
value:
|
|
2201
|
+
label: 'Starts With',
|
|
2202
|
+
value: 'starts with'
|
|
2203
2203
|
},
|
|
2204
2204
|
{
|
|
2205
|
-
label:
|
|
2206
|
-
value:
|
|
2205
|
+
label: 'Contains',
|
|
2206
|
+
value: 'contains'
|
|
2207
2207
|
},
|
|
2208
2208
|
{
|
|
2209
|
-
label:
|
|
2210
|
-
value:
|
|
2209
|
+
label: 'Is Not',
|
|
2210
|
+
value: '<>'
|
|
2211
2211
|
},
|
|
2212
2212
|
{
|
|
2213
|
-
label:
|
|
2214
|
-
value:
|
|
2213
|
+
label: 'Or',
|
|
2214
|
+
value: 'in'
|
|
2215
2215
|
}
|
|
2216
2216
|
];
|
|
2217
|
-
case
|
|
2217
|
+
case 'date':
|
|
2218
2218
|
return [
|
|
2219
2219
|
{
|
|
2220
|
-
label:
|
|
2221
|
-
value:
|
|
2220
|
+
label: 'Is',
|
|
2221
|
+
value: '='
|
|
2222
2222
|
},
|
|
2223
2223
|
{
|
|
2224
|
-
label:
|
|
2225
|
-
value:
|
|
2224
|
+
label: 'Is Not',
|
|
2225
|
+
value: '<>'
|
|
2226
2226
|
},
|
|
2227
2227
|
{
|
|
2228
|
-
label:
|
|
2229
|
-
value:
|
|
2228
|
+
label: 'Greater Than',
|
|
2229
|
+
value: '>'
|
|
2230
2230
|
},
|
|
2231
2231
|
{
|
|
2232
|
-
label:
|
|
2233
|
-
value:
|
|
2232
|
+
label: 'Less Than',
|
|
2233
|
+
value: '<'
|
|
2234
2234
|
}
|
|
2235
2235
|
];
|
|
2236
2236
|
default:
|
|
2237
2237
|
// These 2 should be safe for all data types
|
|
2238
2238
|
return [
|
|
2239
2239
|
{
|
|
2240
|
-
label:
|
|
2241
|
-
value:
|
|
2240
|
+
label: 'Is',
|
|
2241
|
+
value: '='
|
|
2242
2242
|
},
|
|
2243
2243
|
{
|
|
2244
|
-
label:
|
|
2245
|
-
value:
|
|
2244
|
+
label: 'Is Not',
|
|
2245
|
+
value: '<>'
|
|
2246
2246
|
}
|
|
2247
2247
|
];
|
|
2248
2248
|
}
|
|
@@ -2259,7 +2259,7 @@ function $7264a673914aa746$export$2b9377795161999(type) {
|
|
|
2259
2259
|
|
|
2260
2260
|
|
|
2261
2261
|
const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: header, sortElement: sortElement, setAriaLiveFeedback: setAriaLiveFeedback, id: id })=>{
|
|
2262
|
-
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)(
|
|
2262
|
+
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)('');
|
|
2263
2263
|
// Fix for JSX in Data Dictionary Title header cell
|
|
2264
2264
|
const ariaLabel = header.id === "titleResizable" ? "Title" : header.column.columnDef.header;
|
|
2265
2265
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("th", {
|
|
@@ -2268,9 +2268,9 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2268
2268
|
width: header.getSize()
|
|
2269
2269
|
},
|
|
2270
2270
|
id: id,
|
|
2271
|
-
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header :
|
|
2271
|
+
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : '',
|
|
2272
2272
|
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
|
|
2273
|
-
"aria-sort": header.column.getIsSorted() ===
|
|
2273
|
+
"aria-sort": header.column.getIsSorted() === 'asc' ? 'ascending' : header.column.getIsSorted() === 'desc' ? 'descending' : 'none',
|
|
2274
2274
|
children: [
|
|
2275
2275
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2276
2276
|
className: "ds-u-display--flex",
|
|
@@ -2282,7 +2282,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2282
2282
|
}),
|
|
2283
2283
|
sortElement && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2284
2284
|
onClick: header.column.getToggleSortingHandler(),
|
|
2285
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
2285
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : '',
|
|
2286
2286
|
"aria-label": `${ariaLabel} sort order`
|
|
2287
2287
|
})
|
|
2288
2288
|
]
|
|
@@ -2290,18 +2290,18 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2290
2290
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2291
2291
|
onMouseDown: header.getResizeHandler(),
|
|
2292
2292
|
onTouchStart: header.getResizeHandler(),
|
|
2293
|
-
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ?
|
|
2293
|
+
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ? 'isResizing' : ''}`,
|
|
2294
2294
|
"aria-label": `Resize ${ariaLabel} column`,
|
|
2295
2295
|
onKeyDown: (e)=>{
|
|
2296
2296
|
const columnSizingObject = table.getState().columnSizing;
|
|
2297
2297
|
switch(e.key){
|
|
2298
|
-
case
|
|
2299
|
-
case
|
|
2298
|
+
case 'Enter':
|
|
2299
|
+
case ' ':
|
|
2300
2300
|
e.preventDefault();
|
|
2301
2301
|
e.stopPropagation();
|
|
2302
2302
|
if (columnResizing) {
|
|
2303
2303
|
// end resizing
|
|
2304
|
-
setColumnResizing(
|
|
2304
|
+
setColumnResizing('');
|
|
2305
2305
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2306
2306
|
} else {
|
|
2307
2307
|
// start resizing
|
|
@@ -2309,13 +2309,13 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2309
2309
|
setAriaLiveFeedback(`${header.column.columnDef.header} grabbed.`);
|
|
2310
2310
|
}
|
|
2311
2311
|
break;
|
|
2312
|
-
case
|
|
2312
|
+
case 'Escape':
|
|
2313
2313
|
if (columnResizing) {
|
|
2314
|
-
setColumnResizing(
|
|
2314
|
+
setColumnResizing('');
|
|
2315
2315
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2316
2316
|
}
|
|
2317
2317
|
break;
|
|
2318
|
-
case
|
|
2318
|
+
case 'ArrowRight':
|
|
2319
2319
|
e.preventDefault();
|
|
2320
2320
|
e.stopPropagation();
|
|
2321
2321
|
if (columnResizing) {
|
|
@@ -2324,7 +2324,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2324
2324
|
setAriaLiveFeedback(`${header.column.columnDef.header} has been resized. The new width is ${header.getSize()} pixels.`);
|
|
2325
2325
|
}
|
|
2326
2326
|
break;
|
|
2327
|
-
case
|
|
2327
|
+
case 'ArrowLeft':
|
|
2328
2328
|
e.preventDefault();
|
|
2329
2329
|
e.stopPropagation();
|
|
2330
2330
|
if (columnResizing) {
|
|
@@ -2336,7 +2336,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2336
2336
|
}
|
|
2337
2337
|
},
|
|
2338
2338
|
onBlur: ()=>{
|
|
2339
|
-
setColumnResizing(
|
|
2339
|
+
setColumnResizing('');
|
|
2340
2340
|
}
|
|
2341
2341
|
})
|
|
2342
2342
|
]
|
|
@@ -2377,7 +2377,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2377
2377
|
},
|
|
2378
2378
|
title: header.column.columnDef.header,
|
|
2379
2379
|
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
|
|
2380
|
-
"aria-sort": header.column.getIsSorted() ===
|
|
2380
|
+
"aria-sort": header.column.getIsSorted() === 'asc' ? 'ascending' : header.column.getIsSorted() === 'desc' ? 'descending' : 'none',
|
|
2381
2381
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2382
2382
|
onClick: header.column.getToggleSortingHandler(),
|
|
2383
2383
|
className: "ds-u-display--flex",
|
|
@@ -2386,7 +2386,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2386
2386
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
2387
2387
|
}),
|
|
2388
2388
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2389
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` :
|
|
2389
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` : ''
|
|
2390
2390
|
})
|
|
2391
2391
|
]
|
|
2392
2392
|
})
|
|
@@ -2417,7 +2417,7 @@ const $ee0d4d4f34048447$var$DataTableActionsContextDefaults = {
|
|
|
2417
2417
|
setColumnVisibility: ()=>{},
|
|
2418
2418
|
page: 1,
|
|
2419
2419
|
setPage: ()=>{},
|
|
2420
|
-
tableDensity:
|
|
2420
|
+
tableDensity: 'normal',
|
|
2421
2421
|
setTableDensity: ()=>{}
|
|
2422
2422
|
};
|
|
2423
2423
|
const $ee0d4d4f34048447$export$f814ea079e65d8fe = /*#__PURE__*/ (0, $hgUW1$createContext)($ee0d4d4f34048447$var$DataTableActionsContextDefaults);
|
|
@@ -2436,7 +2436,7 @@ const $ee0d4d4f34048447$var$DataTableActionsProvider = ({ children: children })=
|
|
|
2436
2436
|
if (datasetTableControls && localStorageData) return localStorageData.tableColumnVisibility;
|
|
2437
2437
|
else return {};
|
|
2438
2438
|
});
|
|
2439
|
-
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)(
|
|
2439
|
+
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)('normal');
|
|
2440
2440
|
const providerValue = {
|
|
2441
2441
|
columnOrder: columnOrder,
|
|
2442
2442
|
setColumnOrder: setColumnOrder,
|
|
@@ -2483,9 +2483,9 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2483
2483
|
transition: transition,
|
|
2484
2484
|
opacity: isDragging ? 0.7 : 1,
|
|
2485
2485
|
zIndex: isDragging ? 1 : 0,
|
|
2486
|
-
position:
|
|
2487
|
-
background:
|
|
2488
|
-
touchAction:
|
|
2486
|
+
position: 'relative',
|
|
2487
|
+
background: 'white',
|
|
2488
|
+
touchAction: 'none'
|
|
2489
2489
|
};
|
|
2490
2490
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
2491
2491
|
className: "ds-u-display--flex ds-u-justify-content--between ds-u-border-bottom--1",
|
|
@@ -2501,7 +2501,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2501
2501
|
// this code forces the repaint without user interaction
|
|
2502
2502
|
const target = e.target;
|
|
2503
2503
|
if (isDragging && target.tagName.toLowerCase() === "label") setTimeout(()=>{
|
|
2504
|
-
target.parentNode.querySelector(
|
|
2504
|
+
target.parentNode.querySelector('input').checked = visible;
|
|
2505
2505
|
}, 1);
|
|
2506
2506
|
},
|
|
2507
2507
|
children: [
|
|
@@ -2518,7 +2518,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2518
2518
|
}
|
|
2519
2519
|
}),
|
|
2520
2520
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2521
|
-
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging &&
|
|
2521
|
+
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && 'grabbed'}`,
|
|
2522
2522
|
"aria-label": `Reorder ${id} column`,
|
|
2523
2523
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2524
2524
|
className: "fa fa-sort"
|
|
@@ -2536,7 +2536,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor extends (0, $hgUW1$Key
|
|
|
2536
2536
|
// Custom function to exclude checkbox from keyboard dragging
|
|
2537
2537
|
static activators = [
|
|
2538
2538
|
{
|
|
2539
|
-
eventName:
|
|
2539
|
+
eventName: 'onKeyDown',
|
|
2540
2540
|
handler: ({ nativeEvent: event })=>{
|
|
2541
2541
|
// prevent scrolling the list
|
|
2542
2542
|
const isCheckbox = [
|
|
@@ -2559,7 +2559,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$Poin
|
|
|
2559
2559
|
// Custom function to stop accidental checkbox clicks on pointer activation
|
|
2560
2560
|
static activators = [
|
|
2561
2561
|
{
|
|
2562
|
-
eventName:
|
|
2562
|
+
eventName: 'onPointerDown',
|
|
2563
2563
|
handler: ({ nativeEvent: event })=>{
|
|
2564
2564
|
if (event.target.tagName.toLowerCase() === "input") return false;
|
|
2565
2565
|
if (event.target.tagName.toLowerCase() === "label") event.target.blur();
|
|
@@ -2657,13 +2657,13 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
2657
2657
|
className: "dkan-dataset-toolbar-button-label",
|
|
2658
2658
|
children: "Manage Columns"
|
|
2659
2659
|
}),
|
|
2660
|
-
hiddenColumns ? ` (${hiddenColumns})` :
|
|
2660
|
+
hiddenColumns ? ` (${hiddenColumns})` : ''
|
|
2661
2661
|
]
|
|
2662
2662
|
})
|
|
2663
2663
|
]
|
|
2664
2664
|
}),
|
|
2665
2665
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2666
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2666
|
+
className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
|
|
2667
2667
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
|
|
2668
2668
|
heading: "Manage columns",
|
|
2669
2669
|
isOpen: modalOpen,
|
|
@@ -2836,12 +2836,12 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
2836
2836
|
if (Object.keys(resource).length && columns.length && resource.schema && Object.keys(distribution).length) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
2837
2837
|
children: [
|
|
2838
2838
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2839
|
-
className: isModal ?
|
|
2839
|
+
className: isModal ? 'dkan-datatable-fullscreen-mode' : '',
|
|
2840
2840
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
|
|
2841
2841
|
canResize: true,
|
|
2842
2842
|
columns: columns,
|
|
2843
2843
|
sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
|
|
2844
|
-
tablePadding: tableDensity ===
|
|
2844
|
+
tablePadding: tableDensity === 'normal' ? 'ds-u-padding-y--2' : tableDensity === 'compact' ? 'ds-u-padding-y--1' : 'ds-u-padding-y--3',
|
|
2845
2845
|
loading: resource.loading,
|
|
2846
2846
|
isModal: isModal,
|
|
2847
2847
|
downloadURL: downloadURL,
|
|
@@ -2856,14 +2856,14 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
2856
2856
|
}),
|
|
2857
2857
|
!resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2858
2858
|
className: [
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
isModal &&
|
|
2866
|
-
].filter(Boolean).join(
|
|
2859
|
+
'ds-u-display--flex',
|
|
2860
|
+
'ds-u-flex-wrap--wrap',
|
|
2861
|
+
'ds-u-justify-content--end',
|
|
2862
|
+
'ds-u-md-justify-content--between',
|
|
2863
|
+
'ds-u-margin-top--2',
|
|
2864
|
+
'ds-u-align-items--center',
|
|
2865
|
+
isModal && 'ds-u-margin-bottom--2'
|
|
2866
|
+
].filter(Boolean).join(' '),
|
|
2867
2867
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
2868
2868
|
totalPages: Math.ceil(resource.count ? resource.count / pageSize : 1),
|
|
2869
2869
|
currentPage: Number(page),
|
|
@@ -2902,7 +2902,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
2902
2902
|
},
|
|
2903
2903
|
children: [
|
|
2904
2904
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2905
|
-
className: `far ${modalOpen ?
|
|
2905
|
+
className: `far ${modalOpen ? 'fa-compress' : 'fa-expand'} ds-u-margin-right--1`
|
|
2906
2906
|
}),
|
|
2907
2907
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2908
2908
|
className: "dkan-dataset-toolbar-button-label",
|
|
@@ -2911,7 +2911,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
2911
2911
|
]
|
|
2912
2912
|
}),
|
|
2913
2913
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2914
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2914
|
+
className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
|
|
2915
2915
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
2916
2916
|
heading: "Dataset Explorer",
|
|
2917
2917
|
isOpen: modalOpen,
|
|
@@ -2946,25 +2946,42 @@ var $16bd41951b91f02d$export$2e2bcd8739ae039 = $16bd41951b91f02d$var$FullScreenD
|
|
|
2946
2946
|
|
|
2947
2947
|
|
|
2948
2948
|
function $eadd6431fddf4b6c$var$getStartDate(condition, schema, id) {
|
|
2949
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2949
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
2950
2950
|
const newDate = new Date(condition.value.toString());
|
|
2951
2951
|
if (newDate instanceof Date && !isNaN(newDate.getTime())) return newDate;
|
|
2952
2952
|
}
|
|
2953
2953
|
return new Date();
|
|
2954
2954
|
}
|
|
2955
|
-
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className =
|
|
2955
|
+
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className = '' })=>{
|
|
2956
2956
|
const [operator, setOperator] = (0, $hgUW1$useState)(condition.operator);
|
|
2957
2957
|
const [property, setProperty] = (0, $hgUW1$useState)(condition.property);
|
|
2958
2958
|
const [value, setValue] = (0, $hgUW1$useState)(condition.value);
|
|
2959
2959
|
const [startDate, setStartDate] = (0, $hgUW1$react).useState($eadd6431fddf4b6c$var$getStartDate(condition, schema, id));
|
|
2960
|
+
const [previousType, setPreviousType] = (0, $hgUW1$useState)(schema[id].fields[property]?.mysql_type);
|
|
2960
2961
|
const xl = (0, $hgUW1$useMediaQuery)({
|
|
2961
2962
|
minWidth: 1280
|
|
2962
2963
|
});
|
|
2964
|
+
// Reset value when mysql_type changes from date to another type
|
|
2965
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
2966
|
+
const currentType = schema[id].fields[property]?.mysql_type;
|
|
2967
|
+
if (previousType === 'date' && currentType !== 'date') {
|
|
2968
|
+
setValue('');
|
|
2969
|
+
update(index, 'value', '');
|
|
2970
|
+
}
|
|
2971
|
+
setPreviousType(currentType);
|
|
2972
|
+
}, [
|
|
2973
|
+
schema,
|
|
2974
|
+
id,
|
|
2975
|
+
property,
|
|
2976
|
+
previousType,
|
|
2977
|
+
index,
|
|
2978
|
+
update
|
|
2979
|
+
]);
|
|
2963
2980
|
(0, $hgUW1$useEffect)(()=>{
|
|
2964
2981
|
if (property !== condition.property) {
|
|
2965
|
-
if (property) update(index,
|
|
2966
|
-
else update(index,
|
|
2967
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2982
|
+
if (property) update(index, 'property', property);
|
|
2983
|
+
else update(index, 'property', '');
|
|
2984
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
2968
2985
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
2969
2986
|
}
|
|
2970
2987
|
}
|
|
@@ -2978,22 +2995,22 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
2978
2995
|
]);
|
|
2979
2996
|
(0, $hgUW1$useEffect)(()=>{
|
|
2980
2997
|
if (operator !== condition.operator) {
|
|
2981
|
-
if (operator) update(index,
|
|
2982
|
-
else update(index,
|
|
2998
|
+
if (operator) update(index, 'operator', operator);
|
|
2999
|
+
else update(index, 'operator', '');
|
|
2983
3000
|
}
|
|
2984
3001
|
}, [
|
|
2985
3002
|
operator
|
|
2986
3003
|
]);
|
|
2987
3004
|
(0, $hgUW1$useEffect)(()=>{
|
|
2988
3005
|
if (value !== condition.value) {
|
|
2989
|
-
if (value) update(index,
|
|
2990
|
-
else update(index,
|
|
3006
|
+
if (value) update(index, 'value', value);
|
|
3007
|
+
else update(index, 'value', '');
|
|
2991
3008
|
}
|
|
2992
3009
|
}, [
|
|
2993
3010
|
value
|
|
2994
3011
|
]);
|
|
2995
3012
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("fieldset", {
|
|
2996
|
-
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 !==
|
|
3013
|
+
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}` : ''}`,
|
|
2997
3014
|
children: [
|
|
2998
3015
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
2999
3016
|
options: propertyOptions,
|
|
@@ -3011,7 +3028,7 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
3011
3028
|
name: `${condition.key}_operator`,
|
|
3012
3029
|
onChange: (e)=>setOperator(e.target.value)
|
|
3013
3030
|
}),
|
|
3014
|
-
schema[id].fields[property].mysql_type ===
|
|
3031
|
+
schema[id].fields[property].mysql_type === 'date' ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
3015
3032
|
children: [
|
|
3016
3033
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
3017
3034
|
className: "ds-c-label",
|
|
@@ -3064,15 +3081,15 @@ var $eadd6431fddf4b6c$export$2e2bcd8739ae039 = $eadd6431fddf4b6c$var$FilterItem;
|
|
|
3064
3081
|
|
|
3065
3082
|
|
|
3066
3083
|
|
|
3067
|
-
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className =
|
|
3084
|
+
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className = '' })=>{
|
|
3068
3085
|
const small = (0, $hgUW1$useMediaQuery)({
|
|
3069
3086
|
minWidth: 0,
|
|
3070
3087
|
maxWidth: 544
|
|
3071
3088
|
});
|
|
3072
3089
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
3073
3090
|
disabled: disabled,
|
|
3074
|
-
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ?
|
|
3075
|
-
variation: small ?
|
|
3091
|
+
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ? '' : ' ds-u-float--right ds-l-md-col--6 ds-l-col--5'}${className !== '' ? ` ${className}` : ''}`,
|
|
3092
|
+
variation: small ? 'ghost' : undefined,
|
|
3076
3093
|
onClick: ()=>clearFiltersFn(),
|
|
3077
3094
|
children: "Reset"
|
|
3078
3095
|
});
|
|
@@ -3084,19 +3101,19 @@ var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFilter
|
|
|
3084
3101
|
function $6f4318b1e14124e5$var$updateQueryForDatastore(condition) {
|
|
3085
3102
|
let cond = condition;
|
|
3086
3103
|
delete cond.key;
|
|
3087
|
-
if (cond.operator ===
|
|
3104
|
+
if (cond.operator === '=' || cond.operator === '<>') {
|
|
3088
3105
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3089
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3106
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
3090
3107
|
}
|
|
3091
|
-
if (cond.operator.toLowerCase() ===
|
|
3108
|
+
if (cond.operator.toLowerCase() === 'like') {
|
|
3092
3109
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3093
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3110
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
3094
3111
|
cond.value = `%${cleanedValue}%`;
|
|
3095
3112
|
}
|
|
3096
|
-
if (cond.operator.toLowerCase() ===
|
|
3097
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
3113
|
+
if (cond.operator.toLowerCase() === 'in') {
|
|
3114
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(',');
|
|
3098
3115
|
}
|
|
3099
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
3116
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ''));
|
|
3100
3117
|
return cond;
|
|
3101
3118
|
}
|
|
3102
3119
|
const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
@@ -3122,7 +3139,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3122
3139
|
} else setQueryConditions([
|
|
3123
3140
|
{
|
|
3124
3141
|
property: fields[0],
|
|
3125
|
-
value:
|
|
3142
|
+
value: '',
|
|
3126
3143
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3127
3144
|
key: Date.now().toString()
|
|
3128
3145
|
}
|
|
@@ -3139,7 +3156,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3139
3156
|
...queryConditions,
|
|
3140
3157
|
{
|
|
3141
3158
|
property: fields[0],
|
|
3142
|
-
value:
|
|
3159
|
+
value: '',
|
|
3143
3160
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3144
3161
|
key: Date.now().toString()
|
|
3145
3162
|
}
|
|
@@ -3170,7 +3187,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3170
3187
|
encodeValuesOnly: true,
|
|
3171
3188
|
addQueryPrefix: true
|
|
3172
3189
|
});
|
|
3173
|
-
window.history.pushState({},
|
|
3190
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
3174
3191
|
};
|
|
3175
3192
|
const submitConditions = ()=>{
|
|
3176
3193
|
// only update the data conditions when "Apply filters" is pressed
|
|
@@ -3244,7 +3261,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3244
3261
|
children: [
|
|
3245
3262
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3246
3263
|
className: "dkan-dataset-toolbar-button-label",
|
|
3247
|
-
children: conditions.length > 0 ? `Edit Filters` :
|
|
3264
|
+
children: conditions.length > 0 ? `Edit Filters` : 'Filter Dataset'
|
|
3248
3265
|
}),
|
|
3249
3266
|
conditions.length > 0 && ` (${conditions.length})`
|
|
3250
3267
|
]
|
|
@@ -3252,7 +3269,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3252
3269
|
]
|
|
3253
3270
|
}),
|
|
3254
3271
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3255
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
3272
|
+
className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
|
|
3256
3273
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
3257
3274
|
heading: "Filter Dataset",
|
|
3258
3275
|
isOpen: modalOpen,
|
|
@@ -3278,7 +3295,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3278
3295
|
className: "dkan-apply-dataset-filters-button ds-u-float--right ds-l-md-col--auto ds-l-col--auto",
|
|
3279
3296
|
onClick: submitConditions,
|
|
3280
3297
|
variation: "solid",
|
|
3281
|
-
children: `Apply ${conditionsReadyToSubmit(queryConditions).length ||
|
|
3298
|
+
children: `Apply ${conditionsReadyToSubmit(queryConditions).length || ''} filter${conditionsReadyToSubmit(queryConditions).length === 1 ? '' : 's'}`
|
|
3282
3299
|
})
|
|
3283
3300
|
]
|
|
3284
3301
|
})
|
|
@@ -3417,9 +3434,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3417
3434
|
className: "ds-u-display--flex ds-u-align-items--start",
|
|
3418
3435
|
children: [
|
|
3419
3436
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3420
|
-
onClick: ()=>setTableDensity(
|
|
3437
|
+
onClick: ()=>setTableDensity('expanded'),
|
|
3421
3438
|
"aria-label": "Row height, Expanded",
|
|
3422
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3439
|
+
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' : ''}`,
|
|
3423
3440
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3424
3441
|
className: "ds-u-display--block",
|
|
3425
3442
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3438,9 +3455,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3438
3455
|
})
|
|
3439
3456
|
}),
|
|
3440
3457
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3441
|
-
onClick: ()=>setTableDensity(
|
|
3458
|
+
onClick: ()=>setTableDensity('normal'),
|
|
3442
3459
|
"aria-label": "Row height, Normal",
|
|
3443
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3460
|
+
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' : ''}`,
|
|
3444
3461
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3445
3462
|
className: "ds-u-display--block",
|
|
3446
3463
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3459,9 +3476,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3459
3476
|
})
|
|
3460
3477
|
}),
|
|
3461
3478
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3462
|
-
onClick: ()=>setTableDensity(
|
|
3479
|
+
onClick: ()=>setTableDensity('compact'),
|
|
3463
3480
|
"aria-label": "Row height, Compact",
|
|
3464
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3481
|
+
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 ' : ''}`,
|
|
3465
3482
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3466
3483
|
className: "ds-u-display--block",
|
|
3467
3484
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3546,7 +3563,7 @@ const $85f8ff1ff89899c7$var$updateBrowserURL = (newConditions)=>{
|
|
|
3546
3563
|
encodeValuesOnly: true,
|
|
3547
3564
|
addQueryPrefix: true
|
|
3548
3565
|
});
|
|
3549
|
-
window.history.pushState({},
|
|
3566
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
3550
3567
|
};
|
|
3551
3568
|
const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, columns: columns, defaultColumnOrder: defaultColumnOrder, isModal: isModal, datasetTableControls: datasetTableControls, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility })=>{
|
|
3552
3569
|
const { limit: limit, offset: offset, count: count, conditions: conditions, setConditions: setConditions } = resource;
|
|
@@ -3632,7 +3649,7 @@ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, co
|
|
|
3632
3649
|
}, index)) : null,
|
|
3633
3650
|
hiddenColumns > 0 ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $c5b172e8d1a8197c$export$2e2bcd8739ae039), {
|
|
3634
3651
|
iconClass: "fa fa-columns",
|
|
3635
|
-
text: `${hiddenColumns} Column${hiddenColumns === 1 ?
|
|
3652
|
+
text: `${hiddenColumns} Column${hiddenColumns === 1 ? '' : 's'} Hidden`,
|
|
3636
3653
|
onClick: ()=>{
|
|
3637
3654
|
resetColumnVisibility();
|
|
3638
3655
|
}
|
|
@@ -3667,7 +3684,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3667
3684
|
const { conditions: conditions } = resource;
|
|
3668
3685
|
const data = resource.values;
|
|
3669
3686
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
3670
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
3687
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
|
|
3671
3688
|
const dataTableWrapperElement = (0, $hgUW1$useRef)(null);
|
|
3672
3689
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
3673
3690
|
const table_columns = columns.map((col)=>{
|
|
@@ -3686,9 +3703,9 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3686
3703
|
columnOrder
|
|
3687
3704
|
]);
|
|
3688
3705
|
const sortElement = (isSorted, onClickFn)=>{
|
|
3689
|
-
if (isSorted ===
|
|
3690
|
-
if (isSorted ===
|
|
3691
|
-
return
|
|
3706
|
+
if (isSorted === 'asc') return 'dc-c-sort--asc';
|
|
3707
|
+
if (isSorted === 'desc') return 'dc-c-sort--desc';
|
|
3708
|
+
return 'dc-c-sort--default';
|
|
3692
3709
|
};
|
|
3693
3710
|
const filters = [];
|
|
3694
3711
|
const table = (0, $hgUW1$useReactTable)({
|
|
@@ -3700,7 +3717,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3700
3717
|
columnVisibility: columnVisibility,
|
|
3701
3718
|
sorting: sorting
|
|
3702
3719
|
},
|
|
3703
|
-
columnResizeMode:
|
|
3720
|
+
columnResizeMode: 'onChange',
|
|
3704
3721
|
onSortingChange: setSorting,
|
|
3705
3722
|
onColumnOrderChange: setColumnOrder,
|
|
3706
3723
|
onColumnVisibilityChange: setColumnVisibility,
|
|
@@ -3717,7 +3734,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3717
3734
|
const defaultColumnOrder = (0, $hgUW1$useMemo)(()=>table_columns.map((column)=>column.accessorKey), []);
|
|
3718
3735
|
const tableWrapperWidth = ()=>{
|
|
3719
3736
|
if (dataTableWrapperElement.current) return dataTableWrapperElement.current.offsetWidth;
|
|
3720
|
-
return
|
|
3737
|
+
return 'auto';
|
|
3721
3738
|
};
|
|
3722
3739
|
(0, $hgUW1$useEffect)(()=>{
|
|
3723
3740
|
setHighlightRow(null);
|
|
@@ -3947,7 +3964,7 @@ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, a
|
|
|
3947
3964
|
},
|
|
3948
3965
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3949
3966
|
name: accessor,
|
|
3950
|
-
value: filterValue ||
|
|
3967
|
+
value: filterValue || ''
|
|
3951
3968
|
});
|
|
3952
3969
|
}
|
|
3953
3970
|
const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true })=>{
|
|
@@ -4023,7 +4040,7 @@ const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage, pageTrail:
|
|
|
4023
4040
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4024
4041
|
children: currentPage
|
|
4025
4042
|
})
|
|
4026
|
-
}) :
|
|
4043
|
+
}) : ''
|
|
4027
4044
|
]
|
|
4028
4045
|
})
|
|
4029
4046
|
});
|
|
@@ -4080,11 +4097,11 @@ var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRigh
|
|
|
4080
4097
|
|
|
4081
4098
|
|
|
4082
4099
|
|
|
4083
|
-
const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder =
|
|
4100
|
+
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", {
|
|
4084
4101
|
className: "search-input-container",
|
|
4085
4102
|
children: [
|
|
4086
4103
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4087
|
-
className: `${showMagnifyingGlass ?
|
|
4104
|
+
className: `${showMagnifyingGlass ? 'left-padding' : ''} ${showSearchButton ? 'right-padding' : ''}`,
|
|
4088
4105
|
label: placeholder,
|
|
4089
4106
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4090
4107
|
placeholder: placeholder,
|
|
@@ -4099,7 +4116,7 @@ const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = "Search
|
|
|
4099
4116
|
}),
|
|
4100
4117
|
showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
4101
4118
|
variation: "solid",
|
|
4102
|
-
className: onDark &&
|
|
4119
|
+
className: onDark && 'on-dark',
|
|
4103
4120
|
onClick: onSubmit,
|
|
4104
4121
|
children: [
|
|
4105
4122
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4218,7 +4235,7 @@ const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: roo
|
|
|
4218
4235
|
url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4219
4236
|
addQueryPrefix: true
|
|
4220
4237
|
})}`,
|
|
4221
|
-
docExpansion:
|
|
4238
|
+
docExpansion: 'list',
|
|
4222
4239
|
defaultModelsExpandDepth: -1,
|
|
4223
4240
|
plugins: [
|
|
4224
4241
|
(0, $hgUW1$SpanOpenAPIVersion),
|
|
@@ -4326,7 +4343,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4326
4343
|
size: "big",
|
|
4327
4344
|
type: "submit",
|
|
4328
4345
|
style: {
|
|
4329
|
-
width:
|
|
4346
|
+
width: '70px'
|
|
4330
4347
|
},
|
|
4331
4348
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4332
4349
|
className: "fas fa-search small-text"
|
|
@@ -4343,7 +4360,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4343
4360
|
className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
|
|
4344
4361
|
children: [
|
|
4345
4362
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4346
|
-
children: text ? text :
|
|
4363
|
+
children: text ? text : 'Search'
|
|
4347
4364
|
}),
|
|
4348
4365
|
` `,
|
|
4349
4366
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4428,12 +4445,12 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
4428
4445
|
fulltext: fulltext ? fulltext : undefined,
|
|
4429
4446
|
...selectedFacets,
|
|
4430
4447
|
sort: sort ? sort : undefined,
|
|
4431
|
-
[
|
|
4448
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
4432
4449
|
page: page !== 1 ? page : undefined,
|
|
4433
|
-
[
|
|
4450
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
4434
4451
|
};
|
|
4435
4452
|
return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4436
|
-
arrayFormat:
|
|
4453
|
+
arrayFormat: 'comma',
|
|
4437
4454
|
encode: false
|
|
4438
4455
|
})}`);
|
|
4439
4456
|
}
|
|
@@ -4444,26 +4461,26 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
4444
4461
|
|
|
4445
4462
|
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
4446
4463
|
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4447
|
-
defaultSort:
|
|
4448
|
-
defaultOrder:
|
|
4449
|
-
}, pageTitle: pageTitle =
|
|
4464
|
+
defaultSort: 'modified',
|
|
4465
|
+
defaultOrder: 'desc'
|
|
4466
|
+
}, pageTitle: pageTitle = 'Dataset Explorer', filterTitle: filterTitle = 'Tags', showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = '', showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
4450
4467
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4451
4468
|
const sortOptions = [
|
|
4452
4469
|
{
|
|
4453
|
-
label:
|
|
4454
|
-
value:
|
|
4470
|
+
label: 'Newest',
|
|
4471
|
+
value: 'newest'
|
|
4455
4472
|
},
|
|
4456
4473
|
{
|
|
4457
|
-
label:
|
|
4458
|
-
value:
|
|
4474
|
+
label: 'Oldest',
|
|
4475
|
+
value: 'oldest'
|
|
4459
4476
|
},
|
|
4460
4477
|
{
|
|
4461
|
-
label:
|
|
4462
|
-
value:
|
|
4478
|
+
label: 'Title A-Z',
|
|
4479
|
+
value: 'titleAZ'
|
|
4463
4480
|
},
|
|
4464
4481
|
{
|
|
4465
|
-
label:
|
|
4466
|
-
value:
|
|
4482
|
+
label: 'Title Z-A',
|
|
4483
|
+
value: 'titleZA'
|
|
4467
4484
|
}
|
|
4468
4485
|
];
|
|
4469
4486
|
const defaultSortBy = "";
|
|
@@ -4482,7 +4499,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4482
4499
|
endingNumber: 0
|
|
4483
4500
|
});
|
|
4484
4501
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4485
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4502
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)('');
|
|
4486
4503
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4487
4504
|
const [fulltext, setFullText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
4488
4505
|
const [filterText, setFilterText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
@@ -4491,7 +4508,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4491
4508
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4492
4509
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4493
4510
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4494
|
-
return sort ===
|
|
4511
|
+
return sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
|
|
4495
4512
|
});
|
|
4496
4513
|
const [selectedFacets, setSelectedFacets] = (0, $hgUW1$useState)(transformedParams.selectedFacets ? transformedParams.selectedFacets : {
|
|
4497
4514
|
theme: [],
|
|
@@ -4500,21 +4517,21 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4500
4517
|
const setSortOptions = (value)=>{
|
|
4501
4518
|
setSortDisplay(value);
|
|
4502
4519
|
switch(value){
|
|
4503
|
-
case
|
|
4504
|
-
setSort(
|
|
4505
|
-
setSortOrder(
|
|
4520
|
+
case 'newest':
|
|
4521
|
+
setSort('modified');
|
|
4522
|
+
setSortOrder('desc');
|
|
4506
4523
|
break;
|
|
4507
|
-
case
|
|
4508
|
-
setSort(
|
|
4509
|
-
setSortOrder(
|
|
4524
|
+
case 'oldest':
|
|
4525
|
+
setSort('modified');
|
|
4526
|
+
setSortOrder('asc');
|
|
4510
4527
|
break;
|
|
4511
|
-
case
|
|
4512
|
-
setSort(
|
|
4513
|
-
setSortOrder(
|
|
4528
|
+
case 'titleAZ':
|
|
4529
|
+
setSort('title');
|
|
4530
|
+
setSortOrder('asc');
|
|
4514
4531
|
break;
|
|
4515
|
-
case
|
|
4516
|
-
setSort(
|
|
4517
|
-
setSortOrder(
|
|
4532
|
+
case 'titleZA':
|
|
4533
|
+
setSort('title');
|
|
4534
|
+
setSortOrder('desc');
|
|
4518
4535
|
break;
|
|
4519
4536
|
}
|
|
4520
4537
|
};
|
|
@@ -4522,12 +4539,12 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4522
4539
|
const newFacets = {
|
|
4523
4540
|
...selectedFacets
|
|
4524
4541
|
};
|
|
4525
|
-
if (key ===
|
|
4542
|
+
if (key === 'theme') {
|
|
4526
4543
|
const existingFacet = newFacets.theme.findIndex((s)=>s === value);
|
|
4527
4544
|
if (existingFacet > -1) newFacets.theme.splice(existingFacet, 1);
|
|
4528
4545
|
else newFacets.theme.push(value);
|
|
4529
4546
|
}
|
|
4530
|
-
if (key ===
|
|
4547
|
+
if (key === 'keyword') {
|
|
4531
4548
|
const existingFacet = newFacets.keyword.findIndex((s)=>s === value);
|
|
4532
4549
|
if (existingFacet > -1) newFacets.keyword.splice(existingFacet, 1);
|
|
4533
4550
|
else newFacets.keyword.push(value);
|
|
@@ -4541,7 +4558,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4541
4558
|
});
|
|
4542
4559
|
setSelectedFacets(newFacets);
|
|
4543
4560
|
const url = new URL(window.location.href);
|
|
4544
|
-
window.history.pushState({},
|
|
4561
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
4545
4562
|
}
|
|
4546
4563
|
const pageSize = defaultPageSize;
|
|
4547
4564
|
function resetFilters() {
|
|
@@ -4550,14 +4567,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4550
4567
|
setSelectedFacets(defaultSelectedFacets);
|
|
4551
4568
|
setPage(defaultPage);
|
|
4552
4569
|
const url = new URL(window.location.href);
|
|
4553
|
-
window.history.pushState({},
|
|
4570
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}`);
|
|
4554
4571
|
}
|
|
4555
4572
|
function buildSearchParams(includePage) {
|
|
4556
4573
|
let newParams = {};
|
|
4557
4574
|
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
4558
4575
|
if (sort !== defaultSort.defaultSort) newParams.sort = sort;
|
|
4559
4576
|
if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
|
|
4560
|
-
if (fulltext !==
|
|
4577
|
+
if (fulltext !== '') newParams.fulltext = fulltext;
|
|
4561
4578
|
if (Object.keys(selectedFacets).length) Object.keys(selectedFacets).forEach((key)=>{
|
|
4562
4579
|
newParams[key] = selectedFacets[key];
|
|
4563
4580
|
});
|
|
@@ -4570,9 +4587,9 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4570
4587
|
fulltext: fulltext ? fulltext : undefined,
|
|
4571
4588
|
...selectedFacets,
|
|
4572
4589
|
sort: sort ? sort : undefined,
|
|
4573
|
-
[
|
|
4590
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
4574
4591
|
page: page !== 1 ? page : undefined,
|
|
4575
|
-
[
|
|
4592
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
4576
4593
|
};
|
|
4577
4594
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4578
4595
|
queryKey: [
|
|
@@ -4581,7 +4598,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4581
4598
|
],
|
|
4582
4599
|
queryFn: ()=>{
|
|
4583
4600
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4584
|
-
arrayFormat:
|
|
4601
|
+
arrayFormat: 'comma',
|
|
4585
4602
|
encode: false
|
|
4586
4603
|
})}`);
|
|
4587
4604
|
}
|
|
@@ -4626,8 +4643,8 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4626
4643
|
]);
|
|
4627
4644
|
(0, $hgUW1$useEffect)(()=>{
|
|
4628
4645
|
// No results found
|
|
4629
|
-
if (noResults) setAnnouncementText(
|
|
4630
|
-
else if (!isPending && (!data || !data.data.results)) setAnnouncementText(
|
|
4646
|
+
if (noResults) setAnnouncementText('No results found.');
|
|
4647
|
+
else if (!isPending && (!data || !data.data.results)) setAnnouncementText('Could not connect to the API.');
|
|
4631
4648
|
else setAnnouncementText(`Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`);
|
|
4632
4649
|
}, [
|
|
4633
4650
|
data,
|
|
@@ -4685,7 +4702,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4685
4702
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4686
4703
|
fieldClassName: "ds-u-margin--0",
|
|
4687
4704
|
value: filterText,
|
|
4688
|
-
className: `ds-u-padding-right--2 ${altMobileSearchButton ?
|
|
4705
|
+
className: `ds-u-padding-right--2 ${altMobileSearchButton ? 'ds-l-col--12 ds-l-md-col--10 --alt-style' : 'ds-l-col--10'}`,
|
|
4689
4706
|
label: "Search datasets",
|
|
4690
4707
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4691
4708
|
placeholder: "Search datasets",
|
|
@@ -4745,7 +4762,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4745
4762
|
"Showing ",
|
|
4746
4763
|
currentResultNumbers.startingNumber,
|
|
4747
4764
|
" -",
|
|
4748
|
-
|
|
4765
|
+
' ',
|
|
4749
4766
|
currentResultNumbers.endingNumber,
|
|
4750
4767
|
" of ",
|
|
4751
4768
|
data.data.total,
|
|
@@ -4816,7 +4833,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4816
4833
|
},
|
|
4817
4834
|
renderHref: (page)=>{
|
|
4818
4835
|
const searchParams = buildSearchParams(false);
|
|
4819
|
-
const includeAnd = searchParams ?
|
|
4836
|
+
const includeAnd = searchParams ? '&' : '';
|
|
4820
4837
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
4821
4838
|
}
|
|
4822
4839
|
})
|
|
@@ -4850,26 +4867,26 @@ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
4850
4867
|
|
|
4851
4868
|
|
|
4852
4869
|
const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4853
|
-
defaultSort:
|
|
4854
|
-
defaultOrder:
|
|
4855
|
-
}, pageTitle: pageTitle =
|
|
4870
|
+
defaultSort: 'modified',
|
|
4871
|
+
defaultOrder: 'desc'
|
|
4872
|
+
}, pageTitle: pageTitle = 'What\'s New ', showLargeFileWarning: showLargeFileWarning = false, introText: introText = '', dataDictionaryLinks: dataDictionaryLinks = false })=>{
|
|
4856
4873
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4857
4874
|
const sortOptions = [
|
|
4858
4875
|
{
|
|
4859
|
-
label:
|
|
4860
|
-
value:
|
|
4876
|
+
label: 'Newest',
|
|
4877
|
+
value: 'newest'
|
|
4861
4878
|
},
|
|
4862
4879
|
{
|
|
4863
|
-
label:
|
|
4864
|
-
value:
|
|
4880
|
+
label: 'Oldest',
|
|
4881
|
+
value: 'oldest'
|
|
4865
4882
|
},
|
|
4866
4883
|
{
|
|
4867
|
-
label:
|
|
4868
|
-
value:
|
|
4884
|
+
label: 'Title A-Z',
|
|
4885
|
+
value: 'titleAZ'
|
|
4869
4886
|
},
|
|
4870
4887
|
{
|
|
4871
|
-
label:
|
|
4872
|
-
value:
|
|
4888
|
+
label: 'Title Z-A',
|
|
4889
|
+
value: 'titleZA'
|
|
4873
4890
|
}
|
|
4874
4891
|
];
|
|
4875
4892
|
const defaultSortBy = "";
|
|
@@ -4883,33 +4900,33 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4883
4900
|
endingNumber: 0
|
|
4884
4901
|
});
|
|
4885
4902
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4886
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4903
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)('');
|
|
4887
4904
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4888
4905
|
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
4889
4906
|
const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
|
|
4890
4907
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4891
4908
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4892
4909
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4893
|
-
return sort ===
|
|
4910
|
+
return sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
|
|
4894
4911
|
});
|
|
4895
4912
|
const setSortOptions = (value)=>{
|
|
4896
4913
|
setSortDisplay(value);
|
|
4897
4914
|
switch(value){
|
|
4898
|
-
case
|
|
4899
|
-
setSort(
|
|
4900
|
-
setSortOrder(
|
|
4915
|
+
case 'newest':
|
|
4916
|
+
setSort('modified');
|
|
4917
|
+
setSortOrder('desc');
|
|
4901
4918
|
break;
|
|
4902
|
-
case
|
|
4903
|
-
setSort(
|
|
4904
|
-
setSortOrder(
|
|
4919
|
+
case 'oldest':
|
|
4920
|
+
setSort('modified');
|
|
4921
|
+
setSortOrder('asc');
|
|
4905
4922
|
break;
|
|
4906
|
-
case
|
|
4907
|
-
setSort(
|
|
4908
|
-
setSortOrder(
|
|
4923
|
+
case 'titleAZ':
|
|
4924
|
+
setSort('title');
|
|
4925
|
+
setSortOrder('asc');
|
|
4909
4926
|
break;
|
|
4910
|
-
case
|
|
4911
|
-
setSort(
|
|
4912
|
-
setSortOrder(
|
|
4927
|
+
case 'titleZA':
|
|
4928
|
+
setSort('title');
|
|
4929
|
+
setSortOrder('desc');
|
|
4913
4930
|
break;
|
|
4914
4931
|
}
|
|
4915
4932
|
};
|
|
@@ -4926,9 +4943,9 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4926
4943
|
}
|
|
4927
4944
|
let params = {
|
|
4928
4945
|
sort: sort ? sort : undefined,
|
|
4929
|
-
[
|
|
4946
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
4930
4947
|
page: page !== 1 ? page : undefined,
|
|
4931
|
-
[
|
|
4948
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
4932
4949
|
};
|
|
4933
4950
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4934
4951
|
queryKey: [
|
|
@@ -4937,7 +4954,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4937
4954
|
],
|
|
4938
4955
|
queryFn: ()=>{
|
|
4939
4956
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4940
|
-
arrayFormat:
|
|
4957
|
+
arrayFormat: 'comma',
|
|
4941
4958
|
encode: false
|
|
4942
4959
|
})}`);
|
|
4943
4960
|
}
|
|
@@ -4947,7 +4964,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4947
4964
|
// Update browser URL with current search params
|
|
4948
4965
|
const params = buildSearchParams(true);
|
|
4949
4966
|
const url = new URL(window.location.href);
|
|
4950
|
-
window.history.pushState({},
|
|
4967
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${params}`);
|
|
4951
4968
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4952
4969
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4953
4970
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -4973,8 +4990,8 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4973
4990
|
]);
|
|
4974
4991
|
(0, $hgUW1$useEffect)(()=>{
|
|
4975
4992
|
// No results found
|
|
4976
|
-
if (noResults) setAnnouncementText(
|
|
4977
|
-
else if (!isPending && (!data || !data.data.results)) setAnnouncementText(
|
|
4993
|
+
if (noResults) setAnnouncementText('No results found.');
|
|
4994
|
+
else if (!isPending && (!data || !data.data.results)) setAnnouncementText('Could not connect to the API.');
|
|
4978
4995
|
else setAnnouncementText(`Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`);
|
|
4979
4996
|
}, [
|
|
4980
4997
|
data,
|
|
@@ -5047,7 +5064,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5047
5064
|
"Showing ",
|
|
5048
5065
|
currentResultNumbers.startingNumber,
|
|
5049
5066
|
" -",
|
|
5050
|
-
|
|
5067
|
+
' ',
|
|
5051
5068
|
currentResultNumbers.endingNumber,
|
|
5052
5069
|
" of ",
|
|
5053
5070
|
data.data.total,
|
|
@@ -5107,7 +5124,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5107
5124
|
},
|
|
5108
5125
|
renderHref: (page)=>{
|
|
5109
5126
|
const searchParams = buildSearchParams(false);
|
|
5110
|
-
const includeAnd = searchParams ?
|
|
5127
|
+
const includeAnd = searchParams ? '&' : '';
|
|
5111
5128
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
5112
5129
|
}
|
|
5113
5130
|
})
|
|
@@ -5139,12 +5156,12 @@ var $550bcc185f420ff5$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
5139
5156
|
|
|
5140
5157
|
const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
5141
5158
|
const [dataset, setDataset] = (0, $hgUW1$useState)({
|
|
5142
|
-
title:
|
|
5159
|
+
title: '',
|
|
5143
5160
|
distribution: [],
|
|
5144
|
-
error:
|
|
5145
|
-
description:
|
|
5146
|
-
identifier:
|
|
5147
|
-
modified:
|
|
5161
|
+
error: '',
|
|
5162
|
+
description: '',
|
|
5163
|
+
identifier: '',
|
|
5164
|
+
modified: ''
|
|
5148
5165
|
});
|
|
5149
5166
|
const [id, setId] = (0, $hgUW1$useState)(datasetId);
|
|
5150
5167
|
const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
|
|
@@ -5154,7 +5171,7 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
|
5154
5171
|
"metastore" + id
|
|
5155
5172
|
],
|
|
5156
5173
|
queryFn: ()=>{
|
|
5157
|
-
return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ?
|
|
5174
|
+
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)=>{
|
|
5158
5175
|
return {
|
|
5159
5176
|
title: dataset.title,
|
|
5160
5177
|
distribution: dataset.distribution,
|
|
@@ -5210,7 +5227,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5210
5227
|
// const [joins, setJoins] = useState()
|
|
5211
5228
|
const [properties, setProperties] = (0, $hgUW1$useState)(options.properties ? options.properties : undefined);
|
|
5212
5229
|
// Check drupalSettings for datastore_query_api
|
|
5213
|
-
const useDatasetAPI = typeof window !==
|
|
5230
|
+
const useDatasetAPI = typeof window !== 'undefined' && window.drupalSettings?.datastore_query_api === true;
|
|
5214
5231
|
const datasetID = additionalParams.datasetID;
|
|
5215
5232
|
// Remove datasetID from params to avoid sending it to the API
|
|
5216
5233
|
const { datasetID: _, ...restAdditionalParams } = additionalParams;
|
|
@@ -5225,7 +5242,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5225
5242
|
...restAdditionalParams
|
|
5226
5243
|
};
|
|
5227
5244
|
params = (0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA);
|
|
5228
|
-
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` :
|
|
5245
|
+
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : '';
|
|
5229
5246
|
let enabled = false;
|
|
5230
5247
|
if (id) {
|
|
5231
5248
|
if (!requireConditions) enabled = true;
|
|
@@ -5307,65 +5324,65 @@ var $1d3d480a9cfaabe0$export$2e2bcd8739ae039 = $1d3d480a9cfaabe0$var$useDatastor
|
|
|
5307
5324
|
|
|
5308
5325
|
|
|
5309
5326
|
const $28f16f59778efa64$export$82b1b1d517e5388a = {
|
|
5310
|
-
|
|
5311
|
-
name:
|
|
5327
|
+
'R/P10Y': {
|
|
5328
|
+
name: 'Decennial'
|
|
5312
5329
|
},
|
|
5313
|
-
|
|
5314
|
-
name:
|
|
5330
|
+
'R/P4Y': {
|
|
5331
|
+
name: 'Quadrennial'
|
|
5315
5332
|
},
|
|
5316
|
-
|
|
5317
|
-
name:
|
|
5333
|
+
'R/P1Y': {
|
|
5334
|
+
name: 'Annual'
|
|
5318
5335
|
},
|
|
5319
|
-
|
|
5320
|
-
name:
|
|
5336
|
+
'R/P2M': {
|
|
5337
|
+
name: 'Bimonthly'
|
|
5321
5338
|
},
|
|
5322
|
-
|
|
5323
|
-
name:
|
|
5339
|
+
'R/P3.5D': {
|
|
5340
|
+
name: 'Semiweekly'
|
|
5324
5341
|
},
|
|
5325
|
-
|
|
5326
|
-
name:
|
|
5342
|
+
'R/P1D': {
|
|
5343
|
+
name: 'Daily'
|
|
5327
5344
|
},
|
|
5328
|
-
|
|
5329
|
-
name:
|
|
5345
|
+
'R/P2W': {
|
|
5346
|
+
name: 'Biweekly'
|
|
5330
5347
|
},
|
|
5331
|
-
|
|
5332
|
-
name:
|
|
5348
|
+
'R/P6M': {
|
|
5349
|
+
name: 'Semiannual'
|
|
5333
5350
|
},
|
|
5334
|
-
|
|
5335
|
-
name:
|
|
5351
|
+
'R/P2Y': {
|
|
5352
|
+
name: 'Biennial'
|
|
5336
5353
|
},
|
|
5337
|
-
|
|
5338
|
-
name:
|
|
5354
|
+
'R/P3Y': {
|
|
5355
|
+
name: 'Triennial'
|
|
5339
5356
|
},
|
|
5340
|
-
|
|
5341
|
-
name:
|
|
5357
|
+
'R/P0.33W': {
|
|
5358
|
+
name: 'Three times a week'
|
|
5342
5359
|
},
|
|
5343
|
-
|
|
5344
|
-
name:
|
|
5360
|
+
'R/P0.33M': {
|
|
5361
|
+
name: 'Three times a month'
|
|
5345
5362
|
},
|
|
5346
|
-
|
|
5347
|
-
name:
|
|
5363
|
+
'R/PT1S': {
|
|
5364
|
+
name: 'Continuously updated'
|
|
5348
5365
|
},
|
|
5349
|
-
|
|
5350
|
-
name:
|
|
5366
|
+
'R/P1M': {
|
|
5367
|
+
name: 'Monthly'
|
|
5351
5368
|
},
|
|
5352
|
-
|
|
5353
|
-
name:
|
|
5369
|
+
'R/P3M': {
|
|
5370
|
+
name: 'Quarterly'
|
|
5354
5371
|
},
|
|
5355
|
-
|
|
5356
|
-
name:
|
|
5372
|
+
'R/P0.5M': {
|
|
5373
|
+
name: 'Semimonthly'
|
|
5357
5374
|
},
|
|
5358
|
-
|
|
5359
|
-
name:
|
|
5375
|
+
'R/P4M': {
|
|
5376
|
+
name: 'Three times a year'
|
|
5360
5377
|
},
|
|
5361
|
-
|
|
5362
|
-
name:
|
|
5378
|
+
'R/P1W': {
|
|
5379
|
+
name: 'Weekly'
|
|
5363
5380
|
},
|
|
5364
|
-
|
|
5365
|
-
name:
|
|
5381
|
+
'R/PT1H': {
|
|
5382
|
+
name: 'Hourly'
|
|
5366
5383
|
},
|
|
5367
5384
|
irregular: {
|
|
5368
|
-
name:
|
|
5385
|
+
name: 'Irregular'
|
|
5369
5386
|
}
|
|
5370
5387
|
};
|
|
5371
5388
|
|
|
@@ -5374,7 +5391,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5374
5391
|
modified: (data)=>{
|
|
5375
5392
|
return [
|
|
5376
5393
|
{
|
|
5377
|
-
label:
|
|
5394
|
+
label: 'Modified',
|
|
5378
5395
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5379
5396
|
date: data
|
|
5380
5397
|
})
|
|
@@ -5384,7 +5401,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5384
5401
|
issued: (data)=>{
|
|
5385
5402
|
return [
|
|
5386
5403
|
{
|
|
5387
|
-
label:
|
|
5404
|
+
label: 'Issued',
|
|
5388
5405
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5389
5406
|
date: data
|
|
5390
5407
|
})
|
|
@@ -5394,7 +5411,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5394
5411
|
accrualPeriodicity: (data)=>{
|
|
5395
5412
|
return [
|
|
5396
5413
|
{
|
|
5397
|
-
label:
|
|
5414
|
+
label: 'Frequency',
|
|
5398
5415
|
value: (0, $28f16f59778efa64$export$82b1b1d517e5388a)[data].name
|
|
5399
5416
|
}
|
|
5400
5417
|
];
|
|
@@ -5402,7 +5419,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5402
5419
|
publisher: (data)=>{
|
|
5403
5420
|
if (data.data && data.data.name) return [
|
|
5404
5421
|
{
|
|
5405
|
-
label:
|
|
5422
|
+
label: 'Publisher',
|
|
5406
5423
|
value: data.data.name
|
|
5407
5424
|
}
|
|
5408
5425
|
];
|
|
@@ -5411,7 +5428,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5411
5428
|
identifier: (data)=>{
|
|
5412
5429
|
return [
|
|
5413
5430
|
{
|
|
5414
|
-
label:
|
|
5431
|
+
label: 'Identifier',
|
|
5415
5432
|
value: data
|
|
5416
5433
|
}
|
|
5417
5434
|
];
|
|
@@ -5419,11 +5436,11 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5419
5436
|
contactPoint: (data)=>{
|
|
5420
5437
|
let rows = [];
|
|
5421
5438
|
if (data.fn) rows.push({
|
|
5422
|
-
label:
|
|
5439
|
+
label: 'Contact',
|
|
5423
5440
|
value: data.fn
|
|
5424
5441
|
});
|
|
5425
5442
|
if (data.hasEmail) rows.push({
|
|
5426
|
-
label:
|
|
5443
|
+
label: 'Contact Email',
|
|
5427
5444
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5428
5445
|
href: data.hasEmail.includes("mailto:") ? data.hasEmail : `mailto:${data.hasEmail}`,
|
|
5429
5446
|
children: data.hasEmail.replace("mailto:", "")
|
|
@@ -5434,7 +5451,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5434
5451
|
bureauCode: (data)=>{
|
|
5435
5452
|
if (data.length) return [
|
|
5436
5453
|
{
|
|
5437
|
-
label:
|
|
5454
|
+
label: 'Bureau Code',
|
|
5438
5455
|
value: data[0]
|
|
5439
5456
|
}
|
|
5440
5457
|
];
|
|
@@ -5442,7 +5459,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5442
5459
|
programCode: (data)=>{
|
|
5443
5460
|
if (data.length) return [
|
|
5444
5461
|
{
|
|
5445
|
-
label:
|
|
5462
|
+
label: 'Program Code',
|
|
5446
5463
|
value: data[0]
|
|
5447
5464
|
}
|
|
5448
5465
|
];
|
|
@@ -5450,13 +5467,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5450
5467
|
theme: (data)=>{
|
|
5451
5468
|
return [
|
|
5452
5469
|
{
|
|
5453
|
-
label:
|
|
5470
|
+
label: 'Category',
|
|
5454
5471
|
value: data.map((theme)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5455
5472
|
to: `/datasets?theme[]=${theme.data}`,
|
|
5456
5473
|
children: theme.data
|
|
5457
5474
|
}, theme.data)).reduce((prev, curr)=>[
|
|
5458
5475
|
prev,
|
|
5459
|
-
|
|
5476
|
+
', ',
|
|
5460
5477
|
curr
|
|
5461
5478
|
])
|
|
5462
5479
|
}
|
|
@@ -5465,13 +5482,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5465
5482
|
keyword: (data)=>{
|
|
5466
5483
|
return [
|
|
5467
5484
|
{
|
|
5468
|
-
label:
|
|
5485
|
+
label: 'Tags',
|
|
5469
5486
|
value: data.map((keyword)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5470
5487
|
to: `/datasets?keyword[]=${keyword.data}`,
|
|
5471
5488
|
children: keyword.data
|
|
5472
5489
|
}, keyword.data)).reduce((prev, curr)=>[
|
|
5473
5490
|
prev,
|
|
5474
|
-
|
|
5491
|
+
', ',
|
|
5475
5492
|
curr
|
|
5476
5493
|
])
|
|
5477
5494
|
}
|
|
@@ -5480,7 +5497,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5480
5497
|
license: (data)=>{
|
|
5481
5498
|
return [
|
|
5482
5499
|
{
|
|
5483
|
-
label:
|
|
5500
|
+
label: 'License',
|
|
5484
5501
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5485
5502
|
href: data,
|
|
5486
5503
|
children: data
|
|
@@ -5491,7 +5508,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5491
5508
|
accessLevel: (data)=>{
|
|
5492
5509
|
return [
|
|
5493
5510
|
{
|
|
5494
|
-
label:
|
|
5511
|
+
label: 'Public Access Level',
|
|
5495
5512
|
value: data
|
|
5496
5513
|
}
|
|
5497
5514
|
];
|
|
@@ -5499,7 +5516,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5499
5516
|
temporal: (data)=>{
|
|
5500
5517
|
return [
|
|
5501
5518
|
{
|
|
5502
|
-
label:
|
|
5519
|
+
label: 'Temporal Coverage',
|
|
5503
5520
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5504
5521
|
className: "dc-c-word-break--all",
|
|
5505
5522
|
children: data
|
|
@@ -5510,7 +5527,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5510
5527
|
spatial: (data)=>{
|
|
5511
5528
|
return [
|
|
5512
5529
|
{
|
|
5513
|
-
label:
|
|
5530
|
+
label: 'Spacial/Geographical Coverage',
|
|
5514
5531
|
value: data
|
|
5515
5532
|
}
|
|
5516
5533
|
];
|
|
@@ -5518,7 +5535,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5518
5535
|
references: (data)=>{
|
|
5519
5536
|
return [
|
|
5520
5537
|
{
|
|
5521
|
-
label:
|
|
5538
|
+
label: 'Related Documents',
|
|
5522
5539
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
5523
5540
|
className: "ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0",
|
|
5524
5541
|
children: data.map((item)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -5556,7 +5573,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ distribution: distribution,
|
|
|
5556
5573
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
5557
5574
|
const { data: resource } = (0, $hgUW1$useQuery)({
|
|
5558
5575
|
queryKey: [
|
|
5559
|
-
|
|
5576
|
+
'resource-information',
|
|
5560
5577
|
distribution.identifier
|
|
5561
5578
|
],
|
|
5562
5579
|
queryFn: ()=>(0, $hgUW1$axios).get(`${rootUrl}/datastore/query/${distribution.identifier}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({
|
|
@@ -5583,7 +5600,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ distribution: distribution,
|
|
|
5583
5600
|
}),
|
|
5584
5601
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5585
5602
|
className: "ds-u-font-weight--bold",
|
|
5586
|
-
children: resource?.count ? Number(resource.count).toLocaleString() :
|
|
5603
|
+
children: resource?.count ? Number(resource.count).toLocaleString() : ''
|
|
5587
5604
|
})
|
|
5588
5605
|
]
|
|
5589
5606
|
}),
|
|
@@ -5651,8 +5668,8 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5651
5668
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
5652
5669
|
href: dist.data.downloadURL,
|
|
5653
5670
|
style: {
|
|
5654
|
-
order: sm ?
|
|
5655
|
-
width: sm ?
|
|
5671
|
+
order: sm ? '1' : '0',
|
|
5672
|
+
width: sm ? '100%' : 'auto'
|
|
5656
5673
|
},
|
|
5657
5674
|
"aria-label": `Download ${dist.data.title || title} ${fileFormat}`,
|
|
5658
5675
|
className: "ds-c-button",
|
|
@@ -5665,7 +5682,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5665
5682
|
})
|
|
5666
5683
|
}),
|
|
5667
5684
|
dist.data.description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5668
|
-
className:
|
|
5685
|
+
className: 'ds-u-measure--wide ds-u-margin-bottom--7',
|
|
5669
5686
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5670
5687
|
className: "dc-c-metadata-description ds-u-margin--0",
|
|
5671
5688
|
dangerouslySetInnerHTML: {
|
|
@@ -5739,7 +5756,7 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5739
5756
|
const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
|
|
5740
5757
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
5741
5758
|
children: [
|
|
5742
|
-
md ?
|
|
5759
|
+
md ? '' : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5743
5760
|
component: "th",
|
|
5744
5761
|
className: "ds-u-font-weight--bold",
|
|
5745
5762
|
children: [
|
|
@@ -5751,8 +5768,8 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5751
5768
|
ariaLabel: r.label,
|
|
5752
5769
|
// @ts-ignore
|
|
5753
5770
|
style: {
|
|
5754
|
-
border:
|
|
5755
|
-
background:
|
|
5771
|
+
border: 'none',
|
|
5772
|
+
background: 'none'
|
|
5756
5773
|
},
|
|
5757
5774
|
maxWidth: "400px",
|
|
5758
5775
|
placement: "auto",
|
|
@@ -5811,10 +5828,10 @@ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: ap
|
|
|
5811
5828
|
href: apiUrl,
|
|
5812
5829
|
children: [
|
|
5813
5830
|
"View API",
|
|
5814
|
-
|
|
5831
|
+
' ',
|
|
5815
5832
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5816
5833
|
style: {
|
|
5817
|
-
whiteSpace:
|
|
5834
|
+
whiteSpace: 'nowrap'
|
|
5818
5835
|
},
|
|
5819
5836
|
children: [
|
|
5820
5837
|
"specification ",
|
|
@@ -5855,20 +5872,20 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
|
|
|
5855
5872
|
|
|
5856
5873
|
const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
|
|
5857
5874
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
5858
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
5875
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
|
|
5859
5876
|
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
5860
5877
|
minWidth: 0,
|
|
5861
5878
|
maxWidth: 544
|
|
5862
5879
|
});
|
|
5863
5880
|
const sortElement = (isSorted)=>{
|
|
5864
|
-
if (isSorted ===
|
|
5865
|
-
if (isSorted ===
|
|
5866
|
-
return
|
|
5881
|
+
if (isSorted === 'asc') return 'dc-c-sort--asc';
|
|
5882
|
+
if (isSorted === 'desc') return 'dc-c-sort--desc';
|
|
5883
|
+
return 'dc-c-sort--default';
|
|
5867
5884
|
};
|
|
5868
5885
|
const table = (0, $hgUW1$useReactTable)({
|
|
5869
5886
|
data: tableData,
|
|
5870
5887
|
columns: tableColumns,
|
|
5871
|
-
columnResizeMode:
|
|
5888
|
+
columnResizeMode: 'onChange',
|
|
5872
5889
|
getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
|
|
5873
5890
|
getFilteredRowModel: (0, $hgUW1$getFilteredRowModel)(),
|
|
5874
5891
|
getPaginationRowModel: (0, $hgUW1$getPaginationRowModel)(),
|
|
@@ -5887,49 +5904,49 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5887
5904
|
});
|
|
5888
5905
|
const sortOptions = [
|
|
5889
5906
|
{
|
|
5890
|
-
value:
|
|
5891
|
-
label:
|
|
5907
|
+
value: 'default',
|
|
5908
|
+
label: 'No Sort'
|
|
5892
5909
|
},
|
|
5893
5910
|
{
|
|
5894
|
-
value:
|
|
5895
|
-
label:
|
|
5911
|
+
value: 'titleasc',
|
|
5912
|
+
label: 'Title A-Z'
|
|
5896
5913
|
},
|
|
5897
5914
|
{
|
|
5898
|
-
value:
|
|
5899
|
-
label:
|
|
5915
|
+
value: 'titledesc',
|
|
5916
|
+
label: 'Title Z-A'
|
|
5900
5917
|
},
|
|
5901
5918
|
{
|
|
5902
|
-
value:
|
|
5903
|
-
label:
|
|
5919
|
+
value: 'typeasc',
|
|
5920
|
+
label: 'Type A-Z'
|
|
5904
5921
|
},
|
|
5905
5922
|
{
|
|
5906
|
-
value:
|
|
5907
|
-
label:
|
|
5923
|
+
value: 'typedesc',
|
|
5924
|
+
label: 'Type Z-A'
|
|
5908
5925
|
}
|
|
5909
5926
|
];
|
|
5910
5927
|
const sortStatesLookup = {
|
|
5911
5928
|
default: [],
|
|
5912
5929
|
titleasc: [
|
|
5913
5930
|
{
|
|
5914
|
-
id:
|
|
5931
|
+
id: 'titleResizable',
|
|
5915
5932
|
desc: false
|
|
5916
5933
|
}
|
|
5917
5934
|
],
|
|
5918
5935
|
titledesc: [
|
|
5919
5936
|
{
|
|
5920
|
-
id:
|
|
5937
|
+
id: 'titleResizable',
|
|
5921
5938
|
desc: true
|
|
5922
5939
|
}
|
|
5923
5940
|
],
|
|
5924
5941
|
typeasc: [
|
|
5925
5942
|
{
|
|
5926
|
-
id:
|
|
5943
|
+
id: 'type',
|
|
5927
5944
|
desc: false
|
|
5928
5945
|
}
|
|
5929
5946
|
],
|
|
5930
5947
|
typedesc: [
|
|
5931
5948
|
{
|
|
5932
|
-
id:
|
|
5949
|
+
id: 'type',
|
|
5933
5950
|
desc: true
|
|
5934
5951
|
}
|
|
5935
5952
|
]
|
|
@@ -5957,7 +5974,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5957
5974
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
5958
5975
|
className: "dc-c-datatable",
|
|
5959
5976
|
style: {
|
|
5960
|
-
width:
|
|
5977
|
+
width: '100%'
|
|
5961
5978
|
},
|
|
5962
5979
|
stackable: true,
|
|
5963
5980
|
children: [
|
|
@@ -5970,16 +5987,16 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5970
5987
|
header: header,
|
|
5971
5988
|
setAriaLiveFeedback: setAriaLiveFeedback,
|
|
5972
5989
|
sortElement: sortElement,
|
|
5973
|
-
id:
|
|
5990
|
+
id: 'dataDictionary_' + header.id
|
|
5974
5991
|
}, header.id + "_resize") : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5975
5992
|
key: header.id,
|
|
5976
5993
|
className: `ds-u-border-y--2 ds-u-border--dark ds-u-border-x--0`,
|
|
5977
|
-
id:
|
|
5994
|
+
id: 'dataDictionary_' + header.id,
|
|
5978
5995
|
children: [
|
|
5979
5996
|
(0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext()),
|
|
5980
|
-
header.id ===
|
|
5997
|
+
header.id === 'type' && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
5981
5998
|
onClick: header.column.getToggleSortingHandler(),
|
|
5982
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
5999
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : '',
|
|
5983
6000
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
5984
6001
|
})
|
|
5985
6002
|
]
|
|
@@ -5994,12 +6011,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5994
6011
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
5995
6012
|
key: cell.id,
|
|
5996
6013
|
style: {
|
|
5997
|
-
maxWidth: mobile ?
|
|
5998
|
-
whiteSpace: cell.column.id === "description" ?
|
|
6014
|
+
maxWidth: mobile ? '100%' : cell.column.getSize(),
|
|
6015
|
+
whiteSpace: cell.column.id === "description" ? 'pre-wrap' : 'normal'
|
|
5999
6016
|
},
|
|
6000
|
-
className: `${cell.column.id ===
|
|
6001
|
-
headers:
|
|
6002
|
-
stackedTitle: cell.column.id ===
|
|
6017
|
+
className: `${cell.column.id === 'titleResizable' ? 'ds-u-word-break' : ''}`,
|
|
6018
|
+
headers: 'dataDictionary_' + cell.column.id,
|
|
6019
|
+
stackedTitle: cell.column.id === 'titleResizable' ? 'Title' : cell.column.columnDef.header,
|
|
6003
6020
|
children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
6004
6021
|
});
|
|
6005
6022
|
})
|
|
@@ -6028,7 +6045,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
6028
6045
|
table.setPageIndex(page - 1);
|
|
6029
6046
|
},
|
|
6030
6047
|
renderHref: (page)=>`/page=${page}`
|
|
6031
|
-
}) :
|
|
6048
|
+
}) : ''
|
|
6032
6049
|
]
|
|
6033
6050
|
});
|
|
6034
6051
|
};
|
|
@@ -6038,17 +6055,17 @@ var $6765a74df807d015$export$2e2bcd8739ae039 = $6765a74df807d015$var$DataDiction
|
|
|
6038
6055
|
const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
|
|
6039
6056
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
6040
6057
|
const tableColumns = [
|
|
6041
|
-
columnHelper.accessor(
|
|
6042
|
-
header:
|
|
6058
|
+
columnHelper.accessor('name', {
|
|
6059
|
+
header: 'Name'
|
|
6043
6060
|
}),
|
|
6044
|
-
columnHelper.accessor(
|
|
6045
|
-
header:
|
|
6061
|
+
columnHelper.accessor('title', {
|
|
6062
|
+
header: 'Title'
|
|
6046
6063
|
}),
|
|
6047
|
-
columnHelper.accessor(
|
|
6048
|
-
header:
|
|
6064
|
+
columnHelper.accessor('type', {
|
|
6065
|
+
header: 'Type'
|
|
6049
6066
|
}),
|
|
6050
|
-
columnHelper.accessor(
|
|
6051
|
-
header:
|
|
6067
|
+
columnHelper.accessor('format', {
|
|
6068
|
+
header: 'Format'
|
|
6052
6069
|
})
|
|
6053
6070
|
];
|
|
6054
6071
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6765a74df807d015$export$2e2bcd8739ae039), {
|
|
@@ -6092,7 +6109,7 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6092
6109
|
});
|
|
6093
6110
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
6094
6111
|
const tableColumns = [
|
|
6095
|
-
columnHelper.accessor(
|
|
6112
|
+
columnHelper.accessor('titleResizable', {
|
|
6096
6113
|
header: ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6097
6114
|
className: "dc-c-tooltip-width-override",
|
|
6098
6115
|
children: [
|
|
@@ -6101,8 +6118,8 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6101
6118
|
title: "Title represents the column headers of the data file",
|
|
6102
6119
|
// @ts-ignore
|
|
6103
6120
|
style: {
|
|
6104
|
-
border:
|
|
6105
|
-
background:
|
|
6121
|
+
border: 'none',
|
|
6122
|
+
background: 'none'
|
|
6106
6123
|
},
|
|
6107
6124
|
maxWidth: "400px",
|
|
6108
6125
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
|
|
@@ -6112,48 +6129,48 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6112
6129
|
size: 300,
|
|
6113
6130
|
minSize: 132
|
|
6114
6131
|
}),
|
|
6115
|
-
columnHelper.accessor(
|
|
6116
|
-
header:
|
|
6132
|
+
columnHelper.accessor('description', {
|
|
6133
|
+
header: 'Description',
|
|
6117
6134
|
minSize: 600
|
|
6118
6135
|
}),
|
|
6119
|
-
columnHelper.accessor(
|
|
6120
|
-
header:
|
|
6136
|
+
columnHelper.accessor('type', {
|
|
6137
|
+
header: 'Type',
|
|
6121
6138
|
size: 150,
|
|
6122
6139
|
enableResizing: false
|
|
6123
6140
|
})
|
|
6124
6141
|
];
|
|
6125
6142
|
const typeOptions = [
|
|
6126
6143
|
{
|
|
6127
|
-
value:
|
|
6128
|
-
label:
|
|
6144
|
+
value: 'all',
|
|
6145
|
+
label: 'All Types'
|
|
6129
6146
|
},
|
|
6130
6147
|
{
|
|
6131
|
-
value:
|
|
6132
|
-
label:
|
|
6148
|
+
value: 'string',
|
|
6149
|
+
label: 'String'
|
|
6133
6150
|
},
|
|
6134
6151
|
{
|
|
6135
|
-
value:
|
|
6136
|
-
label:
|
|
6152
|
+
value: 'date',
|
|
6153
|
+
label: 'Date'
|
|
6137
6154
|
},
|
|
6138
6155
|
{
|
|
6139
|
-
value:
|
|
6140
|
-
label:
|
|
6156
|
+
value: 'datetime',
|
|
6157
|
+
label: 'Datetime'
|
|
6141
6158
|
},
|
|
6142
6159
|
{
|
|
6143
|
-
value:
|
|
6144
|
-
label:
|
|
6160
|
+
value: 'year',
|
|
6161
|
+
label: 'Year'
|
|
6145
6162
|
},
|
|
6146
6163
|
{
|
|
6147
|
-
value:
|
|
6148
|
-
label:
|
|
6164
|
+
value: 'integer',
|
|
6165
|
+
label: 'Integer'
|
|
6149
6166
|
},
|
|
6150
6167
|
{
|
|
6151
|
-
value:
|
|
6152
|
-
label:
|
|
6168
|
+
value: 'number',
|
|
6169
|
+
label: 'Number'
|
|
6153
6170
|
},
|
|
6154
6171
|
{
|
|
6155
|
-
value:
|
|
6156
|
-
label:
|
|
6172
|
+
value: 'boolean',
|
|
6173
|
+
label: 'Boolean'
|
|
6157
6174
|
}
|
|
6158
6175
|
];
|
|
6159
6176
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -6260,7 +6277,7 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
|
|
|
6260
6277
|
href: datasetDictionaryEndpoint + "/csv",
|
|
6261
6278
|
className: "ds-c-button",
|
|
6262
6279
|
style: {
|
|
6263
|
-
width:
|
|
6280
|
+
width: '100%'
|
|
6264
6281
|
},
|
|
6265
6282
|
children: [
|
|
6266
6283
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
@@ -6317,7 +6334,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6317
6334
|
const [description, setDescription] = (0, $hgUW1$useState)("");
|
|
6318
6335
|
if (!distribution && !dataset?.identifier) return null;
|
|
6319
6336
|
(0, $hgUW1$useEffect)(()=>{
|
|
6320
|
-
let newDescription =
|
|
6337
|
+
let newDescription = '';
|
|
6321
6338
|
if (customDescription) newDescription = customDescription(dataset, distribution, resource);
|
|
6322
6339
|
else {
|
|
6323
6340
|
if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
|
|
@@ -6332,7 +6349,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6332
6349
|
customDescription
|
|
6333
6350
|
]);
|
|
6334
6351
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6335
|
-
className:
|
|
6352
|
+
className: 'ds-u-measure--wide ds-u-margin-bottom--7',
|
|
6336
6353
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6337
6354
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
6338
6355
|
children: typeof description === "string" ? /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6356,7 +6373,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
6356
6373
|
],
|
|
6357
6374
|
queryFn: ()=>{
|
|
6358
6375
|
return fetch(`${dataDictionaryUrl}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA), {
|
|
6359
|
-
arrayFormat:
|
|
6376
|
+
arrayFormat: 'comma',
|
|
6360
6377
|
encode: false
|
|
6361
6378
|
})}`).then((res)=>res.json());
|
|
6362
6379
|
}
|
|
@@ -6375,7 +6392,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6375
6392
|
conditions: []
|
|
6376
6393
|
};
|
|
6377
6394
|
const { dataset: dataset, isPending: isPending } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
6378
|
-
const title = dataset.title ? dataset.title :
|
|
6395
|
+
const title = dataset.title ? dataset.title : '';
|
|
6379
6396
|
const metadataMapping = {
|
|
6380
6397
|
...(0, $6da0396069e23175$export$bc27cf7ecf44639d),
|
|
6381
6398
|
...customMetadataMapping
|
|
@@ -6383,7 +6400,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6383
6400
|
let distribution = {};
|
|
6384
6401
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
6385
6402
|
if (distributions.length) distribution = distributions[0];
|
|
6386
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
6403
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
6387
6404
|
...options,
|
|
6388
6405
|
limit: defaultPageSize
|
|
6389
6406
|
}, {
|
|
@@ -6397,7 +6414,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6397
6414
|
}) : null;
|
|
6398
6415
|
(0, $hgUW1$useEffect)(()=>{
|
|
6399
6416
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6400
|
-
if (localFileFormat ===
|
|
6417
|
+
if (localFileFormat === 'csv') resource.setResource(distribution.identifier);
|
|
6401
6418
|
}, [
|
|
6402
6419
|
distribution
|
|
6403
6420
|
]);
|
|
@@ -6452,26 +6469,26 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6452
6469
|
distribution,
|
|
6453
6470
|
window.location.hash
|
|
6454
6471
|
]);
|
|
6455
|
-
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType ===
|
|
6472
|
+
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === 'application/vnd.tableschema+json' || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
6456
6473
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6457
6474
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
6458
6475
|
content: notFoundContent,
|
|
6459
6476
|
siteUrl: rootUrl
|
|
6460
6477
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6461
|
-
className:
|
|
6478
|
+
className: 'ds-l-container',
|
|
6462
6479
|
children: [
|
|
6463
6480
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6464
|
-
className:
|
|
6481
|
+
className: 'ds-l-row',
|
|
6465
6482
|
children: [
|
|
6466
6483
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6467
|
-
className:
|
|
6484
|
+
className: 'ds-l-md-col--9',
|
|
6468
6485
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
6469
6486
|
className: "ds-text-heading--3xl",
|
|
6470
6487
|
children: title
|
|
6471
6488
|
})
|
|
6472
6489
|
}),
|
|
6473
6490
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6474
|
-
className:
|
|
6491
|
+
className: 'ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right',
|
|
6475
6492
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
6476
6493
|
className: "ds-u-margin--0",
|
|
6477
6494
|
children: [
|
|
@@ -6483,7 +6500,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6483
6500
|
})
|
|
6484
6501
|
}),
|
|
6485
6502
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6486
|
-
className:
|
|
6503
|
+
className: 'ds-l-md-col--9',
|
|
6487
6504
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
6488
6505
|
distribution: distribution,
|
|
6489
6506
|
dataset: dataset,
|
|
@@ -6495,9 +6512,9 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6495
6512
|
]
|
|
6496
6513
|
}),
|
|
6497
6514
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6498
|
-
className:
|
|
6515
|
+
className: 'ds-l-row',
|
|
6499
6516
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6500
|
-
className:
|
|
6517
|
+
className: 'ds-l-md-col--12 dc-dataset',
|
|
6501
6518
|
children: !isPending && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tabs), {
|
|
6502
6519
|
onChange: (selectedId, prevSelectedId)=>{
|
|
6503
6520
|
setSelectedTab(selectedId);
|
|
@@ -6505,7 +6522,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6505
6522
|
selectedId: selectedTab,
|
|
6506
6523
|
children: [
|
|
6507
6524
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6508
|
-
id:
|
|
6525
|
+
id: 'data-table',
|
|
6509
6526
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6510
6527
|
className: "ds-u-color--primary",
|
|
6511
6528
|
children: [
|
|
@@ -6515,7 +6532,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6515
6532
|
"Data Table"
|
|
6516
6533
|
]
|
|
6517
6534
|
}),
|
|
6518
|
-
className: borderlessTabs ?
|
|
6535
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6519
6536
|
children: (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
6520
6537
|
value: {
|
|
6521
6538
|
id: id,
|
|
@@ -6532,7 +6549,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6532
6549
|
})
|
|
6533
6550
|
}),
|
|
6534
6551
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6535
|
-
id:
|
|
6552
|
+
id: 'overview',
|
|
6536
6553
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6537
6554
|
className: "ds-u-color--primary",
|
|
6538
6555
|
children: [
|
|
@@ -6542,7 +6559,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6542
6559
|
"Overview"
|
|
6543
6560
|
]
|
|
6544
6561
|
}),
|
|
6545
|
-
className: borderlessTabs ?
|
|
6562
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6546
6563
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
|
|
6547
6564
|
resource: resource,
|
|
6548
6565
|
dataset: dataset,
|
|
@@ -6552,7 +6569,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6552
6569
|
})
|
|
6553
6570
|
}),
|
|
6554
6571
|
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6555
|
-
id:
|
|
6572
|
+
id: 'data-dictionary',
|
|
6556
6573
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6557
6574
|
className: "ds-u-color--primary",
|
|
6558
6575
|
children: [
|
|
@@ -6562,7 +6579,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6562
6579
|
"Data Dictionary"
|
|
6563
6580
|
]
|
|
6564
6581
|
}),
|
|
6565
|
-
className: borderlessTabs ?
|
|
6582
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6566
6583
|
children: displayDataDictionaryTab ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
6567
6584
|
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
6568
6585
|
datasetDictionaryEndpoint: distribution.data.describedBy,
|
|
@@ -6573,7 +6590,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6573
6590
|
})
|
|
6574
6591
|
}),
|
|
6575
6592
|
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6576
|
-
id:
|
|
6593
|
+
id: 'api',
|
|
6577
6594
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6578
6595
|
className: "ds-u-color--primary",
|
|
6579
6596
|
children: [
|
|
@@ -6583,7 +6600,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6583
6600
|
"API"
|
|
6584
6601
|
]
|
|
6585
6602
|
}),
|
|
6586
|
-
className: borderlessTabs ?
|
|
6603
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6587
6604
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
|
|
6588
6605
|
id: id,
|
|
6589
6606
|
rootUrl: rootUrl,
|
|
@@ -6620,13 +6637,13 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6620
6637
|
});
|
|
6621
6638
|
const menu = (0, $hgUW1$useRef)(null);
|
|
6622
6639
|
function closeMobileMenu() {
|
|
6623
|
-
const mobileMenuButtonElement = document.querySelector(
|
|
6640
|
+
const mobileMenuButtonElement = document.querySelector('.dkan-c-mobile-menu-button');
|
|
6624
6641
|
if (!mobileMenuButtonElement) return;
|
|
6625
6642
|
mobileMenuButtonElement.focus();
|
|
6626
6643
|
}
|
|
6627
6644
|
// Close mobile menu with escape.
|
|
6628
6645
|
function handleMenuClose(event) {
|
|
6629
|
-
if (event.key ===
|
|
6646
|
+
if (event.key === 'Escape' && mobileMenuOpen) setMobileMenuOpen(false);
|
|
6630
6647
|
}
|
|
6631
6648
|
function handleClick(event) {
|
|
6632
6649
|
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
@@ -6661,7 +6678,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6661
6678
|
const focusableEls = getFocusableElements(menu.current).selectors.visible;
|
|
6662
6679
|
const firstEl = focusableEls[0];
|
|
6663
6680
|
const lastEl = focusableEls[focusableEls.length - 1];
|
|
6664
|
-
if (event.key ===
|
|
6681
|
+
if (event.key === 'Tab') {
|
|
6665
6682
|
if (event.shiftKey && document.activeElement === firstEl) {
|
|
6666
6683
|
lastEl?.focus();
|
|
6667
6684
|
event.preventDefault();
|
|
@@ -6673,15 +6690,15 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6673
6690
|
}
|
|
6674
6691
|
};
|
|
6675
6692
|
(0, $hgUW1$useEffect)(()=>{
|
|
6676
|
-
document.addEventListener(
|
|
6677
|
-
document.addEventListener(
|
|
6693
|
+
document.addEventListener('keyup', handleMenuClose);
|
|
6694
|
+
document.addEventListener('mousedown', handleClick);
|
|
6678
6695
|
if (mobileMenuOpen) handleFocusIn();
|
|
6679
6696
|
else closeMobileMenu();
|
|
6680
|
-
if (menu.current) menu.current.addEventListener(
|
|
6697
|
+
if (menu.current) menu.current.addEventListener('keydown', (evt)=>trapFocus(evt));
|
|
6681
6698
|
return ()=>{
|
|
6682
|
-
document.removeEventListener(
|
|
6683
|
-
document.addEventListener(
|
|
6684
|
-
if (menu.current) menu.current.removeEventListener(
|
|
6699
|
+
document.removeEventListener('keyup', handleMenuClose);
|
|
6700
|
+
document.addEventListener('mousedown', handleClick);
|
|
6701
|
+
if (menu.current) menu.current.removeEventListener('keydown', trapFocus);
|
|
6685
6702
|
};
|
|
6686
6703
|
}, [
|
|
6687
6704
|
mobileMenuOpen
|
|
@@ -6696,7 +6713,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6696
6713
|
},
|
|
6697
6714
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
|
|
6698
6715
|
"aria-label": "Site header",
|
|
6699
|
-
className: `dkan-c-header dkan-c-header--${mobileMax ?
|
|
6716
|
+
className: `dkan-c-header dkan-c-header--${mobileMax ? 'mobile' : 'desktop'}`,
|
|
6700
6717
|
children: [
|
|
6701
6718
|
topNav && topNav,
|
|
6702
6719
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6735,7 +6752,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6735
6752
|
onClick: clickHandler ? clickHandler : undefined,
|
|
6736
6753
|
children: [
|
|
6737
6754
|
innerHtml,
|
|
6738
|
-
link?.target ===
|
|
6755
|
+
link?.target === '_blank' && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ExternalLinkIcon), {
|
|
6739
6756
|
className: "ds-u-margin-left--05 ds-c-external-link-icon"
|
|
6740
6757
|
})
|
|
6741
6758
|
]
|
|
@@ -6745,7 +6762,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6745
6762
|
var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
|
|
6746
6763
|
|
|
6747
6764
|
|
|
6748
|
-
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle =
|
|
6765
|
+
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", {
|
|
6749
6766
|
children: [
|
|
6750
6767
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6751
6768
|
children: "A federal government website managed and paid for by the U.S. Centers for Medicare & Medicaid Services."
|
|
@@ -6833,14 +6850,14 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6833
6850
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
6834
6851
|
className: "ds-u-font-size--sm",
|
|
6835
6852
|
children: footerAdditionalResourcesLinks.filter((link)=>{
|
|
6836
|
-
const noOnClick = Object.keys(link).findIndex((l)=>l ===
|
|
6853
|
+
const noOnClick = Object.keys(link).findIndex((l)=>l === 'onClick');
|
|
6837
6854
|
if (noOnClick === -1 || link.onClick && link.dataTag) return link;
|
|
6838
6855
|
}).map((link)=>{
|
|
6839
6856
|
if (link.onClick && link.dataTag) return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
6840
6857
|
className: "ds-u-margin-bottom--1",
|
|
6841
6858
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
6842
6859
|
href: link.url,
|
|
6843
|
-
[
|
|
6860
|
+
['data-' + link.dataTag.name]: link.dataTag.value,
|
|
6844
6861
|
onClick: link.onClick,
|
|
6845
6862
|
children: link.label
|
|
6846
6863
|
})
|
|
@@ -6940,7 +6957,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6940
6957
|
children: [
|
|
6941
6958
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6942
6959
|
id: "svg-inline--fa-title-iRCARP7h6Kp3",
|
|
6943
|
-
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title :
|
|
6960
|
+
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title : 'CMS Facebook'
|
|
6944
6961
|
}),
|
|
6945
6962
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6946
6963
|
transform: "translate(160 256)",
|
|
@@ -6993,7 +7010,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6993
7010
|
children: [
|
|
6994
7011
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6995
7012
|
id: "svg-inline--fa-title-4z03ITiPPTVF",
|
|
6996
|
-
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title :
|
|
7013
|
+
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title : 'CMS Twitter'
|
|
6997
7014
|
}),
|
|
6998
7015
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6999
7016
|
transform: "translate(256 256)",
|
|
@@ -7046,7 +7063,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7046
7063
|
children: [
|
|
7047
7064
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7048
7065
|
id: "svg-inline--fa-title-Nm2qsuSKvuRZ",
|
|
7049
|
-
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title :
|
|
7066
|
+
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title : 'CMS LinkedIn'
|
|
7050
7067
|
}),
|
|
7051
7068
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
7052
7069
|
transform: "translate(224 256)",
|
|
@@ -7098,7 +7115,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7098
7115
|
children: [
|
|
7099
7116
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7100
7117
|
id: "svg-inline--fa-title-youtube",
|
|
7101
|
-
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title :
|
|
7118
|
+
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title : 'CMS youtube'
|
|
7102
7119
|
}),
|
|
7103
7120
|
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
7104
7121
|
fill: "currentColor",
|
|
@@ -7133,7 +7150,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7133
7150
|
className: "ds-u-margin-right--2",
|
|
7134
7151
|
children: [
|
|
7135
7152
|
link.label,
|
|
7136
|
-
link?.target ===
|
|
7153
|
+
link?.target === '_blank' && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ExternalLinkIcon), {
|
|
7137
7154
|
className: "ds-u-margin-left--05 ds-c-external-link-icon"
|
|
7138
7155
|
})
|
|
7139
7156
|
]
|
|
@@ -7203,26 +7220,26 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7203
7220
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
7204
7221
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
7205
7222
|
stackable: true,
|
|
7206
|
-
className:
|
|
7223
|
+
className: 'ds-c-table',
|
|
7207
7224
|
children: [
|
|
7208
7225
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
|
|
7209
7226
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
7210
7227
|
children: [
|
|
7211
7228
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7212
|
-
id:
|
|
7213
|
-
headers:
|
|
7229
|
+
id: 'application',
|
|
7230
|
+
headers: 'Application',
|
|
7214
7231
|
children: "Application"
|
|
7215
|
-
},
|
|
7232
|
+
}, 'Application'),
|
|
7216
7233
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7217
|
-
id:
|
|
7218
|
-
headers:
|
|
7234
|
+
id: 'notes',
|
|
7235
|
+
headers: 'Notes',
|
|
7219
7236
|
children: "Notes"
|
|
7220
|
-
},
|
|
7237
|
+
}, 'Notes'),
|
|
7221
7238
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7222
|
-
id:
|
|
7223
|
-
headers:
|
|
7239
|
+
id: 'links',
|
|
7240
|
+
headers: 'Links',
|
|
7224
7241
|
children: "Links"
|
|
7225
|
-
},
|
|
7242
|
+
}, 'Links')
|
|
7226
7243
|
]
|
|
7227
7244
|
})
|
|
7228
7245
|
}),
|
|
@@ -7232,19 +7249,19 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7232
7249
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7233
7250
|
id: d.id,
|
|
7234
7251
|
stackedTitle: "Application",
|
|
7235
|
-
headers:
|
|
7252
|
+
headers: 'Application',
|
|
7236
7253
|
children: d.application
|
|
7237
7254
|
}, d.id),
|
|
7238
7255
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7239
7256
|
id: d.id,
|
|
7240
7257
|
stackedTitle: "Notes",
|
|
7241
|
-
headers:
|
|
7258
|
+
headers: 'Notes',
|
|
7242
7259
|
children: d.notes
|
|
7243
7260
|
}, `${d.id}-notes`),
|
|
7244
7261
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7245
7262
|
id: d.id,
|
|
7246
7263
|
stackedTitle: "Links",
|
|
7247
|
-
headers:
|
|
7264
|
+
headers: 'Links',
|
|
7248
7265
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
7249
7266
|
className: "dkan-newtab",
|
|
7250
7267
|
href: d.link,
|
|
@@ -7272,44 +7289,44 @@ var $5655284dbbb89508$export$2e2bcd8739ae039 = $5655284dbbb89508$var$Documentati
|
|
|
7272
7289
|
|
|
7273
7290
|
const $c7bf75f7e8a68780$export$7850f4d545d994c6 = [
|
|
7274
7291
|
{
|
|
7275
|
-
id:
|
|
7276
|
-
application:
|
|
7277
|
-
notes:
|
|
7278
|
-
link:
|
|
7279
|
-
linkText:
|
|
7280
|
-
screenReaderOnlyText:
|
|
7292
|
+
id: 'excel',
|
|
7293
|
+
application: 'Microsoft Excel',
|
|
7294
|
+
notes: 'Official size limitations for Microsoft Excel',
|
|
7295
|
+
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',
|
|
7296
|
+
linkText: 'Excel Specifications and Limits',
|
|
7297
|
+
screenReaderOnlyText: 'on microsoft.com'
|
|
7281
7298
|
},
|
|
7282
7299
|
{
|
|
7283
|
-
id:
|
|
7284
|
-
application:
|
|
7285
|
-
notes:
|
|
7286
|
-
link:
|
|
7287
|
-
linkText:
|
|
7288
|
-
screenReaderOnlyText:
|
|
7300
|
+
id: 'access',
|
|
7301
|
+
application: 'Microsoft Access',
|
|
7302
|
+
notes: 'Official size limitations for Microsoft Access',
|
|
7303
|
+
link: 'https://support.microsoft.com/en-us/office/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c?ui=en-us&rs=en-us&ad=us',
|
|
7304
|
+
linkText: 'Access 2016 Specifications',
|
|
7305
|
+
screenReaderOnlyText: 'on microsoft.com'
|
|
7289
7306
|
},
|
|
7290
7307
|
{
|
|
7291
|
-
id:
|
|
7292
|
-
application:
|
|
7293
|
-
notes:
|
|
7294
|
-
link:
|
|
7295
|
-
linkText:
|
|
7296
|
-
screenReaderOnlyText:
|
|
7308
|
+
id: 'oracle-sql-developer',
|
|
7309
|
+
application: 'Oracle SQL Developer',
|
|
7310
|
+
notes: 'Oracle SQL Developer tool',
|
|
7311
|
+
link: 'https://www.oracle.com/database/sqldeveloper/',
|
|
7312
|
+
linkText: 'Oracle SQL Developer Overview',
|
|
7313
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
7297
7314
|
},
|
|
7298
7315
|
{
|
|
7299
|
-
id:
|
|
7300
|
-
application:
|
|
7301
|
-
notes:
|
|
7302
|
-
link:
|
|
7303
|
-
linkText:
|
|
7304
|
-
screenReaderOnlyText:
|
|
7316
|
+
id: 'oracle-database',
|
|
7317
|
+
application: 'Oracle Database',
|
|
7318
|
+
notes: 'Oracle Database official size limitations',
|
|
7319
|
+
link: 'https://docs.oracle.com/cd/B28359_01/server.111/b28320/limits002.htm#i287915',
|
|
7320
|
+
linkText: 'Oracle Physical Database Limits',
|
|
7321
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
7305
7322
|
},
|
|
7306
7323
|
{
|
|
7307
|
-
id:
|
|
7308
|
-
application:
|
|
7309
|
-
notes:
|
|
7310
|
-
link:
|
|
7311
|
-
linkText:
|
|
7312
|
-
screenReaderOnlyText:
|
|
7324
|
+
id: 'oracle-sql-client-tools',
|
|
7325
|
+
application: 'Oracle SQL Client Tools',
|
|
7326
|
+
notes: 'Oracle SQL Client Tools',
|
|
7327
|
+
link: 'https://www.oracle.com/database/technologies/oracle-database-software-downloads.html',
|
|
7328
|
+
linkText: 'Oracle SQL Client',
|
|
7329
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
7313
7330
|
}
|
|
7314
7331
|
];
|
|
7315
7332
|
|
|
@@ -7337,7 +7354,7 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7337
7354
|
}),
|
|
7338
7355
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
7339
7356
|
heading: "Notice",
|
|
7340
|
-
className:
|
|
7357
|
+
className: 'ds-u-margin-top--6',
|
|
7341
7358
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
7342
7359
|
className: "ds-c-alert__text",
|
|
7343
7360
|
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."
|
|
@@ -7346,16 +7363,16 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7346
7363
|
]
|
|
7347
7364
|
}),
|
|
7348
7365
|
/*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7349
|
-
className:
|
|
7366
|
+
className: 'ds-u-margin-top--4 ds-l-row',
|
|
7350
7367
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7351
|
-
className:
|
|
7368
|
+
className: 'ds-l-col--12',
|
|
7352
7369
|
children: [
|
|
7353
7370
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
7354
7371
|
className: "ds-text-heading--2xl ds-text-heading--2xl",
|
|
7355
7372
|
children: "Documentation by Application"
|
|
7356
7373
|
}),
|
|
7357
7374
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7358
|
-
className:
|
|
7375
|
+
className: 'ds-u-margin-top--4',
|
|
7359
7376
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5655284dbbb89508$export$2e2bcd8739ae039), {
|
|
7360
7377
|
data: documentationList
|
|
7361
7378
|
})
|
|
@@ -7383,7 +7400,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7383
7400
|
const options = {
|
|
7384
7401
|
conditions: query ? JSON.parse(query).map(({ column: column, operator: operator, ...rest })=>({
|
|
7385
7402
|
property: column,
|
|
7386
|
-
operator: operator ===
|
|
7403
|
+
operator: operator === 'is' ? '=' : operator === 'is not' ? '<>' : operator === 'or' ? 'in' : operator,
|
|
7387
7404
|
...rest
|
|
7388
7405
|
})) : []
|
|
7389
7406
|
};
|
|
@@ -7391,13 +7408,13 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7391
7408
|
let distribution = {};
|
|
7392
7409
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
7393
7410
|
if (distributions.length) distribution = distributions[distributionIndex];
|
|
7394
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7411
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
7395
7412
|
...options,
|
|
7396
7413
|
limit: defaultPageSize
|
|
7397
7414
|
});
|
|
7398
7415
|
(0, $hgUW1$useEffect)(()=>{
|
|
7399
7416
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
7400
|
-
if (localFileFormat ===
|
|
7417
|
+
if (localFileFormat === 'csv') resource.setResource(distribution.identifier);
|
|
7401
7418
|
}, [
|
|
7402
7419
|
distribution
|
|
7403
7420
|
]);
|
|
@@ -7447,7 +7464,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7447
7464
|
|
|
7448
7465
|
|
|
7449
7466
|
function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
|
|
7450
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7467
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
7451
7468
|
const newDate = new Date(condition.value);
|
|
7452
7469
|
if (newDate instanceof Date && !isNaN(newDate)) return newDate;
|
|
7453
7470
|
}
|
|
@@ -7464,9 +7481,9 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7464
7481
|
const [startDate, setStartDate] = (0, $hgUW1$react).useState($374c4669b044ddf8$var$getStartDate(condition, schema, id));
|
|
7465
7482
|
(0, $hgUW1$useEffect)(()=>{
|
|
7466
7483
|
if (property !== condition.property) {
|
|
7467
|
-
if (property) update(index,
|
|
7468
|
-
else update(index,
|
|
7469
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7484
|
+
if (property) update(index, 'property', property);
|
|
7485
|
+
else update(index, 'property', '');
|
|
7486
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
7470
7487
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
7471
7488
|
}
|
|
7472
7489
|
}
|
|
@@ -7480,16 +7497,16 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7480
7497
|
]);
|
|
7481
7498
|
(0, $hgUW1$useEffect)(()=>{
|
|
7482
7499
|
if (operator !== condition.operator) {
|
|
7483
|
-
if (operator) update(index,
|
|
7484
|
-
else update(index,
|
|
7500
|
+
if (operator) update(index, 'operator', operator);
|
|
7501
|
+
else update(index, 'operator', '');
|
|
7485
7502
|
}
|
|
7486
7503
|
}, [
|
|
7487
7504
|
operator
|
|
7488
7505
|
]);
|
|
7489
7506
|
(0, $hgUW1$useEffect)(()=>{
|
|
7490
7507
|
if (value !== condition.value) {
|
|
7491
|
-
if (value) update(index,
|
|
7492
|
-
else update(index,
|
|
7508
|
+
if (value) update(index, 'value', value);
|
|
7509
|
+
else update(index, 'value', '');
|
|
7493
7510
|
}
|
|
7494
7511
|
}, [
|
|
7495
7512
|
value
|
|
@@ -7513,7 +7530,7 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7513
7530
|
onChange: (e)=>setOperator(e.target.value),
|
|
7514
7531
|
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"
|
|
7515
7532
|
}),
|
|
7516
|
-
schema[id].fields[property].mysql_type ===
|
|
7533
|
+
schema[id].fields[property].mysql_type === 'date' ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7517
7534
|
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",
|
|
7518
7535
|
children: [
|
|
7519
7536
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
@@ -7603,12 +7620,12 @@ const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions, schema: sche
|
|
|
7603
7620
|
className: "ds-u-font-weight--bold",
|
|
7604
7621
|
children: description
|
|
7605
7622
|
}),
|
|
7606
|
-
|
|
7623
|
+
' ',
|
|
7607
7624
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7608
7625
|
className: "ds-u-font-weight--normal",
|
|
7609
7626
|
children: operator.label.toUpperCase()
|
|
7610
7627
|
}),
|
|
7611
|
-
|
|
7628
|
+
' ',
|
|
7612
7629
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7613
7630
|
className: "ds-u-color--success",
|
|
7614
7631
|
children: formattedText
|
|
@@ -7635,19 +7652,19 @@ var $bef7bff2823feea2$export$2e2bcd8739ae039 = $bef7bff2823feea2$var$QueryTitle;
|
|
|
7635
7652
|
function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
|
|
7636
7653
|
let cond = condition;
|
|
7637
7654
|
delete cond.key;
|
|
7638
|
-
if (cond.operator ===
|
|
7655
|
+
if (cond.operator === '=' || cond.operator === '<>') {
|
|
7639
7656
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7640
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7657
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
7641
7658
|
}
|
|
7642
|
-
if (cond.operator.toLowerCase() ===
|
|
7659
|
+
if (cond.operator.toLowerCase() === 'like') {
|
|
7643
7660
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7644
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7661
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
7645
7662
|
cond.value = `%${cleanedValue}%`;
|
|
7646
7663
|
}
|
|
7647
|
-
if (cond.operator.toLowerCase() ===
|
|
7648
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
7664
|
+
if (cond.operator.toLowerCase() === 'in') {
|
|
7665
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(',');
|
|
7649
7666
|
}
|
|
7650
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
7667
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ''));
|
|
7651
7668
|
return cond;
|
|
7652
7669
|
}
|
|
7653
7670
|
const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, setOffset: setOffset })=>{
|
|
@@ -7667,7 +7684,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7667
7684
|
...queryConditions,
|
|
7668
7685
|
{
|
|
7669
7686
|
property: fields[0],
|
|
7670
|
-
value:
|
|
7687
|
+
value: '',
|
|
7671
7688
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
7672
7689
|
key: Date.now()
|
|
7673
7690
|
}
|
|
@@ -7707,7 +7724,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7707
7724
|
encodeValuesOnly: true,
|
|
7708
7725
|
addQueryPrefix: true
|
|
7709
7726
|
});
|
|
7710
|
-
window.history.pushState({},
|
|
7727
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
7711
7728
|
};
|
|
7712
7729
|
const updateCondition = (index, key, value)=>{
|
|
7713
7730
|
let newConditions = [
|
|
@@ -7780,7 +7797,7 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
|
|
|
7780
7797
|
|
|
7781
7798
|
|
|
7782
7799
|
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 })=>{
|
|
7783
|
-
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState(
|
|
7800
|
+
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState('ds-u-padding-y--1');
|
|
7784
7801
|
let apiDocs = (0, $hgUW1$useRef)();
|
|
7785
7802
|
let distribution = {};
|
|
7786
7803
|
let distribution_array = dataset.distribution ? dataset.distribution : [];
|
|
@@ -7792,7 +7809,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7792
7809
|
} : {
|
|
7793
7810
|
conditions: []
|
|
7794
7811
|
};
|
|
7795
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7812
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
7796
7813
|
...options,
|
|
7797
7814
|
limit: 25
|
|
7798
7815
|
}, {
|
|
@@ -7808,7 +7825,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7808
7825
|
}, {
|
|
7809
7826
|
encode: true
|
|
7810
7827
|
})}&format=csv`;
|
|
7811
|
-
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !==
|
|
7828
|
+
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !== 'csv' ? distribution.data.title : dataset.title;
|
|
7812
7829
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
7813
7830
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7814
7831
|
className: "ds-l-container ds-u-padding-bottom--3 ds-u-margin-bottom--2",
|
|
@@ -7817,7 +7834,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7817
7834
|
children: Object.keys(distribution).length && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
7818
7835
|
children: [
|
|
7819
7836
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7820
|
-
className:
|
|
7837
|
+
className: 'ds-l-md-col--9',
|
|
7821
7838
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
7822
7839
|
to: `/dataset/${id}`,
|
|
7823
7840
|
className: "ds-u-padding-y--4 ds-u-display--block",
|
|
@@ -7828,14 +7845,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7828
7845
|
})
|
|
7829
7846
|
}),
|
|
7830
7847
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7831
|
-
className:
|
|
7848
|
+
className: 'ds-l-md-col--9',
|
|
7832
7849
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
7833
7850
|
className: "ds-text-heading--3xl",
|
|
7834
7851
|
children: customTitle ? customTitle : pageTitle
|
|
7835
7852
|
})
|
|
7836
7853
|
}),
|
|
7837
7854
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7838
|
-
className:
|
|
7855
|
+
className: 'ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right',
|
|
7839
7856
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
7840
7857
|
className: "ds-u-margin--0",
|
|
7841
7858
|
children: [
|
|
@@ -7847,7 +7864,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7847
7864
|
})
|
|
7848
7865
|
}),
|
|
7849
7866
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7850
|
-
className:
|
|
7867
|
+
className: 'ds-l-md-col--9',
|
|
7851
7868
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
7852
7869
|
distribution: distribution,
|
|
7853
7870
|
dataset: dataset,
|
|
@@ -7857,13 +7874,13 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7857
7874
|
})
|
|
7858
7875
|
}),
|
|
7859
7876
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7860
|
-
className:
|
|
7877
|
+
className: 'ds-l-md-col--12',
|
|
7861
7878
|
children: Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
|
|
7862
7879
|
resource: resource,
|
|
7863
7880
|
id: distribution.identifier,
|
|
7864
7881
|
customColumns: customColumns,
|
|
7865
7882
|
setOffset: resource.setOffset
|
|
7866
|
-
}) :
|
|
7883
|
+
}) : ''
|
|
7867
7884
|
}),
|
|
7868
7885
|
Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
7869
7886
|
value: {
|
|
@@ -7874,7 +7891,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7874
7891
|
customColumns: (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution_array[distIndex].identifier])
|
|
7875
7892
|
},
|
|
7876
7893
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7877
|
-
className:
|
|
7894
|
+
className: 'ds-l-md-col--12',
|
|
7878
7895
|
children: [
|
|
7879
7896
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $af099c546cb226c7$export$2e2bcd8739ae039), {
|
|
7880
7897
|
includeDensity: true,
|
|
@@ -7896,14 +7913,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7896
7913
|
]
|
|
7897
7914
|
})
|
|
7898
7915
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7899
|
-
className:
|
|
7916
|
+
className: 'ds-l-md-col--12',
|
|
7900
7917
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
7901
7918
|
role: "status",
|
|
7902
7919
|
"aria-valuetext": "Resource loading"
|
|
7903
7920
|
})
|
|
7904
7921
|
}),
|
|
7905
7922
|
dataset.identifier && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7906
|
-
className:
|
|
7923
|
+
className: 'ds-l-md-col--12',
|
|
7907
7924
|
ref: apiDocs,
|
|
7908
7925
|
children: [
|
|
7909
7926
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
@@ -7912,7 +7929,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7912
7929
|
}),
|
|
7913
7930
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
7914
7931
|
url: `${rootUrl}/metastore/schemas/dataset/items/${dataset.identifier}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`,
|
|
7915
|
-
docExpansion:
|
|
7932
|
+
docExpansion: 'list',
|
|
7916
7933
|
defaultModelsExpandDepth: -1
|
|
7917
7934
|
})
|
|
7918
7935
|
]
|
|
@@ -7931,7 +7948,7 @@ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, loca
|
|
|
7931
7948
|
const [ready, setReady] = (0, $hgUW1$useState)(false);
|
|
7932
7949
|
const [error, setError] = (0, $hgUW1$useState)(false);
|
|
7933
7950
|
const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
7934
|
-
const distIndex = dist_id ===
|
|
7951
|
+
const distIndex = dist_id === 'data' ? 0 : dist_id;
|
|
7935
7952
|
(0, $hgUW1$useEffect)(()=>{
|
|
7936
7953
|
if (dataset.error) setError(true);
|
|
7937
7954
|
if (dataset.distribution && dataset.distribution.length) {
|