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

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,14 +1,12 @@
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
3
  import $hgUW1$react, {createContext as $hgUW1$createContext, useState as $hgUW1$useState, useEffect as $hgUW1$useEffect, useRef as $hgUW1$useRef, useContext as $hgUW1$useContext, useMemo as $hgUW1$useMemo, useCallback as $hgUW1$useCallback} from "react";
4
- 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, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon, Choice as $hgUW1$Choice, 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, ExternalLinkIcon as $hgUW1$ExternalLinkIcon, Badge as $hgUW1$Badge} from "@cmsgov/design-system";
5
- import {NavLink as $hgUW1$NavLink, useLocation as $hgUW1$useLocation, useNavigate as $hgUW1$useNavigate, useSearchParams as $hgUW1$useSearchParams, Link as $hgUW1$Link} from "react-router-dom";
6
- import $hgUW1$qs from "qs";
7
- import $hgUW1$axios from "axios";
8
- import {useQuery as $hgUW1$useQuery, QueryClient as $hgUW1$QueryClient, QueryClientProvider as $hgUW1$QueryClientProvider} from "@tanstack/react-query";
4
+ 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, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon, Choice as $hgUW1$Choice, Pagination as $hgUW1$Pagination, Spinner as $hgUW1$Spinner, Alert as $hgUW1$Alert, Dropdown as $hgUW1$Dropdown, 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, ExternalLinkIcon as $hgUW1$ExternalLinkIcon, Badge as $hgUW1$Badge} from "@cmsgov/design-system";
5
+ import {NavLink as $hgUW1$NavLink, useLocation as $hgUW1$useLocation, useNavigate as $hgUW1$useNavigate, Link as $hgUW1$Link, useSearchParams as $hgUW1$useSearchParams} from "react-router-dom";
9
6
  import {useMediaQuery as $hgUW1$useMediaQuery} from "react-responsive";
10
7
  import $hgUW1$dompurify from "dompurify";
11
8
  import $hgUW1$lodashtruncate from "lodash.truncate";
9
+ import $hgUW1$qs from "qs";
12
10
  import {KeyboardSensor as $hgUW1$KeyboardSensor, PointerSensor as $hgUW1$PointerSensor, useSensors as $hgUW1$useSensors, useSensor as $hgUW1$useSensor, DndContext as $hgUW1$DndContext, closestCenter as $hgUW1$closestCenter} from "@dnd-kit/core";
13
11
  import {sortableKeyboardCoordinates as $hgUW1$sortableKeyboardCoordinates, arrayMove as $hgUW1$arrayMove, SortableContext as $hgUW1$SortableContext, verticalListSortingStrategy as $hgUW1$verticalListSortingStrategy, useSortable as $hgUW1$useSortable} from "@dnd-kit/sortable";
14
12
  import {restrictToVerticalAxis as $hgUW1$restrictToVerticalAxis} from "@dnd-kit/modifiers";
@@ -16,6 +14,8 @@ import {CSS as $hgUW1$CSS} from "@dnd-kit/utilities";
16
14
  import {createColumnHelper as $hgUW1$createColumnHelper, useReactTable as $hgUW1$useReactTable, getCoreRowModel as $hgUW1$getCoreRowModel, getSortedRowModel as $hgUW1$getSortedRowModel, flexRender as $hgUW1$flexRender, getFilteredRowModel as $hgUW1$getFilteredRowModel, getPaginationRowModel as $hgUW1$getPaginationRowModel} from "@tanstack/react-table";
17
15
  import $hgUW1$reactdatepicker from "react-datepicker";
18
16
  import "react-datepicker/dist/react-datepicker.css";
17
+ import $hgUW1$axios from "axios";
18
+ import {useQuery as $hgUW1$useQuery, QueryClient as $hgUW1$QueryClient, QueryClientProvider as $hgUW1$QueryClientProvider} from "@tanstack/react-query";
19
19
  import $hgUW1$swaggeruireact from "swagger-ui-react";
20
20
  import "swagger-ui-react/swagger-ui.css";
21
21
  import {List as $hgUW1$List, Map as $hgUW1$Map} from "immutable";
@@ -384,28 +384,177 @@ var $669b51f08325b4e3$export$2e2bcd8739ae039 = $669b51f08325b4e3$var$SubMenu;
384
384
 
385
385
 
386
386
 
387
+ const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
388
+ const { headingText: headingText = "Dataset Search" } = props;
389
+ const navigate = (0, $hgUW1$useNavigate)();
390
+ const { isMobile: isMobile } = (0, $hgUW1$useContext)((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
391
+ const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)('');
392
+ const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
393
+ function searchForDataset(e) {
394
+ e.preventDefault();
395
+ if (window) {
396
+ const params = new URLSearchParams({
397
+ fulltext: modalSearchTerm
398
+ });
399
+ navigate(`/datasets?${params.toString()}`);
400
+ setModalSearch(false);
401
+ }
402
+ }
403
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
404
+ className: "dkan-c-main-navigation--search",
405
+ children: [
406
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
407
+ variation: isMobile ? undefined : 'ghost',
408
+ className: "ds-u-lg-border--0 dkan-c-header-search--modal-button",
409
+ onClick: ()=>setModalSearch(true),
410
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
411
+ children: "Search"
412
+ })
413
+ }),
414
+ modalSearch && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
415
+ className: "dc-c-search-dialog",
416
+ isOpen: modalSearch,
417
+ onExit: ()=>setModalSearch(false),
418
+ heading: `${headingText}`,
419
+ actions: /*#__PURE__*/ (0, $hgUW1$jsxs)("form", {
420
+ className: "dkan-dataset-search ds-u-display--flex ds-u-align-items--start ds-u-flex-wrap--nowrap",
421
+ onSubmit: (e)=>{
422
+ searchForDataset(e);
423
+ },
424
+ children: [
425
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
426
+ value: modalSearchTerm,
427
+ fieldClassName: "ds-u-display--inline-block ds-u-margin--0",
428
+ className: "ds-l-col--9",
429
+ label: "Search Term",
430
+ name: "search-modal",
431
+ labelClassName: "ds-u-visibility--screen-reader",
432
+ onChange: (e)=>{
433
+ setModalSearchTerm(e.target.value);
434
+ }
435
+ }),
436
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
437
+ type: "submit",
438
+ className: "ds-l-col--3",
439
+ children: [
440
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
441
+ className: "fas fa-search small-text ds-u-sm-display--none"
442
+ }),
443
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
444
+ className: "full-text ds-u-display--none ds-u-sm-display--inline-block",
445
+ children: "Search"
446
+ })
447
+ ]
448
+ })
449
+ ]
450
+ })
451
+ })
452
+ ]
453
+ });
454
+ };
455
+ var $fea9297ba4dd394c$export$2e2bcd8739ae039 = $fea9297ba4dd394c$var$HeaderSearch;
456
+
457
+
458
+
459
+ const $b939b31651e82908$var$HeaderNav = (props)=>{
460
+ const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
461
+ const { links: links, topNavLinks: topNavLinks, wrapperClasses: wrapperClasses, searchInMobile: searchInMobile } = props;
462
+ const navMenuOpenClass = `dkan-c-nav-menu--${headerContext.mobileMenuOpen ? "open" : "close"}`;
463
+ const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ? 'mobile' : 'desktop'}`;
464
+ const linkClasses = 'dkan-c-header--link ds-c-button ds-c-button--ghost';
465
+ const listClasses = 'dkan-c-header--link-list ';
466
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
467
+ className: `dkan-c-nav-menu ${wrapperClasses} ${navMenuOpenClass} ${isMobileClass}`,
468
+ ref: headerContext.menuRef,
469
+ children: [
470
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
471
+ variation: "ghost",
472
+ className: "dkan-c-nav-menu--mobile-close-button",
473
+ onClick: ()=>headerContext.setMobileMenuOpen(false),
474
+ children: [
475
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$CloseIconThin), {}),
476
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
477
+ className: "ds-u-margin-left--1",
478
+ children: "Close"
479
+ })
480
+ ]
481
+ }),
482
+ /*#__PURE__*/ (0, $hgUW1$jsx)("nav", {
483
+ className: "dkan-c-main-nav",
484
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
485
+ className: listClasses,
486
+ children: links.map((link)=>{
487
+ if (link.submenu) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $669b51f08325b4e3$export$2e2bcd8739ae039), {
488
+ link: link,
489
+ wrapLabel: true,
490
+ subLinkClasses: linkClasses,
491
+ linkClasses: linkClasses
492
+ }, link.id);
493
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
494
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
495
+ to: link.url,
496
+ className: linkClasses,
497
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
498
+ children: link.label
499
+ })
500
+ })
501
+ }, link.id);
502
+ })
503
+ })
504
+ }),
505
+ topNavLinks && /*#__PURE__*/ (0, $hgUW1$jsx)("nav", {
506
+ className: "dkan-c-top-nav",
507
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
508
+ className: listClasses,
509
+ children: topNavLinks.map((link)=>{
510
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
511
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
512
+ to: link.url,
513
+ className: linkClasses,
514
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
515
+ children: link.label
516
+ })
517
+ })
518
+ }, link.id);
519
+ })
520
+ })
521
+ }),
522
+ searchInMobile && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $fea9297ba4dd394c$export$2e2bcd8739ae039), {})
523
+ ]
524
+ });
525
+ };
526
+ var $b939b31651e82908$export$2e2bcd8739ae039 = $b939b31651e82908$var$HeaderNav;
527
+
387
528
 
388
529
 
389
530
 
390
531
 
391
532
 
392
533
 
393
- const $61ff88fb3f6ee2c8$var$queryClient = new (0, $hgUW1$QueryClient)({
394
- defaultOptions: {
395
- queries: {
396
- refetchOnWindowFocus: false
397
- }
398
- }
399
- });
400
- const $61ff88fb3f6ee2c8$var$withQueryProvider = (WrappedComponent)=>(props)=>{
401
- return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$QueryClientProvider), {
402
- client: $61ff88fb3f6ee2c8$var$queryClient,
403
- children: /*#__PURE__*/ (0, $hgUW1$jsx)(WrappedComponent, {
404
- ...props
534
+ const $9a8892c5ac150556$var$HeaderSiteTitle = (props)=>{
535
+ const inverse = props.inverse;
536
+ const { logoFilePath: logoFilePath, logoAltText: logoAltText, urlTitle: urlTitle } = props.org;
537
+ const classList = "ds-u-padding-y--3 dc-c-site-title print-padding-top--0 print-padding-bottom--0 ds-u-text-align--center ds-u-md-text-align--left";
538
+ if (logoFilePath) return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
539
+ className: classList,
540
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
541
+ to: "/",
542
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("img", {
543
+ src: logoFilePath,
544
+ alt: logoAltText
405
545
  })
406
- });
407
- };
408
- var $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 = $61ff88fb3f6ee2c8$var$withQueryProvider;
546
+ })
547
+ });
548
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
549
+ className: classList,
550
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
551
+ to: "/",
552
+ className: `${inverse ? "ds-c-link--inverse " : ""} ds-u-font-size--2xl ds-u-lg-font-size--3xl`,
553
+ children: urlTitle
554
+ })
555
+ });
556
+ };
557
+ var $9a8892c5ac150556$export$2e2bcd8739ae039 = $9a8892c5ac150556$var$HeaderSiteTitle;
409
558
 
410
559
 
411
560
 
@@ -414,283 +563,62 @@ var $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 = $61ff88fb3f6ee2c8$var$withQueryPr
414
563
 
415
564
 
416
565
 
566
+ const $403833a4b442d5df$var$MobileMenuButton = (props)=>{
567
+ const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
568
+ const { wrapperClasses: wrapperClasses } = props;
569
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
570
+ "aria-haspopup": "true",
571
+ "aria-expanded": headerContext.mobileMenuOpen,
572
+ className: `dkan-c-mobile-menu-button ${wrapperClasses} dkan-c-mobile-menu-button--${headerContext.mobileMenuOpen ? "close" : "open"}`,
573
+ onClick: ()=>headerContext.setMobileMenuOpen(!headerContext.mobileMenuOpen),
574
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
575
+ children: "Menu"
576
+ })
577
+ });
578
+ };
579
+ var $403833a4b442d5df$export$2e2bcd8739ae039 = $403833a4b442d5df$var$MobileMenuButton;
417
580
 
418
581
 
419
582
 
420
583
 
421
- const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
422
- switch(props.id){
423
- case 'overview':
424
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
425
- width: "16px",
426
- height: "16px",
427
- viewBox: "0 0 16 16",
428
- version: "1.1",
429
- xmlns: "http://www.w3.org/2000/svg",
430
- xmlnsXlink: "http://www.w3.org/1999/xlink",
431
- "aria-hidden": "true",
432
- children: [
433
- /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
434
- children: "Overview Icon"
435
- }),
436
- /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
437
- stroke: "none",
438
- strokeWidth: "1",
439
- fillRule: "evenodd",
440
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
441
- transform: "translate(0.000000, -4.000000)",
442
- fillRule: "nonzero",
443
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
444
- transform: "translate(0.000000, -1.000000)",
445
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("g", {
446
- transform: "translate(0.000000, 5.000000)",
447
- children: [
448
- /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
449
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
450
- d: "M9.55610973,15.6404494 C9.31670823,15.8801498 9.02743142,16 8.6882793,16 C8.34912718,16 8.05985037,15.8801498 7.82044888,15.6404494 L0.33915212,8.14981273 C0.206151288,8.01664586 0.116375727,7.87682064 0.0698254364,7.73033708 C0.0232751455,7.58385352 0,7.43071161 0,7.27091136 L0,1.19850187 C0,0.852267998 0.113050707,0.565959218 0.33915212,0.339575531 C0.565253533,0.113191844 0.85120532,0 1.19700748,0 L7.26184539,0 C7.42144638,0 7.58104738,0.0233042031 7.74064838,0.0699126092 C7.90024938,0.116521015 8.04655029,0.206408656 8.17955112,0.339575531 L15.6209476,7.79026217 C15.8736492,8.04327923 16,8.33957553 16,8.67915106 C16,9.01872659 15.8736492,9.31502289 15.6209476,9.56803995 L9.55610973,15.6404494 Z M8.75953079,15 L15,8.75953079 L7.24046921,1 L1,1 L1,7.24046921 L8.75953079,15 Z M3,4 C3.26923077,4 3.50320513,3.90064103 3.70192308,3.70192308 C3.90064103,3.50320513 4,3.26923077 4,3 C4,2.73076923 3.90064103,2.49679487 3.70192308,2.29807692 C3.50320513,2.09935897 3.26923077,2 3,2 C2.73076923,2 2.49679487,2.09935897 2.29807692,2.29807692 C2.09935897,2.49679487 2,2.73076923 2,3 C2,3.26923077 2.09935897,3.50320513 2.29807692,3.70192308 C2.49679487,3.90064103 2.73076923,4 3,4 L3,4 Z"
451
- })
452
- }),
453
- /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
454
- transform: "translate(7.890470, 8.890470) rotate(45.000000) translate(-7.890470, -8.890470) translate(3.543164, 6.321607)",
455
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
456
- d: "M6.16557222,4.98656515 C6.09634145,5.05213515 6.01557222,5.08309876 5.92326452,5.07945598 C5.83095683,5.07581321 5.7501876,5.04120682 5.68095683,4.97563682 C5.61172606,4.91006682 5.57711068,4.8317471 5.57711068,4.74067766 C5.57711068,4.64960821 5.61172606,4.57128849 5.68095683,4.50571849 L7.72326452,2.57140353 L5.69249529,0.648016895 C5.62326452,0.582446896 5.59057222,0.504127176 5.59441837,0.413057733 C5.59826452,0.32198829 5.63480299,0.243668569 5.70403375,0.17809857 C5.77326452,0.112528571 5.85595683,0.0797435719 5.95211068,0.0797435719 C6.04826452,0.0797435719 6.13095683,0.112528571 6.2001876,0.17809857 L8.47326452,2.34190853 C8.54249529,2.40747853 8.57711068,2.48397686 8.57711068,2.57140353 C8.57711068,2.65883019 8.54249529,2.73532853 8.47326452,2.80089852 L6.16557222,4.98656515 Z M2.29670341,4.98413866 L0.0208413435,2.82877761 C-0.0481241737,2.7631321 -0.0826069324,2.68654566 -0.0826069324,2.59901831 C-0.0826069324,2.51149096 -0.0481241737,2.43490453 0.0208413435,2.36925901 L2.31969192,0.181075204 C2.38865744,0.115429689 2.47103291,0.0826069324 2.56681835,0.0826069324 C2.6626038,0.0826069324 2.74497927,0.115429689 2.81394479,0.181075204 C2.88291031,0.246720718 2.91739307,0.325130638 2.91739307,0.416304963 C2.91739307,0.507479288 2.88291031,0.585889208 2.81394479,0.651534722 L0.76796778,2.59901831 L2.79095629,4.52462006 C2.8599218,4.59026558 2.89440456,4.66685201 2.89440456,4.75437936 C2.89440456,4.84190671 2.8599218,4.91849315 2.79095629,4.98413866 C2.72199077,5.04978418 2.63961529,5.08260693 2.54382985,5.08260693 C2.44804441,5.08260693 2.36566893,5.04978418 2.29670341,4.98413866 L2.29670341,4.98413866 Z"
457
- })
458
- })
459
- ]
460
- })
461
- })
462
- })
463
- })
464
- ]
465
- });
466
- case 'data-table':
467
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
468
- width: "16px",
469
- height: "12px",
470
- viewBox: "0 0 16 12",
471
- version: "1.1",
472
- xmlns: "http://www.w3.org/2000/svg",
473
- xmlnsXlink: "http://www.w3.org/1999/xlink",
474
- "aria-hidden": "true",
475
- children: [
476
- /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
477
- children: "Data Table Icon"
478
- }),
479
- /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
480
- stroke: "none",
481
- strokeWidth: "1",
482
- fillRule: "evenodd",
483
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
484
- transform: "translate(-132.000000, -6.000000)",
485
- fillRule: "nonzero",
486
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
487
- transform: "translate(132.000000, -1.000000)",
488
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
489
- transform: "translate(8.000000, 13.000000) scale(1, -1) translate(-8.000000, -13.000000) translate(0.000000, 7.000000)",
490
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
491
- d: "M0,12 L0,0 L16,0 L16,12 L0,12 Z M1,10 L5,10 L5,1 L1,1 L1,10 Z M6,10 L10,10 L10,1 L6,1 L6,10 Z M11,10 L15,10 L15,1 L11,1 L11,10 Z"
492
- })
493
- })
494
- })
495
- })
496
- })
497
- ]
498
- });
499
- case 'api':
500
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
501
- width: "16px",
502
- height: "13px",
503
- viewBox: "0 0 16 13",
504
- version: "1.1",
505
- xmlns: "http://www.w3.org/2000/svg",
506
- xmlnsXlink: "http://www.w3.org/1999/xlink",
507
- "aria-hidden": "true",
508
- children: [
509
- /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
510
- children: "API Icon"
511
- }),
512
- /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
513
- stroke: "none",
514
- strokeWidth: "1",
515
- fillRule: "evenodd",
516
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
517
- transform: "translate(-279.000000, -6.000000)",
518
- fillRule: "nonzero",
519
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
520
- transform: "translate(279.000000, -1.000000)",
521
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
522
- transform: "translate(0.000000, 7.000000)",
523
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
524
- d: "M10.5806452,13 C10.4129032,13 10.2741935,12.9424479 10.1645161,12.8273438 C10.0548387,12.7122396 10,12.5666667 10,12.390625 C10,12.2145833 10.0548387,12.0690104 10.1645161,11.9539062 C10.2741935,11.8388021 10.4129032,11.78125 10.5806452,11.78125 L12.3225806,11.78125 C12.5935484,11.78125 12.8225806,11.6830729 13.0096774,11.4867188 C13.1967742,11.2903646 13.2903226,11.05 13.2903226,10.765625 L13.2903226,8.734375 C13.2903226,8.23333333 13.4354839,7.78645833 13.7258065,7.39375 C14.016129,7.00104167 14.3870968,6.73020833 14.8387097,6.58125 L14.8387097,6.41875 C14.3870968,6.28333333 14.016129,6.01588542 13.7258065,5.61640625 C13.4354839,5.21692708 13.2903226,4.76666667 13.2903226,4.265625 L13.2903226,2.234375 C13.2903226,1.95 13.1967742,1.70963542 13.0096774,1.51328125 C12.8225806,1.31692708 12.5935484,1.21875 12.3225806,1.21875 L10.5806452,1.21875 C10.4129032,1.21875 10.2741935,1.16119792 10.1645161,1.04609375 C10.0548387,0.930989583 10,0.785416667 10,0.609375 C10,0.433333333 10.0548387,0.287760417 10.1645161,0.17265625 C10.2741935,0.0575520833 10.4129032,8.8817842e-16 10.5806452,8.8817842e-16 L12.3225806,8.8817842e-16 C12.916129,8.8817842e-16 13.4193548,0.216666667 13.8322581,0.65 C14.2451613,1.08333333 14.4516129,1.61145833 14.4516129,2.234375 L14.4516129,4.265625 C14.4516129,4.55 14.5451613,4.79036458 14.7322581,4.98671875 C14.9193548,5.18307292 15.1483871,5.28125 15.4193548,5.28125 C15.5870968,5.28125 15.7258065,5.33880208 15.8354839,5.45390625 C15.9451613,5.56901042 16,5.71458333 16,5.890625 L16,7.109375 C16,7.271875 15.9451613,7.4140625 15.8354839,7.5359375 C15.7258065,7.6578125 15.5870968,7.71875 15.4193548,7.71875 C15.1483871,7.71875 14.9193548,7.81692708 14.7322581,8.01328125 C14.5451613,8.20963542 14.4516129,8.45 14.4516129,8.734375 L14.4516129,10.765625 C14.4516129,11.3885417 14.2451613,11.9166667 13.8322581,12.35 C13.4193548,12.7833333 12.916129,13 12.3225806,13 L10.5806452,13 Z M3.67741935,13 C3.08387097,13 2.58064516,12.7833333 2.16774194,12.35 C1.75483871,11.9166667 1.5483871,11.3885417 1.5483871,10.765625 L1.5483871,8.734375 C1.5483871,8.45 1.45483871,8.20963542 1.26774194,8.01328125 C1.08064516,7.81692708 0.851612903,7.71875 0.580645161,7.71875 C0.425806452,7.71875 0.290322581,7.6578125 0.174193548,7.5359375 C0.0580645161,7.4140625 3.52606833e-13,7.271875 3.52606833e-13,7.109375 L3.52606833e-13,5.890625 C3.52606833e-13,5.71458333 0.0580645161,5.56901042 0.174193548,5.45390625 C0.290322581,5.33880208 0.425806452,5.28125 0.580645161,5.28125 C0.851612903,5.28125 1.08064516,5.18307292 1.26774194,4.98671875 C1.45483871,4.79036458 1.5483871,4.55 1.5483871,4.265625 L1.5483871,2.234375 C1.5483871,1.61145833 1.75483871,1.08333333 2.16774194,0.65 C2.58064516,0.216666667 3.08387097,8.8817842e-16 3.67741935,8.8817842e-16 L5.41935484,8.8817842e-16 C5.58709677,8.8817842e-16 5.72580645,0.0575520833 5.83548387,0.17265625 C5.94516129,0.287760417 6,0.433333333 6,0.609375 C6,0.785416667 5.94516129,0.930989583 5.83548387,1.04609375 C5.72580645,1.16119792 5.58709677,1.21875 5.41935484,1.21875 L3.67741935,1.21875 C3.40645161,1.21875 3.17741935,1.31692708 2.99032258,1.51328125 C2.80322581,1.70963542 2.70967742,1.95 2.70967742,2.234375 L2.70967742,4.265625 C2.70967742,4.76666667 2.56451613,5.21692708 2.27419355,5.61640625 C1.98387097,6.01588542 1.61290323,6.28333333 1.16129032,6.41875 L1.16129032,6.58125 C1.61290323,6.73020833 1.98387097,7.00104167 2.27419355,7.39375 C2.56451613,7.78645833 2.70967742,8.23333333 2.70967742,8.734375 L2.70967742,10.765625 C2.70967742,11.05 2.80322581,11.2903646 2.99032258,11.4867188 C3.17741935,11.6830729 3.40645161,11.78125 3.67741935,11.78125 L5.41935484,11.78125 C5.58709677,11.78125 5.72580645,11.8388021 5.83548387,11.9539062 C5.94516129,12.0690104 6,12.2145833 6,12.390625 C6,12.5666667 5.94516129,12.7122396 5.83548387,12.8273438 C5.72580645,12.9424479 5.58709677,13 5.41935484,13 L3.67741935,13 Z"
525
- })
526
- })
527
- })
528
- })
529
- })
530
- ]
531
- });
532
- case 'download':
533
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
534
- width: "16px",
535
- height: "16px",
536
- viewBox: "0 0 16 16",
537
- version: "1.1",
538
- xmlns: "http://www.w3.org/2000/svg",
539
- xmlnsXlink: "http://www.w3.org/1999/xlink",
540
- "aria-hidden": "true",
541
- children: [
542
- /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
543
- children: "Download Icon"
544
- }),
545
- /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
546
- stroke: "none",
547
- strokeWidth: "1",
548
- fillRule: "evenodd",
549
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
550
- transform: "translate(-370.000000, -4.000000)",
551
- fillRule: "nonzero",
552
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
553
- transform: "translate(370.000000, -1.000000)",
554
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
555
- d: "M9,6 C9,5.446875 8.553125,5 8,5 C7.446875,5 7,5.446875 7,6 L7,13.584375 L4.70625,11.290625 C4.315625,10.9 3.68125,10.9 3.290625,11.290625 C2.9,11.68125 2.9,12.315625 3.290625,12.70625 L7.290625,16.70625 C7.68125,17.096875 8.315625,17.096875 8.70625,16.70625 L12.70625,12.70625 C13.096875,12.315625 13.096875,11.68125 12.70625,11.290625 C12.315625,10.9 11.68125,10.9 11.290625,11.290625 L9,13.584375 L9,6 Z M2,16 C0.896875,16 0,16.896875 0,18 L0,19 C0,20.103125 0.896875,21 2,21 L14,21 C15.103125,21 16,20.103125 16,19 L16,18 C16,16.896875 15.103125,16 14,16 L10.828125,16 L9.4125,17.415625 C8.63125,18.196875 7.365625,18.196875 6.584375,17.415625 L5.171875,16 L2,16 Z M13.5,19.25 C13.084375,19.25 12.75,18.915625 12.75,18.5 C12.75,18.084375 13.084375,17.75 13.5,17.75 C13.915625,17.75 14.25,18.084375 14.25,18.5 C14.25,18.915625 13.915625,19.25 13.5,19.25 Z"
556
- })
557
- })
558
- })
559
- })
560
- ]
561
- });
562
- case 'data-dictionary':
563
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
564
- width: "14px",
565
- height: "16px",
566
- viewBox: "0 0 14 16",
567
- version: "1.1",
568
- xmlns: "http://www.w3.org/2000/svg",
569
- xmlnsXlink: "http://www.w3.org/1999/xlink",
570
- "aria-hidden": "true",
571
- children: [
572
- /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
573
- children: "Data Dictionary Icon"
574
- }),
575
- /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
576
- id: "Dev-Handoff",
577
- stroke: "none",
578
- strokeWidth: "1",
579
- fillRule: "evenodd",
580
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("g", {
581
- id: "Group-15",
582
- transform: "translate(0, 0)",
583
- fillRule: "nonzero",
584
- children: [
585
- /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
586
- d: "M0.0218026938,8.0971396 C0.0218026938,6.24591342 -0.0192244811,4.39368657 0.0358119731,2.54446171 C0.0728364968,1.28162525 1.07950328,0.231929969 2.34434106,0.0678212692 C2.69057039,0.022791443 3.04180304,0.00477951255 3.39003369,0.00477951255 C6.28395052,-0.000223801472 9.17786735,-0.00322578988 12.0717842,0.00578017535 C12.6811878,0.00778150096 13.2435603,0.169888875 13.6428248,0.683228893 C13.9059991,1.02145292 13.9950581,1.42171804 13.9970594,1.83299045 C14.0050647,4.76793446 14.0080667,7.70287846 13.9950581,10.6378225 C13.9920561,11.280248 13.7689083,11.8466231 13.1875232,12.2078624 C13.0464297,12.2959207 12.992394,12.4099963 12.9953959,12.5811096 C13.0054026,13.1394795 13.0064032,13.69885 12.9953959,14.2572198 C12.9913933,14.4473458 13.0364231,14.5173922 13.2425597,14.5243968 C13.6178082,14.5364047 13.8979938,14.7765638 13.9720428,15.0987772 C14.0450912,15.4129854 13.9069998,15.7482074 13.6088022,15.9013088 C13.4827187,15.9663519 13.3226127,15.9933698 13.1775166,15.9933698 C9.62516362,15.9983731 6.07181,16.0053777 2.51945705,15.9933698 C1.09851587,15.9883665 0.0708351712,15.0207255 0.0268060079,13.5997844 C-0.0202251439,12.0507583 0.00979474021,10.4987303 0.00579208899,8.94770299 C0.00579208899,8.66451541 0.00579208899,8.38032718 0.00579208899,8.0971396 C0.010795403,8.0971396 0.015798717,8.0971396 0.0218026938,8.0971396 L0.0218026938,8.0971396 Z M1.49477834,11.1421565 C1.99510974,11.1071333 2.44740933,11.0490949 2.90070958,11.0480942 C5.91970926,11.0400889 8.93870894,11.0440916 11.9577086,11.0430909 C12.4020029,11.0430909 12.5280864,10.9200094 12.5280864,10.4837204 C12.5280864,7.66585394 12.5280864,4.84698682 12.5280864,2.02912036 C12.5280864,1.58382542 12.4430301,1.49976974 12.0057404,1.49976974 C9.7952763,1.49976974 7.58581283,1.49976974 5.37534869,1.49976974 C4.50777404,1.49976974 3.64019939,1.4927651 2.7736254,1.50277173 C2.01712432,1.51177769 1.47576575,2.0711482 1.47576575,2.82664862 C1.47576575,5.50342162 1.47576575,8.17919395 1.47576575,10.855967 C1.47576575,10.9610365 1.48877436,11.0661061 1.49377768,11.1421565 L1.49477834,11.1421565 Z M6.8923535,14.5153908 C8.3263033,14.5153908 9.7602531,14.5093869 11.1932022,14.5203941 C11.4393653,14.5223955 11.5334276,14.467359 11.5224203,14.2041847 C11.5014064,13.7388765 11.5044084,13.2705663 11.5224203,12.8042574 C11.5314263,12.5630977 11.4553759,12.4960533 11.2132155,12.4960533 C8.37933843,12.5040586 5.54446071,12.5010566 2.71058365,12.5020573 C2.5935061,12.5020573 2.47642855,12.4990553 2.36135233,12.5140652 C1.64988108,12.6031242 1.26662722,13.4186644 1.63387047,14.0360733 C1.86102093,14.4173259 2.22426152,14.5083862 2.61652134,14.5113882 C4.04146518,14.5203941 5.46740967,14.5153908 6.8923535,14.5153908 L6.8923535,14.5153908 Z",
587
- id: "Shape"
588
- }),
589
- /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
590
- d: "M7.50976245,7.49574126 C6.62717786,7.49574126 5.7435926,7.49774259 4.86100801,7.49574126 C4.36167727,7.49373993 4.05747578,7.22956495 4.03045788,6.787272 C4.00243933,6.33597307 4.34366534,6.01476031 4.87101464,6.01275899 C5.95373179,6.00775567 7.03644895,6.01175832 8.1191661,6.01175832 C8.79361283,6.01175832 9.46805956,6.00675501 10.143507,6.01375965 C10.7519099,6.01976362 11.0981393,6.45305062 10.9360319,6.99140721 C10.8429703,7.30261334 10.55578,7.4947406 10.1585169,7.49674192 C9.2759323,7.50074457 8.39234705,7.49774259 7.50976245,7.49774259 L7.50976245,7.49574126 Z",
591
- id: "Path"
592
- }),
593
- /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
594
- d: "M7.50776113,5.00108889 C6.61617057,5.00108889 5.72458001,5.0060922 4.83298945,4.99908757 C4.25360569,4.99508491 3.90237305,4.53177804 4.07248572,4.01643669 C4.1565414,3.76226834 4.33365871,3.61517091 4.5868264,3.55913379 C4.6999013,3.53411722 4.81797951,3.52611192 4.9340564,3.52611192 C6.6501931,3.52411059 8.36733048,3.52411059 10.0834672,3.52611192 C10.5577814,3.52611192 10.8299616,3.69022062 10.9340306,4.03044597 C11.090134,4.53778201 10.7439046,4.99408425 10.1825328,4.99908757 C9.29094224,5.00709287 8.39935169,5.00108889 7.50776113,5.00108889 L7.50776113,5.00108889 Z",
595
- id: "Path"
596
- })
597
- ]
598
- })
599
- })
600
- ]
601
- });
602
- default:
603
- return null;
604
- }
605
- };
606
- var $b38839fd67928f42$export$2e2bcd8739ae039 = $b38839fd67928f42$var$SearchItemIcon;
607
584
 
608
585
 
609
- const $b61856b23f5f58a2$var$LargeFileDialog = (props)=>{
610
- const [modalOpen, setModalOpen] = (0, $hgUW1$useState)(false);
611
- const { downloadUrl: downloadUrl } = props;
612
- return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
586
+
587
+ const $f57121650539d8c5$var$NavBar = (props)=>{
588
+ const { links: links, menuName: menuName, menuId: menuId, menuClasses: menuClasses, linkClasses: linkClasses, subLinkClasses: subLinkClasses, wrapLabel: wrapLabel = false } = props;
589
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
590
+ className: `dkan-c-${menuId}-menu`,
591
+ "aria-labelledby": `dkan-c-${menuId}-menu--heading`,
613
592
  children: [
614
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
615
- variation: "solid",
616
- className: "ds-l-col--12 ds-l-md-col--auto",
617
- onClick: ()=>setModalOpen(true),
618
- children: [
619
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
620
- id: "download"
621
- }),
622
- "Download"
623
- ]
593
+ /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
594
+ id: `dkan-c-${menuId}-menu--heading`,
595
+ className: "ds-u-visibility--screen-reader",
596
+ children: menuName
624
597
  }),
625
- modalOpen && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
626
- onExit: ()=>setModalOpen(false),
627
- isOpen: modalOpen,
628
- heading: "Notice: Large File Size",
629
- actions: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
630
- children: [
631
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
632
- href: downloadUrl,
633
- className: "ds-u-margin-right--2 ",
634
- variation: "solid",
635
- children: "Yes, download"
636
- }),
637
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
638
- variation: "ghost",
639
- onClick: ()=>setModalOpen(false),
640
- children: "No, cancel"
598
+ /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
599
+ className: menuClasses,
600
+ children: links.map((link)=>{
601
+ if (link.submenu) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $669b51f08325b4e3$export$2e2bcd8739ae039), {
602
+ link: link,
603
+ wrapLabel: wrapLabel,
604
+ subLinkClasses: subLinkClasses,
605
+ linkClasses: linkClasses
606
+ }, link.id);
607
+ else return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
608
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
609
+ to: link,
610
+ className: linkClasses,
611
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
612
+ children: link.label
613
+ })
641
614
  })
642
- ]
643
- }),
644
- children: [
645
- /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
646
- children: "This is a very large file and, depending on your network characteristics and software, may take a long time to download or fail to download. Additionally, the number of rows in the file may larger than the maximum rows your version of Microsoft Excel supports. If you can't download the file, we recommend engaging your IT support staff. If you are able to download the file but are unable to open it in MS Excel or get a message that the data has been truncated, we recommend trying alternative programs such as MS Access, Universal Viewer, Editpad or any other software your organization has available for large datasets."
647
- }),
648
- /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
649
- children: "Would you like to proceed?"
650
- })
651
- ]
615
+ }, link.id);
616
+ })
652
617
  })
653
618
  ]
654
619
  });
655
620
  };
656
- var $b61856b23f5f58a2$export$2e2bcd8739ae039 = $b61856b23f5f58a2$var$LargeFileDialog;
657
-
658
-
659
-
660
-
661
-
662
- const $727b038175bac6f5$var$TransformedDate = ({ date: date, options: options = {
663
- year: 'numeric',
664
- month: 'long',
665
- day: 'numeric',
666
- timeZone: 'UTC'
667
- } })=>{
668
- const rawDate = new Date(date);
669
- let modifiedDate = '';
670
- if (rawDate) modifiedDate = rawDate.toLocaleDateString('en-US', options);
671
- return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
672
- children: modifiedDate
673
- });
674
- };
675
- var $727b038175bac6f5$export$2e2bcd8739ae039 = $727b038175bac6f5$var$TransformedDate;
676
-
677
-
678
-
679
-
680
-
681
- function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240) {
682
- if (!textString) return '';
683
- let cleanedText = textString;
684
- if (cleanedText.split('</p>').length > 1) cleanedText = cleanedText.split('</p>')[0];
685
- if (cleanedText.split('<br/>').length > 1) cleanedText = cleanedText.split('<br/>')[0];
686
- cleanedText = (0, $hgUW1$lodashtruncate)(cleanedText, {
687
- 'length': textLength,
688
- 'separator': ' '
689
- });
690
- return (0, $hgUW1$dompurify).sanitize(cleanedText, {
691
- ALLOWED_TAGS: []
692
- });
693
- }
621
+ var $f57121650539d8c5$export$2e2bcd8739ae039 = $f57121650539d8c5$var$NavBar;
694
622
 
695
623
 
696
624
 
@@ -700,1186 +628,538 @@ function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240)
700
628
 
701
629
 
702
630
 
703
- const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
704
- const { type: type, date: date, boldLabel: boldLabel = false, displayTooltips: displayTooltips = true } = props;
705
- const dateText = {
706
- modified: 'Last Modified',
707
- released: 'Released',
708
- refresh: 'Planned Update'
709
- };
710
- const tooltipContent = {
711
- modified: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
712
- children: [
713
- /*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
714
- children: "Last Modified: "
715
- }),
716
- " The date the ",
717
- /*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
718
- "dataset was last updated."
719
- ]
720
- }),
721
- released: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
722
- children: [
723
- /*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
724
- children: "Released: "
725
- }),
726
- " The date the most ",
727
- /*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
728
- "recent dataset was made available",
729
- /*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
730
- "to the public."
731
- ]
732
- }),
733
- refresh: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
734
- children: [
735
- /*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
736
- children: "Planned Update:"
737
- }),
738
- " The date the ",
739
- /*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
740
- "dataset is scheduled to be updated."
741
- ]
742
- })
743
- };
631
+ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
632
+ const { title: title, links: links, mobileMax: mobileMax } = props;
633
+ const active = (0, $hgUW1$useLocation)().pathname;
634
+ const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
635
+ const styleClasses = 'dkan-c--sidebar-nav-wrapper ds-u-border--1 ds-u-border--color-gray-lightest ds-u-padding--2';
636
+ const mobileClass = `dkan-c-sidebar-nav--${mobileMax ? 'mobile' : 'desktop'}`;
744
637
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
745
- className: "dataset-date-item ds-l-sm-col--auto ds-l-col--12 ds-u-padding--0",
638
+ className: `dkan-c-sidebar-nav ${mobileClass}`,
746
639
  children: [
747
- /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
748
- className: `dataset-date-item-label ${boldLabel ? 'ds-u-font-weight--bold' : ''}`,
640
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
641
+ className: "dkan-c-sidebar-nav--mobile-header ds-u-align-items--center ds-u-justify-content--between ds-u-padding-y--2 ds-u-fill--primary-darker ds-u-color--white",
749
642
  children: [
750
643
  /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
751
- children: dateText[type]
644
+ className: "ds-u-margin-left--2 ds-u-margin-y--0 ds-text-heading--xl",
645
+ children: "Pages in this section"
752
646
  }),
753
- ": ",
754
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $727b038175bac6f5$export$2e2bcd8739ae039), {
755
- date: date
647
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
648
+ "aria-haspopup": "true",
649
+ variation: "ghost",
650
+ "aria-expanded": `${menuOpen ? 'true' : 'false'}`,
651
+ onDark: true,
652
+ onClick: ()=>setMenuOpen(!menuOpen),
653
+ children: [
654
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
655
+ className: "ds-u-visibility--screen-reader",
656
+ children: "Toggle menu"
657
+ }),
658
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
659
+ direction: menuOpen ? 'up' : 'down'
660
+ })
661
+ ]
756
662
  })
757
663
  ]
758
664
  }),
759
- displayTooltips === true && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Tooltip), {
760
- "aria-label": dateText[type],
761
- className: "ds-c-tooltip__trigger-icon ds-u-display--inline ds-u-padding-left--0 ds-uw-padding-right--0 ds-u-font-weight--normal",
762
- title: tooltipContent[type],
763
- placement: "top",
764
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
665
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
666
+ className: ``,
667
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
668
+ className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ? 'open' : 'close'}`,
669
+ children: [
670
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
671
+ className: "ds-u-padding--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest",
672
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("h3", {
673
+ className: "ds-text-heading--lg",
674
+ children: title
675
+ })
676
+ }),
677
+ /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
678
+ className: "ds-u-padding-bottom--2",
679
+ children: links.map(({ url: url, label: label })=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
680
+ className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ? 'active' : ''}`,
681
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
682
+ className: "ds-u-display--flex ds-u-padding-y--1",
683
+ children: [
684
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
685
+ className: "dkan-c-sidebar-nav-link-status"
686
+ }),
687
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
688
+ to: url,
689
+ className: "dkan-c-sidebar-nav-link ds-u-margin-left--2",
690
+ children: label
691
+ })
692
+ ]
693
+ })
694
+ }, `${url}${label}`))
695
+ })
696
+ ]
697
+ })
765
698
  })
766
699
  ]
767
700
  });
768
701
  };
769
- var $17711e94d2ce0ee4$export$2e2bcd8739ae039 = $17711e94d2ce0ee4$var$DatasetDateItem;
702
+ var $953b286f7778640e$export$2e2bcd8739ae039 = $953b286f7778640e$var$SidebarNavigation;
770
703
 
771
704
 
772
705
 
773
- const $20de4fedf33d4f9a$var$DatasetDate = (props)=>{
774
- const { date: date, modifiedBoldLabel: modifiedBoldLabel = false, releasedBoldLabel: releasedBoldLabel = false, refreshBoldLabel: refreshBoldLabel = false, displayTooltips: displayTooltips = true } = props;
775
- // Create an array of date items to render
776
- const dateItems = [];
777
- Object.entries(date).forEach(([key, value])=>{
778
- if (value) {
779
- const bold = key === "modified" && modifiedBoldLabel || key === "released" && releasedBoldLabel || key === "refresh" && refreshBoldLabel;
780
- dateItems.push(/*#__PURE__*/ (0, $hgUW1$jsx)((0, $17711e94d2ce0ee4$export$2e2bcd8739ae039), {
781
- type: key,
782
- displayTooltips: displayTooltips,
783
- date: value,
784
- boldLabel: bold
785
- }, key));
786
- }
706
+
707
+
708
+
709
+ const $b0968edc60d7d3a4$var$SidebarPage = (props)=>{
710
+ const { links: links, menuTitle: menuTitle, mobileMaxWidth: mobileMaxWidth = 768, children: children } = props;
711
+ const mobileMax = (0, $hgUW1$useMediaQuery)({
712
+ query: `(max-width: ${mobileMaxWidth}px)`
787
713
  });
788
714
  return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
789
- className: "dataset-date ds-u-display--flex ds-u-flex-wrap--wrap ds-u-font-size--sm ds-u-align-items--start",
790
- children: dateItems.map((item, index)=>/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$react).Fragment, {
791
- children: [
792
- item,
793
- index < dateItems.length - 1 && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
794
- className: "bullet-point",
795
- children: "\u2022"
715
+ className: `${mobileMax ? "a" : 'ds-l-container'}`,
716
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
717
+ className: `${mobileMax ? "a" : 'ds-l-row'}`,
718
+ children: [
719
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
720
+ className: `${mobileMax ? 'a' : "ds-l-col--4"}`,
721
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $953b286f7778640e$export$2e2bcd8739ae039), {
722
+ links: links,
723
+ title: menuTitle,
724
+ mobileMax: mobileMax
796
725
  })
797
- ]
798
- }, index))
726
+ }),
727
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
728
+ className: `${mobileMax ? "ds-l-container" : " ds-l-md-col--8"}`,
729
+ children: children
730
+ })
731
+ ]
732
+ })
799
733
  });
800
734
  };
801
- var $20de4fedf33d4f9a$export$2e2bcd8739ae039 = $20de4fedf33d4f9a$var$DatasetDate;
735
+ var $b0968edc60d7d3a4$export$2e2bcd8739ae039 = $b0968edc60d7d3a4$var$SidebarPage;
802
736
 
803
737
 
804
- function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
805
- if (dist && dist.data) {
806
- if (dist.data.format) return dist.data.format.toLowerCase();
807
- if (dist.data.mediaType) {
808
- const mediaType = dist.data.mediaType.split('/');
809
- if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
810
- }
811
- if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
812
- if (dist.data["%Ref:downloadURL"][0].data.mimeType) {
813
- const mimeType = dist.data["%Ref:downloadURL"][0].data.mimeType.split("/");
814
- if (mimeType.length && mimeType[1]) return mimeType[1].toLowerCase();
815
- }
816
- }
817
- }
818
- return '';
819
- }
820
738
 
821
739
 
822
- const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
823
- const desktop = (0, $hgUW1$useMediaQuery)({
824
- minWidth: 1024
825
- });
826
- 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, updateDateMonthYearOnly: updateDateMonthYearOnly = false, showTopics: showTopics = false, theme: theme, topicSlugs: topicSlugs, distribution: distribution } = props;
827
- const location = (0, $hgUW1$useLocation)();
828
- let linkContainerClasses = 'ds-u-margin-bottom--2';
829
- if (dataDictionaryLinks) linkContainerClasses += ' ds-l-col--6 ds-u-padding-right--0';
830
- else linkContainerClasses += ' ds-l-col--auto ds-u-padding-left--0';
831
- let linkClasses = 'ds-u-display--block ds-u-text-align--left';
832
- if (desktop) {
833
- linkContainerClasses = 'ds-u-padding-x--0';
834
- linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
835
- }
836
- let themes;
837
- if (theme && showTopics) themes = /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
838
- className: "theme-list item-theme ds-u-padding-left--2 ds-u-margin-top--2 ds-u-margin-bottom--0",
839
- children: theme.map((topic, index)=>{
840
- const title = topic || 'Unknown Topic';
841
- const prefix = 'topics';
842
- // Use the provided slug or fallback to a simple slug generation
843
- const slug = topicSlugs?.[title];
844
- const link = `/${prefix}/${slug}`;
845
- return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
846
- className: "ds-u-fill--primary ds-u-radius--pill",
847
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
848
- to: link,
849
- state: {
850
- fromUrl: location.pathname,
851
- fromTitle: false,
852
- fromSearchList: location.pathname.includes('search')
853
- },
854
- children: title
855
- })
856
- }, `dist-${title}-${index}`);
857
- })
858
- });
859
- const date = {
860
- modified: modified,
861
- released: released,
862
- refresh: refresh
863
- };
864
- const url = `/dataset/${identifier}`;
865
- const DataTableLink = ()=>{
866
- if ((0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv") return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
867
- to: `${url}#data-table`,
868
- children: [
869
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
870
- id: "data-table"
871
- }),
872
- "Data Table"
873
- ]
740
+
741
+
742
+
743
+ const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl = 'datasets', searchKey: searchKey = 'fulltext', textfieldLabel: textfieldLabel = 'Search for a dataset', searchButtonText: searchButtonText = 'Search' })=>{
744
+ const navigate = (0, $hgUW1$useNavigate)();
745
+ const [searchValue, setSearchValue] = (0, $hgUW1$useState)('');
746
+ function submitHero(e) {
747
+ e.preventDefault();
748
+ const params = new URLSearchParams({
749
+ [searchKey]: searchValue
874
750
  });
875
- return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
876
- className: "dkan-disabled-link",
877
- component: "a",
878
- offset: [
879
- 0,
880
- 5
881
- ],
882
- title: "There is no Data Table associated with this dataset. Data Tables will only display for CSV files.",
751
+ navigate(`/${searchUrl}?${params.toString()}`);
752
+ }
753
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
754
+ className: `dc-c-hero ds-base ds-u-padding--2`,
755
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
756
+ className: "ds-l-container",
883
757
  children: [
884
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
885
- id: "data-table"
758
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
759
+ className: "ds-l-row",
760
+ children: [
761
+ /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
762
+ className: "ds-text-heading--5xl ds-u-color--white ds-u-margin-y--1",
763
+ children: title
764
+ }),
765
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
766
+ className: "ds-u-color--white ds-u-measure--wide",
767
+ children: description
768
+ })
769
+ ]
886
770
  }),
