@civicactions/cmsds-open-data-components 3.9.0-alpha.1 → 3.9.0-alpha.3

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.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, Dropdown as $hgUW1$Dropdown, Choice as $hgUW1$Choice, 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, TooltipIcon as $hgUW1$TooltipIcon} from "@cmsgov/design-system";
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, Dropdown as $hgUW1$Dropdown, Choice as $hgUW1$Choice, 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, useSearchParams as $hgUW1$useSearchParams, Link as $hgUW1$Link, useNavigate as $hgUW1$useNavigate, useLocation as $hgUW1$useLocation} from "react-router-dom";
6
6
  import $hgUW1$qs from "qs";
@@ -481,7 +481,7 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
481
481
  children: [
482
482
  /*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
483
483
  className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0 ds-u-lg-margin-top--2 ds-u-margin-bottom--2 ds-u-display--block",
484
- "data-testid": "results-list",
484
+ "data-testid": "submenu-results-list",
485
485
  children: [
486
486
  noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
487
487
  variation: "error",
@@ -1098,6 +1098,99 @@ var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
1098
1098
 
1099
1099
 
1100
1100
 
1101
+ const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date, options: options = {
1102
+ year: "numeric",
1103
+ month: "long",
1104
+ day: "numeric",
1105
+ timeZone: "UTC"
1106
+ } })=>{
1107
+ const rawDate = new Date(date);
1108
+ let modifiedDate = "";
1109
+ if (rawDate) modifiedDate = rawDate.toLocaleDateString("en-US", options);
1110
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
1111
+ children: modifiedDate
1112
+ });
1113
+ };
1114
+ var $bd76a91923d7e8a7$export$2e2bcd8739ae039 = $bd76a91923d7e8a7$var$TransformedDate;
1115
+
1116
+
1117
+
1118
+ const $c068004d499082cc$var$DatasetListItem = (props)=>{
1119
+ const desktop = (0, $hgUW1$useMediaQuery)({
1120
+ minWidth: 1024
1121
+ });
1122
+ const { title: title, modified: modified, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
1123
+ let linkContainerClasses = "ds-u-margin-bottom--2";
1124
+ if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
1125
+ else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
1126
+ let linkClasses = "ds-u-display--block ds-u-text-align--left";
1127
+ if (desktop) {
1128
+ linkContainerClasses = "ds-u-padding-x--0";
1129
+ linkClasses += " ds-l-col--4 ds-l-md-col--auto";
1130
+ }
1131
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1132
+ className: "dc-c-list-item ds-u-padding-top--4",
1133
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1134
+ className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
1135
+ children: [
1136
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1137
+ className: "ds-l-row ds-u-align-items--start",
1138
+ children: [
1139
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
1140
+ id: `dataset-${identifier}-updated-date`,
1141
+ 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"}`,
1142
+ children: [
1143
+ "Updated ",
1144
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
1145
+ date: modified
1146
+ })
1147
+ ]
1148
+ }),
1149
+ /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
1150
+ className: "ds-l-col--12 ds-text-heading--2xl",
1151
+ children: title
1152
+ })
1153
+ ]
1154
+ }),
1155
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1156
+ className: "ds-l-row",
1157
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1158
+ className: "ds-l-col--12 ds-l-md-col--12 ds-u-margin-top--2",
1159
+ children: [
1160
+ "The ",
1161
+ title,
1162
+ " dataset was updated."
1163
+ ]
1164
+ })
1165
+ }),
1166
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1167
+ className: "ds-l-row",
1168
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1169
+ className: "ds-l-col--12",
1170
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
1171
+ "aria-describedby": `dataset-${identifier}-updated-date`,
1172
+ to: `/dataset/${identifier}`,
1173
+ children: [
1174
+ "View the Dataset for ",
1175
+ title,
1176
+ " "
1177
+ ]
1178
+ })
1179
+ })
1180
+ })
1181
+ ]
1182
+ })
1183
+ });
1184
+ };
1185
+ var $c068004d499082cc$export$2e2bcd8739ae039 = $c068004d499082cc$var$DatasetListItem;
1186
+
1187
+
1188
+
1189
+
1190
+
1191
+
1192
+
1193
+
1101
1194
 
1102
1195
 
1103
1196
 
@@ -1336,23 +1429,6 @@ var $b61856b23f5f58a2$export$2e2bcd8739ae039 = $b61856b23f5f58a2$var$LargeFileDi
1336
1429
 
1337
1430
 
1338
1431
 
1339
- const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date, options: options = {
1340
- year: "numeric",
1341
- month: "long",
1342
- day: "numeric",
1343
- timeZone: "UTC"
1344
- } })=>{
1345
- const rawDate = new Date(date);
1346
- let modifiedDate = "";
1347
- if (rawDate) modifiedDate = rawDate.toLocaleDateString("en-US", options);
1348
- return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
1349
- children: modifiedDate
1350
- });
1351
- };
1352
- var $bd76a91923d7e8a7$export$2e2bcd8739ae039 = $bd76a91923d7e8a7$var$TransformedDate;
1353
-
1354
-
1355
-
1356
1432
 
1357
1433
 
1358
1434
  function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240) {
@@ -1371,11 +1447,126 @@ function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240)
1371
1447
 
1372
1448
 
1373
1449
 
1450
+
1451
+
1452
+
1453
+
1454
+
1455
+
1456
+ const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
1457
+ const { type: type, date: date, boldLabel: boldLabel = false, displayTooltips: displayTooltips = true } = props;
1458
+ const dateText = {
1459
+ modified: "Last Modified",
1460
+ released: "Released",
1461
+ refresh: "Planned Update"
1462
+ };
1463
+ const tooltipContent = {
1464
+ modified: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
1465
+ children: [
1466
+ /*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
1467
+ children: "Last Modified: "
1468
+ }),
1469
+ " The date the ",
1470
+ /*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
1471
+ "dataset was last updated."
1472
+ ]
1473
+ }),
1474
+ released: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
1475
+ children: [
1476
+ /*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
1477
+ children: "Released: "
1478
+ }),
1479
+ " The date the most ",
1480
+ /*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
1481
+ "recent dataset was made available",
1482
+ /*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
1483
+ "to the public."
1484
+ ]
1485
+ }),
1486
+ refresh: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
1487
+ children: [
1488
+ /*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
1489
+ children: "Planned Update:"
1490
+ }),
1491
+ " The date the ",
1492
+ /*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
1493
+ "dataset is scheduled to be updated."
1494
+ ]
1495
+ })
1496
+ };
1497
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1498
+ className: `dataset-date-item${boldLabel ? " bold-label" : ""}`,
1499
+ children: [
1500
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
1501
+ className: "dataset-data-item-label",
1502
+ children: [
1503
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1504
+ children: dateText[type]
1505
+ }),
1506
+ ": ",
1507
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
1508
+ date: date
1509
+ })
1510
+ ]
1511
+ }),
1512
+ displayTooltips === true && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Tooltip), {
1513
+ "aria-label": dateText[type],
1514
+ className: "ds-c-tooltip__trigger-icon ds-u-display--inline ds-u-padding-left--0 ds-uw-padding-right--0",
1515
+ title: tooltipContent[type],
1516
+ placement: "top",
1517
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
1518
+ })
1519
+ ]
1520
+ });
1521
+ };
1522
+ var $17711e94d2ce0ee4$export$2e2bcd8739ae039 = $17711e94d2ce0ee4$var$DatasetDateItem;
1523
+
1524
+
1525
+ const $20de4fedf33d4f9a$var$DatasetDate = (props)=>{
1526
+ const { date: date, updatedBoldLabel: updatedBoldLabel = false, releasedBoldLabel: releasedBoldLabel = false, refreshBoldLabel: refreshBoldLabel = false, displayTooltips: displayTooltips = true } = props;
1527
+ const { modified: modified, released: released, refresh: refresh } = date;
1528
+ // Create an array of date items to render
1529
+ const dateItems = [];
1530
+ if (modified) dateItems.push(/*#__PURE__*/ (0, $hgUW1$jsx)((0, $17711e94d2ce0ee4$export$2e2bcd8739ae039), {
1531
+ displayTooltips: displayTooltips,
1532
+ type: "modified",
1533
+ date: modified,
1534
+ boldLabel: updatedBoldLabel
1535
+ }, "modified"));
1536
+ if (released) dateItems.push(/*#__PURE__*/ (0, $hgUW1$jsx)((0, $17711e94d2ce0ee4$export$2e2bcd8739ae039), {
1537
+ displayTooltips: displayTooltips,
1538
+ type: "released",
1539
+ date: released,
1540
+ boldLabel: releasedBoldLabel
1541
+ }, "released"));
1542
+ if (refresh) dateItems.push(/*#__PURE__*/ (0, $hgUW1$jsx)((0, $17711e94d2ce0ee4$export$2e2bcd8739ae039), {
1543
+ displayTooltips: displayTooltips,
1544
+ type: "refresh",
1545
+ date: refresh,
1546
+ boldLabel: refreshBoldLabel
1547
+ }, "refresh"));
1548
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1549
+ className: "dataset-date",
1550
+ children: dateItems.map((item, index)=>/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$react).Fragment, {
1551
+ children: [
1552
+ item,
1553
+ index < dateItems.length - 1 && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1554
+ className: "bullet-point",
1555
+ children: "\u2022"
1556
+ })
1557
+ ]
1558
+ }, index))
1559
+ });
1560
+ };
1561
+ var $20de4fedf33d4f9a$export$2e2bcd8739ae039 = $20de4fedf33d4f9a$var$DatasetDate;
1562
+
1563
+
1374
1564
  const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
