@civicactions/cmsds-open-data-components 3.6.1-oe → 3.6.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.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import "./main.css";
2
- import {jsxs as $hgUW1$jsxs, jsx as $hgUW1$jsx, Fragment as $hgUW1$Fragment} from "react/jsx-runtime";
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, Dialog as $hgUW1$Dialog, TextField as $hgUW1$TextField, Spinner as $hgUW1$Spinner, Dropdown as $hgUW1$Dropdown, Alert as $hgUW1$Alert, Pagination as $hgUW1$Pagination, Choice as $hgUW1$Choice, Tabs as $hgUW1$Tabs, TabPanel as $hgUW1$TabPanel, Table as $hgUW1$Table, TableBody as $hgUW1$TableBody, TableRow as $hgUW1$TableRow, TableCell as $hgUW1$TableCell, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon, TableHead as $hgUW1$TableHead, Badge as $hgUW1$Badge} from "@cmsgov/design-system";
3
4
  import $hgUW1$react, {createContext as $hgUW1$createContext, useState as $hgUW1$useState, useRef as $hgUW1$useRef, useEffect as $hgUW1$useEffect, useMemo as $hgUW1$useMemo, useContext as $hgUW1$useContext, useCallback as $hgUW1$useCallback} from "react";
4
5
  import {NavLink as $hgUW1$NavLink, useNavigate as $hgUW1$useNavigate, useLocation as $hgUW1$useLocation, useSearchParams as $hgUW1$useSearchParams, Link as $hgUW1$Link} from "react-router-dom";
5
- import {Button as $hgUW1$Button, Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, CloseIconThin as $hgUW1$CloseIconThin, ArrowIcon as $hgUW1$ArrowIcon, Dialog as $hgUW1$Dialog, TextField as $hgUW1$TextField, Spinner as $hgUW1$Spinner, Dropdown as $hgUW1$Dropdown, Alert as $hgUW1$Alert, Pagination as $hgUW1$Pagination, Choice as $hgUW1$Choice, Tabs as $hgUW1$Tabs, TabPanel as $hgUW1$TabPanel, Table as $hgUW1$Table, TableBody as $hgUW1$TableBody, TableRow as $hgUW1$TableRow, TableCell as $hgUW1$TableCell, TableHead as $hgUW1$TableHead, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon, Badge as $hgUW1$Badge} from "@cmsgov/design-system";
6
6
  import {useMediaQuery as $hgUW1$useMediaQuery} from "react-responsive";
7
7
  import $hgUW1$qs from "qs";
8
8
  import $hgUW1$swaggeruireact from "swagger-ui-react";
@@ -23,6 +23,35 @@ import "react-datepicker/dist/react-datepicker.css";
23
23
  // Components
24
24
 
25
25
 