887
- "Data Table"
888
- ]
889
- });
890
- };
891
- const dataDictionaryExists = ()=>{
892
- if (distribution && "data" in distribution) {
893
- if ("describedBy" in distribution.data && "describedByType" in distribution.data) {
894
- const types = [
895
- 'application/vnd.tableschema+json',
896
- 'application/pdf'
897
- ];
898
- const isValidType = types.includes(distribution.data.describedByType);
899
- return isValidType;
900
- }
901
- }
902
- return false;
903
- };
904
- const DataDictionaryLink = ()=>{
905
- if (dataDictionaryExists()) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
906
- to: `${url}#data-dictionary`,
907
- children: [
908
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
909
- id: "data-dictionary"
910
- }),
911
- "Data Dictionary"
912
- ]
913
- });
914
- return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
915
- className: "dkan-disabled-link",
916
- component: "a",
917
- offset: [
918
- 0,
919
- 5
920
- ],
921
- title: "There is no Data Dictionary associated with this dataset.",
922
- children: [
923
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
924
- id: "data-dictionary"
925
- }),
926
- "Data Dictionary"
771
+ /*#__PURE__*/ (0, $hgUW1$jsx)("form", {
772
+ onSubmit: (e)=>submitHero(e),
773
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
774
+ style: {
775
+ position: 'relative'
776
+ },
777
+ className: "ds-l-row ds-u-align-items--stretch ds-u-margin-y--4 ds-u-flex-wrap--nowrap",
778
+ children: [
779
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
780
+ className: "ds-u-padding--0 ds-u-margin-right--1",
781
+ style: {
782
+ flex: '1 1 100%',
783
+ maxWidth: '100%'
784
+ },
785
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
786
+ label: textfieldLabel,
787
+ labelClassName: "ds-u-visibility--screen-reader",
788
+ name: "search_text_input",
789
+ style: {
790
+ maxWidth: 'none',
791
+ height: '61px',
792
+ margin: '0 20px 0 0'
793
+ },
794
+ onChange: (e)=>{
795
+ setSearchValue(e.target.value);
796
+ }
797
+ })
798
+ }),
799
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
800
+ className: "ds-u-margin-left--auto",
801
+ size: "big",
802
+ type: "submit",
803
+ variation: "solid",
804
+ onDark: true,
805
+ children: [
806
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
807
+ className: "fas fa-search small-text ds-u-sm-display--none"
808
+ }),
809
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
810
+ className: "full-text ds-u-display--none ds-u-sm-display--inline-block",
811
+ children: searchButtonText
812
+ })
813
+ ]
814
+ })
815
+ ]
816
+ })
817
+ })
927
818
  ]
928
- });
929
- };
930
- const dateOptions = updateDateMonthYearOnly ? {
931
- year: 'numeric',
932
- month: 'long',
933
- day: undefined,
934
- timeZone: 'UTC'
935
- } : undefined;
819
+ })
820
+ });
821
+ };
822
+ var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
823
+
824
+
825
+
826
+
827
+
828
+
829
+
830
+
831
+ const $727b038175bac6f5$var$TransformedDate = ({ date: date, options: options = {
832
+ year: 'numeric',
833
+ month: 'long',
834
+ day: 'numeric',
835
+ timeZone: 'UTC'
836
+ } })=>{
837
+ const rawDate = new Date(date);
838
+ let modifiedDate = '';
839
+ if (rawDate) modifiedDate = rawDate.toLocaleDateString('en-US', options);
840
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
841
+ children: modifiedDate
842
+ });
843
+ };
844
+ var $727b038175bac6f5$export$2e2bcd8739ae039 = $727b038175bac6f5$var$TransformedDate;
845
+
846
+
847
+
848
+ const $c068004d499082cc$var$DatasetListItem = (props)=>{
849
+ const desktop = (0, $hgUW1$useMediaQuery)({
850
+ minWidth: 1024
851
+ });
852
+ const { title: title, modified: modified, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
853
+ let linkContainerClasses = 'ds-u-margin-bottom--2';
854
+ if (dataDictionaryLinks) linkContainerClasses += ' ds-l-col--6 ds-u-padding-right--0';
855
+ else linkContainerClasses += ' ds-l-col--auto ds-u-padding-left--0';
856
+ let linkClasses = 'ds-u-display--block ds-u-text-align--left';
857
+ if (desktop) {
858
+ linkContainerClasses = 'ds-u-padding-x--0';
859
+ linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
860
+ }
936
861
  return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
937
- className: "dc-c-search-list-item ds-u-padding-top--3",
862
+ className: "dc-c-list-item ds-u-padding-top--4",
938
863
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
939
864
  className: `dc-c-searchlist-item ${paginationEnabled ? 'ds-u-border-top--1' : 'ds-u-border-bottom--1 ds-u-padding-bottom--3'}`,
940
865
  children: [
941
866
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
942
867
  className: "ds-l-row ds-u-align-items--start",
943
868
  children: [
944
- !showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
869
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
945
870
  id: `dataset-${identifier}-updated-date`,
946
- className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? 'ds-u-padding-top--2' : 'ds-u-padding-top--0'}`,
871
+ 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'}`,
947
872
  children: [
948
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
949
- children: "Updated:"
950
- }),
951
- " ",
873
+ "Updated ",
952
874
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $727b038175bac6f5$export$2e2bcd8739ae039), {
953
- date: modified,
954
- options: dateOptions
875
+ date: modified
955
876
  })
956
877
  ]
957
878
  }),
958
879
  /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
959
- className: `ds-l-col--12 ds-text-heading--2xl ${showDateDetails ? "ds-u-margin-top--2 ds-u-margin-bottom--0" : ""}`,
960
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
961
- "aria-describedby": `dataset-${identifier}-updated-date`,
962
- to: `${url}`,
963
- children: title
964
- })
965
- }),
966
- themes
880
+ className: "ds-l-col--12 ds-text-heading--2xl",
881
+ children: title
882
+ })
967
883
  ]
