@civicactions/cmsds-open-data-components 3.10.0 → 3.11.0-alpha.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,6 +1,6 @@
1
1
  import "./main.css";
2
2
  import {jsx as $hgUW1$jsx, jsxs as $hgUW1$jsxs, Fragment as $hgUW1$Fragment} from "react/jsx-runtime";
3
- import {Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, Button as $hgUW1$Button, CloseIconThin as $hgUW1$CloseIconThin, ArrowIcon as $hgUW1$ArrowIcon, Spinner as $hgUW1$Spinner, Alert as $hgUW1$Alert, Dialog as $hgUW1$Dialog, TextField as $hgUW1$TextField, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon, Choice as $hgUW1$Choice, Dropdown as $hgUW1$Dropdown, Pagination as $hgUW1$Pagination, Badge as $hgUW1$Badge, Table as $hgUW1$Table, TableHead as $hgUW1$TableHead, TableRow as $hgUW1$TableRow, TableCell as $hgUW1$TableCell, TableBody as $hgUW1$TableBody, Tabs as $hgUW1$Tabs, TabPanel as $hgUW1$TabPanel} from "@cmsgov/design-system";
3
+ import {Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, Button as $hgUW1$Button, CloseIconThin as $hgUW1$CloseIconThin, ArrowIcon as $hgUW1$ArrowIcon, Spinner as $hgUW1$Spinner, Alert as $hgUW1$Alert, Dialog as $hgUW1$Dialog, TextField as $hgUW1$TextField, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon, Choice as $hgUW1$Choice, Dropdown as $hgUW1$Dropdown, Pagination as $hgUW1$Pagination, 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, Badge as $hgUW1$Badge} from "@cmsgov/design-system";
4
4
  import $hgUW1$react, {createContext as $hgUW1$createContext, useState as $hgUW1$useState, useRef as $hgUW1$useRef, useEffect as $hgUW1$useEffect, useContext as $hgUW1$useContext, useMemo as $hgUW1$useMemo, useCallback as $hgUW1$useCallback} from "react";
5
5
  import {NavLink as $hgUW1$NavLink, Link as $hgUW1$Link, useNavigate as $hgUW1$useNavigate, useLocation as $hgUW1$useLocation, useSearchParams as $hgUW1$useSearchParams} from "react-router-dom";
6
6
  import $hgUW1$qs from "qs";
@@ -41,7 +41,7 @@ function $e49d4387bed21287$export$2e2bcd8739ae039() {
41
41
  /*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
42
42
  children: "offset"
43
43
  }),
44
- " ",
44
+ ' ',
45
45
  "parameters to iterate through result sets that are larger than the row limit when running queries against the datastore API."
46
46
  ]
47
47
  })
@@ -72,7 +72,7 @@ var $3c72c298c3a7f21f$export$2e2bcd8739ae039 = $3c72c298c3a7f21f$var$HeaderTagli
72
72
  const $1555e1cb3eb7b3e3$var$HeaderNavIconLink = (props)=>{
73
73
  const { url: url, urlTitle: urlTitle, logoFilePath: logoFilePath, logoAltText: logoAltText, backArrow: backArrow } = props;
74
74
  return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
75
- className: `dkan-c-header-nav-icon-link ${backArrow ? "show-back-arrow" : ""} ds-u-valign--middle `,
75
+ className: `dkan-c-header-nav-icon-link ${backArrow ? 'show-back-arrow' : ''} ds-u-valign--middle `,
76
76
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
77
77
  href: url,
78
78
  title: urlTitle,
@@ -232,7 +232,7 @@ const $046ded0064bd0a3d$var$FAQAccordion = (props)=>{
232
232
  type: "button",
233
233
  variation: "ghost",
234
234
  onClick: ()=>toggleAll(),
235
- children: `${expanded ? "Collapse" : "Expand"} all FAQs`
235
+ children: `${expanded ? 'Collapse' : 'Expand'} all FAQs`
236
236
  }),
237
237
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
238
238
  children: faqItems.map((faq)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
@@ -333,8 +333,8 @@ const $844981eac9b63865$export$eccc29c8d0ff408 = (0, $hgUW1$createContext)({
333
333
 
334
334
 
335
335
  const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 4, defaultSort: defaultSort = {
336
- defaultSort: "modified",
337
- defaultOrder: "desc"
336
+ defaultSort: 'modified',
337
+ defaultOrder: 'desc'
338
338
  }, subLinkClasses: subLinkClasses })=>{
339
339
  const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
340
340
  const [currentResultNumbers, setCurrentResultNumbers] = (0, $hgUW1$useState)({
@@ -354,8 +354,8 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
354
354
  ]);
355
355
  let params = {
356
356
  sort: defaultSort.defaultSort,
357
- ["sort-order"]: defaultSort.defaultOrder,
358
- ["page-size"]: defaultPageSize
357
+ ['sort-order']: defaultSort.defaultOrder,
358
+ ['page-size']: defaultPageSize
359
359
  };
360
360
  const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
361
361
  queryKey: [
@@ -364,7 +364,7 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
364
364
  ],
365
365
  queryFn: ()=>{
366
366
  return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
367
- arrayFormat: "comma",
367
+ arrayFormat: 'comma',
368
368
  encode: false
369
369
  })}`);
370
370
  }
@@ -507,11 +507,11 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
507
507
  function handleFocusOut(event) {
508
508
  if (currentMenu && !currentMenu.contains(event.relatedTarget)) setIsExpanded(false);
509
509
  }
510
- document.addEventListener("mousedown", handleClickOutside);
511
- currentMenu?.addEventListener("focusout", handleFocusOut);
510
+ document.addEventListener('mousedown', handleClickOutside);
511
+ currentMenu?.addEventListener('focusout', handleFocusOut);
512
512
  return ()=>{
513
- document.removeEventListener("mousedown", handleClickOutside);
514
- if (currentMenu) currentMenu.removeEventListener("focusout", handleFocusOut);
513
+ document.removeEventListener('mousedown', handleClickOutside);
514
+ if (currentMenu) currentMenu.removeEventListener('focusout', handleFocusOut);
515
515
  };
516
516
  }, [
517
517
  isExpanded
@@ -533,7 +533,7 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
533
533
  }
534
534
  }
535
535
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
536
- className: `dkan-c-nav-submenu has-submenu${isExpanded ? " open" : ""}`,
536
+ className: `dkan-c-nav-submenu has-submenu${isExpanded ? ' open' : ''}`,
537
537
  ref: menu,
538
538
  children: [
539
539
  /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
@@ -569,12 +569,12 @@ var $4f153ca537d853e5$export$2e2bcd8739ae039 = $4f153ca537d853e5$var$SubMenu;
569
569
  const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
570
570
  const { headingText: headingText = "Dataset Search" } = props;
571
571
  const navigate = (0, $hgUW1$useNavigate)();
572
- const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)("");
572
+ const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)('');
573
573
  const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
574
574
  function searchForDataset(e) {
575
575
  e.preventDefault();
576
576
  if (window) {
577
- if (window.location.pathname !== "/datasets") navigate(`/datasets?fulltext=${modalSearchTerm}`);
577
+ if (window.location.pathname !== '/datasets') navigate(`/datasets?fulltext=${modalSearchTerm}`);
578
578
  else {
579
579
  window.location.search = `fulltext=${modalSearchTerm}`;
580
580
  setModalSearch(false);
@@ -642,9 +642,9 @@ const $b939b31651e82908$var$HeaderNav = (props)=>{
642
642
  const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
643
643
  const { links: links, topNavLinks: topNavLinks, wrapperClasses: wrapperClasses, searchInMobile: searchInMobile } = props;
644
644
  const navMenuOpenClass = `dkan-c-nav-menu--${headerContext.mobileMenuOpen ? "open" : "close"}`;
645
- const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ? "mobile" : "desktop"}`;
646
- const linkClasses = "dkan-c-header--link ds-c-button ds-c-button--ghost";
647
- const listClasses = "dkan-c-header--link-list ";
645
+ const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ? 'mobile' : 'desktop'}`;
646
+ const linkClasses = 'dkan-c-header--link ds-c-button ds-c-button--ghost';
647
+ const listClasses = 'dkan-c-header--link-list ';
648
648
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
649
649
  className: `dkan-c-nav-menu ${wrapperClasses} ${navMenuOpenClass} ${isMobileClass}`,
650
650
  ref: headerContext.menuRef,
@@ -814,8 +814,8 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
814
814
  const { title: title, links: links, mobileMax: mobileMax } = props;
815
815
  const active = (0, $hgUW1$useLocation)().pathname;
816
816
  const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
817
- const styleClasses = "dkan-c--sidebar-nav-wrapper ds-u-border--1 ds-u-border--color-gray-lightest ds-u-padding--2";
818
- const mobileClass = `dkan-c-sidebar-nav--${mobileMax ? "mobile" : "desktop"}`;
817
+ const styleClasses = 'dkan-c--sidebar-nav-wrapper ds-u-border--1 ds-u-border--color-gray-lightest ds-u-padding--2';
818
+ const mobileClass = `dkan-c-sidebar-nav--${mobileMax ? 'mobile' : 'desktop'}`;
819
819
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
820
820
  className: `dkan-c-sidebar-nav ${mobileClass}`,
821
821
  children: [
@@ -829,7 +829,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
829
829
  /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
830
830
  "aria-haspopup": "true",
831
831
  variation: "ghost",
832
- "aria-expanded": `${menuOpen ? "true" : "false"}`,
832
+ "aria-expanded": `${menuOpen ? 'true' : 'false'}`,
833
833
  onDark: true,
834
834
  onClick: ()=>setMenuOpen(!menuOpen),
835
835
  children: [
@@ -838,7 +838,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
838
838
  children: "Toggle menu"
839
839
  }),
840
840
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
841
- direction: menuOpen ? "up" : "down"
841
+ direction: menuOpen ? 'up' : 'down'
842
842
  })
843
843
  ]
844
844
  })
@@ -847,7 +847,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
847
847
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
848
848
  className: ``,
849
849
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
850
- className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ? "open" : "close"}`,
850
+ className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ? 'open' : 'close'}`,
851
851
  children: [
852
852
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
853
853
  className: "ds-u-padding--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest",
@@ -859,7 +859,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
859
859
  /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
860
860
  className: "ds-u-padding-bottom--2",
861
861
  children: links.map(({ url: url, label: label })=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
862
- className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ? "active" : ""}`,
862
+ className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ? 'active' : ''}`,
863
863
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
864
864
  className: "ds-u-display--flex ds-u-padding-y--1",
865
865
  children: [
@@ -894,12 +894,12 @@ const $b0968edc60d7d3a4$var$SidebarPage = (props)=>{
894
894
  query: `(max-width: ${mobileMaxWidth}px)`
895
895
  });
896
896
  return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
897
- className: `${mobileMax ? "a" : "ds-l-container"}`,
897
+ className: `${mobileMax ? "a" : 'ds-l-container'}`,
898
898
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
899
- className: `${mobileMax ? "a" : "ds-l-row"}`,
899
+ className: `${mobileMax ? "a" : 'ds-l-row'}`,
900
900
  children: [
901
901
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
902
- className: `${mobileMax ? "a" : "ds-l-col--4"}`,
902
+ className: `${mobileMax ? 'a' : "ds-l-col--4"}`,
903
903
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $953b286f7778640e$export$2e2bcd8739ae039), {
904
904
  links: links,
905
905
  title: menuTitle,
@@ -922,9 +922,9 @@ var $b0968edc60d7d3a4$export$2e2bcd8739ae039 = $b0968edc60d7d3a4$var$SidebarPage
922
922
 
923
923
 
924
924
 
925
- const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl = "datasets", searchKey: searchKey = "fulltext", textfieldLabel: textfieldLabel = "Search for a dataset", searchButtonText: searchButtonText = "Search" })=>{
925
+ const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl = 'datasets', searchKey: searchKey = 'fulltext', textfieldLabel: textfieldLabel = 'Search for a dataset', searchButtonText: searchButtonText = 'Search' })=>{
926
926
  const navigate = (0, $hgUW1$useNavigate)();
927
- const [searchValue, setSearchValue] = (0, $hgUW1$react).useState("");
927
+ const [searchValue, setSearchValue] = (0, $hgUW1$react).useState('');
928
928
  function submitHero(e) {
929
929
  e.preventDefault();
930
930
  navigate(`/${searchUrl}?${searchKey}=${searchValue}`);
@@ -951,24 +951,24 @@ const $59a079354baa335c$var$Hero = ({ title: title, description: description, se
951
951
  onSubmit: (e)=>submitHero(e),
952
952
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
953
953
  style: {
954
- position: "relative"
954
+ position: 'relative'
955
955
  },
956
956
  className: "ds-l-row ds-u-align-items--stretch ds-u-margin-y--4 ds-u-flex-wrap--nowrap",
957
957
  children: [
958
958
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
959
959
  className: "ds-u-padding--0 ds-u-margin-right--1",
960
960
  style: {
961
- flex: "1 1 100%",
962
- maxWidth: "100%"
961
+ flex: '1 1 100%',
962
+ maxWidth: '100%'
963
963
  },
964
964
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
965
965
  label: textfieldLabel,
966
966
  labelClassName: "ds-u-visibility--screen-reader",
967
967
  name: "search_text_input",
968
968
  style: {
969
- maxWidth: "none",
970
- height: "61px",
971
- margin: "0 20px 0 0"
969
+ maxWidth: 'none',
970
+ height: '61px',
971
+ margin: '0 20px 0 0'
972
972
  },
973
973
  onChange: (e)=>setSearchValue(e.target.value)
974
974
  })
@@ -1006,14 +1006,14 @@ var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
1006
1006
 
1007
1007
 
1008
1008
  const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date, options: options = {
1009
- year: "numeric",
1010
- month: "long",
1011
- day: "numeric",
1012
- timeZone: "UTC"
1009
+ year: 'numeric',
1010
+ month: 'long',
1011
+ day: 'numeric',
1012
+ timeZone: 'UTC'
1013
1013
  } })=>{
1014
1014
  const rawDate = new Date(date);
1015
- let modifiedDate = "";
1016
- if (rawDate) modifiedDate = rawDate.toLocaleDateString("en-US", options);
1015
+ let modifiedDate = '';
1016
+ if (rawDate) modifiedDate = rawDate.toLocaleDateString('en-US', options);
1017
1017
  return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
1018
1018
  children: modifiedDate
1019
1019
  });
@@ -1027,25 +1027,25 @@ const $c068004d499082cc$var$DatasetListItem = (props)=>{
1027
1027
  minWidth: 1024
1028
1028
  });
1029
1029
  const { title: title, modified: modified, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
1030
- let linkContainerClasses = "ds-u-margin-bottom--2";
1031
- if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
1032
- else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
1033
- let linkClasses = "ds-u-display--block ds-u-text-align--left";
1030
+ let linkContainerClasses = 'ds-u-margin-bottom--2';
1031
+ if (dataDictionaryLinks) linkContainerClasses += ' ds-l-col--6 ds-u-padding-right--0';
1032
+ else linkContainerClasses += ' ds-l-col--auto ds-u-padding-left--0';
1033
+ let linkClasses = 'ds-u-display--block ds-u-text-align--left';
1034
1034
  if (desktop) {
1035
- linkContainerClasses = "ds-u-padding-x--0";
1036
- linkClasses += " ds-l-col--4 ds-l-md-col--auto";
1035
+ linkContainerClasses = 'ds-u-padding-x--0';
1036
+ linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
1037
1037
  }
1038
1038
  return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1039
1039
  className: "dc-c-list-item ds-u-padding-top--4",
1040
1040
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1041
- className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
1041
+ className: `dc-c-searchlist-item ${paginationEnabled ? 'ds-u-border-top--1' : 'ds-u-border-bottom--1 ds-u-padding-bottom--3'}`,
1042
1042
  children: [
1043
1043
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1044
1044
  className: "ds-l-row ds-u-align-items--start",
1045
1045
  children: [
1046
1046
  /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
1047
1047
  id: `dataset-${identifier}-updated-date`,
1048
- 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"}`,
1048
+ 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'}`,
1049
1049
  children: [
1050
1050
  "Updated ",
1051
1051
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
@@ -1103,7 +1103,7 @@ var $c068004d499082cc$export$2e2bcd8739ae039 = $c068004d499082cc$var$DatasetList
1103
1103
 
1104
1104
  const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
1105
1105
  switch(props.id){
1106
- case "overview":
1106
+ case 'overview':
1107
1107
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
1108
1108
  width: "16px",
1109
1109
  height: "16px",
@@ -1146,7 +1146,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
1146
1146
  })
1147
1147
  ]
1148
1148
  });
1149
- case "data-table":
1149
+ case 'data-table':
1150
1150
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
1151
1151
  width: "16px",
1152
1152
  height: "12px",
@@ -1179,7 +1179,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
1179
1179
  })
1180
1180
  ]
1181
1181
  });
1182
- case "api":
1182
+ case 'api':
1183
1183
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
1184
1184
  width: "16px",
1185
1185
  height: "13px",
@@ -1212,7 +1212,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
1212
1212
  })
1213
1213
  ]
1214
1214
  });
1215
- case "download":
1215
+ case 'download':
1216
1216
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
1217
1217
  width: "16px",
1218
1218
  height: "16px",
@@ -1242,7 +1242,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
1242
1242
  })
1243
1243
  ]
1244
1244
  });
1245
- case "data-dictionary":
1245
+ case 'data-dictionary':
1246
1246
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
1247
1247
  width: "14px",
1248
1248
  height: "16px",
@@ -1345,13 +1345,13 @@ var $b61856b23f5f58a2$export$2e2bcd8739ae039 = $b61856b23f5f58a2$var$LargeFileDi
1345
1345
 
1346
1346
 
1347
1347
  function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240) {
1348
- if (!textString) return "";
1348
+ if (!textString) return '';
1349
1349
  let cleanedText = textString;
1350
- if (cleanedText.split("</p>").length > 1) cleanedText = cleanedText.split("</p>")[0];
1351
- if (cleanedText.split("<br/>").length > 1) cleanedText = cleanedText.split("<br/>")[0];
1350
+ if (cleanedText.split('</p>').length > 1) cleanedText = cleanedText.split('</p>')[0];
1351
+ if (cleanedText.split('<br/>').length > 1) cleanedText = cleanedText.split('<br/>')[0];
1352
1352
  cleanedText = (0, $hgUW1$lodashtruncate)(cleanedText, {
1353
- "length": textLength,
1354
- "separator": " "
1353
+ 'length': textLength,
1354
+ 'separator': ' '
1355
1355
  });
1356
1356
  return (0, $hgUW1$dompurify).sanitize(cleanedText, {
1357
1357
  ALLOWED_TAGS: []
@@ -1369,9 +1369,9 @@ function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240)
1369
1369
  const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
1370
1370
  const { type: type, date: date, boldLabel: boldLabel = false, displayTooltips: displayTooltips = true } = props;
1371
1371
  const dateText = {
1372
- modified: "Last Modified",
1373
- released: "Released",
1374
- refresh: "Planned Update"
1372
+ modified: 'Last Modified',
1373
+ released: 'Released',
1374
+ refresh: 'Planned Update'
1375
1375
  };
1376
1376
  const tooltipContent = {
1377
1377
  modified: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
@@ -1408,7 +1408,7 @@ const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
1408
1408
  })
1409
1409
  };
1410
1410
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1411
- className: `dataset-date-item${boldLabel ? " bold-label" : ""}`,
1411
+ className: `dataset-date-item${boldLabel ? ' bold-label' : ''}`,
1412
1412
  children: [
1413
1413
  /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
1414
1414
  className: "dataset-data-item-label",
@@ -1478,7 +1478,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
1478
1478
  if (dist && dist.data) {
1479
1479
  if (dist.data.format) return dist.data.format.toLowerCase();
1480
1480
  if (dist.data.mediaType) {
1481
- const mediaType = dist.data.mediaType.split("/");
1481
+ const mediaType = dist.data.mediaType.split('/');
1482
1482
  if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
1483
1483
  }
1484
1484
  if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
@@ -1488,7 +1488,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
1488
1488
  }
1489
1489
  }
1490
1490
  }
1491
- return "";
1491
+ return '';
1492
1492
  }
1493
1493
 
1494
1494
 
@@ -1498,20 +1498,20 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
1498
1498
  });
1499
1499
  const { title: title, modified: modified, description: description, downloadUrl: downloadUrl, largeFile: largeFile = false, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks, identifier: identifier, refresh: refresh, released: released, showDateDetails: showDateDetails = false, showTopics: showTopics = false, theme: theme, topicSlugs: topicSlugs, distribution: distribution } = props;
1500
1500
  const location = (0, $hgUW1$useLocation)();
1501
- let linkContainerClasses = "ds-u-margin-bottom--2";
1502
- if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
1503
- else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
1504
- let linkClasses = "ds-u-display--block ds-u-text-align--left";
1501
+ let linkContainerClasses = 'ds-u-margin-bottom--2';
1502
+ if (dataDictionaryLinks) linkContainerClasses += ' ds-l-col--6 ds-u-padding-right--0';
1503
+ else linkContainerClasses += ' ds-l-col--auto ds-u-padding-left--0';
1504
+ let linkClasses = 'ds-u-display--block ds-u-text-align--left';
1505
1505
  if (desktop) {
1506
- linkContainerClasses = "ds-u-padding-x--0";
1507
- linkClasses += " ds-l-col--4 ds-l-md-col--auto";
1506
+ linkContainerClasses = 'ds-u-padding-x--0';
1507
+ linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
1508
1508
  }
1509
1509
  let themes;
1510
1510
  if (theme && showTopics) themes = /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
1511
1511
  className: "theme-list item-theme",
1512
1512
  children: theme.map((topic, index)=>{
1513
- const title = topic || "Unknown Topic";
1514
- const prefix = "topics";
1513
+ const title = topic || 'Unknown Topic';
1514
+ const prefix = 'topics';
1515
1515
  // Use the provided slug or fallback to a simple slug generation
1516
1516
  const slug = topicSlugs?.[title];
1517
1517
  const link = `/${prefix}/${slug}`;
@@ -1522,7 +1522,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
1522
1522
  state: {
1523
1523
  fromUrl: location.pathname,
1524
1524
  fromTitle: false,
1525
- fromSearchList: location.pathname.includes("search")
1525
+ fromSearchList: location.pathname.includes('search')
1526
1526
  },
1527
1527
  children: title
1528
1528
  })
@@ -1564,7 +1564,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
1564
1564
  };
1565
1565
  const dataDictionaryExists = ()=>{
1566
1566
  if (distribution && "data" in distribution) {
1567
- if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType === "application/vnd.tableschema+json";
1567
+ if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType === 'application/vnd.tableschema+json';
1568
1568
  }
1569
1569
  return false;
1570
1570
  };
@@ -1598,7 +1598,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
1598
1598
  return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1599
1599
  className: "dc-c-search-list-item ds-u-padding-top--3",
1600
1600
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
1601
- className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
1601
+ className: `dc-c-searchlist-item ${paginationEnabled ? 'ds-u-border-top--1' : 'ds-u-border-bottom--1 ds-u-padding-bottom--3'}`,
1602
1602
  children: [
1603
1603
  themes,
1604
1604
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
@@ -1606,7 +1606,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
1606
1606
  children: [
1607
1607
  !showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
1608
1608
  id: `dataset-${identifier}-updated-date`,
1609
- className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? "ds-u-padding-top--2" : "ds-u-padding-top--0"}`,
1609
+ className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? 'ds-u-padding-top--2' : 'ds-u-padding-top--0'}`,
1610
1610
  children: [
1611
1611
  /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1612
1612
  children: "Updated:"
@@ -1635,13 +1635,13 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
1635
1635
  (0, $1a2bf34e2a8f6b80$export$59a943b34a82e690)(description),
1636
1636
  description.length > 240 ? /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
1637
1637
  children: [
1638
- " ",
1638
+ ' ',
1639
1639
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
1640
1640
  to: `/dataset/${identifier}`,
1641
1641
  children: "See more"
1642
1642
  })
1643
1643
  ]
1644
- }) : ""
1644
+ }) : ''
1645
1645
  ]
1646
1646
  })
1647
1647
  }),
@@ -1669,14 +1669,14 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
1669
1669
  "Download"
1670
1670
  ]
1671
1671
  })
1672
- }) : "",
1672
+ }) : '',
1673
1673
  /*#__PURE__*/ (0, $hgUW1$jsxs)("ul", {
1674
- 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" : ""}`,
1674
+ 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' : ''}`,
1675
1675
  children: [
1676
1676
  /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1677
1677
  className: linkContainerClasses,
1678
1678
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1679
- className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? "" : " dkan-disabled-link-wrapper"}`,
1679
+ className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? '' : ' dkan-disabled-link-wrapper'}`,
1680
1680
  children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataTableLink, {})
1681
1681
  })
1682
1682
  }),
@@ -1698,10 +1698,10 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
1698
1698
  dataDictionaryLinks ? /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1699
1699
  className: linkContainerClasses,
1700
1700
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1701
- className: `${linkClasses}${dataDictionaryExists() ? "" : " dkan-disabled-link-wrapper"}`,
1701
+ className: `${linkClasses}${dataDictionaryExists() ? '' : ' dkan-disabled-link-wrapper'}`,
1702
1702
  children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataDictionaryLink, {})
1703
1703
  })
1704
- }) : "",
1704
+ }) : '',
1705
1705
  /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
1706
1706
  className: linkContainerClasses,
1707
1707
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
@@ -1797,7 +1797,7 @@ var $789279954d8eff7f$export$2e2bcd8739ae039 = $789279954d8eff7f$var$ApiDocument
1797
1797
 
1798
1798
 
1799
1799
 
1800
- const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className = "data-table-results" })=>{
1800
+ const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className = 'data-table-results' })=>{
1801
1801
  const numTotalRows = totalRows;
1802
1802
  if (numTotalRows === 0) return /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
1803
1803
  className: className,
@@ -1815,18 +1815,18 @@ const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limi
1815
1815
  className: className,
1816
1816
  children: [
1817
1817
  "Displaying",
1818
- " ",
1818
+ ' ',
1819
1819
  /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1820
1820
  className: "ds-u-font-weight--bold",
1821
1821
  children: `${startTotal().toLocaleString()} - ${ofTotal().toLocaleString()}`
1822
1822
  }),
1823
- " ",
1823
+ ' ',
1824
1824
  "of ",
1825
1825
  /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
1826
1826
  className: "ds-u-font-weight--bold",
1827
1827
  children: `${numTotalRows.toLocaleString()}`
1828
1828
  }),
1829
- " ",
1829
+ ' ',
1830
1830
  "results"
1831
1831
  ]
1832
1832
  });
