@civicactions/cmsds-open-data-components 3.9.6-alpha.0 → 3.9.7-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 +58 -41
- package/dist/main.css.map +1 -1
- package/dist/main.js +148 -96
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +65 -52
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./main.css";
|
|
2
2
|
import {jsx as $hgUW1$jsx, jsxs as $hgUW1$jsxs, Fragment as $hgUW1$Fragment} from "react/jsx-runtime";
|
|
3
|
-
import {Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, Button as $hgUW1$Button, CloseIconThin as $hgUW1$CloseIconThin, ArrowIcon as $hgUW1$ArrowIcon, Spinner as $hgUW1$Spinner, Alert as $hgUW1$Alert, Dialog as $hgUW1$Dialog, TextField as $hgUW1$TextField, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon,
|
|
3
|
+
import {Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, Button as $hgUW1$Button, CloseIconThin as $hgUW1$CloseIconThin, ArrowIcon as $hgUW1$ArrowIcon, Spinner as $hgUW1$Spinner, Alert as $hgUW1$Alert, Dialog as $hgUW1$Dialog, TextField as $hgUW1$TextField, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon, Choice as $hgUW1$Choice, Dropdown as $hgUW1$Dropdown, Pagination as $hgUW1$Pagination, Badge as $hgUW1$Badge, Table as $hgUW1$Table, TableHead as $hgUW1$TableHead, TableRow as $hgUW1$TableRow, TableCell as $hgUW1$TableCell, TableBody as $hgUW1$TableBody, Tabs as $hgUW1$Tabs, TabPanel as $hgUW1$TabPanel} from "@cmsgov/design-system";
|
|
4
4
|
import $hgUW1$react, {createContext as $hgUW1$createContext, useState as $hgUW1$useState, useRef as $hgUW1$useRef, useEffect as $hgUW1$useEffect, useContext as $hgUW1$useContext, useMemo as $hgUW1$useMemo, useCallback as $hgUW1$useCallback} from "react";
|
|
5
5
|
import {NavLink as $hgUW1$NavLink, Link as $hgUW1$Link, useNavigate as $hgUW1$useNavigate, useLocation as $hgUW1$useLocation, useSearchParams as $hgUW1$useSearchParams} from "react-router-dom";
|
|
6
6
|
import $hgUW1$qs from "qs";
|
|
@@ -1110,6 +1110,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1110
1110
|
version: "1.1",
|
|
1111
1111
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1112
1112
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1113
|
+
"aria-hidden": "true",
|
|
1113
1114
|
children: [
|
|
1114
1115
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
1115
1116
|
children: "Overview Icon"
|
|
@@ -1152,6 +1153,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1152
1153
|
version: "1.1",
|
|
1153
1154
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1154
1155
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1156
|
+
"aria-hidden": "true",
|
|
1155
1157
|
children: [
|
|
1156
1158
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
1157
1159
|
children: "Data Table Icon"
|
|
@@ -1184,6 +1186,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1184
1186
|
version: "1.1",
|
|
1185
1187
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1186
1188
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1189
|
+
"aria-hidden": "true",
|
|
1187
1190
|
children: [
|
|
1188
1191
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
1189
1192
|
children: "API Icon"
|
|
@@ -1216,6 +1219,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1216
1219
|
version: "1.1",
|
|
1217
1220
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1218
1221
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1222
|
+
"aria-hidden": "true",
|
|
1219
1223
|
children: [
|
|
1220
1224
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
1221
1225
|
children: "Download Icon"
|
|
@@ -1245,6 +1249,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1245
1249
|
version: "1.1",
|
|
1246
1250
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1247
1251
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1252
|
+
"aria-hidden": "true",
|
|
1248
1253
|
children: [
|
|
1249
1254
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
1250
1255
|
children: "Data Dictionary Icon"
|
|
@@ -1467,11 +1472,29 @@ const $20de4fedf33d4f9a$var$DatasetDate = (props)=>{
|
|
|
1467
1472
|
var $20de4fedf33d4f9a$export$2e2bcd8739ae039 = $20de4fedf33d4f9a$var$DatasetDate;
|
|
1468
1473
|
|
|
1469
1474
|
|
|
1475
|
+
function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
1476
|
+
if (dist && dist.data) {
|
|
1477
|
+
if (dist.data.format) return dist.data.format.toLowerCase();
|
|
1478
|
+
if (dist.data.mediaType) {
|
|
1479
|
+
const mediaType = dist.data.mediaType.split("/");
|
|
1480
|
+
if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
|
|
1481
|
+
}
|
|
1482
|
+
if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
|
|
1483
|
+
if (dist.data["%Ref:downloadURL"][0].data.mimeType) {
|
|
1484
|
+
const mimeType = dist.data["%Ref:downloadURL"][0].data.mimeType.split("/");
|
|
1485
|
+
if (mimeType.length && mimeType[1]) return mimeType[1].toLowerCase();
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
return "";
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
|
|
1470
1493
|
const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
1471
1494
|
const desktop = (0, $hgUW1$useMediaQuery)({
|
|
1472
1495
|
minWidth: 1024
|
|
1473
1496
|
});
|
|
1474
|
-
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 } = props;
|
|
1497
|
+
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;
|
|
1475
1498
|
const location = (0, $hgUW1$useLocation)();
|
|
1476
1499
|
let linkContainerClasses = "ds-u-margin-bottom--2";
|
|
1477
1500
|
if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
|
|
@@ -1510,6 +1533,66 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1510
1533
|
refresh: refresh
|
|
1511
1534
|
};
|
|
1512
1535
|
const url = `/dataset/${identifier}`;
|
|
1536
|
+
const DataTableLink = ()=>{
|
|
1537
|
+
if ((0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv") return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1538
|
+
to: `${url}#data-table`,
|
|
1539
|
+
children: [
|
|
1540
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1541
|
+
id: "data-table"
|
|
1542
|
+
}),
|
|
1543
|
+
"Data Table"
|
|
1544
|
+
]
|
|
1545
|
+
});
|
|
1546
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
|
|
1547
|
+
className: "dkan-disabled-link",
|
|
1548
|
+
component: "a",
|
|
1549
|
+
offset: [
|
|
1550
|
+
0,
|
|
1551
|
+
5
|
|
1552
|
+
],
|
|
1553
|
+
title: "There is no Data Table associated with this dataset. Data Tables will only display for CSV files.",
|
|
1554
|
+
"aria-disabled": "true",
|
|
1555
|
+
children: [
|
|
1556
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1557
|
+
id: "data-table"
|
|
1558
|
+
}),
|
|
1559
|
+
"Data Table"
|
|
1560
|
+
]
|
|
1561
|
+
});
|
|
1562
|
+
};
|
|
1563
|
+
const dataDictionaryExists = ()=>{
|
|
1564
|
+
if (distribution && "data" in distribution) {
|
|
1565
|
+
if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType === "application/vnd.tableschema+json";
|
|
1566
|
+
}
|
|
1567
|
+
return false;
|
|
1568
|
+
};
|
|
1569
|
+
const DataDictionaryLink = ()=>{
|
|
1570
|
+
if (dataDictionaryExists()) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1571
|
+
to: `${url}#data-dictionary`,
|
|
1572
|
+
children: [
|
|
1573
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1574
|
+
id: "data-dictionary"
|
|
1575
|
+
}),
|
|
1576
|
+
"Data Dictionary"
|
|
1577
|
+
]
|
|
1578
|
+
});
|
|
1579
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
|
|
1580
|
+
className: "dkan-disabled-link",
|
|
1581
|
+
component: "a",
|
|
1582
|
+
offset: [
|
|
1583
|
+
0,
|
|
1584
|
+
5
|
|
1585
|
+
],
|
|
1586
|
+
title: "There is no Data Dictionary associated with this dataset.",
|
|
1587
|
+
"aria-disabled": "true",
|
|
1588
|
+
children: [
|
|
1589
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1590
|
+
id: "data-dictionary"
|
|
1591
|
+
}),
|
|
1592
|
+
"Data Dictionary"
|
|
1593
|
+
]
|
|
1594
|
+
});
|
|
1595
|
+
};
|
|
1513
1596
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1514
1597
|
className: "dc-c-search-list-item ds-u-padding-top--3",
|
|
1515
1598
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
@@ -1591,16 +1674,8 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1591
1674
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1592
1675
|
className: linkContainerClasses,
|
|
1593
1676
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1594
|
-
className: linkClasses,
|
|
1595
|
-
children: /*#__PURE__*/ (0, $hgUW1$
|
|
1596
|
-
to: `${url}#data-table`,
|
|
1597
|
-
children: [
|
|
1598
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1599
|
-
id: "data-table"
|
|
1600
|
-
}),
|
|
1601
|
-
"Data Table"
|
|
1602
|
-
]
|
|
1603
|
-
})
|
|
1677
|
+
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? "" : " dkan-disabled-link-wrapper"}`,
|
|
1678
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataTableLink, {})
|
|
1604
1679
|
})
|
|
1605
1680
|
}),
|
|
1606
1681
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -1621,16 +1696,8 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1621
1696
|
dataDictionaryLinks ? /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1622
1697
|
className: linkContainerClasses,
|
|
1623
1698
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1624
|
-
className: linkClasses
|
|
1625
|
-
children: /*#__PURE__*/ (0, $hgUW1$
|
|
1626
|
-
to: `${url}#data-dictionary`,
|
|
1627
|
-
children: [
|
|
1628
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1629
|
-
id: "data-dictionary"
|
|
1630
|
-
}),
|
|
1631
|
-
"Data Dictionary"
|
|
1632
|
-
]
|
|
1633
|
-
})
|
|
1699
|
+
className: `${linkClasses}${dataDictionaryExists() ? "" : " dkan-disabled-link-wrapper"}`,
|
|
1700
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataDictionaryLink, {})
|
|
1634
1701
|
})
|
|
1635
1702
|
}) : "",
|
|
1636
1703
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -1664,6 +1731,47 @@ var $52c6454cae137465$export$2e2bcd8739ae039 = $52c6454cae137465$var$DatasetSear
|
|
|
1664
1731
|
|
|
1665
1732
|
|
|
1666
1733
|
|
|
1734
|
+
const $e011250e8a3bd5e5$var$SearchFacets = (props)=>{
|
|
1735
|
+
const { facets: facets, title: title, onClickFunction: onClickFunction, selectedFacets: selectedFacets = [] } = props;
|
|
1736
|
+
const filteredFacets = facets.filter((f)=>{
|
|
1737
|
+
return Number(f.total) > 0 || selectedFacets.findIndex((i)=>i === f.name) !== -1;
|
|
1738
|
+
});
|
|
1739
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1740
|
+
className: "dkan-dataset-search--facet-container ds-u-margin-bottom--4",
|
|
1741
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
|
|
1742
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
1743
|
+
contentClassName: "ds-u-padding-left--1 ds-u-padding-right--0",
|
|
1744
|
+
heading: title,
|
|
1745
|
+
defaultOpen: true,
|
|
1746
|
+
children: !filteredFacets.length ? /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1747
|
+
className: "ds-text-heading--md",
|
|
1748
|
+
children: "No matching facets found."
|
|
1749
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
1750
|
+
children: filteredFacets.map((f)=>{
|
|
1751
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1752
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Choice), {
|
|
1753
|
+
className: "ds-u-margin-y--1",
|
|
1754
|
+
checked: selectedFacets.findIndex((s)=>s === f.name) > -1 ? true : false,
|
|
1755
|
+
name: `facet_theme_${f.name}`,
|
|
1756
|
+
type: "checkbox",
|
|
1757
|
+
label: `${f.name} (${f.total})`,
|
|
1758
|
+
value: f.name,
|
|
1759
|
+
onClick: ()=>onClickFunction(f.type, f.name)
|
|
1760
|
+
})
|
|
1761
|
+
}, f.name);
|
|
1762
|
+
})
|
|
1763
|
+
})
|
|
1764
|
+
})
|
|
1765
|
+
})
|
|
1766
|
+
});
|
|
1767
|
+
};
|
|
1768
|
+
var $e011250e8a3bd5e5$export$2e2bcd8739ae039 = $e011250e8a3bd5e5$var$SearchFacets;
|
|
1769
|
+
|
|
1770
|
+
|
|
1771
|
+
|
|
1772
|
+
|
|
1773
|
+
|
|
1774
|
+
|
|
1667
1775
|
|
|
1668
1776
|
|
|
1669
1777
|
const $789279954d8eff7f$var$ApiDocumentation = ({ endpoint: endpoint })=>{
|
|
@@ -3828,46 +3936,6 @@ var $026cb986f9fea2b1$export$2e2bcd8739ae039 = $026cb986f9fea2b1$var$PageNotFoun
|
|
|
3828
3936
|
|
|
3829
3937
|
|
|
3830
3938
|
|
|
3831
|
-
|
|
3832
|
-
const $e011250e8a3bd5e5$var$SearchFacets = (props)=>{
|
|
3833
|
-
const { facets: facets, title: title, onClickFunction: onClickFunction, selectedFacets: selectedFacets = [] } = props;
|
|
3834
|
-
const filteredFacets = facets.filter((f)=>{
|
|
3835
|
-
return Number(f.total) > 0 || selectedFacets.findIndex((i)=>i === f.name) !== -1;
|
|
3836
|
-
});
|
|
3837
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3838
|
-
className: "dkan-dataset-search--facet-container ds-u-margin-bottom--4",
|
|
3839
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
|
|
3840
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
3841
|
-
contentClassName: "ds-u-padding-left--1 ds-u-padding-right--0",
|
|
3842
|
-
heading: title,
|
|
3843
|
-
defaultOpen: true,
|
|
3844
|
-
children: !filteredFacets.length ? /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
3845
|
-
className: "ds-text-heading--md",
|
|
3846
|
-
children: "No matching facets found."
|
|
3847
|
-
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
3848
|
-
children: filteredFacets.map((f)=>{
|
|
3849
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
3850
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Choice), {
|
|
3851
|
-
className: "ds-u-margin-y--1",
|
|
3852
|
-
checked: selectedFacets.findIndex((s)=>s === f.name) > -1 ? true : false,
|
|
3853
|
-
name: `facet_theme_${f.name}`,
|
|
3854
|
-
type: "checkbox",
|
|
3855
|
-
label: `${f.name} (${f.total})`,
|
|
3856
|
-
value: f.name,
|
|
3857
|
-
onClick: ()=>onClickFunction(f.type, f.name)
|
|
3858
|
-
})
|
|
3859
|
-
}, f.name);
|
|
3860
|
-
})
|
|
3861
|
-
})
|
|
3862
|
-
})
|
|
3863
|
-
})
|
|
3864
|
-
});
|
|
3865
|
-
};
|
|
3866
|
-
var $e011250e8a3bd5e5$export$2e2bcd8739ae039 = $e011250e8a3bd5e5$var$SearchFacets;
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
3939
|
const $3b2d31a9c6cd2284$var$LargeFileInfo = (props)=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
3872
3940
|
className: props.className,
|
|
3873
3941
|
children: [
|
|
@@ -4364,7 +4432,8 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4364
4432
|
downloadUrl: showDownloadIcon ? getDownloadUrl(item) : null,
|
|
4365
4433
|
largeFile: showLargeFile,
|
|
4366
4434
|
paginationEnabled: enablePagination,
|
|
4367
|
-
dataDictionaryLinks: dataDictionaryLinks
|
|
4435
|
+
dataDictionaryLinks: dataDictionaryLinks,
|
|
4436
|
+
distribution: "%Ref:distribution" in item ? item["%Ref:distribution"][0] : {}
|
|
4368
4437
|
}, item.identifier);
|
|
4369
4438
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
4370
4439
|
variation: "error",
|
|
@@ -5146,23 +5215,6 @@ const $0958733ee130fc44$var$ResourceInformation = ({ resource: resource })=>{
|
|
|
5146
5215
|
var $0958733ee130fc44$export$2e2bcd8739ae039 = $0958733ee130fc44$var$ResourceInformation;
|
|
5147
5216
|
|
|
5148
5217
|
|
|
5149
|
-
function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
5150
|
-
if (dist && dist.data) {
|
|
5151
|
-
if (dist.data.format) return dist.data.format.toLowerCase();
|
|
5152
|
-
if (dist.data.mediaType) {
|
|
5153
|
-
const mediaType = dist.data.mediaType.split("/");
|
|
5154
|
-
if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
|
|
5155
|
-
}
|
|
5156
|
-
if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
|
|
5157
|
-
if (dist.data["%Ref:downloadURL"][0].data.mimeType) {
|
|
5158
|
-
const mimeType = dist.data["%Ref:downloadURL"][0].data.mimeType.split("/");
|
|
5159
|
-
if (mimeType.length && mimeType[1]) return mimeType[1].toLowerCase();
|
|
5160
|
-
}
|
|
5161
|
-
}
|
|
5162
|
-
}
|
|
5163
|
-
return "";
|
|
5164
|
-
}
|
|
5165
|
-
|
|
5166
5218
|
|
|
5167
5219
|
|
|
5168
5220
|
const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource: resource, title: title })=>{
|
|
@@ -5935,7 +5987,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
5935
5987
|
dataDictionaryLoading: isPending
|
|
5936
5988
|
};
|
|
5937
5989
|
};
|
|
5938
|
-
const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns: customColumns, setDatasetTitle: setDatasetTitle, customMetadataMapping: customMetadataMapping, apiPageUrl: apiPageUrl = "/api", dataDictionaryUrl: dataDictionaryUrl, borderlessTabs: borderlessTabs = false, defaultPageSize: defaultPageSize = 25, dataDictionaryCSV: dataDictionaryCSV = false, dataDictionaryBanner: dataDictionaryBanner = false, disableTableControls: disableTableControls = false, hideDataDictionary: hideDataDictionary = false,
|
|
5990
|
+
const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns: customColumns, setDatasetTitle: setDatasetTitle, customMetadataMapping: customMetadataMapping, apiPageUrl: apiPageUrl = "/api", dataDictionaryUrl: dataDictionaryUrl, borderlessTabs: borderlessTabs = false, defaultPageSize: defaultPageSize = 25, dataDictionaryCSV: dataDictionaryCSV = false, dataDictionaryBanner: dataDictionaryBanner = false, disableTableControls: disableTableControls = false, hideDataDictionary: hideDataDictionary = false, customDescription: customDescription, updateAriaLive: updateAriaLive, showRowLimitNotice: showRowLimitNotice = false })=>{
|
|
5939
5991
|
const options = location.search ? {
|
|
5940
5992
|
...(0, $hgUW1$qs).parse(location.search, {
|
|
5941
5993
|
ignoreQueryPrefix: true
|
|
@@ -6020,6 +6072,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6020
6072
|
window.location.hash
|
|
6021
6073
|
]);
|
|
6022
6074
|
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === "application/vnd.tableschema+json" || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
6075
|
+
const formatType = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6023
6076
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6024
6077
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
6025
6078
|
content: notFoundContent,
|
|
@@ -6071,7 +6124,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6071
6124
|
},
|
|
6072
6125
|
selectedId: selectedTab,
|
|
6073
6126
|
children: [
|
|
6074
|
-
|
|
6127
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6075
6128
|
id: "data-table",
|
|
6076
6129
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6077
6130
|
className: "ds-u-color--primary",
|
|
@@ -6083,7 +6136,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6083
6136
|
]
|
|
6084
6137
|
}),
|
|
6085
6138
|
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6086
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
6139
|
+
children: (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
6087
6140
|
value: {
|
|
6088
6141
|
id: id,
|
|
6089
6142
|
resource: resource,
|
|
@@ -6094,6 +6147,8 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6094
6147
|
datasetTableControls: !disableTableControls
|
|
6095
6148
|
},
|
|
6096
6149
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $39bc4d98030a5599$export$2e2bcd8739ae039), {})
|
|
6150
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6151
|
+
children: "There is no Data Table associated with this dataset. Data Tables will only display for CSV files."
|
|
6097
6152
|
})
|
|
6098
6153
|
}),
|
|
6099
6154
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
@@ -6115,7 +6170,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6115
6170
|
metadataMapping: metadataMapping
|
|
6116
6171
|
})
|
|
6117
6172
|
}),
|
|
6118
|
-
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$
|
|
6173
|
+
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6119
6174
|
id: "data-dictionary",
|
|
6120
6175
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6121
6176
|
className: "ds-u-color--primary",
|
|
@@ -6127,17 +6182,14 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6127
6182
|
]
|
|
6128
6183
|
}),
|
|
6129
6184
|
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6130
|
-
children:
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
children: "There is no Data Dictionary associated with this dataset."
|
|
6139
|
-
})
|
|
6140
|
-
]
|
|
6185
|
+
children: displayDataDictionaryTab ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
6186
|
+
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
6187
|
+
datasetDictionaryEndpoint: distribution.data.describedBy,
|
|
6188
|
+
title: "Data Dictionary",
|
|
6189
|
+
csvDownload: dataDictionaryCSV
|
|
6190
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6191
|
+
children: "There is no Data Dictionary associated with this dataset."
|
|
6192
|
+
})
|
|
6141
6193
|
}),
|
|
6142
6194
|
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6143
6195
|
id: "api",
|
|
@@ -7632,5 +7684,5 @@ var $90fb213ab8eeb2e7$export$2e2bcd8739ae039 = $90fb213ab8eeb2e7$var$useScrollTo
|
|
|
7632
7684
|
|
|
7633
7685
|
|
|
7634
7686
|
|
|
7635
|
-
export {$e49d4387bed21287$export$2e2bcd8739ae039 as ApiRowLimitNotice, $a8accc31bf9e0bda$export$2e2bcd8739ae039 as CMSTopNav, $c49454ea7d1c4579$export$2e2bcd8739ae039 as ErrorBoundary, $046ded0064bd0a3d$export$2e2bcd8739ae039 as FAQAccordion, $b939b31651e82908$export$2e2bcd8739ae039 as HeaderNav, $1555e1cb3eb7b3e3$export$2e2bcd8739ae039 as HeaderNavIconLink, $fea9297ba4dd394c$export$2e2bcd8739ae039 as HeaderSearch, $9a8892c5ac150556$export$2e2bcd8739ae039 as HeaderSiteTitle, $3c72c298c3a7f21f$export$2e2bcd8739ae039 as HeaderTagline, $403833a4b442d5df$export$2e2bcd8739ae039 as MobileMenuButton, $f57121650539d8c5$export$2e2bcd8739ae039 as NavBar, $953b286f7778640e$export$2e2bcd8739ae039 as SidebarNavigation, $b0968edc60d7d3a4$export$2e2bcd8739ae039 as SidebarPage, $4f153ca537d853e5$export$2e2bcd8739ae039 as SubMenu, $59a079354baa335c$export$2e2bcd8739ae039 as Hero, $c068004d499082cc$export$2e2bcd8739ae039 as DatasetListItem, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $17711e94d2ce0ee4$export$2e2bcd8739ae039 as DatasetDateItem, $20de4fedf33d4f9a$export$2e2bcd8739ae039 as DatasetDate, $10bc3aae21fc1572$export$2e2bcd8739ae039 as DatasetListSubmenu, $789279954d8eff7f$export$2e2bcd8739ae039 as ApiDocumentation, $af099c546cb226c7$export$2e2bcd8739ae039 as ResourceHeader, $626282d9a03c51d5$export$2e2bcd8739ae039 as ResourcePreview, $072291d44ce1834a$export$2e2bcd8739ae039 as ResourceFooter, $ec3e23baa005dc03$export$2e2bcd8739ae039 as Breadcrumb, $bd76a91923d7e8a7$export$2e2bcd8739ae039 as TransformedDate, $d98f94c79ddf4e0e$export$2e2bcd8739ae039 as DataTable, $bdb071ea3a6d3466$export$2e2bcd8739ae039 as SearchInput, $5644ebd2c3dbfd7b$export$eea3a12df15499ca as buildRows, $2ed0091f7e32d1e6$export$2e2bcd8739ae039 as DataTablePageResults, $1a2bf34e2a8f6b80$export$59a943b34a82e690 as truncateText, $c96c4b9ef7203c1f$export$2e2bcd8739ae039 as APIPage, $026cb986f9fea2b1$export$2e2bcd8739ae039 as PageNotFound, $e873081a6e8f024e$export$2e2bcd8739ae039 as DatasetSearch, $550bcc185f420ff5$export$2e2bcd8739ae039 as DatasetList, $a0f13962e513caa1$export$2e2bcd8739ae039 as Dataset, $a35cf16d1488f54e$export$2e2bcd8739ae039 as DatasetTable, $b9af6ce5e2c06331$export$2e2bcd8739ae039 as Header, $a6df0aa147323304$export$2e2bcd8739ae039 as Footer, $669d2782ec2e2250$export$2e2bcd8739ae039 as SpecsAndLimits, $8b67b7ee3fcfb629$export$2e2bcd8739ae039 as StoredQueryPage, $f61ecf9f84951a61$export$2e2bcd8739ae039 as FilteredResource, $bef7bff2823feea2$export$2e2bcd8739ae039 as QueryTitle, $7264a673914aa746$export$2b9377795161999 as buildOperatorOptions, $7264a673914aa746$export$e284ae5d89467c8f as convertUTCToLocalDate, $7264a673914aa746$export$6b5e57d20078142b as cleanText, $7264a673914aa746$export$8049e8f40a9bdfb8 as buildCustomColHeaders, $11500a65bd7d9cf1$export$2e2bcd8739ae039 as HeaderContext, $43a30d745a7bbc86$export$2e2bcd8739ae039 as DataTableContext, $ebda441784d176a5$export$2e2bcd8739ae039 as ManageColumnsContext, $844981eac9b63865$export$eccc29c8d0ff408 as ACAContext, $efc410f5f7ac5ef3$export$2e2bcd8739ae039 as useSearchAPI, $1d3d480a9cfaabe0$export$2e2bcd8739ae039 as useDatastore, $aa4450dcbeef3ac0$export$385a5aba38cc3325 as transformTableSortToQuerySort, $eb7821d186b1a389$export$2e2bcd8739ae039 as useAddLoginLink, $90fb213ab8eeb2e7$export$2e2bcd8739ae039 as useScrollToTop, $b4aa9c66f2e86959$export$2e2bcd8739ae039 as useMetastoreDataset, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 as withQueryProvider, $6d5c0212e738499b$export$34e95918366a058e as acaToParams, $6da0396069e23175$export$bc27cf7ecf44639d as defaultMetadataMapping};
|
|
7687
|
+
export {$e49d4387bed21287$export$2e2bcd8739ae039 as ApiRowLimitNotice, $a8accc31bf9e0bda$export$2e2bcd8739ae039 as CMSTopNav, $c49454ea7d1c4579$export$2e2bcd8739ae039 as ErrorBoundary, $046ded0064bd0a3d$export$2e2bcd8739ae039 as FAQAccordion, $b939b31651e82908$export$2e2bcd8739ae039 as HeaderNav, $1555e1cb3eb7b3e3$export$2e2bcd8739ae039 as HeaderNavIconLink, $fea9297ba4dd394c$export$2e2bcd8739ae039 as HeaderSearch, $9a8892c5ac150556$export$2e2bcd8739ae039 as HeaderSiteTitle, $3c72c298c3a7f21f$export$2e2bcd8739ae039 as HeaderTagline, $403833a4b442d5df$export$2e2bcd8739ae039 as MobileMenuButton, $f57121650539d8c5$export$2e2bcd8739ae039 as NavBar, $953b286f7778640e$export$2e2bcd8739ae039 as SidebarNavigation, $b0968edc60d7d3a4$export$2e2bcd8739ae039 as SidebarPage, $4f153ca537d853e5$export$2e2bcd8739ae039 as SubMenu, $59a079354baa335c$export$2e2bcd8739ae039 as Hero, $c068004d499082cc$export$2e2bcd8739ae039 as DatasetListItem, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $17711e94d2ce0ee4$export$2e2bcd8739ae039 as DatasetDateItem, $20de4fedf33d4f9a$export$2e2bcd8739ae039 as DatasetDate, $10bc3aae21fc1572$export$2e2bcd8739ae039 as DatasetListSubmenu, $e011250e8a3bd5e5$export$2e2bcd8739ae039 as DatasetSearchFacets, $789279954d8eff7f$export$2e2bcd8739ae039 as ApiDocumentation, $af099c546cb226c7$export$2e2bcd8739ae039 as ResourceHeader, $626282d9a03c51d5$export$2e2bcd8739ae039 as ResourcePreview, $072291d44ce1834a$export$2e2bcd8739ae039 as ResourceFooter, $ec3e23baa005dc03$export$2e2bcd8739ae039 as Breadcrumb, $bd76a91923d7e8a7$export$2e2bcd8739ae039 as TransformedDate, $d98f94c79ddf4e0e$export$2e2bcd8739ae039 as DataTable, $bdb071ea3a6d3466$export$2e2bcd8739ae039 as SearchInput, $5644ebd2c3dbfd7b$export$eea3a12df15499ca as buildRows, $2ed0091f7e32d1e6$export$2e2bcd8739ae039 as DataTablePageResults, $1a2bf34e2a8f6b80$export$59a943b34a82e690 as truncateText, $c96c4b9ef7203c1f$export$2e2bcd8739ae039 as APIPage, $026cb986f9fea2b1$export$2e2bcd8739ae039 as PageNotFound, $e873081a6e8f024e$export$2e2bcd8739ae039 as DatasetSearch, $550bcc185f420ff5$export$2e2bcd8739ae039 as DatasetList, $a0f13962e513caa1$export$2e2bcd8739ae039 as Dataset, $a35cf16d1488f54e$export$2e2bcd8739ae039 as DatasetTable, $b9af6ce5e2c06331$export$2e2bcd8739ae039 as Header, $a6df0aa147323304$export$2e2bcd8739ae039 as Footer, $669d2782ec2e2250$export$2e2bcd8739ae039 as SpecsAndLimits, $8b67b7ee3fcfb629$export$2e2bcd8739ae039 as StoredQueryPage, $f61ecf9f84951a61$export$2e2bcd8739ae039 as FilteredResource, $bef7bff2823feea2$export$2e2bcd8739ae039 as QueryTitle, $7264a673914aa746$export$2b9377795161999 as buildOperatorOptions, $7264a673914aa746$export$e284ae5d89467c8f as convertUTCToLocalDate, $7264a673914aa746$export$6b5e57d20078142b as cleanText, $7264a673914aa746$export$8049e8f40a9bdfb8 as buildCustomColHeaders, $11500a65bd7d9cf1$export$2e2bcd8739ae039 as HeaderContext, $43a30d745a7bbc86$export$2e2bcd8739ae039 as DataTableContext, $ebda441784d176a5$export$2e2bcd8739ae039 as ManageColumnsContext, $844981eac9b63865$export$eccc29c8d0ff408 as ACAContext, $efc410f5f7ac5ef3$export$2e2bcd8739ae039 as useSearchAPI, $1d3d480a9cfaabe0$export$2e2bcd8739ae039 as useDatastore, $aa4450dcbeef3ac0$export$385a5aba38cc3325 as transformTableSortToQuerySort, $eb7821d186b1a389$export$2e2bcd8739ae039 as useAddLoginLink, $90fb213ab8eeb2e7$export$2e2bcd8739ae039 as useScrollToTop, $b4aa9c66f2e86959$export$2e2bcd8739ae039 as useMetastoreDataset, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 as withQueryProvider, $6d5c0212e738499b$export$34e95918366a058e as acaToParams, $6da0396069e23175$export$bc27cf7ecf44639d as defaultMetadataMapping};
|
|
7636
7688
|
//# sourceMappingURL=main.js.map
|