968
884
  }),
969
- description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
885
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
970
886
  className: "ds-l-row",
971
887
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
972
888
  className: "ds-l-col--12 ds-l-md-col--12 ds-u-margin-top--2",
973
889
  children: [
974
- (0, $1a2bf34e2a8f6b80$export$59a943b34a82e690)(description),
975
- description.length > 240 ? /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
976
- children: [
977
- ' ',
978
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
979
- to: `/dataset/${identifier}`,
980
- children: "See more"
981
- })
982
- ]
983
- }) : ''
890
+ "The ",
891
+ title,
892
+ " dataset was updated."
984
893
  ]
985
894
  })
986
895
  }),
987
- showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
988
- className: "dataset-dates ds-u-margin-top--2",
989
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $20de4fedf33d4f9a$export$2e2bcd8739ae039), {
990
- date: date,
991
- displayTooltips: false
992
- })
993
- }),
994
- downloadUrl ? /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
995
- className: `ds-u-margin-top--3 ds-u-padding-left--0 download-button`,
996
- children: largeFile ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
997
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b61856b23f5f58a2$export$2e2bcd8739ae039), {
998
- downloadUrl: downloadUrl
896
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
897
+ className: "ds-l-row",
898
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
899
+ className: "ds-l-col--12",
900
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
901
+ "aria-describedby": `dataset-${identifier}-updated-date`,
902
+ to: `/dataset/${identifier}`,
903
+ children: [
904
+ "View the Dataset for ",
905
+ title,
906
+ " "
907
+ ]
999
908
  })
1000
- }) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
1001
- href: downloadUrl,
1002
- variation: "solid",
1003
- className: "ds-l-col--12 ds-l-md-col--auto",
1004
- children: [
1005
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
1006
- id: "download"
1007
- }),
1008
- "Download"
1009
- ]
1010
909
  })
1011
- }) : '',
1012
- /*#__PURE__*/ (0, $hgUW1$jsxs)("ul", {
1013
- className: `ds-l-row ds-u-padding--0 ds-u-flex-direction--row ds-u-justify-content--between ds-u-md-justify-content--start ds-u-margin-top--3 ds-u-margin-x--0 ${!dataDictionaryLinks ? 'ds-u-justify-content--center ds-u-md-justify-content--start' : ''}`,
1014
- children: [
1015
- /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1016
- className: linkContainerClasses,
1017
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1018
- className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? '' : ' dkan-disabled-link-wrapper'}`,
1019
- children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataTableLink, {})
1020
- })
1021
- }),
1022
- /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1023
- className: linkContainerClasses,
1024
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1025
- className: linkClasses,
1026
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
1027
- to: `${url}#overview`,
1028
- children: [
1029
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
1030
- id: "overview"
1031
- }),
1032
- "Overview"
1033
- ]
1034
- })
1035
- })
1036
- }),
1037
- dataDictionaryLinks ? /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1038
- className: linkContainerClasses,
1039
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1040
- className: `${linkClasses}${dataDictionaryExists() ? '' : ' dkan-disabled-link-wrapper'}`,
1041
- children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataDictionaryLink, {})
1042
- })
1043
- }) : '',
1044
- /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1045
- className: linkContainerClasses,
1046
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1047
- className: linkClasses,
1048
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
1049
- to: `${url}#api`,
1050
- children: [
1051
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
1052
- id: "api"
1053
- }),
1054
- "API"
1055
- ]
1056
- })
1057
- })
1058
- })
1059
- ]
1060
910
  })
1061
911
  ]
1062
912
  })
1063
913
  });
1064
914
  };
1065
- var $52c6454cae137465$export$2e2bcd8739ae039 = $52c6454cae137465$var$DatasetSearchListItem;
915
+ var $c068004d499082cc$export$2e2bcd8739ae039 = $c068004d499082cc$var$DatasetListItem;
1066
916
 
1067
917
 
1068
918
 
1069
919
 
1070
920
 
1071
921
 
1072
- const $e011250e8a3bd5e5$var$SearchFacets = (props)=>{
1073
- const { facets: facets, title: title, onClickFunction: onClickFunction, selectedFacets: selectedFacets = [] } = props;
1074
- const filteredFacets = facets.filter((f)=>{
1075
- return Number(f.total) > 0 || selectedFacets.findIndex((i)=>i === f.name) !== -1;
1076
- });
1077
- return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1078
- className: "dkan-dataset-search--facet-container ds-u-margin-bottom--4",
1079
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
1080
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
1081
- contentClassName: "ds-u-padding-left--1 ds-u-padding-right--0",
1082
- heading: title,
1083
- defaultOpen: true,
1084
- children: !filteredFacets.length ? /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
1085
- className: "ds-text-heading--md",
1086
- children: "No matching facets found."
1087
- }) : /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
1088
- children: filteredFacets.map((f)=>{
1089
- return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1090
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Choice), {
1091
- className: "ds-u-margin-y--1",
1092
- checked: selectedFacets.findIndex((s)=>s === f.name) > -1 ? true : false,
1093
- name: `facet_theme_${f.name}`,
1094
- type: "checkbox",
1095
- label: `${f.name} (${f.total})`,
1096
- value: f.name,
1097
- onClick: ()=>onClickFunction(f.type, f.name)
1098
- })
1099
- }, f.name);
1100
- })
1101
- })
1102
- })
1103
- })
1104
- });
1105
- };
1106
- var $e011250e8a3bd5e5$export$2e2bcd8739ae039 = $e011250e8a3bd5e5$var$SearchFacets;
1107
-
1108
-
1109
-
1110
-
1111
-
1112
- const $3b2d31a9c6cd2284$var$LargeFileInfo = (props)=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1113
- className: props.className,
1114
- children: [
1115
- /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
1116
- children: "Some datasets contain very large files and, depending on your network characteristics and software, may take a long time to download or fail to download. Additionally, the number of rows in the file may be larger than the maximum rows your version of Microsoft Excel supports. If you can't download the file, we recommend engaging your IT support staff. If you are able to download the file but are unable to open it in MS Excel or get a message that the data has been truncated, we recommend trying alternative programs such as MS Access, Universal Viewer, Editpad or any other software your organization has available for large datasets."
1117
- }),
1118
- /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
1119
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
1120
- to: "/about/software-specs-and-limits",
1121
- children: "Click here to learn more about software specifications and limits."
1122
- })
1123
- })
1124
- ]
1125
- });
1126
- var $3b2d31a9c6cd2284$export$2e2bcd8739ae039 = $3b2d31a9c6cd2284$var$LargeFileInfo;
1127
-
1128
922
 
1129
923
 
1130
924
 
1131
925
 
1132
926
 
1133
- const $0a551147dc92a718$var$SearchButton = (props)=>{
1134
- const { text: text, altMobileStyle: altMobileStyle } = props;
1135
- const sm = (0, $hgUW1$useMediaQuery)({
1136
- minWidth: 0,
1137
- maxWidth: 768
1138
- });
1139
- return altMobileStyle && sm ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
1140
- className: "ds-u-margin-left--auto ds-u-padding-x--0 ds-c-button--solid dc-c-search-button-mobile",
1141
- size: "big",
1142
- type: "submit",
1143
- style: {
1144
- width: '70px'
1145
- },
1146
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1147
- className: "fas fa-search small-text"
1148
- })
1149
- }) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
1150
- type: "submit",
1151
- variation: "solid",
1152
- className: "ds-l-col--2",
1153
- children: [
1154
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1155
- className: "fas fa-search small-text ds-u-sm-display--none"
1156
- }),
1157
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1158
- className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
927
+ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
928
+ switch(props.id){
929
+ case 'overview':
930
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
931
+ width: "16px",
932
+ height: "16px",
933
+ viewBox: "0 0 16 16",
934
+ version: "1.1",
935
+ xmlns: "http://www.w3.org/2000/svg",
936
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
937
+ "aria-hidden": "true",
1159
938
  children: [
1160
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1161
- children: text ? text : 'Search'
939
+ /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
940
+ children: "Overview Icon"
1162
941
  }),
1163
- ` `,
1164
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1165
- className: "fas fa-arrow-right"
942
+ /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
943
+ stroke: "none",
944
+ strokeWidth: "1",
945
+ fillRule: "evenodd",
946
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
947
+ transform: "translate(0.000000, -4.000000)",
948
+ fillRule: "nonzero",
949
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
950
+ transform: "translate(0.000000, -1.000000)",
951
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("g", {
952
+ transform: "translate(0.000000, 5.000000)",
953
+ children: [
954
+ /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
955
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
956
+ d: "M9.55610973,15.6404494 C9.31670823,15.8801498 9.02743142,16 8.6882793,16 C8.34912718,16 8.05985037,15.8801498 7.82044888,15.6404494 L0.33915212,8.14981273 C0.206151288,8.01664586 0.116375727,7.87682064 0.0698254364,7.73033708 C0.0232751455,7.58385352 0,7.43071161 0,7.27091136 L0,1.19850187 C0,0.852267998 0.113050707,0.565959218 0.33915212,0.339575531 C0.565253533,0.113191844 0.85120532,0 1.19700748,0 L7.26184539,0 C7.42144638,0 7.58104738,0.0233042031 7.74064838,0.0699126092 C7.90024938,0.116521015 8.04655029,0.206408656 8.17955112,0.339575531 L15.6209476,7.79026217 C15.8736492,8.04327923 16,8.33957553 16,8.67915106 C16,9.01872659 15.8736492,9.31502289 15.6209476,9.56803995 L9.55610973,15.6404494 Z M8.75953079,15 L15,8.75953079 L7.24046921,1 L1,1 L1,7.24046921 L8.75953079,15 Z M3,4 C3.26923077,4 3.50320513,3.90064103 3.70192308,3.70192308 C3.90064103,3.50320513 4,3.26923077 4,3 C4,2.73076923 3.90064103,2.49679487 3.70192308,2.29807692 C3.50320513,2.09935897 3.26923077,2 3,2 C2.73076923,2 2.49679487,2.09935897 2.29807692,2.29807692 C2.09935897,2.49679487 2,2.73076923 2,3 C2,3.26923077 2.09935897,3.50320513 2.29807692,3.70192308 C2.49679487,3.90064103 2.73076923,4 3,4 L3,4 Z"
957
+ })
958
+ }),
959
+ /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
960
+ transform: "translate(7.890470, 8.890470) rotate(45.000000) translate(-7.890470, -8.890470) translate(3.543164, 6.321607)",
961
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
962
+ d: "M6.16557222,4.98656515 C6.09634145,5.05213515 6.01557222,5.08309876 5.92326452,5.07945598 C5.83095683,5.07581321 5.7501876,5.04120682 5.68095683,4.97563682 C5.61172606,4.91006682 5.57711068,4.8317471 5.57711068,4.74067766 C5.57711068,4.64960821 5.61172606,4.57128849 5.68095683,4.50571849 L7.72326452,2.57140353 L5.69249529,0.648016895 C5.62326452,0.582446896 5.59057222,0.504127176 5.59441837,0.413057733 C5.59826452,0.32198829 5.63480299,0.243668569 5.70403375,0.17809857 C5.77326452,0.112528571 5.85595683,0.0797435719 5.95211068,0.0797435719 C6.04826452,0.0797435719 6.13095683,0.112528571 6.2001876,0.17809857 L8.47326452,2.34190853 C8.54249529,2.40747853 8.57711068,2.48397686 8.57711068,2.57140353 C8.57711068,2.65883019 8.54249529,2.73532853 8.47326452,2.80089852 L6.16557222,4.98656515 Z M2.29670341,4.98413866 L0.0208413435,2.82877761 C-0.0481241737,2.7631321 -0.0826069324,2.68654566 -0.0826069324,2.59901831 C-0.0826069324,2.51149096 -0.0481241737,2.43490453 0.0208413435,2.36925901 L2.31969192,0.181075204 C2.38865744,0.115429689 2.47103291,0.0826069324 2.56681835,0.0826069324 C2.6626038,0.0826069324 2.74497927,0.115429689 2.81394479,0.181075204 C2.88291031,0.246720718 2.91739307,0.325130638 2.91739307,0.416304963 C2.91739307,0.507479288 2.88291031,0.585889208 2.81394479,0.651534722 L0.76796778,2.59901831 L2.79095629,4.52462006 C2.8599218,4.59026558 2.89440456,4.66685201 2.89440456,4.75437936 C2.89440456,4.84190671 2.8599218,4.91849315 2.79095629,4.98413866 C2.72199077,5.04978418 2.63961529,5.08260693 2.54382985,5.08260693 C2.44804441,5.08260693 2.36566893,5.04978418 2.29670341,4.98413866 L2.29670341,4.98413866 Z"
963
+ })
964
+ })
965
+ ]
966
+ })
967
+ })
968
+ })
1166
969
  })
1167
970
  ]
1168
- })
1169
- ]
1170
- });
1171
- };
1172
- var $0a551147dc92a718$export$2e2bcd8739ae039 = $0a551147dc92a718$var$SearchButton;
1173
-
1174
-
1175
-
1176
-
1177
- const $5723016a5461c1ca$var$PageHeader = (props)=>{
1178
- const { headerText: headerText } = props;
1179
- return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1180
- className: "ds-l-container",
1181
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1182
- className: "ds-l-row",
1183
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1184
- className: "ds-l-md-col--8",
1185
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
1186
- className: "dc-c-entity__name ds-text-heading--3xl ds-u-margin-bottom--4",
1187
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1188
- className: "ds-u-margin-right--2",
1189
- "data-testid": "profile-full-name",
1190
- children: headerText
971
+ });
972
+ case 'data-table':
973
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
974
+ width: "16px",
975
+ height: "12px",
976
+ viewBox: "0 0 16 12",
977
+ version: "1.1",
978
+ xmlns: "http://www.w3.org/2000/svg",
979
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
980
+ "aria-hidden": "true",
981
+ children: [
982
+ /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
983
+ children: "Data Table Icon"
984
+ }),
985
+ /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
986
+ stroke: "none",
987
+ strokeWidth: "1",
988
+ fillRule: "evenodd",
989
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
990
+ transform: "translate(-132.000000, -6.000000)",
991
+ fillRule: "nonzero",
992
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
993
+ transform: "translate(132.000000, -1.000000)",
994
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
995
+ transform: "translate(8.000000, 13.000000) scale(1, -1) translate(-8.000000, -13.000000) translate(0.000000, 7.000000)",
996
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
997
+ d: "M0,12 L0,0 L16,0 L16,12 L0,12 Z M1,10 L5,10 L5,1 L1,1 L1,10 Z M6,10 L10,10 L10,1 L6,1 L6,10 Z M11,10 L15,10 L15,1 L11,1 L11,10 Z"
998
+ })
999
+ })
1000
+ })
1001
+ })
1191
1002
  })