@@ -1852,16 +1852,16 @@ const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePaddi
1852
1852
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
1853
1853
  options: [
1854
1854
  {
1855
- label: "Tight",
1856
- value: "ds-u-padding-y--0"
1855
+ label: 'Tight',
1856
+ value: 'ds-u-padding-y--0'
1857
1857
  },
1858
1858
  {
1859
- label: "Normal",
1860
- value: "ds-u-padding-y--1"
1859
+ label: 'Normal',
1860
+ value: 'ds-u-padding-y--1'
1861
1861
  },
1862
1862
  {
1863
- label: "Expanded",
1864
- value: "ds-u-padding-y--2"
1863
+ label: 'Expanded',
1864
+ value: 'ds-u-padding-y--2'
1865
1865
  }
1866
1866
  ],
1867
1867
  label: "Display density:",
@@ -2104,7 +2104,7 @@ function $aa4450dcbeef3ac0$export$385a5aba38cc3325(sortArray) {
2104
2104
  sortArray.forEach((s)=>{
2105
2105
  return newQuery.push({
2106
2106
  property: s.id,
2107
- order: s.desc ? "desc" : "asc"
2107
+ order: s.desc ? 'desc' : 'asc'
2108
2108
  });
2109
2109
  });
2110
2110
  return newQuery;
@@ -2142,103 +2142,103 @@ function $7264a673914aa746$export$e284ae5d89467c8f(date) {
2142
2142
  }
2143
2143
  function $7264a673914aa746$export$6b5e57d20078142b(value, operator) {
2144
2144
  let newValue = value;
2145
- if (Array.isArray(newValue)) newValue = newValue.join(",");
2145
+ if (Array.isArray(newValue)) newValue = newValue.join(',');
2146
2146
  // return newValue.replace(/(^\%+|\%+$)/gm, '');
2147
2147
  return newValue;
2148
2148
  }
2149
2149
  const $7264a673914aa746$export$5f89a5ae87bc48e1 = [
2150
2150
  {
2151
- label: "Is",
2152
- value: "="
2151
+ label: 'Is',
2152
+ value: '='
2153
2153
  },
2154
2154
  {
2155
- label: "Starts With",
2156
- value: "starts with"
2155
+ label: 'Starts With',
2156
+ value: 'starts with'
2157
2157
  },
2158
2158
  {
2159
- label: "Contains",
2160
- value: "contains"
2159
+ label: 'Contains',
2160
+ value: 'contains'
2161
2161
  },
2162
2162
  {
2163
- label: "Is Not",
2164
- value: "<>"
2163
+ label: 'Is Not',
2164
+ value: '<>'
2165
2165
  },
2166
2166
  {
2167
- label: "Or",
2168
- value: "in"
2167
+ label: 'Or',
2168
+ value: 'in'
2169
2169
  },
2170
2170
  {
2171
- label: "Is",
2172
- value: "="
2171
+ label: 'Is',
2172
+ value: '='
2173
2173
  },
2174
2174
  {
2175
- label: "Is Not",
2176
- value: "<>"
2175
+ label: 'Is Not',
2176
+ value: '<>'
2177
2177
  },
2178
2178
  {
2179
- label: "Greater Than",
2180
- value: ">"
2179
+ label: 'Greater Than',
2180
+ value: '>'
2181
2181
  },
2182
2182
  {
2183
- label: "Less Than",
2184
- value: "<"
2183
+ label: 'Less Than',
2184
+ value: '<'
2185
2185
  }
2186
2186
  ];
2187
2187
  function $7264a673914aa746$export$2b9377795161999(type) {
2188
2188
  switch(type){
2189
- case "text":
2190
- case "string":
2189
+ case 'text':
2190
+ case 'string':
2191
2191
  return [
2192
2192
  {
2193
- label: "Is",
2194
- value: "="
2193
+ label: 'Is',
2194
+ value: '='
2195
2195
  },
2196
2196
  {
2197
- label: "Starts With",
2198
- value: "starts with"
2197
+ label: 'Starts With',
2198
+ value: 'starts with'
2199
2199
  },
2200
2200
  {
2201
- label: "Contains",
2202
- value: "contains"
2201
+ label: 'Contains',
2202
+ value: 'contains'
2203
2203
  },
2204
2204
  {
2205
- label: "Is Not",
2206
- value: "<>"
2205
+ label: 'Is Not',
2206
+ value: '<>'
2207
2207
  },
2208
2208
  {
2209
- label: "Or",
2210
- value: "in"
2209
+ label: 'Or',
2210
+ value: 'in'
2211
2211
  }
2212
2212
  ];
2213
- case "date":
2213
+ case 'date':
2214
2214
  return [
2215
2215
  {
2216
- label: "Is",
2217
- value: "="
2216
+ label: 'Is',
2217
+ value: '='
2218
2218
  },
2219
2219
  {
2220
- label: "Is Not",
2221
- value: "<>"
2220
+ label: 'Is Not',
2221
+ value: '<>'
2222
2222
  },
2223
2223
  {
2224
- label: "Greater Than",
2225
- value: ">"
2224
+ label: 'Greater Than',
2225
+ value: '>'
2226
2226
  },
2227
2227
  {
2228
- label: "Less Than",
2229
- value: "<"
2228
+ label: 'Less Than',
2229
+ value: '<'
2230
2230
  }
2231
2231
  ];
2232
2232
  default:
2233
2233
  // These 2 should be safe for all data types
2234
2234
  return [
2235
2235
  {
2236
- label: "Is",
2237
- value: "="
2236
+ label: 'Is',
2237
+ value: '='
2238
2238
  },
2239
2239
  {
2240
- label: "Is Not",
2241
- value: "<>"
2240
+ label: 'Is Not',
2241
+ value: '<>'
2242
2242
  }
2243
2243
  ];
2244
2244
  }
@@ -2255,13 +2255,13 @@ function $7264a673914aa746$export$2b9377795161999(type) {
2255
2255
 
2256
2256
 
2257
2257
  const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: header, sortElement: sortElement, setAriaLiveFeedback: setAriaLiveFeedback })=>{
2258
- const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)("");
2258
+ const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)('');
2259
2259
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("th", {
2260
2260
  key: header.id,
2261
2261
  style: {
2262
2262
  width: header.getSize()
2263
2263
  },
2264
- title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : "",
2264
+ title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : '',
2265
2265
  className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
2266
2266
  children: [
2267
2267
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
@@ -2274,7 +2274,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
2274
2274
  }),
2275
2275
  sortElement && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
2276
2276
  onClick: header.column.getToggleSortingHandler(),
2277
- className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : "",
2277
+ className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : '',
2278
2278
  "aria-label": `${header.column.columnDef.header} sort order`
2279
2279
  })
2280
2280
  ]
@@ -2282,18 +2282,18 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
2282
2282
  /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
2283
2283
  onMouseDown: header.getResizeHandler(),
2284
2284
  onTouchStart: header.getResizeHandler(),
2285
- className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ? "isResizing" : ""}`,
2285
+ className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ? 'isResizing' : ''}`,
2286
2286
  "aria-label": `Resize ${header.column.columnDef.header} column`,
2287
2287
  onKeyDown: (e)=>{
2288
2288
  const columnSizingObject = table.getState().columnSizing;
2289
2289
  switch(e.key){
2290
- case "Enter":
2291
- case " ":
2290
+ case 'Enter':
2291
+ case ' ':
2292
2292
  e.preventDefault();
2293
2293
  e.stopPropagation();
2294
2294
  if (columnResizing) {
2295
2295
  // end resizing
2296
- setColumnResizing("");
2296
+ setColumnResizing('');
2297
2297
  setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
2298
2298
  } else {
2299
2299
  // start resizing
@@ -2301,13 +2301,13 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
2301
2301
  setAriaLiveFeedback(`${header.column.columnDef.header} grabbed.`);
2302
2302
  }
2303
2303
  break;
2304
- case "Escape":
2304
+ case 'Escape':
2305
2305
  if (columnResizing) {
2306
- setColumnResizing("");
2306
+ setColumnResizing('');
2307
2307
  setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
2308
2308
  }
2309
2309
  break;
2310
- case "ArrowRight":
2310
+ case 'ArrowRight':
2311
2311
  e.preventDefault();
2312
2312
  e.stopPropagation();
2313
2313
  if (columnResizing) {
@@ -2316,7 +2316,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
2316
2316
  setAriaLiveFeedback(`${header.column.columnDef.header} has been resized. The new width is ${header.getSize()} pixels.`);
2317
2317
  }
2318
2318
  break;
2319
- case "ArrowLeft":
2319
+ case 'ArrowLeft':
2320
2320
  e.preventDefault();
2321
2321
  e.stopPropagation();
2322
2322
  if (columnResizing) {
@@ -2328,7 +2328,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
2328
2328
  }
2329
2329
  },
2330
2330
  onBlur: ()=>{
2331
- setColumnResizing("");
2331
+ setColumnResizing('');
2332
2332
  }
2333
2333
  })
2334
2334
  ]
@@ -2377,7 +2377,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
2377
2377
  children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
2378
2378
  }),
2379
2379
  /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2380
- className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` : ""
2380
+ className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` : ''
2381
2381
  })
2382
2382
  ]
2383
2383
  })
@@ -2391,6 +2391,67 @@ var $23763e27eda0e8d7$export$2e2bcd8739ae039 = $23763e27eda0e8d7$var$FixedSizeTH
2391
2391
 
2392
2392
 
2393
2393
 
2394
+ const $43a30d745a7bbc86$var$DataTableContext = /*#__PURE__*/ (0, $hgUW1$createContext)({
2395
+ id: null
2396
+ });
2397
+ var $43a30d745a7bbc86$export$2e2bcd8739ae039 = $43a30d745a7bbc86$var$DataTableContext;
2398
+
2399
+
2400
+
2401
+
2402
+
2403
+ // Create a defaults object for reusability
2404
+ const $ee0d4d4f34048447$var$DataTableActionsContextDefaults = {
2405
+ columnOrder: [],
2406
+ setColumnOrder: ()=>{},
2407
+ columnVisibility: {},
2408
+ setColumnVisibility: ()=>{},
2409
+ page: 1,
2410
+ setPage: ()=>{},
2411
+ tableDensity: 'normal',
2412
+ setTableDensity: ()=>{}
2413
+ };
2414
+ const $ee0d4d4f34048447$export$f814ea079e65d8fe = /*#__PURE__*/ (0, $hgUW1$createContext)($ee0d4d4f34048447$var$DataTableActionsContextDefaults);
2415
+ // Define our reusable provider component
2416
+ const $ee0d4d4f34048447$var$DataTableActionsProvider = ({ children: children })=>{
2417
+ // Set up all of the state
2418
+ const { id: id, datasetTableControls: datasetTableControls } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
2419
+ // a wrapper component to keep column state synced between full screen and regular modes
2420
+ const localStorageData = id ? JSON.parse(localStorage.getItem(id)) : null;
2421
+ const [page, setPage] = (0, $hgUW1$useState)(1);
2422
+ const [columnOrder, setColumnOrder] = (0, $hgUW1$useState)(()=>{
2423
+ if (datasetTableControls && localStorageData) return localStorageData.tableColumnOrder;
2424
+ else return [];
2425
+ });
2426
+ const [columnVisibility, setColumnVisibility] = (0, $hgUW1$useState)(()=>{
2427
+ if (datasetTableControls && localStorageData) return localStorageData.tableColumnVisibility;
2428
+ else return {};
2429
+ });
2430
+ const [tableDensity, setTableDensity] = (0, $hgUW1$useState)('normal');
2431
+ const providerValue = {
2432
+ columnOrder: columnOrder,
2433
+ setColumnOrder: setColumnOrder,
2434
+ columnVisibility: columnVisibility,
2435
+ setColumnVisibility: setColumnVisibility,
2436
+ page: page,
2437
+ setPage: setPage,
2438
+ tableDensity: tableDensity,
2439
+ setTableDensity: setTableDensity
2440
+ };
2441
+ return /*#__PURE__*/ (0, $hgUW1$jsx)($ee0d4d4f34048447$export$f814ea079e65d8fe.Provider, {
2442
+ value: providerValue,
2443
+ children: children
2444
+ });
2445
+ };
2446
+ const $ee0d4d4f34048447$export$67f91330d613e8f4 = ({ children: children, value: value = $ee0d4d4f34048447$var$DataTableActionsContextDefaults })=>/*#__PURE__*/ (0, $hgUW1$jsx)($ee0d4d4f34048447$export$f814ea079e65d8fe.Provider, {
2447
+ value: value,
2448
+ children: children
2449
+ });
2450
+ var $ee0d4d4f34048447$export$2e2bcd8739ae039 = $ee0d4d4f34048447$var$DataTableActionsProvider;
2451
+
2452
+
2453
+
2454
+
2394
2455
 
2395
2456
 
2396
2457
 
@@ -2413,9 +2474,9 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
2413
2474
  transition: transition,
2414
2475
  opacity: isDragging ? 0.7 : 1,
2415
2476
  zIndex: isDragging ? 1 : 0,
2416
- position: "relative",
2417
- background: "white",
2418
- touchAction: "none"
2477
+ position: 'relative',
2478
+ background: 'white',
2479
+ touchAction: 'none'
2419
2480
  };
2420
2481
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
2421
2482
  className: "ds-u-display--flex ds-u-justify-content--between ds-u-border-bottom--1",
@@ -2430,7 +2491,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
2430
2491
  // this code forces the repaint without user interaction
2431
2492
  const target = e.target;
2432
2493
  if (isDragging && target.tagName.toLowerCase() === "label") setTimeout(()=>{
2433
- target.parentNode.querySelector("input").checked = visible;
2494
+ target.parentNode.querySelector('input').checked = visible;
2434
2495
  }, 1);
2435
2496
  },
2436
2497
  children: [
@@ -2447,7 +2508,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
2447
2508
  }
2448
2509
  }),
2449
2510
  /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
2450
- className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && "grabbed"}`,
2511
+ className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && 'grabbed'}`,
2451
2512
  "aria-label": `Reorder ${id} column`,
2452
2513
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2453
2514
  className: "fa fa-sort"
@@ -2460,16 +2521,12 @@ var $5fe94aeb50e0798b$export$2e2bcd8739ae039 = $5fe94aeb50e0798b$var$Card;
2460
2521
 
2461
2522
 
2462
2523
 
2463
- const $ebda441784d176a5$var$ManageColumnsContext = /*#__PURE__*/ (0, $hgUW1$createContext)({});
2464
- var $ebda441784d176a5$export$2e2bcd8739ae039 = $ebda441784d176a5$var$ManageColumnsContext;
2465
-
2466
-
2467
2524
 
2468
2525
  class $5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor extends (0, $hgUW1$KeyboardSensor) {
2469
2526
  // Custom function to exclude checkbox from keyboard dragging
2470
2527
  static activators = [
2471
2528
  {
2472
- eventName: "onKeyDown",
2529
+ eventName: 'onKeyDown',
2473
2530
  handler: ({ nativeEvent: event })=>{
2474
2531
  // prevent scrolling the list
2475
2532
  const isCheckbox = [
@@ -2492,7 +2549,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$Poin
2492
2549
  // Custom function to stop accidental checkbox clicks on pointer activation
2493
2550
  static activators = [
2494
2551
  {
2495
- eventName: "onPointerDown",
2552
+ eventName: 'onPointerDown',
2496
2553
  handler: ({ nativeEvent: event })=>{
2497
2554
  if (event.target.tagName.toLowerCase() === "input") return false;
2498
2555
  if (event.target.tagName.toLowerCase() === "label") event.target.blur();
@@ -2501,8 +2558,10 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$Poin
2501
2558
  }
2502
2559
  ];
2503
2560
  }
2504
- const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, defaultColumnOrder: defaultColumnOrder, modalOpen: modalOpen, setModalOpen: setModalOpen })=>{
2505
- const { columnOrder: columnOrder, setColumnOrder: setColumnOrder, setColumnVisibility: setColumnVisibility } = (0, $hgUW1$useContext)((0, $ebda441784d176a5$export$2e2bcd8739ae039));
2561
+ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, defaultColumnOrder: defaultColumnOrder })=>{
2562
+ const { columnOrder: columnOrder, setColumnOrder: setColumnOrder, setColumnVisibility: setColumnVisibility, columnVisibility: contextColumnVisibility } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
2563
+ const columnVisibility = contextColumnVisibility || {};
2564
+ const [modalOpen, setModalOpen] = (0, $hgUW1$useState)(false);
2506
2565
  // maintain card state separately from table state - only sync states when the Save button is pressed
2507
2566
  const [cards, setCards] = (0, $hgUW1$useState)(columns.map((c)=>{
2508
2567
  return {
@@ -2559,137 +2618,164 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
2559
2618
  };
2560
2619
  }));
2561
2620
  };
2562
- return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2563
- className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
2564
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
2565
- heading: "Manage columns",
2566
- isOpen: modalOpen,
2567
- onExit: ()=>{
2568
- setModalOpen(false);
2569
- resetCards();
2570
- },
2571
- className: "dkan-manage-columns-dialog",
2572
- actions: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2573
- className: "ds-u-display--flex ds-u-justify-content--between ds-u-flex-wrap--wrap ds-u-padding-x--3 ds-u-padding-bottom--1 ds-u-sm-padding-bottom--3",
2621
+ const hiddenColumns = Object.keys(columnVisibility).filter((key)=>columnVisibility[key] === false).length;
2622
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2623
+ className: "dkan-manage-columns-wrapper",
2624
+ children: [
2625
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
2626
+ "aria-label": "Manage columns - Opens in a dialog",
2627
+ className: "dkan-filter-dataset-toolbar-button ds-u-color--primary ds-u-text-decoration--underline ds-u-font-size--sm ds-u-padding-x--2 ds-u-margin--0 ds-u-border--0 ds-u-fill--transparent",
2628
+ onClick: ()=>{
2629
+ setModalOpen(true);
2630
+ },
2574
2631
  children: [
2575
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2576
- className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0",
2632
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
2633
+ className: "fa fa-columns ds-u-margin-right--1"
2634
+ }),
2635
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
2577
2636
  children: [
2578
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
2579
- variation: "solid",
2580
- className: "ds-l-col--6 ds-l-sm-col--auto",
2581
- onClick: ()=>{
2582
- setModalOpen(false);
2583
- // update table state
2584
- // Visibility
2585
- // This code is building a new columnVisibility state object from the card state and doing a single setState on the table
2586
- // vs doing a setState on every changed column individually
2587
- const newColumnVisibility = Object.fromEntries(cards.map((c)=>Object.values(c)));
2588
- setColumnVisibility(newColumnVisibility);
2589
- // Card order
2590
- const newCardOrder = cards.map((c)=>{
2591
- return c.id;
2592
- });
2593
- setColumnOrder(newCardOrder);
2594
- // save to localStorage
2595
- const localStorageData = {
2596
- tableColumnOrder: newCardOrder,
2597
- tableColumnVisibility: newColumnVisibility
2598
- };
2599
- localStorage.setItem(id, JSON.stringify(localStorageData));
2600
- },
2601
- children: "Save"
2637
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2638
+ className: "ds-u-display--none ds-u-lg-display--inline-block",
2639
+ children: "Manage Columns"
2602
2640
  }),
2603
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
2604
- variation: "ghost",
2605
- className: "ds-l-col--6 ds-l-sm-col--auto",
2606
- onClick: ()=>{
2607
- setModalOpen(false);
2608
- resetCards();
2609
- },
2610
- children: "Cancel"
2641
+ hiddenColumns ? ` (${hiddenColumns})` : ''
2642
+ ]
2643
+ })
2644
+ ]
2645
+ }),
2646
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2647
+ className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
2648
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
2649
+ heading: "Manage columns",
2650
+ isOpen: modalOpen,
2651
+ onExit: ()=>{
2652
+ setModalOpen(false);
2653
+ resetCards();
2654
+ },
2655
+ className: "dkan-manage-columns-dialog",
2656
+ actions: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2657
+ className: "ds-u-display--flex ds-u-justify-content--between ds-u-flex-wrap--wrap ds-u-padding-x--3 ds-u-padding-bottom--1 ds-u-sm-padding-bottom--3",
2658
+ children: [
2659
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2660
+ className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0",
2661
+ children: [
2662
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
2663
+ variation: "solid",
2664
+ className: "ds-l-col--6 ds-l-sm-col--auto",
2665
+ onClick: ()=>{
2666
+ setModalOpen(false);
2667
+ // update table state
2668
+ // Visibility
2669
+ // This code is building a new columnVisibility state object from the card state and doing a single setState on the table
2670
+ // vs doing a setState on every changed column individually
2671
+ const newColumnVisibility = Object.fromEntries(cards.map((c)=>Object.values(c)));
2672
+ setColumnVisibility(newColumnVisibility);
2673
+ // Card order
2674
+ const newCardOrder = cards.map((c)=>{
2675
+ return c.id;
2676
+ });
2677
+ setColumnOrder(newCardOrder);
2678
+ // save to localStorage
2679
+ const localStorageData = {
2680
+ tableColumnOrder: newCardOrder,
2681
+ tableColumnVisibility: newColumnVisibility
2682
+ };
2683
+ localStorage.setItem(id, JSON.stringify(localStorageData));
2684
+ },
2685
+ children: "Save"
2686
+ }),
2687
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
2688
+ variation: "ghost",
2689
+ className: "ds-l-col--6 ds-l-sm-col--auto",
2690
+ onClick: ()=>{
2691
+ setModalOpen(false);
2692
+ resetCards();
2693
+ },
2694
+ children: "Cancel"
2695
+ })
2696
+ ]
2697
+ }),
2698
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2699
+ className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-padding-top--1 ds-u-sm-padding-y--0",
2700
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
2701
+ variation: "ghost",
2702
+ className: "ds-l-col--6 ds-l-sm-col--auto",
2703
+ onClick: ()=>{
2704
+ // reset to default column order and set all cards to visible
2705
+ // do not save this to the table state until the "Save" button is clicked
2706
+ setCards(defaultColumnOrder.map((column)=>{
2707
+ const card = cards.filter((c)=>c.id === column)[0];
2708
+ return {
2709
+ ...card,
2710
+ visible: true
2711
+ };
2712
+ }));
2713
+ },
2714
+ children: "Reset Columns"
2715
+ })
2611
2716
  })
2612
2717
  ]
2613
2718
  }),
2614
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2615
- className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-padding-top--1 ds-u-sm-padding-y--0",
2616
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
2617
- variation: "ghost",
2618
- className: "ds-l-col--6 ds-l-sm-col--auto",
2619
- onClick: ()=>{
2620
- // reset to default column order and set all cards to visible
2621
- // do not save this to the table state until the "Save" button is clicked
2622
- setCards(defaultColumnOrder.map((column)=>{
2623
- const card = cards.filter((c)=>c.id === column)[0];
2719
+ children: [
2720
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
2721
+ id: "reorder-help",
2722
+ className: "ds-u-padding-x--3",
2723
+ children: "Activate the reorder button and use the arrow keys to reorder the list or use your mouse to drag/reorder. Press escape to cancel the reordering."
2724
+ }),
2725
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Choice), {
2726
+ checked: cardHiddenColumns === 0,
2727
+ type: "checkbox",
2728
+ onChange: ()=>{
2729
+ setCards(cards.map((c)=>{
2624
2730
  return {
2625
- ...card,
2626
- visible: true
2731
+ ...c,
2732
+ visible: cardHiddenColumns !== 0
2627
2733
  };
2628
2734
  }));
2629
2735
  },
2630
- children: "Reset Columns"
2631
- })
2632
- })
2633
- ]
2634
- }),
2635
- children: [
2636
- /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
2637
- id: "reorder-help",
2638
- className: "ds-u-padding-x--3",
2639
- children: "Activate the reorder button and use the arrow keys to reorder the list or use your mouse to drag/reorder. Press escape to cancel the reordering."
2640
- }),
2641
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Choice), {
2642
- checked: cardHiddenColumns === 0,
2643
- type: "checkbox",
2644
- onChange: ()=>{
2645
- setCards(cards.map((c)=>{
2646
- return {
2647
- ...c,
2648
- visible: cardHiddenColumns !== 0
2649
- };
2650
- }));
2651
- },
2652
- className: "ds-u-padding-x--3",
2653
- name: "",
2654
- value: "",
2655
- label: "Select all",
2656
- hint: cardHiddenColumns && cardHiddenColumns + " columns hidden"
2657
- }),
2658
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2659
- className: "ds-u-display--flex ds-u-justify-content--between ds-u-font-weight--bold ds-u-padding-y--2 ds-u-padding-x--3 ds-u-border-y--1 ds-u-margin-top--2",
2660
- children: [
2661
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2662
- children: "Display column"
2736
+ className: "ds-u-padding-x--3",
2737
+ name: "",
2738
+ value: "",
2739
+ label: "Select all",
2740
+ hint: cardHiddenColumns && cardHiddenColumns + " columns hidden"
2663
2741
  }),
2664
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2665
- children: "Reorder"
2666
- })
2667
- ]
2668
- }),
2669
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$DndContext), {
2670
- collisionDetection: (0, $hgUW1$closestCenter),
2671
- modifiers: [
2672
- (0, $hgUW1$restrictToVerticalAxis)
2673
- ],
2674
- sensors: sensors,
2675
- onDragEnd: handleDragEnd,
2676
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$SortableContext), {
2677
- items: cardOrder,
2678
- strategy: (0, $hgUW1$verticalListSortingStrategy),
2679
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
2680
- className: "dkan-manage-columns-list",
2681
- children: cards.map((card)=>{
2682
- return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5fe94aeb50e0798b$export$2e2bcd8739ae039), {
2683
- id: card.id,
2684
- visible: card.visible,
2685
- updateVisibility: updateVisibility
2686
- }, card.id);
2742
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2743
+ className: "ds-u-display--flex ds-u-justify-content--between ds-u-font-weight--bold ds-u-padding-y--2 ds-u-padding-x--3 ds-u-border-y--1 ds-u-margin-top--2",
2744
+ children: [
2745
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2746
+ children: "Display column"
2747
+ }),
2748
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2749
+ children: "Reorder"
2750
+ })
2751
+ ]
2752
+ }),
2753
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$DndContext), {
2754
+ collisionDetection: (0, $hgUW1$closestCenter),
2755
+ modifiers: [
2756
+ (0, $hgUW1$restrictToVerticalAxis)
2757
+ ],
2758
+ sensors: sensors,
2759
+ onDragEnd: handleDragEnd,
2760
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$SortableContext), {
2761
+ items: cardOrder,
2762
+ strategy: (0, $hgUW1$verticalListSortingStrategy),
2763
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
2764
+ className: "dkan-manage-columns-list",
2765
+ children: cards.map((card)=>{
2766
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5fe94aeb50e0798b$export$2e2bcd8739ae039), {
2767
+ id: card.id,
2768
+ visible: card.visible,
2769
+ updateVisibility: updateVisibility
2770
+ }, card.id);
2771
+ })
2772
+ })
2687
2773
  })
2688
2774
  })
2689
- })
2775
+ ]
2690
2776
  })
2691
- ]
2692
- })
2777
+ })
2778
+ ]
2693
2779
  });
2694
2780
  };