26
+ function $e49d4387bed21287$export$2e2bcd8739ae039() {
27
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
28
+ className: "ds-u-padding-top--3",
29
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
30
+ bordered: true,
31
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
32
+ heading: "Row Limit Warning",
33
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
34
+ children: [
35
+ 'If you receive a 500 response from your API query it is most likely due to memory exhaustion. You may see a "Temporarily Unavailable" message. Make sure you include a limit appropriate to the speed of your connection, HTTP calls will time out if set too high and payloads for high limits can be very large. Complex queries should include a smaller limit value. Use the ',
36
+ /*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
37
+ children: "limit"
38
+ }),
39
+ " and ",
40
+ /*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
41
+ children: "offset"
42
+ }),
43
+ " ",
44
+ "parameters to iterate through result sets that are larger than the row limit when running queries against the datastore API."
45
+ ]
46
+ })
47
+ }, "1")
48
+ })
49
+ });
50
+ }
51
+
52
+
53
+
54
+
26
55
 
27
56
 
28
57
 
@@ -1192,8 +1221,11 @@ const $e011250e8a3bd5e5$var$SearchFacets = (props)=>{
1192
1221
  contentClassName: "ds-u-padding-left--1 ds-u-padding-right--0",
1193
1222
  heading: title,
1194
1223
  defaultOpen: true,
1195
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
1196
- children: filteredFacets.length ? filteredFacets.map((f)=>{
1224
+ children: !filteredFacets.length ? /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
1225
+ className: "ds-text-heading--md",
1226
+ children: "No matching facets found."
1227
+ }) : /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
1228
+ children: filteredFacets.map((f)=>{
1197
1229
  return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1198
1230
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Choice), {
1199
1231
  className: "ds-u-margin-y--1",
@@ -1205,9 +1237,6 @@ const $e011250e8a3bd5e5$var$SearchFacets = (props)=>{
1205
1237
  onClick: ()=>onClickFunction(f.type, f.name)
1206
1238
  })
1207
1239
  }, f.name);
1208
- }) : /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
1209
- className: "ds-text-heading--md",
1210
- children: "No matching facets found."
1211
1240
  })
1212
1241
  })
1213
1242
  })
@@ -1404,6 +1433,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
1404
1433
  endingNumber: 0
1405
1434
  });
1406
1435
  const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
1436
+ const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
1407
1437
  let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
1408
1438
  const [fulltext, setFullText] = (0, $hgUW1$useState)(transformedParams.fulltext);
1409
1439
  const [filterText, setFilterText] = (0, $hgUW1$useState)(transformedParams.fulltext);
@@ -1453,7 +1483,16 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
1453
1483
  if (existingFacet > -1) newFacets.keyword.splice(existingFacet, 1);
1454
1484
  else newFacets.keyword.push(value);
1455
1485
  }
1486
+ const urlString = (0, $hgUW1$qs).stringify({
1487
+ theme: newFacets.theme,
1488
+ keyword: newFacets.keyword
1489
+ }, {
1490
+ encodeValuesOnly: true,
1491
+ addQueryPrefix: true
1492
+ });
1456
1493
  setSelectedFacets(newFacets);
1494
+ const url = new URL(window.location.href);
1495
+ window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
1457
1496
  }
1458
1497
  const pageSize = defaultPageSize;
1459
1498
  (0, $hgUW1$useEffect)(()=>{
@@ -1465,7 +1504,10 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
1465
1504
  startingNumber: Number(totalItems) >= startingNumber ? startingNumber : 0,
1466
1505
  endingNumber: Number(totalItems) < endingNumber ? Number(totalItems) : endingNumber
1467
1506
  });
1468
- if (totalItems && totalItems <= 0 && currentResultNumbers !== null) setNoResults(true);
1507
+ setTimeout(()=>{
1508
+ setAnnouncementText(`Showing ${startingNumber} to ${endingNumber} of ${totalItems} datasets`);
1509
+ }, 100);
1510
+ if (totalItems <= 0 && currentResultNumbers !== null) setNoResults(true);
1469
1511
  else setNoResults(false);
1470
1512
  }, [
1471
1513
  totalItems,
@@ -1491,6 +1533,8 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
1491
1533
  setFilterText(defaultFulltext);
1492
1534
  setSelectedFacets(defaultSelectedFacets);
1493
1535
  setPage(defaultPage);
1536
+ const url = new URL(window.location.href);
1537
+ window.history.pushState({}, "", `${url.origin}${url.pathname}`);
1494
1538
  }
1495
1539
  function buildSearchParams(includePage) {
1496
1540
  let newParams = {};
@@ -1624,24 +1668,34 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
1624
1668
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1625
1669
  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",
1626
1670
  children: [
1627
- enablePagination && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1671
+ enablePagination && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1628
1672
  className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--8",
1629
- children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
1630
- className: "ds-u-margin-y--0",
1631
- role: "region",
1632
- "aria-live": "polite",
1633
- "data-testid": "currentResults",
1634
- children: [
1635
- "Showing ",
1636
- currentResultNumbers.startingNumber,
1637
- " -",
1638
- " ",
1639
- currentResultNumbers.endingNumber,
1640
- " of ",
1641
- data ? data.data.total : "",
1642
- " datasets"
1643
- ]
1644
- })
1673
+ children: [
1674
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
1675
+ className: "ds-u-margin-y--0",
1676
+ "aria-hidden": "true",
1677
+ children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
1678
+ children: [
1679
+ "Showing ",
1680
+ currentResultNumbers.startingNumber,
1681
+ " -",
1682
+ " ",
1683
+ currentResultNumbers.endingNumber,
1684
+ " of ",
1685
+ data.data.total,
1686
+ " datasets"
1687
+ ]
1688
+ })
1689
+ }),
1690
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
1691
+ className: "ds-u-visibility--screen-reader",
1692
+ role: "status",
1693
+ "aria-live": "assertive",
1694
+ "aria-atomic": "true",
1695
+ "data-testid": "currentResults",
1696
+ children: announcementText
1697
+ })
1698
+ ]
1645
1699
  }),
1646
1700
  enableSort && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1647
1701
  className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4 ds-u-sm-padding-right--0",
@@ -1788,6 +1842,9 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
1788
1842
  const [limit, setLimit] = (0, $hgUW1$useState)(options.limit ? options.limit : 20);
1789
1843
  const [count, setCount] = (0, $hgUW1$useState)(null);
1790
1844
  const [columns, setColumns] = (0, $hgUW1$useState)([]);
1845
+ // unfiltered row / column count for overview tab
1846
+ const [totalRows, setTotalRows] = (0, $hgUW1$useState)(0);
1847
+ const [totalColumns, setTotalColumns] = (0, $hgUW1$useState)(0);
1791
1848
  const [offset, setOffset] = (0, $hgUW1$useState)(options.offset ? options.offset : 0);
1792
1849
  const [conditions, setConditions] = (0, $hgUW1$useState)(options.conditions ? options.conditions : undefined);
1793
1850
  const requireConditions = options.requireConditions;
@@ -1822,6 +1879,19 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
1822
1879
  },
1823
1880
  enabled: enabled
1824
1881
  });
1882
+ const { data: unfiltered } = (0, $hgUW1$useQuery)({
1883
+ queryKey: [
1884
+ "datastore" + id + "-unfilteredRowsAndCols"
1885
+ ],
1886
+ queryFn: ()=>{
1887
+ const unfilteredParams = {
1888
+ results: false,
1889
+ count: true,
1890
+ schema: true
1891
+ };
1892
+ return fetch(`${rootUrl}/datastore/query/${id}?${(0, $hgUW1$qs).stringify(unfilteredParams)}`).then((res)=>res.json());
1893
+ }
1894
+ });
1825
1895
  (0, $hgUW1$useEffect)(()=>{
1826
1896
  if (data) {
1827
1897
  const propertyKeys = data.schema && data.schema[id] && data.schema[id].fields ? Object.keys(data.schema[id].fields) : [];
@@ -1832,11 +1902,21 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
1832
1902
  }, [
1833
1903
  data
1834
1904
  ]);
1905
+ (0, $hgUW1$useEffect)(()=>{
1906
+ if (unfiltered) {
1907
+ if (unfiltered.count) setTotalRows(unfiltered.count);
1908
+ if (unfiltered.schema && unfiltered.schema[id] && unfiltered.schema[id].fields) setTotalColumns(Object.keys(unfiltered.schema[id].fields).length);
1909
+ }
1910
+ }, [
1911
+ unfiltered
1912
+ ]);
1835
1913
  return {
1836
1914
  loading: enabled ? isPending : false,
1837
1915
  values: values,
1838
1916
  count: count,
1839
1917
  columns: columns,
1918
+ totalRows: totalRows,
1919
+ totalColumns: totalColumns,
1840
1920
  limit: limit,
1841
1921
  offset: offset,
1842
1922
  schema: schema,
@@ -2161,7 +2241,7 @@ var $5644ebd2c3dbfd7b$export$2e2bcd8739ae039 = $5644ebd2c3dbfd7b$var$DatasetAddi
2161
2241
 
2162
2242
 
2163
2243
  const $0958733ee130fc44$var$ResourceInformation = ({ resource: resource })=>{
2164
- const { count: count, columns: columns } = resource;
2244
+ const { totalRows: totalRows, totalColumns: totalColumns } = resource;
2165
2245
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2166
2246
  className: "dc-c-resource-info-table ds-l-col--12 ds-u-padding-left--0 ds-u-margin-y--2",
2167
2247
  children: [
@@ -2181,7 +2261,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ resource: resource })=>{
2181
2261
  }),
2182
2262
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2183
2263
  className: "ds-u-font-weight--bold",
2184
- children: count ? count.toLocaleString() : ""
2264
+ children: totalRows.toLocaleString()
2185
2265
  })
2186
2266
  ]
2187
2267
  }),
@@ -2195,7 +2275,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ resource: resource })=>{
2195
2275
  }),
2196
2276
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2197
2277
  className: "ds-u-font-weight--bold",
2198
- children: columns.length.toLocaleString()
2278
+ children: totalColumns.toLocaleString()
2199
2279
  })
2200
2280
  ]
2201
2281
  })
@@ -2310,6 +2390,24 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
2310
2390
  maxWidth: 768
2311
2391
  });
2312
2392
  const rows = (0, $5644ebd2c3dbfd7b$export$eea3a12df15499ca)(metadataMapping, dataset);
2393
+ const tooltips = [
2394
+ {
2395
+ label: "modified",
2396
+ title: "The date the dataset was last updated."
2397
+ },
2398
+ {
2399
+ label: "released",
2400
+ title: "The date the most recent dataset was made available to the public."
2401
+ },
2402
+ {
2403
+ label: "issued",
2404
+ title: "The date the dataset was first published and made available to the public."
2405
+ },
2406
+ {
2407
+ label: "publisher",
2408
+ title: "The entity responsible for publishing the dataset."
2409
+ }
2410
+ ];
2313
2411
  return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
2314
2412
  children: [
2315
2413
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $7357cc0f79f9c514$export$2e2bcd8739ae039), {
@@ -2330,19 +2428,38 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
2330
2428
  stackableBreakpoint: "md",
2331
2429
  warningDisabled: true,
2332
2430
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableBody), {
2333
- children: rows.map((r)=>/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
2431
+ children: rows.map((r)=>{
2432
+ const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
2433
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
2334
2434
  children: [
2335
- md ? "" : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
2435
+ md ? "" : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
2336
2436
  component: "th",
2337
2437
  className: "ds-u-font-weight--bold",
2338
- children: r.label
2438
+ children: [
2439
+ r.label,
2440
+ tooltip && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2441
+ className: "ds-u-font-weight--normal",
2442
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Tooltip), {
2443
+ title: tooltip.title,
2444
+ // @ts-ignore
2445
+ style: {
2446
+ border: "none",
2447
+ background: "none"
2448
+ },
2449
+ maxWidth: "400px",
2450
+ placement: "auto",
2451
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
2452
+ })
2453
+ })
2454
+ ]
2339
2455
  }),
2340
2456
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
2341
2457
  stackedTitle: r.label,
2342
2458
  children: r.value
2343
2459
  })
2344
2460
  ]
2345
- }, `${r.label}_${dataset.identifier}`))
2461
+ }, `${r.label}_${dataset.identifier}`);
2462
+ })
2346
2463
  })
2347
2464
  })
2348
2465
  ]
@@ -2370,7 +2487,8 @@ const $789279954d8eff7f$var$ApiDocumentation = ({ endpoint: endpoint })=>{
2370
2487
  var $789279954d8eff7f$export$2e2bcd8739ae039 = $789279954d8eff7f$var$ApiDocumentation;
2371
2488
 
2372
2489
 
2373
- const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: apiUrl, additionalParams: additionalParams })=>{
2490
+
2491
+ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: apiUrl, additionalParams: additionalParams, showRowLimitNotice: showRowLimitNotice = false })=>{
2374
2492
  return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
2375
2493
  children: [
2376
2494
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
@@ -2385,7 +2503,8 @@ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: ap
2385
2503
  }),
2386
2504
  /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
2387
2505
  children: "The Open Data API (ODA) provides programmatic access to this dataset including the ability to filter, query, and aggregate data."
2388
- })
2506
+ }),
2507
+ showRowLimitNotice && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e49d4387bed21287$export$2e2bcd8739ae039), {})
2389
2508
  ]
2390
2509
  }),
2391
2510
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
@@ -2795,7 +2914,8 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
2795
2914
  })
2796
2915
  ]
2797
2916
  }),
2798
- size: 300
2917
+ size: 300,
2918
+ minSize: 132
2799
2919
  }),
2800
2920
  columnHelper.accessor("description", {
2801
2921
  header: "Description",
@@ -4146,7 +4266,7 @@ function $ee4ad47aa483e5b5$var$updateQueryForDatastore(condition) {
4146
4266
  if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
4147
4267
  return cond;
4148
4268
  }
4149
- const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, isModal: isModal = false })=>{
4269
+ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, isModal: isModal = false, setPage: setPage, setOffset: setOffset })=>{
4150
4270
  const { conditions: conditions, schema: schema, setConditions: setConditions } = resource;
4151
4271
  const fields = Object.keys(schema[id].fields);
4152
4272
  const [queryConditions, setQueryConditions] = (0, $hgUW1$useState)([]);
@@ -4223,6 +4343,8 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
4223
4343
  return $ee4ad47aa483e5b5$var$updateQueryForDatastore(cond);
4224
4344
  });
4225
4345
  setConditions(submitConditions);
4346
+ setPage(1);
4347
+ setOffset(0);
4226
4348
  setConditionsChanged(false);
4227
4349
  updateBrowserURL(submitConditions);
4228
4350
  };
@@ -4335,7 +4457,9 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, closeFul
4335
4457
  resource: resource,
4336
4458
  id: distribution.identifier,
4337
4459
  customColumns: customColumnHeaders,
4338
- isModal: isModal
4460
+ isModal: isModal,
4461
+ setPage: setPage,
4462
+ setOffset: setOffset
4339
4463
  }),
4340
4464
  dataDictionaryBanner && !isModal && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4341
4465
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
@@ -4468,7 +4592,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl, additionalPa
4468
4592
  dataDictionaryLoading: isPending
4469
4593
  };
4470
4594
  };
4471
- 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, dataDictionaryCSV: dataDictionaryCSV = false, dataDictionaryBanner: dataDictionaryBanner = false, disableTableControls: disableTableControls = false, hideDataDictionary: hideDataDictionary = false, customDescription: customDescription, updateAriaLive: updateAriaLive })=>{
4595
+ 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, dataDictionaryCSV: dataDictionaryCSV = false, dataDictionaryBanner: dataDictionaryBanner = false, disableTableControls: disableTableControls = false, hideDataDictionary: hideDataDictionary = false, customDescription: customDescription, updateAriaLive: updateAriaLive, showRowLimitNotice: showRowLimitNotice = false })=>{
4472
4596
  const options = location.search ? {
4473
4597
  ...(0, $hgUW1$qs).parse(location.search, {
4474
4598
  ignoreQueryPrefix: true
@@ -4689,7 +4813,8 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, additionalPar
4689
4813
  id: id,
4690
4814
  rootUrl: rootUrl,
4691
4815
  apiUrl: apiPageUrl,
4692
- additionalParams: additionalParams
4816
+ additionalParams: additionalParams,
4817
+ showRowLimitNotice: showRowLimitNotice
4693
4818
  })
4694
4819
  })
4695
4820
  ]
@@ -4962,7 +5087,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
4962
5087
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4963
5088
  children: [
4964
5089
  /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
4965
- href: "http://www.hhs.gov/",
5090
+ href: "https://www.hhs.gov/",
4966
5091
  target: "_blank",
4967
5092
  title: "U.S. Department of Health & Human Services",
4968
5093
  children: [
@@ -4980,7 +5105,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
4980
5105
  /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
4981
5106
  className: "ds-u-margin-left--4",
4982
5107
  target: "_blank",
4983
- href: "http://www.cms.gov/",
5108
+ href: "https://www.cms.gov/",
4984
5109
  title: "CMS.gov Centers for Medicare & Medicaid Services",
4985
5110
  children: [
4986
5111
  /*#__PURE__*/ (0, $hgUW1$jsx)("img", {
@@ -6178,7 +6303,7 @@ function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
6178
6303
  if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
6179
6304
  return cond;
6180
6305
  }
6181
- const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns })=>{
6306
+ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, setOffset: setOffset })=>{
6182
6307
  const { conditions: conditions, schema: schema, setConditions: setConditions } = resource;
6183
6308
  const fields = Object.keys(schema[id].fields);
6184
6309
  const [queryConditions, setQueryConditions] = (0, $hgUW1$useState)([]);
@@ -6227,6 +6352,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
6227
6352
  setConditions(submitConditions);
6228
6353
  setTitleConditions(queryConditions.map((oc)=>Object.assign({}, oc)));
6229
6354
  setConditionsChanged(false);
6355
+ setOffset(0);
6230
6356
  const url = new URL(window.location);
6231
6357
  const urlString = (0, $hgUW1$qs).stringify({
6232
6358
  conditions: submitConditions
@@ -6358,7 +6484,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
6358
6484
  })
6359
6485
  }),