1375
1565
  const desktop = (0, $hgUW1$useMediaQuery)({
1376
1566
  minWidth: 1024
1377
1567
  });
1378
- const { title: title, modified: modified, description: description, identifier: identifier, downloadUrl: downloadUrl, largeFile: largeFile = false, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
1568
+ 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;
1569
+ const location = (0, $hgUW1$useLocation)();
1379
1570
  let linkContainerClasses = "ds-u-margin-bottom--2";
1380
1571
  if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
1381
1572
  else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
@@ -1384,19 +1575,52 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
1384
1575
  linkContainerClasses = "ds-u-padding-x--0";
1385
1576
  linkClasses += " ds-l-col--4 ds-l-md-col--auto";
1386
1577
  }
1578
+ let themes;
1579
+ if (theme && showTopics) themes = /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
1580
+ className: "theme-list item-theme",
1581
+ children: theme.map((topic, index)=>{
1582
+ const title = topic || "Unknown Topic";
1583
+ const prefix = "topics";
1584
+ // Use the provided slug or fallback to a simple slug generation
1585
+ const slug = topicSlugs?.[title];
1586
+ const link = `/${prefix}/${slug}`;
1587
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1588
+ className: "ds-u-fill--primary ds-u-radius--pill",
1589
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
1590
+ to: link,
1591
+ state: {
1592
+ fromUrl: location.pathname,
1593
+ fromTitle: false,
1594
+ fromSearchList: location.pathname.includes("search")
1595
+ },
1596
+ children: title
1597
+ })
1598
+ }, `dist-${title}-${index}`);
1599
+ })
1600
+ });
1601
+ const date = {
1602
+ modified: modified,
1603
+ released: released,
1604
+ refresh: refresh
1605
+ };
1606
+ const url = `/dataset/${identifier}`;
1387
1607
  return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1388