2695
2781
  var $5d9e2ce238d53d29$export$2e2bcd8739ae039 = $5d9e2ce238d53d29$var$ManageColumns;
@@ -2708,139 +2794,112 @@ var $5d9e2ce238d53d29$export$2e2bcd8739ae039 = $5d9e2ce238d53d29$var$ManageColum
2708
2794
 
2709
2795
 
2710
2796
 
2797
+ function $a35cf16d1488f54e$export$1147582dfae658c6(columns, schema) {
2798
+ return columns.map((column)=>({
2799
+ header: schema && schema.fields[column].description ? schema.fields[column].description : column,
2800
+ accessor: column
2801
+ }));
2802
+ }
2803
+ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, closeFullScreenModal: closeFullScreenModal, showCopyLinkButton: showCopyLinkButton = true, showDataTableToolbar: showDataTableToolbar = true, showDownloadFilteredDataButton: showDownloadFilteredDataButton = true, showDownloadFullDataButton: showDownloadFullDataButton = true, showStoredQueryDownloadButton: showStoredQueryDownloadButton = false })=>{
2804
+ const { id: id, distribution: distribution, resource: resource, rootUrl: rootUrl, customColumns: customColumns = [], dataDictionaryBanner: dataDictionaryBanner } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
2805
+ const { page: page, setPage: setPage, tableDensity: tableDensity } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
2806
+ const defaultPageSize = 10;
2807
+ const customColumnHeaders = (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution.identifier]);
2808
+ const columns = customColumnHeaders ? customColumnHeaders : $a35cf16d1488f54e$export$1147582dfae658c6(resource.columns, resource.schema[id]);
2809
+ const { limit: limit, setOffset: setOffset } = resource;
2810
+ const pageSize = limit ? limit : defaultPageSize;
2811
+ const downloadURL = `${rootUrl}/datastore/query/${id}/0/download?${(0, $hgUW1$qs).stringify({
2812
+ conditions: resource.conditions
2813
+ }, {
2814
+ encode: true
2815
+ })}&format=csv`;
2816
+ if (Object.keys(resource).length && columns.length && resource.schema && Object.keys(distribution).length) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
2817
+ children: [
2818
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2819
+ className: isModal ? 'dkan-datatable-fullscreen-mode' : '',
2820
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
2821
+ canResize: true,
2822
+ columns: columns,
2823
+ sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
2824
+ tablePadding: tableDensity === 'normal' ? 'ds-u-padding-y--2' : tableDensity === 'compact' ? 'ds-u-padding-y--1' : 'ds-u-padding-y--3',
2825
+ loading: resource.loading,
2826
+ isModal: isModal,
2827
+ closeFullScreenModal: closeFullScreenModal,
2828
+ downloadURL: downloadURL,
2829
+ unfilteredDownloadURL: distribution.data.downloadURL,
2830
+ setPage: setPage,
2831
+ showCopyLinkButton: showCopyLinkButton,
2832
+ showDataTableToolbar: showDataTableToolbar,
2833
+ showDownloadFilteredDataButton: showDownloadFilteredDataButton,
2834
+ showDownloadFullDataButton: showDownloadFullDataButton,
2835
+ showStoredQueryDownloadButton: showStoredQueryDownloadButton
2836
+ })
2837
+ }),
2838
+ !resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2839
+ className: "ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--end ds-u-md-justify-content--between ds-u-margin-top--2 ds-u-align-items--center",
2840
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
2841
+ totalPages: Math.ceil(resource.count ? resource.count / pageSize : 1),
2842
+ currentPage: Number(page),
2843
+ onPageChange: (evt, page)=>{
2844
+ evt.preventDefault();
2845
+ setOffset((page - 1) * limit);
2846
+ setPage(page);
2847
+ },
2848
+ renderHref: (p)=>`?page=${p}`,
2849
+ className: "ds-l-col--12 ds-u-padding-x--0"
2850
+ })
2851
+ })
2852
+ ]
2853
+ });
2854
+ else return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
2855
+ "aria-valuetext": "Dataset loading",
2856
+ role: "status",
2857
+ className: "ds-u-margin--3"
2858
+ });
2859
+ };
2860
+ var $a35cf16d1488f54e$export$2e2bcd8739ae039 = $a35cf16d1488f54e$var$DatasetTable;
2711
2861
 
2712
2862
 
2713
- const $6380a4a580b24362$var$DataTableHeader = ({ resource: resource, downloadURL: downloadURL, unfilteredDownloadURL: unfilteredDownloadURL, setPage: setPage, showCopyLinkButton: showCopyLinkButton = true, showDownloadFilteredDataButton: showDownloadFilteredDataButton = true, showDownloadFullDataButton: showDownloadFullDataButton = true, showStoredQueryDownloadButton: showStoredQueryDownloadButton = false })=>{
2714
- const { limit: limit, offset: offset, count: count, conditions: conditions, setLimit: setLimit, setOffset: setOffset } = resource;
2715
- const intCount = count ? count : 0;
2716
- const rowOptions = [
2717
- 10,
2718
- 25,
2719
- 50,
2720
- 100
2721
- ];
2863
+ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal, closeFullScreenModal: closeFullScreenModal })=>{
2864
+ const [modalOpen, setModalOpen] = (0, $hgUW1$useState)(false);
2865
+ if (isModal) return null;
2722
2866
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2723
- className: "ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--between",
2867
+ className: "dkan-fullscreen-data-table-wrapper",
2724
2868
  children: [
2725
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2726
- className: "dc-c-resource-header--buttons ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--end ds-l-col--12 ds-u-margin-top--2 ds-u-padding-x--0",
2869
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
2870
+ "aria-label": isModal ? 'Close Full Screen dialog' : 'Full Screen mode - Opens in a dialog',
2871
+ className: "dkan-filter-dataset-toolbar-button ds-u-color--primary ds-u-text-decoration--underline ds-u-font-size--sm ds-u-padding-x--2 ds-u-margin--0 ds-u-border--0 ds-u-fill--transparent",
2872
+ onClick: ()=>{
2873
+ if (isModal) closeFullScreenModal();
2874
+ else setModalOpen(true);
2875
+ },
2727
2876
  children: [
2728
- showCopyLinkButton && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2729
- className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-margin-bottom--2",
2730
- children: conditions && conditions.length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Tooltip), {
2731
- onOpen: ()=>{
2732
- navigator.clipboard.writeText(window.location.href);
2733
- },
2734
- className: "ds-c-button ds-u-text-align--center ds-u-display--inline-block ds-l-col--12",
2735
- placement: "bottom",
2736
- dialog: true,
2737
- ariaLabel: "Copy link to filtered data",
2738
- title: "Link copied to clipboard",
2739
- "aria-disabled": !conditions || conditions.length === 0,
2740
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
2741
- className: "ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0",
2742
- children: [
2743
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
2744
- className: "fas fa-copy"
2745
- }),
2746
- " Copy link to filtered data"
2747
- ]
2748
- })
2749
- }) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
2750
- "aria-disabled": true,
2751
- "aria-label": "Copy link to filtered data",
2752
- className: "ds-c-button ds-u-text-align--center ds-u-display--inline-block ds-l-col--12",
2753
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
2754
- className: "ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0",
2755
- children: [
2756
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
2757
- className: "fas fa-copy"
2758
- }),
2759
- " Copy link to filtered data"
2760
- ]
2761
- })
2762
- })
2877
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
2878
+ className: `fa ${isModal ? 'fa-compress' : 'fa-expand'} ds-u-margin-right--1`
2763
2879
  }),
2764
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2765
- className: "ds-l-col--12 ds-l-md-col--auto ds-u-padding-x--0 ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--end",
2766
- children: [
2767
- (showDownloadFilteredDataButton || showStoredQueryDownloadButton) && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2768
- className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-sm-margin-left--2 ds-u-margin-bottom--2",
2769
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
2770
- className: "ds-u-text-align--center ds-u-font-weight--normal ds-u-font-size--base ds-u-margin-right--1 ds-u-display--inline-block ds-l-col--12",
2771
- href: downloadURL,
2772
- "aria-disabled": !conditions || conditions.length === 0,
2773
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
2774
- className: "ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0",
2775
- children: [
2776
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
2777
- className: "fas fa-file-csv"
2778
- }),
2779
- " ",
2780
- showDownloadFilteredDataButton ? `Download filtered data (CSV)` : `Download stored query data (CSV)`
2781
- ]
2782
- })
2783
- })
2784
- }),
2785
- showDownloadFullDataButton && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2786
- className: "ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-sm-margin-left--2 ds-u-margin-bottom--2",
2787
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
2788
- className: "ds-u-text-align--center ds-u-font-weight--normal ds-u-font-size--base ds-u-margin-right--1 ds-u-display--inline-block ds-l-col--12",
2789
- href: unfilteredDownloadURL,
2790
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
2791
- className: "ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0",
2792
- children: [
2793
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
2794
- className: "fas fa-file-csv"
2795
- }),
2796
- " Download full dataset (CSV)"
2797
- ]
2798
- })
2799
- })
2800
- })
2801
- ]
2880
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2881
+ className: "ds-u-display--none ds-u-lg-display--inline-block",
2882
+ children: isModal ? "Exit Full Screen" : "Full Screen"
2802
2883
  })
2803
2884
  ]
2804
2885
  }),
2805
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2806
- className: "ds-l-col--12 ds-u-display--flex ds-u-align-items--end ds-u-flex-direction--row-reverse ds-u-sm-flex-direction--row ds-u-padding-x--0 ds-u-margin-bottom--2 ds-u-flex-wrap--wrap",
2807
- children: [
2808
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2809
- className: "ds-l-col--12 ds-l-sm-col--8 ds-u-padding-x--0",
2810
- children: !resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2ed0091f7e32d1e6$export$2e2bcd8739ae039), {
2811
- totalRows: intCount,
2812
- limit: limit,
2813
- offset: offset
2814
- })
2815
- }),
2816
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2817
- className: "ds-l-col--12 ds-l-sm-col--4 ds-u-display--flex ds-u-justify-content--end ds-u-padding-x--0",
2818
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2819
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
2820
- options: rowOptions.map((row)=>({
2821
- label: row.toString(),
2822
- value: row
2823
- })),
2824
- size: "medium",
2825
- label: "Rows per page:",
2826
- labelClassName: "ds-u-margin-top--0",
2827
- name: "datatable_rows_per_page",
2828
- onChange: (e)=>{
2829
- setLimit(parseInt(e.target.value));
2830
- setPage(1);
2831
- setOffset(0);
2832
- },
2833
- value: limit.toString(),
2834
- defaultValue: limit.toString()
2835
- })
2836
- })
2886
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
2887
+ className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
2888
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
2889
+ heading: "Dataset Explorer",
2890
+ isOpen: modalOpen,
2891
+ onExit: ()=>setModalOpen(false),
2892
+ className: "dkan-full-screen-dataset-dialog",
2893
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $a35cf16d1488f54e$export$2e2bcd8739ae039), {
2894
+ isModal: true,
2895
+ closeFullScreenModal: ()=>setModalOpen(false)
2837
2896
  })
2838
- ]
2897
+ })
2839
2898
  })
2840
2899
  ]
2841
2900
  });
2842
2901
  };
2843
- var $6380a4a580b24362$export$2e2bcd8739ae039 = $6380a4a580b24362$var$DataTableHeader;
2902
+ var $16bd41951b91f02d$export$2e2bcd8739ae039 = $16bd41951b91f02d$var$FullScreenDataTable;
2844
2903
 
2845
2904
 
2846
2905
 
@@ -2852,102 +2911,33 @@ var $6380a4a580b24362$export$2e2bcd8739ae039 = $6380a4a580b24362$var$DataTableHe
2852
2911
 
2853
2912
 
2854
2913
 
2855
- const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions, schema: schema, customColumns: customColumns })=>{
2856
- const { fields: fields } = schema;
2857
- const prependedMessage = /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
2858
- children: "Data filters: "
2859
- });
2860
- if (!conditions || !conditions.length) return /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
2861
- className: "ds-u-margin-y--0",
2862
- children: [
2863
- prependedMessage,
2864
- " none"
2865
- ]
2866
- });
2867
- function formatValue(text, property) {
2868
- if (customColumns && customColumns.length > 0) {
2869
- let newValue = text;
2870
- let customColumn = customColumns.find((c)=>c.accessor === property);
2871
- if (customColumn && customColumn.cell) return customColumn.cell({
2872
- value: text
2873
- });
2874
- return text;
2875
- } else return text;
2876
- }
2877
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
2878
- className: "dc-querybuilder-title",
2879
- children: [
2880
- /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
2881
- className: "ds-u-margin-y--0",
2882
- children: prependedMessage
2883
- }),
2884
- conditions.map((c)=>{
2885
- const field = fields[c.property];
2886
- const description = field && field.description ? field.description : c.property;
2887
- const operator = (0, $7264a673914aa746$export$5f89a5ae87bc48e1).find((op)=>op.value === c.operator);
2888
- const cleanedText = (0, $7264a673914aa746$export$6b5e57d20078142b)(c.value);
2889
- const formattedText = formatValue(cleanedText, c.property);
2890
- return /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
2891
- className: "ds-u-fill--background ds-u-padding--1 ds-u-margin-y--1 ds-u-display--inline-block ds-u-font-weight--semibold",
2892
- children: [
2893
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2894
- className: "ds-u-font-weight--bold",
2895
- children: description
2896
- }),
2897
- " ",
2898
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2899
- className: "ds-u-font-weight--normal",
2900
- children: operator.label.toUpperCase()
2901
- }),
2902
- " ",
2903
- /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
2904
- className: "ds-u-color--success",
2905
- children: formattedText
2906
- })
2907
- ]
2908
- });
2909
- }).reduce((prev, curr)=>[
2910
- prev,
2911
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Badge), {
2912
- className: "ds-u-margin-x--1",
2913
- variation: "info",
2914
- children: "AND"
2915
- }),
2916
- curr
2917
- ])
2918
- ]
2919
- });
2920
- };
2921
- var $bef7bff2823feea2$export$2e2bcd8739ae039 = $bef7bff2823feea2$var$QueryTitle;
2922
-
2923
-
2924
-
2925
-
2926
-
2927
-
2928
-
2929
-
2930
-
2931
- function $6369abf590ca298f$var$getStartDate(condition, schema, id) {
2932
- if (schema[id].fields[condition.property].mysql_type === "date") {
2933
- const newDate = new Date(condition.value.toString());
2934
- if (newDate instanceof Date && !isNaN(newDate.getTime())) return newDate;
2935
- }
2936
- return new Date();
2937
- }
2938
- const $6369abf590ca298f$var$QueryRow = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema })=>{
2939
- const [operator, setOperator] = (0, $hgUW1$useState)(condition.operator);
2940
- const [property, setProperty] = (0, $hgUW1$useState)(condition.property);
2941
- const [value, setValue] = (0, $hgUW1$useState)(condition.value);
2942
- const [startDate, setStartDate] = (0, $hgUW1$react).useState($6369abf590ca298f$var$getStartDate(condition, schema, id));
2943
- const xl = (0, $hgUW1$useMediaQuery)({
2944
- minWidth: 1280
2914
+
2915
+
2916
+
2917
+
2918
+
2919
+
2920
+
2921
+ function $eadd6431fddf4b6c$var$getStartDate(condition, schema, id) {
2922
+ if (schema[id].fields[condition.property].mysql_type === 'date') {
2923
+ const newDate = new Date(condition.value.toString());
2924
+ if (newDate instanceof Date && !isNaN(newDate.getTime())) return newDate;
2925
+ }
2926
+ return new Date();
2927
+ }
2928
+ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className = '' })=>{
2929
+ const [operator, setOperator] = (0, $hgUW1$useState)(condition.operator);
2930
+ const [property, setProperty] = (0, $hgUW1$useState)(condition.property);
2931
+ const [value, setValue] = (0, $hgUW1$useState)(condition.value);
2932
+ const [startDate, setStartDate] = (0, $hgUW1$react).useState($eadd6431fddf4b6c$var$getStartDate(condition, schema, id));
2933
+ const xl = (0, $hgUW1$useMediaQuery)({
2934
+ minWidth: 1280
2945
2935
  });
2946
2936
  (0, $hgUW1$useEffect)(()=>{
2947
2937
  if (property !== condition.property) {
2948
- if (property) update(index, "property", property);
2949
- else update(index, "property", "");
2950
- if (schema[id].fields[condition.property].mysql_type === "date") {
2938
+ if (property) update(index, 'property', property);
2939
+ else update(index, 'property', '');
2940
+ if (schema[id].fields[condition.property].mysql_type === 'date') {
2951
2941
  if (!value) setValue(startDate.toJSON().slice(0, 10));
2952
2942
  }
2953
2943
  }
@@ -2961,140 +2951,140 @@ const $6369abf590ca298f$var$QueryRow = ({ id: id, condition: condition, index: i
2961
2951
  ]);
2962
2952
  (0, $hgUW1$useEffect)(()=>{
2963
2953
  if (operator !== condition.operator) {
2964
- if (operator) update(index, "operator", operator);
2965
- else update(index, "operator", "");
2954
+ if (operator) update(index, 'operator', operator);
2955
+ else update(index, 'operator', '');
2966
2956
  }
2967
2957
  }, [
2968
2958
  operator
2969
2959
  ]);
2970
2960
  (0, $hgUW1$useEffect)(()=>{
2971
2961
  if (value !== condition.value) {
2972
- if (value) update(index, "value", value);
2973
- else update(index, "value", "");
2962
+ if (value) update(index, 'value', value);
2963
+ else update(index, 'value', '');
2974
2964
  }
2975
2965
  }, [
2976
2966
  value
2977
2967
  ]);
2978
2968
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("fieldset", {
2979
- className: "ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--between ds-u-align-items--center ds-u-border--0",
2969
+ className: `dkan-filter-dataset-control ds-u-padding-x--2 ds-u-md-padding-x--3 ds-u-padding-y--1 ds-u-margin-top--05${className !== '' ? ` ${className}` : ''}`,
2980
2970
  children: [
2981
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2982
- className: "ds-l-col--12 ds-l-md-col--8 ds-u-display--flex ds-u-justify-content--between ds-u-padding-x--0",
2983
- children: [
2984
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
2985
- options: propertyOptions,
2986
- className: "ds-l-col--8 ds-u-padding-left--0",
2987
- value: property,
2988
- label: "Column Name",
2989
- name: `${condition.key}_property`,
2990
- onChange: (e)=>setProperty(e.target.value)
2991
- }),
2992
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
2993
- options: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[property].mysql_type),
2994
- className: "ds-l-col--4 ds-u-padding-x--0",
2995
- value: operator,
2996
- label: "Operator",
2997
- name: `${condition.key}_operator`,
2998
- onChange: (e)=>setOperator(e.target.value)
2999
- })
3000
- ]
2971
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
2972
+ options: propertyOptions,
2973
+ className: "ds-u-padding-x--0",
2974
+ value: property,
2975
+ label: "Column Name",
2976
+ name: `${condition.key}_property`,
2977
+ onChange: (e)=>setProperty(e.target.value)
3001
2978
  }),
3002
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3003
- className: "ds-l-col--12 ds-l-md-col--4 ds-u-padding-x--0 ds-u-md-padding-left--2 ds-u-display--flex ds-u-justify-content--between",
2979
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
2980
+ options: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[property].mysql_type),
2981
+ className: "ds-u-padding-x--0",
2982
+ value: operator,
2983
+ label: "Condition",
2984
+ name: `${condition.key}_operator`,
2985
+ onChange: (e)=>setOperator(e.target.value)
2986
+ }),
2987
+ schema[id].fields[property].mysql_type === 'date' ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3004
2988
  children: [
3005
- schema[id].fields[property].mysql_type === "date" ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3006
- children: [
3007
- /*#__PURE__*/ (0, $hgUW1$jsx)("label", {
3008
- className: "ds-c-label",
3009
- htmlFor: `${condition.key}_date_value`,
3010
- id: `${condition.key}_date_value-label`,
3011
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3012
- children: "Value"
3013
- })
3014
- }),
3015
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$reactdatepicker), {
3016
- name: `${condition.key}_date_value`,
3017
- selected: (0, $7264a673914aa746$export$e284ae5d89467c8f)(startDate),
3018
- onChange: (date)=>{
3019
- setStartDate(date);
3020
- setValue(date.toJSON().slice(0, 10));
3021
- },
3022
- showMonthDropdown: true,
3023
- showYearDropdown: true,
3024
- dropdownMode: "select",
3025
- className: "ds-c-field",
3026
- withPortal: true
3027
- })
3028
- ]
3029
- }) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
3030
- className: "ds-l-col--11 ds-u-padding-x--0",
3031
- label: "Value",
3032
- name: `${condition.key}_value`,
3033
- value: (0, $7264a673914aa746$export$6b5e57d20078142b)(value, operator),
3034
- onChange: (e)=>setValue(e.target.value)
3035
- }),
3036
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
3037
- variation: "ghost",
3038
- size: "small",
3039
- className: "ds-u-margin-top--6 ds-u-padding-right--0",
3040
- "aria-label": "Delete filter",
3041
- onClick: ()=>remove(index),
2989
+ /*#__PURE__*/ (0, $hgUW1$jsx)("label", {
2990
+ className: "ds-c-label",
2991
+ htmlFor: `${condition.key}_date_value`,
2992
+ id: `${condition.key}_date_value-label`,
3042
2993
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3043
- className: "fas fa-trash"
2994
+ children: "Value"
3044
2995
  })
2996
+ }),
2997
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$reactdatepicker), {
2998
+ name: `${condition.key}_date_value`,
2999
+ selected: (0, $7264a673914aa746$export$e284ae5d89467c8f)(startDate),
3000
+ onChange: (date)=>{
3001
+ setStartDate(date);
3002
+ setValue(date.toJSON().slice(0, 10));
3003
+ },
3004
+ showMonthDropdown: true,
3005
+ showYearDropdown: true,
3006
+ dropdownMode: "select",
3007
+ className: "ds-c-field",
3008
+ withPortal: true
3045
3009
  })
3046
3010
  ]
3011
+ }) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
3012
+ className: "ds-u-padding-x--0",
3013
+ label: "Value",
3014
+ name: `${condition.key}_value`,
3015
+ value: (0, $7264a673914aa746$export$6b5e57d20078142b)(value, operator),
3016
+ onChange: (e)=>setValue(e.target.value),
3017
+ placeholder: "Enter value"
3018
+ }),
3019
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
3020
+ variation: "ghost",
3021
+ size: "small",
3022
+ className: "dkan-delete-dataset-filter-button ds-u-padding-x--0 ds-u-margin-left--05 ds-u-md-margin-top--0 ds-u-border--1 ds-u-border--dark ds-u-color--black",
3023
+ "aria-label": "Delete filter",
3024
+ onClick: ()=>remove(index),
3025
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3026
+ className: "far fa-trash"
3027
+ })
3047
3028
  })
3048
3029
  ]
3049
3030
  });
3050
3031
  };
3051
- var $6369abf590ca298f$export$2e2bcd8739ae039 = $6369abf590ca298f$var$QueryRow;
3032
+ var $eadd6431fddf4b6c$export$2e2bcd8739ae039 = $eadd6431fddf4b6c$var$FilterItem;
3052
3033
 
3053
3034
 
3054
3035
 
3055
3036
 
3056
3037
 
3057
3038
 