6360
6486
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6361
- className: "ds-l-md-col--12 ds-u-color--gray ds-u-margin-y--1 ds-u-text-align--right",
6487
+ className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
6362
6488
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
6363
6489
  className: "ds-u-margin--0",
6364
6490
  children: [
@@ -6379,13 +6505,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
6379
6505
  updateAriaLive: updateAriaLive
6380
6506
  })
6381
6507
  }),
6382
- Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6508
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6383
6509
  className: "ds-l-md-col--12",
6384
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
6510
+ children: Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
6385
6511
  resource: resource,
6386
6512
  id: distribution.identifier,
6387
- customColumns: customColumns
6388
- })
6513
+ customColumns: customColumns,
6514
+ setOffset: resource.setOffset
6515
+ }) : ""
6389
6516
  }),
6390
6517
  Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
6391
6518
  value: {
@@ -6417,9 +6544,12 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
6417
6544
  })
6418
6545
  ]
6419
6546
  })
6420
- }) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
6421
- role: "status",
6422
- "aria-valuetext": "Resource loading"
6547
+ }) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6548
+ className: "ds-l-md-col--12",
6549
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
6550
+ role: "status",
6551
+ "aria-valuetext": "Resource loading"
6552
+ })
6423
6553
  }),
6424
6554
  dataset.identifier && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