1192
- })
1193
- })
1194
- })
1195
- });
1196
- };
1197
- var $5723016a5461c1ca$export$2e2bcd8739ae039 = $5723016a5461c1ca$var$PageHeader;
1198
-
1199
-
1200
-
1201
-
1202
-
1203
- function $6d5c0212e738499b$export$34e95918366a058e(params, ACA) {
1204
- if (ACA) params = Object.assign(params, {
1205
- ACA: ACA,
1206
- redirect: false
1207
- });
1208
- return params;
1209
- }
1210
-
1211
-
1212
- function $eff7d34c30f5a0fc$export$959638e8dca60ce6(facets) {
1213
- let facetObj = {};
1214
- if (facets) {
1215
- facets.forEach((f)=>{
1216
- if (facetObj[f.type]) facetObj[f.type] = [
1217
- ...facetObj[f.type],
1218
- f
1219
- ];
1220
- else facetObj[f.type] = [
1221
- f
1222
- ];
1223
- });
1224
- // sort facets descending by int value, put non int last
1225
- if (facetObj.keyword) facetObj.keyword.sort((a, b)=>{
1226
- if (Number(a.name) && Number(b.name)) return Number(b.name) - Number(a.name);
1227
- });
1228
- return facetObj;
1229
- }
1230
- }
1231
- function $eff7d34c30f5a0fc$export$60ec7cc1d341a524(searchParams, defaultSortOptions) {
1232
- const params = (0, $hgUW1$qs).parse(searchParams, {
1233
- ignoreQueryPrefix: true
1234
- });
1235
- let themes = params.theme;
1236
- let keywords = params.keyword;
1237
- return {
1238
- page: params.page,
1239
- sort: !params.sort ? defaultSortOptions.defaultSort : params.sort,
1240
- sortOrder: !params.sortOrder ? defaultSortOptions.defaultOrder : params.sortOrder,
1241
- fulltext: params.fulltext,
1242
- selectedFacets: {
1243
- theme: themes ? themes : [],
1244
- keyword: keywords ? keywords : []
1245
- }
1246
- };
1247
- }
1248
- async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA) {
1249
- const { fulltext: fulltext, selectedFacets: selectedFacets, sort: sort, sortOrder: sortOrder, page: page, pageSize: pageSize } = options;
1250
- let params = {
1251
- fulltext: fulltext ? fulltext : undefined,
1252
- ...selectedFacets,
1253
- sort: sort ? sort : undefined,
1254
- ['sort-order']: sortOrder ? sortOrder : undefined,
1255
- page: page !== 1 ? page : undefined,
1256
- ['page-size']: pageSize !== 10 ? pageSize : undefined
1257
- };
1258
- return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
1259
- arrayFormat: 'comma',
1260
- encode: false
1261
- })}`);
1262
- }
1263
-
1264
-
1265
-
1266
-
1267
-
1268
- const $844981eac9b63865$export$eccc29c8d0ff408 = (0, $hgUW1$createContext)({
1269
- ACA: undefined
1270
- });
1271
-
1272
-
1273
- const $e873081a6e8f024e$export$1040147c129fdde9 = (query)=>{
1274
- return /^[a-zA-Z0-9 ]*$/.test(query.trim());
1275
- };
1276
- const $e873081a6e8f024e$var$sortOptions = [
1277
- {
1278
- label: 'Newest',
1279
- value: 'newest'
1280
- },
1281
- {
1282
- label: 'Oldest',
1283
- value: 'oldest'
1284
- },
1285
- {
1286
- label: 'Title A-Z',
1287
- value: 'titleAZ'
1288
- },
1289
- {
1290
- label: 'Title Z-A',
1291
- value: 'titleZA'
1292
- }
1293
- ];
1294
- const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
1295
- const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
1296
- defaultSort: 'modified',
1297
- defaultOrder: 'desc'
1298
- }, pageTitle: pageTitle = 'Dataset Explorer', categoriesTitle: categoriesTitle = 'Categories', filterTitle: filterTitle = 'Tags', showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = '', showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false, showDateDetails: showDateDetails = false, updateDateMonthYearOnly: updateDateMonthYearOnly = false, showTopics: showTopics = false, topicSlugFunction: topicSlugFunction, analytics: analytics = false, onAnalyticsEvent: onAnalyticsEvent = ()=>{}, children: children } = props;
1299
- const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
1300
- const [searchParams] = (0, $hgUW1$useSearchParams)();
1301
- const navigate = (0, $hgUW1$useNavigate)();
1302
- const location = (0, $hgUW1$useLocation)();
1303
- // Derive all search state from URL params
1304
- const selectedFacets = (0, $hgUW1$useMemo)(()=>{
1305
- const parsed = (0, $hgUW1$qs).parse(searchParams.toString());
1306
- const toArray = (val)=>{
1307
- if (Array.isArray(val)) return val.filter((v)=>typeof v === 'string');
1308
- if (typeof val === 'string') return [
1309
- val
1310
- ];
1311
- return [];
1312
- };
1313
- return {
1314
- theme: toArray(parsed.theme),
1315
- keyword: toArray(parsed.keyword)
1316
- };
1317
- }, [
1318
- searchParams
1319
- ]);
1320
- const page = Number(searchParams.get('page')) || 1;
1321
- const sort = searchParams.get('sort') || defaultSort.defaultSort;
1322
- const sortOrder = searchParams.get('sortOrder') || defaultSort.defaultOrder;
1323
- const fulltext = searchParams.get('fulltext') || '';
1324
- const sortDisplay = sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
1325
- // Local UI state only
1326
- const [filterText, setFilterText] = (0, $hgUW1$useState)(fulltext);
1327
- const [invalidSearch, setInvalidSearch] = (0, $hgUW1$useState)(false);
1328
- // Sync filterText from URL on back/forward
1329
- (0, $hgUW1$useEffect)(()=>{
1330
- setFilterText(fulltext);
1331
- }, [
1332
- fulltext
1333
- ]);
1334
- function buildNextQueryString(overrides) {
1335
- const current = (0, $hgUW1$qs).parse(searchParams.toString());
1336
- const merged = {
1337
- ...current
1338
- };
1339
- Object.entries(overrides).forEach(([key, value])=>{
1340
- if (value === null) delete merged[key];
1341
- else merged[key] = value;
1342
- });
1343
- return (0, $hgUW1$qs).stringify(merged, {
1344
- arrayFormat: 'indices',
1345
- encode: true
1346
- });
1347
- }
1348
- function updateSelectedFacets(key, value) {
1349
- const current = selectedFacets[key] || [];
1350
- const idx = current.indexOf(value);
1351
- const updated = idx > -1 ? current.filter((_, i)=>i !== idx) : [
1352
- ...current,
1353
- value
1354
- ];
1355
- navigate({
1356
- search: buildNextQueryString({
1357
- [key]: updated.length ? updated : null,
1358
- page: null
1359
- })
1360
- });
1361
- }
1362
- const setSortOptionsHandler = (value)=>{
1363
- let nextSort;
1364
- let nextSortOrder;
1365
- switch(value){
1366
- case 'newest':
1367
- nextSort = 'modified';
1368
- nextSortOrder = 'desc';
1369
- break;
1370
- case 'oldest':
1371
- nextSort = 'modified';
1372
- nextSortOrder = 'asc';
1373
- break;
1374
- case 'titleAZ':
1375
- nextSort = 'title';
1376
- nextSortOrder = 'asc';
1377
- break;
1378
- case 'titleZA':
1379
- nextSort = 'title';
1380
- nextSortOrder = 'desc';
1381
- break;
1382
- default:
1383
- return;
1384
- }
1385
- const overrides = {
1386
- sort: nextSort === defaultSort.defaultSort ? null : nextSort,
1387
- sortOrder: nextSortOrder === defaultSort.defaultOrder ? null : nextSortOrder
1388
- };
1389
- navigate({
1390
- search: buildNextQueryString(overrides)
1391
- });
1392
- };
1393
- function resetFilters() {
1394
- setFilterText('');
1395
- navigate({
1396
- search: ''
1397
- });
1398
- }
1399
- const pageSize = defaultPageSize;
1400
- const params = {
1401
- fulltext: fulltext ? fulltext : undefined,
1402
- ...selectedFacets,
1403
- sort: sort ? sort : undefined,
1404
- ['sort-order']: sortOrder ? sortOrder : undefined,
1405
- page: page !== 1 ? page : undefined,
1406
- ['page-size']: pageSize !== 10 ? pageSize : undefined
1407
- };
1408
- const { data: data, isPending: isPending } = (0, $hgUW1$useQuery)({
1409
- queryKey: [
1410
- "datasets",
1411
- params
1412
- ],
1413
- queryFn: ()=>{
1414
- return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
1415
- arrayFormat: 'comma',
1416
- encode: false
1417
- })}`);
1418
- }
1419
- });
1420
- const totalItems = data?.data?.total ? Number(data.data.total) : 0;
1421
- const facets = data && data.data.facets ? (0, $eff7d34c30f5a0fc$export$959638e8dca60ce6)(data.data.facets) : {
1422
- theme: null,
1423
- keyword: null
1424
- };
1425
- const currentResultNumbers = (0, $hgUW1$useMemo)(()=>{
1426
- const baseNumber = totalItems > 0 ? 1 : 0;
1427
- const startingNumber = baseNumber + (pageSize * page - pageSize);
1428
- const endingNumber = pageSize * page;
1429
- return {
1430
- total: totalItems,
1431
- startingNumber: totalItems >= startingNumber ? startingNumber : 0,
1432
- endingNumber: totalItems < endingNumber ? totalItems : endingNumber
1433
- };
1434
- }, [
1435
- totalItems,
1436
- pageSize,
1437
- page
1438
- ]);
1439
- const noResults = totalItems <= 0 && !isPending && data?.data?.results !== undefined;
1440
- const announcementText = (0, $hgUW1$useMemo)(()=>{
1441
- if (noResults) return 'No results found.';
1442
- if (!isPending && (!data || !data.data.results)) return 'Could not connect to the API.';
1443
- return `Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`;
1444
- }, [
1445
- data,
1446
- isPending,
1447
- noResults,
1448
- currentResultNumbers
1449
- ]);
1450
- (0, $hgUW1$useEffect)(()=>{
1451
- if (analytics && location.search) onAnalyticsEvent(location);
1452
- }, [
1453
- analytics,
1454
- location.search
1455
- ]);
1456
- return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
1457
- children: [
1458
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5723016a5461c1ca$export$2e2bcd8739ae039), {
1459
- headerText: pageTitle
1460
- }),
1461
- /*#__PURE__*/ (0, $hgUW1$jsxs)("section", {
1462
- className: "ds-l-container",
1463
- children: [
1464
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1465
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
1466
- className: "ds-u-visibility--screen-reader",
1467
- "aria-live": "assertive",
1468
- "aria-atomic": "true",
1469
- "data-testid": "currentResults",
1470
- children: announcementText
1471
- })
1472
- }),
1473
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1474
- className: "ds-l-row",
1475
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1476
- className: "ds-l-col--12",
1477
- children: [
1478
- children,
1479
- introText ? introText : null,
1480
- showLargeFileWarning && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1481
- className: "ds-l-row ds-u-margin-bottom--2 ds-u-margin-top--4",
1482
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1483
- className: "ds-l-md-col--12",
1484
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
1485
- bordered: true,
1486
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
1487
- contentClassName: "downloading-datasets",
1488
- heading: "Please read before downloading datasets",
1489
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b2d31a9c6cd2284$export$2e2bcd8739ae039), {})
1490
- })
1491
- })
1492
- })
1493
- }),
1494
- /*#__PURE__*/ (0, $hgUW1$jsxs)("form", {
1495
- onSubmit: (e)=>{
1496
- e.preventDefault();
1497
- if (filterText) {
1498
- if ($e873081a6e8f024e$export$1040147c129fdde9(filterText)) {
1499
- setInvalidSearch(false);
1500
- navigate({
1501
- search: buildNextQueryString({
1502
- fulltext: filterText,
1503
- page: null
1504
- })
1505
- });
1506
- } else setInvalidSearch(true);
1507
- } else {
1508
- setInvalidSearch(false);
1509
- navigate({
1510
- search: buildNextQueryString({
1511
- fulltext: null,
1512
- page: null
1513
- })
1514
- });
1515
- }
1516
- },
1517
- className: "dkan-dataset-search ds-l-form-row ds-u-padding-bottom--4 ds-u-border-bottom--1",
1518
- children: [
1519
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1520
- className: "ds-c-field__before fas fa-search ds-u-display--none ds-u-sm-display--inline-block"
1521
- }),
1522
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
1523
- errorMessage: invalidSearch ? 'No special characters allowed. Please enter a valid search term.' : undefined,
1524
- errorPlacement: "bottom",
1525
- fieldClassName: "ds-u-margin--0",
1526
- value: filterText,
1527
- className: `ds-u-padding-right--2 ${altMobileSearchButton ? 'ds-l-col--12 ds-l-md-col--10 --alt-style' : 'ds-l-col--10'}`,
1528
- label: "Search datasets",
1529
- labelClassName: "ds-u-visibility--screen-reader",
1530
- placeholder: "Search datasets",
1531
- name: "dataset_fulltext_search",
1532
- onChange: (e)=>{
1533
- setInvalidSearch(false);
1534
- setFilterText(e.target.value);
1535
- }
1536
- }),
1537
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $0a551147dc92a718$export$2e2bcd8739ae039), {
1538
- altMobileStyle: altMobileSearchButton
1539
- })
1540
- ]
1541
- })
1542
- ]
1543
- })
1544
- }),
1545
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1546
- className: "ds-l-row ds-u-padding-top--4",
1547
- children: [
1548
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1549
- className: "ds-l-col--12 ds-l-sm-col--4",
1550
- children: [
1551
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
1552
- className: "dc-dataset-search--clear-all-filters ds-u-margin-bottom--2",
1553
- onClick: ()=>resetFilters(),
1554
- children: "Clear all filters"
1555
- }),
1556
- facets.theme && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e011250e8a3bd5e5$export$2e2bcd8739ae039), {
1557
- facets: facets.theme,
1558
- title: categoriesTitle,
1559
- onClickFunction: updateSelectedFacets,
1560
- selectedFacets: selectedFacets.theme
1561
- }),
1562
- facets.keyword && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e011250e8a3bd5e5$export$2e2bcd8739ae039), {
1563
- facets: facets.keyword,
1564
- title: filterTitle,
1565
- onClickFunction: updateSelectedFacets,
1566
- selectedFacets: selectedFacets.keyword
1567
- })
1568
- ]
1569
- }),
1570
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1571
- className: "ds-l-col--12 ds-l-sm-col--8",
1572
- children: isPending ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
1573
- className: "ds-u-valign--middle",
1574
- "aria-valuetext": "Dataset Search loading",
1575
- role: "status"
1576
- }) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
1577
- children: [
1578
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1579
- 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",
1580
- children: [
1581
- enablePagination && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1582
- className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--8 ds-u-sm-padding-left--0",
1583
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
1584
- className: "ds-u-margin-y--0",
1585
- children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
1586
- children: [
1587
- "Showing ",
1588
- currentResultNumbers.startingNumber,
1589
- " -",
1590
- ' ',
1591
- currentResultNumbers.endingNumber,
1592
- " of ",
1593
- data.data.total,
1594
- " datasets"
1595
- ]
1596
- })
1597
- })
1598
- }),
1599
- enableSort && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1600
- className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4 ds-u-sm-padding-right--0",
1601
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
1602
- options: $e873081a6e8f024e$var$sortOptions,
1603
- value: sortDisplay,
1604
- label: "Sort",
1605
- labelClassName: "ds-u-margin-top--0",
1606
- name: "dataset_search_sort",
1607
- onChange: (e)=>setSortOptionsHandler(e.target.value)
1608
- })
1609
- })
1610
- ]
1611
- }),
1612
- /*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
1613
- className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0 ds-u-margin-bottom--4 ds-u-display--block",
1614
- "data-testid": "results-list",
1615
- children: [
1616
- noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
1617
- variation: "error",
1618
- role: "region",
1619
- heading: "No results found."
1620
- }),
1621
- data && data.data.results ? Object.values(data.data.results).map((item)=>{
1622
- const downloadUrl = (()=>{
1623
- const distribution_array = item.distribution ?? [];
1624
- return distribution_array.length ? distribution_array[0].downloadURL : null;
1625
- })();
1626
- const showLargeFile = largeFileThemes && item.theme ? largeFileThemes.some((theme)=>item.theme.includes(theme)) : false;
1627
- const dateDetailProps = showDateDetails ? {
1628
- showDateDetails: showDateDetails,
1629
- released: item.released,
1630
- refresh: item.nextUpdateDate
1631
- } : {};
1632
- const topicProps = (()=>{
1633
- if (!showTopics) return {};
1634
- const topicSlugs = {};
1635
- if (item.theme && Array.isArray(item.theme)) item.theme.forEach((topic)=>{
1636
- if (topic) {
1637
- const slug = topicSlugFunction ? topicSlugFunction(topic) : topic.split(' ').join('-').toLowerCase();
1638
- if (slug) topicSlugs[topic] = slug;
1639
- }
1640
- });
1641
- return {
1642
- showTopics: showTopics,
1643
- theme: item.theme,
1644
- topicSlugs: topicSlugs
1645
- };
1646
- })();
1647
- return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $52c6454cae137465$export$2e2bcd8739ae039), {
1648
- title: item.title,
1649
- modified: item.modified,
1650
- description: item.description,
1651
- identifier: item.identifier,
1652
- downloadUrl: showDownloadIcon ? downloadUrl : null,
1653
- largeFile: showLargeFile,
1654
- paginationEnabled: enablePagination,
1655
- dataDictionaryLinks: dataDictionaryLinks,
1656
- distribution: "%Ref:distribution" in item && item["%Ref:distribution"] ? item["%Ref:distribution"][0] : {},
1657
- updateDateMonthYearOnly: updateDateMonthYearOnly,
1658
- ...dateDetailProps,
1659
- ...topicProps
1660
- }, item.identifier);
1661
- }) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
1662
- variation: "error",
1663
- role: "region",
1664
- heading: "Could not connect to the API."
1665
- })
1666
- ]
1667
- }),
1668
- enablePagination && data && data.data.total && Number(data.data.total) !== 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
1669
- currentPage: Number(page),
1670
- totalPages: Math.ceil(Number(data.data.total) / pageSize),
1671
- onPageChange: (evt, page)=>{
1672
- evt.preventDefault();
1673
- window.scroll(0, 0);
1674
- navigate({
1675
- search: buildNextQueryString({
1676
- page: page > 1 ? String(page) : null
1677
- })
1678
- });
1679
- },
1680
- renderHref: (p)=>{
1681
- const nextQs = buildNextQueryString({
1682
- page: p > 1 ? String(p) : null
1683
- });
1684
- return `/datasets?${nextQs}`;
1685
- }
1686
- })
1687
- ]
1003
+ ]
1004
+ });
1005
+ case 'api':
1006
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
1007
+ width: "16px",
1008
+ height: "13px",
1009
+ viewBox: "0 0 16 13",
1010
+ version: "1.1",
1011
+ xmlns: "http://www.w3.org/2000/svg",
1012
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
1013
+ "aria-hidden": "true",
1014
+ children: [
1015
+ /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
1016
+ children: "API Icon"
1017
+ }),
1018
+ /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
1019
+ stroke: "none",
1020
+ strokeWidth: "1",
1021
+ fillRule: "evenodd",
1022
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
1023
+ transform: "translate(-279.000000, -6.000000)",
1024
+ fillRule: "nonzero",
1025
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
1026
+ transform: "translate(279.000000, -1.000000)",
1027
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
1028
+ transform: "translate(0.000000, 7.000000)",
1029
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
1030
+ d: "M10.5806452,13 C10.4129032,13 10.2741935,12.9424479 10.1645161,12.8273438 C10.0548387,12.7122396 10,12.5666667 10,12.390625 C10,12.2145833 10.0548387,12.0690104 10.1645161,11.9539062 C10.2741935,11.8388021 10.4129032,11.78125 10.5806452,11.78125 L12.3225806,11.78125 C12.5935484,11.78125 12.8225806,11.6830729 13.0096774,11.4867188 C13.1967742,11.2903646 13.2903226,11.05 13.2903226,10.765625 L13.2903226,8.734375 C13.2903226,8.23333333 13.4354839,7.78645833 13.7258065,7.39375 C14.016129,7.00104167 14.3870968,6.73020833 14.8387097,6.58125 L14.8387097,6.41875 C14.3870968,6.28333333 14.016129,6.01588542 13.7258065,5.61640625 C13.4354839,5.21692708 13.2903226,4.76666667 13.2903226,4.265625 L13.2903226,2.234375 C13.2903226,1.95 13.1967742,1.70963542 13.0096774,1.51328125 C12.8225806,1.31692708 12.5935484,1.21875 12.3225806,1.21875 L10.5806452,1.21875 C10.4129032,1.21875 10.2741935,1.16119792 10.1645161,1.04609375 C10.0548387,0.930989583 10,0.785416667 10,0.609375 C10,0.433333333 10.0548387,0.287760417 10.1645161,0.17265625 C10.2741935,0.0575520833 10.4129032,8.8817842e-16 10.5806452,8.8817842e-16 L12.3225806,8.8817842e-16 C12.916129,8.8817842e-16 13.4193548,0.216666667 13.8322581,0.65 C14.2451613,1.08333333 14.4516129,1.61145833 14.4516129,2.234375 L14.4516129,4.265625 C14.4516129,4.55 14.5451613,4.79036458 14.7322581,4.98671875 C14.9193548,5.18307292 15.1483871,5.28125 15.4193548,5.28125 C15.5870968,5.28125 15.7258065,5.33880208 15.8354839,5.45390625 C15.9451613,5.56901042 16,5.71458333 16,5.890625 L16,7.109375 C16,7.271875 15.9451613,7.4140625 15.8354839,7.5359375 C15.7258065,7.6578125 15.5870968,7.71875 15.4193548,7.71875 C15.1483871,7.71875 14.9193548,7.81692708 14.7322581,8.01328125 C14.5451613,8.20963542 14.4516129,8.45 14.4516129,8.734375 L14.4516129,10.765625 C14.4516129,11.3885417 14.2451613,11.9166667 13.8322581,12.35 C13.4193548,12.7833333 12.916129,13 12.3225806,13 L10.5806452,13 Z M3.67741935,13 C3.08387097,13 2.58064516,12.7833333 2.16774194,12.35 C1.75483871,11.9166667 1.5483871,11.3885417 1.5483871,10.765625 L1.5483871,8.734375 C1.5483871,8.45 1.45483871,8.20963542 1.26774194,8.01328125 C1.08064516,7.81692708 0.851612903,7.71875 0.580645161,7.71875 C0.425806452,7.71875 0.290322581,7.6578125 0.174193548,7.5359375 C0.0580645161,7.4140625 3.52606833e-13,7.271875 3.52606833e-13,7.109375 L3.52606833e-13,5.890625 C3.52606833e-13,5.71458333 0.0580645161,5.56901042 0.174193548,5.45390625 C0.290322581,5.33880208 0.425806452,5.28125 0.580645161,5.28125 C0.851612903,5.28125 1.08064516,5.18307292 1.26774194,4.98671875 C1.45483871,4.79036458 1.5483871,4.55 1.5483871,4.265625 L1.5483871,2.234375 C1.5483871,1.61145833 1.75483871,1.08333333 2.16774194,0.65 C2.58064516,0.216666667 3.08387097,8.8817842e-16 3.67741935,8.8817842e-16 L5.41935484,8.8817842e-16 C5.58709677,8.8817842e-16 5.72580645,0.0575520833 5.83548387,0.17265625 C5.94516129,0.287760417 6,0.433333333 6,0.609375 C6,0.785416667 5.94516129,0.930989583 5.83548387,1.04609375 C5.72580645,1.16119792 5.58709677,1.21875 5.41935484,1.21875 L3.67741935,1.21875 C3.40645161,1.21875 3.17741935,1.31692708 2.99032258,1.51328125 C2.80322581,1.70963542 2.70967742,1.95 2.70967742,2.234375 L2.70967742,4.265625 C2.70967742,4.76666667 2.56451613,5.21692708 2.27419355,5.61640625 C1.98387097,6.01588542 1.61290323,6.28333333 1.16129032,6.41875 L1.16129032,6.58125 C1.61290323,6.73020833 1.98387097,7.00104167 2.27419355,7.39375 C2.56451613,7.78645833 2.70967742,8.23333333 2.70967742,8.734375 L2.70967742,10.765625 C2.70967742,11.05 2.80322581,11.2903646 2.99032258,11.4867188 C3.17741935,11.6830729 3.40645161,11.78125 3.67741935,11.78125 L5.41935484,11.78125 C5.58709677,11.78125 5.72580645,11.8388021 5.83548387,11.9539062 C5.94516129,12.0690104 6,12.2145833 6,12.390625 C6,12.5666667 5.94516129,12.7122396 5.83548387,12.8273438 C5.72580645,12.9424479 5.58709677,13 5.41935484,13 L3.67741935,13 Z"
1031
+ })
1688
1032
  })
1689
1033
  })
1690
- ]
1034
+ })
1691
1035
  })
1692
1036
  ]
1693
- })
1694
- ]
1695
- });
1696
- };
1697
- var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039)($e873081a6e8f024e$var$DatasetSearch);
1698
-
1699
-
1700
-
1701
-
1702
- const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
1703
- const { headingText: headingText = "Dataset Search" } = props;
1704
- const navigate = (0, $hgUW1$useNavigate)();
1705
- const { isMobile: isMobile } = (0, $hgUW1$useContext)((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
1706
- const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)('');
1707
- const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
1708
- const [invalidSearch, setInvalidSearch] = (0, $hgUW1$useState)(false);
1709
- function searchForDataset(e) {
1710
- e.preventDefault();
1711
- if (window) {
1712
- if ((0, $e873081a6e8f024e$export$1040147c129fdde9)(modalSearchTerm)) {
1713
- setInvalidSearch(false);
1714
- if (window.location.pathname !== '/datasets') {
1715
- navigate(`/datasets?fulltext=${modalSearchTerm}`);
1716
- setModalSearch(false);
1717
- } else {
1718
- window.location.search = `fulltext=${modalSearchTerm}`;
1719
- setModalSearch(false);
1720
- }
1721
- } else setInvalidSearch(true);
1722
- }
1723
- }
1724
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1725
- className: "dkan-c-main-navigation--search",
1726
- children: [
1727
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
1728
- variation: isMobile ? undefined : 'ghost',
1729
- className: "ds-u-lg-border--0 dkan-c-header-search--modal-button",
1730
- onClick: ()=>setModalSearch(true),
1731
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1732
- children: "Search"
1733
- })
1734
- }),
1735
- modalSearch && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
1736
- className: "dc-c-search-dialog",
1737
- isOpen: modalSearch,
1738
- onExit: ()=>setModalSearch(false),
1739
- heading: `${headingText}`,
1740
- actions: /*#__PURE__*/ (0, $hgUW1$jsxs)("form", {
1741
- className: "dkan-dataset-search ds-u-display--flex ds-u-align-items--start ds-u-flex-wrap--nowrap",
1742
- onSubmit: (e)=>{
1743
- searchForDataset(e);
1744
- },
1745
- children: [
1746
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
1747
- errorMessage: invalidSearch ? 'No special characters allowed. Please enter a valid search term.' : undefined,
1748
- errorPlacement: "bottom",
1749
- value: modalSearchTerm,
1750
- fieldClassName: "ds-u-display--inline-block ds-u-margin--0",
1751
- className: "ds-l-col--9",
1752
- label: "Search Term",
1753
- name: "search-modal",
1754
- labelClassName: "ds-u-visibility--screen-reader",
1755
- onChange: (e)=>{
1756
- setInvalidSearch(false);
1757
- setModalSearchTerm(e.target.value);
1758
- }
1759
- }),
1760
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
1761
- type: "submit",
1762
- className: "ds-l-col--3",
1037
+ });
1038
+ case 'download':
1039
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
1040
+ width: "16px",
1041
+ height: "16px",
1042
+ viewBox: "0 0 16 16",
1043
+ version: "1.1",
1044
+ xmlns: "http://www.w3.org/2000/svg",
1045
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
1046
+ "aria-hidden": "true",
1047
+ children: [
1048
+ /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
1049
+ children: "Download Icon"
1050
+ }),
1051
+ /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
1052
+ stroke: "none",
1053
+ strokeWidth: "1",
1054
+ fillRule: "evenodd",
1055
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
1056
+ transform: "translate(-370.000000, -4.000000)",
1057
+ fillRule: "nonzero",
1058
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
1059
+ transform: "translate(370.000000, -1.000000)",
1060
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
1061
+ d: "M9,6 C9,5.446875 8.553125,5 8,5 C7.446875,5 7,5.446875 7,6 L7,13.584375 L4.70625,11.290625 C4.315625,10.9 3.68125,10.9 3.290625,11.290625 C2.9,11.68125 2.9,12.315625 3.290625,12.70625 L7.290625,16.70625 C7.68125,17.096875 8.315625,17.096875 8.70625,16.70625 L12.70625,12.70625 C13.096875,12.315625 13.096875,11.68125 12.70625,11.290625 C12.315625,10.9 11.68125,10.9 11.290625,11.290625 L9,13.584375 L9,6 Z M2,16 C0.896875,16 0,16.896875 0,18 L0,19 C0,20.103125 0.896875,21 2,21 L14,21 C15.103125,21 16,20.103125 16,19 L16,18 C16,16.896875 15.103125,16 14,16 L10.828125,16 L9.4125,17.415625 C8.63125,18.196875 7.365625,18.196875 6.584375,17.415625 L5.171875,16 L2,16 Z M13.5,19.25 C13.084375,19.25 12.75,18.915625 12.75,18.5 C12.75,18.084375 13.084375,17.75 13.5,17.75 C13.915625,17.75 14.25,18.084375 14.25,18.5 C14.25,18.915625 13.915625,19.25 13.5,19.25 Z"
1062
+ })
1063
+ })
1064
+ })
1065
+ })
1066
+ ]
1067
+ });
1068
+ case 'data-dictionary':
1069
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
1070
+ width: "14px",
1071
+ height: "16px",
1072
+ viewBox: "0 0 14 16",
1073
+ version: "1.1",
1074
+ xmlns: "http://www.w3.org/2000/svg",
1075
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
1076
+ "aria-hidden": "true",
1077
+ children: [
1078
+ /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
1079
+ children: "Data Dictionary Icon"
1080
+ }),
1081
+ /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
1082
+ id: "Dev-Handoff",
1083
+ stroke: "none",
1084
+ strokeWidth: "1",
1085
+ fillRule: "evenodd",
1086
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("g", {
1087
+ id: "Group-15",
1088
+ transform: "translate(0, 0)",
1089
+ fillRule: "nonzero",
1763
1090
  children: [
1764
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1765
- className: "fas fa-search small-text ds-u-sm-display--none"
1091
+ /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
1092
+ d: "M0.0218026938,8.0971396 C0.0218026938,6.24591342 -0.0192244811,4.39368657 0.0358119731,2.54446171 C0.0728364968,1.28162525 1.07950328,0.231929969 2.34434106,0.0678212692 C2.69057039,0.022791443 3.04180304,0.00477951255 3.39003369,0.00477951255 C6.28395052,-0.000223801472 9.17786735,-0.00322578988 12.0717842,0.00578017535 C12.6811878,0.00778150096 13.2435603,0.169888875 13.6428248,0.683228893 C13.9059991,1.02145292 13.9950581,1.42171804 13.9970594,1.83299045 C14.0050647,4.76793446 14.0080667,7.70287846 13.9950581,10.6378225 C13.9920561,11.280248 13.7689083,11.8466231 13.1875232,12.2078624 C13.0464297,12.2959207 12.992394,12.4099963 12.9953959,12.5811096 C13.0054026,13.1394795 13.0064032,13.69885 12.9953959,14.2572198 C12.9913933,14.4473458 13.0364231,14.5173922 13.2425597,14.5243968 C13.6178082,14.5364047 13.8979938,14.7765638 13.9720428,15.0987772 C14.0450912,15.4129854 13.9069998,15.7482074 13.6088022,15.9013088 C13.4827187,15.9663519 13.3226127,15.9933698 13.1775166,15.9933698 C9.62516362,15.9983731 6.07181,16.0053777 2.51945705,15.9933698 C1.09851587,15.9883665 0.0708351712,15.0207255 0.0268060079,13.5997844 C-0.0202251439,12.0507583 0.00979474021,10.4987303 0.00579208899,8.94770299 C0.00579208899,8.66451541 0.00579208899,8.38032718 0.00579208899,8.0971396 C0.010795403,8.0971396 0.015798717,8.0971396 0.0218026938,8.0971396 L0.0218026938,8.0971396 Z M1.49477834,11.1421565 C1.99510974,11.1071333 2.44740933,11.0490949 2.90070958,11.0480942 C5.91970926,11.0400889 8.93870894,11.0440916 11.9577086,11.0430909 C12.4020029,11.0430909 12.5280864,10.9200094 12.5280864,10.4837204 C12.5280864,7.66585394 12.5280864,4.84698682 12.5280864,2.02912036 C12.5280864,1.58382542 12.4430301,1.49976974 12.0057404,1.49976974 C9.7952763,1.49976974 7.58581283,1.49976974 5.37534869,1.49976974 C4.50777404,1.49976974 3.64019939,1.4927651 2.7736254,1.50277173 C2.01712432,1.51177769 1.47576575,2.0711482 1.47576575,2.82664862 C1.47576575,5.50342162 1.47576575,8.17919395 1.47576575,10.855967 C1.47576575,10.9610365 1.48877436,11.0661061 1.49377768,11.1421565 L1.49477834,11.1421565 Z M6.8923535,14.5153908 C8.3263033,14.5153908 9.7602531,14.5093869 11.1932022,14.5203941 C11.4393653,14.5223955 11.5334276,14.467359 11.5224203,14.2041847 C11.5014064,13.7388765 11.5044084,13.2705663 11.5224203,12.8042574 C11.5314263,12.5630977 11.4553759,12.4960533 11.2132155,12.4960533 C8.37933843,12.5040586 5.54446071,12.5010566 2.71058365,12.5020573 C2.5935061,12.5020573 2.47642855,12.4990553 2.36135233,12.5140652 C1.64988108,12.6031242 1.26662722,13.4186644 1.63387047,14.0360733 C1.86102093,14.4173259 2.22426152,14.5083862 2.61652134,14.5113882 C4.04146518,14.5203941 5.46740967,14.5153908 6.8923535,14.5153908 L6.8923535,14.5153908 Z",
1093
+ id: "Shape"
1766
1094
  }),
1767
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1768
- className: "full-text ds-u-display--none ds-u-sm-display--inline-block",
1769
- children: "Search"
1095
+ /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
1096
+ d: "M7.50976245,7.49574126 C6.62717786,7.49574126 5.7435926,7.49774259 4.86100801,7.49574126 C4.36167727,7.49373993 4.05747578,7.22956495 4.03045788,6.787272 C4.00243933,6.33597307 4.34366534,6.01476031 4.87101464,6.01275899 C5.95373179,6.00775567 7.03644895,6.01175832 8.1191661,6.01175832 C8.79361283,6.01175832 9.46805956,6.00675501 10.143507,6.01375965 C10.7519099,6.01976362 11.0981393,6.45305062 10.9360319,6.99140721 C10.8429703,7.30261334 10.55578,7.4947406 10.1585169,7.49674192 C9.2759323,7.50074457 8.39234705,7.49774259 7.50976245,7.49774259 L7.50976245,7.49574126 Z",
1097
+ id: "Path"
1098
+ }),
1099
+ /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
1100
+ d: "M7.50776113,5.00108889 C6.61617057,5.00108889 5.72458001,5.0060922 4.83298945,4.99908757 C4.25360569,4.99508491 3.90237305,4.53177804 4.07248572,4.01643669 C4.1565414,3.76226834 4.33365871,3.61517091 4.5868264,3.55913379 C4.6999013,3.53411722 4.81797951,3.52611192 4.9340564,3.52611192 C6.6501931,3.52411059 8.36733048,3.52411059 10.0834672,3.52611192 C10.5577814,3.52611192 10.8299616,3.69022062 10.9340306,4.03044597 C11.090134,4.53778201 10.7439046,4.99408425 10.1825328,4.99908757 C9.29094224,5.00709287 8.39935169,5.00108889 7.50776113,5.00108889 L7.50776113,5.00108889 Z",
1101
+ id: "Path"
1770
1102
  })
1771
1103
  ]
1772
1104
  })
1773
- ]
1774
- })
1775
- })
1776
- ]
1777
- });
1105
+ })
1106
+ ]
1107
+ });
1108
+ default:
1109
+ return null;
1110
+ }
1778
1111
  };
1779
- var $fea9297ba4dd394c$export$2e2bcd8739ae039 = $fea9297ba4dd394c$var$HeaderSearch;
1780
-
1112
+ var $b38839fd67928f42$export$2e2bcd8739ae039 = $b38839fd67928f42$var$SearchItemIcon;
1781
1113
 
1782
1114
 