3058
- const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn })=>{
3039
+
3040
+ const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className = '' })=>{
3059
3041
  const small = (0, $hgUW1$useMediaQuery)({
3060
3042
  minWidth: 0,
3061
3043
  maxWidth: 544
3062
3044
  });
3063
3045
  return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
3064
3046
  disabled: disabled,
3065
- className: "ds-u-float--right ds-l-md-col--6 ds-l-col--5",
3066
- variation: small ? "ghost" : undefined,
3047
+ className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ? '' : ' ds-u-float--right ds-l-md-col--6 ds-l-col--5'}${className !== '' ? ` ${className}` : ''}`,
3048
+ variation: small ? 'ghost' : undefined,
3067
3049
  onClick: ()=>clearFiltersFn(),
3068
- children: small ? "Clear all" : "Clear all filters"
3050
+ children: "Reset"
3069
3051
  });
3070
3052
  };
3071
3053
  var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFiltersButton;
3072
3054
 
3073
3055
 
3074
- function $ee4ad47aa483e5b5$var$updateQueryForDatastore(condition) {
3056
+
3057
+ function $6f4318b1e14124e5$var$updateQueryForDatastore(condition) {
3075
3058
  let cond = condition;
3076
3059
  delete cond.key;
3077
- if (cond.operator === "=" || cond.operator === "<>") {
3060
+ if (cond.operator === '=' || cond.operator === '<>') {
3078
3061
  if (Array.isArray(cond.value)) cond.value = cond.value.join();
3079
- cond.value = cond.value.replace(/(^\%+|\%+$)/gm, "");
3062
+ cond.value = cond.value.replace(/(^\%+|\%+$)/gm, '');
3080
3063
  }
3081
- if (cond.operator.toLowerCase() === "like") {
3064
+ if (cond.operator.toLowerCase() === 'like') {
3082
3065
  if (Array.isArray(cond.value)) cond.value = cond.value.join();
3083
- const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, "");
3066
+ const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, '');
3084
3067
  cond.value = `%${cleanedValue}%`;
3085
3068
  }
3086
- if (cond.operator.toLowerCase() === "in") {
3087
- if (!Array.isArray(cond.value)) cond.value = cond.value.split(",");
3069
+ if (cond.operator.toLowerCase() === 'in') {
3070
+ if (!Array.isArray(cond.value)) cond.value = cond.value.split(',');
3088
3071
  }
3089
- if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
3072
+ if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ''));
3090
3073
  return cond;
3091
3074
  }
3092
- const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, isModal: isModal = false, setPage: setPage, setOffset: setOffset })=>{
3093
- const { conditions: conditions, schema: schema, setConditions: setConditions } = resource;
3075
+ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
3076
+ const { distribution: distribution, resource: resource, customColumns: customColumns = [] } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
3077
+ const { setPage: setPage } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
3078
+ if (!resource) return null;
3079
+ const customColumnHeaders = (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution.identifier]);
3080
+ const id = distribution.identifier;
3081
+ const columns = customColumnHeaders ? customColumnHeaders : (0, $a35cf16d1488f54e$export$1147582dfae658c6)(resource.columns, resource.schema[id]);
3082
+ const { conditions: conditions, schema: schema, setConditions: setConditions, setOffset: setOffset } = resource;
3094
3083
  const fields = Object.keys(schema[id].fields);
3095
3084
  const [queryConditions, setQueryConditions] = (0, $hgUW1$useState)([]);
3096
- const [titleConditions, setTitleConditions] = (0, $hgUW1$useState)([]); // Add use effect to load conditions on first load if needed
3085
+ const [titleConditions, setTitleConditions] = (0, $hgUW1$useState)([]);
3097
3086
  const [conditionsChanged, setConditionsChanged] = (0, $hgUW1$useState)(false);
3087
+ const [modalOpen, setModalOpen] = (0, $hgUW1$useState)(false);
3098
3088
  const syncConditions = ()=>{
3099
3089
  if (conditions && conditions.length) {
3100
3090
  const keyedConditions = conditions.map((oc)=>({
@@ -3105,7 +3095,7 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
3105
3095
  } else setQueryConditions([
3106
3096
  {
3107
3097
  property: fields[0],
3108
- value: "",
3098
+ value: '',
3109
3099
  operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
3110
3100
  key: Date.now().toString()
3111
3101
  }
@@ -3122,14 +3112,14 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
3122
3112
  ...queryConditions,
3123
3113
  {
3124
3114
  property: fields[0],
3125
- value: "",
3115
+ value: '',
3126
3116
  operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
3127
3117
  key: Date.now().toString()
3128
3118
  }
3129
3119
  ]);
3130
3120
  };
3131
3121
  // Sync the UI with the actual data conditions whenever those change
3132
- (0, $hgUW1$react).useEffect(()=>{
3122
+ (0, $hgUW1$useEffect)(()=>{
3133
3123
  syncConditions();
3134
3124
  setTitleConditions(conditions);
3135
3125
  }, [
@@ -3153,23 +3143,39 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
3153
3143
  encodeValuesOnly: true,
3154
3144
  addQueryPrefix: true
3155
3145
  });
3156
- window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
3146
+ window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
3157
3147
  };
3158
- const submitConditions = (e)=>{
3148
+ const submitConditions = ()=>{
3159
3149
  // only update the data conditions when "Apply filters" is pressed
3160
- e.preventDefault();
3161
3150
  const submitConditions = queryConditions.filter((oc)=>{
3162
3151
  if (oc.property) return oc;
3163
3152
  return false;
3164
3153
  }).map((oc)=>{
3165
3154
  let cond = Object.assign({}, oc);
3166
- return $ee4ad47aa483e5b5$var$updateQueryForDatastore(cond);
3155
+ return $6f4318b1e14124e5$var$updateQueryForDatastore(cond);
3167
3156
  });
3168
- setConditions(submitConditions);
3169
- setPage(1);
3170
- setOffset(0);
3171
- setConditionsChanged(false);
3172
- updateBrowserURL(submitConditions);
3157
+ const completeConditions = conditionsReadyToSubmit(submitConditions);
3158
+ if (completeConditions.length) {
3159
+ setConditions(completeConditions);
3160
+ setPage(1);
3161
+ setOffset(0);
3162
+ setConditionsChanged(false);
3163
+ updateBrowserURL(completeConditions);
3164
+ setModalOpen(false);
3165
+ }
3166
+ };
3167
+ const conditionsReadyToSubmit = (conditions)=>{
3168
+ const isEmpty = (val)=>{
3169
+ if (typeof val === "string") return val.trim() === "";
3170
+ if (Array.isArray(val)) return val.length === 0;
3171
+ return true;
3172
+ };
3173
+ const completeConditions = conditions.filter((condition)=>{
3174
+ if (condition) {
3175
+ if (!isEmpty(condition.property) && !isEmpty(condition.operator) && !isEmpty(condition.value)) return condition;
3176
+ }
3177
+ });
3178
+ return completeConditions;
3173
3179
  };
3174
3180
  const updateCondition = (index, key, value)=>{
3175
3181
  let newConditions = [
@@ -3185,261 +3191,454 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
3185
3191
  newConditions.splice(index, 1);
3186
3192
  setQueryConditions(newConditions);
3187
3193
  setConditionsChanged(true);
3194
+ if (newConditions.length === 0) {
3195
+ setConditions([]);
3196
+ updateBrowserURL([]);
3197
+ }
3188
3198
  };
3189
- return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3190
- className: "dc-query-builder ds-u-margin-bottom--3",
3191
- children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3192
- className: "ds-c-accordion ds-c-accordion--bordered",
3193
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
3194
- heading: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bef7bff2823feea2$export$2e2bcd8739ae039), {
3195
- schema: schema[id],
3196
- conditions: titleConditions,
3197
- customColumns: customColumns
3198
- }),
3199
- defaultOpen: !isModal,
3200
- children: /*#__PURE__*/ (0, $hgUW1$jsxs)("form", {
3201
- onSubmit: (e)=>submitConditions(e),
3199
+ const disableFilterSubmitButton = ()=>{
3200
+ return !conditionsChanged || queryConditions.length === 0 || conditionsReadyToSubmit(queryConditions).length === 0;
3201
+ };
3202
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
3203
+ children: Object.keys(resource).length && columns.length && resource.schema && Object.keys(distribution).length ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3204
+ className: "dkan-filter-dataset-wrapper",
3205
+ children: [
3206
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
3207
+ "aria-label": "Filter dataset - Opens in a dialog",
3208
+ className: "dkan-filter-dataset-toolbar-button ds-u-color--primary ds-u-text-decoration--underline ds-u-font-size--sm ds-u-padding-x--2 ds-u-margin--0 ds-u-border--0 ds-u-fill--transparent",
3209
+ onClick: ()=>{
3210
+ setModalOpen(true);
3211
+ },
3202
3212
  children: [
3203
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3204
- children: queryConditions.map((qf, index)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $6369abf590ca298f$export$2e2bcd8739ae039), {
3205
- id: id,
3206
- schema: schema,
3207
- condition: qf,
3208
- index: index,
3209
- propertyOptions: propertyOptions,
3210
- update: updateCondition,
3211
- remove: removeCondition
3212
- }, qf.key))
3213
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3214
+ className: "fa fa-filter ds-u-margin-right--1"
3213
3215
  }),
3214
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3215
- className: "dc-query-bulder--form-buttons ds-u-padding-x--2 ds-u-padding-top--0 ds-u-md-padding-top--2 ds-u-display--flex ds-u-flex-wrap--wrap",
3216
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
3216
3217
  children: [
3217
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3218
- className: "ds-l-col--12 ds-l-md-col--4 ds-l-md-col--6 ds-u-padding-x--0 ds-u-margin-bottom--2 ds-u-md-margin-bottom--0",
3219
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
3220
- variation: "ghost",
3221
- onClick: ()=>addCondition(null),
3222
- className: "ds-u-padding-left--0",
3223
- children: "+ Add filter"
3218
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3219
+ className: "ds-u-display--none ds-u-lg-display--inline-block",
3220
+ children: conditions.length > 0 ? `Edit Filters` : 'Filter Dataset'
3221
+ }),
3222
+ conditions.length > 0 && ` (${conditions.length})`
3223
+ ]
3224
+ })
3225
+ ]
3226
+ }),
3227
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3228
+ className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
3229
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
3230
+ heading: "Filter Dataset",
3231
+ isOpen: modalOpen,
3232
+ onExit: ()=>setModalOpen(false),
3233
+ className: "dkan-filter-dataset-dialog",
3234
+ ariaCloseLabel: "Close filter dataset dialog",
3235
+ actions: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3236
+ className: "ds-u-display--flex ds-u-justify-content--end ds-u-padding-x--2 ds-u-md-padding-x--3 ds-u-padding-y--2",
3237
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3238
+ className: "ds-u-display--flex ",
3239
+ children: [
3240
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2eec38d4d0dbf714$export$2e2bcd8739ae039), {
3241
+ disabled: queryConditions.length === 0,
3242
+ clearFiltersFn: ()=>{
3243
+ setConditions([]);
3244
+ updateBrowserURL([]);
3245
+ },
3246
+ disableDefaultClasses: true,
3247
+ className: "ds-l-md-col--auto ds-l-col--auto ds-u-margin--right--0 ds-u-sm-margin-right--2"
3248
+ }),
3249
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
3250
+ disabled: disableFilterSubmitButton(),
3251
+ className: "dkan-apply-dataset-filters-button ds-u-float--right ds-l-md-col--auto ds-l-col--auto",
3252
+ onClick: submitConditions,
3253
+ variation: "solid",
3254
+ children: `Apply ${conditionsReadyToSubmit(queryConditions).length || ''} filter${conditionsReadyToSubmit(queryConditions).length === 1 ? '' : 's'}`
3224
3255
  })
3256
+ ]
3257
+ })
3258
+ }),
3259
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3260
+ children: [
3261
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
3262
+ className: "ds-u-margin--0 ds-u-margin-top--1 ds-u-margin-bottom--2 ds-u-padding-x--2 ds-u-md-padding-x--3",
3263
+ children: "Add filters to only display data that meets your criteria. Filtered results can be downloaded."
3225
3264
  }),
3226
3265
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3227
- className: "ds-u-display--flex ds-u-justify-content--end ds-l-col--12 ds-l-md-col--6 ds-u-padding-x--0",
3266
+ className: "dkan-filter-dataset-controls-header ds-u-padding-x--2 ds-u-md-padding-x--3 ds-u-padding-y--1 ds-u-margin-top--05 ds-u-fill--gray-lightest",
3228
3267
  children: [
3229
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
3230
- disabled: !conditionsChanged,
3231
- className: "ds-u-float--right ds-l-md-col--6 ds-u-margin--right--0 ds-u-sm-margin-right--2",
3232
- type: "submit",
3233
- variation: "solid",
3234
- children: "Apply filters"
3268
+ /*#__PURE__*/ (0, $hgUW1$jsx)("h3", {
3269
+ className: "ds-u-margin--0 ds-u-font-weight--bold ds-u-padding--0",
3270
+ children: "Column Name"
3235
3271
  }),
3236
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2eec38d4d0dbf714$export$2e2bcd8739ae039), {
3237
- disabled: queryConditions.length === 0,
3238
- clearFiltersFn: ()=>{
3239
- setConditions([]);
3240
- updateBrowserURL([]);
3241
- }
3272
+ /*#__PURE__*/ (0, $hgUW1$jsx)("h3", {
3273
+ className: "ds-u-margin--0 ds-u-font-weight--bold ds-u-padding--0",
3274
+ children: "Condition"
3275
+ }),
3276
+ /*#__PURE__*/ (0, $hgUW1$jsx)("h3", {
3277
+ className: "ds-u-margin--0 ds-u-font-weight--bold ds-u-padding--0",
3278
+ children: "Value"
3279
+ }),
3280
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3281
+ className: "dkan-filter-dataset-controls-header-gutter"
3242
3282
  })
3243
3283
  ]
3284
+ }),
3285
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3286
+ className: "dkan-filter-dataset-form-container ds-u-display--flex ds-u-flex-direction--column ds-u-border-bottom--1",
3287
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3288
+ className: "ds-u-padding-bottom--05",
3289
+ children: [
3290
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3291
+ className: "dkan-filter-dataset-controls",
3292
+ children: queryConditions.map((qf, index)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $eadd6431fddf4b6c$export$2e2bcd8739ae039), {
3293
+ id: id,
3294
+ schema: schema,
3295
+ condition: qf,
3296
+ index: index,
3297
+ propertyOptions: propertyOptions,
3298
+ update: updateCondition,
3299
+ remove: removeCondition,
3300
+ className: index !== 0 ? "ds-u-border-top--1" : "ds-u-border--0"
3301
+ }, qf.key))
3302
+ }),
3303
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3304
+ className: "ds-u-padding-x--2 ds-u-md-padding-x--3 ds-u-padding-y--1 ds-u-border-top--1 ds-u-margin-top--05",
3305
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
3306
+ onClick: ()=>addCondition(null),
3307
+ className: "dkan-add-dataset-filter-button ds-l-col--12 ds-u-radius--pill ds-u-margin-top--05 ds-u-font-weight--normal",
3308
+ children: "+ Add filter"
3309
+ })
3310
+ })
3311
+ ]
3312
+ })
3244
3313
  })
3245
3314
  ]
3246
3315
  })
3247
- ]
3316
+ })
3248
3317
  })
3249
- })
3250
- })
3318
+ ]
3319
+ }) : null
3251
3320
  });
3252
3321
  };
3253
- var $ee4ad47aa483e5b5$export$2e2bcd8739ae039 = $ee4ad47aa483e5b5$var$QueryBuilder;
3322
+ var $6f4318b1e14124e5$export$2e2bcd8739ae039 = $6f4318b1e14124e5$var$FilterDataset;
3254
3323
 
3255
3324
 
3256
3325
 
3257
- const $43a30d745a7bbc86$var$DataTableContext = /*#__PURE__*/ (0, $hgUW1$createContext)({
3258
- id: null
3259
- });
3260
- var $43a30d745a7bbc86$export$2e2bcd8739ae039 = $43a30d745a7bbc86$var$DataTableContext;
3261
-
3262
3326
 
3263
3327
 
3264
- function $a35cf16d1488f54e$export$1147582dfae658c6(columns, schema) {
3265
- return columns.map((column)=>({
3266
- header: schema && schema.fields[column].description ? schema.fields[column].description : column,
3267
- accessor: column
3268
- }));
3269
- }
3270
- const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, closeFullScreenModal: closeFullScreenModal, showQueryBuilder: showQueryBuilder = true, showCopyLinkButton: showCopyLinkButton = true, showDownloadFilteredDataButton: showDownloadFilteredDataButton = true, showDownloadFullDataButton: showDownloadFullDataButton = true, showStoredQueryDownloadButton: showStoredQueryDownloadButton = false })=>{
3271
- const { id: id, distribution: distribution, resource: resource, rootUrl: rootUrl, customColumns: customColumns = [], dataDictionaryBanner: dataDictionaryBanner } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
3272
- const { page: page, setPage: setPage } = (0, $hgUW1$useContext)((0, $ebda441784d176a5$export$2e2bcd8739ae039));
3273
- const defaultPageSize = 10;
3274
- const customColumnHeaders = (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution.identifier]);
3275
- const columns = customColumnHeaders ? customColumnHeaders : $a35cf16d1488f54e$export$1147582dfae658c6(resource.columns, resource.schema[id]);
3276
- const { limit: limit, setOffset: setOffset } = resource;
3277
- const pageSize = limit ? limit : defaultPageSize;
3278
- const downloadURL = `${rootUrl}/datastore/query/${id}/0/download?${(0, $hgUW1$qs).stringify({
3279
- conditions: resource.conditions
3280
- }, {
3281
- encode: true
3282
- })}&format=csv`;
3283
- if (Object.keys(resource).length && columns.length && resource.schema && Object.keys(distribution).length) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
3328
+ const $c5b172e8d1a8197c$var$FliterChip = ({ iconClass: iconClass, text: text, onClick: onClick })=>{
3329
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
3330
+ className: "dkan-filter-chip ds-u-display--flex ds-u-font-size--sm ds-u-align-items--center ds-u-padding-x--1 ds-u-padding-y--05 ds-u-margin--0 ds-u-margin-right--1 ds-u-margin-bottom--1",
3331
+ onClick: onClick,
3284
3332
  children: [
3285
- showQueryBuilder && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $ee4ad47aa483e5b5$export$2e2bcd8739ae039), {
3286
- resource: resource,
3287
- id: distribution.identifier,
3288
- customColumns: customColumnHeaders,
3289
- isModal: isModal,
3290
- setPage: setPage,
3291
- setOffset: setOffset
3292
- }),
3293
- dataDictionaryBanner && !isModal && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3294
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
3295
- children: 'Click on the "Data Dictionary" tab above for full column definitions'
3296
- })
3333
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3334
+ className: `${iconClass} ds-u-color--primary ds-u-margin-right--1`
3297
3335
  }),
3298
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6380a4a580b24362$export$2e2bcd8739ae039), {
3299
- resource: resource,
3300
- downloadURL: downloadURL,
3301
- unfilteredDownloadURL: distribution.data.downloadURL,
3302
- setPage: setPage,
3303
- showCopyLinkButton: showCopyLinkButton,
3304
- showDownloadFilteredDataButton: showDownloadFilteredDataButton,
3305
- showDownloadFullDataButton: showDownloadFullDataButton,
3306
- showStoredQueryDownloadButton: showStoredQueryDownloadButton
3307
- }),
3308
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3309
- className: `ds-u-border-x--1 ds-u-border-bottom--1 ${isModal && "dkan-datatable-fullscreen-mode"}`,
3310
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
3311
- canResize: true,
3312
- columns: columns,
3313
- sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
3314
- tablePadding: "ds-u-padding-y--2",
3315
- loading: resource.loading,
3316
- isModal: isModal,
3317
- closeFullScreenModal: closeFullScreenModal
3318
- })
3336
+ text,
3337
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3338
+ className: "fa fa-xmark ds-u-font-size--sm ds-u-margin-left--1"
3339
+ })
3340
+ ]
3341
+ });
3342
+ };
3343
+ var $c5b172e8d1a8197c$export$2e2bcd8739ae039 = $c5b172e8d1a8197c$var$FliterChip;
3344
+
3345
+
3346
+
3347
+
3348
+
3349
+
3350
+
3351
+
3352
+ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
3353
+ const { resource: resource } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
3354
+ const { setPage: setPage, tableDensity: tableDensity, setTableDensity: setTableDensity } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
3355
+ const rowOptions = [
3356
+ 10,
3357
+ 25,
3358
+ 50,
3359
+ 100
3360
+ ];
3361
+ if (!resource) return null;
3362
+ const { limit: limit, setLimit: setLimit, setOffset: setOffset } = resource;
3363
+ return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3364
+ className: "dkan-display-settings-wrapper",
3365
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
3366
+ className: "dkan-filter-dataset-toolbar-button ds-u-display--flex ds-u-align-items--center ds-u-color--primary ds-u-border--0 ds-u-padding--0 ds-u-padding-x--2 ds-u-margin--0 ds-u-fill--transparent ds-u-font-size--sm",
3367
+ activeClassName: "dkan-data-table-display-settings-tooltip-open",
3368
+ dialog: true,
3369
+ offset: [
3370
+ 0,
3371
+ 5
3372
+ ],
3373
+ placement: "bottom-start",
3374
+ maxWidth: "350px",
3375
+ "aria-label": "Display Settings",
3376
+ title: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3377
+ className: "ds-u-display--flex ds-u-flex-direction--column",
3378
+ children: [
3379
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3380
+ className: "dkan-data-table-display-settings-row ds-u-padding-bottom--1",
3381
+ children: [
3382
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3383
+ className: "",
3384
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3385
+ className: "ds-u-font-size--md ds-u-font-weight--normal",
3386
+ children: "Row height"
3387
+ })
3388
+ }),
3389
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3390
+ className: "ds-u-display--flex ds-u-align-items--start",
3391
+ children: [
3392
+ /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
3393
+ onClick: ()=>setTableDensity('expanded'),
3394
+ "aria-label": "Row height, Expanded",
3395
+ className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === 'expanded' ? 'active ds-u-fill--primary-lightest' : ''}`,
3396
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3397
+ className: "ds-u-display--block",
3398
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
3399
+ className: "ds-u-display--block",
3400
+ viewBox: "0 0 512 512",
3401
+ xmlns: "http://www.w3.org/2000/svg",
3402
+ "aria-hidden": "true",
3403
+ focusable: "false",
3404
+ height: "16",
3405
+ role: "img",
3406
+ width: "16",
3407
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
3408
+ d: "M496,384 C504.836556,384 512,391.163444 512,400 L512,496 C512,504.836556 504.836556,512 496,512 L16,512 C7.163444,512 1.082166e-15,504.836556 0,496 L0,400 C-1.082166e-15,391.163444 7.163444,384 16,384 L496,384 Z M496,192 C504.836556,192 512,199.163444 512,208 L512,304 C512,312.836556 504.836556,320 496,320 L16,320 C7.163444,320 1.082166e-15,312.836556 0,304 L0,208 C-1.082166e-15,199.163444 7.163444,192 16,192 L496,192 Z M496,0 C504.836556,-1.623249e-15 512,7.163444 512,16 L512,112 C512,120.836556 504.836556,128 496,128 L16,128 C7.163444,128 1.082166e-15,120.836556 0,112 L0,16 C-1.082166e-15,7.163444 7.163444,1.623249e-15 16,0 L496,0 Z"
3409
+ })
3410
+ })
3411
+ })
3412
+ }),
3413
+ /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
3414
+ onClick: ()=>setTableDensity('normal'),
3415
+ "aria-label": "Row height, Normal",
3416
+ className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === 'normal' ? 'active ds-u-fill--primary-lightest' : ''}`,
3417
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3418
+ className: "ds-u-display--block",
3419
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
3420
+ className: "ds-u-display--block",
3421
+ viewBox: "0 0 512 512",
3422
+ xmlns: "http://www.w3.org/2000/svg",
3423
+ "aria-hidden": "true",
3424
+ focusable: "false",
3425
+ height: "16",
3426
+ role: "img",
3427
+ width: "16",
3428
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
3429
+ d: "M496,416 C504.836556,416 512,423.163444 512,432 L512,496 C512,504.836556 504.836556,512 496,512 L16,512 C7.163444,512 1.082166e-15,504.836556 0,496 L0,432 C-1.082166e-15,423.163444 7.163444,416 16,416 L496,416 Z M496,277 C504.836556,277 512,284.163444 512,293 L512,357 C512,365.836556 504.836556,373 496,373 L16,373 C7.163444,373 1.082166e-15,365.836556 0,357 L0,293 C-1.082166e-15,284.163444 7.163444,277 16,277 L496,277 Z M496,139 C504.836556,139 512,146.163444 512,155 L512,219 C512,227.836556 504.836556,235 496,235 L16,235 C7.163444,235 1.082166e-15,227.836556 0,219 L0,155 C-1.082166e-15,146.163444 7.163444,139 16,139 L496,139 Z M496,0 C504.836556,-1.623249e-15 512,7.163444 512,16 L512,80 C512,88.836556 504.836556,96 496,96 L16,96 C7.163444,96 1.082166e-15,88.836556 0,80 L0,16 C-1.082166e-15,7.163444 7.163444,1.623249e-15 16,0 L496,0 Z"
3430
+ })
3431
+ })
3432
+ })
3433
+ }),
3434
+ /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
3435
+ onClick: ()=>setTableDensity('compact'),
3436
+ "aria-label": "Row height, Compact",
3437
+ className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === 'compact' ? 'active ds-u-fill--primary-lightest ' : ''}`,
3438
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3439
+ className: "ds-u-display--block",
3440
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
3441
+ className: "ds-u-display--block",
3442
+ viewBox: "0 0 512 512",
3443
+ xmlns: "http://www.w3.org/2000/svg",
3444
+ "aria-hidden": "true",
3445
+ focusable: "false",
3446
+ height: "16",
3447
+ role: "img",
3448
+ width: "16",
3449
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
3450
+ d: "M496,448 C504.836556,448 512,455.163444 512,464 L512,496 C512,504.836556 504.836556,512 496,512 L16,512 C7.163444,512 1.082166e-15,504.836556 0,496 L0,464 C-1.082166e-15,455.163444 7.163444,448 16,448 L496,448 Z M496,336 C504.836556,336 512,343.163444 512,352 L512,384 C512,392.836556 504.836556,400 496,400 L16,400 C7.163444,400 1.082166e-15,392.836556 0,384 L0,352 C-1.082166e-15,343.163444 7.163444,336 16,336 L496,336 Z M496,224 C504.836556,224 512,231.163444 512,240 L512,272 C512,280.836556 504.836556,288 496,288 L16,288 C7.163444,288 1.082166e-15,280.836556 0,272 L0,240 C-1.082166e-15,231.163444 7.163444,224 16,224 L496,224 Z M496,112 C504.836556,112 512,119.163444 512,128 L512,160 C512,168.836556 504.836556,176 496,176 L16,176 C7.163444,176 1.082166e-15,168.836556 0,160 L0,128 C-1.082166e-15,119.163444 7.163444,112 16,112 L496,112 Z M496,0 C504.836556,-1.623249e-15 512,7.163444 512,16 L512,48 C512,56.836556 504.836556,64 496,64 L16,64 C7.163444,64 1.082166e-15,56.836556 0,48 L0,16 C-1.082166e-15,7.163444 7.163444,1.623249e-15 16,0 L496,0 Z"
3451
+ })
3452
+ })
3453
+ })
3454
+ })
3455
+ ]
3456
+ })
3457
+ ]
3458
+ }),
3459
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3460
+ className: "dkan-data-table-display-settings-row ds-u-border-top--1 ds-u-padding-top--1",
3461
+ children: [
3462
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3463
+ className: "",
3464
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3465
+ className: "ds-u-font-size--md ds-u-font-weight--normal",
3466
+ children: "Rows per page"
3467
+ })
3468
+ }),
3469
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
3470
+ className: "",
3471
+ options: rowOptions.map((row)=>({
3472
+ label: row.toString(),
3473
+ value: row
3474
+ })),
3475
+ size: "medium",
3476
+ label: "Rows per page:",
3477
+ labelClassName: "ds-u-margin-top--0 ds-u-font-size--md ds-u-font-weight--normal",
3478
+ name: "datatable_rows_per_page",
3479
+ onChange: (e)=>{
3480
+ setLimit(parseInt(e.target.value));
3481
+ setPage(1);
3482
+ setOffset(0);
3483
+ },
3484
+ value: limit.toString(),
3485
+ defaultValue: limit.toString()
3486
+ })
3487
+ ]
3488
+ })
3489
+ ]
3319
3490
  }),
3320
- !resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3321
- className: "ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--end ds-u-md-justify-content--between ds-u-margin-top--2 ds-u-align-items--center",
3322
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
3323
- totalPages: Math.ceil(resource.count ? resource.count / pageSize : 1),
3324
- currentPage: Number(page),
3325
- onPageChange: (evt, page)=>{
3326
- evt.preventDefault();
3327
- setOffset((page - 1) * limit);
3328
- setPage(page);
3329
- },
3330
- renderHref: (p)=>`?page=${p}`,
3331
- className: "ds-l-col--12 ds-u-padding-x--0"
3491
+ children: [
3492
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3493
+ className: "far fa-sliders-h ds-u-margin-right--1"
3494
+ }),
3495
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3496
+ className: "ds-u-display--none ds-u-lg-display--inline-block",
3497
+ children: "Display Settings"
3498
+ }),
3499
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3500
+ className: "fa fa-chevron-down ds-u-margin-left--1 ds-u-font-weight--bold"
3501
+ }),
3502
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3503
+ className: "fa fa-chevron-up ds-u-margin-left--1 ds-u-font-weight--bold"
3332
3504
  })
3333
- })
3334
- ]
3335
- });
3336
- else return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
3337
- "aria-valuetext": "Dataset loading",
3338
- role: "status",
3339
- className: "ds-u-margin--3"
3505
+ ]
3506
+ })
3340
3507
  });
3341
3508
  };
3342
- var $a35cf16d1488f54e$export$2e2bcd8739ae039 = $a35cf16d1488f54e$var$DatasetTable;
3509
+ var $dae856e97a09bcd6$export$2e2bcd8739ae039 = $dae856e97a09bcd6$var$DisplaySettings;
3343
3510
 
3344
3511
 