6425
6555
  className: "ds-l-md-col--12",
@@ -6564,5 +6694,5 @@ var $90fb213ab8eeb2e7$export$2e2bcd8739ae039 = $90fb213ab8eeb2e7$var$useScrollTo
6564
6694
 
6565
6695
 
6566
6696
 
6567
- export {$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, $c96c4b9ef7203c1f$export$2e2bcd8739ae039 as APIPage, $026cb986f9fea2b1$export$2e2bcd8739ae039 as PageNotFound, $e873081a6e8f024e$export$2e2bcd8739ae039 as DatasetSearch, $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, $11500a65bd7d9cf1$export$2e2bcd8739ae039 as HeaderContext, $43a30d745a7bbc86$export$2e2bcd8739ae039 as DataTableContext, $ebda441784d176a5$export$2e2bcd8739ae039 as ManageColumnsContext, $efc410f5f7ac5ef3$export$2e2bcd8739ae039 as useSearchAPI, $1d3d480a9cfaabe0$export$2e2bcd8739ae039 as useDatastore, $aa4450dcbeef3ac0$export$385a5aba38cc3325 as transformTableSortToQuerySort, $59a079354baa335c$export$2e2bcd8739ae039 as Hero, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $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, $5644ebd2c3dbfd7b$export$eea3a12df15499ca as buildRows, $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, $eb7821d186b1a389$export$2e2bcd8739ae039 as useAddLoginLink, $90fb213ab8eeb2e7$export$2e2bcd8739ae039 as useScrollToTop, $b4aa9c66f2e86959$export$2e2bcd8739ae039 as useMetastoreDataset, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 as withQueryProvider, $6da0396069e23175$export$bc27cf7ecf44639d as defaultMetadataMapping, $2ed0091f7e32d1e6$export$2e2bcd8739ae039 as DataTablePageResults, $1a2bf34e2a8f6b80$export$59a943b34a82e690 as truncateText};
6697
+ 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, $c96c4b9ef7203c1f$export$2e2bcd8739ae039 as APIPage, $026cb986f9fea2b1$export$2e2bcd8739ae039 as PageNotFound, $e873081a6e8f024e$export$2e2bcd8739ae039 as DatasetSearch, $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, $11500a65bd7d9cf1$export$2e2bcd8739ae039 as HeaderContext, $43a30d745a7bbc86$export$2e2bcd8739ae039 as DataTableContext, $ebda441784d176a5$export$2e2bcd8739ae039 as ManageColumnsContext, $efc410f5f7ac5ef3$export$2e2bcd8739ae039 as useSearchAPI, $1d3d480a9cfaabe0$export$2e2bcd8739ae039 as useDatastore, $aa4450dcbeef3ac0$export$385a5aba38cc3325 as transformTableSortToQuerySort, $59a079354baa335c$export$2e2bcd8739ae039 as Hero, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $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, $5644ebd2c3dbfd7b$export$eea3a12df15499ca as buildRows, $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, $eb7821d186b1a389$export$2e2bcd8739ae039 as useAddLoginLink, $90fb213ab8eeb2e7$export$2e2bcd8739ae039 as useScrollToTop, $b4aa9c66f2e86959$export$2e2bcd8739ae039 as useMetastoreDataset, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 as withQueryProvider, $6da0396069e23175$export$bc27cf7ecf44639d as defaultMetadataMapping, $2ed0091f7e32d1e6$export$2e2bcd8739ae039 as DataTablePageResults, $1a2bf34e2a8f6b80$export$59a943b34a82e690 as truncateText};
6568
6698
  //# sourceMappingURL=main.js.map