1608
  className: "dc-c-search-list-item ds-u-padding-top--3",
1389
1609
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1390
1610
  className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
1391
1611
  children: [
1612
+ themes,
1392
1613
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1393
1614
  className: "ds-l-row ds-u-align-items--start",
1394
1615
  children: [
1395
- /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
1616
+ !showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
1396
1617
  id: `dataset-${identifier}-updated-date`,
1397
1618
  className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? "ds-u-padding-top--2" : "ds-u-padding-top--0"}`,
1398
1619
  children: [
1399
- "Updated ",
1620
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1621
+ children: "Updated:"
1622
+ }),
1623
+ " ",
1400
1624
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
1401
1625
  date: modified
1402
1626
  })
@@ -1406,21 +1630,39 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
1406
1630
  className: "ds-l-col--12 ds-text-heading--2xl",
1407
1631
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
1408
1632
  "aria-describedby": `dataset-${identifier}-updated-date`,
1409
- to: `/dataset/${identifier}`,
1633
+ to: `${url}`,
1410
1634
  children: title
1411
1635
  })
1412
1636
  })
1413
1637
  ]
1414
1638
  }),
1415
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1639
+ description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1416
1640
  className: "ds-l-row",
1417
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1641
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1418
1642
  className: "ds-l-col--12 ds-l-md-col--12 ds-u-margin-top--2",
1419
- children: (0, $1a2bf34e2a8f6b80$export$59a943b34a82e690)(description)
1643
+ children: [
1644
+ (0, $1a2bf34e2a8f6b80$export$59a943b34a82e690)(description),
1645
+ description.length > 240 ? /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
1646
+ children: [
1647
+ " ",
1648
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
1649
+ to: `/dataset/${identifier}`,
1650
+ children: "See more"
1651
+ })
1652
+ ]
1653
+ }) : ""
1654
+ ]
1655
+ })
1656
+ }),
1657
+ showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1658
+ className: "dataset-dates",
1659
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $20de4fedf33d4f9a$export$2e2bcd8739ae039), {
1660
+ date: date,
1661
+ displayTooltips: false
1420
1662
  })
1421
1663
  }),
1422
1664
  downloadUrl ? /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1423
- className: `ds-u-margin-top--3 ds-u-padding-left--0`,
1665
+ className: `ds-u-margin-top--3 ds-u-padding-left--0 download-button`,
1424
1666
  children: largeFile ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1425
1667
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b61856b23f5f58a2$export$2e2bcd8739ae039), {
1426
1668
  downloadUrl: downloadUrl
@@ -1445,7 +1687,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
1445
1687
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1446
1688
  className: linkClasses,
1447
1689
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
1448
- to: `/dataset/${identifier}#data-table`,
1690
+ to: `${url}#data-table`,
1449
1691
  children: [
1450
1692
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
1451
1693
  id: "data-table"
@@ -1460,7 +1702,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
1460
1702
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1461
1703
  className: linkClasses,
1462
1704
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
1463
- to: `/dataset/${identifier}#overview`,
1705
+ to: `${url}#overview`,
1464
1706
  children: [
1465
1707
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
1466
1708
  id: "overview"
@@ -1475,7 +1717,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
1475
1717
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1476
1718
  className: linkClasses,
1477
1719
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
1478
- to: `/dataset/${identifier}#data-dictionary`,
1720
+ to: `${url}#data-dictionary`,
1479
1721
  children: [
1480
1722
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
1481
1723
  id: "data-dictionary"
@@ -1490,7 +1732,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
1490
1732
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1491
1733
  className: linkClasses,
1492
1734
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
1493
- to: `/dataset/${identifier}#api`,
1735
+ to: `${url}#api`,
1494
1736
  children: [
1495
1737
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
1496
1738
  id: "api"
@@ -1515,80 +1757,6 @@ var $52c6454cae137465$export$2e2bcd8739ae039 = $52c6454cae137465$var$DatasetSear
1515
1757
 
1516
1758
 
1517
1759
 
1518
- const $c068004d499082cc$var$DatasetListItem = (props)=>{
1519
- const desktop = (0, $hgUW1$useMediaQuery)({
1520
- minWidth: 1024
1521
- });
1522
- const { title: title, modified: modified, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
1523
- let linkContainerClasses = "ds-u-margin-bottom--2";
1524
- if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
1525
- else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
1526
- let linkClasses = "ds-u-display--block ds-u-text-align--left";
1527
- if (desktop) {
1528
- linkContainerClasses = "ds-u-padding-x--0";
1529
- linkClasses += " ds-l-col--4 ds-l-md-col--auto";
1530
- }
1531
- return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1532
- className: "dc-c-list-item ds-u-padding-top--4",
1533
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1534
- className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
1535
- children: [
1536
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1537
- className: "ds-l-row ds-u-align-items--start",
1538
- children: [
1539
- /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
1540
- id: `dataset-${identifier}-updated-date`,
1541
- 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"}`,
1542
- children: [
1543
- "Updated ",
1544
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
1545
- date: modified
1546
- })
1547
- ]
1548
- }),
1549
- /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
1550
- className: "ds-l-col--12 ds-text-heading--2xl",
1551
- children: title
1552
- })
1553
- ]
1554
- }),
1555
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1556
- className: "ds-l-row",
1557
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1558
- className: "ds-l-col--12 ds-l-md-col--12 ds-u-margin-top--2",
1559
- children: [
1560
- "The ",
1561
- title,
1562
- " dataset was updated."
1563
- ]
1564
- })
1565
- }),
1566
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1567
- className: "ds-l-row",
1568
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1569
- className: "ds-l-col--12",
1570
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
1571
- "aria-describedby": `dataset-${identifier}-updated-date`,
1572
- to: `/dataset/${identifier}`,
1573
- children: [
1574
- "View the Dataset for ",
1575
- title,
1576
- " "
1577
- ]
1578
- })
1579
- })
1580
- })
1581
- ]
1582
- })
1583
- });
1584
- };
1585
- var $c068004d499082cc$export$2e2bcd8739ae039 = $c068004d499082cc$var$DatasetListItem;
1586
-
1587
-
1588
-
1589
-
1590
-
1591
-
1592
1760
 