3345
- const $16bd41951b91f02d$var$FullScreenDataTable = ({ modalOpen: modalOpen, setModalOpen: setModalOpen })=>{
3346
- return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3347
- className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
3348
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
3349
- heading: "Dataset Explorer",
3350
- isOpen: modalOpen,
3351
- onExit: ()=>setModalOpen(false),
3352
- className: "dkan-full-screen-dataset-dialog",
3353
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $a35cf16d1488f54e$export$2e2bcd8739ae039), {
3354
- isModal: true,
3355
- closeFullScreenModal: ()=>setModalOpen(false)
3356
- })
3357
- })
3512
+
3513
+ const $85f8ff1ff89899c7$var$updateBrowserURL = (newConditions)=>{
3514
+ const url = new URL(window.location.href);
3515
+ const urlString = (0, $hgUW1$qs).stringify({
3516
+ conditions: newConditions
3517
+ }, {
3518
+ encodeValuesOnly: true,
3519
+ addQueryPrefix: true
3358
3520
  });
3521
+ window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
3359
3522
  };
3360
- var $16bd41951b91f02d$export$2e2bcd8739ae039 = $16bd41951b91f02d$var$FullScreenDataTable;
3361
-
3362
-
3363
- const $71b4324f265dec16$var$DataTableControls = ({ id: id, columns: columns, defaultColumnOrder: defaultColumnOrder, isModal: isModal, closeFullScreenModal: closeFullScreenModal })=>{
3364
- const [manageColumnsModalOpen, setManageColumnsModalOpen] = (0, $hgUW1$useState)(false);
3365
- const [fullScreenModalOpen, setFullScreenModalOpen] = (0, $hgUW1$useState)(false);
3366
- const hiddenColumns = columns.filter((c)=>c.getIsVisible() === false).length;
3367
- return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
3523
+ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, columns: columns, defaultColumnOrder: defaultColumnOrder, isModal: isModal, closeFullScreenModal: closeFullScreenModal, datasetTableControls: datasetTableControls, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility })=>{
3524
+ const { limit: limit, offset: offset, count: count, conditions: conditions, setConditions: setConditions } = resource;
3525
+ const intCount = count ? count : 0;
3526
+ const hiddenColumns = Object.keys(columnVisibility).filter((key)=>columnVisibility[key] === false).length;
3527
+ const resetColumnVisibility = ()=>{
3528
+ const columns = {
3529
+ ...columnVisibility
3530
+ };
3531
+ for(let key in columns)if (columns[key] === false) columns[key] = true;
3532
+ setColumnVisibility(columns);
3533
+ // save to localStorage
3534
+ const currentLocalStorage = JSON.parse(localStorage.getItem(id));
3535
+ const updatedLocalStorageData = {
3536
+ ...currentLocalStorage,
3537
+ tableColumnVisibility: columns
3538
+ };
3539
+ localStorage.setItem(id, JSON.stringify(updatedLocalStorageData));
3540
+ };
3541
+ const removeCondition = (index)=>{
3542
+ // just removes the condition from the UI - "Apply Filters" must be clicked to change the data model
3543
+ let updatedConditions = JSON.parse(JSON.stringify(conditions));
3544
+ updatedConditions.splice(index, 1);
3545
+ setConditions(updatedConditions);
3546
+ $85f8ff1ff89899c7$var$updateBrowserURL(updatedConditions);
3547
+ };
3548
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3549
+ className: "ds-u-margin-top--2",
3368
3550
  children: [
3369
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3370
- className: "ds-u-border-top--1 ds-u-fill--gray-lightest ds-u-display--flex ds-u-justify-content--between",
3371
- children: [
3372
- /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3373
- children: hiddenColumns > 0 && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Alert), {
3374
- variation: "warn",
3551
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3552
+ className: "dkan-filter-dataset-toolbar ds-u-fill--white ds-u-border--1",
3553
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3554
+ className: "ds-l-col--12 ds-u-display--flex ds-u-justify-content--between ds-u-align-items--center ds-u-flex-wrap--wrap ds-u-padding-x--0 ds-u-padding-y--2",
3555
+ children: [
3556
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3557
+ className: "ds-u-padding-x--2",
3558
+ children: !resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2ed0091f7e32d1e6$export$2e2bcd8739ae039), {
3559
+ totalRows: intCount,
3560
+ limit: limit,
3561
+ offset: offset,
3562
+ className: "data-table-results ds-u-margin--0 ds-u-font-size--sm ds-u-padding-y--0 ds-u-md-padding-y--1 ds-u-padding-bottom--2 ds-u-md-padding-bottom--0"
3563
+ })
3564
+ }),
3565
+ datasetTableControls && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3566
+ className: "dkan-data-table-toolbar-controls ds-u-display--flex ds-u-flex-wrap--wrap ds-u-align-items--center ds-l-md-col--auto ds-l-col--12 ds-u-padding-x--2 ds-u-padding-top--2 ds-u-md-padding-top--0",
3375
3567
  children: [
3376
- hiddenColumns,
3377
- " Columns Hidden"
3568
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6f4318b1e14124e5$export$2e2bcd8739ae039), {}),
3569
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5d9e2ce238d53d29$export$2e2bcd8739ae039), {
3570
+ id: id,
3571
+ columns: columns,
3572
+ defaultColumnOrder: defaultColumnOrder
3573
+ }),
3574
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $dae856e97a09bcd6$export$2e2bcd8739ae039), {}),
3575
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $16bd41951b91f02d$export$2e2bcd8739ae039), {
3576
+ isModal: isModal,
3577
+ closeFullScreenModal: closeFullScreenModal
3578
+ })
3378
3579
  ]
3379
3580
  })
3581
+ ]
3582
+ })
3583
+ }),
3584
+ Array.isArray(conditions) && (conditions.length > 0 || hiddenColumns > 0) && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3585
+ className: "ds-u-fill--white ds-u-padding-x--0 ds-u-md-padding-x--2 ds-u-padding-top--2",
3586
+ children: [
3587
+ /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
3588
+ className: "ds-u-margin--0 ds-u-margin-bottom--2 ds-u-font-size--lg ds-u-font-weight--bold",
3589
+ children: "Selected filters"
3380
3590
  }),
