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