1593
1761
 
1594
1762
 
@@ -4227,6 +4395,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
4227
4395
  if (item.theme.includes(theme)) showLargeFile = true;
4228
4396
  });
4229
4397
  return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $52c6454cae137465$export$2e2bcd8739ae039), {
4398
+ location: location,
4230
4399
  title: item.title,
4231
4400
  modified: item.modified,
4232
4401
  description: item.description,
@@ -4420,29 +4589,26 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
4420
4589
  children: [
4421
4590
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4422
4591
  className: "ds-l-row",
4423
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4592
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4424
4593
  className: "ds-l-col--12",
4425
- children: [
4426
- introText ? introText : null,
4427
- showLargeFileWarning && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4428
- className: "ds-l-row ds-u-margin-bottom--2 ds-u-margin-top--4",
4429
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4430
- className: "ds-l-md-col--12",
4431
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
4432
- bordered: true,
4433
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
4434
- contentClassName: "downloading-datasets",
4435
- heading: "Please read before downloading datasets",
4436
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b2d31a9c6cd2284$export$2e2bcd8739ae039), {})
4437
- })
4594
+ children: showLargeFileWarning && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4595
+ className: "ds-l-row ds-u-margin-bottom--2 ds-u-margin-top--4",
4596
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4597
+ className: "ds-l-md-col--12",
4598
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
4599
+ bordered: true,
4600
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
4601
+ contentClassName: "downloading-datasets",
4602
+ heading: "Please read before downloading datasets",
4603
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b2d31a9c6cd2284$export$2e2bcd8739ae039), {})
4438
4604
  })