3381
3591
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3592
+ className: "ds-u-display--flex ds-u-justify-content--between ds-u-md-align-items--end ds-u-flex-direction--column ds-u-md-flex-direction--row",
3382
3593
  children: [
3383
- /*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
3384
- "aria-label": "Manage columns - Opens in a dialog",
3385
- className: "ds-c-button ds-c-button--ghost ds-u-margin-y--1",
3386
- onClick: ()=>{
3387
- setManageColumnsModalOpen(true);
3388
- },
3594
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3595
+ className: "ds-u-display--flex ds-u-padding-right--0 ds-u-md-padding-right--4 ds-u-flex-wrap--wrap",
3389
3596
  children: [
3390
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3391
- className: "far fa-cog ds-u-margin-right--1"
3392
- }),
3393
- "Manage Columns"
3597
+ conditions.length > 0 ? conditions.map((condition, index)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $c5b172e8d1a8197c$export$2e2bcd8739ae039), {
3598
+ iconClass: "far fa-filter",
3599
+ text: `"${condition.property}" ${condition.operator} ${condition.value}`,
3600
+ onClick: ()=>{
3601
+ removeCondition(index);
3602
+ }
3603
+ }, index)) : null,
3604
+ hiddenColumns > 0 ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $c5b172e8d1a8197c$export$2e2bcd8739ae039), {
3605
+ iconClass: "fa fa-columns",
3606
+ text: `${hiddenColumns} Column${hiddenColumns === 1 ? '' : 's'} Hidden`,
3607
+ onClick: ()=>{
3608
+ resetColumnVisibility();
3609
+ }
3610
+ }) : null
3394
3611
  ]
3395
3612
  }),
3396
- /*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
3397
- "aria-label": isModal ? "Close Full Screen dialog" : "Full Screen mode - Opens in a dialog",
3398
- className: "ds-c-button ds-c-button--ghost ds-u-margin-y--1",
3399
- onClick: ()=>{
3400
- if (isModal) closeFullScreenModal();
3401
- else setFullScreenModalOpen(true);
3402
- },
3403
- children: [
3404
- /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3405
- className: `fa ${isModal ? "fa-compress" : "fa-expand"} ds-u-margin-right--1`
3406
- }),
3407
- isModal ? "Exit Full Screen" : "Full Screen"
3408
- ]
3613
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3614
+ className: "ds-l-col--auto ds-u-padding--0 ds-u-display--flex ds-u-justify-content--end",
3615
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
3616
+ className: "dkan-clear-all-filters-button ds-u-color--primary ds-u-font-size--md ds-u-font-weight--bold ds-u-border--0 ds-u-padding--0 ds-u-margin--0 ds-u-fill--transparent ds-u-text-decoration--underline ds-u-margin-bottom--1",
3617
+ onClick: ()=>{
3618
+ setConditions([]);
3619
+ $85f8ff1ff89899c7$var$updateBrowserURL([]);
3620
+ resetColumnVisibility();
3621
+ },
3622
+ children: "Clear all filters"
3623
+ })
3409
3624
  })
3410
3625
  ]
3411
3626
  })
3412
3627
  ]
3413
- }),
3414
- /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3415
- children: [
3416
- /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5d9e2ce238d53d29$export$2e2bcd8739ae039), {
3417
- id: id,
3418
- columns: columns,
3419
- defaultColumnOrder: defaultColumnOrder,
3420
- modalOpen: manageColumnsModalOpen,
3421
- setModalOpen: setManageColumnsModalOpen
3422
- }),
3423
- !isModal && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $16bd41951b91f02d$export$2e2bcd8739ae039), {
3424
- modalOpen: fullScreenModalOpen,
3425
- setModalOpen: setFullScreenModalOpen
3426
- })
3427
- ]
3428
3628
  })
3429
3629
  ]
3430
3630
  });
3431
3631
  };
3432
- var $71b4324f265dec16$export$2e2bcd8739ae039 = $71b4324f265dec16$var$DataTableControls;
3433
-
3632
+ var $85f8ff1ff89899c7$export$2e2bcd8739ae039 = $85f8ff1ff89899c7$var$DataTableToolbar;
3434
3633
 
3435
3634
 
3436
-
3437
- const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sortTransform, tablePadding: tablePadding, canResize: canResize, loading: loading = false, isModal: isModal, closeFullScreenModal: closeFullScreenModal })=>{
3438
- const { id: id, resource: resource, datasetTableControls: datasetTableControls } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
3439
- const { columnOrder: columnOrder, setColumnOrder: setColumnOrder, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility } = (0, $hgUW1$useContext)((0, $ebda441784d176a5$export$2e2bcd8739ae039));
3635
+ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sortTransform, tablePadding: tablePadding, canResize: canResize, loading: loading = false, isModal: isModal, closeFullScreenModal: closeFullScreenModal, downloadURL: downloadURL, unfilteredDownloadURL: unfilteredDownloadURL, setPage: setPage, showCopyLinkButton: showCopyLinkButton, showDataTableToolbar: showDataTableToolbar, showDownloadFilteredDataButton: showDownloadFilteredDataButton, showDownloadFullDataButton: showDownloadFullDataButton, showStoredQueryDownloadButton: showStoredQueryDownloadButton })=>{
3636
+ const { id: id, resource: resource, datasetTableControls: datasetTableControls, dataDictionaryBanner: dataDictionaryBanner } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
3637
+ const { columnOrder: columnOrder, setColumnOrder: setColumnOrder, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
3638
+ const { conditions: conditions } = resource;
3440
3639
  const data = resource.values;
3441
3640
  const [sorting, setSorting] = (0, $hgUW1$useState)([]);
3442
- const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)("");
3641
+ const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
3443
3642
  const dataTableWrapperElement = (0, $hgUW1$useRef)(null);
3444
3643
  const columnHelper = (0, $hgUW1$createColumnHelper)();
3445
3644
  const table_columns = columns.map((col)=>{
@@ -3458,9 +3657,9 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
3458
3657
  columnOrder
3459
3658
  ]);
3460
3659
  const sortElement = (isSorted, onClickFn)=>{
3461
- if (isSorted === "asc") return "dc-c-sort--asc";
3462
- if (isSorted === "desc") return "dc-c-sort--desc";
3463
- return "dc-c-sort--default";
3660
+ if (isSorted === 'asc') return 'dc-c-sort--asc';
3661
+ if (isSorted === 'desc') return 'dc-c-sort--desc';
3662
+ return 'dc-c-sort--default';
3464
3663
  };
3465
3664
  const filters = [];
3466
3665
  const table = (0, $hgUW1$useReactTable)({
@@ -3472,7 +3671,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
3472
3671
  columnVisibility: columnVisibility,
3473
3672
  sorting: sorting
3474
3673
  },
3475
- columnResizeMode: "onChange",
3674
+ columnResizeMode: 'onChange',
3476
3675
  onSortingChange: setSorting,
3477
3676
  onColumnOrderChange: setColumnOrder,
3478
3677
  onColumnVisibilityChange: setColumnVisibility,
@@ -3489,7 +3688,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
3489
3688
  const defaultColumnOrder = (0, $hgUW1$useMemo)(()=>table_columns.map((column)=>column.accessorKey), []);
3490
3689
  const tableWrapperWidth = ()=>{
3491
3690
  if (dataTableWrapperElement.current) return dataTableWrapperElement.current.offsetWidth;
3492
- return "auto";
3691
+ return 'auto';
3493
3692
  };
3494
3693
  (0, $hgUW1$useEffect)(()=>{
3495
3694
  setHighlightRow(null);
@@ -3498,17 +3697,146 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
3498
3697
  ]);
3499
3698
  return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
3500
3699
  children: [
3501
- datasetTableControls && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3502
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $71b4324f265dec16$export$2e2bcd8739ae039), {
3503
- id: id,
3504
- columns: table.getAllLeafColumns(),
3505
- defaultColumnOrder: defaultColumnOrder,
3506
- isModal: isModal,
3507
- closeFullScreenModal: closeFullScreenModal
3508
- })
3700
+ showDataTableToolbar && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
3701
+ children: [
3702
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3703
+ className: "ds-u-margin-bottom--3",
3704
+ children: showDownloadFullDataButton && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
3705
+ className: "ds-c-button ds-c-button--solid ds-l-col--12 ds-l-md-col--auto",
3706
+ href: unfilteredDownloadURL,
3707
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
3708
+ className: "ds-u-font-weight--bold ds-u-font-size--md ds-u-margin-x--0 ds-u-padding--0",
3709
+ children: [
3710
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3711
+ className: "fas fa-file-csv"
3712
+ }),
3713
+ " Download full dataset (CSV)"
3714
+ ]
3715
+ })
3716
+ })
3717
+ }),
3718
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $85f8ff1ff89899c7$export$2e2bcd8739ae039), {
3719
+ id: id,
3720
+ columns: table.getAllLeafColumns(),
3721
+ defaultColumnOrder: defaultColumnOrder,
3722
+ isModal: isModal,
3723
+ closeFullScreenModal: closeFullScreenModal,
3724
+ resource: resource,
3725
+ datasetTableControls: datasetTableControls,
3726
+ columnVisibility: columnVisibility,
3727
+ setColumnVisibility: setColumnVisibility
3728
+ }),
3729
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3730
+ className: "ds-u-display--flex ds-l-col--12 ds-l-md-col--11 ds-u-justify-content--between ds-u-padding--0 ds-u-margin-y--2 ds-u-md-margin-y--3 ds-u-flex-direction--column ds-u-md-flex-direction--row",
3731
+ children: [
3732
+ /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3733
+ className: "dkan-data-table-info-container ds-u-padding-right--0 ds-u-md-padding-right--4",
3734
+ children: [
3735
+ dataDictionaryBanner && !isModal && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3736
+ className: "ds-u-margin-bottom--3",
3737
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
3738
+ children: 'Click on the "Data Dictionary" tab above for full column definitions'
3739
+ })
3740
+ }),
3741
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
3742
+ className: "ds-u-margin--0",
3743
+ children: "Activate the column resize button and use the right and left arrow keys to resize a column or use your mouse to drag/resize. Press escape to cancel the resizing."
3744
+ })
3745
+ ]
3746
+ }),
3747
+ /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3748
+ className: "dkan-data-table-share-container ds-l-col--auto ds-u-padding--0 ds-u-margin-bottom--2 ds-u-md-margin-bottom--0",
3749
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
3750
+ className: "ds-c-button ds-c-button--solid ds-u-display--flex ds-u-align-items--center ds-u-border--0 ds-u-padding-x--3 ds-u-padding-y--1 ds-u-font-weight--bold ds-l-col--12 ds-l-md-col--auto ds-u-justify-content--center",
3751
+ activeClassName: "dkan-data-table-share-tooltip-open",
3752
+ dialog: true,
3753
+ offset: [
3754
+ 0,
3755
+ 5
3756
+ ],
3757
+ placement: "bottom-start",
3758
+ maxWidth: "320px",
3759
+ title: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3760
+ className: "dc-c-resource-header--buttons ds-u-display--flex ds-u-flex-direction--column ds-l-col--12 ds-u-padding-x--0",
3761
+ children: [
3762
+ showCopyLinkButton && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
3763
+ children: conditions && conditions.length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Tooltip), {
3764
+ onOpen: ()=>{
3765
+ navigator.clipboard.writeText(window.location.href);
3766
+ },
3767
+ className: "ds-c-button ds-c-button--solid ds-u-font-weight-bold ds-l-col--12 ds-l-md-col--auto",
3768
+ placement: "bottom",
3769
+ dialog: true,
3770
+ ariaLabel: "Copy link to filtered data",
3771
+ title: "Link copied to clipboard",
3772
+ "aria-disabled": !conditions || conditions.length === 0,
3773
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
3774
+ className: "ds-u-font-weight--normal ds-u-font-size--md ds-u-margin-x--0 ds-u-padding--0",
3775
+ children: [
3776
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3777
+ className: "fas fa-copy"
3778
+ }),
3779
+ " Copy link to filtered data"
3780
+ ]
3781
+ })
3782
+ }) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
3783
+ "aria-disabled": true,
3784
+ "aria-label": "Copy link to filtered data",
3785
+ className: "dkan-data-table-download-button ds-c-button ds-u-text-align--center ds-l-col--12 ds-u-padding-x--2 ds-u-margin-x--0 ds-u-margin-bottom--1",
3786
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
3787
+ className: "ds-u-font-weight--normal ds-u-font-size--md ds-u-padding--0",
3788
+ children: [
3789
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3790
+ className: "fas fa-copy"
3791
+ }),
3792
+ " Copy link to filtered data"
3793
+ ]
3794
+ })
3795
+ })
3796
+ }),
3797
+ (showDownloadFilteredDataButton || showStoredQueryDownloadButton) && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
3798
+ className: "ds-l-col--12 ds-u-padding-x--0 ds-u-margin-x--0",
3799
+ children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
3800
+ className: "dkan-data-table-download-button ds-u-text-align--center ds-u-display--inline-block ds-l-col--12 ds-u-padding-x--2 ds-u-margin-x--0 ds-u-margin-bottom--1",
3801
+ href: downloadURL,
3802
+ "aria-disabled": !conditions || conditions.length === 0,
3803
+ children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
3804
+ className: "ds-u-font-weight--normal ds-u-font-size--md ds-u-padding--0",
3805
+ children: [
3806
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3807
+ className: "fas fa-file-csv"
3808
+ }),
3809
+ " ",
3810
+ showDownloadFilteredDataButton ? `Download filtered data (CSV)` : `Download stored query data (CSV)`
3811
+ ]
3812
+ })
3813
+ })
3814
+ })
3815
+ ]
3816
+ }),
3817
+ children: [
3818
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3819
+ className: "far fa-share-alt"
3820
+ }),
3821
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3822
+ className: "ds-u-margin-x--05",
3823
+ children: "Share"
3824
+ }),
3825
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3826
+ className: "fa fa-chevron-down"
3827
+ }),
3828
+ /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
3829
+ className: "fa fa-chevron-up"
3830
+ })
3831
+ ]
3832
+ })
3833
+ })
3834
+ ]
3835
+ })
3836
+ ]
3509
3837
  }),
3510
3838
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
3511
- className: "dc-c-datatable-wrapper",
3839
+ className: "dc-c-datatable-wrapper ds-u-border-x--1 ds-u-border-bottom--1",
3512
3840
  tabIndex: 0,
3513
3841
  ref: dataTableWrapperElement,
3514
3842
  children: [
@@ -3591,7 +3919,7 @@ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, a
3591
3919
  },
3592
3920
  labelClassName: "ds-u-visibility--screen-reader",
3593
3921
  name: accessor,
3594
- value: filterValue || ""
3922
+ value: filterValue || ''
3595
3923
  });
3596
3924
  }
3597
3925
  const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true })=>{
@@ -3667,7 +3995,7 @@ const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage, pageTrail:
3667
3995
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3668
3996
  children: currentPage
3669
3997
  })
3670
- }) : ""
3998
+ }) : ''
3671
3999
  ]
3672
4000
  })
3673
4001
  });
@@ -3724,11 +4052,11 @@ var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRigh
3724
4052
 
3725
4053
 
3726
4054
 
3727
- const $bdb071ea3a6d3466$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", {
4055
+ const $bdb071ea3a6d3466$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", {
3728
4056
  className: "search-input-container",
3729
4057
  children: [
3730
4058
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
3731
- className: `${showMagnifyingGlass ? "left-padding" : ""} ${showSearchButton ? "right-padding" : ""}`,
4059
+ className: `${showMagnifyingGlass ? 'left-padding' : ''} ${showSearchButton ? 'right-padding' : ''}`,
3732
4060
  label: placeholder,
3733
4061
  labelClassName: "ds-u-visibility--screen-reader",
3734
4062
  placeholder: placeholder,
@@ -3743,7 +4071,7 @@ const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = "Search
3743
4071
  }),
3744
4072
  showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
3745
4073
  variation: "solid",
3746
- className: onDark && "on-dark",
4074
+ className: onDark && 'on-dark',
3747
4075
  onClick: onSubmit,
3748
4076
  children: [
3749
4077
  /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
@@ -3862,7 +4190,7 @@ const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: roo
3862
4190
  url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
3863
4191
  addQueryPrefix: true
3864
4192
  })}`,
3865
- docExpansion: "list",
4193
+ docExpansion: 'list',
3866
4194
  defaultModelsExpandDepth: -1,
3867
4195
  plugins: [
3868
4196
  (0, $hgUW1$SpanOpenAPIVersion),
@@ -3970,7 +4298,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
3970
4298
  size: "big",
3971
4299
  type: "submit",
3972
4300
  style: {
3973
- width: "70px"
4301
+ width: '70px'
3974
4302
  },
3975
4303
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3976
4304
  className: "fas fa-search small-text"
@@ -3987,7 +4315,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
3987
4315
  className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
3988
4316
  children: [
3989
4317
  /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
3990
- children: text ? text : "Search"
4318
+ children: text ? text : 'Search'
3991
4319
  }),
3992
4320
  ` `,
3993
4321
  /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
@@ -4072,12 +4400,12 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
4072
4400
  fulltext: fulltext ? fulltext : undefined,
4073
4401
  ...selectedFacets,
4074
4402
  sort: sort ? sort : undefined,
4075
- ["sort-order"]: sortOrder ? sortOrder : undefined,
4403
+ ['sort-order']: sortOrder ? sortOrder : undefined,
4076
4404
  page: page !== 1 ? page : undefined,
4077
- ["page-size"]: pageSize !== 10 ? pageSize : undefined
4405
+ ['page-size']: pageSize !== 10 ? pageSize : undefined
4078
4406
  };
4079
4407
  return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
4080
- arrayFormat: "comma",
4408
+ arrayFormat: 'comma',
4081
4409
  encode: false
4082
4410
  })}`);
4083
4411
  }
@@ -4088,26 +4416,26 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
4088
4416
 
4089
4417
  const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
4090
4418
  const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
4091
- defaultSort: "modified",
4092
- defaultOrder: "desc"
4093
- }, pageTitle: pageTitle = "Dataset Explorer", filterTitle: filterTitle = "Tags", showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = "", showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false } = props;
4419
+ defaultSort: 'modified',
4420
+ defaultOrder: 'desc'
4421
+ }, pageTitle: pageTitle = 'Dataset Explorer', filterTitle: filterTitle = 'Tags', showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = '', showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false } = props;
4094
4422
  const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
4095
4423
  const sortOptions = [
4096
4424
  {
4097
- label: "Newest",
4098
- value: "newest"
4425
+ label: 'Newest',
4426
+ value: 'newest'
4099
4427
  },
4100
4428
  {
4101
- label: "Oldest",
4102
- value: "oldest"
4429
+ label: 'Oldest',
4430
+ value: 'oldest'
4103
4431
  },
4104
4432
  {
4105
- label: "Title A-Z",
4106
- value: "titleAZ"
4433
+ label: 'Title A-Z',
4434
+ value: 'titleAZ'
4107
4435
  },
4108
4436
  {
4109
- label: "Title Z-A",
4110
- value: "titleZA"
4437
+ label: 'Title Z-A',
4438
+ value: 'titleZA'
4111
4439
  }
4112
4440
  ];
4113
4441
  const defaultSortBy = "";
@@ -4126,7 +4454,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
4126
4454
  endingNumber: 0
4127
4455
  });
4128
4456
  const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
4129
- const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
4457
+ const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)('');
4130
4458
  let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
4131
4459
  const [fulltext, setFullText] = (0, $hgUW1$useState)(transformedParams.fulltext);
4132
4460
  const [filterText, setFilterText] = (0, $hgUW1$useState)(transformedParams.fulltext);
@@ -4135,7 +4463,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
4135
4463
  const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
4136
4464
  const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
4137
4465
  const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
4138
- return sort === "modified" ? sortOrder === "desc" ? "newest" : "oldest" : sortOrder === "desc" ? "titleZA" : "titleAZ";
4466
+ return sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
4139
4467
  });
4140
4468
  const [selectedFacets, setSelectedFacets] = (0, $hgUW1$useState)(transformedParams.selectedFacets ? transformedParams.selectedFacets : {
4141
4469
  theme: [],
@@ -4144,21 +4472,21 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
4144
4472
  const setSortOptions = (value)=>{
4145
4473
  setSortDisplay(value);
4146
4474
  switch(value){
4147
- case "newest":
4148
- setSort("modified");
4149
- setSortOrder("desc");
4475
+ case 'newest':
4476
+ setSort('modified');
4477
+ setSortOrder('desc');
4150
4478
  break;
4151
- case "oldest":
4152
- setSort("modified");
4153
- setSortOrder("asc");
4479
+ case 'oldest':
4480
+ setSort('modified');
4481
+ setSortOrder('asc');
4154
4482
  break;
4155
- case "titleAZ":
4156
- setSort("title");
4157
- setSortOrder("asc");
4483
+ case 'titleAZ':
4484
+ setSort('title');
4485
+ setSortOrder('asc');
4158
4486
  break;
4159
- case "titleZA":
4160
- setSort("title");
4161
- setSortOrder("desc");
4487
+ case 'titleZA':
4488
+ setSort('title');
4489
+ setSortOrder('desc');
4162
4490
  break;
4163
4491
  }
4164
4492
  };
@@ -4166,12 +4494,12 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
4166
4494
  const newFacets = {
4167
4495
  ...selectedFacets
4168
4496
  };
4169
- if (key === "theme") {
4497
+ if (key === 'theme') {
4170
4498
  const existingFacet = newFacets.theme.findIndex((s)=>s === value);
4171
4499
  if (existingFacet > -1) newFacets.theme.splice(existingFacet, 1);
4172
4500
  else newFacets.theme.push(value);
4173
4501
  }
4174
- if (key === "keyword") {
4502
+ if (key === 'keyword') {
4175
4503
  const existingFacet = newFacets.keyword.findIndex((s)=>s === value);
4176
4504
  if (existingFacet > -1) newFacets.keyword.splice(existingFacet, 1);
4177
4505
  else newFacets.keyword.push(value);
@@ -4185,14 +4513,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
4185
4513
  });
4186
4514
  setSelectedFacets(newFacets);
4187
4515
  const url = new URL(window.location.href);
4188
- window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
4516
+ window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
4189
4517
  }
4190
4518
  const pageSize = defaultPageSize;
4191
4519
  (0, $hgUW1$useEffect)(()=>{
4192
4520
  // Update browser URL with current search params
4193
4521
  const params = buildSearchParams(true);
4194
4522
  const url = new URL(window.location.href);
4195
- window.history.pushState({}, "", `${url.origin}${url.pathname}${params}`);
4523
+ window.history.pushState({}, '', `${url.origin}${url.pathname}${params}`);
4196
4524
  const baseNumber = Number(totalItems) > 0 ? 1 : 0;
4197
4525
  const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
4198
4526
  const endingNumber = Number(pageSize) * Number(page);
@@ -4231,14 +4559,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
4231
4559
  setSelectedFacets(defaultSelectedFacets);
4232
4560
  setPage(defaultPage);
4233
4561
  const url = new URL(window.location.href);
4234
- window.history.pushState({}, "", `${url.origin}${url.pathname}`);
4562
+ window.history.pushState({}, '', `${url.origin}${url.pathname}`);
4235
4563
  }
4236
4564
  function buildSearchParams(includePage) {
4237
4565
  let newParams = {};
4238
4566
  if (Number(page) !== 1 && includePage) newParams.page = page;
4239
4567
  if (sort !== defaultSort.defaultSort) newParams.sort = sort;
4240
4568
  if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
4241
- if (fulltext !== "") newParams.fulltext = fulltext;
4569
+ if (fulltext !== '') newParams.fulltext = fulltext;
4242
4570
  if (Object.keys(selectedFacets).length) Object.keys(selectedFacets).forEach((key)=>{
4243
4571
  newParams[key] = selectedFacets[key];
4244
4572
  });
@@ -4251,9 +4579,9 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
4251
4579
  fulltext: fulltext ? fulltext : undefined,
4252
4580
  ...selectedFacets,
4253
4581
  sort: sort ? sort : undefined,
4254
- ["sort-order"]: sortOrder ? sortOrder : undefined,
4582
+ ['sort-order']: sortOrder ? sortOrder : undefined,
4255
4583
  page: page !== 1 ? page : undefined,
4256
- ["page-size"]: pageSize !== 10 ? pageSize : undefined
4584
+ ['page-size']: pageSize !== 10 ? pageSize : undefined
4257
4585
  };
4258
4586
  const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
4259
4587
  queryKey: [
@@ -4262,7 +4590,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
4262
4590
  ],
4263
4591
  queryFn: ()=>{
4264
4592
  return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
4265
- arrayFormat: "comma",
4593
+ arrayFormat: 'comma',
4266
4594
  encode: false
4267
4595
  })}`);
4268
4596
  }
@@ -4313,7 +4641,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
4313
4641
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
4314
4642
  fieldClassName: "ds-u-margin--0",
4315
4643
  value: filterText,
4316
- className: `ds-u-padding-right--2 ${altMobileSearchButton ? "ds-l-col--12 ds-l-md-col--10 --alt-style" : "ds-l-col--10"}`,
4644
+ className: `ds-u-padding-right--2 ${altMobileSearchButton ? 'ds-l-col--12 ds-l-md-col--10 --alt-style' : 'ds-l-col--10'}`,
4317
4645
  label: "Search datasets",
4318
4646
  labelClassName: "ds-u-visibility--screen-reader",
4319
4647
  placeholder: "Search datasets",
@@ -4375,7 +4703,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
4375
4703
  "Showing ",
4376
4704
  currentResultNumbers.startingNumber,
4377
4705
  " -",
4378
- " ",
4706
+ ' ',
4379
4707
  currentResultNumbers.endingNumber,
4380
4708
  " of ",
4381
4709
  data.data.total,
@@ -4453,7 +4781,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
4453
4781
  },
4454
4782
  renderHref: (page)=>{
4455
4783
  const searchParams = buildSearchParams(false);
4456
- const includeAnd = searchParams ? "&" : "";
4784
+ const includeAnd = searchParams ? '&' : '';
4457
4785
  return `/datasets?page=${page}${includeAnd}${searchParams}`;
4458
4786
  }
4459
4787
  })
@@ -4487,26 +4815,26 @@ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
4487
4815
 
4488
4816
 
4489
4817
  const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
4490
- defaultSort: "modified",
4491
- defaultOrder: "desc"
4492
- }, pageTitle: pageTitle = "What's New ", showLargeFileWarning: showLargeFileWarning = false, introText: introText = "", dataDictionaryLinks: dataDictionaryLinks = false })=>{
4818
+ defaultSort: 'modified',
4819
+ defaultOrder: 'desc'
4820
+ }, pageTitle: pageTitle = 'What\'s New ', showLargeFileWarning: showLargeFileWarning = false, introText: introText = '', dataDictionaryLinks: dataDictionaryLinks = false })=>{
4493
4821
  const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
4494
4822
  const sortOptions = [
4495
4823
  {
4496
- label: "Newest",
4497
- value: "newest"
4824
+ label: 'Newest',
4825
+ value: 'newest'
4498
4826
  },
4499
4827
  {
4500
- label: "Oldest",
4501
- value: "oldest"
4828
+ label: 'Oldest',
4829
+ value: 'oldest'
4502
4830
  },
4503
4831
  {
4504
- label: "Title A-Z",
4505
- value: "titleAZ"
4832
+ label: 'Title A-Z',
4833
+ value: 'titleAZ'
4506
4834
  },
4507
4835
  {
4508
- label: "Title Z-A",
4509
- value: "titleZA"
4836
+ label: 'Title Z-A',
4837
+ value: 'titleZA'
4510
4838
  }
4511
4839
  ];
4512
4840
  const defaultSortBy = "";
@@ -4520,33 +4848,33 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
4520
4848
  endingNumber: 0
4521
4849
  });
4522
4850
  const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
4523
- const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
4851
+ const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)('');
4524
4852
  let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
4525
4853
  const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
4526
4854
  const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
4527
4855
  const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
4528
4856
  const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
4529
4857
  const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
4530
- return sort === "modified" ? sortOrder === "desc" ? "newest" : "oldest" : sortOrder === "desc" ? "titleZA" : "titleAZ";
4858
+ return sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
4531
4859
  });
4532
4860
  const setSortOptions = (value)=>{
4533
4861
  setSortDisplay(value);
4534
4862
  switch(value){
4535
- case "newest":
4536
- setSort("modified");
4537
- setSortOrder("desc");
4863
+ case 'newest':
4864
+ setSort('modified');
4865
+ setSortOrder('desc');
4538
4866
  break;
4539
- case "oldest":
4540
- setSort("modified");
4541
- setSortOrder("asc");
4867
+ case 'oldest':
4868
+ setSort('modified');
4869
+ setSortOrder('asc');
4542
4870
  break;
4543
- case "titleAZ":
4544
- setSort("title");
4545
- setSortOrder("asc");
4871
+ case 'titleAZ':
4872
+ setSort('title');
4873
+ setSortOrder('asc');
4546
4874
  break;
4547
- case "titleZA":
4548
- setSort("title");
4549
- setSortOrder("desc");
4875
+ case 'titleZA':
4876
+ setSort('title');
4877
+ setSortOrder('desc');
4550
4878
  break;
4551
4879
  }
4552
4880
  };
@@ -4555,7 +4883,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
4555
4883
  // Update browser URL with current search params
4556
4884
  const params = buildSearchParams(true);
4557
4885
  const url = new URL(window.location.href);
4558
- window.history.pushState({}, "", `${url.origin}${url.pathname}${params}`);
4886
+ window.history.pushState({}, '', `${url.origin}${url.pathname}${params}`);
4559
4887
  const baseNumber = Number(totalItems) > 0 ? 1 : 0;
4560
4888
  const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
4561
4889
  const endingNumber = Number(pageSize) * Number(page);
@@ -4594,9 +4922,9 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
4594
4922
  }
4595
4923
  let params = {
4596
4924
  sort: sort ? sort : undefined,
4597
- ["sort-order"]: sortOrder ? sortOrder : undefined,
4925
+ ['sort-order']: sortOrder ? sortOrder : undefined,
4598
4926
  page: page !== 1 ? page : undefined,
4599
- ["page-size"]: pageSize !== 10 ? pageSize : undefined
4927
+ ['page-size']: pageSize !== 10 ? pageSize : undefined
4600
4928
  };
4601
4929
  const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
4602
4930
  queryKey: [
@@ -4605,7 +4933,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
4605
4933
  ],
4606
4934
  queryFn: ()=>{
4607
4935
  return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
4608
- arrayFormat: "comma",
4936
+ arrayFormat: 'comma',
4609
4937
  encode: false
4610
4938
  })}`);
4611
4939
  }
@@ -4669,7 +4997,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
4669
4997
  "Showing ",
4670
4998
  currentResultNumbers.startingNumber,
4671
4999
  " -",
4672
- " ",
5000
+ ' ',
4673
5001
  currentResultNumbers.endingNumber,
4674
5002
  " of ",
4675
5003
  data.data.total,
@@ -4736,7 +5064,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
4736
5064
  },
4737
5065
  renderHref: (page)=>{
4738
5066
  const searchParams = buildSearchParams(false);
4739
- const includeAnd = searchParams ? "&" : "";
5067
+ const includeAnd = searchParams ? '&' : '';
4740
5068
  return `/datasets?page=${page}${includeAnd}${searchParams}`;
4741
5069
  }
4742
5070
  })
@@ -4768,12 +5096,12 @@ var $550bcc185f420ff5$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
4768
5096
 
4769
5097
  const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
4770
5098
  const [dataset, setDataset] = (0, $hgUW1$useState)({
4771
- title: "",
5099
+ title: '',
4772
5100
  distribution: [],
4773
- error: "",
4774
- description: "",
4775
- identifier: "",
4776
- modified: ""
5101
+ error: '',
5102
+ description: '',
5103
+ identifier: '',
5104
+ modified: ''
4777
5105
  });
4778
5106
  const [id, setId] = (0, $hgUW1$useState)(datasetId);
4779
5107
  const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
@@ -4783,7 +5111,7 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
4783
5111
  "metastore" + id
4784
5112
  ],
4785
5113
  queryFn: ()=>{
4786
- return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ? "&" : ""}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`).then((res)=>res.data).catch((error)=>{
5114
+ return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ? '&' : ''}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`).then((res)=>res.data).catch((error)=>{
4787
5115
  return {
4788
5116
  title: dataset.title,
4789
5117
  distribution: dataset.distribution,
@@ -4849,7 +5177,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
4849
5177
  ...additionalParams
4850
5178
  };
4851
5179
  params = (0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA);
4852
- const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : "";
5180
+ const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : '';
4853
5181
  let enabled = false;
4854
5182
  if (id) {
4855
5183
  if (!requireConditions) enabled = true;
@@ -4929,65 +5257,65 @@ var $1d3d480a9cfaabe0$export$2e2bcd8739ae039 = $1d3d480a9cfaabe0$var$useDatastor
4929
5257
 
4930
5258
 
4931
5259
  const $28f16f59778efa64$export$82b1b1d517e5388a = {
4932
- "R/P10Y": {
4933
- name: "Decennial"
5260
+ 'R/P10Y': {
5261
+ name: 'Decennial'
4934
5262
  },
4935
- "R/P4Y": {
4936
- name: "Quadrennial"
5263
+ 'R/P4Y': {
5264
+ name: 'Quadrennial'
4937
5265
  },
4938
- "R/P1Y": {
4939
- name: "Annual"
5266
+ 'R/P1Y': {
5267
+ name: 'Annual'
4940
5268
  },
4941
- "R/P2M": {
4942
- name: "Bimonthly"
5269
+ 'R/P2M': {
5270
+ name: 'Bimonthly'
4943
5271
  },
4944
- "R/P3.5D": {
4945
- name: "Semiweekly"
5272
+ 'R/P3.5D': {
5273
+ name: 'Semiweekly'
4946
5274
  },
4947
- "R/P1D": {
4948
- name: "Daily"
5275
+ 'R/P1D': {
5276
+ name: 'Daily'
4949
5277
  },
4950
- "R/P2W": {
4951
- name: "Biweekly"
5278
+ 'R/P2W': {
5279
+ name: 'Biweekly'
4952
5280
  },
4953
- "R/P6M": {
4954
- name: "Semiannual"
5281
+ 'R/P6M': {
5282
+ name: 'Semiannual'
4955
5283
  },
4956
- "R/P2Y": {
4957
- name: "Biennial"
5284
+ 'R/P2Y': {
5285
+ name: 'Biennial'
4958
5286
  },
4959
- "R/P3Y": {
4960
- name: "Triennial"
5287
+ 'R/P3Y': {
5288
+ name: 'Triennial'
4961
5289
  },
4962
- "R/P0.33W": {
4963
- name: "Three times a week"
5290
+ 'R/P0.33W': {
5291
+ name: 'Three times a week'
4964
5292
  },
4965
- "R/P0.33M": {
4966
- name: "Three times a month"
5293
+ 'R/P0.33M': {
5294
+ name: 'Three times a month'
4967
5295
  },
4968
- "R/PT1S": {
4969
- name: "Continuously updated"
5296
+ 'R/PT1S': {
5297
+ name: 'Continuously updated'
4970
5298
  },
4971
- "R/P1M": {
4972
- name: "Monthly"
5299
+ 'R/P1M': {
5300
+ name: 'Monthly'
4973
5301
  },
4974
- "R/P3M": {
4975
- name: "Quarterly"
5302
+ 'R/P3M': {
5303
+ name: 'Quarterly'
4976
5304
  },
4977
- "R/P0.5M": {
4978
- name: "Semimonthly"
5305
+ 'R/P0.5M': {
5306
+ name: 'Semimonthly'
4979
5307
  },
4980
- "R/P4M": {
4981
- name: "Three times a year"
5308
+ 'R/P4M': {
5309
+ name: 'Three times a year'
4982
5310
  },
4983
- "R/P1W": {
4984
- name: "Weekly"
5311
+ 'R/P1W': {
5312
+ name: 'Weekly'
4985
5313
  },
4986
- "R/PT1H": {
4987
- name: "Hourly"
5314
+ 'R/PT1H': {
5315
+ name: 'Hourly'
4988
5316
  },
4989
5317
  irregular: {
4990
- name: "Irregular"
5318
+ name: 'Irregular'
4991
5319
  }
4992
5320
  };
4993
5321
 
@@ -4996,7 +5324,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
4996
5324
  modified: (data)=>{
4997
5325
  return [
4998
5326
  {
4999
- label: "Modified",
5327
+ label: 'Modified',
5000
5328
  value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
5001
5329
  date: data
5002
5330
  })
@@ -5006,7 +5334,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
5006
5334
  issued: (data)=>{
5007
5335
  return [
5008
5336
  {
5009
- label: "Issued",
5337
+ label: 'Issued',
5010
5338
  value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
5011
5339
  date: data
5012
5340
  })
@@ -5016,7 +5344,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
5016
5344
  accrualPeriodicity: (data)=>{
5017
5345
  return [
5018
5346
  {
5019
- label: "Frequency",
5347
+ label: 'Frequency',
5020
5348
  value: (0, $28f16f59778efa64$export$82b1b1d517e5388a)[data].name
5021
5349
  }
5022
5350
  ];
@@ -5024,7 +5352,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
5024
5352
  publisher: (data)=>{
5025
5353
  if (data.data && data.data.name) return [
5026
5354
  {
5027
- label: "Publisher",
5355
+ label: 'Publisher',
5028
5356
  value: data.data.name
5029
5357
  }
5030
5358
  ];
@@ -5033,7 +5361,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
5033
5361
  identifier: (data)=>{
5034
5362
  return [
5035
5363
  {
5036
- label: "Identifier",
5364
+ label: 'Identifier',
5037
5365
  value: data
5038
5366
  }
5039
5367
  ];
@@ -5041,11 +5369,11 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
5041
5369
  contactPoint: (data)=>{
5042
5370
  let rows = [];
5043
5371
  if (data.fn) rows.push({
5044
- label: "Contact",
5372
+ label: 'Contact',
5045
5373
  value: data.fn
5046
5374
  });
5047
5375
  if (data.hasEmail) rows.push({
5048
- label: "Contact Email",
5376
+ label: 'Contact Email',
5049
5377
  value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
5050
5378
  href: data.hasEmail.includes("mailto:") ? data.hasEmail : `mailto:${data.hasEmail}`,
5051
5379
  children: data.hasEmail.replace("mailto:", "")
@@ -5056,7 +5384,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
5056
5384
  bureauCode: (data)=>{
5057
5385
  if (data.length) return [
5058
5386
  {
5059
- label: "Bureau Code",
5387
+ label: 'Bureau Code',
5060
5388
  value: data[0]
5061
5389
  }
5062
5390
  ];
@@ -5064,7 +5392,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
5064
5392
  programCode: (data)=>{
5065
5393
  if (data.length) return [
5066
5394
  {
5067
- label: "Program Code",
5395
+ label: 'Program Code',
5068
5396
  value: data[0]
5069
5397
  }
5070
5398
  ];
@@ -5072,13 +5400,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
5072
5400
  theme: (data)=>{
5073
5401
  return [
5074
5402
  {
5075
- label: "Category",
5403
+ label: 'Category',
5076
5404
  value: data.map((theme)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
5077
5405
  to: `/datasets?theme[]=${theme.data}`,
5078
5406
  children: theme.data
5079
5407
  }, theme.data)).reduce((prev, curr)=>[
5080
5408
  prev,
5081
- ", ",
5409
+ ', ',
5082
5410
  curr
5083
5411
  ])
5084
5412
  }
@@ -5087,13 +5415,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
5087
5415
  keyword: (data)=>{
5088
5416
  return [
5089
5417
  {
5090
- label: "Tags",
5418
+ label: 'Tags',
5091
5419
  value: data.map((keyword)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
5092
5420
  to: `/datasets?keyword[]=${keyword.data}`,
5093
5421
  children: keyword.data
5094
5422
  }, keyword.data)).reduce((prev, curr)=>[
5095
5423
  prev,
5096
- ", ",
5424
+ ', ',
5097
5425
  curr
5098
5426
  ])
5099
5427
  }
@@ -5102,7 +5430,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
5102
5430
  license: (data)=>{
5103
5431
  return [
5104
5432
  {
5105
- label: "License",
5433
+ label: 'License',
5106
5434
  value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
5107
5435
  href: data,
5108
5436
  children: data
@@ -5113,7 +5441,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
5113
5441
  accessLevel: (data)=>{
5114
5442
  return [
5115
5443
  {
5116
- label: "Public Access Level",
5444
+ label: 'Public Access Level',
5117
5445
  value: data
5118
5446
  }
5119
5447
  ];
@@ -5121,7 +5449,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
5121
5449
  temporal: (data)=>{
5122
5450
  return [
5123
5451
  {
5124
- label: "Temporal Coverage",
5452
+ label: 'Temporal Coverage',
5125
5453
  value: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
5126
5454
  className: "dc-c-word-break--all",
5127
5455
  children: data
@@ -5132,7 +5460,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
5132
5460
  spatial: (data)=>{
5133
5461
  return [
5134
5462
  {
5135
- label: "Spacial/Geographical Coverage",
5463
+ label: 'Spacial/Geographical Coverage',
5136
5464
  value: data
5137
5465
  }
5138
5466
  ];
@@ -5140,7 +5468,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
5140
5468
  references: (data)=>{
5141
5469
  return [
5142
5470
  {
5143
- label: "Related Documents",
5471
+ label: 'Related Documents',
5144
5472
  value: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
5145
5473
  className: "ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0",
5146
5474
  children: data.map((item)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
@@ -5258,8 +5586,8 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
5258
5586
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
5259
5587
  href: dist.data.downloadURL,
5260
5588
  style: {
5261
- order: sm ? "1" : "0",
5262
- width: sm ? "100%" : "auto"
5589
+ order: sm ? '1' : '0',
5590
+ width: sm ? '100%' : 'auto'
5263
5591
  },
5264
5592
  "aria-label": `Download ${dist.data.title || title} ${fileFormat}`,
5265
5593
  className: "ds-c-button",
@@ -5272,7 +5600,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
5272
5600
  })
5273
5601
  }),
5274
5602
  dist.data.description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5275
- className: "ds-u-measure--wide ds-u-margin-bottom--7",
5603
+ className: 'ds-u-measure--wide ds-u-margin-bottom--7',
5276
5604
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5277
5605
  className: "dc-c-metadata-description ds-u-margin--0",
5278
5606
  dangerouslySetInnerHTML: {
@@ -5344,7 +5672,7 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
5344
5672
  const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
5345
5673
  return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
5346
5674
  children: [
5347
- md ? "" : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
5675
+ md ? '' : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
5348
5676
  component: "th",
5349
5677
  className: "ds-u-font-weight--bold",
5350
5678
  children: [
@@ -5355,8 +5683,8 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
5355
5683
  title: tooltip.title,
5356
5684
  // @ts-ignore
5357
5685
  style: {
5358
- border: "none",
5359
- background: "none"
5686
+ border: 'none',
5687
+ background: 'none'
5360
5688
  },
5361
5689
  maxWidth: "400px",
5362
5690
  placement: "auto",
@@ -5415,10 +5743,10 @@ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: ap
5415
5743
  href: apiUrl,
5416
5744
  children: [
5417
5745
  "View API",
5418
- " ",
5746
+ ' ',
5419
5747
  /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
5420
5748
  style: {
5421
- whiteSpace: "nowrap"
5749
+ whiteSpace: 'nowrap'
5422
5750
  },
5423
5751
  children: [
5424
5752
  "specification ",
@@ -5459,20 +5787,20 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
5459
5787
 
5460
5788
  const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
5461
5789
  const [sorting, setSorting] = (0, $hgUW1$useState)([]);
5462
- const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)("");
5790
+ const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
5463
5791
  const mobile = (0, $hgUW1$useMediaQuery)({
5464
5792
  minWidth: 0,
5465
5793
  maxWidth: 544
5466
5794
  });
5467
5795
  const sortElement = (isSorted)=>{
5468
- if (isSorted === "asc") return "dc-c-sort--asc";
5469
- if (isSorted === "desc") return "dc-c-sort--desc";
5470
- return "dc-c-sort--default";
5796
+ if (isSorted === 'asc') return 'dc-c-sort--asc';
5797
+ if (isSorted === 'desc') return 'dc-c-sort--desc';
5798
+ return 'dc-c-sort--default';
5471
5799
  };
5472
5800
  const table = (0, $hgUW1$useReactTable)({
5473
5801
  data: tableData,
5474
5802
  columns: tableColumns,
5475
- columnResizeMode: "onChange",
5803
+ columnResizeMode: 'onChange',
5476
5804
  getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
5477
5805
  getFilteredRowModel: (0, $hgUW1$getFilteredRowModel)(),
5478
5806
  getPaginationRowModel: (0, $hgUW1$getPaginationRowModel)(),
@@ -5491,49 +5819,49 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
5491
5819
  });
5492
5820
  const sortOptions = [
5493
5821
  {
5494
- value: "default",
5495
- label: "No Sort"
5822
+ value: 'default',
5823
+ label: 'No Sort'
5496
5824
  },
5497
5825
  {
5498
- value: "titleasc",
5499
- label: "Title A-Z"
5826
+ value: 'titleasc',
5827
+ label: 'Title A-Z'
5500
5828
  },
5501
5829
  {
5502
- value: "titledesc",
5503
- label: "Title Z-A"
5830
+ value: 'titledesc',
5831
+ label: 'Title Z-A'
5504
5832
  },
5505
5833
  {
5506
- value: "typeasc",
5507
- label: "Type A-Z"
5834
+ value: 'typeasc',
5835
+ label: 'Type A-Z'
5508
5836
  },
5509
5837
  {
5510
- value: "typedesc",
5511
- label: "Type Z-A"
5838
+ value: 'typedesc',
5839
+ label: 'Type Z-A'
5512
5840
  }
5513
5841
  ];
5514
5842
  const sortStatesLookup = {
5515
5843
  default: [],
5516
5844
  titleasc: [
5517
5845
  {
5518
- id: "titleResizable",
5846
+ id: 'titleResizable',
5519
5847
  desc: false
5520
5848
  }
5521
5849
  ],
5522
5850
  titledesc: [
5523
5851
  {
5524
- id: "titleResizable",
5852
+ id: 'titleResizable',
5525
5853
  desc: true
5526
5854
  }
5527
5855
  ],
5528
5856
  typeasc: [
5529
5857
  {
5530
- id: "type",
5858
+ id: 'type',
5531
5859
  desc: false
5532
5860
  }
5533
5861
  ],
5534
5862
  typedesc: [
5535
5863
  {
5536
- id: "type",
5864
+ id: 'type',
5537
5865
  desc: true
5538
5866
  }
5539
5867
  ]
@@ -5561,7 +5889,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
5561
5889
  /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
5562
5890
  className: "dc-c-datatable",
5563
5891
  style: {
5564
- width: "100%"
5892
+ width: '100%'
5565
5893
  },
5566
5894
  stackable: true,
5567
5895
  children: [
@@ -5577,12 +5905,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
5577
5905
  }, header.id + "_resize") : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
5578
5906
  key: header.id,
5579
5907
  className: `ds-u-border-y--2 ds-u-border--dark ds-u-border-x--0`,
5580
- id: "dataDictionary_" + header.id,
5908
+ id: 'dataDictionary_' + header.id,
5581
5909
  children: [
5582
5910
  (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext()),
5583
- header.id === "type" && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
5911
+ header.id === 'type' && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
5584
5912
  onClick: header.column.getToggleSortingHandler(),
5585
- className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : "",
5913
+ className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : '',
5586
5914
  "aria-label": `${header.column.columnDef.header} sort order`
5587
5915
  })
5588
5916
  ]
@@ -5597,12 +5925,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
5597
5925
  return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
5598
5926
  key: cell.id,
5599
5927
  style: {
5600
- maxWidth: mobile ? "100%" : cell.column.getSize(),
5601
- whiteSpace: cell.column.id === "description" ? "pre-wrap" : "normal"
5928
+ maxWidth: mobile ? '100%' : cell.column.getSize(),
5929
+ whiteSpace: cell.column.id === "description" ? 'pre-wrap' : 'normal'
5602
5930
  },
5603
- className: `${cell.column.id === "titleResizable" ? "ds-u-word-break" : ""}`,
5604
- headers: "dataDictionary_" + cell.column.id,
5605
- stackedTitle: cell.column.id === "titleResizable" ? "Title" : cell.column.columnDef.header,
5931
+ className: `${cell.column.id === 'titleResizable' ? 'ds-u-word-break' : ''}`,
5932
+ headers: 'dataDictionary_' + cell.column.id,
5933
+ stackedTitle: cell.column.id === 'titleResizable' ? 'Title' : cell.column.columnDef.header,
5606
5934
  children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
5607
5935
  });
5608
5936
  })
@@ -5631,7 +5959,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
5631
5959
  table.setPageIndex(page - 1);
5632
5960
  },
5633
5961
  renderHref: (page)=>`/page=${page}`
5634
- }) : ""
5962
+ }) : ''
5635
5963
  ]
5636
5964
  });
5637
5965
  };
@@ -5641,17 +5969,17 @@ var $6765a74df807d015$export$2e2bcd8739ae039 = $6765a74df807d015$var$DataDiction
5641
5969
  const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
5642
5970
  const columnHelper = (0, $hgUW1$createColumnHelper)();
5643
5971
  const tableColumns = [
5644
- columnHelper.accessor("name", {
5645
- header: "Name"
5972
+ columnHelper.accessor('name', {
5973
+ header: 'Name'
5646
5974
  }),
5647
- columnHelper.accessor("title", {
5648
- header: "Title"
5975
+ columnHelper.accessor('title', {
5976
+ header: 'Title'
5649
5977
  }),
5650
- columnHelper.accessor("type", {
5651
- header: "Type"
5978
+ columnHelper.accessor('type', {
5979
+ header: 'Type'
5652
5980
  }),
5653
- columnHelper.accessor("format", {
5654
- header: "Format"
5981
+ columnHelper.accessor('format', {
5982
+ header: 'Format'
5655
5983
  })
5656
5984
  ];
5657
5985
  return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6765a74df807d015$export$2e2bcd8739ae039), {
@@ -5695,7 +6023,7 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
5695
6023
  });
5696
6024
  const columnHelper = (0, $hgUW1$createColumnHelper)();
5697
6025
  const tableColumns = [
5698
- columnHelper.accessor("titleResizable", {
6026
+ columnHelper.accessor('titleResizable', {
5699
6027
  header: ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
5700
6028
  className: "dc-c-tooltip-width-override",
5701
6029
  children: [
@@ -5704,8 +6032,8 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
5704
6032
  title: "Title represents the column headers of the data file",
5705
6033
  // @ts-ignore
5706
6034
  style: {
5707
- border: "none",
5708
- background: "none"
6035
+ border: 'none',
6036
+ background: 'none'
5709
6037
  },
5710
6038
  maxWidth: "400px",
5711
6039
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
@@ -5715,48 +6043,48 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
5715
6043
  size: 300,
5716
6044
  minSize: 132
5717
6045
  }),
5718
- columnHelper.accessor("description", {
5719
- header: "Description",
6046
+ columnHelper.accessor('description', {
6047
+ header: 'Description',
5720
6048
  minSize: 600
5721
6049
  }),
5722
- columnHelper.accessor("type", {
5723
- header: "Type",
6050
+ columnHelper.accessor('type', {
6051
+ header: 'Type',
5724
6052
  size: 150,
5725
6053
  enableResizing: false
5726
6054
  })
5727
6055
  ];
5728
6056
  const typeOptions = [
5729
6057
  {
5730
- value: "all",
5731
- label: "All Types"
6058
+ value: 'all',
6059
+ label: 'All Types'
5732
6060
  },
5733
6061
  {
5734
- value: "string",
5735
- label: "String"
6062
+ value: 'string',
6063
+ label: 'String'
5736
6064
  },
5737
6065
  {
5738
- value: "date",
5739
- label: "Date"
6066
+ value: 'date',
6067
+ label: 'Date'
5740
6068
  },
5741
6069
  {
5742
- value: "datetime",
5743
- label: "Datetime"
6070
+ value: 'datetime',
6071
+ label: 'Datetime'
5744
6072
  },
5745
6073
  {
5746
- value: "year",
5747
- label: "Year"
6074
+ value: 'year',
6075
+ label: 'Year'
5748
6076
  },
5749
6077
  {
5750
- value: "integer",
5751
- label: "Integer"
6078
+ value: 'integer',
6079
+ label: 'Integer'
5752
6080
  },
5753
6081
  {
5754
- value: "number",
5755
- label: "Number"
6082
+ value: 'number',
6083
+ label: 'Number'
5756
6084
  },
5757
6085
  {
5758
- value: "boolean",
5759
- label: "Boolean"
6086
+ value: 'boolean',
6087
+ label: 'Boolean'
5760
6088
  }
5761
6089
  ];
5762
6090
  return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
@@ -5863,7 +6191,7 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
5863
6191
  href: datasetDictionaryEndpoint + "/csv",
5864
6192
  className: "ds-c-button",
5865
6193
  style: {
5866
- width: "100%"
6194
+ width: '100%'
5867
6195
  },
5868
6196
  children: [
5869
6197
  /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
@@ -5898,33 +6226,11 @@ var $6012b86ffcaf3f71$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
5898
6226
 
5899
6227
 
5900
6228
 
5901
-
5902
- const $39bc4d98030a5599$var$DataTableStateWrapper = ({ showQueryBuilder: showQueryBuilder = true, showCopyLinkButton: showCopyLinkButton = true, showDownloadFilteredDataButton: showDownloadFilteredDataButton = true, showDownloadFullDataButton: showDownloadFullDataButton = true, showStoredQueryDownloadButton: showStoredQueryDownloadButton = false })=>{
5903
- const { id: id, datasetTableControls: datasetTableControls } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
5904
- // a wrapper component to keep column state synced between full screen and regular modes
5905
- const localStorageData = id ? JSON.parse(localStorage.getItem(id)) : null;
5906
- const defaultPage = 1;
5907
- const [page, setPage] = (0, $hgUW1$useState)(defaultPage);
5908
- const [columnOrder, setColumnOrder] = (0, $hgUW1$useState)(()=>{
5909
- if (datasetTableControls && localStorageData) return localStorageData.tableColumnOrder;
5910
- else return [];
5911
- });
5912
- const [columnVisibility, setColumnVisibility] = (0, $hgUW1$useState)(()=>{
5913
- if (datasetTableControls && localStorageData) return localStorageData.tableColumnVisibility;
5914
- else return {};
5915
- });
5916
- return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $ebda441784d176a5$export$2e2bcd8739ae039).Provider, {
5917
- value: {
5918
- columnOrder: columnOrder,
5919
- setColumnOrder: setColumnOrder,
5920
- columnVisibility: columnVisibility,
5921
- setColumnVisibility: setColumnVisibility,
5922
- page: page,
5923
- setPage: setPage
5924
- },
6229
+ const $39bc4d98030a5599$var$DataTableStateWrapper = ({ showCopyLinkButton: showCopyLinkButton = true, showDataTableToolbar: showDataTableToolbar = true, showDownloadFilteredDataButton: showDownloadFilteredDataButton = true, showDownloadFullDataButton: showDownloadFullDataButton = true, showStoredQueryDownloadButton: showStoredQueryDownloadButton = false })=>{
6230
+ return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $ee0d4d4f34048447$export$2e2bcd8739ae039), {
5925
6231
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $a35cf16d1488f54e$export$2e2bcd8739ae039), {
5926
- showQueryBuilder: showQueryBuilder,
5927
6232
  showCopyLinkButton: showCopyLinkButton,
6233
+ showDataTableToolbar: showDataTableToolbar,
5928
6234
  showDownloadFilteredDataButton: showDownloadFilteredDataButton,
5929
6235
  showDownloadFullDataButton: showDownloadFullDataButton,
5930
6236
  showStoredQueryDownloadButton: showStoredQueryDownloadButton
@@ -5942,7 +6248,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
5942
6248
  const [description, setDescription] = (0, $hgUW1$useState)("");
5943
6249
  if (!distribution && !dataset?.identifier) return null;
5944
6250
  (0, $hgUW1$useEffect)(()=>{
5945
- let newDescription = "";
6251
+ let newDescription = '';
5946
6252
  if (customDescription) newDescription = customDescription(dataset, distribution, resource);
5947
6253
  else {
5948
6254
  if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
@@ -5957,7 +6263,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
5957
6263
  customDescription
5958
6264
  ]);
5959
6265
  return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5960
- className: "ds-u-measure--wide ds-u-margin-bottom--7",
6266
+ className: 'ds-u-measure--wide ds-u-margin-bottom--7',
5961
6267
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
5962
6268
  className: "ds-u-margin-top--0 dc-c-metadata-description",
5963
6269
  dangerouslySetInnerHTML: {
@@ -5979,7 +6285,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
5979
6285
  ],
5980
6286
  queryFn: ()=>{
5981
6287
  return fetch(`${dataDictionaryUrl}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA), {
5982
- arrayFormat: "comma",
6288
+ arrayFormat: 'comma',
5983
6289
  encode: false
5984
6290
  })}`).then((res)=>res.json());
5985
6291
  }
@@ -5998,7 +6304,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
5998
6304
  conditions: []
5999
6305
  };
6000
6306
  const { dataset: dataset, isPending: isPending } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
6001
- const title = dataset.title ? dataset.title : "";
6307
+ const title = dataset.title ? dataset.title : '';
6002
6308
  const metadataMapping = {
6003
6309
  ...(0, $6da0396069e23175$export$bc27cf7ecf44639d),
6004
6310
  ...customMetadataMapping
@@ -6006,7 +6312,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
6006
6312
  let distribution = {};
6007
6313
  let distributions = dataset.distribution ? dataset.distribution : [];
6008
6314
  if (distributions.length) distribution = distributions[0];
6009
- const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
6315
+ const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
6010
6316
  ...options,
6011
6317
  limit: defaultPageSize
6012
6318
  });
@@ -6018,7 +6324,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
6018
6324
  }) : null;
6019
6325
  (0, $hgUW1$useEffect)(()=>{
6020
6326
  const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
6021
- if (localFileFormat === "csv") resource.setResource(distribution.identifier);
6327
+ if (localFileFormat === 'csv') resource.setResource(distribution.identifier);
6022
6328
  }, [
6023
6329
  distribution
6024
6330
  ]);
@@ -6073,27 +6379,27 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
6073
6379
  distribution,
6074
6380
  window.location.hash
6075
6381
  ]);
6076
- const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === "application/vnd.tableschema+json" || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
6382
+ const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === 'application/vnd.tableschema+json' || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
6077
6383
  const formatType = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
6078
6384
  return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
6079
6385
  children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
6080
6386
  content: notFoundContent,
6081
6387
  siteUrl: rootUrl
6082
6388
  }) : /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
6083
- className: "ds-l-container",
6389
+ className: 'ds-l-container',
6084
6390
  children: [
6085
6391
  /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
6086
- className: "ds-l-row",
6392
+ className: 'ds-l-row',
6087
6393
  children: [
6088
6394
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6089
- className: "ds-l-md-col--9",
6395
+ className: 'ds-l-md-col--9',
6090
6396
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
6091
6397
  className: "ds-text-heading--3xl",
6092
6398
  children: title
6093
6399
  })
6094
6400
  }),
6095
6401
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6096
- className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
6402
+ className: 'ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right',
6097
6403
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
6098
6404
  className: "ds-u-margin--0",
6099
6405
  children: [
@@ -6105,7 +6411,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
6105
6411
  })
6106
6412
  }),
6107
6413
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6108
- className: "ds-l-md-col--9",
6414
+ className: 'ds-l-md-col--9',
6109
6415
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
6110
6416
  distribution: distribution,
6111
6417
  dataset: dataset,
@@ -6117,9 +6423,9 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
6117
6423
  ]
6118
6424
  }),
6119
6425
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6120
- className: "ds-l-row",
6426
+ className: 'ds-l-row',
6121
6427
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6122
- className: "ds-l-md-col--12 dc-dataset",
6428
+ className: 'ds-l-md-col--12 dc-dataset',
6123
6429
  children: !isPending && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tabs), {
6124
6430
  onChange: (selectedId, prevSelectedId)=>{
6125
6431
  setSelectedTab(selectedId);
@@ -6127,7 +6433,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
6127
6433
  selectedId: selectedTab,
6128
6434
  children: [
6129
6435
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
6130
- id: "data-table",
6436
+ id: 'data-table',
6131
6437
  tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
6132
6438
  className: "ds-u-color--primary",
6133
6439
  children: [
@@ -6137,7 +6443,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
6137
6443
  "Data Table"
6138
6444
  ]
6139
6445
  }),
6140
- className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
6446
+ className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
6141
6447
  children: (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
6142
6448
  value: {
6143
6449
  id: id,
@@ -6154,7 +6460,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
6154
6460
  })
6155
6461
  }),
6156
6462
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
6157
- id: "overview",
6463
+ id: 'overview',
6158
6464
  tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
6159
6465
  className: "ds-u-color--primary",
6160
6466
  children: [
@@ -6164,7 +6470,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
6164
6470
  "Overview"
6165
6471
  ]
6166
6472
  }),
6167
- className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
6473
+ className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
6168
6474
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
6169
6475
  resource: resource,
6170
6476
  dataset: dataset,
@@ -6173,7 +6479,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
6173
6479
  })
6174
6480
  }),
6175
6481
  !hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
6176
- id: "data-dictionary",
6482
+ id: 'data-dictionary',
6177
6483
  tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
6178
6484
  className: "ds-u-color--primary",
6179
6485
  children: [
@@ -6183,7 +6489,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
6183
6489
  "Data Dictionary"
6184
6490
  ]
6185
6491
  }),
6186
- className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
6492
+ className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
6187
6493
  children: displayDataDictionaryTab ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
6188
6494
  datasetSitewideDictionary: datasetSitewideDictionary,
6189
6495
  datasetDictionaryEndpoint: distribution.data.describedBy,
@@ -6194,7 +6500,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
6194
6500
  })
6195
6501
  }),
6196
6502
  distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
6197
- id: "api",
6503
+ id: 'api',
6198
6504
  tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
6199
6505
  className: "ds-u-color--primary",
6200
6506
  children: [
@@ -6204,7 +6510,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
6204
6510
  "API"
6205
6511
  ]
6206
6512
  }),
6207
- className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
6513
+ className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
6208
6514
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
6209
6515
  id: id,
6210
6516
  rootUrl: rootUrl,
@@ -6241,13 +6547,13 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
6241
6547
  });
6242
6548
  const menu = (0, $hgUW1$useRef)(null);
6243
6549
  function closeMobileMenu() {
6244
- const mobileMenuButtonElement = document.querySelector(".dkan-c-mobile-menu-button");
6550
+ const mobileMenuButtonElement = document.querySelector('.dkan-c-mobile-menu-button');
6245
6551
  if (!mobileMenuButtonElement) return;
6246
6552
  mobileMenuButtonElement.focus();
6247
6553
  }
6248
6554
  // Close mobile menu with escape.
6249
6555
  function handleMenuClose(event) {
6250
- if (event.key === "Escape" && mobileMenuOpen) setMobileMenuOpen(false);
6556
+ if (event.key === 'Escape' && mobileMenuOpen) setMobileMenuOpen(false);
6251
6557
  }
6252
6558
  function handleClick(event) {
6253
6559
  // Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
@@ -6282,7 +6588,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
6282
6588
  const focusableEls = getFocusableElements(menu.current).selectors.visible;
6283
6589
  const firstEl = focusableEls[0];
6284
6590
  const lastEl = focusableEls[focusableEls.length - 1];
6285
- if (event.key === "Tab") {
6591
+ if (event.key === 'Tab') {
6286
6592
  if (event.shiftKey && document.activeElement === firstEl) {
6287
6593
  lastEl?.focus();
6288
6594
  event.preventDefault();
@@ -6294,15 +6600,15 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
6294
6600
  }
6295
6601
  };
6296
6602
  (0, $hgUW1$useEffect)(()=>{
6297
- document.addEventListener("keyup", handleMenuClose);
6298
- document.addEventListener("mousedown", handleClick);
6603
+ document.addEventListener('keyup', handleMenuClose);
6604
+ document.addEventListener('mousedown', handleClick);
6299
6605
  if (mobileMenuOpen) handleFocusIn();
6300
6606
  else closeMobileMenu();
6301
- if (menu.current) menu.current.addEventListener("keydown", (evt)=>trapFocus(evt));
6607
+ if (menu.current) menu.current.addEventListener('keydown', (evt)=>trapFocus(evt));
6302
6608
  return ()=>{
6303
- document.removeEventListener("keyup", handleMenuClose);
6304
- document.addEventListener("mousedown", handleClick);
6305
- if (menu.current) menu.current.removeEventListener("keydown", trapFocus);
6609
+ document.removeEventListener('keyup', handleMenuClose);
6610
+ document.addEventListener('mousedown', handleClick);
6611
+ if (menu.current) menu.current.removeEventListener('keydown', trapFocus);
6306
6612
  };
6307
6613
  }, [
6308
6614
  mobileMenuOpen
@@ -6317,7 +6623,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
6317
6623
  },
6318
6624
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
6319
6625
  "aria-label": "Site header",
6320
- className: `dkan-c-header dkan-c-header--${mobileMax ? "mobile" : "desktop"}`,
6626
+ className: `dkan-c-header dkan-c-header--${mobileMax ? 'mobile' : 'desktop'}`,
6321
6627
  children: [
6322
6628
  topNav && topNav,
6323
6629
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
@@ -6360,7 +6666,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
6360
6666
  var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
6361
6667
 
6362
6668
 
6363
- const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle = "Get Email Updates", emailBody: emailBody = "Sign up to get the latest information from CMS by choosing the topics and frequency of emails that are best for you.", emailLink: emailLink = "", emailButton: emailButton = "Sign up for email updates", socialMediaLinks: socialMediaLinks = null, hhsLogo: hhsLogo, cmsLogo: cmsLogo, trademarkContent: trademarkContent = /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
6669
+ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle = 'Get Email Updates', emailBody: emailBody = 'Sign up to get the latest information from CMS by choosing the topics and frequency of emails that are best for you.', emailLink: emailLink = '', emailButton: emailButton = 'Sign up for email updates', socialMediaLinks: socialMediaLinks = null, hhsLogo: hhsLogo, cmsLogo: cmsLogo, trademarkContent: trademarkContent = /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
6364
6670
  children: [
6365
6671
  /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
6366
6672
  children: "A federal government website managed and paid for by the U.S. Centers for Medicare & Medicaid Services."
@@ -6448,14 +6754,14 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
6448
6754
  /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
6449
6755
  className: "ds-u-font-size--sm",
6450
6756
  children: footerAdditionalResourcesLinks.filter((link)=>{
6451
- const noOnClick = Object.keys(link).findIndex((l)=>l === "onClick");
6757
+ const noOnClick = Object.keys(link).findIndex((l)=>l === 'onClick');
6452
6758
  if (noOnClick === -1 || link.onClick && link.dataTag) return link;
6453
6759
  }).map((link)=>{
6454
6760
  if (link.onClick && link.dataTag) return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
6455
6761
  className: "ds-u-margin-bottom--1",
6456
6762
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
6457
6763
  href: link.url,
6458
- ["data-" + link.dataTag.name]: link.dataTag.value,
6764
+ ['data-' + link.dataTag.name]: link.dataTag.value,
6459
6765
  onClick: link.onClick,
6460
6766
  children: link.label
6461
6767
  })
@@ -6555,7 +6861,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
6555
6861
  children: [
6556
6862
  /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
6557
6863
  id: "svg-inline--fa-title-iRCARP7h6Kp3",
6558
- children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title : "CMS Facebook"
6864
+ children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title : 'CMS Facebook'
6559
6865
  }),
6560
6866
  /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
6561
6867
  transform: "translate(160 256)",
@@ -6608,7 +6914,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
6608
6914
  children: [
6609
6915
  /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
6610
6916
  id: "svg-inline--fa-title-4z03ITiPPTVF",
6611
- children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title : "CMS Twitter"
6917
+ children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title : 'CMS Twitter'
6612
6918
  }),
6613
6919
  /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
6614
6920
  transform: "translate(256 256)",
@@ -6661,7 +6967,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
6661
6967
  children: [
6662
6968
  /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
6663
6969
  id: "svg-inline--fa-title-Nm2qsuSKvuRZ",
6664
- children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title : "CMS LinkedIn"
6970
+ children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title : 'CMS LinkedIn'
6665
6971
  }),
6666
6972
  /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
6667
6973
  transform: "translate(224 256)",
@@ -6713,7 +7019,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
6713
7019
  children: [
6714
7020
  /*#__PURE__*/ (0, $hgUW1$jsx)("title", {
6715
7021
  id: "svg-inline--fa-title-youtube",
6716
- children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title : "CMS youtube"
7022
+ children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title : 'CMS youtube'
6717
7023
  }),
6718
7024
  /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
6719
7025
  fill: "currentColor",
@@ -6813,26 +7119,26 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
6813
7119
  return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
6814
7120
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
6815
7121
  stackable: true,
6816
- className: "ds-c-table",
7122
+ className: 'ds-c-table',
6817
7123
  children: [
6818
7124
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
6819
7125
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
6820
7126
  children: [
6821
7127
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
6822
- id: "application",
6823
- headers: "Application",
7128
+ id: 'application',
7129
+ headers: 'Application',
6824
7130
  children: "Application"
6825
- }, "Application"),
7131
+ }, 'Application'),
6826
7132
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
6827
- id: "notes",
6828
- headers: "Notes",
7133
+ id: 'notes',
7134
+ headers: 'Notes',
6829
7135
  children: "Notes"
