@civicactions/cmsds-open-data-components 4.0.4 → 4.0.6-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.css.map +1 -1
- package/dist/main.js +583 -563
- 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
|
}
|
|
@@ -2260,13 +2260,27 @@ function $7264a673914aa746$export$2b9377795161999(type) {
|
|
|
2260
2260
|
|
|
2261
2261
|
const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: header, sortElement: sortElement, setAriaLiveFeedback: setAriaLiveFeedback })=>{
|
|
2262
2262
|
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)("");
|
|
2263
|
+
const handleSortClick = ()=>{
|
|
2264
|
+
header.column.getToggleSortingHandler()?.();
|
|
2265
|
+
setTimeout(()=>{
|
|
2266
|
+
const s = header.column.getIsSorted();
|
|
2267
|
+
if (s === "asc") setAriaLiveFeedback(`Sorted by ${header.column.id} ascending`);
|
|
2268
|
+
else if (s === "desc") setAriaLiveFeedback(`Sorted by ${header.column.id} descending`);
|
|
2269
|
+
else setAriaLiveFeedback(`Sorting cleared on ${header.column.id}`);
|
|
2270
|
+
}, 0);
|
|
2271
|
+
};
|
|
2272
|
+
const canSort = header.column.getCanSort();
|
|
2273
|
+
const sortState = header.column.getIsSorted();
|
|
2263
2274
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("th", {
|
|
2264
2275
|
key: header.id,
|
|
2265
2276
|
style: {
|
|
2266
2277
|
width: header.getSize()
|
|
2267
2278
|
},
|
|
2279
|
+
...canSort && {
|
|
2280
|
+
"aria-sort": sortState === "asc" ? "ascending" : sortState === "desc" ? "descending" : "none"
|
|
2281
|
+
},
|
|
2268
2282
|
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : "",
|
|
2269
|
-
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark
|
|
2283
|
+
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
|
|
2270
2284
|
children: [
|
|
2271
2285
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2272
2286
|
className: "ds-u-display--flex",
|
|
@@ -2276,17 +2290,19 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2276
2290
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
2277
2291
|
})
|
|
2278
2292
|
}),
|
|
2279
|
-
sortElement && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2280
|
-
|
|
2281
|
-
|
|
2293
|
+
sortElement && canSort && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2294
|
+
type: "button",
|
|
2295
|
+
onClick: handleSortClick,
|
|
2296
|
+
className: "cursor-pointer select-none ds-u-focus-visible " + sortElement(sortState),
|
|
2282
2297
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
2283
2298
|
})
|
|
2284
2299
|
]
|
|
2285
2300
|
}),
|
|
2286
2301
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2302
|
+
type: "button",
|
|
2287
2303
|
onMouseDown: header.getResizeHandler(),
|
|
2288
2304
|
onTouchStart: header.getResizeHandler(),
|
|
2289
|
-
className:
|
|
2305
|
+
className: "dc-c-resize-handle ds-u-focus-visible " + (header.column.getIsResizing() || header.column.id === columnResizing ? "isResizing" : ""),
|
|
2290
2306
|
"aria-label": `Resize ${header.column.columnDef.header} column`,
|
|
2291
2307
|
onKeyDown: (e)=>{
|
|
2292
2308
|
const columnSizingObject = table.getState().columnSizing;
|
|
@@ -2296,11 +2312,9 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2296
2312
|
e.preventDefault();
|
|
2297
2313
|
e.stopPropagation();
|
|
2298
2314
|
if (columnResizing) {
|
|
2299
|
-
// end resizing
|
|
2300
2315
|
setColumnResizing("");
|
|
2301
2316
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2302
2317
|
} else {
|
|
2303
|
-
// start resizing
|
|
2304
2318
|
setColumnResizing(header.column.id);
|
|
2305
2319
|
setAriaLiveFeedback(`${header.column.columnDef.header} grabbed.`);
|
|
2306
2320
|
}
|
|
@@ -2331,9 +2345,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2331
2345
|
break;
|
|
2332
2346
|
}
|
|
2333
2347
|
},
|
|
2334
|
-
onBlur: ()=>
|
|
2335
|
-
setColumnResizing("");
|
|
2336
|
-
}
|
|
2348
|
+
onBlur: ()=>setColumnResizing("")
|
|
2337
2349
|
})
|
|
2338
2350
|
]
|
|
2339
2351
|
});
|
|
@@ -2366,26 +2378,32 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2366
2378
|
className: "dc-thead--fixed-size",
|
|
2367
2379
|
children: table.getHeaderGroups().map((headerGroup)=>/*#__PURE__*/ (0, $hgUW1$jsx)("tr", {
|
|
2368
2380
|
children: headerGroup.headers.map((header)=>{
|
|
2381
|
+
const canSort = header.column.getCanSort();
|
|
2382
|
+
const sortState = header.column.getIsSorted();
|
|
2369
2383
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("th", {
|
|
2370
|
-
key: header.id,
|
|
2371
2384
|
style: {
|
|
2372
2385
|
width: header.getSize()
|
|
2373
2386
|
},
|
|
2374
|
-
title: header.column.columnDef.header,
|
|
2375
|
-
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark
|
|
2387
|
+
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : "",
|
|
2388
|
+
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
|
|
2389
|
+
...canSort && {
|
|
2390
|
+
"aria-sort": sortState === "asc" ? "ascending" : sortState === "desc" ? "descending" : "none"
|
|
2391
|
+
},
|
|
2376
2392
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2377
|
-
|
|
2378
|
-
className: "ds-u-display--flex",
|
|
2393
|
+
className: "ds-u-display--flex ds-u-align-items--center ds-u-gap--1",
|
|
2379
2394
|
children: [
|
|
2380
2395
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2381
2396
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
2382
2397
|
}),
|
|
2383
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("
|
|
2384
|
-
|
|
2398
|
+
canSort && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2399
|
+
type: "button",
|
|
2400
|
+
onClick: header.column.getToggleSortingHandler(),
|
|
2401
|
+
className: "cursor-pointer select-none ds-u-focus-visible " + (sortElement ? sortElement(sortState) : ""),
|
|
2402
|
+
"aria-label": `${typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : header.column.id} sort order`
|
|
2385
2403
|
})
|
|
2386
2404
|
]
|
|
2387
2405
|
})
|
|
2388
|
-
});
|
|
2406
|
+
}, header.id);
|
|
2389
2407
|
})
|
|
2390
2408
|
}, headerGroup.id))
|
|
2391
2409
|
});
|
|
@@ -2412,7 +2430,7 @@ const $ee0d4d4f34048447$var$DataTableActionsContextDefaults = {
|
|
|
2412
2430
|
setColumnVisibility: ()=>{},
|
|
2413
2431
|
page: 1,
|
|
2414
2432
|
setPage: ()=>{},
|
|
2415
|
-
tableDensity:
|
|
2433
|
+
tableDensity: 'normal',
|
|
2416
2434
|
setTableDensity: ()=>{}
|
|
2417
2435
|
};
|
|
2418
2436
|
const $ee0d4d4f34048447$export$f814ea079e65d8fe = /*#__PURE__*/ (0, $hgUW1$createContext)($ee0d4d4f34048447$var$DataTableActionsContextDefaults);
|
|
@@ -2431,7 +2449,7 @@ const $ee0d4d4f34048447$var$DataTableActionsProvider = ({ children: children })=
|
|
|
2431
2449
|
if (datasetTableControls && localStorageData) return localStorageData.tableColumnVisibility;
|
|
2432
2450
|
else return {};
|
|
2433
2451
|
});
|
|
2434
|
-
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)(
|
|
2452
|
+
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)('normal');
|
|
2435
2453
|
const providerValue = {
|
|
2436
2454
|
columnOrder: columnOrder,
|
|
2437
2455
|
setColumnOrder: setColumnOrder,
|
|
@@ -2478,9 +2496,9 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2478
2496
|
transition: transition,
|
|
2479
2497
|
opacity: isDragging ? 0.7 : 1,
|
|
2480
2498
|
zIndex: isDragging ? 1 : 0,
|
|
2481
|
-
position:
|
|
2482
|
-
background:
|
|
2483
|
-
touchAction:
|
|
2499
|
+
position: 'relative',
|
|
2500
|
+
background: 'white',
|
|
2501
|
+
touchAction: 'none'
|
|
2484
2502
|
};
|
|
2485
2503
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
2486
2504
|
className: "ds-u-display--flex ds-u-justify-content--between ds-u-border-bottom--1",
|
|
@@ -2496,7 +2514,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2496
2514
|
// this code forces the repaint without user interaction
|
|
2497
2515
|
const target = e.target;
|
|
2498
2516
|
if (isDragging && target.tagName.toLowerCase() === "label") setTimeout(()=>{
|
|
2499
|
-
target.parentNode.querySelector(
|
|
2517
|
+
target.parentNode.querySelector('input').checked = visible;
|
|
2500
2518
|
}, 1);
|
|
2501
2519
|
},
|
|
2502
2520
|
children: [
|
|
@@ -2513,7 +2531,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2513
2531
|
}
|
|
2514
2532
|
}),
|
|
2515
2533
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2516
|
-
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging &&
|
|
2534
|
+
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && 'grabbed'}`,
|
|
2517
2535
|
"aria-label": `Reorder ${id} column`,
|
|
2518
2536
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2519
2537
|
className: "fa fa-sort"
|
|
@@ -2531,7 +2549,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor extends (0, $hgUW1$Key
|
|
|
2531
2549
|
// Custom function to exclude checkbox from keyboard dragging
|
|
2532
2550
|
static activators = [
|
|
2533
2551
|
{
|
|
2534
|
-
eventName:
|
|
2552
|
+
eventName: 'onKeyDown',
|
|
2535
2553
|
handler: ({ nativeEvent: event })=>{
|
|
2536
2554
|
// prevent scrolling the list
|
|
2537
2555
|
const isCheckbox = [
|
|
@@ -2554,7 +2572,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$Poin
|
|
|
2554
2572
|
// Custom function to stop accidental checkbox clicks on pointer activation
|
|
2555
2573
|
static activators = [
|
|
2556
2574
|
{
|
|
2557
|
-
eventName:
|
|
2575
|
+
eventName: 'onPointerDown',
|
|
2558
2576
|
handler: ({ nativeEvent: event })=>{
|
|
2559
2577
|
if (event.target.tagName.toLowerCase() === "input") return false;
|
|
2560
2578
|
if (event.target.tagName.toLowerCase() === "label") event.target.blur();
|
|
@@ -2652,13 +2670,13 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
2652
2670
|
className: "dkan-dataset-toolbar-button-label",
|
|
2653
2671
|
children: "Manage Columns"
|
|
2654
2672
|
}),
|
|
2655
|
-
hiddenColumns ? ` (${hiddenColumns})` :
|
|
2673
|
+
hiddenColumns ? ` (${hiddenColumns})` : ''
|
|
2656
2674
|
]
|
|
2657
2675
|
})
|
|
2658
2676
|
]
|
|
2659
2677
|
}),
|
|
2660
2678
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2661
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2679
|
+
className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
|
|
2662
2680
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
|
|
2663
2681
|
heading: "Manage columns",
|
|
2664
2682
|
isOpen: modalOpen,
|
|
@@ -2831,12 +2849,12 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
2831
2849
|
if (Object.keys(resource).length && columns.length && resource.schema && Object.keys(distribution).length) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
2832
2850
|
children: [
|
|
2833
2851
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2834
|
-
className: isModal ?
|
|
2852
|
+
className: isModal ? 'dkan-datatable-fullscreen-mode' : '',
|
|
2835
2853
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
|
|
2836
2854
|
canResize: true,
|
|
2837
2855
|
columns: columns,
|
|
2838
2856
|
sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
|
|
2839
|
-
tablePadding: tableDensity ===
|
|
2857
|
+
tablePadding: tableDensity === 'normal' ? 'ds-u-padding-y--2' : tableDensity === 'compact' ? 'ds-u-padding-y--1' : 'ds-u-padding-y--3',
|
|
2840
2858
|
loading: resource.loading,
|
|
2841
2859
|
isModal: isModal,
|
|
2842
2860
|
downloadURL: downloadURL,
|
|
@@ -2851,14 +2869,14 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
2851
2869
|
}),
|
|
2852
2870
|
!resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2853
2871
|
className: [
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
isModal &&
|
|
2861
|
-
].filter(Boolean).join(
|
|
2872
|
+
'ds-u-display--flex',
|
|
2873
|
+
'ds-u-flex-wrap--wrap',
|
|
2874
|
+
'ds-u-justify-content--end',
|
|
2875
|
+
'ds-u-md-justify-content--between',
|
|
2876
|
+
'ds-u-margin-top--2',
|
|
2877
|
+
'ds-u-align-items--center',
|
|
2878
|
+
isModal && 'ds-u-margin-bottom--2'
|
|
2879
|
+
].filter(Boolean).join(' '),
|
|
2862
2880
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
2863
2881
|
totalPages: Math.ceil(resource.count ? resource.count / pageSize : 1),
|
|
2864
2882
|
currentPage: Number(page),
|
|
@@ -2897,7 +2915,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
2897
2915
|
},
|
|
2898
2916
|
children: [
|
|
2899
2917
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2900
|
-
className: `far ${modalOpen ?
|
|
2918
|
+
className: `far ${modalOpen ? 'fa-compress' : 'fa-expand'} ds-u-margin-right--1`
|
|
2901
2919
|
}),
|
|
2902
2920
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2903
2921
|
className: "dkan-dataset-toolbar-button-label",
|
|
@@ -2906,7 +2924,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
2906
2924
|
]
|
|
2907
2925
|
}),
|
|
2908
2926
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2909
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2927
|
+
className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
|
|
2910
2928
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
2911
2929
|
heading: "Dataset Explorer",
|
|
2912
2930
|
isOpen: modalOpen,
|
|
@@ -2941,13 +2959,13 @@ var $16bd41951b91f02d$export$2e2bcd8739ae039 = $16bd41951b91f02d$var$FullScreenD
|
|
|
2941
2959
|
|
|
2942
2960
|
|
|
2943
2961
|
function $eadd6431fddf4b6c$var$getStartDate(condition, schema, id) {
|
|
2944
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2962
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
2945
2963
|
const newDate = new Date(condition.value.toString());
|
|
2946
2964
|
if (newDate instanceof Date && !isNaN(newDate.getTime())) return newDate;
|
|
2947
2965
|
}
|
|
2948
2966
|
return new Date();
|
|
2949
2967
|
}
|
|
2950
|
-
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className =
|
|
2968
|
+
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className = '' })=>{
|
|
2951
2969
|
const [operator, setOperator] = (0, $hgUW1$useState)(condition.operator);
|
|
2952
2970
|
const [property, setProperty] = (0, $hgUW1$useState)(condition.property);
|
|
2953
2971
|
const [value, setValue] = (0, $hgUW1$useState)(condition.value);
|
|
@@ -2957,9 +2975,9 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
2957
2975
|
});
|
|
2958
2976
|
(0, $hgUW1$useEffect)(()=>{
|
|
2959
2977
|
if (property !== condition.property) {
|
|
2960
|
-
if (property) update(index,
|
|
2961
|
-
else update(index,
|
|
2962
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2978
|
+
if (property) update(index, 'property', property);
|
|
2979
|
+
else update(index, 'property', '');
|
|
2980
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
2963
2981
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
2964
2982
|
}
|
|
2965
2983
|
}
|
|
@@ -2973,22 +2991,22 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
2973
2991
|
]);
|
|
2974
2992
|
(0, $hgUW1$useEffect)(()=>{
|
|
2975
2993
|
if (operator !== condition.operator) {
|
|
2976
|
-
if (operator) update(index,
|
|
2977
|
-
else update(index,
|
|
2994
|
+
if (operator) update(index, 'operator', operator);
|
|
2995
|
+
else update(index, 'operator', '');
|
|
2978
2996
|
}
|
|
2979
2997
|
}, [
|
|
2980
2998
|
operator
|
|
2981
2999
|
]);
|
|
2982
3000
|
(0, $hgUW1$useEffect)(()=>{
|
|
2983
3001
|
if (value !== condition.value) {
|
|
2984
|
-
if (value) update(index,
|
|
2985
|
-
else update(index,
|
|
3002
|
+
if (value) update(index, 'value', value);
|
|
3003
|
+
else update(index, 'value', '');
|
|
2986
3004
|
}
|
|
2987
3005
|
}, [
|
|
2988
3006
|
value
|
|
2989
3007
|
]);
|
|
2990
3008
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("fieldset", {
|
|
2991
|
-
className: `dkan-filter-dataset-control ds-u-padding-x--2 ds-u-md-padding-x--3 ds-u-padding-y--1 ds-u-margin-top--05${className !==
|
|
3009
|
+
className: `dkan-filter-dataset-control ds-u-padding-x--2 ds-u-md-padding-x--3 ds-u-padding-y--1 ds-u-margin-top--05${className !== '' ? ` ${className}` : ''}`,
|
|
2992
3010
|
children: [
|
|
2993
3011
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
2994
3012
|
options: propertyOptions,
|
|
@@ -3006,7 +3024,7 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
3006
3024
|
name: `${condition.key}_operator`,
|
|
3007
3025
|
onChange: (e)=>setOperator(e.target.value)
|
|
3008
3026
|
}),
|
|
3009
|
-
schema[id].fields[property].mysql_type ===
|
|
3027
|
+
schema[id].fields[property].mysql_type === 'date' ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
3010
3028
|
children: [
|
|
3011
3029
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
3012
3030
|
className: "ds-c-label",
|
|
@@ -3059,15 +3077,15 @@ var $eadd6431fddf4b6c$export$2e2bcd8739ae039 = $eadd6431fddf4b6c$var$FilterItem;
|
|
|
3059
3077
|
|
|
3060
3078
|
|
|
3061
3079
|
|
|
3062
|
-
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className =
|
|
3080
|
+
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className = '' })=>{
|
|
3063
3081
|
const small = (0, $hgUW1$useMediaQuery)({
|
|
3064
3082
|
minWidth: 0,
|
|
3065
3083
|
maxWidth: 544
|
|
3066
3084
|
});
|
|
3067
3085
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
3068
3086
|
disabled: disabled,
|
|
3069
|
-
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ?
|
|
3070
|
-
variation: small ?
|
|
3087
|
+
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ? '' : ' ds-u-float--right ds-l-md-col--6 ds-l-col--5'}${className !== '' ? ` ${className}` : ''}`,
|
|
3088
|
+
variation: small ? 'ghost' : undefined,
|
|
3071
3089
|
onClick: ()=>clearFiltersFn(),
|
|
3072
3090
|
children: "Reset"
|
|
3073
3091
|
});
|
|
@@ -3079,19 +3097,19 @@ var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFilter
|
|
|
3079
3097
|
function $6f4318b1e14124e5$var$updateQueryForDatastore(condition) {
|
|
3080
3098
|
let cond = condition;
|
|
3081
3099
|
delete cond.key;
|
|
3082
|
-
if (cond.operator ===
|
|
3100
|
+
if (cond.operator === '=' || cond.operator === '<>') {
|
|
3083
3101
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3084
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3102
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
3085
3103
|
}
|
|
3086
|
-
if (cond.operator.toLowerCase() ===
|
|
3104
|
+
if (cond.operator.toLowerCase() === 'like') {
|
|
3087
3105
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3088
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3106
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
3089
3107
|
cond.value = `%${cleanedValue}%`;
|
|
3090
3108
|
}
|
|
3091
|
-
if (cond.operator.toLowerCase() ===
|
|
3092
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
3109
|
+
if (cond.operator.toLowerCase() === 'in') {
|
|
3110
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(',');
|
|
3093
3111
|
}
|
|
3094
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
3112
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ''));
|
|
3095
3113
|
return cond;
|
|
3096
3114
|
}
|
|
3097
3115
|
const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
@@ -3117,7 +3135,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3117
3135
|
} else setQueryConditions([
|
|
3118
3136
|
{
|
|
3119
3137
|
property: fields[0],
|
|
3120
|
-
value:
|
|
3138
|
+
value: '',
|
|
3121
3139
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3122
3140
|
key: Date.now().toString()
|
|
3123
3141
|
}
|
|
@@ -3134,7 +3152,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3134
3152
|
...queryConditions,
|
|
3135
3153
|
{
|
|
3136
3154
|
property: fields[0],
|
|
3137
|
-
value:
|
|
3155
|
+
value: '',
|
|
3138
3156
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3139
3157
|
key: Date.now().toString()
|
|
3140
3158
|
}
|
|
@@ -3165,7 +3183,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3165
3183
|
encodeValuesOnly: true,
|
|
3166
3184
|
addQueryPrefix: true
|
|
3167
3185
|
});
|
|
3168
|
-
window.history.pushState({},
|
|
3186
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
3169
3187
|
};
|
|
3170
3188
|
const submitConditions = ()=>{
|
|
3171
3189
|
// only update the data conditions when "Apply filters" is pressed
|
|
@@ -3239,7 +3257,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3239
3257
|
children: [
|
|
3240
3258
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3241
3259
|
className: "dkan-dataset-toolbar-button-label",
|
|
3242
|
-
children: conditions.length > 0 ? `Edit Filters` :
|
|
3260
|
+
children: conditions.length > 0 ? `Edit Filters` : 'Filter Dataset'
|
|
3243
3261
|
}),
|
|
3244
3262
|
conditions.length > 0 && ` (${conditions.length})`
|
|
3245
3263
|
]
|
|
@@ -3247,7 +3265,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3247
3265
|
]
|
|
3248
3266
|
}),
|
|
3249
3267
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3250
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
3268
|
+
className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
|
|
3251
3269
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
3252
3270
|
heading: "Filter Dataset",
|
|
3253
3271
|
isOpen: modalOpen,
|
|
@@ -3273,7 +3291,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3273
3291
|
className: "dkan-apply-dataset-filters-button ds-u-float--right ds-l-md-col--auto ds-l-col--auto",
|
|
3274
3292
|
onClick: submitConditions,
|
|
3275
3293
|
variation: "solid",
|
|
3276
|
-
children: `Apply ${conditionsReadyToSubmit(queryConditions).length ||
|
|
3294
|
+
children: `Apply ${conditionsReadyToSubmit(queryConditions).length || ''} filter${conditionsReadyToSubmit(queryConditions).length === 1 ? '' : 's'}`
|
|
3277
3295
|
})
|
|
3278
3296
|
]
|
|
3279
3297
|
})
|
|
@@ -3412,9 +3430,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3412
3430
|
className: "ds-u-display--flex ds-u-align-items--start",
|
|
3413
3431
|
children: [
|
|
3414
3432
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3415
|
-
onClick: ()=>setTableDensity(
|
|
3433
|
+
onClick: ()=>setTableDensity('expanded'),
|
|
3416
3434
|
"aria-label": "Row height, Expanded",
|
|
3417
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3435
|
+
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === 'expanded' ? 'active ds-u-fill--primary-lightest' : ''}`,
|
|
3418
3436
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3419
3437
|
className: "ds-u-display--block",
|
|
3420
3438
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3433,9 +3451,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3433
3451
|
})
|
|
3434
3452
|
}),
|
|
3435
3453
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3436
|
-
onClick: ()=>setTableDensity(
|
|
3454
|
+
onClick: ()=>setTableDensity('normal'),
|
|
3437
3455
|
"aria-label": "Row height, Normal",
|
|
3438
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3456
|
+
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === 'normal' ? 'active ds-u-fill--primary-lightest' : ''}`,
|
|
3439
3457
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3440
3458
|
className: "ds-u-display--block",
|
|
3441
3459
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3454,9 +3472,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3454
3472
|
})
|
|
3455
3473
|
}),
|
|
3456
3474
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3457
|
-
onClick: ()=>setTableDensity(
|
|
3475
|
+
onClick: ()=>setTableDensity('compact'),
|
|
3458
3476
|
"aria-label": "Row height, Compact",
|
|
3459
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3477
|
+
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === 'compact' ? 'active ds-u-fill--primary-lightest ' : ''}`,
|
|
3460
3478
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3461
3479
|
className: "ds-u-display--block",
|
|
3462
3480
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3541,7 +3559,7 @@ const $85f8ff1ff89899c7$var$updateBrowserURL = (newConditions)=>{
|
|
|
3541
3559
|
encodeValuesOnly: true,
|
|
3542
3560
|
addQueryPrefix: true
|
|
3543
3561
|
});
|
|
3544
|
-
window.history.pushState({},
|
|
3562
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
3545
3563
|
};
|
|
3546
3564
|
const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, columns: columns, defaultColumnOrder: defaultColumnOrder, isModal: isModal, datasetTableControls: datasetTableControls, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility })=>{
|
|
3547
3565
|
const { limit: limit, offset: offset, count: count, conditions: conditions, setConditions: setConditions } = resource;
|
|
@@ -3627,7 +3645,7 @@ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, co
|
|
|
3627
3645
|
}, index)) : null,
|
|
3628
3646
|
hiddenColumns > 0 ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $c5b172e8d1a8197c$export$2e2bcd8739ae039), {
|
|
3629
3647
|
iconClass: "fa fa-columns",
|
|
3630
|
-
text: `${hiddenColumns} Column${hiddenColumns === 1 ?
|
|
3648
|
+
text: `${hiddenColumns} Column${hiddenColumns === 1 ? '' : 's'} Hidden`,
|
|
3631
3649
|
onClick: ()=>{
|
|
3632
3650
|
resetColumnVisibility();
|
|
3633
3651
|
}
|
|
@@ -3662,7 +3680,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3662
3680
|
const { conditions: conditions } = resource;
|
|
3663
3681
|
const data = resource.values;
|
|
3664
3682
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
3665
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
3683
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
|
|
3666
3684
|
const dataTableWrapperElement = (0, $hgUW1$useRef)(null);
|
|
3667
3685
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
3668
3686
|
const table_columns = columns.map((col)=>{
|
|
@@ -3681,9 +3699,9 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3681
3699
|
columnOrder
|
|
3682
3700
|
]);
|
|
3683
3701
|
const sortElement = (isSorted, onClickFn)=>{
|
|
3684
|
-
if (isSorted ===
|
|
3685
|
-
if (isSorted ===
|
|
3686
|
-
return
|
|
3702
|
+
if (isSorted === 'asc') return 'dc-c-sort--asc';
|
|
3703
|
+
if (isSorted === 'desc') return 'dc-c-sort--desc';
|
|
3704
|
+
return 'dc-c-sort--default';
|
|
3687
3705
|
};
|
|
3688
3706
|
const filters = [];
|
|
3689
3707
|
const table = (0, $hgUW1$useReactTable)({
|
|
@@ -3695,7 +3713,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3695
3713
|
columnVisibility: columnVisibility,
|
|
3696
3714
|
sorting: sorting
|
|
3697
3715
|
},
|
|
3698
|
-
columnResizeMode:
|
|
3716
|
+
columnResizeMode: 'onChange',
|
|
3699
3717
|
onSortingChange: setSorting,
|
|
3700
3718
|
onColumnOrderChange: setColumnOrder,
|
|
3701
3719
|
onColumnVisibilityChange: setColumnVisibility,
|
|
@@ -3712,7 +3730,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3712
3730
|
const defaultColumnOrder = (0, $hgUW1$useMemo)(()=>table_columns.map((column)=>column.accessorKey), []);
|
|
3713
3731
|
const tableWrapperWidth = ()=>{
|
|
3714
3732
|
if (dataTableWrapperElement.current) return dataTableWrapperElement.current.offsetWidth;
|
|
3715
|
-
return
|
|
3733
|
+
return 'auto';
|
|
3716
3734
|
};
|
|
3717
3735
|
(0, $hgUW1$useEffect)(()=>{
|
|
3718
3736
|
setHighlightRow(null);
|
|
@@ -3942,7 +3960,7 @@ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, a
|
|
|
3942
3960
|
},
|
|
3943
3961
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3944
3962
|
name: accessor,
|
|
3945
|
-
value: filterValue ||
|
|
3963
|
+
value: filterValue || ''
|
|
3946
3964
|
});
|
|
3947
3965
|
}
|
|
3948
3966
|
const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true })=>{
|
|
@@ -4018,7 +4036,7 @@ const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage, pageTrail:
|
|
|
4018
4036
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4019
4037
|
children: currentPage
|
|
4020
4038
|
})
|
|
4021
|
-
}) :
|
|
4039
|
+
}) : ''
|
|
4022
4040
|
]
|
|
4023
4041
|
})
|
|
4024
4042
|
});
|
|
@@ -4075,11 +4093,11 @@ var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRigh
|
|
|
4075
4093
|
|
|
4076
4094
|
|
|
4077
4095
|
|
|
4078
|
-
const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder =
|
|
4096
|
+
const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = 'Search the Data', showMagnifyingGlass: showMagnifyingGlass, showSearchButton: showSearchButton, onDark: onDark, onChange: onChange, onSubmit: onSubmit, onKeyDown: onKeyDown, defaultValue: defaultValue = '' })=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4079
4097
|
className: "search-input-container",
|
|
4080
4098
|
children: [
|
|
4081
4099
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4082
|
-
className: `${showMagnifyingGlass ?
|
|
4100
|
+
className: `${showMagnifyingGlass ? 'left-padding' : ''} ${showSearchButton ? 'right-padding' : ''}`,
|
|
4083
4101
|
label: placeholder,
|
|
4084
4102
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4085
4103
|
placeholder: placeholder,
|
|
@@ -4094,7 +4112,7 @@ const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = "Search
|
|
|
4094
4112
|
}),
|
|
4095
4113
|
showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
4096
4114
|
variation: "solid",
|
|
4097
|
-
className: onDark &&
|
|
4115
|
+
className: onDark && 'on-dark',
|
|
4098
4116
|
onClick: onSubmit,
|
|
4099
4117
|
children: [
|
|
4100
4118
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4213,7 +4231,7 @@ const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: roo
|
|
|
4213
4231
|
url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4214
4232
|
addQueryPrefix: true
|
|
4215
4233
|
})}`,
|
|
4216
|
-
docExpansion:
|
|
4234
|
+
docExpansion: 'list',
|
|
4217
4235
|
defaultModelsExpandDepth: -1,
|
|
4218
4236
|
plugins: [
|
|
4219
4237
|
(0, $hgUW1$SpanOpenAPIVersion),
|
|
@@ -4321,7 +4339,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4321
4339
|
size: "big",
|
|
4322
4340
|
type: "submit",
|
|
4323
4341
|
style: {
|
|
4324
|
-
width:
|
|
4342
|
+
width: '70px'
|
|
4325
4343
|
},
|
|
4326
4344
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4327
4345
|
className: "fas fa-search small-text"
|
|
@@ -4338,7 +4356,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4338
4356
|
className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
|
|
4339
4357
|
children: [
|
|
4340
4358
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4341
|
-
children: text ? text :
|
|
4359
|
+
children: text ? text : 'Search'
|
|
4342
4360
|
}),
|
|
4343
4361
|
` `,
|
|
4344
4362
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4423,12 +4441,12 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
4423
4441
|
fulltext: fulltext ? fulltext : undefined,
|
|
4424
4442
|
...selectedFacets,
|
|
4425
4443
|
sort: sort ? sort : undefined,
|
|
4426
|
-
[
|
|
4444
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
4427
4445
|
page: page !== 1 ? page : undefined,
|
|
4428
|
-
[
|
|
4446
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
4429
4447
|
};
|
|
4430
4448
|
return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4431
|
-
arrayFormat:
|
|
4449
|
+
arrayFormat: 'comma',
|
|
4432
4450
|
encode: false
|
|
4433
4451
|
})}`);
|
|
4434
4452
|
}
|
|
@@ -4439,26 +4457,26 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
4439
4457
|
|
|
4440
4458
|
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
4441
4459
|
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4442
|
-
defaultSort:
|
|
4443
|
-
defaultOrder:
|
|
4444
|
-
}, pageTitle: pageTitle =
|
|
4460
|
+
defaultSort: 'modified',
|
|
4461
|
+
defaultOrder: 'desc'
|
|
4462
|
+
}, pageTitle: pageTitle = 'Dataset Explorer', filterTitle: filterTitle = 'Tags', showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = '', showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
4445
4463
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4446
4464
|
const sortOptions = [
|
|
4447
4465
|
{
|
|
4448
|
-
label:
|
|
4449
|
-
value:
|
|
4466
|
+
label: 'Newest',
|
|
4467
|
+
value: 'newest'
|
|
4450
4468
|
},
|
|
4451
4469
|
{
|
|
4452
|
-
label:
|
|
4453
|
-
value:
|
|
4470
|
+
label: 'Oldest',
|
|
4471
|
+
value: 'oldest'
|
|
4454
4472
|
},
|
|
4455
4473
|
{
|
|
4456
|
-
label:
|
|
4457
|
-
value:
|
|
4474
|
+
label: 'Title A-Z',
|
|
4475
|
+
value: 'titleAZ'
|
|
4458
4476
|
},
|
|
4459
4477
|
{
|
|
4460
|
-
label:
|
|
4461
|
-
value:
|
|
4478
|
+
label: 'Title Z-A',
|
|
4479
|
+
value: 'titleZA'
|
|
4462
4480
|
}
|
|
4463
4481
|
];
|
|
4464
4482
|
const defaultSortBy = "";
|
|
@@ -4477,7 +4495,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4477
4495
|
endingNumber: 0
|
|
4478
4496
|
});
|
|
4479
4497
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4480
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4498
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)('');
|
|
4481
4499
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4482
4500
|
const [fulltext, setFullText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
4483
4501
|
const [filterText, setFilterText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
@@ -4486,7 +4504,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4486
4504
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4487
4505
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4488
4506
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4489
|
-
return sort ===
|
|
4507
|
+
return sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
|
|
4490
4508
|
});
|
|
4491
4509
|
const [selectedFacets, setSelectedFacets] = (0, $hgUW1$useState)(transformedParams.selectedFacets ? transformedParams.selectedFacets : {
|
|
4492
4510
|
theme: [],
|
|
@@ -4495,21 +4513,21 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4495
4513
|
const setSortOptions = (value)=>{
|
|
4496
4514
|
setSortDisplay(value);
|
|
4497
4515
|
switch(value){
|
|
4498
|
-
case
|
|
4499
|
-
setSort(
|
|
4500
|
-
setSortOrder(
|
|
4516
|
+
case 'newest':
|
|
4517
|
+
setSort('modified');
|
|
4518
|
+
setSortOrder('desc');
|
|
4501
4519
|
break;
|
|
4502
|
-
case
|
|
4503
|
-
setSort(
|
|
4504
|
-
setSortOrder(
|
|
4520
|
+
case 'oldest':
|
|
4521
|
+
setSort('modified');
|
|
4522
|
+
setSortOrder('asc');
|
|
4505
4523
|
break;
|
|
4506
|
-
case
|
|
4507
|
-
setSort(
|
|
4508
|
-
setSortOrder(
|
|
4524
|
+
case 'titleAZ':
|
|
4525
|
+
setSort('title');
|
|
4526
|
+
setSortOrder('asc');
|
|
4509
4527
|
break;
|
|
4510
|
-
case
|
|
4511
|
-
setSort(
|
|
4512
|
-
setSortOrder(
|
|
4528
|
+
case 'titleZA':
|
|
4529
|
+
setSort('title');
|
|
4530
|
+
setSortOrder('desc');
|
|
4513
4531
|
break;
|
|
4514
4532
|
}
|
|
4515
4533
|
};
|
|
@@ -4517,12 +4535,12 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4517
4535
|
const newFacets = {
|
|
4518
4536
|
...selectedFacets
|
|
4519
4537
|
};
|
|
4520
|
-
if (key ===
|
|
4538
|
+
if (key === 'theme') {
|
|
4521
4539
|
const existingFacet = newFacets.theme.findIndex((s)=>s === value);
|
|
4522
4540
|
if (existingFacet > -1) newFacets.theme.splice(existingFacet, 1);
|
|
4523
4541
|
else newFacets.theme.push(value);
|
|
4524
4542
|
}
|
|
4525
|
-
if (key ===
|
|
4543
|
+
if (key === 'keyword') {
|
|
4526
4544
|
const existingFacet = newFacets.keyword.findIndex((s)=>s === value);
|
|
4527
4545
|
if (existingFacet > -1) newFacets.keyword.splice(existingFacet, 1);
|
|
4528
4546
|
else newFacets.keyword.push(value);
|
|
@@ -4536,7 +4554,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4536
4554
|
});
|
|
4537
4555
|
setSelectedFacets(newFacets);
|
|
4538
4556
|
const url = new URL(window.location.href);
|
|
4539
|
-
window.history.pushState({},
|
|
4557
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
4540
4558
|
}
|
|
4541
4559
|
const pageSize = defaultPageSize;
|
|
4542
4560
|
(0, $hgUW1$useEffect)(()=>{
|
|
@@ -4581,14 +4599,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4581
4599
|
setSelectedFacets(defaultSelectedFacets);
|
|
4582
4600
|
setPage(defaultPage);
|
|
4583
4601
|
const url = new URL(window.location.href);
|
|
4584
|
-
window.history.pushState({},
|
|
4602
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}`);
|
|
4585
4603
|
}
|
|
4586
4604
|
function buildSearchParams(includePage) {
|
|
4587
4605
|
let newParams = {};
|
|
4588
4606
|
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
4589
4607
|
if (sort !== defaultSort.defaultSort) newParams.sort = sort;
|
|
4590
4608
|
if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
|
|
4591
|
-
if (fulltext !==
|
|
4609
|
+
if (fulltext !== '') newParams.fulltext = fulltext;
|
|
4592
4610
|
if (Object.keys(selectedFacets).length) Object.keys(selectedFacets).forEach((key)=>{
|
|
4593
4611
|
newParams[key] = selectedFacets[key];
|
|
4594
4612
|
});
|
|
@@ -4601,9 +4619,9 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4601
4619
|
fulltext: fulltext ? fulltext : undefined,
|
|
4602
4620
|
...selectedFacets,
|
|
4603
4621
|
sort: sort ? sort : undefined,
|
|
4604
|
-
[
|
|
4622
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
4605
4623
|
page: page !== 1 ? page : undefined,
|
|
4606
|
-
[
|
|
4624
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
4607
4625
|
};
|
|
4608
4626
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4609
4627
|
queryKey: [
|
|
@@ -4612,7 +4630,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4612
4630
|
],
|
|
4613
4631
|
queryFn: ()=>{
|
|
4614
4632
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4615
|
-
arrayFormat:
|
|
4633
|
+
arrayFormat: 'comma',
|
|
4616
4634
|
encode: false
|
|
4617
4635
|
})}`);
|
|
4618
4636
|
}
|
|
@@ -4663,7 +4681,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4663
4681
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4664
4682
|
fieldClassName: "ds-u-margin--0",
|
|
4665
4683
|
value: filterText,
|
|
4666
|
-
className: `ds-u-padding-right--2 ${altMobileSearchButton ?
|
|
4684
|
+
className: `ds-u-padding-right--2 ${altMobileSearchButton ? 'ds-l-col--12 ds-l-md-col--10 --alt-style' : 'ds-l-col--10'}`,
|
|
4667
4685
|
label: "Search datasets",
|
|
4668
4686
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4669
4687
|
placeholder: "Search datasets",
|
|
@@ -4725,7 +4743,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4725
4743
|
"Showing ",
|
|
4726
4744
|
currentResultNumbers.startingNumber,
|
|
4727
4745
|
" -",
|
|
4728
|
-
|
|
4746
|
+
' ',
|
|
4729
4747
|
currentResultNumbers.endingNumber,
|
|
4730
4748
|
" of ",
|
|
4731
4749
|
data.data.total,
|
|
@@ -4803,7 +4821,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4803
4821
|
},
|
|
4804
4822
|
renderHref: (page)=>{
|
|
4805
4823
|
const searchParams = buildSearchParams(false);
|
|
4806
|
-
const includeAnd = searchParams ?
|
|
4824
|
+
const includeAnd = searchParams ? '&' : '';
|
|
4807
4825
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
4808
4826
|
}
|
|
4809
4827
|
})
|
|
@@ -4837,26 +4855,26 @@ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
4837
4855
|
|
|
4838
4856
|
|
|
4839
4857
|
const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4840
|
-
defaultSort:
|
|
4841
|
-
defaultOrder:
|
|
4842
|
-
}, pageTitle: pageTitle =
|
|
4858
|
+
defaultSort: 'modified',
|
|
4859
|
+
defaultOrder: 'desc'
|
|
4860
|
+
}, pageTitle: pageTitle = 'What\'s New ', showLargeFileWarning: showLargeFileWarning = false, introText: introText = '', dataDictionaryLinks: dataDictionaryLinks = false })=>{
|
|
4843
4861
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4844
4862
|
const sortOptions = [
|
|
4845
4863
|
{
|
|
4846
|
-
label:
|
|
4847
|
-
value:
|
|
4864
|
+
label: 'Newest',
|
|
4865
|
+
value: 'newest'
|
|
4848
4866
|
},
|
|
4849
4867
|
{
|
|
4850
|
-
label:
|
|
4851
|
-
value:
|
|
4868
|
+
label: 'Oldest',
|
|
4869
|
+
value: 'oldest'
|
|
4852
4870
|
},
|
|
4853
4871
|
{
|
|
4854
|
-
label:
|
|
4855
|
-
value:
|
|
4872
|
+
label: 'Title A-Z',
|
|
4873
|
+
value: 'titleAZ'
|
|
4856
4874
|
},
|
|
4857
4875
|
{
|
|
4858
|
-
label:
|
|
4859
|
-
value:
|
|
4876
|
+
label: 'Title Z-A',
|
|
4877
|
+
value: 'titleZA'
|
|
4860
4878
|
}
|
|
4861
4879
|
];
|
|
4862
4880
|
const defaultSortBy = "";
|
|
@@ -4870,33 +4888,33 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4870
4888
|
endingNumber: 0
|
|
4871
4889
|
});
|
|
4872
4890
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4873
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4891
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)('');
|
|
4874
4892
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4875
4893
|
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
4876
4894
|
const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
|
|
4877
4895
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4878
4896
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4879
4897
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4880
|
-
return sort ===
|
|
4898
|
+
return sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
|
|
4881
4899
|
});
|
|
4882
4900
|
const setSortOptions = (value)=>{
|
|
4883
4901
|
setSortDisplay(value);
|
|
4884
4902
|
switch(value){
|
|
4885
|
-
case
|
|
4886
|
-
setSort(
|
|
4887
|
-
setSortOrder(
|
|
4903
|
+
case 'newest':
|
|
4904
|
+
setSort('modified');
|
|
4905
|
+
setSortOrder('desc');
|
|
4888
4906
|
break;
|
|
4889
|
-
case
|
|
4890
|
-
setSort(
|
|
4891
|
-
setSortOrder(
|
|
4907
|
+
case 'oldest':
|
|
4908
|
+
setSort('modified');
|
|
4909
|
+
setSortOrder('asc');
|
|
4892
4910
|
break;
|
|
4893
|
-
case
|
|
4894
|
-
setSort(
|
|
4895
|
-
setSortOrder(
|
|
4911
|
+
case 'titleAZ':
|
|
4912
|
+
setSort('title');
|
|
4913
|
+
setSortOrder('asc');
|
|
4896
4914
|
break;
|
|
4897
|
-
case
|
|
4898
|
-
setSort(
|
|
4899
|
-
setSortOrder(
|
|
4915
|
+
case 'titleZA':
|
|
4916
|
+
setSort('title');
|
|
4917
|
+
setSortOrder('desc');
|
|
4900
4918
|
break;
|
|
4901
4919
|
}
|
|
4902
4920
|
};
|
|
@@ -4905,7 +4923,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4905
4923
|
// Update browser URL with current search params
|
|
4906
4924
|
const params = buildSearchParams(true);
|
|
4907
4925
|
const url = new URL(window.location.href);
|
|
4908
|
-
window.history.pushState({},
|
|
4926
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${params}`);
|
|
4909
4927
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4910
4928
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4911
4929
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -4944,9 +4962,9 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4944
4962
|
}
|
|
4945
4963
|
let params = {
|
|
4946
4964
|
sort: sort ? sort : undefined,
|
|
4947
|
-
[
|
|
4965
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
4948
4966
|
page: page !== 1 ? page : undefined,
|
|
4949
|
-
[
|
|
4967
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
4950
4968
|
};
|
|
4951
4969
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4952
4970
|
queryKey: [
|
|
@@ -4955,7 +4973,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4955
4973
|
],
|
|
4956
4974
|
queryFn: ()=>{
|
|
4957
4975
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4958
|
-
arrayFormat:
|
|
4976
|
+
arrayFormat: 'comma',
|
|
4959
4977
|
encode: false
|
|
4960
4978
|
})}`);
|
|
4961
4979
|
}
|
|
@@ -5019,7 +5037,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5019
5037
|
"Showing ",
|
|
5020
5038
|
currentResultNumbers.startingNumber,
|
|
5021
5039
|
" -",
|
|
5022
|
-
|
|
5040
|
+
' ',
|
|
5023
5041
|
currentResultNumbers.endingNumber,
|
|
5024
5042
|
" of ",
|
|
5025
5043
|
data.data.total,
|
|
@@ -5086,7 +5104,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5086
5104
|
},
|
|
5087
5105
|
renderHref: (page)=>{
|
|
5088
5106
|
const searchParams = buildSearchParams(false);
|
|
5089
|
-
const includeAnd = searchParams ?
|
|
5107
|
+
const includeAnd = searchParams ? '&' : '';
|
|
5090
5108
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
5091
5109
|
}
|
|
5092
5110
|
})
|
|
@@ -5118,12 +5136,12 @@ var $550bcc185f420ff5$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
5118
5136
|
|
|
5119
5137
|
const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
5120
5138
|
const [dataset, setDataset] = (0, $hgUW1$useState)({
|
|
5121
|
-
title:
|
|
5139
|
+
title: '',
|
|
5122
5140
|
distribution: [],
|
|
5123
|
-
error:
|
|
5124
|
-
description:
|
|
5125
|
-
identifier:
|
|
5126
|
-
modified:
|
|
5141
|
+
error: '',
|
|
5142
|
+
description: '',
|
|
5143
|
+
identifier: '',
|
|
5144
|
+
modified: ''
|
|
5127
5145
|
});
|
|
5128
5146
|
const [id, setId] = (0, $hgUW1$useState)(datasetId);
|
|
5129
5147
|
const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
|
|
@@ -5133,7 +5151,7 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
|
5133
5151
|
"metastore" + id
|
|
5134
5152
|
],
|
|
5135
5153
|
queryFn: ()=>{
|
|
5136
|
-
return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ?
|
|
5154
|
+
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)=>{
|
|
5137
5155
|
return {
|
|
5138
5156
|
title: dataset.title,
|
|
5139
5157
|
distribution: dataset.distribution,
|
|
@@ -5199,7 +5217,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5199
5217
|
...additionalParams
|
|
5200
5218
|
};
|
|
5201
5219
|
params = (0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA);
|
|
5202
|
-
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` :
|
|
5220
|
+
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : '';
|
|
5203
5221
|
let enabled = false;
|
|
5204
5222
|
if (id) {
|
|
5205
5223
|
if (!requireConditions) enabled = true;
|
|
@@ -5279,65 +5297,65 @@ var $1d3d480a9cfaabe0$export$2e2bcd8739ae039 = $1d3d480a9cfaabe0$var$useDatastor
|
|
|
5279
5297
|
|
|
5280
5298
|
|
|
5281
5299
|
const $28f16f59778efa64$export$82b1b1d517e5388a = {
|
|
5282
|
-
|
|
5283
|
-
name:
|
|
5300
|
+
'R/P10Y': {
|
|
5301
|
+
name: 'Decennial'
|
|
5284
5302
|
},
|
|
5285
|
-
|
|
5286
|
-
name:
|
|
5303
|
+
'R/P4Y': {
|
|
5304
|
+
name: 'Quadrennial'
|
|
5287
5305
|
},
|
|
5288
|
-
|
|
5289
|
-
name:
|
|
5306
|
+
'R/P1Y': {
|
|
5307
|
+
name: 'Annual'
|
|
5290
5308
|
},
|
|
5291
|
-
|
|
5292
|
-
name:
|
|
5309
|
+
'R/P2M': {
|
|
5310
|
+
name: 'Bimonthly'
|
|
5293
5311
|
},
|
|
5294
|
-
|
|
5295
|
-
name:
|
|
5312
|
+
'R/P3.5D': {
|
|
5313
|
+
name: 'Semiweekly'
|
|
5296
5314
|
},
|
|
5297
|
-
|
|
5298
|
-
name:
|
|
5315
|
+
'R/P1D': {
|
|
5316
|
+
name: 'Daily'
|
|
5299
5317
|
},
|
|
5300
|
-
|
|
5301
|
-
name:
|
|
5318
|
+
'R/P2W': {
|
|
5319
|
+
name: 'Biweekly'
|
|
5302
5320
|
},
|
|
5303
|
-
|
|
5304
|
-
name:
|
|
5321
|
+
'R/P6M': {
|
|
5322
|
+
name: 'Semiannual'
|
|
5305
5323
|
},
|
|
5306
|
-
|
|
5307
|
-
name:
|
|
5324
|
+
'R/P2Y': {
|
|
5325
|
+
name: 'Biennial'
|
|
5308
5326
|
},
|
|
5309
|
-
|
|
5310
|
-
name:
|
|
5327
|
+
'R/P3Y': {
|
|
5328
|
+
name: 'Triennial'
|
|
5311
5329
|
},
|
|
5312
|
-
|
|
5313
|
-
name:
|
|
5330
|
+
'R/P0.33W': {
|
|
5331
|
+
name: 'Three times a week'
|
|
5314
5332
|
},
|
|
5315
|
-
|
|
5316
|
-
name:
|
|
5333
|
+
'R/P0.33M': {
|
|
5334
|
+
name: 'Three times a month'
|
|
5317
5335
|
},
|
|
5318
|
-
|
|
5319
|
-
name:
|
|
5336
|
+
'R/PT1S': {
|
|
5337
|
+
name: 'Continuously updated'
|
|
5320
5338
|
},
|
|
5321
|
-
|
|
5322
|
-
name:
|
|
5339
|
+
'R/P1M': {
|
|
5340
|
+
name: 'Monthly'
|
|
5323
5341
|
},
|
|
5324
|
-
|
|
5325
|
-
name:
|
|
5342
|
+
'R/P3M': {
|
|
5343
|
+
name: 'Quarterly'
|
|
5326
5344
|
},
|
|
5327
|
-
|
|
5328
|
-
name:
|
|
5345
|
+
'R/P0.5M': {
|
|
5346
|
+
name: 'Semimonthly'
|
|
5329
5347
|
},
|
|
5330
|
-
|
|
5331
|
-
name:
|
|
5348
|
+
'R/P4M': {
|
|
5349
|
+
name: 'Three times a year'
|
|
5332
5350
|
},
|
|
5333
|
-
|
|
5334
|
-
name:
|
|
5351
|
+
'R/P1W': {
|
|
5352
|
+
name: 'Weekly'
|
|
5335
5353
|
},
|
|
5336
|
-
|
|
5337
|
-
name:
|
|
5354
|
+
'R/PT1H': {
|
|
5355
|
+
name: 'Hourly'
|
|
5338
5356
|
},
|
|
5339
5357
|
irregular: {
|
|
5340
|
-
name:
|
|
5358
|
+
name: 'Irregular'
|
|
5341
5359
|
}
|
|
5342
5360
|
};
|
|
5343
5361
|
|
|
@@ -5346,7 +5364,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5346
5364
|
modified: (data)=>{
|
|
5347
5365
|
return [
|
|
5348
5366
|
{
|
|
5349
|
-
label:
|
|
5367
|
+
label: 'Modified',
|
|
5350
5368
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5351
5369
|
date: data
|
|
5352
5370
|
})
|
|
@@ -5356,7 +5374,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5356
5374
|
issued: (data)=>{
|
|
5357
5375
|
return [
|
|
5358
5376
|
{
|
|
5359
|
-
label:
|
|
5377
|
+
label: 'Issued',
|
|
5360
5378
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5361
5379
|
date: data
|
|
5362
5380
|
})
|
|
@@ -5366,7 +5384,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5366
5384
|
accrualPeriodicity: (data)=>{
|
|
5367
5385
|
return [
|
|
5368
5386
|
{
|
|
5369
|
-
label:
|
|
5387
|
+
label: 'Frequency',
|
|
5370
5388
|
value: (0, $28f16f59778efa64$export$82b1b1d517e5388a)[data].name
|
|
5371
5389
|
}
|
|
5372
5390
|
];
|
|
@@ -5374,7 +5392,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5374
5392
|
publisher: (data)=>{
|
|
5375
5393
|
if (data.data && data.data.name) return [
|
|
5376
5394
|
{
|
|
5377
|
-
label:
|
|
5395
|
+
label: 'Publisher',
|
|
5378
5396
|
value: data.data.name
|
|
5379
5397
|
}
|
|
5380
5398
|
];
|
|
@@ -5383,7 +5401,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5383
5401
|
identifier: (data)=>{
|
|
5384
5402
|
return [
|
|
5385
5403
|
{
|
|
5386
|
-
label:
|
|
5404
|
+
label: 'Identifier',
|
|
5387
5405
|
value: data
|
|
5388
5406
|
}
|
|
5389
5407
|
];
|
|
@@ -5391,11 +5409,11 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5391
5409
|
contactPoint: (data)=>{
|
|
5392
5410
|
let rows = [];
|
|
5393
5411
|
if (data.fn) rows.push({
|
|
5394
|
-
label:
|
|
5412
|
+
label: 'Contact',
|
|
5395
5413
|
value: data.fn
|
|
5396
5414
|
});
|
|
5397
5415
|
if (data.hasEmail) rows.push({
|
|
5398
|
-
label:
|
|
5416
|
+
label: 'Contact Email',
|
|
5399
5417
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5400
5418
|
href: data.hasEmail.includes("mailto:") ? data.hasEmail : `mailto:${data.hasEmail}`,
|
|
5401
5419
|
children: data.hasEmail.replace("mailto:", "")
|
|
@@ -5406,7 +5424,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5406
5424
|
bureauCode: (data)=>{
|
|
5407
5425
|
if (data.length) return [
|
|
5408
5426
|
{
|
|
5409
|
-
label:
|
|
5427
|
+
label: 'Bureau Code',
|
|
5410
5428
|
value: data[0]
|
|
5411
5429
|
}
|
|
5412
5430
|
];
|
|
@@ -5414,7 +5432,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5414
5432
|
programCode: (data)=>{
|
|
5415
5433
|
if (data.length) return [
|
|
5416
5434
|
{
|
|
5417
|
-
label:
|
|
5435
|
+
label: 'Program Code',
|
|
5418
5436
|
value: data[0]
|
|
5419
5437
|
}
|
|
5420
5438
|
];
|
|
@@ -5422,13 +5440,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5422
5440
|
theme: (data)=>{
|
|
5423
5441
|
return [
|
|
5424
5442
|
{
|
|
5425
|
-
label:
|
|
5443
|
+
label: 'Category',
|
|
5426
5444
|
value: data.map((theme)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5427
5445
|
to: `/datasets?theme[]=${theme.data}`,
|
|
5428
5446
|
children: theme.data
|
|
5429
5447
|
}, theme.data)).reduce((prev, curr)=>[
|
|
5430
5448
|
prev,
|
|
5431
|
-
|
|
5449
|
+
', ',
|
|
5432
5450
|
curr
|
|
5433
5451
|
])
|
|
5434
5452
|
}
|
|
@@ -5437,13 +5455,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5437
5455
|
keyword: (data)=>{
|
|
5438
5456
|
return [
|
|
5439
5457
|
{
|
|
5440
|
-
label:
|
|
5458
|
+
label: 'Tags',
|
|
5441
5459
|
value: data.map((keyword)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5442
5460
|
to: `/datasets?keyword[]=${keyword.data}`,
|
|
5443
5461
|
children: keyword.data
|
|
5444
5462
|
}, keyword.data)).reduce((prev, curr)=>[
|
|
5445
5463
|
prev,
|
|
5446
|
-
|
|
5464
|
+
', ',
|
|
5447
5465
|
curr
|
|
5448
5466
|
])
|
|
5449
5467
|
}
|
|
@@ -5452,7 +5470,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5452
5470
|
license: (data)=>{
|
|
5453
5471
|
return [
|
|
5454
5472
|
{
|
|
5455
|
-
label:
|
|
5473
|
+
label: 'License',
|
|
5456
5474
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5457
5475
|
href: data,
|
|
5458
5476
|
children: data
|
|
@@ -5463,7 +5481,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5463
5481
|
accessLevel: (data)=>{
|
|
5464
5482
|
return [
|
|
5465
5483
|
{
|
|
5466
|
-
label:
|
|
5484
|
+
label: 'Public Access Level',
|
|
5467
5485
|
value: data
|
|
5468
5486
|
}
|
|
5469
5487
|
];
|
|
@@ -5471,7 +5489,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5471
5489
|
temporal: (data)=>{
|
|
5472
5490
|
return [
|
|
5473
5491
|
{
|
|
5474
|
-
label:
|
|
5492
|
+
label: 'Temporal Coverage',
|
|
5475
5493
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5476
5494
|
className: "dc-c-word-break--all",
|
|
5477
5495
|
children: data
|
|
@@ -5482,7 +5500,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5482
5500
|
spatial: (data)=>{
|
|
5483
5501
|
return [
|
|
5484
5502
|
{
|
|
5485
|
-
label:
|
|
5503
|
+
label: 'Spacial/Geographical Coverage',
|
|
5486
5504
|
value: data
|
|
5487
5505
|
}
|
|
5488
5506
|
];
|
|
@@ -5490,7 +5508,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5490
5508
|
references: (data)=>{
|
|
5491
5509
|
return [
|
|
5492
5510
|
{
|
|
5493
|
-
label:
|
|
5511
|
+
label: 'Related Documents',
|
|
5494
5512
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
5495
5513
|
className: "ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0",
|
|
5496
5514
|
children: data.map((item)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -5528,7 +5546,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ distribution: distribution,
|
|
|
5528
5546
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
5529
5547
|
const { data: resource } = (0, $hgUW1$useQuery)({
|
|
5530
5548
|
queryKey: [
|
|
5531
|
-
|
|
5549
|
+
'resource-information',
|
|
5532
5550
|
distribution.identifier
|
|
5533
5551
|
],
|
|
5534
5552
|
queryFn: ()=>(0, $hgUW1$axios).get(`${rootUrl}/datastore/query/${distribution.identifier}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({
|
|
@@ -5555,7 +5573,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ distribution: distribution,
|
|
|
5555
5573
|
}),
|
|
5556
5574
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5557
5575
|
className: "ds-u-font-weight--bold",
|
|
5558
|
-
children: resource?.count ? Number(resource.count).toLocaleString() :
|
|
5576
|
+
children: resource?.count ? Number(resource.count).toLocaleString() : ''
|
|
5559
5577
|
})
|
|
5560
5578
|
]
|
|
5561
5579
|
}),
|
|
@@ -5623,8 +5641,8 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5623
5641
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
5624
5642
|
href: dist.data.downloadURL,
|
|
5625
5643
|
style: {
|
|
5626
|
-
order: sm ?
|
|
5627
|
-
width: sm ?
|
|
5644
|
+
order: sm ? '1' : '0',
|
|
5645
|
+
width: sm ? '100%' : 'auto'
|
|
5628
5646
|
},
|
|
5629
5647
|
"aria-label": `Download ${dist.data.title || title} ${fileFormat}`,
|
|
5630
5648
|
className: "ds-c-button",
|
|
@@ -5637,7 +5655,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5637
5655
|
})
|
|
5638
5656
|
}),
|
|
5639
5657
|
dist.data.description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5640
|
-
className:
|
|
5658
|
+
className: 'ds-u-measure--wide ds-u-margin-bottom--7',
|
|
5641
5659
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5642
5660
|
className: "dc-c-metadata-description ds-u-margin--0",
|
|
5643
5661
|
dangerouslySetInnerHTML: {
|
|
@@ -5711,7 +5729,7 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5711
5729
|
const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
|
|
5712
5730
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
5713
5731
|
children: [
|
|
5714
|
-
md ?
|
|
5732
|
+
md ? '' : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5715
5733
|
component: "th",
|
|
5716
5734
|
className: "ds-u-font-weight--bold",
|
|
5717
5735
|
children: [
|
|
@@ -5723,8 +5741,8 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5723
5741
|
ariaLabel: r.label,
|
|
5724
5742
|
// @ts-ignore
|
|
5725
5743
|
style: {
|
|
5726
|
-
border:
|
|
5727
|
-
background:
|
|
5744
|
+
border: 'none',
|
|
5745
|
+
background: 'none'
|
|
5728
5746
|
},
|
|
5729
5747
|
maxWidth: "400px",
|
|
5730
5748
|
placement: "auto",
|
|
@@ -5783,10 +5801,10 @@ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: ap
|
|
|
5783
5801
|
href: apiUrl,
|
|
5784
5802
|
children: [
|
|
5785
5803
|
"View API",
|
|
5786
|
-
|
|
5804
|
+
' ',
|
|
5787
5805
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5788
5806
|
style: {
|
|
5789
|
-
whiteSpace:
|
|
5807
|
+
whiteSpace: 'nowrap'
|
|
5790
5808
|
},
|
|
5791
5809
|
children: [
|
|
5792
5810
|
"specification ",
|
|
@@ -5827,20 +5845,20 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
|
|
|
5827
5845
|
|
|
5828
5846
|
const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
|
|
5829
5847
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
5830
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
5848
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
|
|
5831
5849
|
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
5832
5850
|
minWidth: 0,
|
|
5833
5851
|
maxWidth: 544
|
|
5834
5852
|
});
|
|
5835
5853
|
const sortElement = (isSorted)=>{
|
|
5836
|
-
if (isSorted ===
|
|
5837
|
-
if (isSorted ===
|
|
5838
|
-
return
|
|
5854
|
+
if (isSorted === 'asc') return 'dc-c-sort--asc';
|
|
5855
|
+
if (isSorted === 'desc') return 'dc-c-sort--desc';
|
|
5856
|
+
return 'dc-c-sort--default';
|
|
5839
5857
|
};
|
|
5840
5858
|
const table = (0, $hgUW1$useReactTable)({
|
|
5841
5859
|
data: tableData,
|
|
5842
5860
|
columns: tableColumns,
|
|
5843
|
-
columnResizeMode:
|
|
5861
|
+
columnResizeMode: 'onChange',
|
|
5844
5862
|
getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
|
|
5845
5863
|
getFilteredRowModel: (0, $hgUW1$getFilteredRowModel)(),
|
|
5846
5864
|
getPaginationRowModel: (0, $hgUW1$getPaginationRowModel)(),
|
|
@@ -5859,49 +5877,49 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5859
5877
|
});
|
|
5860
5878
|
const sortOptions = [
|
|
5861
5879
|
{
|
|
5862
|
-
value:
|
|
5863
|
-
label:
|
|
5880
|
+
value: 'default',
|
|
5881
|
+
label: 'No Sort'
|
|
5864
5882
|
},
|
|
5865
5883
|
{
|
|
5866
|
-
value:
|
|
5867
|
-
label:
|
|
5884
|
+
value: 'titleasc',
|
|
5885
|
+
label: 'Title A-Z'
|
|
5868
5886
|
},
|
|
5869
5887
|
{
|
|
5870
|
-
value:
|
|
5871
|
-
label:
|
|
5888
|
+
value: 'titledesc',
|
|
5889
|
+
label: 'Title Z-A'
|
|
5872
5890
|
},
|
|
5873
5891
|
{
|
|
5874
|
-
value:
|
|
5875
|
-
label:
|
|
5892
|
+
value: 'typeasc',
|
|
5893
|
+
label: 'Type A-Z'
|
|
5876
5894
|
},
|
|
5877
5895
|
{
|
|
5878
|
-
value:
|
|
5879
|
-
label:
|
|
5896
|
+
value: 'typedesc',
|
|
5897
|
+
label: 'Type Z-A'
|
|
5880
5898
|
}
|
|
5881
5899
|
];
|
|
5882
5900
|
const sortStatesLookup = {
|
|
5883
5901
|
default: [],
|
|
5884
5902
|
titleasc: [
|
|
5885
5903
|
{
|
|
5886
|
-
id:
|
|
5904
|
+
id: 'titleResizable',
|
|
5887
5905
|
desc: false
|
|
5888
5906
|
}
|
|
5889
5907
|
],
|
|
5890
5908
|
titledesc: [
|
|
5891
5909
|
{
|
|
5892
|
-
id:
|
|
5910
|
+
id: 'titleResizable',
|
|
5893
5911
|
desc: true
|
|
5894
5912
|
}
|
|
5895
5913
|
],
|
|
5896
5914
|
typeasc: [
|
|
5897
5915
|
{
|
|
5898
|
-
id:
|
|
5916
|
+
id: 'type',
|
|
5899
5917
|
desc: false
|
|
5900
5918
|
}
|
|
5901
5919
|
],
|
|
5902
5920
|
typedesc: [
|
|
5903
5921
|
{
|
|
5904
|
-
id:
|
|
5922
|
+
id: 'type',
|
|
5905
5923
|
desc: true
|
|
5906
5924
|
}
|
|
5907
5925
|
]
|
|
@@ -5929,7 +5947,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5929
5947
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
5930
5948
|
className: "dc-c-datatable",
|
|
5931
5949
|
style: {
|
|
5932
|
-
width:
|
|
5950
|
+
width: '100%'
|
|
5933
5951
|
},
|
|
5934
5952
|
stackable: true,
|
|
5935
5953
|
children: [
|
|
@@ -5945,12 +5963,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5945
5963
|
}, header.id + "_resize") : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5946
5964
|
key: header.id,
|
|
5947
5965
|
className: `ds-u-border-y--2 ds-u-border--dark ds-u-border-x--0`,
|
|
5948
|
-
id:
|
|
5966
|
+
id: 'dataDictionary_' + header.id,
|
|
5949
5967
|
children: [
|
|
5950
5968
|
(0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext()),
|
|
5951
|
-
header.id ===
|
|
5969
|
+
header.id === 'type' && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
5952
5970
|
onClick: header.column.getToggleSortingHandler(),
|
|
5953
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
5971
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : '',
|
|
5954
5972
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
5955
5973
|
})
|
|
5956
5974
|
]
|
|
@@ -5965,12 +5983,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5965
5983
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
5966
5984
|
key: cell.id,
|
|
5967
5985
|
style: {
|
|
5968
|
-
maxWidth: mobile ?
|
|
5969
|
-
whiteSpace: cell.column.id === "description" ?
|
|
5986
|
+
maxWidth: mobile ? '100%' : cell.column.getSize(),
|
|
5987
|
+
whiteSpace: cell.column.id === "description" ? 'pre-wrap' : 'normal'
|
|
5970
5988
|
},
|
|
5971
|
-
className: `${cell.column.id ===
|
|
5972
|
-
headers:
|
|
5973
|
-
stackedTitle: cell.column.id ===
|
|
5989
|
+
className: `${cell.column.id === 'titleResizable' ? 'ds-u-word-break' : ''}`,
|
|
5990
|
+
headers: 'dataDictionary_' + cell.column.id,
|
|
5991
|
+
stackedTitle: cell.column.id === 'titleResizable' ? 'Title' : cell.column.columnDef.header,
|
|
5974
5992
|
children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
5975
5993
|
});
|
|
5976
5994
|
})
|
|
@@ -5999,7 +6017,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5999
6017
|
table.setPageIndex(page - 1);
|
|
6000
6018
|
},
|
|
6001
6019
|
renderHref: (page)=>`/page=${page}`
|
|
6002
|
-
}) :
|
|
6020
|
+
}) : ''
|
|
6003
6021
|
]
|
|
6004
6022
|
});
|
|
6005
6023
|
};
|
|
@@ -6009,17 +6027,17 @@ var $6765a74df807d015$export$2e2bcd8739ae039 = $6765a74df807d015$var$DataDiction
|
|
|
6009
6027
|
const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
|
|
6010
6028
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
6011
6029
|
const tableColumns = [
|
|
6012
|
-
columnHelper.accessor(
|
|
6013
|
-
header:
|
|
6030
|
+
columnHelper.accessor('name', {
|
|
6031
|
+
header: 'Name'
|
|
6014
6032
|
}),
|
|
6015
|
-
columnHelper.accessor(
|
|
6016
|
-
header:
|
|
6033
|
+
columnHelper.accessor('title', {
|
|
6034
|
+
header: 'Title'
|
|
6017
6035
|
}),
|
|
6018
|
-
columnHelper.accessor(
|
|
6019
|
-
header:
|
|
6036
|
+
columnHelper.accessor('type', {
|
|
6037
|
+
header: 'Type'
|
|
6020
6038
|
}),
|
|
6021
|
-
columnHelper.accessor(
|
|
6022
|
-
header:
|
|
6039
|
+
columnHelper.accessor('format', {
|
|
6040
|
+
header: 'Format'
|
|
6023
6041
|
})
|
|
6024
6042
|
];
|
|
6025
6043
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6765a74df807d015$export$2e2bcd8739ae039), {
|
|
@@ -6063,7 +6081,7 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6063
6081
|
});
|
|
6064
6082
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
6065
6083
|
const tableColumns = [
|
|
6066
|
-
columnHelper.accessor(
|
|
6084
|
+
columnHelper.accessor('titleResizable', {
|
|
6067
6085
|
header: ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6068
6086
|
className: "dc-c-tooltip-width-override",
|
|
6069
6087
|
children: [
|
|
@@ -6072,8 +6090,8 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6072
6090
|
title: "Title represents the column headers of the data file",
|
|
6073
6091
|
// @ts-ignore
|
|
6074
6092
|
style: {
|
|
6075
|
-
border:
|
|
6076
|
-
background:
|
|
6093
|
+
border: 'none',
|
|
6094
|
+
background: 'none'
|
|
6077
6095
|
},
|
|
6078
6096
|
maxWidth: "400px",
|
|
6079
6097
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
|
|
@@ -6083,48 +6101,48 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6083
6101
|
size: 300,
|
|
6084
6102
|
minSize: 132
|
|
6085
6103
|
}),
|
|
6086
|
-
columnHelper.accessor(
|
|
6087
|
-
header:
|
|
6104
|
+
columnHelper.accessor('description', {
|
|
6105
|
+
header: 'Description',
|
|
6088
6106
|
minSize: 600
|
|
6089
6107
|
}),
|
|
6090
|
-
columnHelper.accessor(
|
|
6091
|
-
header:
|
|
6108
|
+
columnHelper.accessor('type', {
|
|
6109
|
+
header: 'Type',
|
|
6092
6110
|
size: 150,
|
|
6093
6111
|
enableResizing: false
|
|
6094
6112
|
})
|
|
6095
6113
|
];
|
|
6096
6114
|
const typeOptions = [
|
|
6097
6115
|
{
|
|
6098
|
-
value:
|
|
6099
|
-
label:
|
|
6116
|
+
value: 'all',
|
|
6117
|
+
label: 'All Types'
|
|
6100
6118
|
},
|
|
6101
6119
|
{
|
|
6102
|
-
value:
|
|
6103
|
-
label:
|
|
6120
|
+
value: 'string',
|
|
6121
|
+
label: 'String'
|
|
6104
6122
|
},
|
|
6105
6123
|
{
|
|
6106
|
-
value:
|
|
6107
|
-
label:
|
|
6124
|
+
value: 'date',
|
|
6125
|
+
label: 'Date'
|
|
6108
6126
|
},
|
|
6109
6127
|
{
|
|
6110
|
-
value:
|
|
6111
|
-
label:
|
|
6128
|
+
value: 'datetime',
|
|
6129
|
+
label: 'Datetime'
|
|
6112
6130
|
},
|
|
6113
6131
|
{
|
|
6114
|
-
value:
|
|
6115
|
-
label:
|
|
6132
|
+
value: 'year',
|
|
6133
|
+
label: 'Year'
|
|
6116
6134
|
},
|
|
6117
6135
|
{
|
|
6118
|
-
value:
|
|
6119
|
-
label:
|
|
6136
|
+
value: 'integer',
|
|
6137
|
+
label: 'Integer'
|
|
6120
6138
|
},
|
|
6121
6139
|
{
|
|
6122
|
-
value:
|
|
6123
|
-
label:
|
|
6140
|
+
value: 'number',
|
|
6141
|
+
label: 'Number'
|
|
6124
6142
|
},
|
|
6125
6143
|
{
|
|
6126
|
-
value:
|
|
6127
|
-
label:
|
|
6144
|
+
value: 'boolean',
|
|
6145
|
+
label: 'Boolean'
|
|
6128
6146
|
}
|
|
6129
6147
|
];
|
|
6130
6148
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -6231,7 +6249,7 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
|
|
|
6231
6249
|
href: datasetDictionaryEndpoint + "/csv",
|
|
6232
6250
|
className: "ds-c-button",
|
|
6233
6251
|
style: {
|
|
6234
|
-
width:
|
|
6252
|
+
width: '100%'
|
|
6235
6253
|
},
|
|
6236
6254
|
children: [
|
|
6237
6255
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
@@ -6288,13 +6306,13 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6288
6306
|
const [description, setDescription] = (0, $hgUW1$useState)("");
|
|
6289
6307
|
if (!distribution && !dataset?.identifier) return null;
|
|
6290
6308
|
(0, $hgUW1$useEffect)(()=>{
|
|
6291
|
-
let newDescription =
|
|
6309
|
+
let newDescription = '';
|
|
6292
6310
|
if (customDescription) newDescription = customDescription(dataset, distribution, resource);
|
|
6293
6311
|
else {
|
|
6294
6312
|
if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
|
|
6295
6313
|
else if (dataset.description) newDescription = dataset.description;
|
|
6296
6314
|
}
|
|
6297
|
-
if (description !== newDescription && updateAriaLive) updateAriaLive(newDescription);
|
|
6315
|
+
if (typeof newDescription === "string" && description !== newDescription && updateAriaLive) updateAriaLive(newDescription);
|
|
6298
6316
|
setDescription(newDescription);
|
|
6299
6317
|
}, [
|
|
6300
6318
|
resource,
|
|
@@ -6303,12 +6321,14 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6303
6321
|
customDescription
|
|
6304
6322
|
]);
|
|
6305
6323
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6306
|
-
className:
|
|
6324
|
+
className: 'ds-u-measure--wide ds-u-margin-bottom--7',
|
|
6307
6325
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6308
6326
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6327
|
+
children: typeof description === "string" ? /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6328
|
+
dangerouslySetInnerHTML: {
|
|
6329
|
+
__html: (0, $hgUW1$dompurify).sanitize(description)
|
|
6330
|
+
}
|
|
6331
|
+
}) : description
|
|
6312
6332
|
})
|
|
6313
6333
|
});
|
|
6314
6334
|
};
|
|
@@ -6325,7 +6345,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
6325
6345
|
],
|
|
6326
6346
|
queryFn: ()=>{
|
|
6327
6347
|
return fetch(`${dataDictionaryUrl}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA), {
|
|
6328
|
-
arrayFormat:
|
|
6348
|
+
arrayFormat: 'comma',
|
|
6329
6349
|
encode: false
|
|
6330
6350
|
})}`).then((res)=>res.json());
|
|
6331
6351
|
}
|
|
@@ -6344,7 +6364,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6344
6364
|
conditions: []
|
|
6345
6365
|
};
|
|
6346
6366
|
const { dataset: dataset, isPending: isPending } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
6347
|
-
const title = dataset.title ? dataset.title :
|
|
6367
|
+
const title = dataset.title ? dataset.title : '';
|
|
6348
6368
|
const metadataMapping = {
|
|
6349
6369
|
...(0, $6da0396069e23175$export$bc27cf7ecf44639d),
|
|
6350
6370
|
...customMetadataMapping
|
|
@@ -6352,7 +6372,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6352
6372
|
let distribution = {};
|
|
6353
6373
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
6354
6374
|
if (distributions.length) distribution = distributions[0];
|
|
6355
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
6375
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
6356
6376
|
...options,
|
|
6357
6377
|
limit: defaultPageSize
|
|
6358
6378
|
});
|
|
@@ -6364,7 +6384,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6364
6384
|
}) : null;
|
|
6365
6385
|
(0, $hgUW1$useEffect)(()=>{
|
|
6366
6386
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6367
|
-
if (localFileFormat ===
|
|
6387
|
+
if (localFileFormat === 'csv') resource.setResource(distribution.identifier);
|
|
6368
6388
|
}, [
|
|
6369
6389
|
distribution
|
|
6370
6390
|
]);
|
|
@@ -6419,27 +6439,27 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6419
6439
|
distribution,
|
|
6420
6440
|
window.location.hash
|
|
6421
6441
|
]);
|
|
6422
|
-
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType ===
|
|
6442
|
+
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === 'application/vnd.tableschema+json' || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
6423
6443
|
const formatType = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6424
6444
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6425
6445
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
6426
6446
|
content: notFoundContent,
|
|
6427
6447
|
siteUrl: rootUrl
|
|
6428
6448
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6429
|
-
className:
|
|
6449
|
+
className: 'ds-l-container',
|
|
6430
6450
|
children: [
|
|
6431
6451
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6432
|
-
className:
|
|
6452
|
+
className: 'ds-l-row',
|
|
6433
6453
|
children: [
|
|
6434
6454
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6435
|
-
className:
|
|
6455
|
+
className: 'ds-l-md-col--9',
|
|
6436
6456
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
6437
6457
|
className: "ds-text-heading--3xl",
|
|
6438
6458
|
children: title
|
|
6439
6459
|
})
|
|
6440
6460
|
}),
|
|
6441
6461
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6442
|
-
className:
|
|
6462
|
+
className: 'ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right',
|
|
6443
6463
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
6444
6464
|
className: "ds-u-margin--0",
|
|
6445
6465
|
children: [
|
|
@@ -6451,7 +6471,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6451
6471
|
})
|
|
6452
6472
|
}),
|
|
6453
6473
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6454
|
-
className:
|
|
6474
|
+
className: 'ds-l-md-col--9',
|
|
6455
6475
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
6456
6476
|
distribution: distribution,
|
|
6457
6477
|
dataset: dataset,
|
|
@@ -6463,9 +6483,9 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6463
6483
|
]
|
|
6464
6484
|
}),
|
|
6465
6485
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6466
|
-
className:
|
|
6486
|
+
className: 'ds-l-row',
|
|
6467
6487
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6468
|
-
className:
|
|
6488
|
+
className: 'ds-l-md-col--12 dc-dataset',
|
|
6469
6489
|
children: !isPending && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tabs), {
|
|
6470
6490
|
onChange: (selectedId, prevSelectedId)=>{
|
|
6471
6491
|
setSelectedTab(selectedId);
|
|
@@ -6473,7 +6493,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6473
6493
|
selectedId: selectedTab,
|
|
6474
6494
|
children: [
|
|
6475
6495
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6476
|
-
id:
|
|
6496
|
+
id: 'data-table',
|
|
6477
6497
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6478
6498
|
className: "ds-u-color--primary",
|
|
6479
6499
|
children: [
|
|
@@ -6483,7 +6503,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6483
6503
|
"Data Table"
|
|
6484
6504
|
]
|
|
6485
6505
|
}),
|
|
6486
|
-
className: borderlessTabs ?
|
|
6506
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6487
6507
|
children: (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
6488
6508
|
value: {
|
|
6489
6509
|
id: id,
|
|
@@ -6500,7 +6520,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6500
6520
|
})
|
|
6501
6521
|
}),
|
|
6502
6522
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6503
|
-
id:
|
|
6523
|
+
id: 'overview',
|
|
6504
6524
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6505
6525
|
className: "ds-u-color--primary",
|
|
6506
6526
|
children: [
|
|
@@ -6510,7 +6530,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6510
6530
|
"Overview"
|
|
6511
6531
|
]
|
|
6512
6532
|
}),
|
|
6513
|
-
className: borderlessTabs ?
|
|
6533
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6514
6534
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
|
|
6515
6535
|
resource: resource,
|
|
6516
6536
|
dataset: dataset,
|
|
@@ -6520,7 +6540,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6520
6540
|
})
|
|
6521
6541
|
}),
|
|
6522
6542
|
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6523
|
-
id:
|
|
6543
|
+
id: 'data-dictionary',
|
|
6524
6544
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6525
6545
|
className: "ds-u-color--primary",
|
|
6526
6546
|
children: [
|
|
@@ -6530,7 +6550,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6530
6550
|
"Data Dictionary"
|
|
6531
6551
|
]
|
|
6532
6552
|
}),
|
|
6533
|
-
className: borderlessTabs ?
|
|
6553
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6534
6554
|
children: displayDataDictionaryTab ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
6535
6555
|
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
6536
6556
|
datasetDictionaryEndpoint: distribution.data.describedBy,
|
|
@@ -6541,7 +6561,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6541
6561
|
})
|
|
6542
6562
|
}),
|
|
6543
6563
|
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6544
|
-
id:
|
|
6564
|
+
id: 'api',
|
|
6545
6565
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6546
6566
|
className: "ds-u-color--primary",
|
|
6547
6567
|
children: [
|
|
@@ -6551,7 +6571,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6551
6571
|
"API"
|
|
6552
6572
|
]
|
|
6553
6573
|
}),
|
|
6554
|
-
className: borderlessTabs ?
|
|
6574
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6555
6575
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
|
|
6556
6576
|
id: id,
|
|
6557
6577
|
rootUrl: rootUrl,
|
|
@@ -6588,13 +6608,13 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6588
6608
|
});
|
|
6589
6609
|
const menu = (0, $hgUW1$useRef)(null);
|
|
6590
6610
|
function closeMobileMenu() {
|
|
6591
|
-
const mobileMenuButtonElement = document.querySelector(
|
|
6611
|
+
const mobileMenuButtonElement = document.querySelector('.dkan-c-mobile-menu-button');
|
|
6592
6612
|
if (!mobileMenuButtonElement) return;
|
|
6593
6613
|
mobileMenuButtonElement.focus();
|
|
6594
6614
|
}
|
|
6595
6615
|
// Close mobile menu with escape.
|
|
6596
6616
|
function handleMenuClose(event) {
|
|
6597
|
-
if (event.key ===
|
|
6617
|
+
if (event.key === 'Escape' && mobileMenuOpen) setMobileMenuOpen(false);
|
|
6598
6618
|
}
|
|
6599
6619
|
function handleClick(event) {
|
|
6600
6620
|
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
@@ -6629,7 +6649,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6629
6649
|
const focusableEls = getFocusableElements(menu.current).selectors.visible;
|
|
6630
6650
|
const firstEl = focusableEls[0];
|
|
6631
6651
|
const lastEl = focusableEls[focusableEls.length - 1];
|
|
6632
|
-
if (event.key ===
|
|
6652
|
+
if (event.key === 'Tab') {
|
|
6633
6653
|
if (event.shiftKey && document.activeElement === firstEl) {
|
|
6634
6654
|
lastEl?.focus();
|
|
6635
6655
|
event.preventDefault();
|
|
@@ -6641,15 +6661,15 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6641
6661
|
}
|
|
6642
6662
|
};
|
|
6643
6663
|
(0, $hgUW1$useEffect)(()=>{
|
|
6644
|
-
document.addEventListener(
|
|
6645
|
-
document.addEventListener(
|
|
6664
|
+
document.addEventListener('keyup', handleMenuClose);
|
|
6665
|
+
document.addEventListener('mousedown', handleClick);
|
|
6646
6666
|
if (mobileMenuOpen) handleFocusIn();
|
|
6647
6667
|
else closeMobileMenu();
|
|
6648
|
-
if (menu.current) menu.current.addEventListener(
|
|
6668
|
+
if (menu.current) menu.current.addEventListener('keydown', (evt)=>trapFocus(evt));
|
|
6649
6669
|
return ()=>{
|
|
6650
|
-
document.removeEventListener(
|
|
6651
|
-
document.addEventListener(
|
|
6652
|
-
if (menu.current) menu.current.removeEventListener(
|
|
6670
|
+
document.removeEventListener('keyup', handleMenuClose);
|
|
6671
|
+
document.addEventListener('mousedown', handleClick);
|
|
6672
|
+
if (menu.current) menu.current.removeEventListener('keydown', trapFocus);
|
|
6653
6673
|
};
|
|
6654
6674
|
}, [
|
|
6655
6675
|
mobileMenuOpen
|
|
@@ -6664,7 +6684,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6664
6684
|
},
|
|
6665
6685
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
|
|
6666
6686
|
"aria-label": "Site header",
|
|
6667
|
-
className: `dkan-c-header dkan-c-header--${mobileMax ?
|
|
6687
|
+
className: `dkan-c-header dkan-c-header--${mobileMax ? 'mobile' : 'desktop'}`,
|
|
6668
6688
|
children: [
|
|
6669
6689
|
topNav && topNav,
|
|
6670
6690
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6703,7 +6723,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6703
6723
|
onClick: clickHandler ? clickHandler : undefined,
|
|
6704
6724
|
children: [
|
|
6705
6725
|
innerHtml,
|
|
6706
|
-
link?.target ===
|
|
6726
|
+
link?.target === '_blank' && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ExternalLinkIcon), {
|
|
6707
6727
|
className: "ds-u-margin-left--05 ds-c-external-link-icon"
|
|
6708
6728
|
})
|
|
6709
6729
|
]
|
|
@@ -6713,7 +6733,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6713
6733
|
var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
|
|
6714
6734
|
|
|
6715
6735
|
|
|
6716
|
-
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle =
|
|
6736
|
+
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", {
|
|
6717
6737
|
children: [
|
|
6718
6738
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6719
6739
|
children: "A federal government website managed and paid for by the U.S. Centers for Medicare & Medicaid Services."
|
|
@@ -6801,14 +6821,14 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6801
6821
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
6802
6822
|
className: "ds-u-font-size--sm",
|
|
6803
6823
|
children: footerAdditionalResourcesLinks.filter((link)=>{
|
|
6804
|
-
const noOnClick = Object.keys(link).findIndex((l)=>l ===
|
|
6824
|
+
const noOnClick = Object.keys(link).findIndex((l)=>l === 'onClick');
|
|
6805
6825
|
if (noOnClick === -1 || link.onClick && link.dataTag) return link;
|
|
6806
6826
|
}).map((link)=>{
|
|
6807
6827
|
if (link.onClick && link.dataTag) return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
6808
6828
|
className: "ds-u-margin-bottom--1",
|
|
6809
6829
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
6810
6830
|
href: link.url,
|
|
6811
|
-
[
|
|
6831
|
+
['data-' + link.dataTag.name]: link.dataTag.value,
|
|
6812
6832
|
onClick: link.onClick,
|
|
6813
6833
|
children: link.label
|
|
6814
6834
|
})
|
|
@@ -6908,7 +6928,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6908
6928
|
children: [
|
|
6909
6929
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6910
6930
|
id: "svg-inline--fa-title-iRCARP7h6Kp3",
|
|
6911
|
-
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title :
|
|
6931
|
+
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title : 'CMS Facebook'
|
|
6912
6932
|
}),
|
|
6913
6933
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6914
6934
|
transform: "translate(160 256)",
|
|
@@ -6961,7 +6981,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6961
6981
|
children: [
|
|
6962
6982
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6963
6983
|
id: "svg-inline--fa-title-4z03ITiPPTVF",
|
|
6964
|
-
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title :
|
|
6984
|
+
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title : 'CMS Twitter'
|
|
6965
6985
|
}),
|
|
6966
6986
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6967
6987
|
transform: "translate(256 256)",
|
|
@@ -7014,7 +7034,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7014
7034
|
children: [
|
|
7015
7035
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7016
7036
|
id: "svg-inline--fa-title-Nm2qsuSKvuRZ",
|
|
7017
|
-
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title :
|
|
7037
|
+
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title : 'CMS LinkedIn'
|
|
7018
7038
|
}),
|
|
7019
7039
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
7020
7040
|
transform: "translate(224 256)",
|
|
@@ -7066,7 +7086,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7066
7086
|
children: [
|
|
7067
7087
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7068
7088
|
id: "svg-inline--fa-title-youtube",
|
|
7069
|
-
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title :
|
|
7089
|
+
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title : 'CMS youtube'
|
|
7070
7090
|
}),
|
|
7071
7091
|
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
7072
7092
|
fill: "currentColor",
|
|
@@ -7101,7 +7121,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7101
7121
|
className: "ds-u-margin-right--2",
|
|
7102
7122
|
children: [
|
|
7103
7123
|
link.label,
|
|
7104
|
-
link?.target ===
|
|
7124
|
+
link?.target === '_blank' && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ExternalLinkIcon), {
|
|
7105
7125
|
className: "ds-u-margin-left--05 ds-c-external-link-icon"
|
|
7106
7126
|
})
|
|
7107
7127
|
]
|
|
@@ -7171,26 +7191,26 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7171
7191
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
7172
7192
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
7173
7193
|
stackable: true,
|
|
7174
|
-
className:
|
|
7194
|
+
className: 'ds-c-table',
|
|
7175
7195
|
children: [
|
|
7176
7196
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
|
|
7177
7197
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
7178
7198
|
children: [
|
|
7179
7199
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7180
|
-
id:
|
|
7181
|
-
headers:
|
|
7200
|
+
id: 'application',
|
|
7201
|
+
headers: 'Application',
|
|
7182
7202
|
children: "Application"
|
|
7183
|
-
},
|
|
7203
|
+
}, 'Application'),
|
|
7184
7204
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7185
|
-
id:
|
|
7186
|
-
headers:
|
|
7205
|
+
id: 'notes',
|
|
7206
|
+
headers: 'Notes',
|
|
7187
7207
|
children: "Notes"
|
|
7188
|
-
},
|
|
7208
|
+
}, 'Notes'),
|
|
7189
7209
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7190
|
-
id:
|
|
7191
|
-
headers:
|
|
7210
|
+
id: 'links',
|
|
7211
|
+
headers: 'Links',
|
|
7192
7212
|
children: "Links"
|
|
7193
|
-
},
|
|
7213
|
+
}, 'Links')
|
|
7194
7214
|
]
|
|
7195
7215
|
})
|
|
7196
7216
|
}),
|
|
@@ -7200,19 +7220,19 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7200
7220
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7201
7221
|
id: d.id,
|
|
7202
7222
|
stackedTitle: "Application",
|
|
7203
|
-
headers:
|
|
7223
|
+
headers: 'Application',
|
|
7204
7224
|
children: d.application
|
|
7205
7225
|
}, d.id),
|
|
7206
7226
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7207
7227
|
id: d.id,
|
|
7208
7228
|
stackedTitle: "Notes",
|
|
7209
|
-
headers:
|
|
7229
|
+
headers: 'Notes',
|
|
7210
7230
|
children: d.notes
|
|
7211
7231
|
}, `${d.id}-notes`),
|
|
7212
7232
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7213
7233
|
id: d.id,
|
|
7214
7234
|
stackedTitle: "Links",
|
|
7215
|
-
headers:
|
|
7235
|
+
headers: 'Links',
|
|
7216
7236
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
7217
7237
|
className: "dkan-newtab",
|
|
7218
7238
|
href: d.link,
|
|
@@ -7240,44 +7260,44 @@ var $5655284dbbb89508$export$2e2bcd8739ae039 = $5655284dbbb89508$var$Documentati
|
|
|
7240
7260
|
|
|
7241
7261
|
const $c7bf75f7e8a68780$export$7850f4d545d994c6 = [
|
|
7242
7262
|
{
|
|
7243
|
-
id:
|
|
7244
|
-
application:
|
|
7245
|
-
notes:
|
|
7246
|
-
link:
|
|
7247
|
-
linkText:
|
|
7248
|
-
screenReaderOnlyText:
|
|
7263
|
+
id: 'excel',
|
|
7264
|
+
application: 'Microsoft Excel',
|
|
7265
|
+
notes: 'Official size limitations for Microsoft Excel',
|
|
7266
|
+
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',
|
|
7267
|
+
linkText: 'Excel Specifications and Limits',
|
|
7268
|
+
screenReaderOnlyText: 'on microsoft.com'
|
|
7249
7269
|
},
|
|
7250
7270
|
{
|
|
7251
|
-
id:
|
|
7252
|
-
application:
|
|
7253
|
-
notes:
|
|
7254
|
-
link:
|
|
7255
|
-
linkText:
|
|
7256
|
-
screenReaderOnlyText:
|
|
7271
|
+
id: 'access',
|
|
7272
|
+
application: 'Microsoft Access',
|
|
7273
|
+
notes: 'Official size limitations for Microsoft Access',
|
|
7274
|
+
link: 'https://support.microsoft.com/en-us/office/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c?ui=en-us&rs=en-us&ad=us',
|
|
7275
|
+
linkText: 'Access 2016 Specifications',
|
|
7276
|
+
screenReaderOnlyText: 'on microsoft.com'
|
|
7257
7277
|
},
|
|
7258
7278
|
{
|
|
7259
|
-
id:
|
|
7260
|
-
application:
|
|
7261
|
-
notes:
|
|
7262
|
-
link:
|
|
7263
|
-
linkText:
|
|
7264
|
-
screenReaderOnlyText:
|
|
7279
|
+
id: 'oracle-sql-developer',
|
|
7280
|
+
application: 'Oracle SQL Developer',
|
|
7281
|
+
notes: 'Oracle SQL Developer tool',
|
|
7282
|
+
link: 'https://www.oracle.com/database/sqldeveloper/',
|
|
7283
|
+
linkText: 'Oracle SQL Developer Overview',
|
|
7284
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
7265
7285
|
},
|
|
7266
7286
|
{
|
|
7267
|
-
id:
|
|
7268
|
-
application:
|
|
7269
|
-
notes:
|
|
7270
|
-
link:
|
|
7271
|
-
linkText:
|
|
7272
|
-
screenReaderOnlyText:
|
|
7287
|
+
id: 'oracle-database',
|
|
7288
|
+
application: 'Oracle Database',
|
|
7289
|
+
notes: 'Oracle Database official size limitations',
|
|
7290
|
+
link: 'https://docs.oracle.com/cd/B28359_01/server.111/b28320/limits002.htm#i287915',
|
|
7291
|
+
linkText: 'Oracle Physical Database Limits',
|
|
7292
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
7273
7293
|
},
|
|
7274
7294
|
{
|
|
7275
|
-
id:
|
|
7276
|
-
application:
|
|
7277
|
-
notes:
|
|
7278
|
-
link:
|
|
7279
|
-
linkText:
|
|
7280
|
-
screenReaderOnlyText:
|
|
7295
|
+
id: 'oracle-sql-client-tools',
|
|
7296
|
+
application: 'Oracle SQL Client Tools',
|
|
7297
|
+
notes: 'Oracle SQL Client Tools',
|
|
7298
|
+
link: 'https://www.oracle.com/database/technologies/oracle-database-software-downloads.html',
|
|
7299
|
+
linkText: 'Oracle SQL Client',
|
|
7300
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
7281
7301
|
}
|
|
7282
7302
|
];
|
|
7283
7303
|
|
|
@@ -7305,7 +7325,7 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7305
7325
|
}),
|
|
7306
7326
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
7307
7327
|
heading: "Notice",
|
|
7308
|
-
className:
|
|
7328
|
+
className: 'ds-u-margin-top--6',
|
|
7309
7329
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
7310
7330
|
className: "ds-c-alert__text",
|
|
7311
7331
|
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."
|
|
@@ -7314,16 +7334,16 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7314
7334
|
]
|
|
7315
7335
|
}),
|
|
7316
7336
|
/*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7317
|
-
className:
|
|
7337
|
+
className: 'ds-u-margin-top--4 ds-l-row',
|
|
7318
7338
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7319
|
-
className:
|
|
7339
|
+
className: 'ds-l-col--12',
|
|
7320
7340
|
children: [
|
|
7321
7341
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
7322
7342
|
className: "ds-text-heading--2xl ds-text-heading--2xl",
|
|
7323
7343
|
children: "Documentation by Application"
|
|
7324
7344
|
}),
|
|
7325
7345
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7326
|
-
className:
|
|
7346
|
+
className: 'ds-u-margin-top--4',
|
|
7327
7347
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5655284dbbb89508$export$2e2bcd8739ae039), {
|
|
7328
7348
|
data: documentationList
|
|
7329
7349
|
})
|
|
@@ -7351,7 +7371,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7351
7371
|
const options = {
|
|
7352
7372
|
conditions: query ? JSON.parse(query).map(({ column: column, operator: operator, ...rest })=>({
|
|
7353
7373
|
property: column,
|
|
7354
|
-
operator: operator ===
|
|
7374
|
+
operator: operator === 'is' ? '=' : operator === 'is not' ? '<>' : operator === 'or' ? 'in' : operator,
|
|
7355
7375
|
...rest
|
|
7356
7376
|
})) : []
|
|
7357
7377
|
};
|
|
@@ -7359,13 +7379,13 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7359
7379
|
let distribution = {};
|
|
7360
7380
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
7361
7381
|
if (distributions.length) distribution = distributions[distributionIndex];
|
|
7362
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7382
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
7363
7383
|
...options,
|
|
7364
7384
|
limit: defaultPageSize
|
|
7365
7385
|
});
|
|
7366
7386
|
(0, $hgUW1$useEffect)(()=>{
|
|
7367
7387
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
7368
|
-
if (localFileFormat ===
|
|
7388
|
+
if (localFileFormat === 'csv') resource.setResource(distribution.identifier);
|
|
7369
7389
|
}, [
|
|
7370
7390
|
distribution
|
|
7371
7391
|
]);
|
|
@@ -7415,7 +7435,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7415
7435
|
|
|
7416
7436
|
|
|
7417
7437
|
function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
|
|
7418
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7438
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
7419
7439
|
const newDate = new Date(condition.value);
|
|
7420
7440
|
if (newDate instanceof Date && !isNaN(newDate)) return newDate;
|
|
7421
7441
|
}
|
|
@@ -7432,9 +7452,9 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7432
7452
|
const [startDate, setStartDate] = (0, $hgUW1$react).useState($374c4669b044ddf8$var$getStartDate(condition, schema, id));
|
|
7433
7453
|
(0, $hgUW1$useEffect)(()=>{
|
|
7434
7454
|
if (property !== condition.property) {
|
|
7435
|
-
if (property) update(index,
|
|
7436
|
-
else update(index,
|
|
7437
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7455
|
+
if (property) update(index, 'property', property);
|
|
7456
|
+
else update(index, 'property', '');
|
|
7457
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
7438
7458
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
7439
7459
|
}
|
|
7440
7460
|
}
|
|
@@ -7448,16 +7468,16 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7448
7468
|
]);
|
|
7449
7469
|
(0, $hgUW1$useEffect)(()=>{
|
|
7450
7470
|
if (operator !== condition.operator) {
|
|
7451
|
-
if (operator) update(index,
|
|
7452
|
-
else update(index,
|
|
7471
|
+
if (operator) update(index, 'operator', operator);
|
|
7472
|
+
else update(index, 'operator', '');
|
|
7453
7473
|
}
|
|
7454
7474
|
}, [
|
|
7455
7475
|
operator
|
|
7456
7476
|
]);
|
|
7457
7477
|
(0, $hgUW1$useEffect)(()=>{
|
|
7458
7478
|
if (value !== condition.value) {
|
|
7459
|
-
if (value) update(index,
|
|
7460
|
-
else update(index,
|
|
7479
|
+
if (value) update(index, 'value', value);
|
|
7480
|
+
else update(index, 'value', '');
|
|
7461
7481
|
}
|
|
7462
7482
|
}, [
|
|
7463
7483
|
value
|
|
@@ -7481,7 +7501,7 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7481
7501
|
onChange: (e)=>setOperator(e.target.value),
|
|
7482
7502
|
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"
|
|
7483
7503
|
}),
|
|
7484
|
-
schema[id].fields[property].mysql_type ===
|
|
7504
|
+
schema[id].fields[property].mysql_type === 'date' ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7485
7505
|
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",
|
|
7486
7506
|
children: [
|
|
7487
7507
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
@@ -7571,12 +7591,12 @@ const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions, schema: sche
|
|
|
7571
7591
|
className: "ds-u-font-weight--bold",
|
|
7572
7592
|
children: description
|
|
7573
7593
|
}),
|
|
7574
|
-
|
|
7594
|
+
' ',
|
|
7575
7595
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7576
7596
|
className: "ds-u-font-weight--normal",
|
|
7577
7597
|
children: operator.label.toUpperCase()
|
|
7578
7598
|
}),
|
|
7579
|
-
|
|
7599
|
+
' ',
|
|
7580
7600
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7581
7601
|
className: "ds-u-color--success",
|
|
7582
7602
|
children: formattedText
|
|
@@ -7603,19 +7623,19 @@ var $bef7bff2823feea2$export$2e2bcd8739ae039 = $bef7bff2823feea2$var$QueryTitle;
|
|
|
7603
7623
|
function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
|
|
7604
7624
|
let cond = condition;
|
|
7605
7625
|
delete cond.key;
|
|
7606
|
-
if (cond.operator ===
|
|
7626
|
+
if (cond.operator === '=' || cond.operator === '<>') {
|
|
7607
7627
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7608
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7628
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
7609
7629
|
}
|
|
7610
|
-
if (cond.operator.toLowerCase() ===
|
|
7630
|
+
if (cond.operator.toLowerCase() === 'like') {
|
|
7611
7631
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7612
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7632
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
7613
7633
|
cond.value = `%${cleanedValue}%`;
|
|
7614
7634
|
}
|
|
7615
|
-
if (cond.operator.toLowerCase() ===
|
|
7616
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
7635
|
+
if (cond.operator.toLowerCase() === 'in') {
|
|
7636
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(',');
|
|
7617
7637
|
}
|
|
7618
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
7638
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ''));
|
|
7619
7639
|
return cond;
|
|
7620
7640
|
}
|
|
7621
7641
|
const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, setOffset: setOffset })=>{
|
|
@@ -7635,7 +7655,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7635
7655
|
...queryConditions,
|
|
7636
7656
|
{
|
|
7637
7657
|
property: fields[0],
|
|
7638
|
-
value:
|
|
7658
|
+
value: '',
|
|
7639
7659
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
7640
7660
|
key: Date.now()
|
|
7641
7661
|
}
|
|
@@ -7675,7 +7695,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7675
7695
|
encodeValuesOnly: true,
|
|
7676
7696
|
addQueryPrefix: true
|
|
7677
7697
|
});
|
|
7678
|
-
window.history.pushState({},
|
|
7698
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
7679
7699
|
};
|
|
7680
7700
|
const updateCondition = (index, key, value)=>{
|
|
7681
7701
|
let newConditions = [
|
|
@@ -7748,7 +7768,7 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
|
|
|
7748
7768
|
|
|
7749
7769
|
|
|
7750
7770
|
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 })=>{
|
|
7751
|
-
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState(
|
|
7771
|
+
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState('ds-u-padding-y--1');
|
|
7752
7772
|
let apiDocs = (0, $hgUW1$useRef)();
|
|
7753
7773
|
let distribution = {};
|
|
7754
7774
|
let distribution_array = dataset.distribution ? dataset.distribution : [];
|
|
@@ -7760,7 +7780,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7760
7780
|
} : {
|
|
7761
7781
|
conditions: []
|
|
7762
7782
|
};
|
|
7763
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7783
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
7764
7784
|
...options,
|
|
7765
7785
|
limit: 25
|
|
7766
7786
|
});
|
|
@@ -7774,7 +7794,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7774
7794
|
}, {
|
|
7775
7795
|
encode: true
|
|
7776
7796
|
})}&format=csv`;
|
|
7777
|
-
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !==
|
|
7797
|
+
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !== 'csv' ? distribution.data.title : dataset.title;
|
|
7778
7798
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
7779
7799
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7780
7800
|
className: "ds-l-container ds-u-padding-bottom--3 ds-u-margin-bottom--2",
|
|
@@ -7783,7 +7803,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7783
7803
|
children: Object.keys(distribution).length && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
7784
7804
|
children: [
|
|
7785
7805
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7786
|
-
className:
|
|
7806
|
+
className: 'ds-l-md-col--9',
|
|
7787
7807
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
7788
7808
|
to: `/dataset/${id}`,
|
|
7789
7809
|
className: "ds-u-padding-y--4 ds-u-display--block",
|
|
@@ -7794,14 +7814,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7794
7814
|
})
|
|
7795
7815
|
}),
|
|
7796
7816
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7797
|
-
className:
|
|
7817
|
+
className: 'ds-l-md-col--9',
|
|
7798
7818
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
7799
7819
|
className: "ds-text-heading--3xl",
|
|
7800
7820
|
children: customTitle ? customTitle : pageTitle
|
|
7801
7821
|
})
|
|
7802
7822
|
}),
|
|
7803
7823
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7804
|
-
className:
|
|
7824
|
+
className: 'ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right',
|
|
7805
7825
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
7806
7826
|
className: "ds-u-margin--0",
|
|
7807
7827
|
children: [
|
|
@@ -7813,7 +7833,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7813
7833
|
})
|
|
7814
7834
|
}),
|
|
7815
7835
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7816
|
-
className:
|
|
7836
|
+
className: 'ds-l-md-col--9',
|
|
7817
7837
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
7818
7838
|
distribution: distribution,
|
|
7819
7839
|
dataset: dataset,
|
|
@@ -7823,13 +7843,13 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7823
7843
|
})
|
|
7824
7844
|
}),
|
|
7825
7845
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7826
|
-
className:
|
|
7846
|
+
className: 'ds-l-md-col--12',
|
|
7827
7847
|
children: Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
|
|
7828
7848
|
resource: resource,
|
|
7829
7849
|
id: distribution.identifier,
|
|
7830
7850
|
customColumns: customColumns,
|
|
7831
7851
|
setOffset: resource.setOffset
|
|
7832
|
-
}) :
|
|
7852
|
+
}) : ''
|
|
7833
7853
|
}),
|
|
7834
7854
|
Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
7835
7855
|
value: {
|
|
@@ -7840,7 +7860,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7840
7860
|
customColumns: (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution_array[distIndex].identifier])
|
|
7841
7861
|
},
|
|
7842
7862
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7843
|
-
className:
|
|
7863
|
+
className: 'ds-l-md-col--12',
|
|
7844
7864
|
children: [
|
|
7845
7865
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $af099c546cb226c7$export$2e2bcd8739ae039), {
|
|
7846
7866
|
includeDensity: true,
|
|
@@ -7862,14 +7882,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7862
7882
|
]
|
|
7863
7883
|
})
|
|
7864
7884
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7865
|
-
className:
|
|
7885
|
+
className: 'ds-l-md-col--12',
|
|
7866
7886
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
7867
7887
|
role: "status",
|
|
7868
7888
|
"aria-valuetext": "Resource loading"
|
|
7869
7889
|
})
|
|
7870
7890
|
}),
|
|
7871
7891
|
dataset.identifier && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7872
|
-
className:
|
|
7892
|
+
className: 'ds-l-md-col--12',
|
|
7873
7893
|
ref: apiDocs,
|
|
7874
7894
|
children: [
|
|
7875
7895
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
@@ -7878,7 +7898,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7878
7898
|
}),
|
|
7879
7899
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
7880
7900
|
url: `${rootUrl}/metastore/schemas/dataset/items/${dataset.identifier}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`,
|
|
7881
|
-
docExpansion:
|
|
7901
|
+
docExpansion: 'list',
|
|
7882
7902
|
defaultModelsExpandDepth: -1
|
|
7883
7903
|
})
|
|
7884
7904
|
]
|
|
@@ -7897,7 +7917,7 @@ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, loca
|
|
|
7897
7917
|
const [ready, setReady] = (0, $hgUW1$useState)(false);
|
|
7898
7918
|
const [error, setError] = (0, $hgUW1$useState)(false);
|
|
7899
7919
|
const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
7900
|
-
const distIndex = dist_id ===
|
|
7920
|
+
const distIndex = dist_id === 'data' ? 0 : dist_id;
|
|
7901
7921
|
(0, $hgUW1$useEffect)(()=>{
|
|
7902
7922
|
if (dataset.error) setError(true);
|
|
7903
7923
|
if (dataset.distribution && dataset.distribution.length) {
|