1783
- const $b939b31651e82908$var$HeaderNav = (props)=>{
1784
- const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
1785
- const { links: links, topNavLinks: topNavLinks, wrapperClasses: wrapperClasses, searchInMobile: searchInMobile } = props;
1786
- const navMenuOpenClass = `dkan-c-nav-menu--${headerContext.mobileMenuOpen ? "open" : "close"}`;
1787
- const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ? 'mobile' : 'desktop'}`;
1788
- const linkClasses = 'dkan-c-header--link ds-c-button ds-c-button--ghost';
1789
- const listClasses = 'dkan-c-header--link-list ';
1790
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1791
- className: `dkan-c-nav-menu ${wrapperClasses} ${navMenuOpenClass} ${isMobileClass}`,
1792
- ref: headerContext.menuRef,
1115
+ const $b61856b23f5f58a2$var$LargeFileDialog = (props)=>{
1116
+ const [modalOpen, setModalOpen] = (0, $hgUW1$useState)(false);
1117
+ const { downloadUrl: downloadUrl } = props;
1118
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
1793
1119
  children: [
1794
1120
  /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
1795
- variation: "ghost",
1796
- className: "dkan-c-nav-menu--mobile-close-button",
1797
- onClick: ()=>headerContext.setMobileMenuOpen(false),
1121
+ variation: "solid",
1122
+ className: "ds-l-col--12 ds-l-md-col--auto",
1123
+ onClick: ()=>setModalOpen(true),
1798
1124
  children: [
1799
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$CloseIconThin), {}),
1800
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1801
- className: "ds-u-margin-left--1",
1802
- children: "Close"
1803
- })
1125
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
1126
+ id: "download"
1127
+ }),
1128
+ "Download"
1804
1129
  ]
1805
1130
  }),
1806
- /*#__PURE__*/ (0, $hgUW1$jsx)("nav", {
1807
- className: "dkan-c-main-nav",
1808
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
1809
- className: listClasses,
1810
- children: links.map((link)=>{
1811
- if (link.submenu) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $669b51f08325b4e3$export$2e2bcd8739ae039), {
1812
- link: link,
1813
- wrapLabel: true,
1814
- subLinkClasses: linkClasses,
1815
- linkClasses: linkClasses
1816
- }, link.id);
1817
- return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1818
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
1819
- to: link.url,
1820
- className: linkClasses,
1821
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1822
- children: link.label
1823
- })
1824
- })
1825
- }, link.id);
1826
- })
1827
- })
1828
- }),
1829
- topNavLinks && /*#__PURE__*/ (0, $hgUW1$jsx)("nav", {
1830
- className: "dkan-c-top-nav",
1831
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
1832
- className: listClasses,
1833
- children: topNavLinks.map((link)=>{
1834
- return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1835
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
1836
- to: link.url,
1837
- className: linkClasses,
1838
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1839
- children: link.label
1840
- })
1841
- })
1842
- }, link.id);
1131
+ modalOpen && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
1132
+ onExit: ()=>setModalOpen(false),
1133
+ isOpen: modalOpen,
1134
+ heading: "Notice: Large File Size",
1135
+ actions: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
1136
+ children: [
1137
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
1138
+ href: downloadUrl,
1139
+ className: "ds-u-margin-right--2 ",
1140
+ variation: "solid",
1141
+ children: "Yes, download"
1142
+ }),
1143
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
1144
+ variation: "ghost",
1145
+ onClick: ()=>setModalOpen(false),
1146
+ children: "No, cancel"
1147
+ })
1148
+ ]
1149
+ }),
1150
+ children: [
1151
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
1152
+ children: "This is a very large file and, depending on your network characteristics and software, may take a long time to download or fail to download. Additionally, the number of rows in the file may larger than the maximum rows your version of Microsoft Excel supports. If you can't download the file, we recommend engaging your IT support staff. If you are able to download the file but are unable to open it in MS Excel or get a message that the data has been truncated, we recommend trying alternative programs such as MS Access, Universal Viewer, Editpad or any other software your organization has available for large datasets."
1153
+ }),
1154
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
1155
+ children: "Would you like to proceed?"
1843
1156
  })
1844
- })
1845
- }),
1846
- searchInMobile && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $fea9297ba4dd394c$export$2e2bcd8739ae039), {})
1847
- ]
1848
- });
1849
- };
1850
- var $b939b31651e82908$export$2e2bcd8739ae039 = $b939b31651e82908$var$HeaderNav;
1851
-
1852
-
1853
-
1854
-
1855
-
1856
-
1857
-
1858
- const $9a8892c5ac150556$var$HeaderSiteTitle = (props)=>{
1859
- const inverse = props.inverse;
1860
- const { logoFilePath: logoFilePath, logoAltText: logoAltText, urlTitle: urlTitle } = props.org;
1861
- const classList = "ds-u-padding-y--3 dc-c-site-title print-padding-top--0 print-padding-bottom--0 ds-u-text-align--center ds-u-md-text-align--left";
1862
- if (logoFilePath) return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1863
- className: classList,
1864
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
1865
- to: "/",
1866
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("img", {
1867
- src: logoFilePath,
1868
- alt: logoAltText
1157
+ ]
1869
1158
  })
1870
- })
1871
- });
1872
- return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1873
- className: classList,
1874
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
1875
- to: "/",
1876
- className: `${inverse ? "ds-c-link--inverse " : ""} ds-u-font-size--2xl ds-u-lg-font-size--3xl`,
1877
- children: urlTitle
1878
- })
1159
+ ]
1879
1160
  });
1880
1161
  };
1881
- var $9a8892c5ac150556$export$2e2bcd8739ae039 = $9a8892c5ac150556$var$HeaderSiteTitle;
1882
-
1162
+ var $b61856b23f5f58a2$export$2e2bcd8739ae039 = $b61856b23f5f58a2$var$LargeFileDialog;
1883
1163
 
1884
1164
 
1885
1165
 
@@ -1887,62 +1167,19 @@ var $9a8892c5ac150556$export$2e2bcd8739ae039 = $9a8892c5ac150556$var$HeaderSiteT
1887
1167
 
1888
1168
 
1889
1169
 
1890
- const $403833a4b442d5df$var$MobileMenuButton = (props)=>{
1891
- const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
1892
- const { wrapperClasses: wrapperClasses } = props;
1893
- return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
1894
- "aria-haspopup": "true",
1895
- "aria-expanded": headerContext.mobileMenuOpen,
1896
- className: `dkan-c-mobile-menu-button ${wrapperClasses} dkan-c-mobile-menu-button--${headerContext.mobileMenuOpen ? "close" : "open"}`,
1897
- onClick: ()=>headerContext.setMobileMenuOpen(!headerContext.mobileMenuOpen),
1898
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1899
- children: "Menu"
1900
- })
1170
+ function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240) {
1171
+ if (!textString) return '';
1172
+ let cleanedText = textString;
1173
+ if (cleanedText.split('</p>').length > 1) cleanedText = cleanedText.split('</p>')[0];
1174
+ if (cleanedText.split('<br/>').length > 1) cleanedText = cleanedText.split('<br/>')[0];
1175
+ cleanedText = (0, $hgUW1$lodashtruncate)(cleanedText, {
1176
+ 'length': textLength,
1177
+ 'separator': ' '
1901
1178
  });
1902
- };
1903
- var $403833a4b442d5df$export$2e2bcd8739ae039 = $403833a4b442d5df$var$MobileMenuButton;
1904
-
1905
-
1906
-
1907
-
1908
-
1909
-
1910
-
1911
- const $f57121650539d8c5$var$NavBar = (props)=>{
1912
- const { links: links, menuName: menuName, menuId: menuId, menuClasses: menuClasses, linkClasses: linkClasses, subLinkClasses: subLinkClasses, wrapLabel: wrapLabel = false } = props;
1913
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
1914
- className: `dkan-c-${menuId}-menu`,
1915
- "aria-labelledby": `dkan-c-${menuId}-menu--heading`,
1916
- children: [
1917
- /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
1918
- id: `dkan-c-${menuId}-menu--heading`,
1919
- className: "ds-u-visibility--screen-reader",
1920
- children: menuName
1921
- }),
1922
- /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
1923
- className: menuClasses,
1924
- children: links.map((link)=>{
1925
- if (link.submenu) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $669b51f08325b4e3$export$2e2bcd8739ae039), {
1926
- link: link,
1927
- wrapLabel: wrapLabel,
1928
- subLinkClasses: subLinkClasses,
1929
- linkClasses: linkClasses
1930
- }, link.id);
1931
- else return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1932
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
1933
- to: link,
1934
- className: linkClasses,
1935
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1936
- children: link.label
1937
- })
1938
- })
1939
- }, link.id);
1940
- })
1941
- })
1942
- ]
1179
+ return (0, $hgUW1$dompurify).sanitize(cleanedText, {
1180
+ ALLOWED_TAGS: []
1943
1181
  });
1944
- };
1945
- var $f57121650539d8c5$export$2e2bcd8739ae039 = $f57121650539d8c5$var$NavBar;
1182
+ }
1946
1183
 
1947
1184
 
1948
1185
 
@@ -1952,281 +1189,369 @@ var $f57121650539d8c5$export$2e2bcd8739ae039 = $f57121650539d8c5$var$NavBar;
1952
1189
 
1953
1190
 
1954
1191
 
1955
- const $953b286f7778640e$var$SidebarNavigation = (props)=>{
1956
- const { title: title, links: links, mobileMax: mobileMax } = props;
1957
- const active = (0, $hgUW1$useLocation)().pathname;
1958
- const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
1959
- const styleClasses = 'dkan-c--sidebar-nav-wrapper ds-u-border--1 ds-u-border--color-gray-lightest ds-u-padding--2';
1960
- const mobileClass = `dkan-c-sidebar-nav--${mobileMax ? 'mobile' : 'desktop'}`;
1192
+ const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
1193
+ const { type: type, date: date, boldLabel: boldLabel = false, displayTooltips: displayTooltips = true } = props;
1194
+ const dateText = {
1195
+ modified: 'Last Modified',
1196
+ released: 'Released',
1197
+ refresh: 'Planned Update'
1198
+ };
1199
+ const tooltipContent = {
1200
+ modified: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
1201
+ children: [
1202
+ /*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
1203
+ children: "Last Modified: "
1204
+ }),
1205
+ " The date the ",
1206
+ /*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
1207
+ "dataset was last updated."
1208
+ ]
1209
+ }),
1210
+ released: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
1211
+ children: [
1212
+ /*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
1213
+ children: "Released: "
1214
+ }),
1215
+ " The date the most ",
1216
+ /*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
1217
+ "recent dataset was made available",
1218
+ /*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
1219
+ "to the public."
1220
+ ]
1221
+ }),
1222
+ refresh: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
1223
+ children: [
1224
+ /*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
1225
+ children: "Planned Update:"
1226
+ }),
1227
+ " The date the ",
1228
+ /*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
1229
+ "dataset is scheduled to be updated."
1230
+ ]
1231
+ })
1232
+ };
1961
1233
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1962
- className: `dkan-c-sidebar-nav ${mobileClass}`,
1234
+ className: "dataset-date-item ds-l-sm-col--auto ds-l-col--12 ds-u-padding--0",
1963
1235
  children: [
1964
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1965
- className: "dkan-c-sidebar-nav--mobile-header ds-u-align-items--center ds-u-justify-content--between ds-u-padding-y--2 ds-u-fill--primary-darker ds-u-color--white",
1236
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
1237
+ className: `dataset-date-item-label ${boldLabel ? 'ds-u-font-weight--bold' : ''}`,
1966
1238
  children: [
1967
1239
  /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1968
- className: "ds-u-margin-left--2 ds-u-margin-y--0 ds-text-heading--xl",
1969
- children: "Pages in this section"
1970
- }),
1971
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
1972
- "aria-haspopup": "true",
1973
- variation: "ghost",
1974
- "aria-expanded": `${menuOpen ? 'true' : 'false'}`,
1975
- onDark: true,
1976
- onClick: ()=>setMenuOpen(!menuOpen),
1977
- children: [
1978
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1979
- className: "ds-u-visibility--screen-reader",
1980
- children: "Toggle menu"
1981
- }),
1982
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
1983
- direction: menuOpen ? 'up' : 'down'
1984
- })
1985
- ]
1240
+ children: dateText[type]
1241
+ }),
1242
+ ": ",
1243
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $727b038175bac6f5$export$2e2bcd8739ae039), {
1244
+ date: date
1986
1245
  })
1987
1246
  ]
1988
1247
  }),
1989
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1990
- className: ``,
1991
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
1992
- className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ? 'open' : 'close'}`,
1993
- children: [
1994
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1995
- className: "ds-u-padding--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest",
1996
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("h3", {
1997
- className: "ds-text-heading--lg",
1998
- children: title
1999
- })
2000
- }),
2001
- /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
2002
- className: "ds-u-padding-bottom--2",
2003
- children: links.map(({ url: url, label: label })=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
2004
- className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ? 'active' : ''}`,
2005
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2006
- className: "ds-u-display--flex ds-u-padding-y--1",
2007
- children: [
2008
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2009
- className: "dkan-c-sidebar-nav-link-status"
2010
- }),
2011
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
2012
- to: url,
2013
- className: "dkan-c-sidebar-nav-link ds-u-margin-left--2",
2014
- children: label
2015
- })
2016
- ]
2017
- })
2018
- }, `${url}${label}`))
2019
- })
2020
- ]
2021
- })
1248
+ displayTooltips === true && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Tooltip), {
1249
+ "aria-label": dateText[type],
1250
+ className: "ds-c-tooltip__trigger-icon ds-u-display--inline ds-u-padding-left--0 ds-uw-padding-right--0 ds-u-font-weight--normal",
1251
+ title: tooltipContent[type],
1252
+ placement: "top",
1253
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
2022
1254
  })
2023
1255
  ]
2024
1256
  });
2025
1257
  };
2026
- var $953b286f7778640e$export$2e2bcd8739ae039 = $953b286f7778640e$var$SidebarNavigation;
2027
-
2028
-
2029
-
1258
+ var $17711e94d2ce0ee4$export$2e2bcd8739ae039 = $17711e94d2ce0ee4$var$DatasetDateItem;
2030
1259
 
2031
1260
 
2032
1261
 
2033
- const $b0968edc60d7d3a4$var$SidebarPage = (props)=>{
2034
- const { links: links, menuTitle: menuTitle, mobileMaxWidth: mobileMaxWidth = 768, children: children } = props;
2035
- const mobileMax = (0, $hgUW1$useMediaQuery)({
2036
- query: `(max-width: ${mobileMaxWidth}px)`
1262
+ const $20de4fedf33d4f9a$var$DatasetDate = (props)=>{
1263
+ const { date: date, modifiedBoldLabel: modifiedBoldLabel = false, releasedBoldLabel: releasedBoldLabel = false, refreshBoldLabel: refreshBoldLabel = false, displayTooltips: displayTooltips = true } = props;
1264
+ // Create an array of date items to render
1265
+ const dateItems = [];
1266
+ Object.entries(date).forEach(([key, value])=>{
1267
+ if (value) {
1268
+ const bold = key === "modified" && modifiedBoldLabel || key === "released" && releasedBoldLabel || key === "refresh" && refreshBoldLabel;
1269
+ dateItems.push(/*#__PURE__*/ (0, $hgUW1$jsx)((0, $17711e94d2ce0ee4$export$2e2bcd8739ae039), {
1270
+ type: key,
1271
+ displayTooltips: displayTooltips,
1272
+ date: value,
1273
+ boldLabel: bold
1274
+ }, key));
1275
+ }
2037
1276
  });
2038
1277
  return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2039
- className: `${mobileMax ? "a" : 'ds-l-container'}`,
2040
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2041
- className: `${mobileMax ? "a" : 'ds-l-row'}`,
2042
- children: [
2043
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2044
- className: `${mobileMax ? 'a' : "ds-l-col--4"}`,
2045
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $953b286f7778640e$export$2e2bcd8739ae039), {
2046
- links: links,
2047
- title: menuTitle,
2048
- mobileMax: mobileMax
1278
+ className: "dataset-date ds-u-display--flex ds-u-flex-wrap--wrap ds-u-font-size--sm ds-u-align-items--start",
1279
+ children: dateItems.map((item, index)=>/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$react).Fragment, {
1280
+ children: [
1281
+ item,
1282
+ index < dateItems.length - 1 && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1283
+ className: "bullet-point",
1284
+ children: "\u2022"
2049
1285
  })
2050
- }),
2051
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2052
- className: `${mobileMax ? "ds-l-container" : " ds-l-md-col--8"}`,
2053
- children: children
2054
- })
2055
- ]
2056
- })
1286
+ ]
1287
+ }, index))
2057
1288
  });
2058
1289
  };
2059
- var $b0968edc60d7d3a4$export$2e2bcd8739ae039 = $b0968edc60d7d3a4$var$SidebarPage;
2060
-
2061
-
2062
-
2063
-
2064
-
1290
+ var $20de4fedf33d4f9a$export$2e2bcd8739ae039 = $20de4fedf33d4f9a$var$DatasetDate;
2065
1291
 
2066
1292
 
1293
+ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
1294
+ if (dist && dist.data) {
1295
+ if (dist.data.format) return dist.data.format.toLowerCase();
1296
+ if (dist.data.mediaType) {
1297
+ const mediaType = dist.data.mediaType.split('/');
1298
+ if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
1299
+ }
1300
+ if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
1301
+ if (dist.data["%Ref:downloadURL"][0].data.mimeType) {
1302
+ const mimeType = dist.data["%Ref:downloadURL"][0].data.mimeType.split("/");
1303
+ if (mimeType.length && mimeType[1]) return mimeType[1].toLowerCase();
1304
+ }
1305
+ }
1306
+ }
1307
+ return '';
1308
+ }
2067
1309
 
2068
1310
 
2069
- const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl = 'datasets', searchKey: searchKey = 'fulltext', textfieldLabel: textfieldLabel = 'Search for a dataset', searchButtonText: searchButtonText = 'Search' })=>{
2070
- const navigate = (0, $hgUW1$useNavigate)();
2071
- const [searchValue, setSearchValue] = (0, $hgUW1$react).useState('');
2072
- const [invalidSearch, setInvalidSearch] = (0, $hgUW1$useState)(false);
2073
- function submitHero(e) {
2074
- e.preventDefault();
2075
- if ((0, $e873081a6e8f024e$export$1040147c129fdde9)(searchValue)) {
2076
- setInvalidSearch(false);
2077
- navigate(`/${searchUrl}?${searchKey}=${searchValue}`);
2078
- } else setInvalidSearch(true);
1311
+ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
1312
+ const desktop = (0, $hgUW1$useMediaQuery)({
1313
+ minWidth: 1024
1314
+ });
1315
+ 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, updateDateMonthYearOnly: updateDateMonthYearOnly = false, showTopics: showTopics = false, theme: theme, topicSlugs: topicSlugs, distribution: distribution } = props;
1316
+ const location = (0, $hgUW1$useLocation)();
1317
+ let linkContainerClasses = 'ds-u-margin-bottom--2';
1318
+ if (dataDictionaryLinks) linkContainerClasses += ' ds-l-col--6 ds-u-padding-right--0';
1319
+ else linkContainerClasses += ' ds-l-col--auto ds-u-padding-left--0';
1320
+ let linkClasses = 'ds-u-display--block ds-u-text-align--left';
1321
+ if (desktop) {
1322
+ linkContainerClasses = 'ds-u-padding-x--0';
1323
+ linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
2079
1324
  }
2080
- return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
2081
- className: `dc-c-hero ds-base ds-u-padding--2`,
2082
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2083
- className: "ds-l-container",
1325
+ let themes;
1326
+ if (theme && showTopics) themes = /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
1327
+ className: "theme-list item-theme ds-u-padding-left--2 ds-u-margin-top--2 ds-u-margin-bottom--0",
1328
+ children: theme.map((topic, index)=>{
1329
+ const title = topic || 'Unknown Topic';
1330
+ const prefix = 'topics';
1331
+ // Use the provided slug or fallback to a simple slug generation
1332
+ const slug = topicSlugs?.[title];
1333
+ const link = `/${prefix}/${slug}`;
1334
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1335
+ className: "ds-u-fill--primary ds-u-radius--pill",
1336
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
1337
+ to: link,
1338
+ state: {
1339
+ fromUrl: location.pathname,
1340
+ fromTitle: false,
1341
+ fromSearchList: location.pathname.includes('search')
1342
+ },
1343
+ children: title
1344
+ })
1345
+ }, `dist-${title}-${index}`);
1346
+ })
1347
+ });
1348
+ const date = {
1349
+ modified: modified,
1350
+ released: released,
1351
+ refresh: refresh
1352
+ };
1353
+ const url = `/dataset/${identifier}`;
1354
+ const DataTableLink = ()=>{
1355
+ if ((0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv") return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
1356
+ to: `${url}#data-table`,
2084
1357
  children: [
2085
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2086
- className: "ds-l-row",
2087
- children: [
2088
- /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
2089
- className: "ds-text-heading--5xl ds-u-color--white ds-u-margin-y--1",
2090
- children: title
2091
- }),
2092
- /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
2093
- className: "ds-u-color--white ds-u-measure--wide",
2094
- children: description
2095
- })
2096
- ]
1358
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
1359
+ id: "data-table"
2097
1360
  }),
2098
- /*#__PURE__*/ (0, $hgUW1$jsx)("form", {
2099
- onSubmit: (e)=>submitHero(e),
2100
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2101
- style: {
2102
- position: 'relative'
2103
- },
2104
- className: "ds-l-row ds-u-align-items--stretch ds-u-margin-y--4 ds-u-flex-wrap--nowrap",
2105
- children: [
2106
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2107
- className: "ds-u-padding--0 ds-u-margin-right--1",
2108
- style: {
2109
- flex: '1 1 100%',
2110
- maxWidth: '100%'
2111
- },
2112
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
2113
- errorMessage: invalidSearch ? 'No special characters allowed. Please enter a valid search term.' : undefined,
2114
- errorPlacement: "bottom",
2115
- label: textfieldLabel,
2116
- labelClassName: "ds-u-visibility--screen-reader",
2117
- name: "search_text_input",
2118
- style: {
2119
- maxWidth: 'none',
2120
- height: '61px',
2121
- margin: '0 20px 0 0'
2122
- },
2123
- onChange: (e)=>{
2124
- setInvalidSearch(false);
2125
- setSearchValue(e.target.value);
2126
- }
2127
- })
2128
- }),
2129
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
2130
- className: "ds-u-margin-left--auto",
2131
- size: "big",
2132
- type: "submit",
2133
- variation: "solid",
2134
- onDark: true,
2135
- children: [
2136
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2137
- className: "fas fa-search small-text ds-u-sm-display--none"
2138
- }),
2139
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2140
- className: "full-text ds-u-display--none ds-u-sm-display--inline-block",
2141
- children: searchButtonText
2142
- })
2143
- ]
2144
- })
2145
- ]
2146
- })
2147
- })
1361
+ "Data Table"
1362
+ ]
1363
+ });
1364
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
1365
+ className: "dkan-disabled-link",
1366
+ component: "a",
1367
+ offset: [
1368
+ 0,
1369
+ 5
1370
+ ],
1371
+ title: "There is no Data Table associated with this dataset. Data Tables will only display for CSV files.",
1372
+ children: [
1373
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
1374
+ id: "data-table"
1375
+ }),
1376
+ "Data Table"
1377
+ ]
1378
+ });
1379
+ };
1380
+ const dataDictionaryExists = ()=>{
1381
+ if (distribution && "data" in distribution) {
1382
+ if ("describedBy" in distribution.data && "describedByType" in distribution.data) {
1383
+ const types = [
1384
+ 'application/vnd.tableschema+json',
1385
+ 'application/pdf'
1386
+ ];
1387
+ const isValidType = types.includes(distribution.data.describedByType);
1388
+ return isValidType;
1389
+ }
1390
+ }
1391
+ return false;
1392
+ };
1393
+ const DataDictionaryLink = ()=>{
1394
+ if (dataDictionaryExists()) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
1395
+ to: `${url}#data-dictionary`,
1396
+ children: [
1397
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
1398
+ id: "data-dictionary"
1399
+ }),
1400
+ "Data Dictionary"
2148
1401
  ]
2149
- })
2150
- });
2151
- };
2152
- var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
2153
-
2154
-
2155
-
2156
-
2157
-
2158
-
2159
-
2160
-
2161
- const $c068004d499082cc$var$DatasetListItem = (props)=>{
2162
- const desktop = (0, $hgUW1$useMediaQuery)({
2163
- minWidth: 1024
2164
- });
2165
- const { title: title, modified: modified, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
2166
- let linkContainerClasses = 'ds-u-margin-bottom--2';
2167
- if (dataDictionaryLinks) linkContainerClasses += ' ds-l-col--6 ds-u-padding-right--0';
2168
- else linkContainerClasses += ' ds-l-col--auto ds-u-padding-left--0';
2169
- let linkClasses = 'ds-u-display--block ds-u-text-align--left';
2170
- if (desktop) {
2171
- linkContainerClasses = 'ds-u-padding-x--0';
2172
- linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
2173
- }
1402
+ });
1403
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
1404
+ className: "dkan-disabled-link",
1405
+ component: "a",
1406
+ offset: [
1407
+ 0,
1408
+ 5
1409
+ ],
1410
+ title: "There is no Data Dictionary associated with this dataset.",
1411
+ children: [
1412
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
1413
+ id: "data-dictionary"
1414
+ }),
1415
+ "Data Dictionary"
1416
+ ]
1417
+ });
1418
+ };
1419
+ const dateOptions = updateDateMonthYearOnly ? {
1420
+ year: 'numeric',
1421
+ month: 'long',
1422
+ day: undefined,
1423
+ timeZone: 'UTC'
1424
+ } : undefined;
2174
1425
  return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
2175
- className: "dc-c-list-item ds-u-padding-top--4",
1426
+ className: "dc-c-search-list-item ds-u-padding-top--3",
2176
1427
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2177
1428
  className: `dc-c-searchlist-item ${paginationEnabled ? 'ds-u-border-top--1' : 'ds-u-border-bottom--1 ds-u-padding-bottom--3'}`,
2178
1429
  children: [
2179
1430
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2180
1431
  className: "ds-l-row ds-u-align-items--start",
2181
1432
  children: [
2182
- /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
1433
+ !showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
2183
1434
  id: `dataset-${identifier}-updated-date`,
2184
- 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'}`,
1435
+ className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? 'ds-u-padding-top--2' : 'ds-u-padding-top--0'}`,
2185
1436
  children: [
2186
- "Updated ",
1437
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1438
+ children: "Updated:"
1439
+ }),
1440
+ " ",
2187
1441
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $727b038175bac6f5$export$2e2bcd8739ae039), {
2188
- date: modified
1442
+ date: modified,
1443
+ options: dateOptions
2189
1444
  })
2190
1445
  ]
2191
1446
  }),
2192
1447
  /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
2193
- className: "ds-l-col--12 ds-text-heading--2xl",
2194
- children: title
2195
- })
1448
+ className: `ds-l-col--12 ds-text-heading--2xl ${showDateDetails ? "ds-u-margin-top--2 ds-u-margin-bottom--0" : ""}`,
1449
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
1450
+ "aria-describedby": `dataset-${identifier}-updated-date`,
1451
+ to: `${url}`,
1452
+ children: title
1453
+ })
1454
+ }),
1455
+ themes
2196
1456
  ]
2197
1457
  }),
2198
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1458
+ description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2199
1459
  className: "ds-l-row",
2200
1460
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2201
1461
  className: "ds-l-col--12 ds-l-md-col--12 ds-u-margin-top--2",
2202
1462
  children: [
2203
- "The ",
2204
- title,
2205
- " dataset was updated."
1463
+ (0, $1a2bf34e2a8f6b80$export$59a943b34a82e690)(description),
1464
+ description.length > 240 ? /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
1465
+ children: [
1466
+ ' ',
1467
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
1468
+ to: `/dataset/${identifier}`,
1469
+ children: "See more"
1470
+ })
1471
+ ]
1472
+ }) : ''
2206
1473
  ]
2207
1474
  })
2208
1475
  }),
2209
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2210
- className: "ds-l-row",
2211
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2212
- className: "ds-l-col--12",
2213
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
2214
- "aria-describedby": `dataset-${identifier}-updated-date`,
2215
- to: `/dataset/${identifier}`,
2216
- children: [
2217
- "View the Dataset for ",
2218
- title,
2219
- " "
2220
- ]
1476
+ showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1477
+ className: "dataset-dates ds-u-margin-top--2",
1478
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $20de4fedf33d4f9a$export$2e2bcd8739ae039), {
1479
+ date: date,
1480
+ displayTooltips: false
1481
+ })
1482
+ }),
1483
+ downloadUrl ? /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
1484
+ className: `ds-u-margin-top--3 ds-u-padding-left--0 download-button`,
1485
+ children: largeFile ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1486
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b61856b23f5f58a2$export$2e2bcd8739ae039), {
1487
+ downloadUrl: downloadUrl
2221
1488
  })
1489
+ }) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
1490
+ href: downloadUrl,
1491
+ variation: "solid",
1492
+ className: "ds-l-col--12 ds-l-md-col--auto",
1493
+ children: [
1494
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
1495
+ id: "download"
1496
+ }),
1497
+ "Download"
1498
+ ]
2222
1499
  })
1500
+ }) : '',
1501
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("ul", {
1502
+ className: `ds-l-row ds-u-padding--0 ds-u-flex-direction--row ds-u-justify-content--between ds-u-md-justify-content--start ds-u-margin-top--3 ds-u-margin-x--0 ${!dataDictionaryLinks ? 'ds-u-justify-content--center ds-u-md-justify-content--start' : ''}`,
1503
+ children: [
1504
+ /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1505
+ className: linkContainerClasses,
1506
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1507
+ className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? '' : ' dkan-disabled-link-wrapper'}`,
1508
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataTableLink, {})
1509
+ })
1510
+ }),
1511
+ /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1512
+ className: linkContainerClasses,
1513
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1514
+ className: linkClasses,
1515
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
1516
+ to: `${url}#overview`,
1517
+ children: [
1518
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
1519
+ id: "overview"
1520
+ }),
1521
+ "Overview"
1522
+ ]
1523
+ })
1524
+ })
1525
+ }),
1526
+ dataDictionaryLinks ? /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1527
+ className: linkContainerClasses,
1528
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1529
+ className: `${linkClasses}${dataDictionaryExists() ? '' : ' dkan-disabled-link-wrapper'}`,
1530
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataDictionaryLink, {})
1531
+ })
1532
+ }) : '',
1533
+ /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1534
+ className: linkContainerClasses,
1535
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1536
+ className: linkClasses,
1537
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
1538
+ to: `${url}#api`,
1539
+ children: [
1540
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
1541
+ id: "api"
1542
+ }),
1543
+ "API"
1544
+ ]
1545
+ })
1546
+ })
1547
+ })
1548
+ ]
2223
1549
  })