6830
- }, "Notes"),
7136
+ }, 'Notes'),
6831
7137
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
6832
- id: "links",
6833
- headers: "Links",
7138
+ id: 'links',
7139
+ headers: 'Links',
6834
7140
  children: "Links"
6835
- }, "Links")
7141
+ }, 'Links')
6836
7142
  ]
6837
7143
  })
6838
7144
  }),
@@ -6842,19 +7148,19 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
6842
7148
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
6843
7149
  id: d.id,
6844
7150
  stackedTitle: "Application",
6845
- headers: "Application",
7151
+ headers: 'Application',
6846
7152
  children: d.application
6847
7153
  }, d.id),
6848
7154
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
6849
7155
  id: d.id,
6850
7156
  stackedTitle: "Notes",
6851
- headers: "Notes",
7157
+ headers: 'Notes',
6852
7158
  children: d.notes
6853
7159
  }, `${d.id}-notes`),
6854
7160
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
6855
7161
  id: d.id,
6856
7162
  stackedTitle: "Links",
6857
- headers: "Links",
7163
+ headers: 'Links',
6858
7164
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
6859
7165
  className: "dkan-newtab",
6860
7166
  href: d.link,
@@ -6882,44 +7188,44 @@ var $5655284dbbb89508$export$2e2bcd8739ae039 = $5655284dbbb89508$var$Documentati
6882
7188
 
6883
7189
  const $c7bf75f7e8a68780$export$7850f4d545d994c6 = [
6884
7190
  {
6885
- id: "excel",
6886
- application: "Microsoft Excel",
6887
- notes: "Official size limitations for Microsoft Excel",
6888
- link: "https://support.microsoft.com/en-us/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3?redirectSourcePath=%252fen-us%252farticle%252fExcel-specifications-and-limits-ca36e2dc-1f09-4620-b726-67c00b05040f",
6889
- linkText: "Excel Specifications and Limits",
6890
- screenReaderOnlyText: "on microsoft.com"
7191
+ id: 'excel',
7192
+ application: 'Microsoft Excel',
7193
+ notes: 'Official size limitations for Microsoft Excel',
7194
+ link: 'https://support.microsoft.com/en-us/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3?redirectSourcePath=%252fen-us%252farticle%252fExcel-specifications-and-limits-ca36e2dc-1f09-4620-b726-67c00b05040f',
7195
+ linkText: 'Excel Specifications and Limits',
7196
+ screenReaderOnlyText: 'on microsoft.com'
6891
7197
  },
6892
7198
  {
6893
- id: "access",
6894
- application: "Microsoft Access",
6895
- notes: "Official size limitations for Microsoft Access",
6896
- link: "https://support.microsoft.com/en-us/office/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c?ui=en-us&rs=en-us&ad=us",
6897
- linkText: "Access 2016 Specifications",
6898
- screenReaderOnlyText: "on microsoft.com"
7199
+ id: 'access',
7200
+ application: 'Microsoft Access',
7201
+ notes: 'Official size limitations for Microsoft Access',
7202
+ link: 'https://support.microsoft.com/en-us/office/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c?ui=en-us&rs=en-us&ad=us',
7203
+ linkText: 'Access 2016 Specifications',
7204
+ screenReaderOnlyText: 'on microsoft.com'
6899
7205
  },
6900
7206
  {
6901
- id: "oracle-sql-developer",
6902
- application: "Oracle SQL Developer",
6903
- notes: "Oracle SQL Developer tool",
6904
- link: "https://www.oracle.com/database/sqldeveloper/",
6905
- linkText: "Oracle SQL Developer Overview",
6906
- screenReaderOnlyText: "on oracle.com"
7207
+ id: 'oracle-sql-developer',
7208
+ application: 'Oracle SQL Developer',
7209
+ notes: 'Oracle SQL Developer tool',
7210
+ link: 'https://www.oracle.com/database/sqldeveloper/',
7211
+ linkText: 'Oracle SQL Developer Overview',
7212
+ screenReaderOnlyText: 'on oracle.com'
6907
7213
  },
6908
7214
  {
6909
- id: "oracle-database",
6910
- application: "Oracle Database",
6911
- notes: "Oracle Database official size limitations",
6912
- link: "https://docs.oracle.com/cd/B28359_01/server.111/b28320/limits002.htm#i287915",
6913
- linkText: "Oracle Physical Database Limits",
6914
- screenReaderOnlyText: "on oracle.com"
7215
+ id: 'oracle-database',
7216
+ application: 'Oracle Database',
7217
+ notes: 'Oracle Database official size limitations',
7218
+ link: 'https://docs.oracle.com/cd/B28359_01/server.111/b28320/limits002.htm#i287915',
7219
+ linkText: 'Oracle Physical Database Limits',
7220
+ screenReaderOnlyText: 'on oracle.com'
6915
7221
  },
6916
7222
  {
6917
- id: "oracle-sql-client-tools",
6918
- application: "Oracle SQL Client Tools",
6919
- notes: "Oracle SQL Client Tools",
6920
- link: "https://www.oracle.com/database/technologies/oracle-database-software-downloads.html",
6921
- linkText: "Oracle SQL Client",
6922
- screenReaderOnlyText: "on oracle.com"
7223
+ id: 'oracle-sql-client-tools',
7224
+ application: 'Oracle SQL Client Tools',
7225
+ notes: 'Oracle SQL Client Tools',
7226
+ link: 'https://www.oracle.com/database/technologies/oracle-database-software-downloads.html',
7227
+ linkText: 'Oracle SQL Client',
7228
+ screenReaderOnlyText: 'on oracle.com'
6923
7229
  }
6924
7230
  ];
