@civicactions/cmsds-open-data-components 3.1.0 → 3.1.2
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 +0 -18
- package/dist/main.css.map +1 -1
- package/dist/main.js +161 -111
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/main.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./main.css";
|
|
2
2
|
import {jsxs as $hgUW1$jsxs, jsx as $hgUW1$jsx, Fragment as $hgUW1$Fragment} from "react/jsx-runtime";
|
|
3
3
|
import $hgUW1$react, {useState as $hgUW1$useState, useRef as $hgUW1$useRef, useEffect as $hgUW1$useEffect} from "react";
|
|
4
|
-
import {Button as $hgUW1$Button, Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, TextField as $hgUW1$TextField, Spinner as $hgUW1$Spinner, Dropdown as $hgUW1$Dropdown, Alert as $hgUW1$Alert, Pagination as $hgUW1$Pagination, Dialog as $hgUW1$Dialog, Choice as $hgUW1$Choice, Tabs as $hgUW1$Tabs, TabPanel as $hgUW1$TabPanel, Tooltip as $hgUW1$Tooltip, Badge as $hgUW1$Badge, Table as $hgUW1$Table, TableBody as $hgUW1$TableBody, TableRow as $hgUW1$TableRow, TableCell as $hgUW1$TableCell, TableHead as $hgUW1$TableHead} from "@cmsgov/design-system";
|
|
4
|
+
import {Button as $hgUW1$Button, Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, TextField as $hgUW1$TextField, Spinner as $hgUW1$Spinner, Dropdown as $hgUW1$Dropdown, Alert as $hgUW1$Alert, Pagination as $hgUW1$Pagination, Dialog as $hgUW1$Dialog, AddIcon as $hgUW1$AddIcon, RemoveIcon as $hgUW1$RemoveIcon, Choice as $hgUW1$Choice, Tabs as $hgUW1$Tabs, TabPanel as $hgUW1$TabPanel, Tooltip as $hgUW1$Tooltip, Badge as $hgUW1$Badge, Table as $hgUW1$Table, TableBody as $hgUW1$TableBody, TableRow as $hgUW1$TableRow, TableCell as $hgUW1$TableCell, TableHead as $hgUW1$TableHead} from "@cmsgov/design-system";
|
|
5
5
|
import $hgUW1$proptypes from "prop-types";
|
|
6
6
|
import {NavLink as $hgUW1$NavLink, useLocation as $hgUW1$useLocation, useSearchParams as $hgUW1$useSearchParams, Link as $hgUW1$Link, useNavigate as $hgUW1$useNavigate} from "react-router-dom";
|
|
7
7
|
import $hgUW1$qs from "qs";
|
|
@@ -17,6 +17,7 @@ import $hgUW1$reactdatepicker from "react-datepicker";
|
|
|
17
17
|
import "react-datepicker/dist/react-datepicker.css";
|
|
18
18
|
import {usePopper as $hgUW1$usePopper} from "react-popper";
|
|
19
19
|
|
|
20
|
+
|
|
20
21
|
function $parcel$interopDefault(a) {
|
|
21
22
|
return a && a.__esModule ? a.default : a;
|
|
22
23
|
}
|
|
@@ -31,12 +32,12 @@ function $parcel$interopDefault(a) {
|
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
|
|
34
|
-
const $24918217e48ac525$var$NavLink = ({ link: link
|
|
35
|
+
const $24918217e48ac525$var$NavLink = ({ link: link, className: className, wrapLabel: wrapLabel, clickHandler: clickHandler })=>{
|
|
35
36
|
const innerHtml = wrapLabel ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
36
37
|
children: link.label
|
|
37
38
|
}) : link.label;
|
|
38
39
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
39
|
-
className: ({ isActive: isActive
|
|
40
|
+
className: ({ isActive: isActive })=>isActive ? `dc-c-active-link ${className}` : `${className}`,
|
|
40
41
|
to: link.url,
|
|
41
42
|
onClick: clickHandler ? clickHandler : undefined,
|
|
42
43
|
children: innerHtml
|
|
@@ -61,7 +62,7 @@ $24918217e48ac525$var$NavLink.propTypes = {
|
|
|
61
62
|
var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
|
|
62
63
|
|
|
63
64
|
|
|
64
|
-
const $4f153ca537d853e5$var$SubMenu = ({ link: link
|
|
65
|
+
const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, wrapLabel: wrapLabel })=>{
|
|
65
66
|
const [isExpanded, setIsExapanded] = (0, $hgUW1$useState)(false);
|
|
66
67
|
const innerHtml = wrapLabel ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
67
68
|
children: link.label
|
|
@@ -117,7 +118,7 @@ var $4f153ca537d853e5$export$2e2bcd8739ae039 = $4f153ca537d853e5$var$SubMenu;
|
|
|
117
118
|
|
|
118
119
|
|
|
119
120
|
|
|
120
|
-
const $f57121650539d8c5$var$NavBar = ({ links: links
|
|
121
|
+
const $f57121650539d8c5$var$NavBar = ({ links: links, menuName: menuName, menuId: menuId, menuClasses: menuClasses, linkClasses: linkClasses, wrapLabel: wrapLabel, clickHandler: clickHandler })=>{
|
|
121
122
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
|
|
122
123
|
className: `dc-c-${menuId}-menu`,
|
|
123
124
|
"aria-labelledby": `dc-c-${menuId}-menu--heading`,
|
|
@@ -162,7 +163,7 @@ var $f57121650539d8c5$export$2e2bcd8739ae039 = $f57121650539d8c5$var$NavBar;
|
|
|
162
163
|
|
|
163
164
|
|
|
164
165
|
|
|
165
|
-
const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth
|
|
166
|
+
const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth, additionalParams: additionalParams, rootUrl: rootUrl })=>{
|
|
166
167
|
const hasACA = additionalParams && additionalParams.ACA ? true : false;
|
|
167
168
|
let params = {
|
|
168
169
|
authentication: hideAuth ? false : undefined,
|
|
@@ -190,7 +191,7 @@ var $c96c4b9ef7203c1f$export$2e2bcd8739ae039 = $c96c4b9ef7203c1f$var$APIPage;
|
|
|
190
191
|
|
|
191
192
|
|
|
192
193
|
|
|
193
|
-
const $026cb986f9fea2b1$var$PageNotFound = ({ siteUrl: siteUrl
|
|
194
|
+
const $026cb986f9fea2b1$var$PageNotFound = ({ siteUrl: siteUrl, content: content })=>{
|
|
194
195
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
195
196
|
className: "ds-l-container ds-u-padding-top--3",
|
|
196
197
|
children: content ? content : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -269,7 +270,7 @@ var $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 = $61ff88fb3f6ee2c8$var$withQueryPr
|
|
|
269
270
|
|
|
270
271
|
const $b61856b23f5f58a2$var$LargeFileDialog = (props)=>{
|
|
271
272
|
const [modalOpen, setModalOpen] = (0, $hgUW1$useState)(false);
|
|
272
|
-
const { downloadUrl: downloadUrl
|
|
273
|
+
const { downloadUrl: downloadUrl } = props;
|
|
273
274
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
274
275
|
children: [
|
|
275
276
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
@@ -498,7 +499,7 @@ var $b38839fd67928f42$export$2e2bcd8739ae039 = $b38839fd67928f42$var$SearchItemI
|
|
|
498
499
|
|
|
499
500
|
|
|
500
501
|
|
|
501
|
-
const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date
|
|
502
|
+
const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date, options: options })=>{
|
|
502
503
|
const rawDate = new Date(date);
|
|
503
504
|
let modifiedDate = "";
|
|
504
505
|
if (rawDate) modifiedDate = rawDate.toLocaleDateString("en-US", options);
|
|
@@ -518,16 +519,29 @@ var $bd76a91923d7e8a7$export$2e2bcd8739ae039 = $bd76a91923d7e8a7$var$Transformed
|
|
|
518
519
|
|
|
519
520
|
|
|
520
521
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
522
|
+
function $52c6454cae137465$var$prepDescription(description) {
|
|
523
|
+
if (!description) return;
|
|
524
|
+
if (description.length > 1 && description.substring(0, 1) === "<") {
|
|
525
|
+
const elementTagStart = description.indexOf("<");
|
|
526
|
+
const elementTagEnd = description.indexOf(">");
|
|
527
|
+
const elementTagInner = description.substring(elementTagStart + 1, elementTagEnd);
|
|
528
|
+
const elementTagLength = elementTagInner.length;
|
|
529
|
+
const isolatedDescriptionStart = description.indexOf(`<${elementTagInner}>`) + (elementTagLength + 2);
|
|
530
|
+
const isolatedDescriptionEnd = description.indexOf(`</${elementTagInner}>`);
|
|
531
|
+
const isolatedDescription = description.substring(isolatedDescriptionStart, isolatedDescriptionEnd);
|
|
532
|
+
return (0, $hgUW1$dompurify).sanitize(isolatedDescription, {
|
|
533
|
+
ALLOWED_TAGS: []
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
return (0, $hgUW1$dompurify).sanitize(description, {
|
|
537
|
+
ALLOWED_TAGS: []
|
|
525
538
|
});
|
|
539
|
+
}
|
|
526
540
|
const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
527
541
|
const desktop = (0, $hgUW1$useMediaQuery)({
|
|
528
542
|
minWidth: 1024
|
|
529
543
|
});
|
|
530
|
-
const { title: title
|
|
544
|
+
const { title: title, modified: modified, description: description, theme: theme, identifier: identifier, downloadUrl: downloadUrl, largeFile: largeFile = false, paginationEnabled: paginationEnabled } = props;
|
|
531
545
|
let linkContainerClasses = "ds-l-col--12 ds-u-margin-bottom--2";
|
|
532
546
|
let linkClasses = "ds-c-button ds-u-display--block ds-u-text-align--left";
|
|
533
547
|
if (desktop) {
|
|
@@ -537,10 +551,8 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
537
551
|
const truncatedDescription = /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$reacttexttruncate), {
|
|
538
552
|
line: 3,
|
|
539
553
|
element: "p",
|
|
540
|
-
truncateText: "
|
|
541
|
-
|
|
542
|
-
text: description,
|
|
543
|
-
textTruncateChild: ""
|
|
554
|
+
truncateText: "\u2026",
|
|
555
|
+
text: $52c6454cae137465$var$prepDescription(description)
|
|
544
556
|
});
|
|
545
557
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
546
558
|
className: "dc-c-search-list-item ds-u-padding-top--3",
|
|
@@ -551,6 +563,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
551
563
|
className: "ds-l-row ds-u-align-items--start",
|
|
552
564
|
children: [
|
|
553
565
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
566
|
+
id: `dataset-${identifier}-updated-date`,
|
|
554
567
|
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? "ds-u-padding-top--2" : "ds-u-padding-top--0"}`,
|
|
555
568
|
children: [
|
|
556
569
|
"Updated ",
|
|
@@ -562,6 +575,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
562
575
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
563
576
|
className: "ds-l-col--12 ds-text-heading--2xl",
|
|
564
577
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
578
|
+
"aria-describedby": `dataset-${identifier}-updated-date`,
|
|
565
579
|
to: `/dataset/${identifier}`,
|
|
566
580
|
children: title
|
|
567
581
|
})
|
|
@@ -651,7 +665,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
651
665
|
})
|
|
652
666
|
]
|
|
653
667
|
})
|
|
654
|
-
}
|
|
668
|
+
});
|
|
655
669
|
};
|
|
656
670
|
var $52c6454cae137465$export$2e2bcd8739ae039 = $52c6454cae137465$var$DatasetSearchListItem;
|
|
657
671
|
|
|
@@ -661,10 +675,16 @@ var $52c6454cae137465$export$2e2bcd8739ae039 = $52c6454cae137465$var$DatasetSear
|
|
|
661
675
|
|
|
662
676
|
|
|
663
677
|
const $e011250e8a3bd5e5$var$SearchFacets = (props)=>{
|
|
664
|
-
const { facets: facets
|
|
678
|
+
const { facets: facets, title: title, onClickFunction: onClickFunction, selectedFacets: selectedFacets = [] } = props;
|
|
665
679
|
const filteredFacets = facets.filter((f)=>{
|
|
666
680
|
return Number(f.total) > 0 || selectedFacets.findIndex((i)=>i === f.name) !== -1;
|
|
667
681
|
});
|
|
682
|
+
const hiddenAddIcon = ()=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AddIcon), {
|
|
683
|
+
ariaHidden: true
|
|
684
|
+
});
|
|
685
|
+
const hiddenCloseIcon = ()=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$RemoveIcon), {
|
|
686
|
+
ariaHidden: true
|
|
687
|
+
});
|
|
668
688
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
669
689
|
className: "dkan-dataset-search--facet-container ds-u-margin-bottom--4",
|
|
670
690
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
|
|
@@ -672,6 +692,8 @@ const $e011250e8a3bd5e5$var$SearchFacets = (props)=>{
|
|
|
672
692
|
contentClassName: "ds-u-padding-left--1 ds-u-padding-right--0",
|
|
673
693
|
heading: title,
|
|
674
694
|
defaultOpen: true,
|
|
695
|
+
openIconComponent: hiddenAddIcon,
|
|
696
|
+
closeIconComponent: hiddenCloseIcon,
|
|
675
697
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
676
698
|
children: filteredFacets.length ? filteredFacets.map((f)=>{
|
|
677
699
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -721,7 +743,7 @@ var $3b2d31a9c6cd2284$export$2e2bcd8739ae039 = $3b2d31a9c6cd2284$var$LargeFileIn
|
|
|
721
743
|
|
|
722
744
|
|
|
723
745
|
const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
724
|
-
const { text: text
|
|
746
|
+
const { text: text, altMobileStyle: altMobileStyle } = props;
|
|
725
747
|
const sm = (0, $hgUW1$useMediaQuery)({
|
|
726
748
|
minWidth: 0,
|
|
727
749
|
maxWidth: 768
|
|
@@ -765,7 +787,7 @@ var $0a551147dc92a718$export$2e2bcd8739ae039 = $0a551147dc92a718$var$SearchButto
|
|
|
765
787
|
|
|
766
788
|
|
|
767
789
|
const $5723016a5461c1ca$var$PageHeader = (props)=>{
|
|
768
|
-
const { headerText: headerText
|
|
790
|
+
const { headerText: headerText } = props;
|
|
769
791
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
770
792
|
className: "ds-l-container",
|
|
771
793
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -827,7 +849,7 @@ function $eff7d34c30f5a0fc$export$60ec7cc1d341a524(searchParams, defaultSortOpti
|
|
|
827
849
|
};
|
|
828
850
|
}
|
|
829
851
|
async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, additionalParams) {
|
|
830
|
-
const { fulltext: fulltext
|
|
852
|
+
const { fulltext: fulltext, selectedFacets: selectedFacets, sort: sort, sortOrder: sortOrder, page: page, pageSize: pageSize } = options;
|
|
831
853
|
let params = {
|
|
832
854
|
fulltext: fulltext ? fulltext : undefined,
|
|
833
855
|
...selectedFacets,
|
|
@@ -846,7 +868,7 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, addit
|
|
|
846
868
|
|
|
847
869
|
|
|
848
870
|
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
849
|
-
const { rootUrl: rootUrl
|
|
871
|
+
const { rootUrl: rootUrl, surveyLink: surveyLink, additionalParams: additionalParams, enableSort: enableSort, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort, pageTitle: pageTitle, filterTitle: filterTitle, showLargeFileWarning: showLargeFileWarning, largeFileThemes: largeFileThemes, introText: introText, showDownloadIcon: showDownloadIcon, altMobileSearchButton: altMobileSearchButton } = props;
|
|
850
872
|
const sortOptions = [
|
|
851
873
|
{
|
|
852
874
|
label: "Newest",
|
|
@@ -988,7 +1010,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
988
1010
|
["page-size"]: pageSize !== 10 ? pageSize : undefined,
|
|
989
1011
|
...additionalParams
|
|
990
1012
|
};
|
|
991
|
-
const { data: data
|
|
1013
|
+
const { data: data, isLoading: isLoading, error: error } = (0, $hgUW1$useQuery)({
|
|
992
1014
|
queryKey: [
|
|
993
1015
|
"datasets",
|
|
994
1016
|
params
|
|
@@ -1130,7 +1152,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1130
1152
|
]
|
|
1131
1153
|
}),
|
|
1132
1154
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
|
|
1133
|
-
className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0 ds-u-display--block",
|
|
1155
|
+
className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0 ds-u-margin-bottom--4 ds-u-display--block",
|
|
1134
1156
|
"data-testid": "results-list",
|
|
1135
1157
|
children: [
|
|
1136
1158
|
noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
@@ -1157,7 +1179,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1157
1179
|
downloadUrl: showDownloadIcon ? getDownloadUrl(item) : null,
|
|
1158
1180
|
largeFile: showLargeFile,
|
|
1159
1181
|
paginationEnabled: enablePagination
|
|
1160
|
-
});
|
|
1182
|
+
}, item.identifier);
|
|
1161
1183
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
1162
1184
|
variation: "error",
|
|
1163
1185
|
heading: "Could not connect to the API."
|
|
@@ -1243,7 +1265,8 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl, additi
|
|
|
1243
1265
|
distribution: [],
|
|
1244
1266
|
error: "",
|
|
1245
1267
|
description: "",
|
|
1246
|
-
identifier: ""
|
|
1268
|
+
identifier: "",
|
|
1269
|
+
modified: ""
|
|
1247
1270
|
});
|
|
1248
1271
|
const [id, setId] = (0, $hgUW1$useState)(datasetId);
|
|
1249
1272
|
const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
|
|
@@ -1255,7 +1278,8 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl, additi
|
|
|
1255
1278
|
distribution: dataset.distribution,
|
|
1256
1279
|
error: error,
|
|
1257
1280
|
description: dataset.description,
|
|
1258
|
-
identifier: dataset.identifier
|
|
1281
|
+
identifier: dataset.identifier,
|
|
1282
|
+
modified: dataset.modified
|
|
1259
1283
|
}));
|
|
1260
1284
|
}
|
|
1261
1285
|
fetchData();
|
|
@@ -1278,7 +1302,7 @@ var $b4aa9c66f2e86959$export$2e2bcd8739ae039 = $b4aa9c66f2e86959$var$useMetastor
|
|
|
1278
1302
|
|
|
1279
1303
|
|
|
1280
1304
|
async function $0e7628cf73c71646$export$55f990b5477765d6(id, rootUrl, options, additionalParams) {
|
|
1281
|
-
const { keys: keys
|
|
1305
|
+
const { keys: keys, limit: limit, offset: offset, conditions: conditions, sort: sort, groupings: groupings, prepareColumns: prepareColumns, properties: properties, setValues: setValues, setCount: setCount, setColumns: setColumns, setLoading: setLoading, setSchema: setSchema } = options;
|
|
1282
1306
|
if (!id) // TODO: Throw error
|
|
1283
1307
|
return false;
|
|
1284
1308
|
if (typeof setLoading === "function") setLoading(true);
|
|
@@ -1302,7 +1326,7 @@ async function $0e7628cf73c71646$export$55f990b5477765d6(id, rootUrl, options, a
|
|
|
1302
1326
|
return (0, $hgUW1$qs).stringify(params);
|
|
1303
1327
|
}
|
|
1304
1328
|
}).then((res)=>{
|
|
1305
|
-
const { data: data
|
|
1329
|
+
const { data: data } = res;
|
|
1306
1330
|
const propertyKeys = data.schema[id] && data.schema[id].fields ? Object.keys(data.schema[id].fields) : [];
|
|
1307
1331
|
setValues(data.results), setCount(data.count);
|
|
1308
1332
|
if (propertyKeys.length) setColumns(prepareColumns ? prepareColumns(propertyKeys) : propertyKeys);
|
|
@@ -1315,7 +1339,7 @@ async function $0e7628cf73c71646$export$55f990b5477765d6(id, rootUrl, options, a
|
|
|
1315
1339
|
|
|
1316
1340
|
const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, additionalParams = {})=>{
|
|
1317
1341
|
const keys = options.keys ? options.keys : true;
|
|
1318
|
-
const { prepareColumns: prepareColumns
|
|
1342
|
+
const { prepareColumns: prepareColumns } = options;
|
|
1319
1343
|
const [manual, setManual] = (0, $hgUW1$useState)(options.manual ? options.manual : false);
|
|
1320
1344
|
const [requireConditions, setRequireConditions] = (0, $hgUW1$useState)(options.requireConditions ? options.requireConditions : false);
|
|
1321
1345
|
const [values, setValues] = (0, $hgUW1$useState)([]);
|
|
@@ -1650,7 +1674,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
1650
1674
|
|
|
1651
1675
|
|
|
1652
1676
|
|
|
1653
|
-
const $96d341d082bffec5$var$TruncatedResizeableTHead = ({ table: table
|
|
1677
|
+
const $96d341d082bffec5$var$TruncatedResizeableTHead = ({ table: table, sortElement: sortElement, setAriaLiveFeedback: setAriaLiveFeedback })=>{
|
|
1654
1678
|
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)("");
|
|
1655
1679
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("thead", {
|
|
1656
1680
|
className: "dc-thead--truncated dc-thead--resizeable",
|
|
@@ -1743,7 +1767,7 @@ var $96d341d082bffec5$export$2e2bcd8739ae039 = $96d341d082bffec5$var$TruncatedRe
|
|
|
1743
1767
|
|
|
1744
1768
|
|
|
1745
1769
|
|
|
1746
|
-
const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table
|
|
1770
|
+
const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortElement })=>{
|
|
1747
1771
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("thead", {
|
|
1748
1772
|
className: "dc-thead--fixed-size",
|
|
1749
1773
|
children: table.getHeaderGroups().map((headerGroup)=>/*#__PURE__*/ (0, $hgUW1$jsx)("tr", {
|
|
@@ -1775,7 +1799,7 @@ var $23763e27eda0e8d7$export$2e2bcd8739ae039 = $23763e27eda0e8d7$var$FixedSizeTH
|
|
|
1775
1799
|
|
|
1776
1800
|
|
|
1777
1801
|
|
|
1778
|
-
const $d98f94c79ddf4e0e$var$DataTable = ({ data: data
|
|
1802
|
+
const $d98f94c79ddf4e0e$var$DataTable = ({ data: data, columns: columns, setSort: setSort, sortTransform: sortTransform, tablePadding: tablePadding, canResize: canResize, loading: loading = false })=>{
|
|
1779
1803
|
const [sorting, setSorting] = (0, $hgUW1$react).useState([]);
|
|
1780
1804
|
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)("");
|
|
1781
1805
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
@@ -2026,7 +2050,7 @@ function $7264a673914aa746$export$2b9377795161999(type) {
|
|
|
2026
2050
|
|
|
2027
2051
|
|
|
2028
2052
|
|
|
2029
|
-
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows
|
|
2053
|
+
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className })=>{
|
|
2030
2054
|
const numTotalRows = totalRows;
|
|
2031
2055
|
if (numTotalRows === 0) return /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
2032
2056
|
className: className,
|
|
@@ -2075,8 +2099,8 @@ var $2ed0091f7e32d1e6$export$2e2bcd8739ae039 = $2ed0091f7e32d1e6$var$DataTablePa
|
|
|
2075
2099
|
|
|
2076
2100
|
|
|
2077
2101
|
|
|
2078
|
-
const $6380a4a580b24362$var$DataTableHeader = ({ resource: resource
|
|
2079
|
-
const { limit: limit
|
|
2102
|
+
const $6380a4a580b24362$var$DataTableHeader = ({ resource: resource, downloadURL: downloadURL, jsonUrl: jsonUrl })=>{
|
|
2103
|
+
const { limit: limit, offset: offset, count: count } = resource;
|
|
2080
2104
|
const intCount = count ? count : 0;
|
|
2081
2105
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2082
2106
|
className: "ds-l-row ds-u-align-items--center ds-u-margin-bottom--2",
|
|
@@ -2084,6 +2108,7 @@ const $6380a4a580b24362$var$DataTableHeader = ({ resource: resource , downloadUR
|
|
|
2084
2108
|
className: "ds-l-col--12 ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--between ds-u-align-items--center",
|
|
2085
2109
|
children: [
|
|
2086
2110
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2111
|
+
className: "ds-l-col--12 ds-l-lg-col--4",
|
|
2087
2112
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2ed0091f7e32d1e6$export$2e2bcd8739ae039), {
|
|
2088
2113
|
totalRows: intCount,
|
|
2089
2114
|
limit: limit,
|
|
@@ -2094,7 +2119,7 @@ const $6380a4a580b24362$var$DataTableHeader = ({ resource: resource , downloadUR
|
|
|
2094
2119
|
className: "dc-c-resource-header--buttons ds-l-col--12 ds-l-lg-col--8 ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--end ds-u-margin-bottom--2 ds-u-md-margin-bottom--0 ds-u-padding-x--0",
|
|
2095
2120
|
children: [
|
|
2096
2121
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2097
|
-
className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-
|
|
2122
|
+
className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-margin-bottom--2 ds-u-md-margin-bottom--0",
|
|
2098
2123
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Tooltip), {
|
|
2099
2124
|
onOpen: ()=>{
|
|
2100
2125
|
navigator.clipboard.writeText(window.location.href);
|
|
@@ -2116,18 +2141,17 @@ const $6380a4a580b24362$var$DataTableHeader = ({ resource: resource , downloadUR
|
|
|
2116
2141
|
})
|
|
2117
2142
|
}),
|
|
2118
2143
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2119
|
-
className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0",
|
|
2144
|
+
className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-sm-margin-left--2",
|
|
2120
2145
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
2121
2146
|
className: "ds-u-text-align--center ds-u-font-weight--normal ds-u-font-size--base ds-u-margin-right--1 ds-u-display--inline-block ds-l-col--12",
|
|
2122
2147
|
href: downloadURL,
|
|
2123
|
-
"aria-label": "Download filtered data (CSV)",
|
|
2124
2148
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
2125
2149
|
className: "ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0",
|
|
2126
2150
|
children: [
|
|
2127
2151
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2128
2152
|
className: "fas fa-file-csv"
|
|
2129
2153
|
}),
|
|
2130
|
-
"
|
|
2154
|
+
" Download filtered data (CSV)"
|
|
2131
2155
|
]
|
|
2132
2156
|
})
|
|
2133
2157
|
})
|
|
@@ -2168,8 +2192,8 @@ var $6380a4a580b24362$export$2e2bcd8739ae039 = $6380a4a580b24362$var$DataTableHe
|
|
|
2168
2192
|
|
|
2169
2193
|
|
|
2170
2194
|
|
|
2171
|
-
const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions
|
|
2172
|
-
const { fields: fields
|
|
2195
|
+
const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions, schema: schema, customColumns: customColumns })=>{
|
|
2196
|
+
const { fields: fields } = schema;
|
|
2173
2197
|
if (!conditions || !conditions.length) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
2174
2198
|
children: "Add a filter"
|
|
2175
2199
|
});
|
|
@@ -2237,7 +2261,7 @@ function $6369abf590ca298f$var$getStartDate(condition, schema, id) {
|
|
|
2237
2261
|
}
|
|
2238
2262
|
return new Date();
|
|
2239
2263
|
}
|
|
2240
|
-
const $6369abf590ca298f$var$QueryRow = ({ id: id
|
|
2264
|
+
const $6369abf590ca298f$var$QueryRow = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema })=>{
|
|
2241
2265
|
const [operator, setOperator] = (0, $hgUW1$useState)(condition.operator);
|
|
2242
2266
|
const [property, setProperty] = (0, $hgUW1$useState)(condition.property);
|
|
2243
2267
|
const [value, setValue] = (0, $hgUW1$useState)(condition.value);
|
|
@@ -2369,8 +2393,8 @@ function $ee4ad47aa483e5b5$var$updateQueryForDatastore(condition) {
|
|
|
2369
2393
|
return cond;
|
|
2370
2394
|
}
|
|
2371
2395
|
const $ee4ad47aa483e5b5$var$QueryBuilder = (props)=>{
|
|
2372
|
-
const { resource: resource
|
|
2373
|
-
const { conditions: conditions
|
|
2396
|
+
const { resource: resource, id: id, includeSearchParams: includeSearchParams, customColumns: customColumns } = props;
|
|
2397
|
+
const { conditions: conditions, schema: schema, setConditions: setConditions } = resource;
|
|
2374
2398
|
const fields = Object.keys(schema[id].fields);
|
|
2375
2399
|
const [conditionsCleared, setConditionsCleared] = (0, $hgUW1$useState)(false);
|
|
2376
2400
|
const [queryConditions, setQueryConditions] = (0, $hgUW1$useState)([]);
|
|
@@ -2538,7 +2562,7 @@ function $a35cf16d1488f54e$export$1147582dfae658c6(columns, schema) {
|
|
|
2538
2562
|
accessor: column
|
|
2539
2563
|
}));
|
|
2540
2564
|
}
|
|
2541
|
-
const $a35cf16d1488f54e$var$DatasetTable = ({ id: id
|
|
2565
|
+
const $a35cf16d1488f54e$var$DatasetTable = ({ id: id, distribution: distribution, resource: resource, rootUrl: rootUrl, customColumns: customColumns = [], jsonUrl: jsonUrl })=>{
|
|
2542
2566
|
const defaultPage = 1;
|
|
2543
2567
|
const defaultPageSize = 10;
|
|
2544
2568
|
const [page, setPage] = (0, $hgUW1$useState)(defaultPage);
|
|
@@ -2550,7 +2574,7 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ id: id , distribution: distributio
|
|
|
2550
2574
|
50,
|
|
2551
2575
|
100
|
|
2552
2576
|
];
|
|
2553
|
-
const { limit: limit
|
|
2577
|
+
const { limit: limit, setLimit: setLimit, setOffset: setOffset } = resource;
|
|
2554
2578
|
const pageSize = limit ? limit : defaultPageSize;
|
|
2555
2579
|
const downloadURL = `${rootUrl}/datastore/query/${id}/0/download?${(0, $hgUW1$qs).stringify({
|
|
2556
2580
|
conditions: resource.conditions
|
|
@@ -2577,7 +2601,8 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ id: id , distribution: distributio
|
|
|
2577
2601
|
columns: columns,
|
|
2578
2602
|
setSort: resource.setSort,
|
|
2579
2603
|
sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
|
|
2580
|
-
tablePadding: "ds-u-padding-y--2"
|
|
2604
|
+
tablePadding: "ds-u-padding-y--2",
|
|
2605
|
+
loading: resource.loading
|
|
2581
2606
|
})
|
|
2582
2607
|
}),
|
|
2583
2608
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
@@ -2636,7 +2661,7 @@ function $5644ebd2c3dbfd7b$export$eea3a12df15499ca(metadataMapping, datasetInfo)
|
|
|
2636
2661
|
});
|
|
2637
2662
|
return rows;
|
|
2638
2663
|
}
|
|
2639
|
-
const $5644ebd2c3dbfd7b$var$DatasetAdditionalInformation = ({ datasetInfo: datasetInfo
|
|
2664
|
+
const $5644ebd2c3dbfd7b$var$DatasetAdditionalInformation = ({ datasetInfo: datasetInfo, id: id, metadataMapping: metadataMapping })=>{
|
|
2640
2665
|
const rows = $5644ebd2c3dbfd7b$export$eea3a12df15499ca(metadataMapping, datasetInfo);
|
|
2641
2666
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2642
2667
|
className: "dc-c-additional-info-table ds-u-margin-bottom--6",
|
|
@@ -2688,8 +2713,8 @@ var $5644ebd2c3dbfd7b$export$2e2bcd8739ae039 = $5644ebd2c3dbfd7b$var$DatasetAddi
|
|
|
2688
2713
|
|
|
2689
2714
|
|
|
2690
2715
|
|
|
2691
|
-
const $0958733ee130fc44$var$ResourceInformation = ({ resource: resource
|
|
2692
|
-
const { count: count
|
|
2716
|
+
const $0958733ee130fc44$var$ResourceInformation = ({ resource: resource })=>{
|
|
2717
|
+
const { count: count, columns: columns } = resource;
|
|
2693
2718
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2694
2719
|
className: "dc-c-resource-info-table ds-l-col--12 ds-u-padding-left--0 ds-u-margin-y--2",
|
|
2695
2720
|
children: [
|
|
@@ -2737,7 +2762,7 @@ var $0958733ee130fc44$export$2e2bcd8739ae039 = $0958733ee130fc44$var$ResourceInf
|
|
|
2737
2762
|
|
|
2738
2763
|
|
|
2739
2764
|
|
|
2740
|
-
const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions
|
|
2765
|
+
const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource: resource, title: title })=>{
|
|
2741
2766
|
function getFormatType(dist) {
|
|
2742
2767
|
if (dist.data.format) return dist.data.format.toLowerCase();
|
|
2743
2768
|
if (dist.data.mediaType) {
|
|
@@ -2768,7 +2793,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions , resourc
|
|
|
2768
2793
|
children: distributions.map((dist)=>{
|
|
2769
2794
|
const fileFormat = getFormatType(dist);
|
|
2770
2795
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
2771
|
-
className:
|
|
2796
|
+
className: `ds-u-display--flex ds-u-flex-wrap--wrap ${fileFormat !== "csv" && "ds-u-margin-bottom--2"}`,
|
|
2772
2797
|
children: [
|
|
2773
2798
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2774
2799
|
className: "ds-u-font-weight--bold ds-u-font-size--lg ds-l-col--12 ds-l-md-col--6 ds-u-padding-left--0",
|
|
@@ -2776,7 +2801,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions , resourc
|
|
|
2776
2801
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2777
2802
|
className: "fa ds-u-color--primary ds-u-padding-right--1 fa-file-" + (fileFormat == "xlsx" ? "excel" : fileFormat)
|
|
2778
2803
|
}),
|
|
2779
|
-
title + " (" + fileFormat.toUpperCase() + ")"
|
|
2804
|
+
dist.data.title ? dist.data.title : title + " (" + fileFormat.toUpperCase() + ")"
|
|
2780
2805
|
]
|
|
2781
2806
|
}),
|
|
2782
2807
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -2797,7 +2822,10 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions , resourc
|
|
|
2797
2822
|
]
|
|
2798
2823
|
})
|
|
2799
2824
|
}),
|
|
2800
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)(
|
|
2825
|
+
dist.data.description && /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
2826
|
+
children: dist.data.description
|
|
2827
|
+
}),
|
|
2828
|
+
fileFormat === "csv" && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $0958733ee130fc44$export$2e2bcd8739ae039), {
|
|
2801
2829
|
resource: resource
|
|
2802
2830
|
})
|
|
2803
2831
|
]
|
|
@@ -2810,7 +2838,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions , resourc
|
|
|
2810
2838
|
var $7357cc0f79f9c514$export$2e2bcd8739ae039 = $7357cc0f79f9c514$var$Resource;
|
|
2811
2839
|
|
|
2812
2840
|
|
|
2813
|
-
const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset
|
|
2841
|
+
const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: resource, distributions: distributions, metadataMapping: metadataMapping })=>{
|
|
2814
2842
|
const md = (0, $hgUW1$useMediaQuery)({
|
|
2815
2843
|
minWidth: 0,
|
|
2816
2844
|
maxWidth: 768
|
|
@@ -2866,7 +2894,7 @@ var $364dc44850cd8f7f$export$2e2bcd8739ae039 = $364dc44850cd8f7f$var$DatasetOver
|
|
|
2866
2894
|
|
|
2867
2895
|
|
|
2868
2896
|
|
|
2869
|
-
const $789279954d8eff7f$var$ApiDocumentation = ({ endpoint: endpoint
|
|
2897
|
+
const $789279954d8eff7f$var$ApiDocumentation = ({ endpoint: endpoint })=>{
|
|
2870
2898
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2871
2899
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
2872
2900
|
url: endpoint
|
|
@@ -2876,7 +2904,7 @@ const $789279954d8eff7f$var$ApiDocumentation = ({ endpoint: endpoint })=>{
|
|
|
2876
2904
|
var $789279954d8eff7f$export$2e2bcd8739ae039 = $789279954d8eff7f$var$ApiDocumentation;
|
|
2877
2905
|
|
|
2878
2906
|
|
|
2879
|
-
const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id
|
|
2907
|
+
const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: apiUrl, additionalParams: additionalParams })=>{
|
|
2880
2908
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
2881
2909
|
children: [
|
|
2882
2910
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
@@ -2931,7 +2959,7 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
|
|
|
2931
2959
|
|
|
2932
2960
|
|
|
2933
2961
|
|
|
2934
|
-
const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionary: datasetDictionary
|
|
2962
|
+
const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionary: datasetDictionary, title: title, pageSize: pageSize = 20 })=>{
|
|
2935
2963
|
const [pagination, setPagination] = (0, $hgUW1$useState)({
|
|
2936
2964
|
pageIndex: 1,
|
|
2937
2965
|
pageSize: pageSize
|
|
@@ -3019,8 +3047,9 @@ var $6012b86ffcaf3f71$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
3019
3047
|
|
|
3020
3048
|
|
|
3021
3049
|
|
|
3050
|
+
|
|
3022
3051
|
const $a0f13962e513caa1$var$getSiteWideDataDictionary = (rootUrl, dataDictionaryUrl)=>{
|
|
3023
|
-
const { data: data
|
|
3052
|
+
const { data: data, isLoading: isLoading, error: error } = (0, $hgUW1$useQuery)({
|
|
3024
3053
|
queryKey: [
|
|
3025
3054
|
"dictionary"
|
|
3026
3055
|
],
|
|
@@ -3033,7 +3062,7 @@ const $a0f13962e513caa1$var$getSiteWideDataDictionary = (rootUrl, dataDictionary
|
|
|
3033
3062
|
dataDictionaryLoading: isLoading
|
|
3034
3063
|
};
|
|
3035
3064
|
};
|
|
3036
|
-
const $a0f13962e513caa1$var$Dataset = ({ id: id
|
|
3065
|
+
const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, additionalParams: additionalParams, customColumns: customColumns, setDatasetTitle: setDatasetTitle, customMetadataMapping: customMetadataMapping, apiPageUrl: apiPageUrl = "/api", dataDictionaryUrl: dataDictionaryUrl, borderlessTabs: borderlessTabs = false, defaultPageSize: defaultPageSize = 25 })=>{
|
|
3037
3066
|
const options = location.search ? {
|
|
3038
3067
|
...(0, $hgUW1$qs).parse(location.search, {
|
|
3039
3068
|
ignoreQueryPrefix: true
|
|
@@ -3041,7 +3070,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id , rootUrl: rootUrl , additionalP
|
|
|
3041
3070
|
} : {
|
|
3042
3071
|
conditions: []
|
|
3043
3072
|
};
|
|
3044
|
-
const { dataset: dataset
|
|
3073
|
+
const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl, additionalParams);
|
|
3045
3074
|
const title = dataset.title ? dataset.title : "";
|
|
3046
3075
|
const metadataMapping = {
|
|
3047
3076
|
...(0, $6da0396069e23175$export$bc27cf7ecf44639d),
|
|
@@ -3055,7 +3084,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id , rootUrl: rootUrl , additionalP
|
|
|
3055
3084
|
limit: defaultPageSize,
|
|
3056
3085
|
manual: true
|
|
3057
3086
|
}, additionalParams);
|
|
3058
|
-
const { siteWideDataDictionary: siteWideDataDictionary
|
|
3087
|
+
const { siteWideDataDictionary: siteWideDataDictionary } = dataDictionaryUrl ? $a0f13962e513caa1$var$getSiteWideDataDictionary(rootUrl, dataDictionaryUrl) : {
|
|
3059
3088
|
siteWideDataDictionary: null
|
|
3060
3089
|
};
|
|
3061
3090
|
// compare schema fields with siteWideDataDictionary to display commonalities for now
|
|
@@ -3124,26 +3153,41 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id , rootUrl: rootUrl , additionalP
|
|
|
3124
3153
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
3125
3154
|
className: "ds-l-container",
|
|
3126
3155
|
children: [
|
|
3127
|
-
/*#__PURE__*/ (0, $hgUW1$
|
|
3156
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
3128
3157
|
className: "ds-l-row",
|
|
3129
|
-
children:
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
3133
|
-
className: "ds-
|
|
3158
|
+
children: [
|
|
3159
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3160
|
+
className: "ds-l-md-col--9",
|
|
3161
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
3162
|
+
className: "ds-h1 title-underline",
|
|
3134
3163
|
children: title
|
|
3135
|
-
})
|
|
3136
|
-
|
|
3164
|
+
})
|
|
3165
|
+
}),
|
|
3166
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3167
|
+
className: "ds-l-md-col--12 ds-u-color--gray ds-u-margin-y--1 ds-u-text-align--right",
|
|
3168
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
3169
|
+
className: "ds-u-margin--0",
|
|
3170
|
+
children: [
|
|
3171
|
+
"Updated ",
|
|
3172
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
3173
|
+
date: dataset.modified
|
|
3174
|
+
})
|
|
3175
|
+
]
|
|
3176
|
+
})
|
|
3177
|
+
}),
|
|
3178
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3179
|
+
className: "ds-l-md-col--9",
|
|
3180
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3137
3181
|
className: "ds-u-measure--wide ds-u-margin-bottom--7",
|
|
3138
3182
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
3139
|
-
className: "dc-c-metadata-description",
|
|
3183
|
+
className: "dc-c-metadata-description ds-u-margin--0",
|
|
3140
3184
|
dangerouslySetInnerHTML: {
|
|
3141
3185
|
__html: (0, $hgUW1$dompurify).sanitize(dataset.description)
|
|
3142
3186
|
}
|
|
3143
3187
|
})
|
|
3144
3188
|
})
|
|
3145
|
-
|
|
3146
|
-
|
|
3189
|
+
})
|
|
3190
|
+
]
|
|
3147
3191
|
}),
|
|
3148
3192
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3149
3193
|
className: "ds-l-row",
|
|
@@ -3257,7 +3301,7 @@ var $a0f13962e513caa1$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
3257
3301
|
|
|
3258
3302
|
|
|
3259
3303
|
|
|
3260
|
-
const $e5bfafc6d4e6f207$var$SearchModal = ({ searchFunc: searchFunc
|
|
3304
|
+
const $e5bfafc6d4e6f207$var$SearchModal = ({ searchFunc: searchFunc, appNodeId: appNodeId, headingText: headingText, searchModalText: searchModalText, buttonSize: buttonSize, inversedModalButton: inversedModalButton, inversedSearchButton: inversedSearchButton })=>{
|
|
3261
3305
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
3262
3306
|
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)("");
|
|
3263
3307
|
const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
|
|
@@ -3344,8 +3388,8 @@ var $52466563e0d69ea8$exports = {};
|
|
|
3344
3388
|
$52466563e0d69ea8$exports = new URL("CMSGovLogo-O.90ce815c.png", import.meta.url).toString();
|
|
3345
3389
|
|
|
3346
3390
|
|
|
3347
|
-
const $2db98b8f69058a30$var$DesktopHeader = ({ siteName: siteName
|
|
3348
|
-
const { url: url
|
|
3391
|
+
const $2db98b8f69058a30$var$DesktopHeader = ({ siteName: siteName, headerClasses: headerClasses, linkClasses: linkClasses, links: links, org: org, searchModalText: searchModalText, customSearch: customSearch, includeTopNav: includeTopNav, inversedModalButton: inversedModalButton, inversedSearchButton: inversedSearchButton, includeSearch: includeSearch })=>{
|
|
3392
|
+
const { url: url, tagline: tagline, logo: logo, urlTitle: urlTitle, logoAltText: logoAltText } = org;
|
|
3349
3393
|
const headerClassString = headerClasses ?? "dc-c-header ds-base";
|
|
3350
3394
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
|
|
3351
3395
|
className: headerClassString,
|
|
@@ -3466,8 +3510,8 @@ $972485213997ff8b$exports = new URL("CMSgov@2x-white-O.78cd05d3.png", import.met
|
|
|
3466
3510
|
|
|
3467
3511
|
|
|
3468
3512
|
let $caaccb8ea608e518$var$mobileHeaderMenuClassName = "dc-c-mobile-header--menu";
|
|
3469
|
-
const $caaccb8ea608e518$var$MobileHeader = ({ siteName: siteName
|
|
3470
|
-
const { url: url
|
|
3513
|
+
const $caaccb8ea608e518$var$MobileHeader = ({ siteName: siteName, links: links, org: org, searchModalText: searchModalText, customSearch: customSearch = false, includeTopNav: includeTopNav, inversedModalButton: inversedModalButton, inversedSearchButton: inversedSearchButton, includeSearch: includeSearch })=>{
|
|
3514
|
+
const { url: url, logo: logo, urlTitle: urlTitle, logoAltText: logoAltText, inverseLogo: inverseLogo } = org;
|
|
3471
3515
|
const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
|
|
3472
3516
|
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
3473
3517
|
minWidth: 0,
|
|
@@ -3506,21 +3550,15 @@ const $caaccb8ea608e518$var$MobileHeader = ({ siteName: siteName , links: links
|
|
|
3506
3550
|
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
3507
3551
|
if (event.target.closest(".dc-c-search-dialog")) setMenuOpen(false);
|
|
3508
3552
|
}
|
|
3509
|
-
function handleSearchEnter(event) {
|
|
3510
|
-
// Close upon user hitting enter on search.
|
|
3511
|
-
if (event.keyCode === 13) setMenuOpen(false);
|
|
3512
|
-
}
|
|
3513
3553
|
function handleMenuClose(event) {
|
|
3514
3554
|
// Close upon user hitting escape
|
|
3515
3555
|
if (event.keyCode === 27 && menuOpen) setMenuOpen(false);
|
|
3516
3556
|
}
|
|
3517
3557
|
document.addEventListener("mousedown", handleClick);
|
|
3518
|
-
document.addEventListener("keyup", handleSearchEnter);
|
|
3519
3558
|
document.addEventListener("keyup", handleMenuClose);
|
|
3520
3559
|
handleFocusIn();
|
|
3521
3560
|
menu.current.addEventListener("keydown", (evt)=>trapFocus(evt, menu.current));
|
|
3522
3561
|
return ()=>{
|
|
3523
|
-
document.removeEventListener("keyup", handleSearchEnter);
|
|
3524
3562
|
document.removeEventListener("keyup", handleMenuClose);
|
|
3525
3563
|
document.removeEventListener("mousedown", handleClick);
|
|
3526
3564
|
if (menu.current) menu.current.removeEventListener("keydown", trapFocus);
|
|
@@ -3686,7 +3724,7 @@ var $caaccb8ea608e518$export$2e2bcd8739ae039 = $caaccb8ea608e518$var$MobileHeade
|
|
|
3686
3724
|
|
|
3687
3725
|
|
|
3688
3726
|
|
|
3689
|
-
const $a5a6a06d249c33b8$var$Header = ({ mobileMaxWidth: mobileMaxWidth
|
|
3727
|
+
const $a5a6a06d249c33b8$var$Header = ({ mobileMaxWidth: mobileMaxWidth, desktopMinWidth: desktopMinWidth, siteName: siteName, links: links, org: org, includeTopNav: includeTopNav })=>{
|
|
3690
3728
|
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
3691
3729
|
minWidth: 0,
|
|
3692
3730
|
maxWidth: mobileMaxWidth
|
|
@@ -3728,7 +3766,7 @@ var $a5a6a06d249c33b8$export$2e2bcd8739ae039 = $a5a6a06d249c33b8$var$Header;
|
|
|
3728
3766
|
|
|
3729
3767
|
|
|
3730
3768
|
|
|
3731
|
-
const $a6df0aa147323304$var$Footer = ({ links: links
|
|
3769
|
+
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail, emailTitle: emailTitle, emailBody: emailBody, emailLink: emailLink, emailButton: emailButton, socialMediaLinks: socialMediaLinks, hhsLogo: hhsLogo, cmsLogo: cmsLogo, trademarkContent: trademarkContent })=>{
|
|
3732
3770
|
const xs = (0, $hgUW1$useMediaQuery)({
|
|
3733
3771
|
minWidth: 0,
|
|
3734
3772
|
maxWidth: 544
|
|
@@ -3740,7 +3778,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links , showEmail: showEmail , em
|
|
|
3740
3778
|
const md = (0, $hgUW1$useMediaQuery)({
|
|
3741
3779
|
minWidth: 768
|
|
3742
3780
|
});
|
|
3743
|
-
const { footerOpenDataToolLinks: footerOpenDataToolLinks
|
|
3781
|
+
const { footerOpenDataToolLinks: footerOpenDataToolLinks, footerAdditionalResourcesLinks: footerAdditionalResourcesLinks, footerUtilityLinks: footerUtilityLinks } = links;
|
|
3744
3782
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("footer", {
|
|
3745
3783
|
className: "dc-c-footer",
|
|
3746
3784
|
children: [
|
|
@@ -4201,7 +4239,7 @@ var $a6df0aa147323304$export$2e2bcd8739ae039 = $a6df0aa147323304$var$Footer;
|
|
|
4201
4239
|
|
|
4202
4240
|
|
|
4203
4241
|
const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
4204
|
-
const { data: data
|
|
4242
|
+
const { data: data } = props;
|
|
4205
4243
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
4206
4244
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
4207
4245
|
stackable: true,
|
|
@@ -4317,7 +4355,7 @@ const $c7bf75f7e8a68780$export$7850f4d545d994c6 = [
|
|
|
4317
4355
|
|
|
4318
4356
|
|
|
4319
4357
|
const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
4320
|
-
const { documentationList: documentationList
|
|
4358
|
+
const { documentationList: documentationList, children: children } = props;
|
|
4321
4359
|
const defaultContent = /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4322
4360
|
children: "Some datasets are extremely large and may be difficult to download and/or cause computer performance issues. The Centers for Medicare and Medicaid Services (CMS) recommends using WinZip, WinRAR, or 7-Zip for file decompression."
|
|
4323
4361
|
});
|
|
@@ -4482,7 +4520,7 @@ var $efc410f5f7ac5ef3$export$2e2bcd8739ae039 = $efc410f5f7ac5ef3$var$useSearchAP
|
|
|
4482
4520
|
|
|
4483
4521
|
|
|
4484
4522
|
|
|
4485
|
-
const $59a079354baa335c$var$Hero = ({ title: title
|
|
4523
|
+
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl, searchKey: searchKey, textfieldLabel: textfieldLabel, searchButtonText: searchButtonText })=>{
|
|
4486
4524
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
4487
4525
|
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState("");
|
|
4488
4526
|
function submitHero(e) {
|
|
@@ -4578,7 +4616,7 @@ var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
|
|
|
4578
4616
|
|
|
4579
4617
|
|
|
4580
4618
|
|
|
4581
|
-
const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePadding
|
|
4619
|
+
const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePadding, tablePadding: tablePadding })=>{
|
|
4582
4620
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4583
4621
|
className: "ds-u-display--flex",
|
|
4584
4622
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
@@ -4628,7 +4666,7 @@ var $e71aee394fdad8bd$export$2e2bcd8739ae039 = $e71aee394fdad8bd$var$ManageColum
|
|
|
4628
4666
|
|
|
4629
4667
|
|
|
4630
4668
|
const $7848c69a021266f7$var$DataTableRowChanger = (props)=>{
|
|
4631
|
-
const { limit: limit
|
|
4669
|
+
const { limit: limit, rowOptions: rowOptions, setLimit: setLimit } = props;
|
|
4632
4670
|
const rowOptionsFormatted = rowOptions.map((row)=>({
|
|
4633
4671
|
label: row.toString(),
|
|
4634
4672
|
value: row.toString()
|
|
@@ -4750,17 +4788,17 @@ var $ec9e1550b0b034d0$export$2e2bcd8739ae039 = $ec9e1550b0b034d0$var$SettingsIco
|
|
|
4750
4788
|
|
|
4751
4789
|
|
|
4752
4790
|
|
|
4753
|
-
const $af099c546cb226c7$var$ResourceHeader = ({ setTablePadding: setTablePadding
|
|
4791
|
+
const $af099c546cb226c7$var$ResourceHeader = ({ setTablePadding: setTablePadding, id: id, distribution: distribution, includeFiltered: includeFiltered, includeDensity: includeDensity, includeDownload: includeDownload, resource: resource, tablePadding: tablePadding, downloadUrl: downloadUrl })=>{
|
|
4754
4792
|
const md = (0, $hgUW1$useMediaQuery)({
|
|
4755
4793
|
minWidth: 0,
|
|
4756
4794
|
maxWidth: 768
|
|
4757
4795
|
});
|
|
4758
|
-
const { limit: limit
|
|
4796
|
+
const { limit: limit, offset: offset, count: count, setLimit: setLimit, setOffset: setOffset } = resource;
|
|
4759
4797
|
const intCount = count ? parseInt(count) : 0;
|
|
4760
4798
|
const [referenceElement, setReferenceElement] = (0, $hgUW1$useState)(null);
|
|
4761
4799
|
const [popperElement, setPopperElement] = (0, $hgUW1$useState)(null);
|
|
4762
4800
|
const [arrowElement, setArrowElement] = (0, $hgUW1$useState)(null);
|
|
4763
|
-
const { styles: styles
|
|
4801
|
+
const { styles: styles, attributes: attributes } = (0, $hgUW1$usePopper)(referenceElement, popperElement, {
|
|
4764
4802
|
modifiers: [
|
|
4765
4803
|
{
|
|
4766
4804
|
name: "arrow",
|
|
@@ -4806,7 +4844,6 @@ const $af099c546cb226c7$var$ResourceHeader = ({ setTablePadding: setTablePadding
|
|
|
4806
4844
|
size: "small",
|
|
4807
4845
|
className: "ds-u-text-align--left ds-u-font-weight--normal ds-u-font-size--base ds-u-margin-right--1",
|
|
4808
4846
|
href: downloadUrl,
|
|
4809
|
-
"aria-label": "Download filtered data (CSV)",
|
|
4810
4847
|
children: [
|
|
4811
4848
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $e973bc477cdc2dc7$export$2e2bcd8739ae039), {}),
|
|
4812
4849
|
!md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4920,7 +4957,7 @@ function $626282d9a03c51d5$export$1147582dfae658c6(columns, schema) {
|
|
|
4920
4957
|
accessor: column
|
|
4921
4958
|
}));
|
|
4922
4959
|
}
|
|
4923
|
-
function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header
|
|
4960
|
+
function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, accessor: accessor, setFilter: setFilter, filterValue: filterValue } }) {
|
|
4924
4961
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4925
4962
|
label: `Filter by ${Header}`,
|
|
4926
4963
|
onChange: (e)=>{
|
|
@@ -4931,7 +4968,7 @@ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header ,
|
|
|
4931
4968
|
value: filterValue || ""
|
|
4932
4969
|
});
|
|
4933
4970
|
}
|
|
4934
|
-
const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding
|
|
4971
|
+
const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, options: options, resource: resource, defaultSort: defaultSort, customColumns: customColumns, truncateCellHeader: truncateCellHeader, columnSettings: columnSettings, columnWidths: columnWidths, customClasses: customClasses, canResize: canResize })=>{
|
|
4935
4972
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4936
4973
|
id: "resource-preview",
|
|
4937
4974
|
className: "ds-u-overflow--auto ds-u-border-x--1 ds-u-border-bottom--1",
|
|
@@ -4988,8 +5025,8 @@ var $626282d9a03c51d5$export$2e2bcd8739ae039 = $626282d9a03c51d5$var$ResourcePre
|
|
|
4988
5025
|
|
|
4989
5026
|
|
|
4990
5027
|
|
|
4991
|
-
const $072291d44ce1834a$var$ResourceFooter = ({ resource: resource
|
|
4992
|
-
const { limit: limit
|
|
5028
|
+
const $072291d44ce1834a$var$ResourceFooter = ({ resource: resource })=>{
|
|
5029
|
+
const { limit: limit, values: values, offset: offset, count: count, setOffset: setOffset } = resource;
|
|
4993
5030
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4994
5031
|
children: values.length > 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
4995
5032
|
id: "test-default",
|
|
@@ -5013,7 +5050,7 @@ var $072291d44ce1834a$export$2e2bcd8739ae039 = $072291d44ce1834a$var$ResourceFoo
|
|
|
5013
5050
|
|
|
5014
5051
|
|
|
5015
5052
|
|
|
5016
|
-
const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage
|
|
5053
|
+
const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage, pageTrail: pageTrail = [] })=>{
|
|
5017
5054
|
const pageTrailContent = pageTrail.map((page)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
5018
5055
|
class: "dc-c-breadcrumb__list-item",
|
|
5019
5056
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
@@ -5091,7 +5128,7 @@ function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
|
|
|
5091
5128
|
}
|
|
5092
5129
|
return new Date();
|
|
5093
5130
|
}
|
|
5094
|
-
const $374c4669b044ddf8$var$QueryRow = ({ id: id
|
|
5131
|
+
const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema })=>{
|
|
5095
5132
|
const sm = (0, $hgUW1$useMediaQuery)({
|
|
5096
5133
|
minWidth: 0,
|
|
5097
5134
|
maxWidth: 544
|
|
@@ -5216,8 +5253,8 @@ function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
|
|
|
5216
5253
|
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
|
|
5217
5254
|
return cond;
|
|
5218
5255
|
}
|
|
5219
|
-
const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource
|
|
5220
|
-
const { conditions: conditions
|
|
5256
|
+
const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, includeSearchParams: includeSearchParams, customColumns: customColumns })=>{
|
|
5257
|
+
const { conditions: conditions, schema: schema, setConditions: setConditions } = resource;
|
|
5221
5258
|
const fields = Object.keys(schema[id].fields);
|
|
5222
5259
|
const hasConditions = conditions.length > 0;
|
|
5223
5260
|
const [queryCount, setQueryCount] = (0, $hgUW1$useState)(0);
|
|
@@ -5346,7 +5383,8 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
|
|
|
5346
5383
|
|
|
5347
5384
|
|
|
5348
5385
|
|
|
5349
|
-
|
|
5386
|
+
|
|
5387
|
+
const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset, distIndex: distIndex, location: location, apiDocPage: apiDocPage, additionalParams: additionalParams, customColumns: customColumns, columnSettings: columnSettings, columnWidths: columnWidths, customTitle: customTitle, rootUrl: rootUrl })=>{
|
|
5350
5388
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
5351
5389
|
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState("ds-u-padding-y--1");
|
|
5352
5390
|
let apiDocs = (0, $hgUW1$useRef)();
|
|
@@ -5398,6 +5436,18 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id , dataset: dataset
|
|
|
5398
5436
|
className: "ds-title",
|
|
5399
5437
|
children: customTitle ? customTitle : pageTitle
|
|
5400
5438
|
}),
|
|
5439
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5440
|
+
className: "ds-l-row",
|
|
5441
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5442
|
+
className: "ds-l-col--12 ds-u-color--gray ds-u-margin-y--1 ds-u-text-align--right",
|
|
5443
|
+
children: [
|
|
5444
|
+
"Updated ",
|
|
5445
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5446
|
+
date: dataset.modified
|
|
5447
|
+
})
|
|
5448
|
+
]
|
|
5449
|
+
})
|
|
5450
|
+
}),
|
|
5401
5451
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
5402
5452
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
5403
5453
|
dangerouslySetInnerHTML: {
|
|
@@ -5467,10 +5517,10 @@ var $dd6eb2b30d7ad75d$export$2e2bcd8739ae039 = $dd6eb2b30d7ad75d$var$FilteredRes
|
|
|
5467
5517
|
|
|
5468
5518
|
|
|
5469
5519
|
|
|
5470
|
-
const $f61ecf9f84951a61$var$FilteredResource = ({ id: id
|
|
5520
|
+
const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, location: location, apiDocPage: apiDocPage, additionalParams: additionalParams, customColumns: customColumns, setDatasetTitle: setDatasetTitle, columnSettings: columnSettings, columnWidths: columnWidths, customTitle: customTitle, rootUrl: rootUrl })=>{
|
|
5471
5521
|
const [ready, setReady] = (0, $hgUW1$useState)(false);
|
|
5472
5522
|
const [error, setError] = (0, $hgUW1$useState)(false);
|
|
5473
|
-
const { dataset: dataset
|
|
5523
|
+
const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl, additionalParams);
|
|
5474
5524
|
const distIndex = dist_id === "data" ? 0 : dist_id;
|
|
5475
5525
|
(0, $hgUW1$useEffect)(()=>{
|
|
5476
5526
|
if (dataset.error) setError(true);
|
|
@@ -5566,7 +5616,7 @@ var $eb7821d186b1a389$export$2e2bcd8739ae039 = $eb7821d186b1a389$var$useAddLogin
|
|
|
5566
5616
|
|
|
5567
5617
|
|
|
5568
5618
|
const $90fb213ab8eeb2e7$var$useScrollToTop = ()=>{
|
|
5569
|
-
const { pathname: pathname
|
|
5619
|
+
const { pathname: pathname } = (0, $hgUW1$useLocation)();
|
|
5570
5620
|
(0, $hgUW1$useEffect)(()=>{
|
|
5571
5621
|
window.scrollTo(0, 0);
|
|
5572
5622
|
}, [
|