2224
1550
  ]
2225
1551
  })
2226
1552
  });
2227
1553
  };
2228
- var $c068004d499082cc$export$2e2bcd8739ae039 = $c068004d499082cc$var$DatasetListItem;
2229
-
1554
+ var $52c6454cae137465$export$2e2bcd8739ae039 = $52c6454cae137465$var$DatasetSearchListItem;
2230
1555
 
2231
1556
 
2232
1557
 
@@ -4249,6 +3574,26 @@ var $85f8ff1ff89899c7$export$2e2bcd8739ae039 = $85f8ff1ff89899c7$var$DataTableTo
4249
3574
 
4250
3575
 
4251
3576
 
3577
+ const $61ff88fb3f6ee2c8$var$queryClient = new (0, $hgUW1$QueryClient)({
3578
+ defaultOptions: {
3579
+ queries: {
3580
+ refetchOnWindowFocus: false
3581
+ }
3582
+ }
3583
+ });
3584
+ const $61ff88fb3f6ee2c8$var$withQueryProvider = (WrappedComponent)=>(props)=>{
3585
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$QueryClientProvider), {
3586
+ client: $61ff88fb3f6ee2c8$var$queryClient,
3587
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)(WrappedComponent, {
3588
+ ...props
3589
+ })
3590
+ });
3591
+ };
3592
+ var $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 = $61ff88fb3f6ee2c8$var$withQueryProvider;
3593
+
3594
+
3595
+
3596
+
4252
3597
 
4253
3598
 
4254
3599
 
@@ -4271,6 +3616,19 @@ var $4808982eba3feb88$export$2e2bcd8739ae039 = $4808982eba3feb88$var$DatasetList
4271
3616
 
4272
3617
 
4273
3618
 
3619
+ function $6d5c0212e738499b$export$34e95918366a058e(params, ACA) {
3620
+ if (ACA) params = Object.assign(params, {
3621
+ ACA: ACA,
3622
+ redirect: false
3623
+ });
3624
+ return params;
3625
+ }
3626
+
3627
+
3628
+
3629
+ const $844981eac9b63865$export$eccc29c8d0ff408 = (0, $hgUW1$createContext)({
3630
+ ACA: undefined
3631
+ });
4274
3632
 
4275
3633
 
4276
3634
  const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 4, defaultSort: defaultSort = {
@@ -4306,7 +3664,7 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
4306
3664
  queryFn: ()=>{
4307
3665
  return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
4308
3666
  arrayFormat: 'comma',
4309
- encode: false
3667
+ encode: true
4310
3668
  })}`);
4311
3669
  }
4312
3670
  });
@@ -4391,15 +3749,55 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
4391
3749
  ]
4392
3750
  })
4393
3751
  })
4394
- ]
3752
+ ]
3753
+ })
3754
+ })
3755
+ });
3756
+ };
3757
+ var $10bc3aae21fc1572$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039)($10bc3aae21fc1572$var$DatasetListSubmenu);
3758
+
3759
+
3760
+
3761
+
3762
+
3763
+
3764
+
3765
+
3766
+ const $e011250e8a3bd5e5$var$SearchFacets = (props)=>{
3767
+ const { facets: facets, title: title, onClickFunction: onClickFunction, selectedFacets: selectedFacets = [] } = props;
3768
+ const filteredFacets = facets.filter((f)=>{
3769
+ return Number(f.total) > 0 || selectedFacets.findIndex((i)=>i === f.name) !== -1;
3770
+ });
3771
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3772
+ className: "dkan-dataset-search--facet-container ds-u-margin-bottom--4",
3773
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
3774
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
3775
+ contentClassName: "ds-u-padding-left--1 ds-u-padding-right--0",
3776
+ heading: title,
3777
+ defaultOpen: true,
3778
+ children: !filteredFacets.length ? /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
3779
+ className: "ds-text-heading--md",
3780
+ children: "No matching facets found."
3781
+ }) : /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
3782
+ children: filteredFacets.map((f)=>{
3783
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
3784
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Choice), {
3785
+ className: "ds-u-margin-y--1",
3786
+ checked: selectedFacets.findIndex((s)=>s === f.name) > -1 ? true : false,
3787
+ name: `facet_theme_${f.name}`,
3788
+ type: "checkbox",
3789
+ label: `${f.name} (${f.total})`,
3790
+ value: f.name,
3791
+ onClick: ()=>onClickFunction(f.type, f.name)
3792
+ })
3793
+ }, f.name);
3794
+ })
3795
+ })
4395
3796
  })
4396
3797
  })
4397
3798
  });
4398
3799
  };
4399
- var $10bc3aae21fc1572$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039)($10bc3aae21fc1572$var$DatasetListSubmenu);
4400
-
4401
-
4402
-
3800
+ var $e011250e8a3bd5e5$export$2e2bcd8739ae039 = $e011250e8a3bd5e5$var$SearchFacets;
4403
3801
 
4404
3802
 
4405
3803
 
@@ -5021,7 +4419,256 @@ const $2276c8c929d6a6d3$var$ApiDocumentation = ({ endpoint: endpoint, docsURL: d
5021
4419
  })
5022
4420
  });
5023
4421
  };
5024
- var $2276c8c929d6a6d3$export$2e2bcd8739ae039 = $2276c8c929d6a6d3$var$ApiDocumentation;
4422
+ var $2276c8c929d6a6d3$export$2e2bcd8739ae039 = $2276c8c929d6a6d3$var$ApiDocumentation;
4423
+
4424
+
4425
+
4426
+
4427
+
4428
+
4429
+
4430
+
4431
+
4432
+
4433
+ const $cd11dba5956275ca$var$DataTableDensity = ({ setTablePadding: setTablePadding, tablePadding: tablePadding })=>{
4434
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4435
+ className: "ds-u-display--flex",
4436
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
4437
+ options: [
4438
+ {
4439
+ label: 'Tight',
4440
+ value: 'ds-u-padding-y--0'
4441
+ },
4442
+ {
4443
+ label: 'Normal',
4444
+ value: 'ds-u-padding-y--1'
4445
+ },
4446
+ {
4447
+ label: 'Expanded',
4448
+ value: 'ds-u-padding-y--2'
4449
+ }
4450
+ ],
4451
+ label: "Display density:",
4452
+ labelClassName: "ds-u-margin-top--0",
4453
+ name: "datatable_display_density",
4454
+ onChange: (e)=>setTablePadding(e.target.value),
4455
+ defaultValue: tablePadding
4456
+ })
4457
+ });
4458
+ };
4459
+ var $cd11dba5956275ca$export$2e2bcd8739ae039 = $cd11dba5956275ca$var$DataTableDensity;
4460
+
4461
+
4462
+
4463
+
4464
+
4465
+ const $7848c69a021266f7$var$DataTableRowChanger = ({ limit: limit, rowOptions: rowOptions = [
4466
+ 10,
4467
+ 25,
4468
+ 50,
4469
+ 100
4470
+ ], setLimit: setLimit })=>{
4471
+ const rowOptionsFormatted = rowOptions.map((row)=>({
4472
+ label: row.toString(),
4473
+ value: row.toString()
4474
+ }));
4475
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4476
+ className: "ds-u-display--flex",
4477
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
4478
+ options: rowOptionsFormatted,
4479
+ label: "Rows per page:",
4480
+ labelClassName: "ds-u-margin-top--0",
4481
+ name: "datatable_rows_per_page",
4482
+ onChange: (e)=>setLimit(e.target.value),
4483
+ defaultValue: limit.toString()
4484
+ })
4485
+ });
4486
+ };
4487
+ var $7848c69a021266f7$export$2e2bcd8739ae039 = $7848c69a021266f7$var$DataTableRowChanger;
4488
+
4489
+
4490
+
4491
+
4492
+ const $e973bc477cdc2dc7$var$DownloadIcon = ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
4493
+ width: "15px",
4494
+ height: "15px",
4495
+ viewBox: "0 0 384 512",
4496
+ version: "1.1",
4497
+ xmlns: "http://www.w3.org/2000/svg",
4498
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
4499
+ children: [
4500
+ /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
4501
+ children: "Download Icon"
4502
+ }),
4503
+ /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
4504
+ stroke: "none",
4505
+ strokeWidth: "1",
4506
+ fill: "none",
4507
+ fillRule: "evenodd",
4508
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
4509
+ fill: "#112E51",
4510
+ fillRule: "nonzero",
4511
+ d: "M384 128h-128V0L384 128zM256 160H384v304c0 26.51-21.49 48-48 48h-288C21.49 512 0 490.5 0 464v-416C0 21.49 21.49 0 48 0H224l.0039 128C224 145.7 238.3 160 256 160zM255 295L216 334.1V232c0-13.25-10.75-24-24-24S168 218.8 168 232v102.1L128.1 295C124.3 290.3 118.2 288 112 288S99.72 290.3 95.03 295c-9.375 9.375-9.375 24.56 0 33.94l80 80c9.375 9.375 24.56 9.375 33.94 0l80-80c9.375-9.375 9.375-24.56 0-33.94S264.4 285.7 255 295z"
4512
+ })
4513
+ })
4514
+ ]
4515
+ });
4516
+ var $e973bc477cdc2dc7$export$2e2bcd8739ae039 = $e973bc477cdc2dc7$var$DownloadIcon;
4517
+
4518
+
4519
+
4520
+
4521
+ const $7ec5423a30aa3f61$var$CopyIcon = ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
4522
+ width: "15px",
4523
+ height: "15px",
4524
+ viewBox: "0 0 512 512",
4525
+ version: "1.1",
4526
+ xmlns: "http://www.w3.org/2000/svg",
4527
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
4528
+ children: [
4529
+ /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
4530
+ children: "Copy Icon"
4531
+ }),
4532
+ /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
4533
+ stroke: "none",
4534
+ strokeWidth: "1",
4535
+ fill: "none",
4536
+ fillRule: "evenodd",
4537
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
4538
+ fill: "#112E51",
4539
+ fillRule: "nonzero",
4540
+ d: "M384 96L384 0h-112c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48H464c26.51 0 48-21.49 48-48V128h-95.1C398.4 128 384 113.6 384 96zM416 0v96h96L416 0zM192 352V128h-144c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h192c26.51 0 48-21.49 48-48L288 416h-32C220.7 416 192 387.3 192 352z"
4541
+ })
4542
+ })
4543
+ ]
4544
+ });
4545
+ var $7ec5423a30aa3f61$export$2e2bcd8739ae039 = $7ec5423a30aa3f61$var$CopyIcon;
4546
+
4547
+
4548
+
4549
+
4550
+ const $ec9e1550b0b034d0$var$SettingsIcon = ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
4551
+ width: "15px",
4552
+ height: "15px",
4553
+ // viewBox="0 0 15 15"
4554
+ viewBox: "0 0 512 512",
4555
+ version: "1.1",
4556
+ xmlns: "http://www.w3.org/2000/svg",
4557
+ xmlnsXlink: "http://www.w3.org/1999/xlink",
4558
+ children: [
4559
+ /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
4560
+ children: "Settings Icon"
4561
+ }),
4562
+ /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
4563
+ stroke: "none",
4564
+ strokeWidth: "1",
4565
+ fill: "none",
4566
+ fillRule: "evenodd",
4567
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
4568
+ fill: "#112E51",
4569
+ fillRule: "nonzero",
4570
+ d: "M495.9 166.6C499.2 175.2 496.4 184.9 489.6 191.2L446.3 230.6C447.4 238.9 448 247.4 448 256C448 264.6 447.4 273.1 446.3 281.4L489.6 320.8C496.4 327.1 499.2 336.8 495.9 345.4C491.5 357.3 486.2 368.8 480.2 379.7L475.5 387.8C468.9 398.8 461.5 409.2 453.4 419.1C447.4 426.2 437.7 428.7 428.9 425.9L373.2 408.1C359.8 418.4 344.1 427 329.2 433.6L316.7 490.7C314.7 499.7 307.7 506.1 298.5 508.5C284.7 510.8 270.5 512 255.1 512C241.5 512 227.3 510.8 213.5 508.5C204.3 506.1 197.3 499.7 195.3 490.7L182.8 433.6C167 427 152.2 418.4 138.8 408.1L83.14 425.9C74.3 428.7 64.55 426.2 58.63 419.1C50.52 409.2 43.12 398.8 36.52 387.8L31.84 379.7C25.77 368.8 20.49 357.3 16.06 345.4C12.82 336.8 15.55 327.1 22.41 320.8L65.67 281.4C64.57 273.1 64 264.6 64 256C64 247.4 64.57 238.9 65.67 230.6L22.41 191.2C15.55 184.9 12.82 175.3 16.06 166.6C20.49 154.7 25.78 143.2 31.84 132.3L36.51 124.2C43.12 113.2 50.52 102.8 58.63 92.95C64.55 85.8 74.3 83.32 83.14 86.14L138.8 103.9C152.2 93.56 167 84.96 182.8 78.43L195.3 21.33C197.3 12.25 204.3 5.04 213.5 3.51C227.3 1.201 241.5 0 256 0C270.5 0 284.7 1.201 298.5 3.51C307.7 5.04 314.7 12.25 316.7 21.33L329.2 78.43C344.1 84.96 359.8 93.56 373.2 103.9L428.9 86.14C437.7 83.32 447.4 85.8 453.4 92.95C461.5 102.8 468.9 113.2 475.5 124.2L480.2 132.3C486.2 143.2 491.5 154.7 495.9 166.6V166.6zM256 336C300.2 336 336 300.2 336 255.1C336 211.8 300.2 175.1 256 175.1C211.8 175.1 176 211.8 176 255.1C176 300.2 211.8 336 256 336z"
4571
+ })
4572
+ })
4573
+ ]
4574
+ });
4575
+ var $ec9e1550b0b034d0$export$2e2bcd8739ae039 = $ec9e1550b0b034d0$var$SettingsIcon;
4576
+
4577
+
4578
+
4579
+ const $af099c546cb226c7$var$ResourceHeader = ({ setTablePadding: setTablePadding, includeDensity: includeDensity, includeDownload: includeDownload, resource: resource, tablePadding: tablePadding, downloadUrl: downloadUrl })=>{
4580
+ const md = (0, $hgUW1$useMediaQuery)({
4581
+ minWidth: 0,
4582
+ maxWidth: 768
4583
+ });
4584
+ const { limit: limit, offset: offset, count: count, setLimit: setLimit, setOffset: setOffset } = resource;
4585
+ const intCount = count ? parseInt(count) : 0;
4586
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4587
+ className: "dc-c-resource-header",
4588
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4589
+ className: "ds-l-row ds-u-align-items--center",
4590
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4591
+ className: "ds-l-col--12 ds-u-display--flex ds-u-justify-content--between ds-u-align-items--center ds-u-margin-bottom--2",
4592
+ children: [
4593
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4594
+ className: "ds-u-font-weight--bold",
4595
+ children: !resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2ed0091f7e32d1e6$export$2e2bcd8739ae039), {
4596
+ totalRows: parseInt(intCount),
4597
+ limit: parseInt(limit),
4598
+ offset: parseInt(offset)
4599
+ })
4600
+ }),
4601
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4602
+ className: "dc-c-resource-header--buttons",
4603
+ children: [
4604
+ includeDownload && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
4605
+ children: [
4606
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
4607
+ size: "small",
4608
+ className: "ds-u-text-align--left ds-u-font-weight--normal ds-u-font-size--base ds-u-margin-right--1",
4609
+ href: downloadUrl,
4610
+ children: [
4611
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e973bc477cdc2dc7$export$2e2bcd8739ae039), {}),
4612
+ !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
4613
+ className: "ds-u-font-weight--semibold ds-u-margin-left--1",
4614
+ children: "Download filtered data (CSV)"
4615
+ })
4616
+ ]
4617
+ }),
4618
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
4619
+ onOpen: ()=>{
4620
+ navigator.clipboard.writeText(window.location.href);
4621
+ },
4622
+ className: "ds-c-button ds-c-button--small ds-u-text-align--left ds-u-margin-right--1 display-settings-font",
4623
+ placement: "bottom",
4624
+ dialog: true,
4625
+ ariaLabel: "Copy link to filtered data",
4626
+ title: "Link copied to clipboard",
4627
+ children: [
4628
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $7ec5423a30aa3f61$export$2e2bcd8739ae039), {}),
4629
+ !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
4630
+ className: "ds-u-font-weight--semibold ds-u-margin-left--1",
4631
+ children: "Copy link to filtered data"
4632
+ })
4633
+ ]
4634
+ })
4635
+ ]
4636
+ }),
4637
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
4638
+ className: "ds-c-button ds-c-button--small ds-u-text-align--left display-settings-font",
4639
+ placement: "bottom",
4640
+ dialog: true,
4641
+ ariaLabel: "Display settings",
4642
+ title: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4643
+ className: "dc-c-display-settings",
4644
+ children: [
4645
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $7848c69a021266f7$export$2e2bcd8739ae039), {
4646
+ limit: Number(limit),
4647
+ setLimit: setLimit,
4648
+ setOffset: setOffset
4649
+ }),
4650
+ includeDensity && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cd11dba5956275ca$export$2e2bcd8739ae039), {
4651
+ setTablePadding: setTablePadding,
4652
+ tablePadding: tablePadding
4653
+ })
4654
+ ]
4655
+ }),
4656
+ children: [
4657
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $ec9e1550b0b034d0$export$2e2bcd8739ae039), {}),
4658
+ !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
4659
+ className: "ds-u-font-weight--semibold ds-u-margin-left--1",
4660
+ children: "Display settings"
4661
+ })
4662
+ ]
4663
+ })
4664
+ ]
4665
+ })
4666
+ ]
4667
+ })
4668
+ })
4669
+ });
4670
+ };
4671
+ var $af099c546cb226c7$export$2e2bcd8739ae039 = $af099c546cb226c7$var$ResourceHeader;
5025
4672
 
5026
4673
 
5027
4674
 
@@ -5032,245 +4679,256 @@ var $2276c8c929d6a6d3$export$2e2bcd8739ae039 = $2276c8c929d6a6d3$var$ApiDocument
5032
4679
 
5033
4680
 
5034
4681
 
5035
- const $cd11dba5956275ca$var$DataTableDensity = ({ setTablePadding: setTablePadding, tablePadding: tablePadding })=>{
5036
- return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5037
- className: "ds-u-display--flex",
5038
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
5039
- options: [
5040
- {
5041
- label: 'Tight',
5042
- value: 'ds-u-padding-y--0'
5043
- },
5044
- {
5045
- label: 'Normal',
5046
- value: 'ds-u-padding-y--1'
5047
- },
5048
- {
5049
- label: 'Expanded',
5050
- value: 'ds-u-padding-y--2'
5051
- }
5052
- ],
5053
- label: "Display density:",
5054
- labelClassName: "ds-u-margin-top--0",
5055
- name: "datatable_display_density",
5056
- onChange: (e)=>setTablePadding(e.target.value),
5057
- defaultValue: tablePadding
4682
+
4683
+
4684
+ function $626282d9a03c51d5$export$1147582dfae658c6(columns, schema) {
4685
+ return columns.map((column)=>({
4686
+ header: schema && schema.fields[column].description ? schema.fields[column].description : column,
4687
+ accessor: column
4688
+ }));
4689
+ }
4690
+ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, accessor: accessor, setFilter: setFilter, filterValue: filterValue } }) {
4691
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
4692
+ label: `Filter by ${Header}`,
4693
+ onChange: (e)=>{
4694
+ setFilter(e.target.value) || undefined;
4695
+ },
4696
+ labelClassName: "ds-u-visibility--screen-reader",
4697
+ name: accessor,
4698
+ value: filterValue || ''
4699
+ });
4700
+ }
4701
+ const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true, showDataTableToolbar: showDataTableToolbar = false, showInfoShareContainer: showInfoShareContainer = true, showTableResults: showTableResults = true, showFilterDatasetButton: showFilterDatasetButton = true, showManageColumnsButton: showManageColumnsButton = true, showDisplaySettingsButton: showDisplaySettingsButton = true, showFullScreenButton: showFullScreenButton = true })=>{
4702
+ const { resource: resource, customColumns: customColumns } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
4703
+ const { tableDensity: tableDensity } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
4704
+ const customColumnHeaders = customColumns ? (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[id]) : null;
4705
+ const columns = customColumnHeaders ? customColumnHeaders : $626282d9a03c51d5$export$1147582dfae658c6(resource.columns, resource.schema[id]);
4706
+ if (Object.keys(resource).length && columns.length && resource.schema) return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4707
+ id: "resource-preview",
4708
+ className: "ds-u-overflow--auto",
4709
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
4710
+ canResize: canResize,
4711
+ columns: customColumns ? customColumns : $626282d9a03c51d5$export$1147582dfae658c6(resource.columns, resource.schema[id]),
4712
+ sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
4713
+ tablePadding: typeof tablePadding === 'function' ? tablePadding(tableDensity) : tablePadding,
4714
+ loading: resource.loading,
4715
+ className: "dc-c-datatable",
4716
+ customColumnFilter: $626282d9a03c51d5$var$DefaultColumnFilter,
4717
+ showDataTableToolbar: showDataTableToolbar,
4718
+ showInfoShareContainer: showInfoShareContainer,
4719
+ showTableResults: showTableResults,
4720
+ showFilterDatasetButton: showFilterDatasetButton,
4721
+ showManageColumnsButton: showManageColumnsButton,
4722
+ showDisplaySettingsButton: showDisplaySettingsButton,
4723
+ showFullScreenButton: showFullScreenButton,
4724
+ isModal: false
5058
4725
  })
5059
4726
  });
4727
+ else return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {});
5060
4728
  };
5061
- var $cd11dba5956275ca$export$2e2bcd8739ae039 = $cd11dba5956275ca$var$DataTableDensity;
4729
+ var $626282d9a03c51d5$export$2e2bcd8739ae039 = $626282d9a03c51d5$var$ResourcePreview;
5062
4730
 
5063
4731
 
5064
4732
 
5065
4733
 
5066
4734
 
5067
- const $7848c69a021266f7$var$DataTableRowChanger = ({ limit: limit, rowOptions: rowOptions = [
5068
- 10,
5069
- 25,
5070
- 50,
5071
- 100
5072
- ], setLimit: setLimit })=>{
5073
- const rowOptionsFormatted = rowOptions.map((row)=>({
5074
- label: row.toString(),
5075
- value: row.toString()
5076
- }));
4735
+ const $072291d44ce1834a$var$ResourceFooter = ({ resource: resource })=>{
4736
+ const { limit: limit, values: values, offset: offset, count: count, setOffset: setOffset } = resource;
5077
4737
  return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5078
- className: "ds-u-display--flex",
5079
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
5080
- options: rowOptionsFormatted,
5081
- label: "Rows per page:",
5082
- labelClassName: "ds-u-margin-top--0",
5083
- name: "datatable_rows_per_page",
5084
- onChange: (e)=>setLimit(e.target.value),
5085
- defaultValue: limit.toString()
4738
+ children: values && values.length > 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
4739
+ currentPage: Number(offset) / limit + 1,
4740
+ totalPages: Math.ceil(Number(count) / limit),
4741
+ onPageChange: (evt, page)=>{
4742
+ evt.preventDefault();
4743
+ setOffset((page - 1) * limit);
4744
+ },
4745
+ renderHref: (page)=>{
4746
+ return "";
4747
+ }
5086
4748
  })
5087
4749
  });
5088
4750
  };
5089
- var $7848c69a021266f7$export$2e2bcd8739ae039 = $7848c69a021266f7$var$DataTableRowChanger;
4751
+ var $072291d44ce1834a$export$2e2bcd8739ae039 = $072291d44ce1834a$var$ResourceFooter;
5090
4752
 
5091
4753
 
5092
4754
 
5093
4755
 
5094
- const $e973bc477cdc2dc7$var$DownloadIcon = ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
5095
- width: "15px",
5096
- height: "15px",
5097
- viewBox: "0 0 384 512",
5098
- version: "1.1",
5099
- xmlns: "http://www.w3.org/2000/svg",
5100
- xmlnsXlink: "http://www.w3.org/1999/xlink",
5101
- children: [
5102
- /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
5103
- children: "Download Icon"
5104
- }),
5105
- /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
5106
- stroke: "none",
5107
- strokeWidth: "1",
5108
- fill: "none",
5109
- fillRule: "evenodd",
5110
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
5111
- fill: "#112E51",
5112
- fillRule: "nonzero",
5113
- d: "M384 128h-128V0L384 128zM256 160H384v304c0 26.51-21.49 48-48 48h-288C21.49 512 0 490.5 0 464v-416C0 21.49 21.49 0 48 0H224l.0039 128C224 145.7 238.3 160 256 160zM255 295L216 334.1V232c0-13.25-10.75-24-24-24S168 218.8 168 232v102.1L128.1 295C124.3 290.3 118.2 288 112 288S99.72 290.3 95.03 295c-9.375 9.375-9.375 24.56 0 33.94l80 80c9.375 9.375 24.56 9.375 33.94 0l80-80c9.375-9.375 9.375-24.56 0-33.94S264.4 285.7 255 295z"
4756
+
4757
+
4758
+ const $94983b21ff96a774$var$Breadcrumb = ({ currentPage: currentPage, pageTrail: pageTrail = [] })=>{
4759
+ const pageTrailContent = pageTrail.map((page)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
4760
+ className: "dc-c-breadcrumb__list-item",
4761
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
4762
+ to: page.path,
4763
+ className: "dc-c-breadcrumb__link",
4764
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
4765
+ children: page.title
5114
4766
  })
5115
4767
  })
5116
- ]
4768
+ }, page.path));
4769
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("nav", {
4770
+ className: "dc-c-breadcrumb ds-u-margin-top--6",
4771
+ "aria-label": "Breadcrumbs",
4772
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
4773
+ className: "dc-c-breadcrumb__list",
4774
+ children: [
4775
+ pageTrailContent,
4776
+ currentPage ? /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
4777
+ className: "dc-c-breadcrumb__list-item dc-c-current",
4778
+ "aria-current": "page",
4779
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
4780
+ children: currentPage
4781
+ })
4782
+ }) : ''
4783
+ ]
4784
+ })
5117
4785
  });
5118
- var $e973bc477cdc2dc7$export$2e2bcd8739ae039 = $e973bc477cdc2dc7$var$DownloadIcon;
4786
+ };
4787
+ var $94983b21ff96a774$export$2e2bcd8739ae039 = $94983b21ff96a774$var$Breadcrumb;
5119
4788
 
5120
4789
 
5121
4790
 
5122
4791
 
5123
- const $7ec5423a30aa3f61$var$CopyIcon = ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
5124
- width: "15px",
5125
- height: "15px",
5126
- viewBox: "0 0 512 512",
5127
- version: "1.1",
4792
+
4793
+
4794
+
4795
+
4796
+
4797
+
4798
+
4799
+ const $94764de04eaf82f6$var$MagnifyingGlassIcon = (props)=>/*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
4800
+ fill: "#000000",
4801
+ width: "24px",
4802
+ height: "24px",
4803
+ viewBox: "0 0 250 250",
4804
+ id: "Flat",
5128
4805
  xmlns: "http://www.w3.org/2000/svg",
5129
- xmlnsXlink: "http://www.w3.org/1999/xlink",
4806
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
4807
+ d: "M232.47656,215.51563l-40.67773-40.67774a96.10791,96.10791,0,1,0-16.97168,16.96973l40.67871,40.67871a12.0001,12.0001,0,1,0,16.9707-16.9707ZM43.99707,116a72,72,0,1,1,72,72A72.08124,72.08124,0,0,1,43.99707,116Z"
4808
+ })
4809
+ });
4810
+ var $94764de04eaf82f6$export$2e2bcd8739ae039 = $94764de04eaf82f6$var$MagnifyingGlassIcon;
4811
+
4812
+
4813
+
4814
+
4815
+ const $10acbeaa4d8f6040$var$ChevronRightIcon = (props)=>/*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
4816
+ xmlns: "http://www.w3.org/2000/svg",
4817
+ width: 16,
4818
+ height: 28,
4819
+ fill: "currentColor",
4820
+ className: "mi-solid mi-chevron-right",
4821
+ viewBox: "10.125 3.25 9.5 19.5",
4822
+ ...props,
4823
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
4824
+ d: "M10.064 7.269a1.08 1.08 0 0 0 0 1.527L14.267 13l-4.203 4.203a1.079 1.079 0 1 0 1.527 1.527l4.973 -4.973a1.08 1.08 0 0 0 0 -1.527l-4.973 -4.973a1.087 1.087 0 0 0 -1.527 0.011"
4825
+ })
4826
+ });
4827
+ var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRightIcon;
4828
+
4829
+
4830
+
4831
+ const $ad9981f5aa726046$var$SearchInput = ({ placeholder: placeholder = 'Search the Data', showMagnifyingGlass: showMagnifyingGlass, showSearchButton: showSearchButton, onDark: onDark, onChange: onChange, onSubmit: onSubmit, onKeyDown: onKeyDown, defaultValue: defaultValue = '' })=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4832
+ className: "search-input-container",
5130
4833
  children: [
5131
- /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
5132
- children: "Copy Icon"
4834
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
4835
+ name: "search",
4836
+ className: `${showMagnifyingGlass ? 'left-padding' : ''} ${showSearchButton ? 'right-padding' : ''}`,
4837
+ label: placeholder,
4838
+ labelClassName: "ds-u-visibility--screen-reader",
4839
+ placeholder: placeholder,
4840
+ onBlur: ()=>{},
4841
+ onChange: onChange,
4842
+ onKeyDown: onKeyDown,
4843
+ defaultValue: defaultValue
5133
4844
  }),
5134
- /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
5135
- stroke: "none",
5136
- strokeWidth: "1",
5137
- fill: "none",
5138
- fillRule: "evenodd",
5139
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
5140
- fill: "#112E51",
5141
- fillRule: "nonzero",
5142
- d: "M384 96L384 0h-112c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48H464c26.51 0 48-21.49 48-48V128h-95.1C398.4 128 384 113.6 384 96zM416 0v96h96L416 0zM192 352V128h-144c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h192c26.51 0 48-21.49 48-48L288 416h-32C220.7 416 192 387.3 192 352z"
5143
- })
4845
+ showMagnifyingGlass && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4846
+ className: "magnifying-glass-icon ds-u-visibility--hidden ds-u-sm-visibility--visible",
4847
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $94764de04eaf82f6$export$2e2bcd8739ae039), {})
4848
+ }),
4849
+ showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
4850
+ variation: "solid",
4851
+ className: onDark ? 'on-dark' : undefined,
4852
+ onClick: onSubmit,
4853
+ children: [
4854
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
4855
+ className: "magnifying-glass-icon",
4856
+ "aria-label": "Search the Data",
4857
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $94764de04eaf82f6$export$2e2bcd8739ae039), {})
4858
+ }),
4859
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
4860
+ className: "sm-label",
4861
+ children: [
4862
+ "Search the Data ",
4863
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $10acbeaa4d8f6040$export$2e2bcd8739ae039), {})
4864
+ ]
4865
+ })
4866
+ ]
4867
+ }),
4868
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4869
+ className: "rounded-border"
5144
4870
  })
5145
4871
  ]
5146
4872
  });
5147
- var $7ec5423a30aa3f61$export$2e2bcd8739ae039 = $7ec5423a30aa3f61$var$CopyIcon;
5148
-
4873
+ var $ad9981f5aa726046$export$2e2bcd8739ae039 = $ad9981f5aa726046$var$SearchInput;
5149
4874
 
5150
4875
 
5151
4876
 
5152
- const $ec9e1550b0b034d0$var$SettingsIcon = ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
5153
- width: "15px",
5154
- height: "15px",
5155
- // viewBox="0 0 15 15"
5156
- viewBox: "0 0 512 512",
5157
- version: "1.1",
5158
- xmlns: "http://www.w3.org/2000/svg",
5159
- xmlnsXlink: "http://www.w3.org/1999/xlink",
5160
- children: [
5161
- /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
5162
- children: "Settings Icon"
5163
- }),
5164
- /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
5165
- stroke: "none",
5166
- strokeWidth: "1",
5167
- fill: "none",
5168
- fillRule: "evenodd",
5169
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
5170
- fill: "#112E51",
5171
- fillRule: "nonzero",
5172
- d: "M495.9 166.6C499.2 175.2 496.4 184.9 489.6 191.2L446.3 230.6C447.4 238.9 448 247.4 448 256C448 264.6 447.4 273.1 446.3 281.4L489.6 320.8C496.4 327.1 499.2 336.8 495.9 345.4C491.5 357.3 486.2 368.8 480.2 379.7L475.5 387.8C468.9 398.8 461.5 409.2 453.4 419.1C447.4 426.2 437.7 428.7 428.9 425.9L373.2 408.1C359.8 418.4 344.1 427 329.2 433.6L316.7 490.7C314.7 499.7 307.7 506.1 298.5 508.5C284.7 510.8 270.5 512 255.1 512C241.5 512 227.3 510.8 213.5 508.5C204.3 506.1 197.3 499.7 195.3 490.7L182.8 433.6C167 427 152.2 418.4 138.8 408.1L83.14 425.9C74.3 428.7 64.55 426.2 58.63 419.1C50.52 409.2 43.12 398.8 36.52 387.8L31.84 379.7C25.77 368.8 20.49 357.3 16.06 345.4C12.82 336.8 15.55 327.1 22.41 320.8L65.67 281.4C64.57 273.1 64 264.6 64 256C64 247.4 64.57 238.9 65.67 230.6L22.41 191.2C15.55 184.9 12.82 175.3 16.06 166.6C20.49 154.7 25.78 143.2 31.84 132.3L36.51 124.2C43.12 113.2 50.52 102.8 58.63 92.95C64.55 85.8 74.3 83.32 83.14 86.14L138.8 103.9C152.2 93.56 167 84.96 182.8 78.43L195.3 21.33C197.3 12.25 204.3 5.04 213.5 3.51C227.3 1.201 241.5 0 256 0C270.5 0 284.7 1.201 298.5 3.51C307.7 5.04 314.7 12.25 316.7 21.33L329.2 78.43C344.1 84.96 359.8 93.56 373.2 103.9L428.9 86.14C437.7 83.32 447.4 85.8 453.4 92.95C461.5 102.8 468.9 113.2 475.5 124.2L480.2 132.3C486.2 143.2 491.5 154.7 495.9 166.6V166.6zM256 336C300.2 336 336 300.2 336 255.1C336 211.8 300.2 175.1 256 175.1C211.8 175.1 176 211.8 176 255.1C176 300.2 211.8 336 256 336z"
5173
- })
5174
- })
5175
- ]
5176
- });
5177
- var $ec9e1550b0b034d0$export$2e2bcd8739ae039 = $ec9e1550b0b034d0$var$SettingsIcon;
5178
4877
 
5179
4878
 
5180
4879
 
5181
- const $af099c546cb226c7$var$ResourceHeader = ({ setTablePadding: setTablePadding, includeDensity: includeDensity, includeDownload: includeDownload, resource: resource, tablePadding: tablePadding, downloadUrl: downloadUrl })=>{
5182
- const md = (0, $hgUW1$useMediaQuery)({
5183
- minWidth: 0,
5184
- maxWidth: 768
4880
+ function $5644ebd2c3dbfd7b$export$eea3a12df15499ca(metadataMapping, datasetInfo) {
4881
+ const rows = [];
4882
+ Object.keys(metadataMapping).forEach((d)=>{
4883
+ if (!datasetInfo[d]) return null;
4884
+ else rows.push(...metadataMapping[d](datasetInfo[d]));
5185
4885
  });
5186
- const { limit: limit, offset: offset, count: count, setLimit: setLimit, setOffset: setOffset } = resource;
5187
- const intCount = count ? parseInt(count) : 0;
5188
- return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5189
- className: "dc-c-resource-header",
5190
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5191
- className: "ds-l-row ds-u-align-items--center",
5192
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5193
- className: "ds-l-col--12 ds-u-display--flex ds-u-justify-content--between ds-u-align-items--center ds-u-margin-bottom--2",
4886
+ return rows;
4887
+ }
4888
+ const $5644ebd2c3dbfd7b$var$DatasetAdditionalInformation = ({ datasetInfo: datasetInfo, id: id, metadataMapping: metadataMapping })=>{
4889
+ const rows = $5644ebd2c3dbfd7b$export$eea3a12df15499ca(metadataMapping, datasetInfo);
4890
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
4891
+ className: "dc-c-additional-info-table ds-u-margin-bottom--6",
4892
+ children: [
4893
+ /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
4894
+ className: "ds-text-heading--2xl ds-u-margin-y--3",
4895
+ children: "Additional Information"
4896
+ }),
4897
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
4898
+ compact: true,
4899
+ striped: true,
5194
4900
  children: [
5195
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5196
- className: "ds-u-font-weight--bold",
5197
- children: !resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2ed0091f7e32d1e6$export$2e2bcd8739ae039), {
5198
- totalRows: parseInt(intCount),
5199
- limit: parseInt(limit),
5200
- offset: parseInt(offset)
4901
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
4902
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
4903
+ children: [
4904
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
4905
+ children: "Field"
4906
+ }),
4907
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
4908
+ children: "Value"
4909
+ })
4910
+ ]
5201
4911
  })
5202
4912
  }),
5203
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5204
- className: "dc-c-resource-header--buttons",
5205
- children: [
5206
- includeDownload && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
4913
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableBody), {
4914
+ children: rows.map((r)=>/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
5207
4915
  children: [
5208
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
5209
- size: "small",
5210
- className: "ds-u-text-align--left ds-u-font-weight--normal ds-u-font-size--base ds-u-margin-right--1",
5211
- href: downloadUrl,
5212
- children: [
5213
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e973bc477cdc2dc7$export$2e2bcd8739ae039), {}),
5214
- !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5215
- className: "ds-u-font-weight--semibold ds-u-margin-left--1",
5216
- children: "Download filtered data (CSV)"
5217
- })
5218
- ]
4916
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
4917
+ children: r.label
5219
4918
  }),
5220
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
5221
- onOpen: ()=>{
5222
- navigator.clipboard.writeText(window.location.href);
5223
- },
5224
- className: "ds-c-button ds-c-button--small ds-u-text-align--left ds-u-margin-right--1 display-settings-font",
5225
- placement: "bottom",
5226
- dialog: true,
5227
- ariaLabel: "Copy link to filtered data",
5228
- title: "Link copied to clipboard",
5229
- children: [
5230
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $7ec5423a30aa3f61$export$2e2bcd8739ae039), {}),
5231
- !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5232
- className: "ds-u-font-weight--semibold ds-u-margin-left--1",
5233
- children: "Copy link to filtered data"
5234
- })
5235
- ]
5236
- })
5237
- ]
5238
- }),
5239
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
5240
- className: "ds-c-button ds-c-button--small ds-u-text-align--left display-settings-font",
5241
- placement: "bottom",
5242
- dialog: true,
5243
- ariaLabel: "Display settings",
5244
- title: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5245
- className: "dc-c-display-settings",
5246
- children: [
5247
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $7848c69a021266f7$export$2e2bcd8739ae039), {
5248
- limit: Number(limit),
5249
- setLimit: setLimit,
5250
- setOffset: setOffset
5251
- }),
5252
- includeDensity && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cd11dba5956275ca$export$2e2bcd8739ae039), {
5253
- setTablePadding: setTablePadding,
5254
- tablePadding: tablePadding
5255
- })
5256
- ]
5257
- }),
5258
- children: [
5259
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $ec9e1550b0b034d0$export$2e2bcd8739ae039), {}),
5260
- !md && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5261
- className: "ds-u-font-weight--semibold ds-u-margin-left--1",
5262
- children: "Display settings"
4919
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
4920
+ className: "ds-u-word-break-anywhere",
4921
+ children: r.value
5263
4922
  })
5264
4923
  ]
5265
- })
5266
- ]
4924
+ }, `${r.label}_${id}`))
5267
4925
  })
5268
4926
  ]
5269
4927
  })
5270
- })
4928
+ ]
5271
4929
  });
5272
4930
  };
5273
- var $af099c546cb226c7$export$2e2bcd8739ae039 = $af099c546cb226c7$var$ResourceHeader;
4931
+ var $5644ebd2c3dbfd7b$export$2e2bcd8739ae039 = $5644ebd2c3dbfd7b$var$DatasetAdditionalInformation;
5274
4932
 
5275
4933
 
5276
4934
 
@@ -5283,348 +4941,660 @@ var $af099c546cb226c7$export$2e2bcd8739ae039 = $af099c546cb226c7$var$ResourceHea
5283
4941
 
5284
4942
 
5285
4943
 
5286
- function $626282d9a03c51d5$export$1147582dfae658c6(columns, schema) {
5287
- return columns.map((column)=>({
5288
- header: schema && schema.fields[column].description ? schema.fields[column].description : column,
5289
- accessor: column
5290
- }));
5291
- }
5292
- function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, accessor: accessor, setFilter: setFilter, filterValue: filterValue } }) {
5293
- return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
5294
- label: `Filter by ${Header}`,
5295
- onChange: (e)=>{
5296
- setFilter(e.target.value) || undefined;
5297
- },
5298
- labelClassName: "ds-u-visibility--screen-reader",
5299
- name: accessor,
5300
- value: filterValue || ''
4944
+
4945
+
4946
+
4947
+ const $6fd40f23575fa7f0$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: rootUrl, showRowLimitNotice: showRowLimitNotice = false, swaggerButtonClassNames: swaggerButtonClassNames = {} })=>{
4948
+ let params = {
4949
+ authentication: hideAuth ? false : undefined
4950
+ };
4951
+ const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
4952
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
4953
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
4954
+ className: "ds-l-container ds-u-padding--0 ds-u-margin-top--5",
4955
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
4956
+ url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
4957
+ addQueryPrefix: true
4958
+ })}`,
4959
+ docExpansion: 'list',
4960
+ defaultModelsExpandDepth: -1,
4961
+ plugins: [
4962
+ (0, $5b656f0283afa250$export$2e2bcd8739ae039),
4963
+ (0, $ffd9c403a1c2fc39$export$2e2bcd8739ae039),
4964
+ (0, $30bfb3d671300bcd$export$2e2bcd8739ae039)({
4965
+ showRowLimitNotice: showRowLimitNotice,
4966
+ buttonClassNames: swaggerButtonClassNames
4967
+ })
4968
+ ]
4969
+ })
4970
+ })
5301
4971
  });
