@civicactions/cmsds-open-data-components 4.0.13 → 4.0.14-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 +2 -8
- package/dist/main.css.map +1 -1
- package/dist/main.js +569 -571
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +70 -71
- 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
|
}
|
|
@@ -513,11 +513,11 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
513
513
|
function handleFocusOut(event) {
|
|
514
514
|
if (currentMenu && !currentMenu.contains(event.relatedTarget)) setIsExpanded(false);
|
|
515
515
|
}
|
|
516
|
-
document.addEventListener(
|
|
517
|
-
currentMenu?.addEventListener(
|
|
516
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
517
|
+
currentMenu?.addEventListener("focusout", handleFocusOut);
|
|
518
518
|
return ()=>{
|
|
519
|
-
document.removeEventListener(
|
|
520
|
-
if (currentMenu) currentMenu.removeEventListener(
|
|
519
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
520
|
+
if (currentMenu) currentMenu.removeEventListener("focusout", handleFocusOut);
|
|
521
521
|
};
|
|
522
522
|
}, [
|
|
523
523
|
isExpanded
|
|
@@ -539,7 +539,7 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
541
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
542
|
-
className: `dkan-c-nav-submenu has-submenu${isExpanded ?
|
|
542
|
+
className: `dkan-c-nav-submenu has-submenu${isExpanded ? " open" : ""}`,
|
|
543
543
|
ref: menu,
|
|
544
544
|
children: [
|
|
545
545
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
@@ -589,7 +589,7 @@ var $4f153ca537d853e5$export$2e2bcd8739ae039 = $4f153ca537d853e5$var$SubMenu;
|
|
|
589
589
|
|
|
590
590
|
const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
591
591
|
switch(props.id){
|
|
592
|
-
case
|
|
592
|
+
case "overview":
|
|
593
593
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
594
594
|
width: "16px",
|
|
595
595
|
height: "16px",
|
|
@@ -632,7 +632,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
632
632
|
})
|
|
633
633
|
]
|
|
634
634
|
});
|
|
635
|
-
case
|
|
635
|
+
case "data-table":
|
|
636
636
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
637
637
|
width: "16px",
|
|
638
638
|
height: "12px",
|
|
@@ -665,7 +665,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
665
665
|
})
|
|
666
666
|
]
|
|
667
667
|
});
|
|
668
|
-
case
|
|
668
|
+
case "api":
|
|
669
669
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
670
670
|
width: "16px",
|
|
671
671
|
height: "13px",
|
|
@@ -698,7 +698,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
698
698
|
})
|
|
699
699
|
]
|
|
700
700
|
});
|
|
701
|
-
case
|
|
701
|
+
case "download":
|
|
702
702
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
703
703
|
width: "16px",
|
|
704
704
|
height: "16px",
|
|
@@ -728,7 +728,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
728
728
|
})
|
|
729
729
|
]
|
|
730
730
|
});
|
|
731
|
-
case
|
|
731
|
+
case "data-dictionary":
|
|
732
732
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
733
733
|
width: "14px",
|
|
734
734
|
height: "16px",
|
|
@@ -829,14 +829,14 @@ var $b61856b23f5f58a2$export$2e2bcd8739ae039 = $b61856b23f5f58a2$var$LargeFileDi
|
|
|
829
829
|
|
|
830
830
|
|
|
831
831
|
const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date, options: options = {
|
|
832
|
-
year:
|
|
833
|
-
month:
|
|
834
|
-
day:
|
|
835
|
-
timeZone:
|
|
832
|
+
year: "numeric",
|
|
833
|
+
month: "long",
|
|
834
|
+
day: "numeric",
|
|
835
|
+
timeZone: "UTC"
|
|
836
836
|
} })=>{
|
|
837
837
|
const rawDate = new Date(date);
|
|
838
|
-
let modifiedDate =
|
|
839
|
-
if (rawDate) modifiedDate = rawDate.toLocaleDateString(
|
|
838
|
+
let modifiedDate = "";
|
|
839
|
+
if (rawDate) modifiedDate = rawDate.toLocaleDateString("en-US", options);
|
|
840
840
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
841
841
|
children: modifiedDate
|
|
842
842
|
});
|
|
@@ -848,13 +848,13 @@ var $bd76a91923d7e8a7$export$2e2bcd8739ae039 = $bd76a91923d7e8a7$var$Transformed
|
|
|
848
848
|
|
|
849
849
|
|
|
850
850
|
function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240) {
|
|
851
|
-
if (!textString) return
|
|
851
|
+
if (!textString) return "";
|
|
852
852
|
let cleanedText = textString;
|
|
853
|
-
if (cleanedText.split(
|
|
854
|
-
if (cleanedText.split(
|
|
853
|
+
if (cleanedText.split("</p>").length > 1) cleanedText = cleanedText.split("</p>")[0];
|
|
854
|
+
if (cleanedText.split("<br/>").length > 1) cleanedText = cleanedText.split("<br/>")[0];
|
|
855
855
|
cleanedText = (0, $hgUW1$lodashtruncate)(cleanedText, {
|
|
856
|
-
|
|
857
|
-
|
|
856
|
+
"length": textLength,
|
|
857
|
+
"separator": " "
|
|
858
858
|
});
|
|
859
859
|
return (0, $hgUW1$dompurify).sanitize(cleanedText, {
|
|
860
860
|
ALLOWED_TAGS: []
|
|
@@ -872,9 +872,9 @@ function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240)
|
|
|
872
872
|
const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
873
873
|
const { type: type, date: date, boldLabel: boldLabel = false, displayTooltips: displayTooltips = true } = props;
|
|
874
874
|
const dateText = {
|
|
875
|
-
modified:
|
|
876
|
-
released:
|
|
877
|
-
refresh:
|
|
875
|
+
modified: "Last Modified",
|
|
876
|
+
released: "Released",
|
|
877
|
+
refresh: "Planned Update"
|
|
878
878
|
};
|
|
879
879
|
const tooltipContent = {
|
|
880
880
|
modified: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -911,7 +911,7 @@ const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
|
911
911
|
})
|
|
912
912
|
};
|
|
913
913
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
914
|
-
className: `dataset-date-item${boldLabel ?
|
|
914
|
+
className: `dataset-date-item${boldLabel ? " bold-label" : ""}`,
|
|
915
915
|
children: [
|
|
916
916
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
917
917
|
className: "dataset-data-item-label",
|
|
@@ -981,7 +981,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
981
981
|
if (dist && dist.data) {
|
|
982
982
|
if (dist.data.format) return dist.data.format.toLowerCase();
|
|
983
983
|
if (dist.data.mediaType) {
|
|
984
|
-
const mediaType = dist.data.mediaType.split(
|
|
984
|
+
const mediaType = dist.data.mediaType.split("/");
|
|
985
985
|
if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
|
|
986
986
|
}
|
|
987
987
|
if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
|
|
@@ -991,7 +991,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
991
991
|
}
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
|
-
return
|
|
994
|
+
return "";
|
|
995
995
|
}
|
|
996
996
|
|
|
997
997
|
|
|
@@ -1001,20 +1001,20 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1001
1001
|
});
|
|
1002
1002
|
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;
|
|
1003
1003
|
const location = (0, $hgUW1$useLocation)();
|
|
1004
|
-
let linkContainerClasses =
|
|
1005
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1006
|
-
else linkContainerClasses +=
|
|
1007
|
-
let linkClasses =
|
|
1004
|
+
let linkContainerClasses = "ds-u-margin-bottom--2";
|
|
1005
|
+
if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
|
|
1006
|
+
else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
|
|
1007
|
+
let linkClasses = "ds-u-display--block ds-u-text-align--left";
|
|
1008
1008
|
if (desktop) {
|
|
1009
|
-
linkContainerClasses =
|
|
1010
|
-
linkClasses +=
|
|
1009
|
+
linkContainerClasses = "ds-u-padding-x--0";
|
|
1010
|
+
linkClasses += " ds-l-col--4 ds-l-md-col--auto";
|
|
1011
1011
|
}
|
|
1012
1012
|
let themes;
|
|
1013
1013
|
if (theme && showTopics) themes = /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
1014
1014
|
className: "theme-list item-theme",
|
|
1015
1015
|
children: theme.map((topic, index)=>{
|
|
1016
|
-
const title = topic ||
|
|
1017
|
-
const prefix =
|
|
1016
|
+
const title = topic || "Unknown Topic";
|
|
1017
|
+
const prefix = "topics";
|
|
1018
1018
|
// Use the provided slug or fallback to a simple slug generation
|
|
1019
1019
|
const slug = topicSlugs?.[title];
|
|
1020
1020
|
const link = `/${prefix}/${slug}`;
|
|
@@ -1025,7 +1025,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1025
1025
|
state: {
|
|
1026
1026
|
fromUrl: location.pathname,
|
|
1027
1027
|
fromTitle: false,
|
|
1028
|
-
fromSearchList: location.pathname.includes(
|
|
1028
|
+
fromSearchList: location.pathname.includes("search")
|
|
1029
1029
|
},
|
|
1030
1030
|
children: title
|
|
1031
1031
|
})
|
|
@@ -1056,7 +1056,6 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1056
1056
|
5
|
|
1057
1057
|
],
|
|
1058
1058
|
title: "There is no Data Table associated with this dataset. Data Tables will only display for CSV files.",
|
|
1059
|
-
"aria-disabled": "true",
|
|
1060
1059
|
children: [
|
|
1061
1060
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1062
1061
|
id: "data-table"
|
|
@@ -1067,7 +1066,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1067
1066
|
};
|
|
1068
1067
|
const dataDictionaryExists = ()=>{
|
|
1069
1068
|
if (distribution && "data" in distribution) {
|
|
1070
|
-
if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType ===
|
|
1069
|
+
if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType === "application/vnd.tableschema+json";
|
|
1071
1070
|
}
|
|
1072
1071
|
return false;
|
|
1073
1072
|
};
|
|
@@ -1089,7 +1088,6 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1089
1088
|
5
|
|
1090
1089
|
],
|
|
1091
1090
|
title: "There is no Data Dictionary associated with this dataset.",
|
|
1092
|
-
"aria-disabled": "true",
|
|
1093
1091
|
children: [
|
|
1094
1092
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1095
1093
|
id: "data-dictionary"
|
|
@@ -1101,7 +1099,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1101
1099
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1102
1100
|
className: "dc-c-search-list-item ds-u-padding-top--3",
|
|
1103
1101
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1104
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1102
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
|
|
1105
1103
|
children: [
|
|
1106
1104
|
themes,
|
|
1107
1105
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
@@ -1109,7 +1107,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1109
1107
|
children: [
|
|
1110
1108
|
!showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1111
1109
|
id: `dataset-${identifier}-updated-date`,
|
|
1112
|
-
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ?
|
|
1110
|
+
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? "ds-u-padding-top--2" : "ds-u-padding-top--0"}`,
|
|
1113
1111
|
children: [
|
|
1114
1112
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1115
1113
|
children: "Updated:"
|
|
@@ -1138,13 +1136,13 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1138
1136
|
(0, $1a2bf34e2a8f6b80$export$59a943b34a82e690)(description),
|
|
1139
1137
|
description.length > 240 ? /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1140
1138
|
children: [
|
|
1141
|
-
|
|
1139
|
+
" ",
|
|
1142
1140
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1143
1141
|
to: `/dataset/${identifier}`,
|
|
1144
1142
|
children: "See more"
|
|
1145
1143
|
})
|
|
1146
1144
|
]
|
|
1147
|
-
}) :
|
|
1145
|
+
}) : ""
|
|
1148
1146
|
]
|
|
1149
1147
|
})
|
|
1150
1148
|
}),
|
|
@@ -1172,14 +1170,14 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1172
1170
|
"Download"
|
|
1173
1171
|
]
|
|
1174
1172
|
})
|
|
1175
|
-
}) :
|
|
1173
|
+
}) : "",
|
|
1176
1174
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("ul", {
|
|
1177
|
-
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 ?
|
|
1175
|
+
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" : ""}`,
|
|
1178
1176
|
children: [
|
|
1179
1177
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1180
1178
|
className: linkContainerClasses,
|
|
1181
1179
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1182
|
-
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ?
|
|
1180
|
+
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? "" : " dkan-disabled-link-wrapper"}`,
|
|
1183
1181
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataTableLink, {})
|
|
1184
1182
|
})
|
|
1185
1183
|
}),
|
|
@@ -1201,10 +1199,10 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1201
1199
|
dataDictionaryLinks ? /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1202
1200
|
className: linkContainerClasses,
|
|
1203
1201
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1204
|
-
className: `${linkClasses}${dataDictionaryExists() ?
|
|
1202
|
+
className: `${linkClasses}${dataDictionaryExists() ? "" : " dkan-disabled-link-wrapper"}`,
|
|
1205
1203
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataDictionaryLink, {})
|
|
1206
1204
|
})
|
|
1207
|
-
}) :
|
|
1205
|
+
}) : "",
|
|
1208
1206
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1209
1207
|
className: linkContainerClasses,
|
|
1210
1208
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -1304,7 +1302,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
1304
1302
|
size: "big",
|
|
1305
1303
|
type: "submit",
|
|
1306
1304
|
style: {
|
|
1307
|
-
width:
|
|
1305
|
+
width: "70px"
|
|
1308
1306
|
},
|
|
1309
1307
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1310
1308
|
className: "fas fa-search small-text"
|
|
@@ -1321,7 +1319,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
1321
1319
|
className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
|
|
1322
1320
|
children: [
|
|
1323
1321
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1324
|
-
children: text ? text :
|
|
1322
|
+
children: text ? text : "Search"
|
|
1325
1323
|
}),
|
|
1326
1324
|
` `,
|
|
1327
1325
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -1406,12 +1404,12 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
1406
1404
|
fulltext: fulltext ? fulltext : undefined,
|
|
1407
1405
|
...selectedFacets,
|
|
1408
1406
|
sort: sort ? sort : undefined,
|
|
1409
|
-
[
|
|
1407
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
1410
1408
|
page: page !== 1 ? page : undefined,
|
|
1411
|
-
[
|
|
1409
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
1412
1410
|
};
|
|
1413
1411
|
return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
1414
|
-
arrayFormat:
|
|
1412
|
+
arrayFormat: "comma",
|
|
1415
1413
|
encode: false
|
|
1416
1414
|
})}`);
|
|
1417
1415
|
}
|
|
@@ -1427,26 +1425,26 @@ const $e873081a6e8f024e$export$1040147c129fdde9 = (query)=>{
|
|
|
1427
1425
|
};
|
|
1428
1426
|
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
1429
1427
|
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
1430
|
-
defaultSort:
|
|
1431
|
-
defaultOrder:
|
|
1432
|
-
}, pageTitle: pageTitle =
|
|
1428
|
+
defaultSort: "modified",
|
|
1429
|
+
defaultOrder: "desc"
|
|
1430
|
+
}, pageTitle: pageTitle = "Dataset Explorer", filterTitle: filterTitle = "Tags", showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = "", showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
1433
1431
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
1434
1432
|
const sortOptions = [
|
|
1435
1433
|
{
|
|
1436
|
-
label:
|
|
1437
|
-
value:
|
|
1434
|
+
label: "Newest",
|
|
1435
|
+
value: "newest"
|
|
1438
1436
|
},
|
|
1439
1437
|
{
|
|
1440
|
-
label:
|
|
1441
|
-
value:
|
|
1438
|
+
label: "Oldest",
|
|
1439
|
+
value: "oldest"
|
|
1442
1440
|
},
|
|
1443
1441
|
{
|
|
1444
|
-
label:
|
|
1445
|
-
value:
|
|
1442
|
+
label: "Title A-Z",
|
|
1443
|
+
value: "titleAZ"
|
|
1446
1444
|
},
|
|
1447
1445
|
{
|
|
1448
|
-
label:
|
|
1449
|
-
value:
|
|
1446
|
+
label: "Title Z-A",
|
|
1447
|
+
value: "titleZA"
|
|
1450
1448
|
}
|
|
1451
1449
|
];
|
|
1452
1450
|
const defaultSortBy = "";
|
|
@@ -1465,7 +1463,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1465
1463
|
endingNumber: 0
|
|
1466
1464
|
});
|
|
1467
1465
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
1468
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
1466
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
|
|
1469
1467
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
1470
1468
|
const [fulltext, setFullText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
1471
1469
|
const [filterText, setFilterText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
@@ -1474,7 +1472,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1474
1472
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
1475
1473
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
1476
1474
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
1477
|
-
return sort ===
|
|
1475
|
+
return sort === "modified" ? sortOrder === "desc" ? "newest" : "oldest" : sortOrder === "desc" ? "titleZA" : "titleAZ";
|
|
1478
1476
|
});
|
|
1479
1477
|
const [selectedFacets, setSelectedFacets] = (0, $hgUW1$useState)(transformedParams.selectedFacets ? transformedParams.selectedFacets : {
|
|
1480
1478
|
theme: [],
|
|
@@ -1484,21 +1482,21 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1484
1482
|
const setSortOptions = (value)=>{
|
|
1485
1483
|
setSortDisplay(value);
|
|
1486
1484
|
switch(value){
|
|
1487
|
-
case
|
|
1488
|
-
setSort(
|
|
1489
|
-
setSortOrder(
|
|
1485
|
+
case "newest":
|
|
1486
|
+
setSort("modified");
|
|
1487
|
+
setSortOrder("desc");
|
|
1490
1488
|
break;
|
|
1491
|
-
case
|
|
1492
|
-
setSort(
|
|
1493
|
-
setSortOrder(
|
|
1489
|
+
case "oldest":
|
|
1490
|
+
setSort("modified");
|
|
1491
|
+
setSortOrder("asc");
|
|
1494
1492
|
break;
|
|
1495
|
-
case
|
|
1496
|
-
setSort(
|
|
1497
|
-
setSortOrder(
|
|
1493
|
+
case "titleAZ":
|
|
1494
|
+
setSort("title");
|
|
1495
|
+
setSortOrder("asc");
|
|
1498
1496
|
break;
|
|
1499
|
-
case
|
|
1500
|
-
setSort(
|
|
1501
|
-
setSortOrder(
|
|
1497
|
+
case "titleZA":
|
|
1498
|
+
setSort("title");
|
|
1499
|
+
setSortOrder("desc");
|
|
1502
1500
|
break;
|
|
1503
1501
|
}
|
|
1504
1502
|
};
|
|
@@ -1506,12 +1504,12 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1506
1504
|
const newFacets = {
|
|
1507
1505
|
...selectedFacets
|
|
1508
1506
|
};
|
|
1509
|
-
if (key ===
|
|
1507
|
+
if (key === "theme") {
|
|
1510
1508
|
const existingFacet = newFacets.theme.findIndex((s)=>s === value);
|
|
1511
1509
|
if (existingFacet > -1) newFacets.theme.splice(existingFacet, 1);
|
|
1512
1510
|
else newFacets.theme.push(value);
|
|
1513
1511
|
}
|
|
1514
|
-
if (key ===
|
|
1512
|
+
if (key === "keyword") {
|
|
1515
1513
|
const existingFacet = newFacets.keyword.findIndex((s)=>s === value);
|
|
1516
1514
|
if (existingFacet > -1) newFacets.keyword.splice(existingFacet, 1);
|
|
1517
1515
|
else newFacets.keyword.push(value);
|
|
@@ -1525,7 +1523,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1525
1523
|
});
|
|
1526
1524
|
setSelectedFacets(newFacets);
|
|
1527
1525
|
const url = new URL(window.location.href);
|
|
1528
|
-
window.history.pushState({},
|
|
1526
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
1529
1527
|
}
|
|
1530
1528
|
const pageSize = defaultPageSize;
|
|
1531
1529
|
function resetFilters() {
|
|
@@ -1534,14 +1532,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1534
1532
|
setSelectedFacets(defaultSelectedFacets);
|
|
1535
1533
|
setPage(defaultPage);
|
|
1536
1534
|
const url = new URL(window.location.href);
|
|
1537
|
-
window.history.pushState({},
|
|
1535
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}`);
|
|
1538
1536
|
}
|
|
1539
1537
|
function buildSearchParams(includePage) {
|
|
1540
1538
|
let newParams = {};
|
|
1541
1539
|
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
1542
1540
|
if (sort !== defaultSort.defaultSort) newParams.sort = sort;
|
|
1543
1541
|
if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
|
|
1544
|
-
if (fulltext !==
|
|
1542
|
+
if (fulltext !== "") newParams.fulltext = fulltext;
|
|
1545
1543
|
if (Object.keys(selectedFacets).length) Object.keys(selectedFacets).forEach((key)=>{
|
|
1546
1544
|
newParams[key] = selectedFacets[key];
|
|
1547
1545
|
});
|
|
@@ -1554,9 +1552,9 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1554
1552
|
fulltext: fulltext ? fulltext : undefined,
|
|
1555
1553
|
...selectedFacets,
|
|
1556
1554
|
sort: sort ? sort : undefined,
|
|
1557
|
-
[
|
|
1555
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
1558
1556
|
page: page !== 1 ? page : undefined,
|
|
1559
|
-
[
|
|
1557
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
1560
1558
|
};
|
|
1561
1559
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
1562
1560
|
queryKey: [
|
|
@@ -1565,7 +1563,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1565
1563
|
],
|
|
1566
1564
|
queryFn: ()=>{
|
|
1567
1565
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
1568
|
-
arrayFormat:
|
|
1566
|
+
arrayFormat: "comma",
|
|
1569
1567
|
encode: false
|
|
1570
1568
|
})}`);
|
|
1571
1569
|
}
|
|
@@ -1616,8 +1614,8 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1616
1614
|
]);
|
|
1617
1615
|
(0, $hgUW1$useEffect)(()=>{
|
|
1618
1616
|
// No results found
|
|
1619
|
-
if (noResults) setAnnouncementText(
|
|
1620
|
-
else if (!isPending && (!data || !data.data.results)) setAnnouncementText(
|
|
1617
|
+
if (noResults) setAnnouncementText("No results found.");
|
|
1618
|
+
else if (!isPending && (!data || !data.data.results)) setAnnouncementText("Could not connect to the API.");
|
|
1621
1619
|
else setAnnouncementText(`Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`);
|
|
1622
1620
|
}, [
|
|
1623
1621
|
data,
|
|
@@ -1678,11 +1676,11 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1678
1676
|
className: "ds-c-field__before fas fa-search ds-u-display--none ds-u-sm-display--inline-block"
|
|
1679
1677
|
}),
|
|
1680
1678
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
1681
|
-
errorMessage: invalidSearch ?
|
|
1679
|
+
errorMessage: invalidSearch ? "No special characters allowed. Please enter a valid search term." : undefined,
|
|
1682
1680
|
errorPlacement: "bottom",
|
|
1683
1681
|
fieldClassName: "ds-u-margin--0",
|
|
1684
1682
|
value: filterText,
|
|
1685
|
-
className: `ds-u-padding-right--2 ${altMobileSearchButton ?
|
|
1683
|
+
className: `ds-u-padding-right--2 ${altMobileSearchButton ? "ds-l-col--12 ds-l-md-col--10 --alt-style" : "ds-l-col--10"}`,
|
|
1686
1684
|
label: "Search datasets",
|
|
1687
1685
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
1688
1686
|
placeholder: "Search datasets",
|
|
@@ -1745,7 +1743,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1745
1743
|
"Showing ",
|
|
1746
1744
|
currentResultNumbers.startingNumber,
|
|
1747
1745
|
" -",
|
|
1748
|
-
|
|
1746
|
+
" ",
|
|
1749
1747
|
currentResultNumbers.endingNumber,
|
|
1750
1748
|
" of ",
|
|
1751
1749
|
data.data.total,
|
|
@@ -1816,7 +1814,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1816
1814
|
},
|
|
1817
1815
|
renderHref: (page)=>{
|
|
1818
1816
|
const searchParams = buildSearchParams(false);
|
|
1819
|
-
const includeAnd = searchParams ?
|
|
1817
|
+
const includeAnd = searchParams ? "&" : "";
|
|
1820
1818
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
1821
1819
|
}
|
|
1822
1820
|
})
|
|
@@ -1837,7 +1835,7 @@ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
1837
1835
|
const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
|
|
1838
1836
|
const { headingText: headingText = "Dataset Search" } = props;
|
|
1839
1837
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
1840
|
-
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)(
|
|
1838
|
+
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)("");
|
|
1841
1839
|
const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
|
|
1842
1840
|
const [invalidSearch, setInvalidSearch] = (0, $hgUW1$useState)(false);
|
|
1843
1841
|
function searchForDataset(e) {
|
|
@@ -1846,7 +1844,7 @@ const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
|
|
|
1846
1844
|
if (modalSearchTerm) {
|
|
1847
1845
|
if ((0, $e873081a6e8f024e$export$1040147c129fdde9)(modalSearchTerm)) {
|
|
1848
1846
|
setInvalidSearch(false);
|
|
1849
|
-
if (window.location.pathname !==
|
|
1847
|
+
if (window.location.pathname !== "/datasets") navigate(`/datasets?fulltext=${modalSearchTerm}`);
|
|
1850
1848
|
else {
|
|
1851
1849
|
window.location.search = `fulltext=${modalSearchTerm}`;
|
|
1852
1850
|
setModalSearch(false);
|
|
@@ -1879,7 +1877,7 @@ const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
|
|
|
1879
1877
|
},
|
|
1880
1878
|
children: [
|
|
1881
1879
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
1882
|
-
errorMessage: invalidSearch ?
|
|
1880
|
+
errorMessage: invalidSearch ? "No special characters allowed. Please enter a valid search term." : undefined,
|
|
1883
1881
|
errorPlacement: "bottom",
|
|
1884
1882
|
value: modalSearchTerm,
|
|
1885
1883
|
fieldClassName: "ds-u-display--inline-block ds-u-margin--0",
|
|
@@ -1919,9 +1917,9 @@ const $b939b31651e82908$var$HeaderNav = (props)=>{
|
|
|
1919
1917
|
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
1920
1918
|
const { links: links, topNavLinks: topNavLinks, wrapperClasses: wrapperClasses, searchInMobile: searchInMobile } = props;
|
|
1921
1919
|
const navMenuOpenClass = `dkan-c-nav-menu--${headerContext.mobileMenuOpen ? "open" : "close"}`;
|
|
1922
|
-
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ?
|
|
1923
|
-
const linkClasses =
|
|
1924
|
-
const listClasses =
|
|
1920
|
+
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ? "mobile" : "desktop"}`;
|
|
1921
|
+
const linkClasses = "dkan-c-header--link ds-c-button ds-c-button--ghost";
|
|
1922
|
+
const listClasses = "dkan-c-header--link-list ";
|
|
1925
1923
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1926
1924
|
className: `dkan-c-nav-menu ${wrapperClasses} ${navMenuOpenClass} ${isMobileClass}`,
|
|
1927
1925
|
ref: headerContext.menuRef,
|
|
@@ -2091,8 +2089,8 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
2091
2089
|
const { title: title, links: links, mobileMax: mobileMax } = props;
|
|
2092
2090
|
const active = (0, $hgUW1$useLocation)().pathname;
|
|
2093
2091
|
const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
|
|
2094
|
-
const styleClasses =
|
|
2095
|
-
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ?
|
|
2092
|
+
const styleClasses = "dkan-c--sidebar-nav-wrapper ds-u-border--1 ds-u-border--color-gray-lightest ds-u-padding--2";
|
|
2093
|
+
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ? "mobile" : "desktop"}`;
|
|
2096
2094
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2097
2095
|
className: `dkan-c-sidebar-nav ${mobileClass}`,
|
|
2098
2096
|
children: [
|
|
@@ -2106,7 +2104,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
2106
2104
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
2107
2105
|
"aria-haspopup": "true",
|
|
2108
2106
|
variation: "ghost",
|
|
2109
|
-
"aria-expanded": `${menuOpen ?
|
|
2107
|
+
"aria-expanded": `${menuOpen ? "true" : "false"}`,
|
|
2110
2108
|
onDark: true,
|
|
2111
2109
|
onClick: ()=>setMenuOpen(!menuOpen),
|
|
2112
2110
|
children: [
|
|
@@ -2115,7 +2113,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
2115
2113
|
children: "Toggle menu"
|
|
2116
2114
|
}),
|
|
2117
2115
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
|
|
2118
|
-
direction: menuOpen ?
|
|
2116
|
+
direction: menuOpen ? "up" : "down"
|
|
2119
2117
|
})
|
|
2120
2118
|
]
|
|
2121
2119
|
})
|
|
@@ -2124,7 +2122,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
2124
2122
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2125
2123
|
className: ``,
|
|
2126
2124
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
|
|
2127
|
-
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ?
|
|
2125
|
+
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ? "open" : "close"}`,
|
|
2128
2126
|
children: [
|
|
2129
2127
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2130
2128
|
className: "ds-u-padding--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest",
|
|
@@ -2136,7 +2134,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
2136
2134
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
2137
2135
|
className: "ds-u-padding-bottom--2",
|
|
2138
2136
|
children: links.map(({ url: url, label: label })=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
2139
|
-
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ?
|
|
2137
|
+
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ? "active" : ""}`,
|
|
2140
2138
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2141
2139
|
className: "ds-u-display--flex ds-u-padding-y--1",
|
|
2142
2140
|
children: [
|
|
@@ -2171,12 +2169,12 @@ const $b0968edc60d7d3a4$var$SidebarPage = (props)=>{
|
|
|
2171
2169
|
query: `(max-width: ${mobileMaxWidth}px)`
|
|
2172
2170
|
});
|
|
2173
2171
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2174
|
-
className: `${mobileMax ? "a" :
|
|
2172
|
+
className: `${mobileMax ? "a" : "ds-l-container"}`,
|
|
2175
2173
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2176
|
-
className: `${mobileMax ? "a" :
|
|
2174
|
+
className: `${mobileMax ? "a" : "ds-l-row"}`,
|
|
2177
2175
|
children: [
|
|
2178
2176
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2179
|
-
className: `${mobileMax ?
|
|
2177
|
+
className: `${mobileMax ? "a" : "ds-l-col--4"}`,
|
|
2180
2178
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $953b286f7778640e$export$2e2bcd8739ae039), {
|
|
2181
2179
|
links: links,
|
|
2182
2180
|
title: menuTitle,
|
|
@@ -2201,9 +2199,9 @@ var $b0968edc60d7d3a4$export$2e2bcd8739ae039 = $b0968edc60d7d3a4$var$SidebarPage
|
|
|
2201
2199
|
|
|
2202
2200
|
|
|
2203
2201
|
|
|
2204
|
-
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl =
|
|
2202
|
+
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl = "datasets", searchKey: searchKey = "fulltext", textfieldLabel: textfieldLabel = "Search for a dataset", searchButtonText: searchButtonText = "Search" })=>{
|
|
2205
2203
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
2206
|
-
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState(
|
|
2204
|
+
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState("");
|
|
2207
2205
|
const [invalidSearch, setInvalidSearch] = (0, $hgUW1$useState)(false);
|
|
2208
2206
|
function submitHero(e) {
|
|
2209
2207
|
e.preventDefault();
|
|
@@ -2234,26 +2232,26 @@ const $59a079354baa335c$var$Hero = ({ title: title, description: description, se
|
|
|
2234
2232
|
onSubmit: (e)=>submitHero(e),
|
|
2235
2233
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2236
2234
|
style: {
|
|
2237
|
-
position:
|
|
2235
|
+
position: "relative"
|
|
2238
2236
|
},
|
|
2239
2237
|
className: "ds-l-row ds-u-align-items--stretch ds-u-margin-y--4 ds-u-flex-wrap--nowrap",
|
|
2240
2238
|
children: [
|
|
2241
2239
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2242
2240
|
className: "ds-u-padding--0 ds-u-margin-right--1",
|
|
2243
2241
|
style: {
|
|
2244
|
-
flex:
|
|
2245
|
-
maxWidth:
|
|
2242
|
+
flex: "1 1 100%",
|
|
2243
|
+
maxWidth: "100%"
|
|
2246
2244
|
},
|
|
2247
2245
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
2248
|
-
errorMessage: invalidSearch ?
|
|
2246
|
+
errorMessage: invalidSearch ? "No special characters allowed. Please enter a valid search term." : undefined,
|
|
2249
2247
|
errorPlacement: "bottom",
|
|
2250
2248
|
label: textfieldLabel,
|
|
2251
2249
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
2252
2250
|
name: "search_text_input",
|
|
2253
2251
|
style: {
|
|
2254
|
-
maxWidth:
|
|
2255
|
-
height:
|
|
2256
|
-
margin:
|
|
2252
|
+
maxWidth: "none",
|
|
2253
|
+
height: "61px",
|
|
2254
|
+
margin: "0 20px 0 0"
|
|
2257
2255
|
},
|
|
2258
2256
|
onChange: (e)=>{
|
|
2259
2257
|
setInvalidSearch(false);
|
|
@@ -2298,25 +2296,25 @@ const $c068004d499082cc$var$DatasetListItem = (props)=>{
|
|
|
2298
2296
|
minWidth: 1024
|
|
2299
2297
|
});
|
|
2300
2298
|
const { title: title, modified: modified, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
|
|
2301
|
-
let linkContainerClasses =
|
|
2302
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
2303
|
-
else linkContainerClasses +=
|
|
2304
|
-
let linkClasses =
|
|
2299
|
+
let linkContainerClasses = "ds-u-margin-bottom--2";
|
|
2300
|
+
if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
|
|
2301
|
+
else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
|
|
2302
|
+
let linkClasses = "ds-u-display--block ds-u-text-align--left";
|
|
2305
2303
|
if (desktop) {
|
|
2306
|
-
linkContainerClasses =
|
|
2307
|
-
linkClasses +=
|
|
2304
|
+
linkContainerClasses = "ds-u-padding-x--0";
|
|
2305
|
+
linkClasses += " ds-l-col--4 ds-l-md-col--auto";
|
|
2308
2306
|
}
|
|
2309
2307
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
2310
2308
|
className: "dc-c-list-item ds-u-padding-top--4",
|
|
2311
2309
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2312
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
2310
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
|
|
2313
2311
|
children: [
|
|
2314
2312
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2315
2313
|
className: "ds-l-row ds-u-align-items--start",
|
|
2316
2314
|
children: [
|
|
2317
2315
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
2318
2316
|
id: `dataset-${identifier}-updated-date`,
|
|
2319
|
-
className: `ds-l-col--12 ds-u-text-align--left ds-text-heading--sm ${paginationEnabled ?
|
|
2317
|
+
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"}`,
|
|
2320
2318
|
children: [
|
|
2321
2319
|
"Updated ",
|
|
2322
2320
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
@@ -2395,7 +2393,7 @@ var $789279954d8eff7f$export$2e2bcd8739ae039 = $789279954d8eff7f$var$ApiDocument
|
|
|
2395
2393
|
|
|
2396
2394
|
|
|
2397
2395
|
|
|
2398
|
-
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className =
|
|
2396
|
+
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className = "data-table-results" })=>{
|
|
2399
2397
|
const numTotalRows = totalRows;
|
|
2400
2398
|
if (numTotalRows === 0) return /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
2401
2399
|
className: className,
|
|
@@ -2413,18 +2411,18 @@ const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limi
|
|
|
2413
2411
|
className: className,
|
|
2414
2412
|
children: [
|
|
2415
2413
|
"Displaying",
|
|
2416
|
-
|
|
2414
|
+
" ",
|
|
2417
2415
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2418
2416
|
className: "ds-u-font-weight--bold",
|
|
2419
2417
|
children: `${startTotal().toLocaleString()} - ${ofTotal().toLocaleString()}`
|
|
2420
2418
|
}),
|
|
2421
|
-
|
|
2419
|
+
" ",
|
|
2422
2420
|
"of ",
|
|
2423
2421
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2424
2422
|
className: "ds-u-font-weight--bold",
|
|
2425
2423
|
children: `${numTotalRows.toLocaleString()}`
|
|
2426
2424
|
}),
|
|
2427
|
-
|
|
2425
|
+
" ",
|
|
2428
2426
|
"rows"
|
|
2429
2427
|
]
|
|
2430
2428
|
});
|
|
@@ -2450,16 +2448,16 @@ const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePaddi
|
|
|
2450
2448
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
2451
2449
|
options: [
|
|
2452
2450
|
{
|
|
2453
|
-
label:
|
|
2454
|
-
value:
|
|
2451
|
+
label: "Tight",
|
|
2452
|
+
value: "ds-u-padding-y--0"
|
|
2455
2453
|
},
|
|
2456
2454
|
{
|
|
2457
|
-
label:
|
|
2458
|
-
value:
|
|
2455
|
+
label: "Normal",
|
|
2456
|
+
value: "ds-u-padding-y--1"
|
|
2459
2457
|
},
|
|
2460
2458
|
{
|
|
2461
|
-
label:
|
|
2462
|
-
value:
|
|
2459
|
+
label: "Expanded",
|
|
2460
|
+
value: "ds-u-padding-y--2"
|
|
2463
2461
|
}
|
|
2464
2462
|
],
|
|
2465
2463
|
label: "Display density:",
|
|
@@ -2702,7 +2700,7 @@ function $aa4450dcbeef3ac0$export$385a5aba38cc3325(sortArray) {
|
|
|
2702
2700
|
sortArray.forEach((s)=>{
|
|
2703
2701
|
return newQuery.push({
|
|
2704
2702
|
property: s.id,
|
|
2705
|
-
order: s.desc ?
|
|
2703
|
+
order: s.desc ? "desc" : "asc"
|
|
2706
2704
|
});
|
|
2707
2705
|
});
|
|
2708
2706
|
return newQuery;
|
|
@@ -2740,46 +2738,46 @@ function $7264a673914aa746$export$e284ae5d89467c8f(date) {
|
|
|
2740
2738
|
}
|
|
2741
2739
|
function $7264a673914aa746$export$6b5e57d20078142b(value, operator) {
|
|
2742
2740
|
let newValue = value;
|
|
2743
|
-
if (Array.isArray(newValue)) newValue = newValue.join(
|
|
2741
|
+
if (Array.isArray(newValue)) newValue = newValue.join(",");
|
|
2744
2742
|
// return newValue.replace(/(^\%+|\%+$)/gm, '');
|
|
2745
2743
|
return newValue;
|
|
2746
2744
|
}
|
|
2747
2745
|
const $7264a673914aa746$export$5f89a5ae87bc48e1 = [
|
|
2748
2746
|
{
|
|
2749
|
-
label:
|
|
2750
|
-
value:
|
|
2747
|
+
label: "Is",
|
|
2748
|
+
value: "="
|
|
2751
2749
|
},
|
|
2752
2750
|
{
|
|
2753
|
-
label:
|
|
2754
|
-
value:
|
|
2751
|
+
label: "Starts With",
|
|
2752
|
+
value: "starts with"
|
|
2755
2753
|
},
|
|
2756
2754
|
{
|
|
2757
|
-
label:
|
|
2758
|
-
value:
|
|
2755
|
+
label: "Contains",
|
|
2756
|
+
value: "contains"
|
|
2759
2757
|
},
|
|
2760
2758
|
{
|
|
2761
|
-
label:
|
|
2762
|
-
value:
|
|
2759
|
+
label: "Is Not",
|
|
2760
|
+
value: "<>"
|
|
2763
2761
|
},
|
|
2764
2762
|
{
|
|
2765
|
-
label:
|
|
2766
|
-
value:
|
|
2763
|
+
label: "Or",
|
|
2764
|
+
value: "in"
|
|
2767
2765
|
},
|
|
2768
2766
|
{
|
|
2769
|
-
label:
|
|
2770
|
-
value:
|
|
2767
|
+
label: "Is",
|
|
2768
|
+
value: "="
|
|
2771
2769
|
},
|
|
2772
2770
|
{
|
|
2773
|
-
label:
|
|
2774
|
-
value:
|
|
2771
|
+
label: "Is Not",
|
|
2772
|
+
value: "<>"
|
|
2775
2773
|
},
|
|
2776
2774
|
{
|
|
2777
|
-
label:
|
|
2778
|
-
value:
|
|
2775
|
+
label: "Greater Than",
|
|
2776
|
+
value: ">"
|
|
2779
2777
|
},
|
|
2780
2778
|
{
|
|
2781
|
-
label:
|
|
2782
|
-
value:
|
|
2779
|
+
label: "Less Than",
|
|
2780
|
+
value: "<"
|
|
2783
2781
|
}
|
|
2784
2782
|
];
|
|
2785
2783
|
function $7264a673914aa746$export$d243819c3ad678fb(operatorValue) {
|
|
@@ -2788,59 +2786,59 @@ function $7264a673914aa746$export$d243819c3ad678fb(operatorValue) {
|
|
|
2788
2786
|
}
|
|
2789
2787
|
function $7264a673914aa746$export$2b9377795161999(type) {
|
|
2790
2788
|
switch(type){
|
|
2791
|
-
case
|
|
2792
|
-
case
|
|
2789
|
+
case "text":
|
|
2790
|
+
case "string":
|
|
2793
2791
|
return [
|
|
2794
2792
|
{
|
|
2795
|
-
label:
|
|
2796
|
-
value:
|
|
2793
|
+
label: "Is",
|
|
2794
|
+
value: "="
|
|
2797
2795
|
},
|
|
2798
2796
|
{
|
|
2799
|
-
label:
|
|
2800
|
-
value:
|
|
2797
|
+
label: "Starts With",
|
|
2798
|
+
value: "starts with"
|
|
2801
2799
|
},
|
|
2802
2800
|
{
|
|
2803
|
-
label:
|
|
2804
|
-
value:
|
|
2801
|
+
label: "Contains",
|
|
2802
|
+
value: "contains"
|
|
2805
2803
|
},
|
|
2806
2804
|
{
|
|
2807
|
-
label:
|
|
2808
|
-
value:
|
|
2805
|
+
label: "Is Not",
|
|
2806
|
+
value: "<>"
|
|
2809
2807
|
},
|
|
2810
2808
|
{
|
|
2811
|
-
label:
|
|
2812
|
-
value:
|
|
2809
|
+
label: "Or",
|
|
2810
|
+
value: "in"
|
|
2813
2811
|
}
|
|
2814
2812
|
];
|
|
2815
|
-
case
|
|
2813
|
+
case "date":
|
|
2816
2814
|
return [
|
|
2817
2815
|
{
|
|
2818
|
-
label:
|
|
2819
|
-
value:
|
|
2816
|
+
label: "Is",
|
|
2817
|
+
value: "="
|
|
2820
2818
|
},
|
|
2821
2819
|
{
|
|
2822
|
-
label:
|
|
2823
|
-
value:
|
|
2820
|
+
label: "Is Not",
|
|
2821
|
+
value: "<>"
|
|
2824
2822
|
},
|
|
2825
2823
|
{
|
|
2826
|
-
label:
|
|
2827
|
-
value:
|
|
2824
|
+
label: "Greater Than",
|
|
2825
|
+
value: ">"
|
|
2828
2826
|
},
|
|
2829
2827
|
{
|
|
2830
|
-
label:
|
|
2831
|
-
value:
|
|
2828
|
+
label: "Less Than",
|
|
2829
|
+
value: "<"
|
|
2832
2830
|
}
|
|
2833
2831
|
];
|
|
2834
2832
|
default:
|
|
2835
2833
|
// These 2 should be safe for all data types
|
|
2836
2834
|
return [
|
|
2837
2835
|
{
|
|
2838
|
-
label:
|
|
2839
|
-
value:
|
|
2836
|
+
label: "Is",
|
|
2837
|
+
value: "="
|
|
2840
2838
|
},
|
|
2841
2839
|
{
|
|
2842
|
-
label:
|
|
2843
|
-
value:
|
|
2840
|
+
label: "Is Not",
|
|
2841
|
+
value: "<>"
|
|
2844
2842
|
}
|
|
2845
2843
|
];
|
|
2846
2844
|
}
|
|
@@ -2857,7 +2855,7 @@ function $7264a673914aa746$export$2b9377795161999(type) {
|
|
|
2857
2855
|
|
|
2858
2856
|
|
|
2859
2857
|
const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: header, sortElement: sortElement, id: id })=>{
|
|
2860
|
-
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)(
|
|
2858
|
+
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)("");
|
|
2861
2859
|
// Fix for JSX in Data Dictionary Title header cell
|
|
2862
2860
|
const ariaLabel = header.id === "titleResizable" ? "Title" : header.column.columnDef.header;
|
|
2863
2861
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("th", {
|
|
@@ -2866,9 +2864,9 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2866
2864
|
width: header.getSize()
|
|
2867
2865
|
},
|
|
2868
2866
|
id: id,
|
|
2869
|
-
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header :
|
|
2867
|
+
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : "",
|
|
2870
2868
|
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
|
|
2871
|
-
"aria-sort": header.column.getIsSorted() ===
|
|
2869
|
+
"aria-sort": header.column.getIsSorted() === "asc" ? "ascending" : header.column.getIsSorted() === "desc" ? "descending" : "none",
|
|
2872
2870
|
children: [
|
|
2873
2871
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2874
2872
|
className: "ds-u-display--flex",
|
|
@@ -2880,7 +2878,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2880
2878
|
}),
|
|
2881
2879
|
sortElement && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2882
2880
|
onClick: header.column.getToggleSortingHandler(),
|
|
2883
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
2881
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : "",
|
|
2884
2882
|
"aria-label": `${ariaLabel} sort order`
|
|
2885
2883
|
})
|
|
2886
2884
|
]
|
|
@@ -2888,24 +2886,24 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2888
2886
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2889
2887
|
onMouseDown: header.getResizeHandler(),
|
|
2890
2888
|
onTouchStart: header.getResizeHandler(),
|
|
2891
|
-
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ?
|
|
2889
|
+
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ? "isResizing" : ""}`,
|
|
2892
2890
|
"aria-label": `Resize ${ariaLabel} column`,
|
|
2893
2891
|
onKeyDown: (e)=>{
|
|
2894
2892
|
const columnSizingObject = table.getState().columnSizing;
|
|
2895
2893
|
switch(e.key){
|
|
2896
|
-
case
|
|
2897
|
-
case
|
|
2894
|
+
case "Enter":
|
|
2895
|
+
case " ":
|
|
2898
2896
|
e.preventDefault();
|
|
2899
2897
|
e.stopPropagation();
|
|
2900
2898
|
if (columnResizing) // end resizing
|
|
2901
|
-
setColumnResizing(
|
|
2899
|
+
setColumnResizing("");
|
|
2902
2900
|
else // start resizing
|
|
2903
2901
|
setColumnResizing(header.column.id);
|
|
2904
2902
|
break;
|
|
2905
|
-
case
|
|
2906
|
-
if (columnResizing) setColumnResizing(
|
|
2903
|
+
case "Escape":
|
|
2904
|
+
if (columnResizing) setColumnResizing("");
|
|
2907
2905
|
break;
|
|
2908
|
-
case
|
|
2906
|
+
case "ArrowRight":
|
|
2909
2907
|
e.preventDefault();
|
|
2910
2908
|
e.stopPropagation();
|
|
2911
2909
|
if (columnResizing) {
|
|
@@ -2913,7 +2911,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2913
2911
|
table.setColumnSizing(columnSizingObject);
|
|
2914
2912
|
}
|
|
2915
2913
|
break;
|
|
2916
|
-
case
|
|
2914
|
+
case "ArrowLeft":
|
|
2917
2915
|
e.preventDefault();
|
|
2918
2916
|
e.stopPropagation();
|
|
2919
2917
|
if (columnResizing) {
|
|
@@ -2924,7 +2922,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2924
2922
|
}
|
|
2925
2923
|
},
|
|
2926
2924
|
onBlur: ()=>{
|
|
2927
|
-
setColumnResizing(
|
|
2925
|
+
setColumnResizing("");
|
|
2928
2926
|
}
|
|
2929
2927
|
})
|
|
2930
2928
|
]
|
|
@@ -2964,7 +2962,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2964
2962
|
},
|
|
2965
2963
|
title: header.column.columnDef.header,
|
|
2966
2964
|
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
|
|
2967
|
-
"aria-sort": header.column.getIsSorted() ===
|
|
2965
|
+
"aria-sort": header.column.getIsSorted() === "asc" ? "ascending" : header.column.getIsSorted() === "desc" ? "descending" : "none",
|
|
2968
2966
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2969
2967
|
onClick: header.column.getToggleSortingHandler(),
|
|
2970
2968
|
className: "ds-u-display--flex",
|
|
@@ -2973,7 +2971,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2973
2971
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
2974
2972
|
}),
|
|
2975
2973
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2976
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` :
|
|
2974
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` : ""
|
|
2977
2975
|
})
|
|
2978
2976
|
]
|
|
2979
2977
|
})
|
|
@@ -3004,7 +3002,7 @@ const $ee0d4d4f34048447$var$DataTableActionsContextDefaults = {
|
|
|
3004
3002
|
setColumnVisibility: ()=>{},
|
|
3005
3003
|
page: 1,
|
|
3006
3004
|
setPage: ()=>{},
|
|
3007
|
-
tableDensity:
|
|
3005
|
+
tableDensity: "normal",
|
|
3008
3006
|
setTableDensity: ()=>{}
|
|
3009
3007
|
};
|
|
3010
3008
|
const $ee0d4d4f34048447$export$f814ea079e65d8fe = /*#__PURE__*/ (0, $hgUW1$createContext)($ee0d4d4f34048447$var$DataTableActionsContextDefaults);
|
|
@@ -3023,7 +3021,7 @@ const $ee0d4d4f34048447$var$DataTableActionsProvider = ({ children: children })=
|
|
|
3023
3021
|
if (datasetTableControls && localStorageData) return localStorageData.tableColumnVisibility;
|
|
3024
3022
|
else return {};
|
|
3025
3023
|
});
|
|
3026
|
-
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)(
|
|
3024
|
+
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)("normal");
|
|
3027
3025
|
const providerValue = {
|
|
3028
3026
|
columnOrder: columnOrder,
|
|
3029
3027
|
setColumnOrder: setColumnOrder,
|
|
@@ -3070,9 +3068,9 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
3070
3068
|
transition: transition,
|
|
3071
3069
|
opacity: isDragging ? 0.7 : 1,
|
|
3072
3070
|
zIndex: isDragging ? 1 : 0,
|
|
3073
|
-
position:
|
|
3074
|
-
background:
|
|
3075
|
-
touchAction:
|
|
3071
|
+
position: "relative",
|
|
3072
|
+
background: "white",
|
|
3073
|
+
touchAction: "none"
|
|
3076
3074
|
};
|
|
3077
3075
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
3078
3076
|
className: "ds-u-display--flex ds-u-justify-content--between ds-u-border-bottom--1",
|
|
@@ -3088,7 +3086,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
3088
3086
|
// this code forces the repaint without user interaction
|
|
3089
3087
|
const target = e.target;
|
|
3090
3088
|
if (isDragging && target.tagName.toLowerCase() === "label") setTimeout(()=>{
|
|
3091
|
-
target.parentNode.querySelector(
|
|
3089
|
+
target.parentNode.querySelector("input").checked = visible;
|
|
3092
3090
|
}, 1);
|
|
3093
3091
|
},
|
|
3094
3092
|
children: [
|
|
@@ -3105,7 +3103,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
3105
3103
|
}
|
|
3106
3104
|
}),
|
|
3107
3105
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3108
|
-
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging &&
|
|
3106
|
+
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && "grabbed"}`,
|
|
3109
3107
|
"aria-label": `Reorder ${id} column`,
|
|
3110
3108
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3111
3109
|
className: "fa fa-sort"
|
|
@@ -3125,9 +3123,9 @@ var $5fe94aeb50e0798b$export$2e2bcd8739ae039 = $5fe94aeb50e0798b$var$Card;
|
|
|
3125
3123
|
* even if a parent dialog is still open. This restores it.
|
|
3126
3124
|
*/ function $15650910340b2c71$export$73fce4ded5ef1c2() {
|
|
3127
3125
|
setTimeout(()=>{
|
|
3128
|
-
if (document.querySelector(
|
|
3129
|
-
document.body.classList.add(
|
|
3130
|
-
document.body.style.setProperty(
|
|
3126
|
+
if (document.querySelector(".dkan-fullscreen-data-table-wrapper .ds-c-dialog-wrap.open")) {
|
|
3127
|
+
document.body.classList.add("ds--dialog-open");
|
|
3128
|
+
document.body.style.setProperty("--body_top--dialog-open", "-0px");
|
|
3131
3129
|
}
|
|
3132
3130
|
}, 0);
|
|
3133
3131
|
}
|
|
@@ -3137,7 +3135,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor extends (0, $hgUW1$Key
|
|
|
3137
3135
|
// Custom function to exclude checkbox from keyboard dragging
|
|
3138
3136
|
static activators = [
|
|
3139
3137
|
{
|
|
3140
|
-
eventName:
|
|
3138
|
+
eventName: "onKeyDown",
|
|
3141
3139
|
handler: ({ nativeEvent: event })=>{
|
|
3142
3140
|
// prevent scrolling the list
|
|
3143
3141
|
const isCheckbox = [
|
|
@@ -3160,7 +3158,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$Poin
|
|
|
3160
3158
|
// Custom function to stop accidental checkbox clicks on pointer activation
|
|
3161
3159
|
static activators = [
|
|
3162
3160
|
{
|
|
3163
|
-
eventName:
|
|
3161
|
+
eventName: "onPointerDown",
|
|
3164
3162
|
handler: ({ nativeEvent: event })=>{
|
|
3165
3163
|
if (event.target.tagName.toLowerCase() === "input") return false;
|
|
3166
3164
|
if (event.target.tagName.toLowerCase() === "label") event.target.blur();
|
|
@@ -3258,13 +3256,13 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
3258
3256
|
className: "dkan-dataset-toolbar-button-label",
|
|
3259
3257
|
children: "Manage Columns"
|
|
3260
3258
|
}),
|
|
3261
|
-
hiddenColumns ? ` (${hiddenColumns})` :
|
|
3259
|
+
hiddenColumns ? ` (${hiddenColumns})` : ""
|
|
3262
3260
|
]
|
|
3263
3261
|
})
|
|
3264
3262
|
]
|
|
3265
3263
|
}),
|
|
3266
3264
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3267
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
3265
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
3268
3266
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
|
|
3269
3267
|
heading: "Manage columns",
|
|
3270
3268
|
isOpen: modalOpen,
|
|
@@ -3440,12 +3438,12 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
3440
3438
|
if (Object.keys(resource).length && columns.length && resource.schema && Object.keys(distribution).length) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
3441
3439
|
children: [
|
|
3442
3440
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3443
|
-
className: isModal ?
|
|
3441
|
+
className: isModal ? "dkan-datatable-fullscreen-mode" : "",
|
|
3444
3442
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
|
|
3445
3443
|
canResize: true,
|
|
3446
3444
|
columns: columns,
|
|
3447
3445
|
sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
|
|
3448
|
-
tablePadding: tableDensity ===
|
|
3446
|
+
tablePadding: tableDensity === "normal" ? "ds-u-padding-y--2" : tableDensity === "compact" ? "ds-u-padding-y--1" : "ds-u-padding-y--3",
|
|
3449
3447
|
loading: resource.loading,
|
|
3450
3448
|
isModal: isModal,
|
|
3451
3449
|
downloadURL: downloadURL,
|
|
@@ -3460,14 +3458,14 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
3460
3458
|
}),
|
|
3461
3459
|
!resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3462
3460
|
className: [
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
isModal &&
|
|
3470
|
-
].filter(Boolean).join(
|
|
3461
|
+
"ds-u-display--flex",
|
|
3462
|
+
"ds-u-flex-wrap--wrap",
|
|
3463
|
+
"ds-u-justify-content--end",
|
|
3464
|
+
"ds-u-md-justify-content--between",
|
|
3465
|
+
"ds-u-margin-top--2",
|
|
3466
|
+
"ds-u-align-items--center",
|
|
3467
|
+
isModal && "ds-u-margin-bottom--2"
|
|
3468
|
+
].filter(Boolean).join(" "),
|
|
3471
3469
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
3472
3470
|
totalPages: Math.ceil(resource.count ? resource.count / pageSize : 1),
|
|
3473
3471
|
currentPage: Number(page),
|
|
@@ -3506,7 +3504,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
3506
3504
|
},
|
|
3507
3505
|
children: [
|
|
3508
3506
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3509
|
-
className: `far ${modalOpen ?
|
|
3507
|
+
className: `far ${modalOpen ? "fa-compress" : "fa-expand"} ds-u-margin-right--1`
|
|
3510
3508
|
}),
|
|
3511
3509
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3512
3510
|
className: "dkan-dataset-toolbar-button-label",
|
|
@@ -3515,7 +3513,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
3515
3513
|
]
|
|
3516
3514
|
}),
|
|
3517
3515
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3518
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
3516
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
3519
3517
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
3520
3518
|
heading: "Dataset Explorer",
|
|
3521
3519
|
isOpen: modalOpen,
|
|
@@ -3550,13 +3548,13 @@ var $16bd41951b91f02d$export$2e2bcd8739ae039 = $16bd41951b91f02d$var$FullScreenD
|
|
|
3550
3548
|
|
|
3551
3549
|
|
|
3552
3550
|
function $eadd6431fddf4b6c$var$getStartDate(condition, schema, id) {
|
|
3553
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
3551
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
3554
3552
|
const newDate = new Date(condition.value.toString());
|
|
3555
3553
|
if (newDate instanceof Date && !isNaN(newDate.getTime())) return newDate;
|
|
3556
3554
|
}
|
|
3557
3555
|
return new Date();
|
|
3558
3556
|
}
|
|
3559
|
-
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className =
|
|
3557
|
+
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className = "" })=>{
|
|
3560
3558
|
const [operator, setOperator] = (0, $hgUW1$useState)(condition.operator);
|
|
3561
3559
|
const [property, setProperty] = (0, $hgUW1$useState)(condition.property);
|
|
3562
3560
|
const [value, setValue] = (0, $hgUW1$useState)(condition.value);
|
|
@@ -3568,9 +3566,9 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
3568
3566
|
// Reset value when mysql_type changes from date to another type
|
|
3569
3567
|
(0, $hgUW1$useEffect)(()=>{
|
|
3570
3568
|
const currentType = schema[id].fields[property]?.mysql_type;
|
|
3571
|
-
if (previousType ===
|
|
3572
|
-
setValue(
|
|
3573
|
-
update(index,
|
|
3569
|
+
if (previousType === "date" && currentType !== "date") {
|
|
3570
|
+
setValue("");
|
|
3571
|
+
update(index, "value", "");
|
|
3574
3572
|
}
|
|
3575
3573
|
setPreviousType(currentType);
|
|
3576
3574
|
}, [
|
|
@@ -3583,9 +3581,9 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
3583
3581
|
]);
|
|
3584
3582
|
(0, $hgUW1$useEffect)(()=>{
|
|
3585
3583
|
if (property !== condition.property) {
|
|
3586
|
-
if (property) update(index,
|
|
3587
|
-
else update(index,
|
|
3588
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
3584
|
+
if (property) update(index, "property", property);
|
|
3585
|
+
else update(index, "property", "");
|
|
3586
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
3589
3587
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
3590
3588
|
}
|
|
3591
3589
|
}
|
|
@@ -3599,22 +3597,22 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
3599
3597
|
]);
|
|
3600
3598
|
(0, $hgUW1$useEffect)(()=>{
|
|
3601
3599
|
if (operator !== condition.operator) {
|
|
3602
|
-
if (operator) update(index,
|
|
3603
|
-
else update(index,
|
|
3600
|
+
if (operator) update(index, "operator", operator);
|
|
3601
|
+
else update(index, "operator", "");
|
|
3604
3602
|
}
|
|
3605
3603
|
}, [
|
|
3606
3604
|
operator
|
|
3607
3605
|
]);
|
|
3608
3606
|
(0, $hgUW1$useEffect)(()=>{
|
|
3609
3607
|
if (value !== condition.value) {
|
|
3610
|
-
if (value) update(index,
|
|
3611
|
-
else update(index,
|
|
3608
|
+
if (value) update(index, "value", value);
|
|
3609
|
+
else update(index, "value", "");
|
|
3612
3610
|
}
|
|
3613
3611
|
}, [
|
|
3614
3612
|
value
|
|
3615
3613
|
]);
|
|
3616
3614
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("fieldset", {
|
|
3617
|
-
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 !==
|
|
3615
|
+
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}` : ""}`,
|
|
3618
3616
|
children: [
|
|
3619
3617
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
3620
3618
|
options: propertyOptions,
|
|
@@ -3632,7 +3630,7 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
3632
3630
|
name: `${condition.key}_operator`,
|
|
3633
3631
|
onChange: (e)=>setOperator(e.target.value)
|
|
3634
3632
|
}),
|
|
3635
|
-
schema[id].fields[property].mysql_type ===
|
|
3633
|
+
schema[id].fields[property].mysql_type === "date" ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
3636
3634
|
children: [
|
|
3637
3635
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
3638
3636
|
className: "ds-c-label",
|
|
@@ -3685,15 +3683,15 @@ var $eadd6431fddf4b6c$export$2e2bcd8739ae039 = $eadd6431fddf4b6c$var$FilterItem;
|
|
|
3685
3683
|
|
|
3686
3684
|
|
|
3687
3685
|
|
|
3688
|
-
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className =
|
|
3686
|
+
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className = "" })=>{
|
|
3689
3687
|
const small = (0, $hgUW1$useMediaQuery)({
|
|
3690
3688
|
minWidth: 0,
|
|
3691
3689
|
maxWidth: 544
|
|
3692
3690
|
});
|
|
3693
3691
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
3694
3692
|
disabled: disabled,
|
|
3695
|
-
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ?
|
|
3696
|
-
variation: small ?
|
|
3693
|
+
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ? "" : " ds-u-float--right ds-l-md-col--6 ds-l-col--5"}${className !== "" ? ` ${className}` : ""}`,
|
|
3694
|
+
variation: small ? "ghost" : undefined,
|
|
3697
3695
|
onClick: ()=>clearFiltersFn(),
|
|
3698
3696
|
children: "Reset"
|
|
3699
3697
|
});
|
|
@@ -3706,19 +3704,19 @@ var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFilter
|
|
|
3706
3704
|
function $6f4318b1e14124e5$var$updateQueryForDatastore(condition) {
|
|
3707
3705
|
let cond = condition;
|
|
3708
3706
|
delete cond.key;
|
|
3709
|
-
if (cond.operator ===
|
|
3707
|
+
if (cond.operator === "=" || cond.operator === "<>") {
|
|
3710
3708
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3711
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3709
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
3712
3710
|
}
|
|
3713
|
-
if (cond.operator.toLowerCase() ===
|
|
3711
|
+
if (cond.operator.toLowerCase() === "like") {
|
|
3714
3712
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3715
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3713
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
3716
3714
|
cond.value = `%${cleanedValue}%`;
|
|
3717
3715
|
}
|
|
3718
|
-
if (cond.operator.toLowerCase() ===
|
|
3719
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
3716
|
+
if (cond.operator.toLowerCase() === "in") {
|
|
3717
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(",");
|
|
3720
3718
|
}
|
|
3721
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
3719
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
|
|
3722
3720
|
return cond;
|
|
3723
3721
|
}
|
|
3724
3722
|
const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
@@ -3744,7 +3742,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3744
3742
|
} else setQueryConditions([
|
|
3745
3743
|
{
|
|
3746
3744
|
property: fields[0],
|
|
3747
|
-
value:
|
|
3745
|
+
value: "",
|
|
3748
3746
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3749
3747
|
key: Date.now().toString()
|
|
3750
3748
|
}
|
|
@@ -3761,7 +3759,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3761
3759
|
...queryConditions,
|
|
3762
3760
|
{
|
|
3763
3761
|
property: fields[0],
|
|
3764
|
-
value:
|
|
3762
|
+
value: "",
|
|
3765
3763
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3766
3764
|
key: Date.now().toString()
|
|
3767
3765
|
}
|
|
@@ -3792,7 +3790,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3792
3790
|
encodeValuesOnly: true,
|
|
3793
3791
|
addQueryPrefix: true
|
|
3794
3792
|
});
|
|
3795
|
-
window.history.pushState({},
|
|
3793
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
3796
3794
|
};
|
|
3797
3795
|
const submitConditions = ()=>{
|
|
3798
3796
|
// only update the data conditions when "Apply filters" is pressed
|
|
@@ -3867,7 +3865,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3867
3865
|
children: [
|
|
3868
3866
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3869
3867
|
className: "dkan-dataset-toolbar-button-label",
|
|
3870
|
-
children: conditions.length > 0 ? `Edit Filters` :
|
|
3868
|
+
children: conditions.length > 0 ? `Edit Filters` : "Filter Dataset"
|
|
3871
3869
|
}),
|
|
3872
3870
|
conditions.length > 0 && ` (${conditions.length})`
|
|
3873
3871
|
]
|
|
@@ -3875,7 +3873,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3875
3873
|
]
|
|
3876
3874
|
}),
|
|
3877
3875
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3878
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
3876
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
3879
3877
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
3880
3878
|
heading: "Filter Dataset",
|
|
3881
3879
|
isOpen: modalOpen,
|
|
@@ -3904,7 +3902,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3904
3902
|
className: "dkan-apply-dataset-filters-button ds-u-float--right ds-l-md-col--auto ds-l-col--auto",
|
|
3905
3903
|
onClick: submitConditions,
|
|
3906
3904
|
variation: "solid",
|
|
3907
|
-
children: `Apply ${conditionsReadyToSubmit(queryConditions).length ||
|
|
3905
|
+
children: `Apply ${conditionsReadyToSubmit(queryConditions).length || ""} filter${conditionsReadyToSubmit(queryConditions).length === 1 ? "" : "s"}`
|
|
3908
3906
|
})
|
|
3909
3907
|
]
|
|
3910
3908
|
})
|
|
@@ -4043,9 +4041,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
4043
4041
|
className: "ds-u-display--flex ds-u-align-items--start",
|
|
4044
4042
|
children: [
|
|
4045
4043
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
4046
|
-
onClick: ()=>setTableDensity(
|
|
4044
|
+
onClick: ()=>setTableDensity("expanded"),
|
|
4047
4045
|
"aria-label": "Row height, Expanded",
|
|
4048
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
4046
|
+
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" : ""}`,
|
|
4049
4047
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
4050
4048
|
className: "ds-u-display--block",
|
|
4051
4049
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -4064,9 +4062,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
4064
4062
|
})
|
|
4065
4063
|
}),
|
|
4066
4064
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
4067
|
-
onClick: ()=>setTableDensity(
|
|
4065
|
+
onClick: ()=>setTableDensity("normal"),
|
|
4068
4066
|
"aria-label": "Row height, Normal",
|
|
4069
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
4067
|
+
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" : ""}`,
|
|
4070
4068
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
4071
4069
|
className: "ds-u-display--block",
|
|
4072
4070
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -4085,9 +4083,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
4085
4083
|
})
|
|
4086
4084
|
}),
|
|
4087
4085
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
4088
|
-
onClick: ()=>setTableDensity(
|
|
4086
|
+
onClick: ()=>setTableDensity("compact"),
|
|
4089
4087
|
"aria-label": "Row height, Compact",
|
|
4090
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
4088
|
+
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 " : ""}`,
|
|
4091
4089
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
4092
4090
|
className: "ds-u-display--block",
|
|
4093
4091
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -4172,7 +4170,7 @@ const $85f8ff1ff89899c7$var$updateBrowserURL = (newConditions)=>{
|
|
|
4172
4170
|
encodeValuesOnly: true,
|
|
4173
4171
|
addQueryPrefix: true
|
|
4174
4172
|
});
|
|
4175
|
-
window.history.pushState({},
|
|
4173
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
4176
4174
|
};
|
|
4177
4175
|
const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, columns: columns, defaultColumnOrder: defaultColumnOrder, isModal: isModal, datasetTableControls: datasetTableControls, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility })=>{
|
|
4178
4176
|
const { limit: limit, offset: offset, count: count, conditions: conditions, setConditions: setConditions } = resource;
|
|
@@ -4258,7 +4256,7 @@ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, co
|
|
|
4258
4256
|
}, index)) : null,
|
|
4259
4257
|
hiddenColumns > 0 ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $c5b172e8d1a8197c$export$2e2bcd8739ae039), {
|
|
4260
4258
|
iconClass: "fa fa-columns",
|
|
4261
|
-
text: `${hiddenColumns} Column${hiddenColumns === 1 ?
|
|
4259
|
+
text: `${hiddenColumns} Column${hiddenColumns === 1 ? "" : "s"} Hidden`,
|
|
4262
4260
|
onClick: ()=>{
|
|
4263
4261
|
resetColumnVisibility();
|
|
4264
4262
|
}
|
|
@@ -4311,9 +4309,9 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
4311
4309
|
columnOrder
|
|
4312
4310
|
]);
|
|
4313
4311
|
const sortElement = (isSorted, onClickFn)=>{
|
|
4314
|
-
if (isSorted ===
|
|
4315
|
-
if (isSorted ===
|
|
4316
|
-
return
|
|
4312
|
+
if (isSorted === "asc") return "dc-c-sort--asc";
|
|
4313
|
+
if (isSorted === "desc") return "dc-c-sort--desc";
|
|
4314
|
+
return "dc-c-sort--default";
|
|
4317
4315
|
};
|
|
4318
4316
|
const filters = [];
|
|
4319
4317
|
const table = (0, $hgUW1$useReactTable)({
|
|
@@ -4325,7 +4323,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
4325
4323
|
columnVisibility: columnVisibility,
|
|
4326
4324
|
sorting: sorting
|
|
4327
4325
|
},
|
|
4328
|
-
columnResizeMode:
|
|
4326
|
+
columnResizeMode: "onChange",
|
|
4329
4327
|
onSortingChange: setSorting,
|
|
4330
4328
|
onColumnOrderChange: setColumnOrder,
|
|
4331
4329
|
onColumnVisibilityChange: setColumnVisibility,
|
|
@@ -4342,7 +4340,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
4342
4340
|
const defaultColumnOrder = (0, $hgUW1$useMemo)(()=>table_columns.map((column)=>column.accessorKey), []);
|
|
4343
4341
|
const tableWrapperWidth = ()=>{
|
|
4344
4342
|
if (dataTableWrapperElement.current) return dataTableWrapperElement.current.offsetWidth;
|
|
4345
|
-
return
|
|
4343
|
+
return "auto";
|
|
4346
4344
|
};
|
|
4347
4345
|
(0, $hgUW1$useEffect)(()=>{
|
|
4348
4346
|
setHighlightRow(null);
|
|
@@ -4563,7 +4561,7 @@ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, a
|
|
|
4563
4561
|
},
|
|
4564
4562
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4565
4563
|
name: accessor,
|
|
4566
|
-
value: filterValue ||
|
|
4564
|
+
value: filterValue || ""
|
|
4567
4565
|
});
|
|
4568
4566
|
}
|
|
4569
4567
|
const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true })=>{
|
|
@@ -4639,7 +4637,7 @@ const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage, pageTrail:
|
|
|
4639
4637
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4640
4638
|
children: currentPage
|
|
4641
4639
|
})
|
|
4642
|
-
}) :
|
|
4640
|
+
}) : ""
|
|
4643
4641
|
]
|
|
4644
4642
|
})
|
|
4645
4643
|
});
|
|
@@ -4696,11 +4694,11 @@ var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRigh
|
|
|
4696
4694
|
|
|
4697
4695
|
|
|
4698
4696
|
|
|
4699
|
-
const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder =
|
|
4697
|
+
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", {
|
|
4700
4698
|
className: "search-input-container",
|
|
4701
4699
|
children: [
|
|
4702
4700
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4703
|
-
className: `${showMagnifyingGlass ?
|
|
4701
|
+
className: `${showMagnifyingGlass ? "left-padding" : ""} ${showSearchButton ? "right-padding" : ""}`,
|
|
4704
4702
|
label: placeholder,
|
|
4705
4703
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4706
4704
|
placeholder: placeholder,
|
|
@@ -4715,7 +4713,7 @@ const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = 'Search
|
|
|
4715
4713
|
}),
|
|
4716
4714
|
showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
4717
4715
|
variation: "solid",
|
|
4718
|
-
className: onDark &&
|
|
4716
|
+
className: onDark && "on-dark",
|
|
4719
4717
|
onClick: onSubmit,
|
|
4720
4718
|
children: [
|
|
4721
4719
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4834,7 +4832,7 @@ const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: roo
|
|
|
4834
4832
|
url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4835
4833
|
addQueryPrefix: true
|
|
4836
4834
|
})}`,
|
|
4837
|
-
docExpansion:
|
|
4835
|
+
docExpansion: "list",
|
|
4838
4836
|
defaultModelsExpandDepth: -1,
|
|
4839
4837
|
plugins: [
|
|
4840
4838
|
(0, $hgUW1$SpanOpenAPIVersion),
|
|
@@ -4917,26 +4915,26 @@ var $026cb986f9fea2b1$export$2e2bcd8739ae039 = $026cb986f9fea2b1$var$PageNotFoun
|
|
|
4917
4915
|
|
|
4918
4916
|
|
|
4919
4917
|
const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4920
|
-
defaultSort:
|
|
4921
|
-
defaultOrder:
|
|
4922
|
-
}, pageTitle: pageTitle =
|
|
4918
|
+
defaultSort: "modified",
|
|
4919
|
+
defaultOrder: "desc"
|
|
4920
|
+
}, pageTitle: pageTitle = "What's New ", showLargeFileWarning: showLargeFileWarning = false, introText: introText = "", dataDictionaryLinks: dataDictionaryLinks = false })=>{
|
|
4923
4921
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4924
4922
|
const sortOptions = [
|
|
4925
4923
|
{
|
|
4926
|
-
label:
|
|
4927
|
-
value:
|
|
4924
|
+
label: "Newest",
|
|
4925
|
+
value: "newest"
|
|
4928
4926
|
},
|
|
4929
4927
|
{
|
|
4930
|
-
label:
|
|
4931
|
-
value:
|
|
4928
|
+
label: "Oldest",
|
|
4929
|
+
value: "oldest"
|
|
4932
4930
|
},
|
|
4933
4931
|
{
|
|
4934
|
-
label:
|
|
4935
|
-
value:
|
|
4932
|
+
label: "Title A-Z",
|
|
4933
|
+
value: "titleAZ"
|
|
4936
4934
|
},
|
|
4937
4935
|
{
|
|
4938
|
-
label:
|
|
4939
|
-
value:
|
|
4936
|
+
label: "Title Z-A",
|
|
4937
|
+
value: "titleZA"
|
|
4940
4938
|
}
|
|
4941
4939
|
];
|
|
4942
4940
|
const defaultSortBy = "";
|
|
@@ -4950,33 +4948,33 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4950
4948
|
endingNumber: 0
|
|
4951
4949
|
});
|
|
4952
4950
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4953
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4951
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
|
|
4954
4952
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4955
4953
|
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
4956
4954
|
const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
|
|
4957
4955
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4958
4956
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4959
4957
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4960
|
-
return sort ===
|
|
4958
|
+
return sort === "modified" ? sortOrder === "desc" ? "newest" : "oldest" : sortOrder === "desc" ? "titleZA" : "titleAZ";
|
|
4961
4959
|
});
|
|
4962
4960
|
const setSortOptions = (value)=>{
|
|
4963
4961
|
setSortDisplay(value);
|
|
4964
4962
|
switch(value){
|
|
4965
|
-
case
|
|
4966
|
-
setSort(
|
|
4967
|
-
setSortOrder(
|
|
4963
|
+
case "newest":
|
|
4964
|
+
setSort("modified");
|
|
4965
|
+
setSortOrder("desc");
|
|
4968
4966
|
break;
|
|
4969
|
-
case
|
|
4970
|
-
setSort(
|
|
4971
|
-
setSortOrder(
|
|
4967
|
+
case "oldest":
|
|
4968
|
+
setSort("modified");
|
|
4969
|
+
setSortOrder("asc");
|
|
4972
4970
|
break;
|
|
4973
|
-
case
|
|
4974
|
-
setSort(
|
|
4975
|
-
setSortOrder(
|
|
4971
|
+
case "titleAZ":
|
|
4972
|
+
setSort("title");
|
|
4973
|
+
setSortOrder("asc");
|
|
4976
4974
|
break;
|
|
4977
|
-
case
|
|
4978
|
-
setSort(
|
|
4979
|
-
setSortOrder(
|
|
4975
|
+
case "titleZA":
|
|
4976
|
+
setSort("title");
|
|
4977
|
+
setSortOrder("desc");
|
|
4980
4978
|
break;
|
|
4981
4979
|
}
|
|
4982
4980
|
};
|
|
@@ -4993,9 +4991,9 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4993
4991
|
}
|
|
4994
4992
|
let params = {
|
|
4995
4993
|
sort: sort ? sort : undefined,
|
|
4996
|
-
[
|
|
4994
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4997
4995
|
page: page !== 1 ? page : undefined,
|
|
4998
|
-
[
|
|
4996
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4999
4997
|
};
|
|
5000
4998
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
5001
4999
|
queryKey: [
|
|
@@ -5004,7 +5002,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5004
5002
|
],
|
|
5005
5003
|
queryFn: ()=>{
|
|
5006
5004
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
5007
|
-
arrayFormat:
|
|
5005
|
+
arrayFormat: "comma",
|
|
5008
5006
|
encode: false
|
|
5009
5007
|
})}`);
|
|
5010
5008
|
}
|
|
@@ -5020,7 +5018,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5020
5018
|
// Update browser URL with current search params
|
|
5021
5019
|
const params = buildSearchParams(true);
|
|
5022
5020
|
const url = new URL(window.location.href);
|
|
5023
|
-
window.history.pushState({},
|
|
5021
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${params}`);
|
|
5024
5022
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
5025
5023
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
5026
5024
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -5046,8 +5044,8 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5046
5044
|
]);
|
|
5047
5045
|
(0, $hgUW1$useEffect)(()=>{
|
|
5048
5046
|
// No results found
|
|
5049
|
-
if (noResults) setAnnouncementText(
|
|
5050
|
-
else if (!isPending && (!data || !data.data.results)) setAnnouncementText(
|
|
5047
|
+
if (noResults) setAnnouncementText("No results found.");
|
|
5048
|
+
else if (!isPending && (!data || !data.data.results)) setAnnouncementText("Could not connect to the API.");
|
|
5051
5049
|
else setAnnouncementText(`Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`);
|
|
5052
5050
|
}, [
|
|
5053
5051
|
data,
|
|
@@ -5120,7 +5118,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5120
5118
|
"Showing ",
|
|
5121
5119
|
currentResultNumbers.startingNumber,
|
|
5122
5120
|
" -",
|
|
5123
|
-
|
|
5121
|
+
" ",
|
|
5124
5122
|
currentResultNumbers.endingNumber,
|
|
5125
5123
|
" of ",
|
|
5126
5124
|
data.data.total,
|
|
@@ -5180,7 +5178,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5180
5178
|
},
|
|
5181
5179
|
renderHref: (page)=>{
|
|
5182
5180
|
const searchParams = buildSearchParams(false);
|
|
5183
|
-
const includeAnd = searchParams ?
|
|
5181
|
+
const includeAnd = searchParams ? "&" : "";
|
|
5184
5182
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
5185
5183
|
}
|
|
5186
5184
|
})
|
|
@@ -5212,12 +5210,12 @@ var $550bcc185f420ff5$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
5212
5210
|
|
|
5213
5211
|
const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
5214
5212
|
const [dataset, setDataset] = (0, $hgUW1$useState)({
|
|
5215
|
-
title:
|
|
5213
|
+
title: "",
|
|
5216
5214
|
distribution: [],
|
|
5217
|
-
error:
|
|
5218
|
-
description:
|
|
5219
|
-
identifier:
|
|
5220
|
-
modified:
|
|
5215
|
+
error: "",
|
|
5216
|
+
description: "",
|
|
5217
|
+
identifier: "",
|
|
5218
|
+
modified: ""
|
|
5221
5219
|
});
|
|
5222
5220
|
const [id, setId] = (0, $hgUW1$useState)(datasetId);
|
|
5223
5221
|
const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
|
|
@@ -5227,7 +5225,7 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
|
5227
5225
|
"metastore" + id
|
|
5228
5226
|
],
|
|
5229
5227
|
queryFn: ()=>{
|
|
5230
|
-
return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ?
|
|
5228
|
+
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)=>{
|
|
5231
5229
|
return {
|
|
5232
5230
|
title: dataset.title,
|
|
5233
5231
|
distribution: dataset.distribution,
|
|
@@ -5283,7 +5281,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5283
5281
|
// const [joins, setJoins] = useState()
|
|
5284
5282
|
const [properties, setProperties] = (0, $hgUW1$useState)(options.properties ? options.properties : undefined);
|
|
5285
5283
|
// Check drupalSettings for datastore_query_api
|
|
5286
|
-
const useDatasetAPI = typeof window !==
|
|
5284
|
+
const useDatasetAPI = typeof window !== "undefined" && window.drupalSettings?.datastore_query_api === true;
|
|
5287
5285
|
const datasetID = additionalParams.datasetID;
|
|
5288
5286
|
// Remove datasetID from params to avoid sending it to the API
|
|
5289
5287
|
const { datasetID: _, ...restAdditionalParams } = additionalParams;
|
|
@@ -5298,7 +5296,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5298
5296
|
...restAdditionalParams
|
|
5299
5297
|
};
|
|
5300
5298
|
params = (0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA);
|
|
5301
|
-
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` :
|
|
5299
|
+
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : "";
|
|
5302
5300
|
let enabled = false;
|
|
5303
5301
|
if (id) {
|
|
5304
5302
|
if (!requireConditions) enabled = true;
|
|
@@ -5380,65 +5378,65 @@ var $1d3d480a9cfaabe0$export$2e2bcd8739ae039 = $1d3d480a9cfaabe0$var$useDatastor
|
|
|
5380
5378
|
|
|
5381
5379
|
|
|
5382
5380
|
const $28f16f59778efa64$export$82b1b1d517e5388a = {
|
|
5383
|
-
|
|
5384
|
-
name:
|
|
5381
|
+
"R/P10Y": {
|
|
5382
|
+
name: "Decennial"
|
|
5385
5383
|
},
|
|
5386
|
-
|
|
5387
|
-
name:
|
|
5384
|
+
"R/P4Y": {
|
|
5385
|
+
name: "Quadrennial"
|
|
5388
5386
|
},
|
|
5389
|
-
|
|
5390
|
-
name:
|
|
5387
|
+
"R/P1Y": {
|
|
5388
|
+
name: "Annual"
|
|
5391
5389
|
},
|
|
5392
|
-
|
|
5393
|
-
name:
|
|
5390
|
+
"R/P2M": {
|
|
5391
|
+
name: "Bimonthly"
|
|
5394
5392
|
},
|
|
5395
|
-
|
|
5396
|
-
name:
|
|
5393
|
+
"R/P3.5D": {
|
|
5394
|
+
name: "Semiweekly"
|
|
5397
5395
|
},
|
|
5398
|
-
|
|
5399
|
-
name:
|
|
5396
|
+
"R/P1D": {
|
|
5397
|
+
name: "Daily"
|
|
5400
5398
|
},
|
|
5401
|
-
|
|
5402
|
-
name:
|
|
5399
|
+
"R/P2W": {
|
|
5400
|
+
name: "Biweekly"
|
|
5403
5401
|
},
|
|
5404
|
-
|
|
5405
|
-
name:
|
|
5402
|
+
"R/P6M": {
|
|
5403
|
+
name: "Semiannual"
|
|
5406
5404
|
},
|
|
5407
|
-
|
|
5408
|
-
name:
|
|
5405
|
+
"R/P2Y": {
|
|
5406
|
+
name: "Biennial"
|
|
5409
5407
|
},
|
|
5410
|
-
|
|
5411
|
-
name:
|
|
5408
|
+
"R/P3Y": {
|
|
5409
|
+
name: "Triennial"
|
|
5412
5410
|
},
|
|
5413
|
-
|
|
5414
|
-
name:
|
|
5411
|
+
"R/P0.33W": {
|
|
5412
|
+
name: "Three times a week"
|
|
5415
5413
|
},
|
|
5416
|
-
|
|
5417
|
-
name:
|
|
5414
|
+
"R/P0.33M": {
|
|
5415
|
+
name: "Three times a month"
|
|
5418
5416
|
},
|
|
5419
|
-
|
|
5420
|
-
name:
|
|
5417
|
+
"R/PT1S": {
|
|
5418
|
+
name: "Continuously updated"
|
|
5421
5419
|
},
|
|
5422
|
-
|
|
5423
|
-
name:
|
|
5420
|
+
"R/P1M": {
|
|
5421
|
+
name: "Monthly"
|
|
5424
5422
|
},
|
|
5425
|
-
|
|
5426
|
-
name:
|
|
5423
|
+
"R/P3M": {
|
|
5424
|
+
name: "Quarterly"
|
|
5427
5425
|
},
|
|
5428
|
-
|
|
5429
|
-
name:
|
|
5426
|
+
"R/P0.5M": {
|
|
5427
|
+
name: "Semimonthly"
|
|
5430
5428
|
},
|
|
5431
|
-
|
|
5432
|
-
name:
|
|
5429
|
+
"R/P4M": {
|
|
5430
|
+
name: "Three times a year"
|
|
5433
5431
|
},
|
|
5434
|
-
|
|
5435
|
-
name:
|
|
5432
|
+
"R/P1W": {
|
|
5433
|
+
name: "Weekly"
|
|
5436
5434
|
},
|
|
5437
|
-
|
|
5438
|
-
name:
|
|
5435
|
+
"R/PT1H": {
|
|
5436
|
+
name: "Hourly"
|
|
5439
5437
|
},
|
|
5440
5438
|
irregular: {
|
|
5441
|
-
name:
|
|
5439
|
+
name: "Irregular"
|
|
5442
5440
|
}
|
|
5443
5441
|
};
|
|
5444
5442
|
|
|
@@ -5447,7 +5445,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5447
5445
|
modified: (data)=>{
|
|
5448
5446
|
return [
|
|
5449
5447
|
{
|
|
5450
|
-
label:
|
|
5448
|
+
label: "Modified",
|
|
5451
5449
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5452
5450
|
date: data
|
|
5453
5451
|
})
|
|
@@ -5457,7 +5455,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5457
5455
|
issued: (data)=>{
|
|
5458
5456
|
return [
|
|
5459
5457
|
{
|
|
5460
|
-
label:
|
|
5458
|
+
label: "Issued",
|
|
5461
5459
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5462
5460
|
date: data
|
|
5463
5461
|
})
|
|
@@ -5467,7 +5465,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5467
5465
|
accrualPeriodicity: (data)=>{
|
|
5468
5466
|
return [
|
|
5469
5467
|
{
|
|
5470
|
-
label:
|
|
5468
|
+
label: "Frequency",
|
|
5471
5469
|
value: (0, $28f16f59778efa64$export$82b1b1d517e5388a)[data].name
|
|
5472
5470
|
}
|
|
5473
5471
|
];
|
|
@@ -5475,7 +5473,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5475
5473
|
publisher: (data)=>{
|
|
5476
5474
|
if (data.data && data.data.name) return [
|
|
5477
5475
|
{
|
|
5478
|
-
label:
|
|
5476
|
+
label: "Publisher",
|
|
5479
5477
|
value: data.data.name
|
|
5480
5478
|
}
|
|
5481
5479
|
];
|
|
@@ -5484,7 +5482,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5484
5482
|
identifier: (data)=>{
|
|
5485
5483
|
return [
|
|
5486
5484
|
{
|
|
5487
|
-
label:
|
|
5485
|
+
label: "Identifier",
|
|
5488
5486
|
value: data
|
|
5489
5487
|
}
|
|
5490
5488
|
];
|
|
@@ -5492,11 +5490,11 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5492
5490
|
contactPoint: (data)=>{
|
|
5493
5491
|
let rows = [];
|
|
5494
5492
|
if (data.fn) rows.push({
|
|
5495
|
-
label:
|
|
5493
|
+
label: "Contact",
|
|
5496
5494
|
value: data.fn
|
|
5497
5495
|
});
|
|
5498
5496
|
if (data.hasEmail) rows.push({
|
|
5499
|
-
label:
|
|
5497
|
+
label: "Contact Email",
|
|
5500
5498
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5501
5499
|
href: data.hasEmail.includes("mailto:") ? data.hasEmail : `mailto:${data.hasEmail}`,
|
|
5502
5500
|
children: data.hasEmail.replace("mailto:", "")
|
|
@@ -5507,7 +5505,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5507
5505
|
bureauCode: (data)=>{
|
|
5508
5506
|
if (data.length) return [
|
|
5509
5507
|
{
|
|
5510
|
-
label:
|
|
5508
|
+
label: "Bureau Code",
|
|
5511
5509
|
value: data[0]
|
|
5512
5510
|
}
|
|
5513
5511
|
];
|
|
@@ -5515,7 +5513,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5515
5513
|
programCode: (data)=>{
|
|
5516
5514
|
if (data.length) return [
|
|
5517
5515
|
{
|
|
5518
|
-
label:
|
|
5516
|
+
label: "Program Code",
|
|
5519
5517
|
value: data[0]
|
|
5520
5518
|
}
|
|
5521
5519
|
];
|
|
@@ -5523,13 +5521,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5523
5521
|
theme: (data)=>{
|
|
5524
5522
|
return [
|
|
5525
5523
|
{
|
|
5526
|
-
label:
|
|
5524
|
+
label: "Category",
|
|
5527
5525
|
value: data.map((theme)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5528
5526
|
to: `/datasets?theme[]=${theme.data}`,
|
|
5529
5527
|
children: theme.data
|
|
5530
5528
|
}, theme.data)).reduce((prev, curr)=>[
|
|
5531
5529
|
prev,
|
|
5532
|
-
|
|
5530
|
+
", ",
|
|
5533
5531
|
curr
|
|
5534
5532
|
])
|
|
5535
5533
|
}
|
|
@@ -5538,13 +5536,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5538
5536
|
keyword: (data)=>{
|
|
5539
5537
|
return [
|
|
5540
5538
|
{
|
|
5541
|
-
label:
|
|
5539
|
+
label: "Tags",
|
|
5542
5540
|
value: data.map((keyword)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5543
5541
|
to: `/datasets?keyword[]=${keyword.data}`,
|
|
5544
5542
|
children: keyword.data
|
|
5545
5543
|
}, keyword.data)).reduce((prev, curr)=>[
|
|
5546
5544
|
prev,
|
|
5547
|
-
|
|
5545
|
+
", ",
|
|
5548
5546
|
curr
|
|
5549
5547
|
])
|
|
5550
5548
|
}
|
|
@@ -5553,7 +5551,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5553
5551
|
license: (data)=>{
|
|
5554
5552
|
return [
|
|
5555
5553
|
{
|
|
5556
|
-
label:
|
|
5554
|
+
label: "License",
|
|
5557
5555
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5558
5556
|
href: data,
|
|
5559
5557
|
children: data
|
|
@@ -5564,7 +5562,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5564
5562
|
accessLevel: (data)=>{
|
|
5565
5563
|
return [
|
|
5566
5564
|
{
|
|
5567
|
-
label:
|
|
5565
|
+
label: "Public Access Level",
|
|
5568
5566
|
value: data
|
|
5569
5567
|
}
|
|
5570
5568
|
];
|
|
@@ -5572,7 +5570,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5572
5570
|
temporal: (data)=>{
|
|
5573
5571
|
return [
|
|
5574
5572
|
{
|
|
5575
|
-
label:
|
|
5573
|
+
label: "Temporal Coverage",
|
|
5576
5574
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5577
5575
|
className: "dc-c-word-break--all",
|
|
5578
5576
|
children: data
|
|
@@ -5583,7 +5581,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5583
5581
|
spatial: (data)=>{
|
|
5584
5582
|
return [
|
|
5585
5583
|
{
|
|
5586
|
-
label:
|
|
5584
|
+
label: "Spacial/Geographical Coverage",
|
|
5587
5585
|
value: data
|
|
5588
5586
|
}
|
|
5589
5587
|
];
|
|
@@ -5591,7 +5589,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5591
5589
|
references: (data)=>{
|
|
5592
5590
|
return [
|
|
5593
5591
|
{
|
|
5594
|
-
label:
|
|
5592
|
+
label: "Related Documents",
|
|
5595
5593
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
5596
5594
|
className: "ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0",
|
|
5597
5595
|
children: data.map((item)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -5629,7 +5627,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ distribution: distribution,
|
|
|
5629
5627
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
5630
5628
|
const { data: resource } = (0, $hgUW1$useQuery)({
|
|
5631
5629
|
queryKey: [
|
|
5632
|
-
|
|
5630
|
+
"resource-information",
|
|
5633
5631
|
distribution.identifier
|
|
5634
5632
|
],
|
|
5635
5633
|
queryFn: ()=>(0, $hgUW1$axios).get(`${rootUrl}/datastore/query/${distribution.identifier}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({
|
|
@@ -5656,7 +5654,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ distribution: distribution,
|
|
|
5656
5654
|
}),
|
|
5657
5655
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5658
5656
|
className: "ds-u-font-weight--bold",
|
|
5659
|
-
children: resource?.count ? Number(resource.count).toLocaleString() :
|
|
5657
|
+
children: resource?.count ? Number(resource.count).toLocaleString() : ""
|
|
5660
5658
|
})
|
|
5661
5659
|
]
|
|
5662
5660
|
}),
|
|
@@ -5724,8 +5722,8 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5724
5722
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
5725
5723
|
href: dist.data.downloadURL,
|
|
5726
5724
|
style: {
|
|
5727
|
-
order: sm ?
|
|
5728
|
-
width: sm ?
|
|
5725
|
+
order: sm ? "1" : "0",
|
|
5726
|
+
width: sm ? "100%" : "auto"
|
|
5729
5727
|
},
|
|
5730
5728
|
"aria-label": `Download ${dist.data.title || title} ${fileFormat}`,
|
|
5731
5729
|
className: "ds-c-button",
|
|
@@ -5738,7 +5736,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5738
5736
|
})
|
|
5739
5737
|
}),
|
|
5740
5738
|
dist.data.description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5741
|
-
className:
|
|
5739
|
+
className: "ds-u-measure--wide ds-u-margin-bottom--7",
|
|
5742
5740
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5743
5741
|
className: "dc-c-metadata-description ds-u-margin--0",
|
|
5744
5742
|
dangerouslySetInnerHTML: {
|
|
@@ -5812,7 +5810,7 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5812
5810
|
const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
|
|
5813
5811
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
5814
5812
|
children: [
|
|
5815
|
-
md ?
|
|
5813
|
+
md ? "" : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5816
5814
|
component: "th",
|
|
5817
5815
|
className: "ds-u-font-weight--bold",
|
|
5818
5816
|
children: [
|
|
@@ -5824,8 +5822,8 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5824
5822
|
ariaLabel: r.label,
|
|
5825
5823
|
// @ts-ignore
|
|
5826
5824
|
style: {
|
|
5827
|
-
border:
|
|
5828
|
-
background:
|
|
5825
|
+
border: "none",
|
|
5826
|
+
background: "none"
|
|
5829
5827
|
},
|
|
5830
5828
|
maxWidth: "400px",
|
|
5831
5829
|
placement: "auto",
|
|
@@ -5884,10 +5882,10 @@ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: ap
|
|
|
5884
5882
|
href: apiUrl,
|
|
5885
5883
|
children: [
|
|
5886
5884
|
"View API",
|
|
5887
|
-
|
|
5885
|
+
" ",
|
|
5888
5886
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5889
5887
|
style: {
|
|
5890
|
-
whiteSpace:
|
|
5888
|
+
whiteSpace: "nowrap"
|
|
5891
5889
|
},
|
|
5892
5890
|
children: [
|
|
5893
5891
|
"specification ",
|
|
@@ -5933,14 +5931,14 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5933
5931
|
maxWidth: 544
|
|
5934
5932
|
});
|
|
5935
5933
|
const sortElement = (isSorted)=>{
|
|
5936
|
-
if (isSorted ===
|
|
5937
|
-
if (isSorted ===
|
|
5938
|
-
return
|
|
5934
|
+
if (isSorted === "asc") return "dc-c-sort--asc";
|
|
5935
|
+
if (isSorted === "desc") return "dc-c-sort--desc";
|
|
5936
|
+
return "dc-c-sort--default";
|
|
5939
5937
|
};
|
|
5940
5938
|
const table = (0, $hgUW1$useReactTable)({
|
|
5941
5939
|
data: tableData,
|
|
5942
5940
|
columns: tableColumns,
|
|
5943
|
-
columnResizeMode:
|
|
5941
|
+
columnResizeMode: "onChange",
|
|
5944
5942
|
getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
|
|
5945
5943
|
getFilteredRowModel: (0, $hgUW1$getFilteredRowModel)(),
|
|
5946
5944
|
getPaginationRowModel: (0, $hgUW1$getPaginationRowModel)(),
|
|
@@ -5959,49 +5957,49 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5959
5957
|
});
|
|
5960
5958
|
const sortOptions = [
|
|
5961
5959
|
{
|
|
5962
|
-
value:
|
|
5963
|
-
label:
|
|
5960
|
+
value: "default",
|
|
5961
|
+
label: "No Sort"
|
|
5964
5962
|
},
|
|
5965
5963
|
{
|
|
5966
|
-
value:
|
|
5967
|
-
label:
|
|
5964
|
+
value: "titleasc",
|
|
5965
|
+
label: "Title A-Z"
|
|
5968
5966
|
},
|
|
5969
5967
|
{
|
|
5970
|
-
value:
|
|
5971
|
-
label:
|
|
5968
|
+
value: "titledesc",
|
|
5969
|
+
label: "Title Z-A"
|
|
5972
5970
|
},
|
|
5973
5971
|
{
|
|
5974
|
-
value:
|
|
5975
|
-
label:
|
|
5972
|
+
value: "typeasc",
|
|
5973
|
+
label: "Type A-Z"
|
|
5976
5974
|
},
|
|
5977
5975
|
{
|
|
5978
|
-
value:
|
|
5979
|
-
label:
|
|
5976
|
+
value: "typedesc",
|
|
5977
|
+
label: "Type Z-A"
|
|
5980
5978
|
}
|
|
5981
5979
|
];
|
|
5982
5980
|
const sortStatesLookup = {
|
|
5983
5981
|
default: [],
|
|
5984
5982
|
titleasc: [
|
|
5985
5983
|
{
|
|
5986
|
-
id:
|
|
5984
|
+
id: "titleResizable",
|
|
5987
5985
|
desc: false
|
|
5988
5986
|
}
|
|
5989
5987
|
],
|
|
5990
5988
|
titledesc: [
|
|
5991
5989
|
{
|
|
5992
|
-
id:
|
|
5990
|
+
id: "titleResizable",
|
|
5993
5991
|
desc: true
|
|
5994
5992
|
}
|
|
5995
5993
|
],
|
|
5996
5994
|
typeasc: [
|
|
5997
5995
|
{
|
|
5998
|
-
id:
|
|
5996
|
+
id: "type",
|
|
5999
5997
|
desc: false
|
|
6000
5998
|
}
|
|
6001
5999
|
],
|
|
6002
6000
|
typedesc: [
|
|
6003
6001
|
{
|
|
6004
|
-
id:
|
|
6002
|
+
id: "type",
|
|
6005
6003
|
desc: true
|
|
6006
6004
|
}
|
|
6007
6005
|
]
|
|
@@ -6029,7 +6027,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
6029
6027
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
6030
6028
|
className: "dc-c-datatable",
|
|
6031
6029
|
style: {
|
|
6032
|
-
width:
|
|
6030
|
+
width: "100%"
|
|
6033
6031
|
},
|
|
6034
6032
|
stackable: true,
|
|
6035
6033
|
children: [
|
|
@@ -6041,16 +6039,16 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
6041
6039
|
table: table,
|
|
6042
6040
|
header: header,
|
|
6043
6041
|
sortElement: sortElement,
|
|
6044
|
-
id:
|
|
6042
|
+
id: "dataDictionary_" + header.id
|
|
6045
6043
|
}, header.id + "_resize") : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
6046
6044
|
key: header.id,
|
|
6047
6045
|
className: `ds-u-border-y--2 ds-u-border--dark ds-u-border-x--0`,
|
|
6048
|
-
id:
|
|
6046
|
+
id: "dataDictionary_" + header.id,
|
|
6049
6047
|
children: [
|
|
6050
6048
|
(0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext()),
|
|
6051
|
-
header.id ===
|
|
6049
|
+
header.id === "type" && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
6052
6050
|
onClick: header.column.getToggleSortingHandler(),
|
|
6053
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
6051
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : "",
|
|
6054
6052
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
6055
6053
|
})
|
|
6056
6054
|
]
|
|
@@ -6065,12 +6063,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
6065
6063
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6066
6064
|
key: cell.id,
|
|
6067
6065
|
style: {
|
|
6068
|
-
maxWidth: mobile ?
|
|
6069
|
-
whiteSpace: cell.column.id === "description" ?
|
|
6066
|
+
maxWidth: mobile ? "100%" : cell.column.getSize(),
|
|
6067
|
+
whiteSpace: cell.column.id === "description" ? "pre-wrap" : "normal"
|
|
6070
6068
|
},
|
|
6071
|
-
className: `${cell.column.id ===
|
|
6072
|
-
headers:
|
|
6073
|
-
stackedTitle: cell.column.id ===
|
|
6069
|
+
className: `${cell.column.id === "titleResizable" ? "ds-u-word-break" : ""}`,
|
|
6070
|
+
headers: "dataDictionary_" + cell.column.id,
|
|
6071
|
+
stackedTitle: cell.column.id === "titleResizable" ? "Title" : cell.column.columnDef.header,
|
|
6074
6072
|
children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
6075
6073
|
});
|
|
6076
6074
|
})
|
|
@@ -6093,7 +6091,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
6093
6091
|
table.setPageIndex(page - 1);
|
|
6094
6092
|
},
|
|
6095
6093
|
renderHref: (page)=>`/page=${page}`
|
|
6096
|
-
}) :
|
|
6094
|
+
}) : ""
|
|
6097
6095
|
]
|
|
6098
6096
|
});
|
|
6099
6097
|
};
|
|
@@ -6103,17 +6101,17 @@ var $6765a74df807d015$export$2e2bcd8739ae039 = $6765a74df807d015$var$DataDiction
|
|
|
6103
6101
|
const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
|
|
6104
6102
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
6105
6103
|
const tableColumns = [
|
|
6106
|
-
columnHelper.accessor(
|
|
6107
|
-
header:
|
|
6104
|
+
columnHelper.accessor("name", {
|
|
6105
|
+
header: "Name"
|
|
6108
6106
|
}),
|
|
6109
|
-
columnHelper.accessor(
|
|
6110
|
-
header:
|
|
6107
|
+
columnHelper.accessor("title", {
|
|
6108
|
+
header: "Title"
|
|
6111
6109
|
}),
|
|
6112
|
-
columnHelper.accessor(
|
|
6113
|
-
header:
|
|
6110
|
+
columnHelper.accessor("type", {
|
|
6111
|
+
header: "Type"
|
|
6114
6112
|
}),
|
|
6115
|
-
columnHelper.accessor(
|
|
6116
|
-
header:
|
|
6113
|
+
columnHelper.accessor("format", {
|
|
6114
|
+
header: "Format"
|
|
6117
6115
|
})
|
|
6118
6116
|
];
|
|
6119
6117
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6765a74df807d015$export$2e2bcd8739ae039), {
|
|
@@ -6157,7 +6155,7 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6157
6155
|
});
|
|
6158
6156
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
6159
6157
|
const tableColumns = [
|
|
6160
|
-
columnHelper.accessor(
|
|
6158
|
+
columnHelper.accessor("titleResizable", {
|
|
6161
6159
|
header: ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6162
6160
|
className: "dc-c-tooltip-width-override",
|
|
6163
6161
|
children: [
|
|
@@ -6166,8 +6164,8 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6166
6164
|
title: "Title represents the column headers of the data file",
|
|
6167
6165
|
// @ts-ignore
|
|
6168
6166
|
style: {
|
|
6169
|
-
border:
|
|
6170
|
-
background:
|
|
6167
|
+
border: "none",
|
|
6168
|
+
background: "none"
|
|
6171
6169
|
},
|
|
6172
6170
|
maxWidth: "400px",
|
|
6173
6171
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
|
|
@@ -6177,48 +6175,48 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6177
6175
|
size: 300,
|
|
6178
6176
|
minSize: 132
|
|
6179
6177
|
}),
|
|
6180
|
-
columnHelper.accessor(
|
|
6181
|
-
header:
|
|
6178
|
+
columnHelper.accessor("description", {
|
|
6179
|
+
header: "Description",
|
|
6182
6180
|
minSize: 600
|
|
6183
6181
|
}),
|
|
6184
|
-
columnHelper.accessor(
|
|
6185
|
-
header:
|
|
6182
|
+
columnHelper.accessor("type", {
|
|
6183
|
+
header: "Type",
|
|
6186
6184
|
size: 150,
|
|
6187
6185
|
enableResizing: false
|
|
6188
6186
|
})
|
|
6189
6187
|
];
|
|
6190
6188
|
const typeOptions = [
|
|
6191
6189
|
{
|
|
6192
|
-
value:
|
|
6193
|
-
label:
|
|
6190
|
+
value: "all",
|
|
6191
|
+
label: "All Types"
|
|
6194
6192
|
},
|
|
6195
6193
|
{
|
|
6196
|
-
value:
|
|
6197
|
-
label:
|
|
6194
|
+
value: "string",
|
|
6195
|
+
label: "String"
|
|
6198
6196
|
},
|
|
6199
6197
|
{
|
|
6200
|
-
value:
|
|
6201
|
-
label:
|
|
6198
|
+
value: "date",
|
|
6199
|
+
label: "Date"
|
|
6202
6200
|
},
|
|
6203
6201
|
{
|
|
6204
|
-
value:
|
|
6205
|
-
label:
|
|
6202
|
+
value: "datetime",
|
|
6203
|
+
label: "Datetime"
|
|
6206
6204
|
},
|
|
6207
6205
|
{
|
|
6208
|
-
value:
|
|
6209
|
-
label:
|
|
6206
|
+
value: "year",
|
|
6207
|
+
label: "Year"
|
|
6210
6208
|
},
|
|
6211
6209
|
{
|
|
6212
|
-
value:
|
|
6213
|
-
label:
|
|
6210
|
+
value: "integer",
|
|
6211
|
+
label: "Integer"
|
|
6214
6212
|
},
|
|
6215
6213
|
{
|
|
6216
|
-
value:
|
|
6217
|
-
label:
|
|
6214
|
+
value: "number",
|
|
6215
|
+
label: "Number"
|
|
6218
6216
|
},
|
|
6219
6217
|
{
|
|
6220
|
-
value:
|
|
6221
|
-
label:
|
|
6218
|
+
value: "boolean",
|
|
6219
|
+
label: "Boolean"
|
|
6222
6220
|
}
|
|
6223
6221
|
];
|
|
6224
6222
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -6325,7 +6323,7 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
|
|
|
6325
6323
|
href: datasetDictionaryEndpoint + "/csv",
|
|
6326
6324
|
className: "ds-c-button",
|
|
6327
6325
|
style: {
|
|
6328
|
-
width:
|
|
6326
|
+
width: "100%"
|
|
6329
6327
|
},
|
|
6330
6328
|
children: [
|
|
6331
6329
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
@@ -6382,7 +6380,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6382
6380
|
const [description, setDescription] = (0, $hgUW1$useState)("");
|
|
6383
6381
|
if (!distribution && !dataset?.identifier) return null;
|
|
6384
6382
|
(0, $hgUW1$useEffect)(()=>{
|
|
6385
|
-
let newDescription =
|
|
6383
|
+
let newDescription = "";
|
|
6386
6384
|
if (customDescription) newDescription = customDescription(dataset, distribution, resource);
|
|
6387
6385
|
else {
|
|
6388
6386
|
if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
|
|
@@ -6397,7 +6395,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6397
6395
|
customDescription
|
|
6398
6396
|
]);
|
|
6399
6397
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6400
|
-
className:
|
|
6398
|
+
className: "ds-u-measure--wide ds-u-margin-bottom--7",
|
|
6401
6399
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6402
6400
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
6403
6401
|
children: typeof description === "string" ? /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6421,7 +6419,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
6421
6419
|
],
|
|
6422
6420
|
queryFn: ()=>{
|
|
6423
6421
|
return fetch(`${dataDictionaryUrl}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA), {
|
|
6424
|
-
arrayFormat:
|
|
6422
|
+
arrayFormat: "comma",
|
|
6425
6423
|
encode: false
|
|
6426
6424
|
})}`).then((res)=>res.json());
|
|
6427
6425
|
}
|
|
@@ -6440,7 +6438,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6440
6438
|
conditions: []
|
|
6441
6439
|
};
|
|
6442
6440
|
const { dataset: dataset, isPending: isPending } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
6443
|
-
const title = dataset.title ? dataset.title :
|
|
6441
|
+
const title = dataset.title ? dataset.title : "";
|
|
6444
6442
|
const metadataMapping = {
|
|
6445
6443
|
...(0, $6da0396069e23175$export$bc27cf7ecf44639d),
|
|
6446
6444
|
...customMetadataMapping
|
|
@@ -6448,7 +6446,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6448
6446
|
let distribution = {};
|
|
6449
6447
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
6450
6448
|
if (distributions.length) distribution = distributions[0];
|
|
6451
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
6449
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
6452
6450
|
...options,
|
|
6453
6451
|
limit: defaultPageSize
|
|
6454
6452
|
}, {
|
|
@@ -6462,7 +6460,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6462
6460
|
}) : null;
|
|
6463
6461
|
(0, $hgUW1$useEffect)(()=>{
|
|
6464
6462
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6465
|
-
if (localFileFormat ===
|
|
6463
|
+
if (localFileFormat === "csv") resource.setResource(distribution.identifier);
|
|
6466
6464
|
}, [
|
|
6467
6465
|
distribution
|
|
6468
6466
|
]);
|
|
@@ -6517,26 +6515,26 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6517
6515
|
distribution,
|
|
6518
6516
|
window.location.hash
|
|
6519
6517
|
]);
|
|
6520
|
-
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType ===
|
|
6518
|
+
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === "application/vnd.tableschema+json" || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
6521
6519
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6522
6520
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
6523
6521
|
content: notFoundContent,
|
|
6524
6522
|
siteUrl: rootUrl
|
|
6525
6523
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6526
|
-
className:
|
|
6524
|
+
className: "ds-l-container",
|
|
6527
6525
|
children: [
|
|
6528
6526
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6529
|
-
className:
|
|
6527
|
+
className: "ds-l-row",
|
|
6530
6528
|
children: [
|
|
6531
6529
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6532
|
-
className:
|
|
6530
|
+
className: "ds-l-md-col--9",
|
|
6533
6531
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
6534
6532
|
className: "ds-text-heading--3xl",
|
|
6535
6533
|
children: title
|
|
6536
6534
|
})
|
|
6537
6535
|
}),
|
|
6538
6536
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6539
|
-
className:
|
|
6537
|
+
className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
|
|
6540
6538
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
6541
6539
|
className: "ds-u-margin--0",
|
|
6542
6540
|
children: [
|
|
@@ -6548,7 +6546,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6548
6546
|
})
|
|
6549
6547
|
}),
|
|
6550
6548
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6551
|
-
className:
|
|
6549
|
+
className: "ds-l-md-col--9",
|
|
6552
6550
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
6553
6551
|
distribution: distribution,
|
|
6554
6552
|
dataset: dataset,
|
|
@@ -6560,9 +6558,9 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6560
6558
|
]
|
|
6561
6559
|
}),
|
|
6562
6560
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6563
|
-
className:
|
|
6561
|
+
className: "ds-l-row",
|
|
6564
6562
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6565
|
-
className:
|
|
6563
|
+
className: "ds-l-md-col--12 dc-dataset",
|
|
6566
6564
|
children: !isPending && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tabs), {
|
|
6567
6565
|
onChange: (selectedId, prevSelectedId)=>{
|
|
6568
6566
|
setSelectedTab(selectedId);
|
|
@@ -6570,7 +6568,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6570
6568
|
selectedId: selectedTab,
|
|
6571
6569
|
children: [
|
|
6572
6570
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6573
|
-
id:
|
|
6571
|
+
id: "data-table",
|
|
6574
6572
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6575
6573
|
className: "ds-u-color--primary",
|
|
6576
6574
|
children: [
|
|
@@ -6580,7 +6578,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6580
6578
|
"Data Table"
|
|
6581
6579
|
]
|
|
6582
6580
|
}),
|
|
6583
|
-
className: borderlessTabs ?
|
|
6581
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6584
6582
|
children: (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
6585
6583
|
value: {
|
|
6586
6584
|
id: id,
|
|
@@ -6597,7 +6595,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6597
6595
|
})
|
|
6598
6596
|
}),
|
|
6599
6597
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6600
|
-
id:
|
|
6598
|
+
id: "overview",
|
|
6601
6599
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6602
6600
|
className: "ds-u-color--primary",
|
|
6603
6601
|
children: [
|
|
@@ -6607,7 +6605,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6607
6605
|
"Overview"
|
|
6608
6606
|
]
|
|
6609
6607
|
}),
|
|
6610
|
-
className: borderlessTabs ?
|
|
6608
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6611
6609
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
|
|
6612
6610
|
resource: resource,
|
|
6613
6611
|
dataset: dataset,
|
|
@@ -6617,7 +6615,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6617
6615
|
})
|
|
6618
6616
|
}),
|
|
6619
6617
|
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6620
|
-
id:
|
|
6618
|
+
id: "data-dictionary",
|
|
6621
6619
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6622
6620
|
className: "ds-u-color--primary",
|
|
6623
6621
|
children: [
|
|
@@ -6627,7 +6625,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6627
6625
|
"Data Dictionary"
|
|
6628
6626
|
]
|
|
6629
6627
|
}),
|
|
6630
|
-
className: borderlessTabs ?
|
|
6628
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6631
6629
|
children: displayDataDictionaryTab ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
6632
6630
|
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
6633
6631
|
datasetDictionaryEndpoint: distribution.data.describedBy,
|
|
@@ -6638,7 +6636,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6638
6636
|
})
|
|
6639
6637
|
}),
|
|
6640
6638
|
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6641
|
-
id:
|
|
6639
|
+
id: "api",
|
|
6642
6640
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6643
6641
|
className: "ds-u-color--primary",
|
|
6644
6642
|
children: [
|
|
@@ -6648,7 +6646,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6648
6646
|
"API"
|
|
6649
6647
|
]
|
|
6650
6648
|
}),
|
|
6651
|
-
className: borderlessTabs ?
|
|
6649
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6652
6650
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
|
|
6653
6651
|
id: id,
|
|
6654
6652
|
rootUrl: rootUrl,
|
|
@@ -6685,13 +6683,13 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6685
6683
|
});
|
|
6686
6684
|
const menu = (0, $hgUW1$useRef)(null);
|
|
6687
6685
|
function closeMobileMenu() {
|
|
6688
|
-
const mobileMenuButtonElement = document.querySelector(
|
|
6686
|
+
const mobileMenuButtonElement = document.querySelector(".dkan-c-mobile-menu-button");
|
|
6689
6687
|
if (!mobileMenuButtonElement) return;
|
|
6690
6688
|
mobileMenuButtonElement.focus();
|
|
6691
6689
|
}
|
|
6692
6690
|
// Close mobile menu with escape.
|
|
6693
6691
|
function handleMenuClose(event) {
|
|
6694
|
-
if (event.key ===
|
|
6692
|
+
if (event.key === "Escape" && mobileMenuOpen) setMobileMenuOpen(false);
|
|
6695
6693
|
}
|
|
6696
6694
|
function handleClick(event) {
|
|
6697
6695
|
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
@@ -6726,7 +6724,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6726
6724
|
const focusableEls = getFocusableElements(menu.current).selectors.visible;
|
|
6727
6725
|
const firstEl = focusableEls[0];
|
|
6728
6726
|
const lastEl = focusableEls[focusableEls.length - 1];
|
|
6729
|
-
if (event.key ===
|
|
6727
|
+
if (event.key === "Tab") {
|
|
6730
6728
|
if (event.shiftKey && document.activeElement === firstEl) {
|
|
6731
6729
|
lastEl?.focus();
|
|
6732
6730
|
event.preventDefault();
|
|
@@ -6738,15 +6736,15 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6738
6736
|
}
|
|
6739
6737
|
};
|
|
6740
6738
|
(0, $hgUW1$useEffect)(()=>{
|
|
6741
|
-
document.addEventListener(
|
|
6742
|
-
document.addEventListener(
|
|
6739
|
+
document.addEventListener("keyup", handleMenuClose);
|
|
6740
|
+
document.addEventListener("mousedown", handleClick);
|
|
6743
6741
|
if (mobileMenuOpen) handleFocusIn();
|
|
6744
6742
|
else closeMobileMenu();
|
|
6745
|
-
if (menu.current) menu.current.addEventListener(
|
|
6743
|
+
if (menu.current) menu.current.addEventListener("keydown", (evt)=>trapFocus(evt));
|
|
6746
6744
|
return ()=>{
|
|
6747
|
-
document.removeEventListener(
|
|
6748
|
-
document.addEventListener(
|
|
6749
|
-
if (menu.current) menu.current.removeEventListener(
|
|
6745
|
+
document.removeEventListener("keyup", handleMenuClose);
|
|
6746
|
+
document.addEventListener("mousedown", handleClick);
|
|
6747
|
+
if (menu.current) menu.current.removeEventListener("keydown", trapFocus);
|
|
6750
6748
|
};
|
|
6751
6749
|
}, [
|
|
6752
6750
|
mobileMenuOpen
|
|
@@ -6761,7 +6759,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6761
6759
|
},
|
|
6762
6760
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
|
|
6763
6761
|
"aria-label": "Site header",
|
|
6764
|
-
className: `dkan-c-header dkan-c-header--${mobileMax ?
|
|
6762
|
+
className: `dkan-c-header dkan-c-header--${mobileMax ? "mobile" : "desktop"}`,
|
|
6765
6763
|
children: [
|
|
6766
6764
|
topNav && topNav,
|
|
6767
6765
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6800,7 +6798,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6800
6798
|
onClick: clickHandler ? clickHandler : undefined,
|
|
6801
6799
|
children: [
|
|
6802
6800
|
innerHtml,
|
|
6803
|
-
link?.target ===
|
|
6801
|
+
link?.target === "_blank" && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ExternalLinkIcon), {
|
|
6804
6802
|
className: "ds-u-margin-left--05 ds-c-external-link-icon"
|
|
6805
6803
|
})
|
|
6806
6804
|
]
|
|
@@ -6810,7 +6808,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6810
6808
|
var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
|
|
6811
6809
|
|
|
6812
6810
|
|
|
6813
|
-
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle =
|
|
6811
|
+
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", {
|
|
6814
6812
|
children: [
|
|
6815
6813
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6816
6814
|
children: "A federal government website managed and paid for by the U.S. Centers for Medicare & Medicaid Services."
|
|
@@ -6898,14 +6896,14 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6898
6896
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
6899
6897
|
className: "ds-u-font-size--sm",
|
|
6900
6898
|
children: footerAdditionalResourcesLinks.filter((link)=>{
|
|
6901
|
-
const noOnClick = Object.keys(link).findIndex((l)=>l ===
|
|
6899
|
+
const noOnClick = Object.keys(link).findIndex((l)=>l === "onClick");
|
|
6902
6900
|
if (noOnClick === -1 || link.onClick && link.dataTag) return link;
|
|
6903
6901
|
}).map((link)=>{
|
|
6904
6902
|
if (link.onClick && link.dataTag) return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
6905
6903
|
className: "ds-u-margin-bottom--1",
|
|
6906
6904
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
6907
6905
|
href: link.url,
|
|
6908
|
-
[
|
|
6906
|
+
["data-" + link.dataTag.name]: link.dataTag.value,
|
|
6909
6907
|
onClick: link.onClick,
|
|
6910
6908
|
children: link.label
|
|
6911
6909
|
})
|
|
@@ -7005,7 +7003,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7005
7003
|
children: [
|
|
7006
7004
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7007
7005
|
id: "svg-inline--fa-title-iRCARP7h6Kp3",
|
|
7008
|
-
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title :
|
|
7006
|
+
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title : "CMS Facebook"
|
|
7009
7007
|
}),
|
|
7010
7008
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
7011
7009
|
transform: "translate(160 256)",
|
|
@@ -7058,7 +7056,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7058
7056
|
children: [
|
|
7059
7057
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7060
7058
|
id: "svg-inline--fa-title-4z03ITiPPTVF",
|
|
7061
|
-
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title :
|
|
7059
|
+
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title : "CMS Twitter"
|
|
7062
7060
|
}),
|
|
7063
7061
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
7064
7062
|
transform: "translate(256 256)",
|
|
@@ -7111,7 +7109,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7111
7109
|
children: [
|
|
7112
7110
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7113
7111
|
id: "svg-inline--fa-title-Nm2qsuSKvuRZ",
|
|
7114
|
-
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title :
|
|
7112
|
+
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title : "CMS LinkedIn"
|
|
7115
7113
|
}),
|
|
7116
7114
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
7117
7115
|
transform: "translate(224 256)",
|
|
@@ -7163,7 +7161,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7163
7161
|
children: [
|
|
7164
7162
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7165
7163
|
id: "svg-inline--fa-title-youtube",
|
|
7166
|
-
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title :
|
|
7164
|
+
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title : "CMS youtube"
|
|
7167
7165
|
}),
|
|
7168
7166
|
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
7169
7167
|
fill: "currentColor",
|
|
@@ -7198,7 +7196,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7198
7196
|
className: "ds-u-margin-right--2",
|
|
7199
7197
|
children: [
|
|
7200
7198
|
link.label,
|
|
7201
|
-
link?.target ===
|
|
7199
|
+
link?.target === "_blank" && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ExternalLinkIcon), {
|
|
7202
7200
|
className: "ds-u-margin-left--05 ds-c-external-link-icon"
|
|
7203
7201
|
})
|
|
7204
7202
|
]
|
|
@@ -7268,26 +7266,26 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7268
7266
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
7269
7267
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
7270
7268
|
stackable: true,
|
|
7271
|
-
className:
|
|
7269
|
+
className: "ds-c-table",
|
|
7272
7270
|
children: [
|
|
7273
7271
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
|
|
7274
7272
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
7275
7273
|
children: [
|
|
7276
7274
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7277
|
-
id:
|
|
7278
|
-
headers:
|
|
7275
|
+
id: "application",
|
|
7276
|
+
headers: "Application",
|
|
7279
7277
|
children: "Application"
|
|
7280
|
-
},
|
|
7278
|
+
}, "Application"),
|
|
7281
7279
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7282
|
-
id:
|
|
7283
|
-
headers:
|
|
7280
|
+
id: "notes",
|
|
7281
|
+
headers: "Notes",
|
|
7284
7282
|
children: "Notes"
|
|
7285
|
-
},
|
|
7283
|
+
}, "Notes"),
|
|
7286
7284
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7287
|
-
id:
|
|
7288
|
-
headers:
|
|
7285
|
+
id: "links",
|
|
7286
|
+
headers: "Links",
|
|
7289
7287
|
children: "Links"
|
|
7290
|
-
},
|
|
7288
|
+
}, "Links")
|
|
7291
7289
|
]
|
|
7292
7290
|
})
|
|
7293
7291
|
}),
|
|
@@ -7297,19 +7295,19 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7297
7295
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7298
7296
|
id: d.id,
|
|
7299
7297
|
stackedTitle: "Application",
|
|
7300
|
-
headers:
|
|
7298
|
+
headers: "Application",
|
|
7301
7299
|
children: d.application
|
|
7302
7300
|
}, d.id),
|
|
7303
7301
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7304
7302
|
id: d.id,
|
|
7305
7303
|
stackedTitle: "Notes",
|
|
7306
|
-
headers:
|
|
7304
|
+
headers: "Notes",
|
|
7307
7305
|
children: d.notes
|
|
7308
7306
|
}, `${d.id}-notes`),
|
|
7309
7307
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7310
7308
|
id: d.id,
|
|
7311
7309
|
stackedTitle: "Links",
|
|
7312
|
-
headers:
|
|
7310
|
+
headers: "Links",
|
|
7313
7311
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
7314
7312
|
className: "dkan-newtab",
|
|
7315
7313
|
href: d.link,
|
|
@@ -7337,44 +7335,44 @@ var $5655284dbbb89508$export$2e2bcd8739ae039 = $5655284dbbb89508$var$Documentati
|
|
|
7337
7335
|
|
|
7338
7336
|
const $c7bf75f7e8a68780$export$7850f4d545d994c6 = [
|
|
7339
7337
|
{
|
|
7340
|
-
id:
|
|
7341
|
-
application:
|
|
7342
|
-
notes:
|
|
7343
|
-
link:
|
|
7344
|
-
linkText:
|
|
7345
|
-
screenReaderOnlyText:
|
|
7338
|
+
id: "excel",
|
|
7339
|
+
application: "Microsoft Excel",
|
|
7340
|
+
notes: "Official size limitations for Microsoft Excel",
|
|
7341
|
+
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",
|
|
7342
|
+
linkText: "Excel Specifications and Limits",
|
|
7343
|
+
screenReaderOnlyText: "on microsoft.com"
|
|
7346
7344
|
},
|
|
7347
7345
|
{
|
|
7348
|
-
id:
|
|
7349
|
-
application:
|
|
7350
|
-
notes:
|
|
7351
|
-
link:
|
|
7352
|
-
linkText:
|
|
7353
|
-
screenReaderOnlyText:
|
|
7346
|
+
id: "access",
|
|
7347
|
+
application: "Microsoft Access",
|
|
7348
|
+
notes: "Official size limitations for Microsoft Access",
|
|
7349
|
+
link: "https://support.microsoft.com/en-us/office/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c?ui=en-us&rs=en-us&ad=us",
|
|
7350
|
+
linkText: "Access 2016 Specifications",
|
|
7351
|
+
screenReaderOnlyText: "on microsoft.com"
|
|
7354
7352
|
},
|
|
7355
7353
|
{
|
|
7356
|
-
id:
|
|
7357
|
-
application:
|
|
7358
|
-
notes:
|
|
7359
|
-
link:
|
|
7360
|
-
linkText:
|
|
7361
|
-
screenReaderOnlyText:
|
|
7354
|
+
id: "oracle-sql-developer",
|
|
7355
|
+
application: "Oracle SQL Developer",
|
|
7356
|
+
notes: "Oracle SQL Developer tool",
|
|
7357
|
+
link: "https://www.oracle.com/database/sqldeveloper/",
|
|
7358
|
+
linkText: "Oracle SQL Developer Overview",
|
|
7359
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7362
7360
|
},
|
|
7363
7361
|
{
|
|
7364
|
-
id:
|
|
7365
|
-
application:
|
|
7366
|
-
notes:
|
|
7367
|
-
link:
|
|
7368
|
-
linkText:
|
|
7369
|
-
screenReaderOnlyText:
|
|
7362
|
+
id: "oracle-database",
|
|
7363
|
+
application: "Oracle Database",
|
|
7364
|
+
notes: "Oracle Database official size limitations",
|
|
7365
|
+
link: "https://docs.oracle.com/cd/B28359_01/server.111/b28320/limits002.htm#i287915",
|
|
7366
|
+
linkText: "Oracle Physical Database Limits",
|
|
7367
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7370
7368
|
},
|
|
7371
7369
|
{
|
|
7372
|
-
id:
|
|
7373
|
-
application:
|
|
7374
|
-
notes:
|
|
7375
|
-
link:
|
|
7376
|
-
linkText:
|
|
7377
|
-
screenReaderOnlyText:
|
|
7370
|
+
id: "oracle-sql-client-tools",
|
|
7371
|
+
application: "Oracle SQL Client Tools",
|
|
7372
|
+
notes: "Oracle SQL Client Tools",
|
|
7373
|
+
link: "https://www.oracle.com/database/technologies/oracle-database-software-downloads.html",
|
|
7374
|
+
linkText: "Oracle SQL Client",
|
|
7375
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7378
7376
|
}
|
|
7379
7377
|
];
|
|
7380
7378
|
|
|
@@ -7402,7 +7400,7 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7402
7400
|
}),
|
|
7403
7401
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
7404
7402
|
heading: "Notice",
|
|
7405
|
-
className:
|
|
7403
|
+
className: "ds-u-margin-top--6",
|
|
7406
7404
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
7407
7405
|
className: "ds-c-alert__text",
|
|
7408
7406
|
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."
|
|
@@ -7411,16 +7409,16 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7411
7409
|
]
|
|
7412
7410
|
}),
|
|
7413
7411
|
/*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7414
|
-
className:
|
|
7412
|
+
className: "ds-u-margin-top--4 ds-l-row",
|
|
7415
7413
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7416
|
-
className:
|
|
7414
|
+
className: "ds-l-col--12",
|
|
7417
7415
|
children: [
|
|
7418
7416
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
7419
7417
|
className: "ds-text-heading--2xl ds-text-heading--2xl",
|
|
7420
7418
|
children: "Documentation by Application"
|
|
7421
7419
|
}),
|
|
7422
7420
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7423
|
-
className:
|
|
7421
|
+
className: "ds-u-margin-top--4",
|
|
7424
7422
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5655284dbbb89508$export$2e2bcd8739ae039), {
|
|
7425
7423
|
data: documentationList
|
|
7426
7424
|
})
|
|
@@ -7448,7 +7446,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7448
7446
|
const options = {
|
|
7449
7447
|
conditions: query ? JSON.parse(query).map(({ column: column, operator: operator, ...rest })=>({
|
|
7450
7448
|
property: column,
|
|
7451
|
-
operator: operator ===
|
|
7449
|
+
operator: operator === "is" ? "=" : operator === "is not" ? "<>" : operator === "or" ? "in" : operator,
|
|
7452
7450
|
...rest
|
|
7453
7451
|
})) : []
|
|
7454
7452
|
};
|
|
@@ -7456,13 +7454,13 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7456
7454
|
let distribution = {};
|
|
7457
7455
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
7458
7456
|
if (distributions.length) distribution = distributions[distributionIndex];
|
|
7459
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7457
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
7460
7458
|
...options,
|
|
7461
7459
|
limit: defaultPageSize
|
|
7462
7460
|
});
|
|
7463
7461
|
(0, $hgUW1$useEffect)(()=>{
|
|
7464
7462
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
7465
|
-
if (localFileFormat ===
|
|
7463
|
+
if (localFileFormat === "csv") resource.setResource(distribution.identifier);
|
|
7466
7464
|
}, [
|
|
7467
7465
|
distribution
|
|
7468
7466
|
]);
|
|
@@ -7512,7 +7510,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7512
7510
|
|
|
7513
7511
|
|
|
7514
7512
|
function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
|
|
7515
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7513
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
7516
7514
|
const newDate = new Date(condition.value);
|
|
7517
7515
|
if (newDate instanceof Date && !isNaN(newDate)) return newDate;
|
|
7518
7516
|
}
|
|
@@ -7529,9 +7527,9 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7529
7527
|
const [startDate, setStartDate] = (0, $hgUW1$react).useState($374c4669b044ddf8$var$getStartDate(condition, schema, id));
|
|
7530
7528
|
(0, $hgUW1$useEffect)(()=>{
|
|
7531
7529
|
if (property !== condition.property) {
|
|
7532
|
-
if (property) update(index,
|
|
7533
|
-
else update(index,
|
|
7534
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7530
|
+
if (property) update(index, "property", property);
|
|
7531
|
+
else update(index, "property", "");
|
|
7532
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
7535
7533
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
7536
7534
|
}
|
|
7537
7535
|
}
|
|
@@ -7545,16 +7543,16 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7545
7543
|
]);
|
|
7546
7544
|
(0, $hgUW1$useEffect)(()=>{
|
|
7547
7545
|
if (operator !== condition.operator) {
|
|
7548
|
-
if (operator) update(index,
|
|
7549
|
-
else update(index,
|
|
7546
|
+
if (operator) update(index, "operator", operator);
|
|
7547
|
+
else update(index, "operator", "");
|
|
7550
7548
|
}
|
|
7551
7549
|
}, [
|
|
7552
7550
|
operator
|
|
7553
7551
|
]);
|
|
7554
7552
|
(0, $hgUW1$useEffect)(()=>{
|
|
7555
7553
|
if (value !== condition.value) {
|
|
7556
|
-
if (value) update(index,
|
|
7557
|
-
else update(index,
|
|
7554
|
+
if (value) update(index, "value", value);
|
|
7555
|
+
else update(index, "value", "");
|
|
7558
7556
|
}
|
|
7559
7557
|
}, [
|
|
7560
7558
|
value
|
|
@@ -7578,7 +7576,7 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7578
7576
|
onChange: (e)=>setOperator(e.target.value),
|
|
7579
7577
|
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"
|
|
7580
7578
|
}),
|
|
7581
|
-
schema[id].fields[property].mysql_type ===
|
|
7579
|
+
schema[id].fields[property].mysql_type === "date" ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7582
7580
|
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",
|
|
7583
7581
|
children: [
|
|
7584
7582
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
@@ -7668,12 +7666,12 @@ const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions, schema: sche
|
|
|
7668
7666
|
className: "ds-u-font-weight--bold",
|
|
7669
7667
|
children: description
|
|
7670
7668
|
}),
|
|
7671
|
-
|
|
7669
|
+
" ",
|
|
7672
7670
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7673
7671
|
className: "ds-u-font-weight--normal",
|
|
7674
7672
|
children: operator.label.toUpperCase()
|
|
7675
7673
|
}),
|
|
7676
|
-
|
|
7674
|
+
" ",
|
|
7677
7675
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7678
7676
|
className: "ds-u-color--success",
|
|
7679
7677
|
children: formattedText
|
|
@@ -7700,19 +7698,19 @@ var $bef7bff2823feea2$export$2e2bcd8739ae039 = $bef7bff2823feea2$var$QueryTitle;
|
|
|
7700
7698
|
function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
|
|
7701
7699
|
let cond = condition;
|
|
7702
7700
|
delete cond.key;
|
|
7703
|
-
if (cond.operator ===
|
|
7701
|
+
if (cond.operator === "=" || cond.operator === "<>") {
|
|
7704
7702
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7705
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7703
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
7706
7704
|
}
|
|
7707
|
-
if (cond.operator.toLowerCase() ===
|
|
7705
|
+
if (cond.operator.toLowerCase() === "like") {
|
|
7708
7706
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7709
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7707
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
7710
7708
|
cond.value = `%${cleanedValue}%`;
|
|
7711
7709
|
}
|
|
7712
|
-
if (cond.operator.toLowerCase() ===
|
|
7713
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
7710
|
+
if (cond.operator.toLowerCase() === "in") {
|
|
7711
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(",");
|
|
7714
7712
|
}
|
|
7715
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
7713
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
|
|
7716
7714
|
return cond;
|
|
7717
7715
|
}
|
|
7718
7716
|
const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, setOffset: setOffset })=>{
|
|
@@ -7732,7 +7730,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7732
7730
|
...queryConditions,
|
|
7733
7731
|
{
|
|
7734
7732
|
property: fields[0],
|
|
7735
|
-
value:
|
|
7733
|
+
value: "",
|
|
7736
7734
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
7737
7735
|
key: Date.now()
|
|
7738
7736
|
}
|
|
@@ -7772,7 +7770,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7772
7770
|
encodeValuesOnly: true,
|
|
7773
7771
|
addQueryPrefix: true
|
|
7774
7772
|
});
|
|
7775
|
-
window.history.pushState({},
|
|
7773
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
7776
7774
|
};
|
|
7777
7775
|
const updateCondition = (index, key, value)=>{
|
|
7778
7776
|
let newConditions = [
|
|
@@ -7845,7 +7843,7 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
|
|
|
7845
7843
|
|
|
7846
7844
|
|
|
7847
7845
|
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 })=>{
|
|
7848
|
-
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState(
|
|
7846
|
+
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState("ds-u-padding-y--1");
|
|
7849
7847
|
let apiDocs = (0, $hgUW1$useRef)();
|
|
7850
7848
|
let distribution = {};
|
|
7851
7849
|
let distribution_array = dataset.distribution ? dataset.distribution : [];
|
|
@@ -7857,7 +7855,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7857
7855
|
} : {
|
|
7858
7856
|
conditions: []
|
|
7859
7857
|
};
|
|
7860
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7858
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
7861
7859
|
...options,
|
|
7862
7860
|
limit: 25
|
|
7863
7861
|
}, {
|
|
@@ -7873,7 +7871,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7873
7871
|
}, {
|
|
7874
7872
|
encode: true
|
|
7875
7873
|
})}&format=csv`;
|
|
7876
|
-
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !==
|
|
7874
|
+
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !== "csv" ? distribution.data.title : dataset.title;
|
|
7877
7875
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
7878
7876
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7879
7877
|
className: "ds-l-container ds-u-padding-bottom--3 ds-u-margin-bottom--2",
|
|
@@ -7882,7 +7880,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7882
7880
|
children: Object.keys(distribution).length && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
7883
7881
|
children: [
|
|
7884
7882
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7885
|
-
className:
|
|
7883
|
+
className: "ds-l-md-col--9",
|
|
7886
7884
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
7887
7885
|
to: `/dataset/${id}`,
|
|
7888
7886
|
className: "ds-u-padding-y--4 ds-u-display--block",
|
|
@@ -7893,14 +7891,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7893
7891
|
})
|
|
7894
7892
|
}),
|
|
7895
7893
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7896
|
-
className:
|
|
7894
|
+
className: "ds-l-md-col--9",
|
|
7897
7895
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
7898
7896
|
className: "ds-text-heading--3xl",
|
|
7899
7897
|
children: customTitle ? customTitle : pageTitle
|
|
7900
7898
|
})
|
|
7901
7899
|
}),
|
|
7902
7900
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7903
|
-
className:
|
|
7901
|
+
className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
|
|
7904
7902
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
7905
7903
|
className: "ds-u-margin--0",
|
|
7906
7904
|
children: [
|
|
@@ -7912,7 +7910,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7912
7910
|
})
|
|
7913
7911
|
}),
|
|
7914
7912
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7915
|
-
className:
|
|
7913
|
+
className: "ds-l-md-col--9",
|
|
7916
7914
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
7917
7915
|
distribution: distribution,
|
|
7918
7916
|
dataset: dataset,
|
|
@@ -7922,13 +7920,13 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7922
7920
|
})
|
|
7923
7921
|
}),
|
|
7924
7922
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7925
|
-
className:
|
|
7923
|
+
className: "ds-l-md-col--12",
|
|
7926
7924
|
children: Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
|
|
7927
7925
|
resource: resource,
|
|
7928
7926
|
id: distribution.identifier,
|
|
7929
7927
|
customColumns: customColumns,
|
|
7930
7928
|
setOffset: resource.setOffset
|
|
7931
|
-
}) :
|
|
7929
|
+
}) : ""
|
|
7932
7930
|
}),
|
|
7933
7931
|
Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
7934
7932
|
value: {
|
|
@@ -7939,7 +7937,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7939
7937
|
customColumns: (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution_array[distIndex].identifier])
|
|
7940
7938
|
},
|
|
7941
7939
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7942
|
-
className:
|
|
7940
|
+
className: "ds-l-md-col--12",
|
|
7943
7941
|
children: [
|
|
7944
7942
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $af099c546cb226c7$export$2e2bcd8739ae039), {
|
|
7945
7943
|
includeDensity: true,
|
|
@@ -7961,14 +7959,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7961
7959
|
]
|
|
7962
7960
|
})
|
|
7963
7961
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7964
|
-
className:
|
|
7962
|
+
className: "ds-l-md-col--12",
|
|
7965
7963
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
7966
7964
|
role: "status",
|
|
7967
7965
|
"aria-valuetext": "Resource loading"
|
|
7968
7966
|
})
|
|
7969
7967
|
}),
|
|
7970
7968
|
dataset.identifier && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7971
|
-
className:
|
|
7969
|
+
className: "ds-l-md-col--12",
|
|
7972
7970
|
ref: apiDocs,
|
|
7973
7971
|
children: [
|
|
7974
7972
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
@@ -7977,7 +7975,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7977
7975
|
}),
|
|
7978
7976
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
7979
7977
|
url: `${rootUrl}/metastore/schemas/dataset/items/${dataset.identifier}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`,
|
|
7980
|
-
docExpansion:
|
|
7978
|
+
docExpansion: "list",
|
|
7981
7979
|
defaultModelsExpandDepth: -1
|
|
7982
7980
|
})
|
|
7983
7981
|
]
|
|
@@ -7996,7 +7994,7 @@ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, loca
|
|
|
7996
7994
|
const [ready, setReady] = (0, $hgUW1$useState)(false);
|
|
7997
7995
|
const [error, setError] = (0, $hgUW1$useState)(false);
|
|
7998
7996
|
const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
7999
|
-
const distIndex = dist_id ===
|
|
7997
|
+
const distIndex = dist_id === "data" ? 0 : dist_id;
|
|
8000
7998
|
(0, $hgUW1$useEffect)(()=>{
|
|
8001
7999
|
if (dataset.error) setError(true);
|
|
8002
8000
|
if (dataset.distribution && dataset.distribution.length) {
|