4439
4605
  })
4440
4606
  })
4441
- ]
4607
+ })
4442
4608
  })
4443
4609
  }),
4444
4610
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4445
- className: "ds-l-row ds-u-padding-top--4",
4611
+ className: "ds-l-row",
4446
4612
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4447
4613
  className: "ds-l-col--12",
4448
4614
  children: isPending ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
@@ -4454,32 +4620,40 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
4454
4620
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4455
4621
  className: "ds-u-display--flex ds-u-justify-content--between ds-u-align-items--end ds-u-flex-wrap--reverse ds-u-sm-flex-wrap--wrap",
4456
4622
  children: [
4457
- enablePagination && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4623
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4458
4624
  className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--8 ds-u-sm-padding-left--0",
4459
4625
  children: [
4460
- /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
4461
- className: "ds-u-margin-y--0",
4462
- "aria-hidden": "true",
4463
- children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
4464
- children: [
4465
- "Showing ",
4466
- currentResultNumbers.startingNumber,
4467
- " -",
4468
- " ",
4469
- currentResultNumbers.endingNumber,
4470
- " of ",
4471
- data.data.total,
4472
- " datasets"
4473
- ]
4474
- })
4626
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4627
+ className: "ds-u-margin-bottom--3",
4628
+ children: introText ? introText : null
4475
4629
  }),
4476
- /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
4477
- className: "ds-u-visibility--screen-reader",
4478
- role: "status",
4479
- "aria-live": "assertive",
4480
- "aria-atomic": "true",
4481
- "data-testid": "currentResults",
4482
- children: announcementText
4630
+ enablePagination && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4631
+ children: [
4632
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
4633
+ className: "ds-u-margin-y--0",
4634
+ "aria-hidden": "true",
4635
+ children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
4636
+ children: [
4637
+ "Showing ",
4638
+ currentResultNumbers.startingNumber,
4639
+ " -",
4640
+ " ",
4641
+ currentResultNumbers.endingNumber,
4642
+ " of ",
4643
+ data.data.total,
4644
+ " datasets"
4645
+ ]
4646
+ })
4647
+ }),
4648
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
4649
+ className: "ds-u-visibility--screen-reader",
4650
+ role: "status",
4651
+ "aria-live": "assertive",
4652
+ "aria-atomic": "true",
4653
+ "data-testid": "currentResults",
4654
+ children: announcementText
4655
+ })
4656
+ ]
4483
4657
  })
4484
4658
  ]
4485
4659
  }),
@@ -4498,7 +4672,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
4498
4672
  }),
4499
4673
  /*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
4500
4674
  className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0 ds-u-margin-bottom--4 ds-u-display--block",
4501
- "data-testid": "results-list",
4675
+ "data-testid": "datasetlist-results-list",
4502
4676
  children: [
4503
4677
  noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
4504
4678
  variation: "error",
@@ -7497,5 +7671,5 @@ var $90fb213ab8eeb2e7$export$2e2bcd8739ae039 = $90fb213ab8eeb2e7$var$useScrollTo
7497
7671
 
7498
7672
 
7499
7673
 
7500
- 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, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $c068004d499082cc$export$2e2bcd8739ae039 as DatasetListItem, $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};
7674
+ 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};
7501
7675
  //# sourceMappingURL=main.js.map