5302
- }
5303
- const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true, showDataTableToolbar: showDataTableToolbar = false, showInfoShareContainer: showInfoShareContainer = true, showTableResults: showTableResults = true, showFilterDatasetButton: showFilterDatasetButton = true, showManageColumnsButton: showManageColumnsButton = true, showDisplaySettingsButton: showDisplaySettingsButton = true, showFullScreenButton: showFullScreenButton = true })=>{
5304
- const { resource: resource, customColumns: customColumns } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
5305
- const { tableDensity: tableDensity } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
5306
- const customColumnHeaders = customColumns ? (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[id]) : null;
5307
- const columns = customColumnHeaders ? customColumnHeaders : $626282d9a03c51d5$export$1147582dfae658c6(resource.columns, resource.schema[id]);
5308
- if (Object.keys(resource).length && columns.length && resource.schema) return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5309
- id: "resource-preview",
5310
- className: "ds-u-overflow--auto",
5311
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
5312
- canResize: canResize,
5313
- columns: customColumns ? customColumns : $626282d9a03c51d5$export$1147582dfae658c6(resource.columns, resource.schema[id]),
5314
- sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
5315
- tablePadding: typeof tablePadding === 'function' ? tablePadding(tableDensity) : tablePadding,
5316
- loading: resource.loading,
5317
- className: "dc-c-datatable",
5318
- customColumnFilter: $626282d9a03c51d5$var$DefaultColumnFilter,
5319
- showDataTableToolbar: showDataTableToolbar,
5320
- showInfoShareContainer: showInfoShareContainer,
5321
- showTableResults: showTableResults,
5322
- showFilterDatasetButton: showFilterDatasetButton,
5323
- showManageColumnsButton: showManageColumnsButton,
5324
- showDisplaySettingsButton: showDisplaySettingsButton,
5325
- showFullScreenButton: showFullScreenButton,
5326
- isModal: false
4972
+ };
4973
+ var $6fd40f23575fa7f0$export$2e2bcd8739ae039 = $6fd40f23575fa7f0$var$APIPage;
4974
+
4975
+
4976
+
4977
+
4978
+
4979
+
4980
+ const $026cb986f9fea2b1$var$PageNotFound = ({ siteUrl: siteUrl, content: content })=>{
4981
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
4982
+ className: "ds-l-container ds-u-padding-top--3",
4983
+ children: content ? content : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
4984
+ children: [
4985
+ /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
4986
+ className: "ds-text-heading--4xl",
4987
+ children: "Error: Page not found"
4988
+ }),
4989
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
4990
+ children: [
4991
+ "We're sorry, but there is no ",
4992
+ siteUrl,
4993
+ " web page that matches your entry. You may have been directed here because:"
4994
+ ]
4995
+ }),
4996
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
4997
+ children: [
4998
+ /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
4999
+ children: "The address you typed contains a typo;"
5000
+ }),
5001
+ /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
5002
+ children: "The requested page may have expired or;"
5003
+ }),
5004
+ /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
5005
+ children: "The requested page may have been moved."
5006
+ })
5007
+ ]
5008
+ }),
5009
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
5010
+ children: [
5011
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5012
+ className: "ds-u-font-weight--bold",
5013
+ children: "Note:"
5014
+ }),
5015
+ " If you were using a bookmark, please reset it once you find the correct page."
5016
+ ]
5017
+ })
5018
+ ]
5327
5019
  })
5328
5020
  });
5329
- else return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {});
5330
5021
  };
5331
- var $626282d9a03c51d5$export$2e2bcd8739ae039 = $626282d9a03c51d5$var$ResourcePreview;
5022
+ var $026cb986f9fea2b1$export$2e2bcd8739ae039 = $026cb986f9fea2b1$var$PageNotFound;
5332
5023
 
5333
5024
 
5334
5025
 
5335
5026
 
5336
5027
 
5337
- const $072291d44ce1834a$var$ResourceFooter = ({ resource: resource })=>{
5338
- const { limit: limit, values: values, offset: offset, count: count, setOffset: setOffset } = resource;
5339
- return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5340
- children: values && values.length > 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
5341
- currentPage: Number(offset) / limit + 1,
5342
- totalPages: Math.ceil(Number(count) / limit),
5343
- onPageChange: (evt, page)=>{
5344
- evt.preventDefault();
5345
- setOffset((page - 1) * limit);
5346
- },
5347
- renderHref: (page)=>{
5348
- return "";
5349
- }
5350
- })
5351
- });
5352
- };
5353
- var $072291d44ce1834a$export$2e2bcd8739ae039 = $072291d44ce1834a$var$ResourceFooter;
5354
5028
 
5355
5029
 
5356
5030
 
5357
5031
 
5358
5032
 
5359
5033
 
5360
- const $94983b21ff96a774$var$Breadcrumb = ({ currentPage: currentPage, pageTrail: pageTrail = [] })=>{
5361
- const pageTrailContent = pageTrail.map((page)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
5362
- className: "dc-c-breadcrumb__list-item",
5363
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
5364
- to: page.path,
5365
- className: "dc-c-breadcrumb__link",
5366
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5367
- children: page.title
5034
+
5035
+
5036
+
5037
+
5038
+
5039
+ const $3b2d31a9c6cd2284$var$LargeFileInfo = (props)=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5040
+ className: props.className,
5041
+ children: [
5042
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
5043
+ children: "Some datasets contain very large files and, depending on your network characteristics and software, may take a long time to download or fail to download. Additionally, the number of rows in the file may be larger than the maximum rows your version of Microsoft Excel supports. If you can't download the file, we recommend engaging your IT support staff. If you are able to download the file but are unable to open it in MS Excel or get a message that the data has been truncated, we recommend trying alternative programs such as MS Access, Universal Viewer, Editpad or any other software your organization has available for large datasets."
5044
+ }),
5045
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
5046
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
5047
+ to: "/about/software-specs-and-limits",
5048
+ children: "Click here to learn more about software specifications and limits."
5368
5049
  })
5369
5050
  })
5370
- }, page.path));
5371
- return /*#__PURE__*/ (0, $hgUW1$jsx)("nav", {
5372
- className: "dc-c-breadcrumb ds-u-margin-top--6",
5373
- "aria-label": "Breadcrumbs",
5374
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
5375
- className: "dc-c-breadcrumb__list",
5376
- children: [
5377
- pageTrailContent,
5378
- currentPage ? /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
5379
- className: "dc-c-breadcrumb__list-item dc-c-current",
5380
- "aria-current": "page",
5381
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5382
- children: currentPage
5383
- })
5384
- }) : ''
5385
- ]
5386
- })
5051
+ ]
5387
5052
  });
5388
- };
5389
- var $94983b21ff96a774$export$2e2bcd8739ae039 = $94983b21ff96a774$var$Breadcrumb;
5390
-
5053
+ var $3b2d31a9c6cd2284$export$2e2bcd8739ae039 = $3b2d31a9c6cd2284$var$LargeFileInfo;
5391
5054
 
5392
5055
 
5393
5056
 
5394
5057
 
5395
5058
 
5396
5059
 
5060
+ const $0a551147dc92a718$var$SearchButton = (props)=>{
5061
+ const { text: text, altMobileStyle: altMobileStyle } = props;
5062
+ const sm = (0, $hgUW1$useMediaQuery)({
5063
+ minWidth: 0,
5064
+ maxWidth: 768
5065
+ });
5066
+ return altMobileStyle && sm ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
5067
+ className: "ds-u-margin-left--auto ds-u-padding-x--0 ds-c-button--solid dc-c-search-button-mobile",
5068
+ size: "big",
5069
+ type: "submit",
5070
+ style: {
5071
+ width: '70px'
5072
+ },
5073
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5074
+ className: "fas fa-search small-text"
5075
+ })
5076
+ }) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
5077
+ type: "submit",
5078
+ variation: "solid",
5079
+ className: "ds-l-col--2",
5080
+ children: [
5081
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5082
+ className: "fas fa-search small-text ds-u-sm-display--none"
5083
+ }),
5084
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5085
+ className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
5086
+ children: [
5087
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5088
+ children: text ? text : 'Search'
5089
+ }),
5090
+ ` `,
5091
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5092
+ className: "fas fa-arrow-right"
5093
+ })
5094
+ ]
5095
+ })
5096
+ ]
5097
+ });
5098
+ };
5099
+ var $0a551147dc92a718$export$2e2bcd8739ae039 = $0a551147dc92a718$var$SearchButton;
5397
5100
 
5398
5101
 
5399
5102
 
5400
5103
 