6925
7231
 
@@ -6947,7 +7253,7 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
6947
7253
  }),
6948
7254
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
6949
7255
  heading: "Notice",
6950
- className: "ds-u-margin-top--6",
7256
+ className: 'ds-u-margin-top--6',
6951
7257
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
6952
7258
  className: "ds-c-alert__text",
6953
7259
  children: "Be aware of the file size and row limitations of the software you are attempting to import the files into. For information on limitations, look at the software's official documentation."
@@ -6956,16 +7262,16 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
6956
7262
  ]
6957
7263
  }),
6958
7264
  /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
6959
- className: "ds-u-margin-top--4 ds-l-row",
7265
+ className: 'ds-u-margin-top--4 ds-l-row',
6960
7266
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
6961
- className: "ds-l-col--12",
7267
+ className: 'ds-l-col--12',
6962
7268
  children: [
6963
7269
  /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
6964
7270
  className: "ds-text-heading--2xl ds-text-heading--2xl",
6965
7271
  children: "Documentation by Application"
6966
7272
  }),
6967
7273
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
6968
- className: "ds-u-margin-top--4",
7274
+ className: 'ds-u-margin-top--4',
6969
7275
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5655284dbbb89508$export$2e2bcd8739ae039), {
6970
7276
  data: documentationList
6971
7277
  })
@@ -6993,7 +7299,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
6993
7299
  const options = {
6994
7300
  conditions: query ? JSON.parse(query).map(({ column: column, operator: operator, ...rest })=>({
6995
7301
  property: column,
6996
- operator: operator === "is" ? "=" : operator === "is not" ? "<>" : operator === "or" ? "in" : operator,
7302
+ operator: operator === 'is' ? '=' : operator === 'is not' ? '<>' : operator === 'or' ? 'in' : operator,
6997
7303
  ...rest
6998
7304
  })) : []
6999
7305
  };
@@ -7001,13 +7307,13 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
7001
7307
  let distribution = {};
7002
7308
  let distributions = dataset.distribution ? dataset.distribution : [];
7003
7309
  if (distributions.length) distribution = distributions[distributionIndex];
7004
- const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
7310
+ const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
7005
7311
  ...options,
7006
7312
  limit: defaultPageSize
7007
7313
  });
7008
7314
  (0, $hgUW1$useEffect)(()=>{
7009
7315
  const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
7010
- if (localFileFormat === "csv") resource.setResource(distribution.identifier);
7316
+ if (localFileFormat === 'csv') resource.setResource(distribution.identifier);
7011
7317
  }, [
7012
7318
  distribution
7013
7319
  ]);
@@ -7021,7 +7327,6 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
7021
7327
  datasetTableControls: !disableTableControls
7022
7328
  },
7023
7329
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $39bc4d98030a5599$export$2e2bcd8739ae039), {
7024
- showQueryBuilder: false,
7025
7330
  showCopyLinkButton: false,
7026
7331
  showDownloadFilteredDataButton: false,
7027
7332
  showDownloadFullDataButton: false,
@@ -7058,7 +7363,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
7058
7363
 
7059
7364
 
7060
7365
  function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
7061
- if (schema[id].fields[condition.property].mysql_type === "date") {
7366
+ if (schema[id].fields[condition.property].mysql_type === 'date') {
7062
7367
  const newDate = new Date(condition.value);
7063
7368
  if (newDate instanceof Date && !isNaN(newDate)) return newDate;
7064
7369
  }
@@ -7075,9 +7380,9 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
7075
7380
  const [startDate, setStartDate] = (0, $hgUW1$react).useState($374c4669b044ddf8$var$getStartDate(condition, schema, id));
7076
7381
  (0, $hgUW1$useEffect)(()=>{
7077
7382
  if (property !== condition.property) {
7078
- if (property) update(index, "property", property);
7079
- else update(index, "property", "");
7080
- if (schema[id].fields[condition.property].mysql_type === "date") {
7383
+ if (property) update(index, 'property', property);
7384
+ else update(index, 'property', '');
7385
+ if (schema[id].fields[condition.property].mysql_type === 'date') {
7081
7386
  if (!value) setValue(startDate.toJSON().slice(0, 10));
7082
7387
  }
7083
7388
  }
@@ -7091,16 +7396,16 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
7091
7396
  ]);
7092
7397
  (0, $hgUW1$useEffect)(()=>{
7093
7398
  if (operator !== condition.operator) {
7094
- if (operator) update(index, "operator", operator);
7095
- else update(index, "operator", "");
7399
+ if (operator) update(index, 'operator', operator);
7400
+ else update(index, 'operator', '');
7096
7401
  }
7097
7402
  }, [
7098
7403
  operator
7099
7404
  ]);
7100
7405
  (0, $hgUW1$useEffect)(()=>{
7101
7406
  if (value !== condition.value) {
7102
- if (value) update(index, "value", value);
7103
- else update(index, "value", "");
7407
+ if (value) update(index, 'value', value);
7408
+ else update(index, 'value', '');
7104
7409
  }
7105
7410
  }, [
7106
7411
  value
@@ -7124,7 +7429,7 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
7124
7429
  onChange: (e)=>setOperator(e.target.value),
7125
7430
  className: "ds-l-sm-col--3 ds-l-md-col--2 ds-l-col--12 ds-u-padding--0 ds-u-md-padding-right--2 ds-u-margin-bottom--0 ds-u-md-margin-bottom--2"
7126
7431
  }),
7127
- schema[id].fields[property].mysql_type === "date" ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
7432
+ schema[id].fields[property].mysql_type === 'date' ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
7128
7433
  className: "ds-l-md-col--5 ds-l-lg-col--4 ds-l-sm-col--8 ds-l-col--12 ds-u-padding--0 ds-u-sm-padding-right--2 ds-u-md-padding-right--0 ds-u-lg-padding-right--2 ds-u-margin-bottom--2",
7129
7434
  children: [
7130
7435
  /*#__PURE__*/ (0, $hgUW1$jsx)("label", {
@@ -7171,22 +7476,94 @@ var $374c4669b044ddf8$export$2e2bcd8739ae039 = $374c4669b044ddf8$var$QueryRow;
7171
7476
 
7172
7477
 
7173
7478
 
7479
+
7480
+ const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions, schema: schema, customColumns: customColumns })=>{
7481
+ const { fields: fields } = schema;
7482
+ const prependedMessage = /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
7483
+ children: "Data filters: "
7484
+ });
7485
+ if (!conditions || !conditions.length) return /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
7486
+ className: "ds-u-margin-y--0",
7487
+ children: [
7488
+ prependedMessage,
7489
+ " none"
7490
+ ]
7491
+ });
7492
+ function formatValue(text, property) {
7493
+ if (customColumns && customColumns.length > 0) {
7494
+ let newValue = text;
7495
+ let customColumn = customColumns.find((c)=>c.accessor === property);
7496
+ if (customColumn && customColumn.cell) return customColumn.cell({
7497
+ value: text
7498
+ });
7499
+ return text;
7500
+ } else return text;
7501
+ }
7502
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
7503
+ className: "dc-querybuilder-title",
7504
+ children: [
7505
+ /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
7506
+ className: "ds-u-margin-y--0",
7507
+ children: prependedMessage
7508
+ }),
7509
+ conditions.map((c)=>{
7510
+ const field = fields[c.property];
7511
+ const description = field && field.description ? field.description : c.property;
7512
+ const operator = (0, $7264a673914aa746$export$5f89a5ae87bc48e1).find((op)=>op.value === c.operator);
7513
+ const cleanedText = (0, $7264a673914aa746$export$6b5e57d20078142b)(c.value);
7514
+ const formattedText = formatValue(cleanedText, c.property);
7515
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
7516
+ className: "ds-u-fill--background ds-u-padding--1 ds-u-margin-y--1 ds-u-display--inline-block ds-u-font-weight--semibold",
7517
+ children: [
7518
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
7519
+ className: "ds-u-font-weight--bold",
7520
+ children: description
7521
+ }),
7522
+ ' ',
7523
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
7524
+ className: "ds-u-font-weight--normal",
7525
+ children: operator.label.toUpperCase()
7526
+ }),
7527
+ ' ',
7528
+ /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
7529
+ className: "ds-u-color--success",
7530
+ children: formattedText
7531
+ })
7532
+ ]
7533
+ });
7534
+ }).reduce((prev, curr)=>[
7535
+ prev,
7536
+ /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Badge), {
7537
+ className: "ds-u-margin-x--1",
7538
+ variation: "info",
7539
+ children: "AND"
7540
+ }),
7541
+ curr
7542
+ ])
7543
+ ]
7544
+ });
7545
+ };
7546
+ var $bef7bff2823feea2$export$2e2bcd8739ae039 = $bef7bff2823feea2$var$QueryTitle;
7547
+
7548
+
7549
+
7550
+
7174
7551
  function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
7175
7552
  let cond = condition;
7176
7553
  delete cond.key;
7177
- if (cond.operator === "=" || cond.operator === "<>") {
7554
+ if (cond.operator === '=' || cond.operator === '<>') {
7178
7555
  if (Array.isArray(cond.value)) cond.value = cond.value.join();
7179
- cond.value = cond.value.replace(/(^\%+|\%+$)/gm, "");
7556
+ cond.value = cond.value.replace(/(^\%+|\%+$)/gm, '');
7180
7557
  }
7181
- if (cond.operator.toLowerCase() === "like") {
7558
+ if (cond.operator.toLowerCase() === 'like') {
7182
7559
  if (Array.isArray(cond.value)) cond.value = cond.value.join();
7183
- const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, "");
7560
+ const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, '');
7184
7561
  cond.value = `%${cleanedValue}%`;
7185
7562
  }
7186
- if (cond.operator.toLowerCase() === "in") {
7187
- if (!Array.isArray(cond.value)) cond.value = cond.value.split(",");
7563
+ if (cond.operator.toLowerCase() === 'in') {
7564
+ if (!Array.isArray(cond.value)) cond.value = cond.value.split(',');
7188
7565
  }
7189
- if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
7566
+ if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ''));
7190
7567
  return cond;
7191
7568
  }
7192
7569
  const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, setOffset: setOffset })=>{
@@ -7206,7 +7583,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
7206
7583
  ...queryConditions,
7207
7584
  {
7208
7585
  property: fields[0],
7209
- value: "",
7586
+ value: '',
7210
7587
  operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
7211
7588
  key: Date.now()
7212
7589
  }
@@ -7246,7 +7623,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
7246
7623
  encodeValuesOnly: true,
7247
7624
  addQueryPrefix: true
7248
7625
  });
7249
- window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
7626
+ window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
7250
7627
  };
7251
7628
  const updateCondition = (index, key, value)=>{
7252
7629
  let newConditions = [
@@ -7319,7 +7696,7 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
7319
7696
 
7320
7697
 
7321
7698
  const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset, distIndex: distIndex, location: location, customColumns: customColumns, columnSettings: columnSettings, columnWidths: columnWidths, customTitle: customTitle, customDescription: customDescription, rootUrl: rootUrl, updateAriaLive: updateAriaLive })=>{
7322
- const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState("ds-u-padding-y--1");
7699
+ const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState('ds-u-padding-y--1');
7323
7700
  let apiDocs = (0, $hgUW1$useRef)();
7324
7701
  let distribution = {};
7325
7702
  let distribution_array = dataset.distribution ? dataset.distribution : [];
@@ -7331,7 +7708,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
7331
7708
  } : {
7332
7709
  conditions: []
7333
7710
  };
7334
- const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
7711
+ const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
7335
7712
  ...options,
7336
7713
  limit: 25
7337
7714
  });
@@ -7345,7 +7722,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
7345
7722
  }, {
7346
7723
  encode: true
7347
7724
  })}&format=csv`;
7348
- const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !== "csv" ? distribution.data.title : dataset.title;
7725
+ const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !== 'csv' ? distribution.data.title : dataset.title;
7349
7726
  const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
7350
7727
  return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
7351
7728
  className: "ds-l-container ds-u-padding-bottom--3 ds-u-margin-bottom--2",
@@ -7354,7 +7731,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
7354
7731
  children: Object.keys(distribution).length && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
7355
7732
  children: [
7356
7733
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
7357
- className: "ds-l-md-col--9",
7734
+ className: 'ds-l-md-col--9',
7358
7735
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
7359
7736
  to: `/dataset/${id}`,
7360
7737
  className: "ds-u-padding-y--4 ds-u-display--block",
@@ -7365,14 +7742,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
7365
7742
  })
7366
7743
  }),
7367
7744
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
7368
- className: "ds-l-md-col--9",
7745
+ className: 'ds-l-md-col--9',
7369
7746
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
7370
7747
  className: "ds-text-heading--3xl",
7371
7748
  children: customTitle ? customTitle : pageTitle
7372
7749
  })
7373
7750
  }),
7374
7751
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
7375
- className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
7752
+ className: 'ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right',
7376
7753
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
7377
7754
  className: "ds-u-margin--0",
7378
7755
  children: [
@@ -7384,7 +7761,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
7384
7761
  })
7385
7762
  }),
7386
7763
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
7387
- className: "ds-l-md-col--9",
7764
+ className: 'ds-l-md-col--9',
7388
7765
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
7389
7766
  distribution: distribution,
7390
7767
  dataset: dataset,
@@ -7394,13 +7771,13 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
7394
7771
  })
7395
7772
  }),
7396
7773
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
7397
- className: "ds-l-md-col--12",
7774
+ className: 'ds-l-md-col--12',
7398
7775
  children: Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
7399
7776
  resource: resource,
7400
7777
  id: distribution.identifier,
7401
7778
  customColumns: customColumns,
7402
7779
  setOffset: resource.setOffset
7403
- }) : ""
7780
+ }) : ''
7404
7781
  }),
7405
7782
  Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
7406
7783
  value: {
@@ -7411,7 +7788,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
7411
7788
  customColumns: (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution_array[distIndex].identifier])
7412
7789
  },
7413
7790
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
7414
- className: "ds-l-md-col--12",
7791
+ className: 'ds-l-md-col--12',
7415
7792
  children: [
7416
7793
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $af099c546cb226c7$export$2e2bcd8739ae039), {
7417
7794
  includeDensity: true,
@@ -7433,14 +7810,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
7433
7810
  ]
7434
7811
  })
7435
7812
  }) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
7436
- className: "ds-l-md-col--12",
7813
+ className: 'ds-l-md-col--12',
7437
7814
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
7438
7815
  role: "status",
7439
7816
  "aria-valuetext": "Resource loading"
7440
7817
  })
7441
7818
  }),
7442
7819
  dataset.identifier && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
7443
- className: "ds-l-md-col--12",
7820
+ className: 'ds-l-md-col--12',
7444
7821
  ref: apiDocs,
7445
7822
  children: [
7446
7823
  /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
@@ -7449,7 +7826,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
7449
7826
  }),
7450
7827
  /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
7451
7828
  url: `${rootUrl}/metastore/schemas/dataset/items/${dataset.identifier}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`,
7452
- docExpansion: "list",
7829
+ docExpansion: 'list',
7453
7830
  defaultModelsExpandDepth: -1
7454
7831
  })
7455
7832
  ]
@@ -7468,7 +7845,7 @@ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, loca
7468
7845
  const [ready, setReady] = (0, $hgUW1$useState)(false);
7469
7846
  const [error, setError] = (0, $hgUW1$useState)(false);
7470
7847
  const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
7471
- const distIndex = dist_id === "data" ? 0 : dist_id;
7848
+ const distIndex = dist_id === 'data' ? 0 : dist_id;
7472
7849
  (0, $hgUW1$useEffect)(()=>{
7473
7850
  if (dataset.error) setError(true);
7474
7851
  if (dataset.distribution && dataset.distribution.length) {
@@ -7686,5 +8063,5 @@ var $90fb213ab8eeb2e7$export$2e2bcd8739ae039 = $90fb213ab8eeb2e7$var$useScrollTo
7686
8063
 
7687
8064
 
7688
8065
 
7689
- export {$e49d4387bed21287$export$2e2bcd8739ae039 as ApiRowLimitNotice, $a8accc31bf9e0bda$export$2e2bcd8739ae039 as CMSTopNav, $c49454ea7d1c4579$export$2e2bcd8739ae039 as ErrorBoundary, $046ded0064bd0a3d$export$2e2bcd8739ae039 as FAQAccordion, $b939b31651e82908$export$2e2bcd8739ae039 as HeaderNav, $1555e1cb3eb7b3e3$export$2e2bcd8739ae039 as HeaderNavIconLink, $fea9297ba4dd394c$export$2e2bcd8739ae039 as HeaderSearch, $9a8892c5ac150556$export$2e2bcd8739ae039 as HeaderSiteTitle, $3c72c298c3a7f21f$export$2e2bcd8739ae039 as HeaderTagline, $403833a4b442d5df$export$2e2bcd8739ae039 as MobileMenuButton, $f57121650539d8c5$export$2e2bcd8739ae039 as NavBar, $953b286f7778640e$export$2e2bcd8739ae039 as SidebarNavigation, $b0968edc60d7d3a4$export$2e2bcd8739ae039 as SidebarPage, $4f153ca537d853e5$export$2e2bcd8739ae039 as SubMenu, $59a079354baa335c$export$2e2bcd8739ae039 as Hero, $c068004d499082cc$export$2e2bcd8739ae039 as DatasetListItem, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $17711e94d2ce0ee4$export$2e2bcd8739ae039 as DatasetDateItem, $20de4fedf33d4f9a$export$2e2bcd8739ae039 as DatasetDate, $10bc3aae21fc1572$export$2e2bcd8739ae039 as DatasetListSubmenu, $e011250e8a3bd5e5$export$2e2bcd8739ae039 as DatasetSearchFacets, $789279954d8eff7f$export$2e2bcd8739ae039 as ApiDocumentation, $af099c546cb226c7$export$2e2bcd8739ae039 as ResourceHeader, $626282d9a03c51d5$export$2e2bcd8739ae039 as ResourcePreview, $072291d44ce1834a$export$2e2bcd8739ae039 as ResourceFooter, $ec3e23baa005dc03$export$2e2bcd8739ae039 as Breadcrumb, $bd76a91923d7e8a7$export$2e2bcd8739ae039 as TransformedDate, $d98f94c79ddf4e0e$export$2e2bcd8739ae039 as DataTable, $bdb071ea3a6d3466$export$2e2bcd8739ae039 as SearchInput, $5644ebd2c3dbfd7b$export$eea3a12df15499ca as buildRows, $2ed0091f7e32d1e6$export$2e2bcd8739ae039 as DataTablePageResults, $1a2bf34e2a8f6b80$export$59a943b34a82e690 as truncateText, $c96c4b9ef7203c1f$export$2e2bcd8739ae039 as APIPage, $026cb986f9fea2b1$export$2e2bcd8739ae039 as PageNotFound, $e873081a6e8f024e$export$2e2bcd8739ae039 as DatasetSearch, $550bcc185f420ff5$export$2e2bcd8739ae039 as DatasetList, $a0f13962e513caa1$export$2e2bcd8739ae039 as Dataset, $a35cf16d1488f54e$export$2e2bcd8739ae039 as DatasetTable, $b9af6ce5e2c06331$export$2e2bcd8739ae039 as Header, $a6df0aa147323304$export$2e2bcd8739ae039 as Footer, $669d2782ec2e2250$export$2e2bcd8739ae039 as SpecsAndLimits, $8b67b7ee3fcfb629$export$2e2bcd8739ae039 as StoredQueryPage, $f61ecf9f84951a61$export$2e2bcd8739ae039 as FilteredResource, $bef7bff2823feea2$export$2e2bcd8739ae039 as QueryTitle, $7264a673914aa746$export$2b9377795161999 as buildOperatorOptions, $7264a673914aa746$export$e284ae5d89467c8f as convertUTCToLocalDate, $7264a673914aa746$export$6b5e57d20078142b as cleanText, $7264a673914aa746$export$8049e8f40a9bdfb8 as buildCustomColHeaders, $11500a65bd7d9cf1$export$2e2bcd8739ae039 as HeaderContext, $43a30d745a7bbc86$export$2e2bcd8739ae039 as DataTableContext, $ebda441784d176a5$export$2e2bcd8739ae039 as ManageColumnsContext, $844981eac9b63865$export$eccc29c8d0ff408 as ACAContext, $efc410f5f7ac5ef3$export$2e2bcd8739ae039 as useSearchAPI, $1d3d480a9cfaabe0$export$2e2bcd8739ae039 as useDatastore, $aa4450dcbeef3ac0$export$385a5aba38cc3325 as transformTableSortToQuerySort, $eb7821d186b1a389$export$2e2bcd8739ae039 as useAddLoginLink, $90fb213ab8eeb2e7$export$2e2bcd8739ae039 as useScrollToTop, $b4aa9c66f2e86959$export$2e2bcd8739ae039 as useMetastoreDataset, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 as withQueryProvider, $6d5c0212e738499b$export$34e95918366a058e as acaToParams, $6da0396069e23175$export$bc27cf7ecf44639d as defaultMetadataMapping};
8066
+ export {$e49d4387bed21287$export$2e2bcd8739ae039 as ApiRowLimitNotice, $a8accc31bf9e0bda$export$2e2bcd8739ae039 as CMSTopNav, $c49454ea7d1c4579$export$2e2bcd8739ae039 as ErrorBoundary, $046ded0064bd0a3d$export$2e2bcd8739ae039 as FAQAccordion, $b939b31651e82908$export$2e2bcd8739ae039 as HeaderNav, $1555e1cb3eb7b3e3$export$2e2bcd8739ae039 as HeaderNavIconLink, $fea9297ba4dd394c$export$2e2bcd8739ae039 as HeaderSearch, $9a8892c5ac150556$export$2e2bcd8739ae039 as HeaderSiteTitle, $3c72c298c3a7f21f$export$2e2bcd8739ae039 as HeaderTagline, $403833a4b442d5df$export$2e2bcd8739ae039 as MobileMenuButton, $f57121650539d8c5$export$2e2bcd8739ae039 as NavBar, $953b286f7778640e$export$2e2bcd8739ae039 as SidebarNavigation, $b0968edc60d7d3a4$export$2e2bcd8739ae039 as SidebarPage, $4f153ca537d853e5$export$2e2bcd8739ae039 as SubMenu, $59a079354baa335c$export$2e2bcd8739ae039 as Hero, $c068004d499082cc$export$2e2bcd8739ae039 as DatasetListItem, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $17711e94d2ce0ee4$export$2e2bcd8739ae039 as DatasetDateItem, $20de4fedf33d4f9a$export$2e2bcd8739ae039 as DatasetDate, $10bc3aae21fc1572$export$2e2bcd8739ae039 as DatasetListSubmenu, $e011250e8a3bd5e5$export$2e2bcd8739ae039 as DatasetSearchFacets, $789279954d8eff7f$export$2e2bcd8739ae039 as ApiDocumentation, $af099c546cb226c7$export$2e2bcd8739ae039 as ResourceHeader, $626282d9a03c51d5$export$2e2bcd8739ae039 as ResourcePreview, $072291d44ce1834a$export$2e2bcd8739ae039 as ResourceFooter, $ec3e23baa005dc03$export$2e2bcd8739ae039 as Breadcrumb, $bd76a91923d7e8a7$export$2e2bcd8739ae039 as TransformedDate, $d98f94c79ddf4e0e$export$2e2bcd8739ae039 as DataTable, $bdb071ea3a6d3466$export$2e2bcd8739ae039 as SearchInput, $5644ebd2c3dbfd7b$export$eea3a12df15499ca as buildRows, $2ed0091f7e32d1e6$export$2e2bcd8739ae039 as DataTablePageResults, $1a2bf34e2a8f6b80$export$59a943b34a82e690 as truncateText, $c96c4b9ef7203c1f$export$2e2bcd8739ae039 as APIPage, $026cb986f9fea2b1$export$2e2bcd8739ae039 as PageNotFound, $e873081a6e8f024e$export$2e2bcd8739ae039 as DatasetSearch, $550bcc185f420ff5$export$2e2bcd8739ae039 as DatasetList, $a0f13962e513caa1$export$2e2bcd8739ae039 as Dataset, $a35cf16d1488f54e$export$2e2bcd8739ae039 as DatasetTable, $b9af6ce5e2c06331$export$2e2bcd8739ae039 as Header, $a6df0aa147323304$export$2e2bcd8739ae039 as Footer, $669d2782ec2e2250$export$2e2bcd8739ae039 as SpecsAndLimits, $8b67b7ee3fcfb629$export$2e2bcd8739ae039 as StoredQueryPage, $f61ecf9f84951a61$export$2e2bcd8739ae039 as FilteredResource, $bef7bff2823feea2$export$2e2bcd8739ae039 as QueryTitle, $7264a673914aa746$export$2b9377795161999 as buildOperatorOptions, $7264a673914aa746$export$e284ae5d89467c8f as convertUTCToLocalDate, $7264a673914aa746$export$6b5e57d20078142b as cleanText, $7264a673914aa746$export$8049e8f40a9bdfb8 as buildCustomColHeaders, $11500a65bd7d9cf1$export$2e2bcd8739ae039 as HeaderContext, $43a30d745a7bbc86$export$2e2bcd8739ae039 as DataTableContext, $ee0d4d4f34048447$export$2e2bcd8739ae039 as DataTableActionsProvider, $844981eac9b63865$export$eccc29c8d0ff408 as ACAContext, $efc410f5f7ac5ef3$export$2e2bcd8739ae039 as useSearchAPI, $1d3d480a9cfaabe0$export$2e2bcd8739ae039 as useDatastore, $aa4450dcbeef3ac0$export$385a5aba38cc3325 as transformTableSortToQuerySort, $eb7821d186b1a389$export$2e2bcd8739ae039 as useAddLoginLink, $90fb213ab8eeb2e7$export$2e2bcd8739ae039 as useScrollToTop, $b4aa9c66f2e86959$export$2e2bcd8739ae039 as useMetastoreDataset, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 as withQueryProvider, $6d5c0212e738499b$export$34e95918366a058e as acaToParams, $6da0396069e23175$export$bc27cf7ecf44639d as defaultMetadataMapping};
7690
8067
  //# sourceMappingURL=main.js.map