5401
- const $94764de04eaf82f6$var$MagnifyingGlassIcon = (props)=>/*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
5402
- fill: "#000000",
5403
- width: "24px",
5404
- height: "24px",
5405
- viewBox: "0 0 250 250",
5406
- id: "Flat",
5407
- xmlns: "http://www.w3.org/2000/svg",
5408
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
5409
- d: "M232.47656,215.51563l-40.67773-40.67774a96.10791,96.10791,0,1,0-16.97168,16.96973l40.67871,40.67871a12.0001,12.0001,0,1,0,16.9707-16.9707ZM43.99707,116a72,72,0,1,1,72,72A72.08124,72.08124,0,0,1,43.99707,116Z"
5104
+ const $5723016a5461c1ca$var$PageHeader = (props)=>{
5105
+ const { headerText: headerText } = props;
5106
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5107
+ className: "ds-l-container",
5108
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5109
+ className: "ds-l-row",
5110
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5111
+ className: "ds-l-md-col--8",
5112
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
5113
+ className: "dc-c-entity__name ds-text-heading--3xl ds-u-margin-bottom--4",
5114
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5115
+ className: "ds-u-margin-right--2",
5116
+ "data-testid": "profile-full-name",
5117
+ children: headerText
5118
+ })
5119
+ })
5120
+ })
5410
5121
  })
5411
5122
  });
5412
- var $94764de04eaf82f6$export$2e2bcd8739ae039 = $94764de04eaf82f6$var$MagnifyingGlassIcon;
5123
+ };
5124
+ var $5723016a5461c1ca$export$2e2bcd8739ae039 = $5723016a5461c1ca$var$PageHeader;
5413
5125
 
5414
5126
 
5415
5127
 
5416
5128
 
5417
- const $10acbeaa4d8f6040$var$ChevronRightIcon = (props)=>/*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
5418
- xmlns: "http://www.w3.org/2000/svg",
5419
- width: 16,
5420
- height: 28,
5421
- fill: "currentColor",
5422
- className: "mi-solid mi-chevron-right",
5423
- viewBox: "10.125 3.25 9.5 19.5",
5424
- ...props,
5425
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
5426
- d: "M10.064 7.269a1.08 1.08 0 0 0 0 1.527L14.267 13l-4.203 4.203a1.079 1.079 0 1 0 1.527 1.527l4.973 -4.973a1.08 1.08 0 0 0 0 -1.527l-4.973 -4.973a1.087 1.087 0 0 0 -1.527 0.011"
5427
- })
5129
+
5130
+
5131
+ function $eff7d34c30f5a0fc$export$959638e8dca60ce6(facets) {
5132
+ let facetObj = {};
5133
+ if (facets) {
5134
+ facets.forEach((f)=>{
5135
+ if (facetObj[f.type]) facetObj[f.type] = [
5136
+ ...facetObj[f.type],
5137
+ f
5138
+ ];
5139
+ else facetObj[f.type] = [
5140
+ f
5141
+ ];
5142
+ });
5143
+ // sort facets descending by int value, put non int last
5144
+ if (facetObj.keyword) facetObj.keyword.sort((a, b)=>{
5145
+ if (Number(a.name) && Number(b.name)) return Number(b.name) - Number(a.name);
5146
+ });
5147
+ return facetObj;
5148
+ }
5149
+ }
5150
+ function $eff7d34c30f5a0fc$export$60ec7cc1d341a524(searchParams, defaultSortOptions) {
5151
+ const params = (0, $hgUW1$qs).parse(searchParams, {
5152
+ ignoreQueryPrefix: true
5428
5153
  });
5429
- var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRightIcon;
5154
+ let themes = params.theme;
5155
+ let keywords = params.keyword;
5156
+ return {
5157
+ page: params.page,
5158
+ sort: !params.sort ? defaultSortOptions.defaultSort : params.sort,
5159
+ sortOrder: !params.sortOrder ? defaultSortOptions.defaultOrder : params.sortOrder,
5160
+ fulltext: params.fulltext,
5161
+ selectedFacets: {
5162
+ theme: themes ? themes : [],
5163
+ keyword: keywords ? keywords : []
5164
+ }
5165
+ };
5166
+ }
5167
+ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA) {
5168
+ const { fulltext: fulltext, selectedFacets: selectedFacets, sort: sort, sortOrder: sortOrder, page: page, pageSize: pageSize } = options;
5169
+ let params = {
5170
+ fulltext: fulltext ? fulltext : undefined,
5171
+ ...selectedFacets,
5172
+ sort: sort ? sort : undefined,
5173
+ ['sort-order']: sortOrder ? sortOrder : undefined,
5174
+ page: page !== 1 ? page : undefined,
5175
+ ['page-size']: pageSize !== 10 ? pageSize : undefined
5176
+ };
5177
+ return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
5178
+ arrayFormat: 'comma',
5179
+ encode: true
5180
+ })}`);
5181
+ }
5430
5182
 
5431
5183
 
5432
5184
 
5433
- const $ad9981f5aa726046$var$SearchInput = ({ placeholder: placeholder = 'Search the Data', showMagnifyingGlass: showMagnifyingGlass, showSearchButton: showSearchButton, onDark: onDark, onChange: onChange, onSubmit: onSubmit, onKeyDown: onKeyDown, defaultValue: defaultValue = '' })=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5434
- className: "search-input-container",
5435
- children: [
5436
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
5437
- name: "search",
5438
- className: `${showMagnifyingGlass ? 'left-padding' : ''} ${showSearchButton ? 'right-padding' : ''}`,
5439
- label: placeholder,
5440
- labelClassName: "ds-u-visibility--screen-reader",
5441
- placeholder: placeholder,
5442
- onBlur: ()=>{},
5443
- onChange: onChange,
5444
- onKeyDown: onKeyDown,
5445
- defaultValue: defaultValue
5446
- }),
5447
- showMagnifyingGlass && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5448
- className: "magnifying-glass-icon ds-u-visibility--hidden ds-u-sm-visibility--visible",
5449
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $94764de04eaf82f6$export$2e2bcd8739ae039), {})
5450
- }),
5451
- showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
5452
- variation: "solid",
5453
- className: onDark ? 'on-dark' : undefined,
5454
- onClick: onSubmit,
5455
- children: [
5456
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5457
- className: "magnifying-glass-icon",
5458
- "aria-label": "Search the Data",
5459
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $94764de04eaf82f6$export$2e2bcd8739ae039), {})
5460
- }),
5461
- /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
5462
- className: "sm-label",
5463
- children: [
5464
- "Search the Data ",
5465
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $10acbeaa4d8f6040$export$2e2bcd8739ae039), {})
5466
- ]
5467
- })
5468
- ]
5469
- }),
5470
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5471
- className: "rounded-border"
5185
+
5186
+
5187
+ const $e873081a6e8f024e$var$sortOptions = [
5188
+ {
5189
+ label: 'Newest',
5190
+ value: 'newest'
5191
+ },
5192
+ {
5193
+ label: 'Oldest',
5194
+ value: 'oldest'
5195
+ },
5196
+ {
5197
+ label: 'Title A-Z',
5198
+ value: 'titleAZ'
5199
+ },
5200
+ {
5201
+ label: 'Title Z-A',
5202
+ value: 'titleZA'
5203
+ }
5204
+ ];
5205
+ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
5206
+ const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
5207
+ defaultSort: 'modified',
5208
+ defaultOrder: 'desc'
5209
+ }, pageTitle: pageTitle = 'Dataset Explorer', categoriesTitle: categoriesTitle = 'Categories', filterTitle: filterTitle = 'Tags', showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = '', showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false, showDateDetails: showDateDetails = false, updateDateMonthYearOnly: updateDateMonthYearOnly = false, showTopics: showTopics = false, topicSlugFunction: topicSlugFunction, analytics: analytics = false, onAnalyticsEvent: onAnalyticsEvent = ()=>{}, children: children } = props;
5210
+ const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
5211
+ const [searchParams] = (0, $hgUW1$useSearchParams)();
5212
+ const navigate = (0, $hgUW1$useNavigate)();
5213
+ const location = (0, $hgUW1$useLocation)();
5214
+ // Derive all search state from URL params
5215
+ const selectedFacets = (0, $hgUW1$useMemo)(()=>{
5216
+ const parsed = (0, $hgUW1$qs).parse(searchParams.toString());
5217
+ const toArray = (val)=>{
5218
+ if (Array.isArray(val)) return val.filter((v)=>typeof v === 'string');
5219
+ if (typeof val === 'string') return [
5220
+ val
5221
+ ];
5222
+ return [];
5223
+ };
5224
+ return {
5225
+ theme: toArray(parsed.theme),
5226
+ keyword: toArray(parsed.keyword)
5227
+ };
5228
+ }, [
5229
+ searchParams
5230
+ ]);
5231
+ const page = Number(searchParams.get('page')) || 1;
5232
+ const sort = searchParams.get('sort') || defaultSort.defaultSort;
5233
+ const sortOrder = searchParams.get('sortOrder') || defaultSort.defaultOrder;
5234
+ const fulltext = searchParams.get('fulltext') || '';
5235
+ const sortDisplay = sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
5236
+ // Local UI state only
5237
+ const [filterText, setFilterText] = (0, $hgUW1$useState)(fulltext);
5238
+ // Sync filterText from URL on back/forward
5239
+ (0, $hgUW1$useEffect)(()=>{
5240
+ setFilterText(fulltext);
5241
+ }, [
5242
+ fulltext
5243
+ ]);
5244
+ function buildNextQueryString(overrides) {
5245
+ const current = (0, $hgUW1$qs).parse(searchParams.toString());
5246
+ const merged = {
5247
+ ...current
5248
+ };
5249
+ Object.entries(overrides).forEach(([key, value])=>{
5250
+ if (value === null) delete merged[key];
5251
+ else merged[key] = value;
5252
+ });
5253
+ return (0, $hgUW1$qs).stringify(merged, {
5254
+ arrayFormat: 'indices',
5255
+ encode: true
5256
+ });
5257
+ }
5258
+ function updateSelectedFacets(key, value) {
5259
+ const current = selectedFacets[key] || [];
5260
+ const idx = current.indexOf(value);
5261
+ const updated = idx > -1 ? current.filter((_, i)=>i !== idx) : [
5262
+ ...current,
5263
+ value
5264
+ ];
5265
+ navigate({
5266
+ search: buildNextQueryString({
5267
+ [key]: updated.length ? updated : null,
5268
+ page: null
5472
5269
  })
5473
- ]
5474
- });
5475
- var $ad9981f5aa726046$export$2e2bcd8739ae039 = $ad9981f5aa726046$var$SearchInput;
5476
-
5477
-
5478
-
5479
-
5480
-
5481
-
5482
- function $5644ebd2c3dbfd7b$export$eea3a12df15499ca(metadataMapping, datasetInfo) {
5483
- const rows = [];
5484
- Object.keys(metadataMapping).forEach((d)=>{
5485
- if (!datasetInfo[d]) return null;
5486
- else rows.push(...metadataMapping[d](datasetInfo[d]));
5270
+ });
5271
+ }
5272
+ const setSortOptionsHandler = (value)=>{
5273
+ let nextSort;
5274
+ let nextSortOrder;
5275
+ switch(value){
5276
+ case 'newest':
5277
+ nextSort = 'modified';
5278
+ nextSortOrder = 'desc';
5279
+ break;
5280
+ case 'oldest':
5281
+ nextSort = 'modified';
5282
+ nextSortOrder = 'asc';
5283
+ break;
5284
+ case 'titleAZ':
5285
+ nextSort = 'title';
5286
+ nextSortOrder = 'asc';
5287
+ break;
5288
+ case 'titleZA':
5289
+ nextSort = 'title';
5290
+ nextSortOrder = 'desc';
5291
+ break;
5292
+ default:
5293
+ return;
5294
+ }
5295
+ const overrides = {
5296
+ sort: nextSort === defaultSort.defaultSort ? null : nextSort,
5297
+ sortOrder: nextSortOrder === defaultSort.defaultOrder ? null : nextSortOrder
5298
+ };
5299
+ navigate({
5300
+ search: buildNextQueryString(overrides)
5301
+ });
5302
+ };
5303
+ function resetFilters() {
5304
+ setFilterText('');
5305
+ navigate({
5306
+ search: ''
5307
+ });
5308
+ }
5309
+ const pageSize = defaultPageSize;
5310
+ const params = {
5311
+ fulltext: fulltext ? fulltext : undefined,
5312
+ ...selectedFacets,
5313
+ sort: sort ? sort : undefined,
5314
+ ['sort-order']: sortOrder ? sortOrder : undefined,
5315
+ page: page !== 1 ? page : undefined,
5316
+ ['page-size']: pageSize !== 10 ? pageSize : undefined
5317
+ };
5318
+ const { data: data, isPending: isPending } = (0, $hgUW1$useQuery)({
5319
+ queryKey: [
5320
+ "datasets",
5321
+ params
5322
+ ],
5323
+ queryFn: ()=>{
5324
+ return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
5325
+ arrayFormat: 'comma',
5326
+ encode: true
5327
+ })}`);
5328
+ }
5487
5329
  });
5488
- return rows;
5489
- }
5490
- const $5644ebd2c3dbfd7b$var$DatasetAdditionalInformation = ({ datasetInfo: datasetInfo, id: id, metadataMapping: metadataMapping })=>{
5491
- const rows = $5644ebd2c3dbfd7b$export$eea3a12df15499ca(metadataMapping, datasetInfo);
5492
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5493
- className: "dc-c-additional-info-table ds-u-margin-bottom--6",
5330
+ const totalItems = data?.data?.total ? Number(data.data.total) : 0;
5331
+ const facets = data && data.data.facets ? (0, $eff7d34c30f5a0fc$export$959638e8dca60ce6)(data.data.facets) : {
5332
+ theme: null,
5333
+ keyword: null
5334
+ };
5335
+ const currentResultNumbers = (0, $hgUW1$useMemo)(()=>{
5336
+ const baseNumber = totalItems > 0 ? 1 : 0;
5337
+ const startingNumber = baseNumber + (pageSize * page - pageSize);
5338
+ const endingNumber = pageSize * page;
5339
+ return {
5340
+ total: totalItems,
5341
+ startingNumber: totalItems >= startingNumber ? startingNumber : 0,
5342
+ endingNumber: totalItems < endingNumber ? totalItems : endingNumber
5343
+ };
5344
+ }, [
5345
+ totalItems,
5346
+ pageSize,
5347
+ page
5348
+ ]);
5349
+ const noResults = totalItems <= 0 && !isPending && data?.data?.results !== undefined;
5350
+ const announcementText = (0, $hgUW1$useMemo)(()=>{
5351
+ if (noResults) return 'No results found.';
5352
+ if (!isPending && (!data || !data.data.results)) return 'Could not connect to the API.';
5353
+ return `Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`;
5354
+ }, [
5355
+ data,
5356
+ isPending,
5357
+ noResults,
5358
+ currentResultNumbers
5359
+ ]);
5360
+ (0, $hgUW1$useEffect)(()=>{
5361
+ if (analytics && location.search) onAnalyticsEvent(location);
5362
+ }, [
5363
+ analytics,
5364
+ location.search
5365
+ ]);
5366
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
5494
5367
  children: [
5495
- /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
5496
- className: "ds-text-heading--2xl ds-u-margin-y--3",
5497
- children: "Additional Information"
5368
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5723016a5461c1ca$export$2e2bcd8739ae039), {
5369
+ headerText: pageTitle
5498
5370
  }),
5499
- /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
5500
- compact: true,
5501
- striped: true,
5371
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("section", {
5372
+ className: "ds-l-container",
5502
5373
  children: [
5503
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
5504
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
5374
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5375
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
5376
+ className: "ds-u-visibility--screen-reader",
5377
+ "aria-live": "assertive",
5378
+ "aria-atomic": "true",
5379
+ "data-testid": "currentResults",
5380
+ children: announcementText
5381
+ })
5382
+ }),
5383
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5384
+ className: "ds-l-row",
5385
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5386
+ className: "ds-l-col--12",
5505
5387
  children: [
5506
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
5507
- children: "Field"
5388
+ children,
5389
+ introText ? introText : null,
5390
+ showLargeFileWarning && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5391
+ className: "ds-l-row ds-u-margin-bottom--2 ds-u-margin-top--4",
5392
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5393
+ className: "ds-l-md-col--12",
5394
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
5395
+ bordered: true,
5396
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
5397
+ contentClassName: "downloading-datasets",
5398
+ heading: "Please read before downloading datasets",
5399
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b2d31a9c6cd2284$export$2e2bcd8739ae039), {})
5400
+ })
5401
+ })
5402
+ })
5508
5403
  }),
5509
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
5510
- children: "Value"
5404
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("form", {
5405
+ onSubmit: (e)=>{
5406
+ e.preventDefault();
5407
+ if (filterText) navigate({
5408
+ search: buildNextQueryString({
5409
+ fulltext: filterText,
5410
+ page: null
5411
+ })
5412
+ });
5413
+ else navigate({
5414
+ search: buildNextQueryString({
5415
+ fulltext: null,
5416
+ page: null
5417
+ })
5418
+ });
5419
+ },
5420
+ className: "dkan-dataset-search ds-l-form-row ds-u-padding-bottom--4 ds-u-border-bottom--1",
5421
+ children: [
5422
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5423
+ className: "ds-c-field__before fas fa-search ds-u-display--none ds-u-sm-display--inline-block"
5424
+ }),
5425
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
5426
+ fieldClassName: "ds-u-margin--0",
5427
+ value: filterText,
5428
+ className: `ds-u-padding-right--2 ${altMobileSearchButton ? 'ds-l-col--12 ds-l-md-col--10 --alt-style' : 'ds-l-col--10'}`,
5429
+ label: "Search datasets",
5430
+ labelClassName: "ds-u-visibility--screen-reader",
5431
+ placeholder: "Search datasets",
5432
+ name: "dataset_fulltext_search",
5433
+ onChange: (e)=>{
5434
+ setFilterText(e.target.value);
5435
+ }
5436
+ }),
5437
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $0a551147dc92a718$export$2e2bcd8739ae039), {
5438
+ altMobileStyle: altMobileSearchButton
5439
+ })
5440
+ ]
5511
5441
  })
5512
5442
  ]
5513
5443
  })
5514
5444
  }),
5515
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableBody), {
5516
- children: rows.map((r)=>/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
5445
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5446
+ className: "ds-l-row ds-u-padding-top--4",
5447
+ children: [
5448
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5449
+ className: "ds-l-col--12 ds-l-sm-col--4",
5517
5450
  children: [
5518
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
5519
- children: r.label
5451
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
5452
+ className: "dc-dataset-search--clear-all-filters ds-u-margin-bottom--2",
5453
+ onClick: ()=>resetFilters(),
5454
+ children: "Clear all filters"
5520
5455
  }),
5521
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
5522
- className: "ds-u-word-break-anywhere",
5523
- children: r.value
5456
+ facets.theme && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e011250e8a3bd5e5$export$2e2bcd8739ae039), {
5457
+ facets: facets.theme,
5458
+ title: categoriesTitle,
5459
+ onClickFunction: updateSelectedFacets,
5460
+ selectedFacets: selectedFacets.theme
5461
+ }),
5462
+ facets.keyword && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e011250e8a3bd5e5$export$2e2bcd8739ae039), {
5463
+ facets: facets.keyword,
5464
+ title: filterTitle,
5465
+ onClickFunction: updateSelectedFacets,
5466
+ selectedFacets: selectedFacets.keyword
5524
5467
  })
5525
5468
  ]
5526
- }, `${r.label}_${id}`))
5469
+ }),
5470
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5471
+ className: "ds-l-col--12 ds-l-sm-col--8",
5472
+ children: isPending ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
5473
+ className: "ds-u-valign--middle",
5474
+ "aria-valuetext": "Dataset Search loading",
5475
+ role: "status"
5476
+ }) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
5477
+ children: [
5478
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5479
+ 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",
5480
+ children: [
5481
+ enablePagination && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5482
+ className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--8 ds-u-sm-padding-left--0",
5483
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
5484
+ className: "ds-u-margin-y--0",
5485
+ children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
5486
+ children: [
5487
+ "Showing ",
5488
+ currentResultNumbers.startingNumber,
5489
+ " -",
5490
+ ' ',
5491
+ currentResultNumbers.endingNumber,
5492
+ " of ",
5493
+ data.data.total,
5494
+ " datasets"
5495
+ ]
5496
+ })
5497
+ })
5498
+ }),
5499
+ enableSort && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5500
+ className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4 ds-u-sm-padding-right--0",
5501
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
5502
+ options: $e873081a6e8f024e$var$sortOptions,
5503
+ value: sortDisplay,
5504
+ label: "Sort",
5505
+ labelClassName: "ds-u-margin-top--0",
5506
+ name: "dataset_search_sort",
5507
+ onChange: (e)=>setSortOptionsHandler(e.target.value)
5508
+ })
5509
+ })
5510
+ ]
5511
+ }),
5512
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
5513
+ className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0 ds-u-margin-bottom--4 ds-u-display--block",
5514
+ "data-testid": "results-list",
5515
+ children: [
5516
+ noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
5517
+ variation: "error",
5518
+ role: "region",
5519
+ heading: "No results found."
5520
+ }),
5521
+ data && data.data.results ? Object.values(data.data.results).map((item)=>{
5522
+ const downloadUrl = (()=>{
5523
+ const distribution_array = item.distribution ?? [];
5524
+ return distribution_array.length ? distribution_array[0].downloadURL : null;
5525
+ })();
5526
+ const showLargeFile = largeFileThemes && item.theme ? largeFileThemes.some((theme)=>item.theme.includes(theme)) : false;
5527
+ const dateDetailProps = showDateDetails ? {
5528
+ showDateDetails: showDateDetails,
5529
+ released: item.released,
5530
+ refresh: item.nextUpdateDate
5531
+ } : {};
5532
+ const topicProps = (()=>{
5533
+ if (!showTopics) return {};
5534
+ const topicSlugs = {};
5535
+ if (item.theme && Array.isArray(item.theme)) item.theme.forEach((topic)=>{
5536
+ if (topic) {
5537
+ const slug = topicSlugFunction ? topicSlugFunction(topic) : topic.split(' ').join('-').toLowerCase();
5538
+ if (slug) topicSlugs[topic] = slug;
5539
+ }
5540
+ });
5541
+ return {
5542
+ showTopics: showTopics,
5543
+ theme: item.theme,
5544
+ topicSlugs: topicSlugs
5545
+ };
5546
+ })();
5547
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $52c6454cae137465$export$2e2bcd8739ae039), {
5548
+ title: item.title,
5549
+ modified: item.modified,
5550
+ description: item.description,
5551
+ identifier: item.identifier,
5552
+ downloadUrl: showDownloadIcon ? downloadUrl : null,
5553
+ largeFile: showLargeFile,
5554
+ paginationEnabled: enablePagination,
5555
+ dataDictionaryLinks: dataDictionaryLinks,
5556
+ distribution: "%Ref:distribution" in item && item["%Ref:distribution"] ? item["%Ref:distribution"][0] : {},
5557
+ updateDateMonthYearOnly: updateDateMonthYearOnly,
5558
+ ...dateDetailProps,
5559
+ ...topicProps
5560
+ }, item.identifier);
5561
+ }) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
5562
+ variation: "error",
5563
+ role: "region",
5564
+ heading: "Could not connect to the API."
5565
+ })
5566
+ ]
5567
+ }),
5568
+ enablePagination && data && data.data.total && Number(data.data.total) !== 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
5569
+ currentPage: Number(page),
5570
+ totalPages: Math.ceil(Number(data.data.total) / pageSize),
5571
+ onPageChange: (evt, page)=>{
5572
+ evt.preventDefault();
5573
+ window.scroll(0, 0);
5574
+ navigate({
5575
+ search: buildNextQueryString({
5576
+ page: page > 1 ? String(page) : null
5577
+ })
5578
+ });
5579
+ },
5580
+ renderHref: (p)=>{
5581
+ const nextQs = buildNextQueryString({
5582
+ page: p > 1 ? String(p) : null
5583
+ });
5584
+ return `/datasets?${nextQs}`;
5585
+ }
5586
+ })
5587
+ ]
5588
+ })
5589
+ })
5590
+ ]
5527
5591
  })
5528
5592
  ]
5529
5593
  })
5530
5594
  ]
5531
5595
  });
5532
5596
  };
5533
- var $5644ebd2c3dbfd7b$export$2e2bcd8739ae039 = $5644ebd2c3dbfd7b$var$DatasetAdditionalInformation;
5534
-
5535
-
5536
-
5537
-
5538
-
5539
-
5540
-
5541
-
5542
-
5543
-
5544
-
5545
-
5546
-
5547
-
5548
-
5549
- const $6fd40f23575fa7f0$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: rootUrl, showRowLimitNotice: showRowLimitNotice = false, swaggerButtonClassNames: swaggerButtonClassNames = {} })=>{
5550
- let params = {
5551
- authentication: hideAuth ? false : undefined
5552
- };
5553
- const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
5554
- return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
5555
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
5556
- className: "ds-l-container ds-u-padding--0 ds-u-margin-top--5",
5557
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
5558
- url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
5559
- addQueryPrefix: true
5560
- })}`,
5561
- docExpansion: 'list',
5562
- defaultModelsExpandDepth: -1,
5563
- plugins: [
5564
- (0, $5b656f0283afa250$export$2e2bcd8739ae039),
5565
- (0, $ffd9c403a1c2fc39$export$2e2bcd8739ae039),
5566
- (0, $30bfb3d671300bcd$export$2e2bcd8739ae039)({
5567
- showRowLimitNotice: showRowLimitNotice,
5568
- buttonClassNames: swaggerButtonClassNames
5569
- })
5570
- ]
5571
- })
5572
- })
5573
- });
5574
- };
5575
- var $6fd40f23575fa7f0$export$2e2bcd8739ae039 = $6fd40f23575fa7f0$var$APIPage;
5576
-
5577
-
5578
-
5579
-
5580
-
5581
-
5582
- const $026cb986f9fea2b1$var$PageNotFound = ({ siteUrl: siteUrl, content: content })=>{
5583
- return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
5584
- className: "ds-l-container ds-u-padding-top--3",
5585
- children: content ? content : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
5586
- children: [
5587
- /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
5588
- className: "ds-text-heading--4xl",
5589
- children: "Error: Page not found"
5590
- }),
5591
- /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
5592
- children: [
5593
- "We're sorry, but there is no ",
5594
- siteUrl,
5595
- " web page that matches your entry. You may have been directed here because:"
5596
- ]
5597
- }),
5598
- /*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
5599
- children: [
5600
- /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
5601
- children: "The address you typed contains a typo;"
5602
- }),
5603
- /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
5604
- children: "The requested page may have expired or;"
5605
- }),
5606
- /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
5607
- children: "The requested page may have been moved."
5608
- })
5609
- ]
5610
- }),
5611
- /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
5612
- children: [
5613
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5614
- className: "ds-u-font-weight--bold",
5615
- children: "Note:"
5616
- }),
5617
- " If you were using a bookmark, please reset it once you find the correct page."
5618
- ]
5619
- })
5620
- ]
5621
- })
5622
- });
5623
- };
5624
- var $026cb986f9fea2b1$export$2e2bcd8739ae039 = $026cb986f9fea2b1$var$PageNotFound;
5625
-
5626
-
5627
-
5597
+ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039)($e873081a6e8f024e$var$DatasetSearch);
5628
5598
 
5629
5599
 
5630
5600
 
@@ -5732,7 +5702,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
5732
5702
  queryFn: ()=>{
5733
5703
  return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
5734
5704
  arrayFormat: 'comma',
5735
- encode: false
5705
+ encode: true
5736
5706
  })}`);
5737
5707
  }
5738
5708
  });
@@ -6776,7 +6746,6 @@ const $1253cd791a90b9cc$var$DataDictionaryTable = ({ tableColumns: tableColumns,
6776
6746
  sortElement: sortElement,
6777
6747
  id: 'dataDictionary_' + header.id
6778
6748
  }, header.id + "_resize") : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
6779
- key: header.id,
6780
6749
  className: `ds-u-border-y--2 ds-u-border--dark ds-u-border-x--0`,
6781
6750
  id: 'dataDictionary_' + header.id,
6782
6751
  children: [
@@ -6787,7 +6756,7 @@ const $1253cd791a90b9cc$var$DataDictionaryTable = ({ tableColumns: tableColumns,
6787
6756
  "aria-label": `${header.column.columnDef.header} sort order`
6788
6757
  })
6789
6758
  ]
6790
- });
6759
+ }, header.id);
6791
6760
  })
6792
6761
  }, "header" + headerGroup.id))
6793
6762
  }),
@@ -6796,7 +6765,6 @@ const $1253cd791a90b9cc$var$DataDictionaryTable = ({ tableColumns: tableColumns,
6796
6765
  return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableRow), {
6797
6766
  children: row.getVisibleCells().map((cell)=>{
6798
6767
  return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
6799
- key: cell.id,
6800
6768
  style: {
6801
6769
  maxWidth: mobile ? '100%' : cell.column.getSize(),
6802
6770
  whiteSpace: cell.column.id === "description" ? 'pre-wrap' : 'normal'
@@ -6805,7 +6773,7 @@ const $1253cd791a90b9cc$var$DataDictionaryTable = ({ tableColumns: tableColumns,
6805
6773
  headers: 'dataDictionary_' + cell.column.id,
6806
6774
  stackedTitle: cell.column.id === 'titleResizable' ? 'Title' : cell.column.columnDef.header,
6807
6775
  children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
6808
- });
6776
+ }, cell.id);
6809
6777
  })
6810
6778
  }, index + JSON.stringify(row));
6811
6779
  })
@@ -7449,7 +7417,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
7449
7417
  }) : /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
7450
7418
  children: "There is no Data Table associated with this dataset. Data Tables will only display for CSV files."
7451
7419
  })
7452
- }),
7420
+ }, id + '-data-table'),
7453
7421
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
7454
7422
  id: 'overview',
7455
7423
  tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
@@ -7471,7 +7439,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
7471
7439
  rootUrl: rootUrl,
7472
7440
  showTags: showTagsOnOverview
7473
7441
  })
7474
- }),
7442
+ }, id + '-overview'),
7475
7443
  !hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
7476
7444
  id: 'data-dictionary',
7477
7445
  tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
@@ -7494,7 +7462,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
7494
7462
  }) : /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
7495
7463
  children: "There is no Data Dictionary associated with this dataset."
7496
7464
  })
7497
- }),
7465
+ }, id + '-data-dictionary'),
7498
7466
  distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
7499
7467
  id: 'api',
7500
7468
  tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
@@ -7515,7 +7483,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
7515
7483
  showRowLimitNotice: showRowLimitNotice,
7516
7484
  swaggerButtonClassNames: swaggerButtonClassNames
7517
7485
  })
7518
- })
7486
+ }, id + '-api')
7519
7487
  ]
7520
7488
  })
7521
7489
  })