@civicactions/cmsds-open-data-components 3.5.1 → 3.6.0-rc.2
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/CMSGovLogo-O.3e657bfb.png +0 -0
- package/dist/CMSGovLogo-O.3fac6f9b.png +0 -0
- package/dist/CMSgov@2x-white-O.5655e842.png +0 -0
- package/dist/CMSgov@2x-white-O.a5f4312c.png +0 -0
- package/dist/main.css +431 -143
- package/dist/main.css.map +1 -1
- package/dist/main.js +726 -575
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +121 -22
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "./main.css";
|
|
2
2
|
import {jsxs as $hgUW1$jsxs, jsx as $hgUW1$jsx, Fragment as $hgUW1$Fragment} from "react/jsx-runtime";
|
|
3
|
-
import $hgUW1$react, {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import $hgUW1$react, {createContext as $hgUW1$createContext, useState as $hgUW1$useState, useRef as $hgUW1$useRef, useEffect as $hgUW1$useEffect, useMemo as $hgUW1$useMemo, useContext as $hgUW1$useContext, useCallback as $hgUW1$useCallback} from "react";
|
|
4
|
+
import {NavLink as $hgUW1$NavLink, useNavigate as $hgUW1$useNavigate, useLocation as $hgUW1$useLocation, useSearchParams as $hgUW1$useSearchParams, Link as $hgUW1$Link} from "react-router-dom";
|
|
5
|
+
import {Button as $hgUW1$Button, Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, CloseIconThin as $hgUW1$CloseIconThin, ArrowIcon as $hgUW1$ArrowIcon, Dialog as $hgUW1$Dialog, TextField as $hgUW1$TextField, Spinner as $hgUW1$Spinner, Dropdown as $hgUW1$Dropdown, Alert as $hgUW1$Alert, Pagination as $hgUW1$Pagination, Choice as $hgUW1$Choice, Tabs as $hgUW1$Tabs, TabPanel as $hgUW1$TabPanel, Table as $hgUW1$Table, TableBody as $hgUW1$TableBody, TableRow as $hgUW1$TableRow, TableCell as $hgUW1$TableCell, TableHead as $hgUW1$TableHead, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon, Badge as $hgUW1$Badge} from "@cmsgov/design-system";
|
|
6
|
+
import {useMediaQuery as $hgUW1$useMediaQuery} from "react-responsive";
|
|
6
7
|
import $hgUW1$qs from "qs";
|
|
7
8
|
import $hgUW1$swaggeruireact from "swagger-ui-react";
|
|
8
9
|
import "swagger-ui-react/swagger-ui.css";
|
|
9
10
|
import $hgUW1$axios from "axios";
|
|
10
11
|
import {useQuery as $hgUW1$useQuery, QueryClient as $hgUW1$QueryClient, QueryClientProvider as $hgUW1$QueryClientProvider} from "@tanstack/react-query";
|
|
11
|
-
import {useMediaQuery as $hgUW1$useMediaQuery} from "react-responsive";
|
|
12
12
|
import $hgUW1$dompurify from "dompurify";
|
|
13
13
|
import $hgUW1$lodashtruncate from "lodash.truncate";
|
|
14
14
|
import $hgUW1$proptypes from "prop-types";
|
|
@@ -21,10 +21,6 @@ import $hgUW1$reactdatepicker from "react-datepicker";
|
|
|
21
21
|
import "react-datepicker/dist/react-datepicker.css";
|
|
22
22
|
import {usePopper as $hgUW1$usePopper} from "react-popper";
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
function $parcel$interopDefault(a) {
|
|
26
|
-
return a && a.__esModule ? a.default : a;
|
|
27
|
-
}
|
|
28
24
|
// Components
|
|
29
25
|
|
|
30
26
|
|
|
@@ -32,87 +28,508 @@ function $parcel$interopDefault(a) {
|
|
|
32
28
|
|
|
33
29
|
|
|
34
30
|
|
|
31
|
+
const $3c72c298c3a7f21f$var$HeaderTagline = (props)=>{
|
|
32
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
33
|
+
className: "dkan-c-cms-topnav--tagline ds-u-valign--middle ds-u-padding-left--2",
|
|
34
|
+
children: props.tagline
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var $3c72c298c3a7f21f$export$2e2bcd8739ae039 = $3c72c298c3a7f21f$var$HeaderTagline;
|
|
35
38
|
|
|
36
39
|
|
|
37
40
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)(
|
|
43
|
-
className:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
const $1555e1cb3eb7b3e3$var$HeaderNavIconLink = (props)=>{
|
|
44
|
+
const { url: url, urlTitle: urlTitle, logoFilePath: logoFilePath, logoAltText: logoAltText, backArrow: backArrow } = props;
|
|
45
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
46
|
+
className: `dkan-c-header-nav-icon-link ${backArrow ? "show-back-arrow" : ""} ds-u-valign--middle `,
|
|
47
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
48
|
+
href: url,
|
|
49
|
+
title: urlTitle,
|
|
50
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("img", {
|
|
51
|
+
src: logoFilePath,
|
|
52
|
+
alt: logoAltText
|
|
53
|
+
})
|
|
54
|
+
})
|
|
47
55
|
});
|
|
48
|
-
// }
|
|
49
56
|
};
|
|
50
|
-
var $
|
|
57
|
+
var $1555e1cb3eb7b3e3$export$2e2bcd8739ae039 = $1555e1cb3eb7b3e3$var$HeaderNavIconLink;
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
const $a8accc31bf9e0bda$var$CMSTopNav = (props)=>{
|
|
62
|
+
const { links: links, org: org } = props;
|
|
63
|
+
const { urlTitle: urlTitle, logoAltText: logoAltText = "", logoFilePath: logoFilePath = "", tagline: tagline, url: url } = org;
|
|
64
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
65
|
+
className: "dkan-c-cms-topnav ds-u-display--flex ds-u-padding-x--5 ds-u-align-items--center ds-u-justify-content--center ds-u-lg-justify-content--start",
|
|
66
|
+
children: [
|
|
67
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
68
|
+
className: "ds-l-col--12 ds-l-md-col--5 ds-l-lg-col--7 ds-u-display--flex ds-u-align-items--center ds-u-justify-content--center ds-u-md-justify-content--start",
|
|
69
|
+
children: [
|
|
70
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $1555e1cb3eb7b3e3$export$2e2bcd8739ae039), {
|
|
71
|
+
url: url,
|
|
72
|
+
urlTitle: urlTitle,
|
|
73
|
+
logoAltText: logoAltText,
|
|
74
|
+
logoFilePath: logoFilePath
|
|
75
|
+
}),
|
|
76
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $3c72c298c3a7f21f$export$2e2bcd8739ae039), {
|
|
77
|
+
tagline: tagline
|
|
78
|
+
})
|
|
79
|
+
]
|
|
80
|
+
}),
|
|
81
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
82
|
+
className: "ds-l-col--7 ds-l-lg-col--5 ds-u-display--none ds-u-md-display--inline-flex ds-u-align-items--center ds-u-justify-content--end",
|
|
83
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("nav", {
|
|
84
|
+
className: "dkan-c-cms-topnav--menu",
|
|
85
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
86
|
+
className: "ds-u-justify-content--end ds-u-md-align-items--center ds-u-flex-direction--column ds-u-md-flex-direction--row",
|
|
87
|
+
children: links.map((link)=>{
|
|
88
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
89
|
+
className: "ds-u-margin-x--05 ds-u-font-size--sm",
|
|
90
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
91
|
+
to: link.url,
|
|
92
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
93
|
+
children: link.label
|
|
94
|
+
})
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
var $a8accc31bf9e0bda$export$2e2bcd8739ae039 = $a8accc31bf9e0bda$var$CMSTopNav;
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
class $c49454ea7d1c4579$var$ErrorBoundary extends (0, $hgUW1$react).Component {
|
|
110
|
+
constructor(props){
|
|
111
|
+
super(props);
|
|
112
|
+
this.state = {
|
|
113
|
+
hasError: false,
|
|
114
|
+
error: undefined
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
static getDerivedStateFromError(error) {
|
|
118
|
+
// Update state so the next render will show the fallback UI.
|
|
119
|
+
return {
|
|
120
|
+
hasError: true,
|
|
121
|
+
error: error
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
componentDidCatch(error, info) {
|
|
125
|
+
// TODO report to logging solution
|
|
126
|
+
console.error({
|
|
127
|
+
error: error,
|
|
128
|
+
info: info
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
render() {
|
|
132
|
+
if (this.props.component) {
|
|
133
|
+
if (this.state.hasError) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
134
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
135
|
+
children: "We're sorry, the site has encountered an unexpected error."
|
|
136
|
+
})
|
|
137
|
+
});
|
|
138
|
+
return this.props.children;
|
|
139
|
+
}
|
|
140
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
141
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
142
|
+
className: "ds-l-container",
|
|
143
|
+
children: [
|
|
144
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
145
|
+
className: "ds-text-heading--2xl",
|
|
146
|
+
children: "Error"
|
|
147
|
+
}),
|
|
148
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
149
|
+
children: "We're sorry, the site has encountered an unexpected error."
|
|
150
|
+
})
|
|
151
|
+
]
|
|
152
|
+
})
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
var $c49454ea7d1c4579$export$2e2bcd8739ae039 = $c49454ea7d1c4579$var$ErrorBoundary;
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
const $046ded0064bd0a3d$var$FAQAccordion = (props)=>{
|
|
163
|
+
const { faqs: faqs } = props;
|
|
164
|
+
const [expanded, setExpanded] = (0, $hgUW1$react).useState(false);
|
|
165
|
+
const [faqItems, setFaqItems] = (0, $hgUW1$react).useState(faqs);
|
|
166
|
+
function toggleAll() {
|
|
167
|
+
if (expanded) {
|
|
168
|
+
const newFaqs = faqItems.map((item)=>({
|
|
169
|
+
...item,
|
|
170
|
+
open: false
|
|
171
|
+
}));
|
|
172
|
+
setFaqItems(newFaqs);
|
|
173
|
+
setExpanded(false);
|
|
174
|
+
} else {
|
|
175
|
+
const newFaqs = faqItems.map((item)=>({
|
|
176
|
+
...item,
|
|
177
|
+
open: true
|
|
178
|
+
}));
|
|
179
|
+
setFaqItems(newFaqs);
|
|
180
|
+
setExpanded(true);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
function toggleAccordionItem(id) {
|
|
184
|
+
const currentFaqIndex = faqItems.findIndex((item)=>item.id === id);
|
|
185
|
+
const updatedFaq = {
|
|
186
|
+
...faqItems[currentFaqIndex],
|
|
187
|
+
open: !faqItems[currentFaqIndex].open
|
|
188
|
+
};
|
|
189
|
+
const newFaqs = [
|
|
190
|
+
...faqItems.slice(0, currentFaqIndex),
|
|
191
|
+
updatedFaq,
|
|
192
|
+
...faqItems.slice(currentFaqIndex + 1)
|
|
193
|
+
];
|
|
194
|
+
setFaqItems(newFaqs);
|
|
195
|
+
const openCount = newFaqs.filter((item)=>item.open === true).length;
|
|
196
|
+
if (openCount > 0 && openCount == newFaqs.length) setExpanded(true);
|
|
197
|
+
else setExpanded(false);
|
|
198
|
+
}
|
|
199
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
200
|
+
children: [
|
|
201
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
202
|
+
className: "ds-u-margin-y--2 ds-u-float--right",
|
|
203
|
+
type: "button",
|
|
204
|
+
variation: "ghost",
|
|
205
|
+
onClick: ()=>toggleAll(),
|
|
206
|
+
children: `${expanded ? "Collapse" : "Expand"} all FAQs`
|
|
207
|
+
}),
|
|
208
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
|
|
209
|
+
children: faqItems.map((faq)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
210
|
+
heading: faq.title,
|
|
211
|
+
isControlledOpen: faq.open,
|
|
212
|
+
onChange: ()=>toggleAccordionItem(faq.id),
|
|
213
|
+
children: faq.body
|
|
214
|
+
}, faq.id))
|
|
215
|
+
})
|
|
216
|
+
]
|
|
217
|
+
});
|
|
218
|
+
};
|
|
219
|
+
var $046ded0064bd0a3d$export$2e2bcd8739ae039 = $046ded0064bd0a3d$var$FAQAccordion;
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
const $11500a65bd7d9cf1$var$HeaderContext = /*#__PURE__*/ (0, $hgUW1$createContext)({
|
|
228
|
+
mobileMenuOpen: false,
|
|
229
|
+
setMobileMenuOpen: (el)=>{},
|
|
230
|
+
menuRef: null,
|
|
231
|
+
isMobile: false,
|
|
232
|
+
onDark: true
|
|
233
|
+
});
|
|
234
|
+
var $11500a65bd7d9cf1$export$2e2bcd8739ae039 = $11500a65bd7d9cf1$var$HeaderContext;
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
51
241
|
|
|
52
242
|
|
|
53
|
-
const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, wrapLabel: wrapLabel })=>{
|
|
54
|
-
const [isExpanded,
|
|
243
|
+
const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, subLinkClasses: subLinkClasses, wrapLabel: wrapLabel = true })=>{
|
|
244
|
+
const [isExpanded, setIsExpanded] = (0, $hgUW1$useState)(false);
|
|
245
|
+
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
55
246
|
const innerHtml = wrapLabel ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
56
247
|
children: link.label
|
|
57
248
|
}) : link.label;
|
|
58
249
|
const menu = (0, $hgUW1$useRef)();
|
|
59
250
|
(0, $hgUW1$useEffect)(()=>{
|
|
251
|
+
let currentMenu = null;
|
|
252
|
+
if (menu.current) currentMenu = menu.current;
|
|
60
253
|
function handleClickOutside(event) {
|
|
61
|
-
if (
|
|
254
|
+
if (currentMenu && !currentMenu.contains(event.target)) setIsExpanded(false);
|
|
62
255
|
}
|
|
63
256
|
function handleFocusOut(event) {
|
|
64
|
-
if (
|
|
257
|
+
if (currentMenu && !currentMenu.contains(event.relatedTarget)) setIsExpanded(false);
|
|
65
258
|
}
|
|
66
259
|
document.addEventListener("mousedown", handleClickOutside);
|
|
67
|
-
|
|
260
|
+
currentMenu?.addEventListener("focusout", handleFocusOut);
|
|
68
261
|
return ()=>{
|
|
69
262
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
70
|
-
if (
|
|
263
|
+
if (currentMenu) currentMenu.removeEventListener("focusout", handleFocusOut);
|
|
71
264
|
};
|
|
72
265
|
}, [
|
|
73
|
-
menu,
|
|
74
266
|
isExpanded
|
|
75
267
|
]);
|
|
76
268
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
77
|
-
className: `has-submenu
|
|
269
|
+
className: `dkan-c-nav-submenu has-submenu${isExpanded ? " open" : ""}`,
|
|
78
270
|
ref: menu,
|
|
79
271
|
children: [
|
|
80
|
-
/*#__PURE__*/ (0, $hgUW1$
|
|
81
|
-
size: "small",
|
|
272
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
82
273
|
variation: "ghost",
|
|
83
|
-
onDark:
|
|
84
|
-
className: linkClasses
|
|
274
|
+
onDark: headerContext.onDark,
|
|
275
|
+
className: `${linkClasses}`,
|
|
85
276
|
"aria-haspopup": "true",
|
|
86
277
|
"aria-expanded": isExpanded,
|
|
87
278
|
onClick: (e)=>{
|
|
88
279
|
e.preventDefault();
|
|
89
|
-
|
|
280
|
+
setIsExpanded(!isExpanded);
|
|
90
281
|
},
|
|
91
|
-
children:
|
|
282
|
+
children: [
|
|
283
|
+
innerHtml,
|
|
284
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
|
|
285
|
+
className: "ds-u-margin-left--1",
|
|
286
|
+
direction: isExpanded ? "down" : "right"
|
|
287
|
+
})
|
|
288
|
+
]
|
|
92
289
|
}),
|
|
93
290
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
94
|
-
className: "
|
|
291
|
+
className: "dkan-c-site-menu--sub-menu",
|
|
95
292
|
children: link.submenu.map((s)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
96
|
-
children: /*#__PURE__*/ (0, $hgUW1$
|
|
97
|
-
|
|
98
|
-
|
|
293
|
+
children: s.external || s.drupalPage ? /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
294
|
+
href: s.url,
|
|
295
|
+
className: `ds-u-display-flex ds-u-align-items--center ${subLinkClasses}`,
|
|
296
|
+
children: [
|
|
297
|
+
s.icon ?? null,
|
|
298
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
299
|
+
children: s.label
|
|
300
|
+
})
|
|
301
|
+
]
|
|
302
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$NavLink), {
|
|
303
|
+
to: s.url,
|
|
304
|
+
className: `ds-u-display-flex ds-u-align-items--center ${subLinkClasses}`,
|
|
305
|
+
onClick: ()=>setIsExpanded(!isExpanded),
|
|
306
|
+
children: [
|
|
307
|
+
s.icon ?? null,
|
|
308
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
309
|
+
children: s.label
|
|
310
|
+
})
|
|
311
|
+
]
|
|
99
312
|
})
|
|
100
313
|
}, s.id))
|
|
101
314
|
})
|
|
102
315
|
]
|
|
103
316
|
});
|
|
104
317
|
};
|
|
105
|
-
var $4f153ca537d853e5$export$2e2bcd8739ae039 = $4f153ca537d853e5$var$SubMenu;
|
|
318
|
+
var $4f153ca537d853e5$export$2e2bcd8739ae039 = $4f153ca537d853e5$var$SubMenu;
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
|
|
327
|
+
const { headingText: headingText = "Dataset Search" } = props;
|
|
328
|
+
const navigate = (0, $hgUW1$useNavigate)();
|
|
329
|
+
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)("");
|
|
330
|
+
const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
|
|
331
|
+
function searchForDataset(e) {
|
|
332
|
+
e.preventDefault();
|
|
333
|
+
if (window) {
|
|
334
|
+
if (window.location.pathname !== "/datasets") navigate(`/datasets?fulltext=${modalSearchTerm}`);
|
|
335
|
+
else {
|
|
336
|
+
window.location.search = `fulltext=${modalSearchTerm}`;
|
|
337
|
+
setModalSearch(false);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
342
|
+
className: "dkan-c-main-navigation--search",
|
|
343
|
+
children: [
|
|
344
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
345
|
+
variation: "ghost",
|
|
346
|
+
onDark: true,
|
|
347
|
+
className: "ds-u-border--0 dkan-c-header-search--modal-button",
|
|
348
|
+
onClick: ()=>setModalSearch(true),
|
|
349
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
350
|
+
children: "Search"
|
|
351
|
+
})
|
|
352
|
+
}),
|
|
353
|
+
modalSearch && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
354
|
+
className: "dc-c-search-dialog",
|
|
355
|
+
onExit: ()=>setModalSearch(false),
|
|
356
|
+
heading: `${headingText}`,
|
|
357
|
+
actions: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
358
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("form", {
|
|
359
|
+
className: "ds-u-display--flex ds-u-align-items--stretch ds-u-flex-wrap--nowrap",
|
|
360
|
+
onSubmit: (e)=>{
|
|
361
|
+
searchForDataset(e);
|
|
362
|
+
},
|
|
363
|
+
children: [
|
|
364
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
365
|
+
value: modalSearchTerm,
|
|
366
|
+
fieldClassName: "ds-u-display--inline-block",
|
|
367
|
+
className: "ds-l-col--9",
|
|
368
|
+
label: "Search Term",
|
|
369
|
+
name: "search-modal",
|
|
370
|
+
labelClassName: "ds-u-visibility--screen-reader",
|
|
371
|
+
onChange: (e)=>setModalSearchTerm(e.target.value)
|
|
372
|
+
}),
|
|
373
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
374
|
+
type: "submit",
|
|
375
|
+
className: "ds-l-col--3",
|
|
376
|
+
children: [
|
|
377
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
378
|
+
className: "fas fa-search small-text ds-u-sm-display--none"
|
|
379
|
+
}),
|
|
380
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
381
|
+
className: "full-text ds-u-display--none ds-u-sm-display--inline-block",
|
|
382
|
+
children: "Search"
|
|
383
|
+
})
|
|
384
|
+
]
|
|
385
|
+
})
|
|
386
|
+
]
|
|
387
|
+
})
|
|
388
|
+
})
|
|
389
|
+
})
|
|
390
|
+
]
|
|
391
|
+
});
|
|
392
|
+
};
|
|
393
|
+
var $fea9297ba4dd394c$export$2e2bcd8739ae039 = $fea9297ba4dd394c$var$HeaderSearch;
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
const $b939b31651e82908$var$HeaderNav = (props)=>{
|
|
398
|
+
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
399
|
+
const { links: links, topNavLinks: topNavLinks, wrapperClasses: wrapperClasses, searchInMobile: searchInMobile } = props;
|
|
400
|
+
const navMenuOpenClass = `dkan-c-nav-menu--${headerContext.mobileMenuOpen ? "open" : "close"}`;
|
|
401
|
+
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ? "mobile" : "desktop"}`;
|
|
402
|
+
const linkClasses = "dkan-c-header--link ds-c-button ds-c-button--ghost";
|
|
403
|
+
const listClasses = "dkan-c-header--link-list ";
|
|
404
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
405
|
+
className: `dkan-c-nav-menu ${wrapperClasses} ${navMenuOpenClass} ${isMobileClass}`,
|
|
406
|
+
ref: headerContext.menuRef,
|
|
407
|
+
children: [
|
|
408
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
409
|
+
variation: "ghost",
|
|
410
|
+
onDark: true,
|
|
411
|
+
className: "dkan-c-nav-menu--mobile-close-button",
|
|
412
|
+
onClick: ()=>headerContext.setMobileMenuOpen(false),
|
|
413
|
+
children: [
|
|
414
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$CloseIconThin), {}),
|
|
415
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
416
|
+
className: "ds-u-margin-left--1",
|
|
417
|
+
children: "Close"
|
|
418
|
+
})
|
|
419
|
+
]
|
|
420
|
+
}),
|
|
421
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("nav", {
|
|
422
|
+
className: "dkan-c-main-nav",
|
|
423
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
424
|
+
className: listClasses,
|
|
425
|
+
children: links.map((link)=>{
|
|
426
|
+
if (link.submenu) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $4f153ca537d853e5$export$2e2bcd8739ae039), {
|
|
427
|
+
link: link,
|
|
428
|
+
wrapLabel: true,
|
|
429
|
+
subLinkClasses: linkClasses,
|
|
430
|
+
linkClasses: linkClasses
|
|
431
|
+
}, link.id);
|
|
432
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
433
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
434
|
+
to: link.url,
|
|
435
|
+
className: linkClasses,
|
|
436
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
437
|
+
children: link.label
|
|
438
|
+
})
|
|
439
|
+
})
|
|
440
|
+
});
|
|
441
|
+
})
|
|
442
|
+
})
|
|
443
|
+
}),
|
|
444
|
+
topNavLinks && /*#__PURE__*/ (0, $hgUW1$jsx)("nav", {
|
|
445
|
+
className: "dkan-c-top-nav",
|
|
446
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
447
|
+
className: listClasses,
|
|
448
|
+
children: topNavLinks.map((link)=>{
|
|
449
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
450
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
451
|
+
to: link.url,
|
|
452
|
+
className: linkClasses,
|
|
453
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
454
|
+
children: link.label
|
|
455
|
+
})
|
|
456
|
+
})
|
|
457
|
+
});
|
|
458
|
+
})
|
|
459
|
+
})
|
|
460
|
+
}),
|
|
461
|
+
searchInMobile && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $fea9297ba4dd394c$export$2e2bcd8739ae039), {})
|
|
462
|
+
]
|
|
463
|
+
});
|
|
464
|
+
};
|
|
465
|
+
var $b939b31651e82908$export$2e2bcd8739ae039 = $b939b31651e82908$var$HeaderNav;
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
const $9a8892c5ac150556$var$HeaderSiteTitle = (props)=>{
|
|
474
|
+
const inverse = props.inverse;
|
|
475
|
+
const { logoFilePath: logoFilePath, logoAltText: logoAltText, urlTitle: urlTitle } = props.org;
|
|
476
|
+
const classList = "ds-u-padding-y--3 dc-c-site-title print-padding-top--0 print-padding-bottom--0 ds-u-text-align--center ds-u-md-text-align--left";
|
|
477
|
+
if (logoFilePath) return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
478
|
+
className: classList,
|
|
479
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
480
|
+
to: "/",
|
|
481
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("img", {
|
|
482
|
+
src: logoFilePath,
|
|
483
|
+
alt: logoAltText
|
|
484
|
+
})
|
|
485
|
+
})
|
|
486
|
+
});
|
|
487
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
488
|
+
className: classList,
|
|
489
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
490
|
+
to: "/",
|
|
491
|
+
className: `${inverse ? "ds-c-link--inverse " : ""} ds-u-font-size--2xl ds-u-lg-font-size--3xl`,
|
|
492
|
+
children: urlTitle
|
|
493
|
+
})
|
|
494
|
+
});
|
|
495
|
+
};
|
|
496
|
+
var $9a8892c5ac150556$export$2e2bcd8739ae039 = $9a8892c5ac150556$var$HeaderSiteTitle;
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
const $403833a4b442d5df$var$MobileMenuButton = (props)=>{
|
|
506
|
+
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
507
|
+
const { wrapperClasses: wrapperClasses } = props;
|
|
508
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
509
|
+
"aria-haspopup": "true",
|
|
510
|
+
"aria-expanded": headerContext.mobileMenuOpen,
|
|
511
|
+
className: `dkan-c-mobile-menu-button ${wrapperClasses} dkan-c-mobile-menu-button--${headerContext.mobileMenuOpen ? "close" : "open"}`,
|
|
512
|
+
onClick: ()=>headerContext.setMobileMenuOpen(!headerContext.mobileMenuOpen),
|
|
513
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
514
|
+
children: "Menu"
|
|
515
|
+
})
|
|
516
|
+
});
|
|
517
|
+
};
|
|
518
|
+
var $403833a4b442d5df$export$2e2bcd8739ae039 = $403833a4b442d5df$var$MobileMenuButton;
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
|
|
106
522
|
|
|
107
523
|
|
|
108
524
|
|
|
109
|
-
const $f57121650539d8c5$var$NavBar = (
|
|
525
|
+
const $f57121650539d8c5$var$NavBar = (props)=>{
|
|
526
|
+
const { links: links, menuName: menuName, menuId: menuId, menuClasses: menuClasses, linkClasses: linkClasses, subLinkClasses: subLinkClasses, wrapLabel: wrapLabel = false } = props;
|
|
110
527
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
|
|
111
|
-
className: `
|
|
112
|
-
"aria-labelledby": `
|
|
528
|
+
className: `dkan-c-${menuId}-menu`,
|
|
529
|
+
"aria-labelledby": `dkan-c-${menuId}-menu--heading`,
|
|
113
530
|
children: [
|
|
114
531
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
115
|
-
id: `
|
|
532
|
+
id: `dkan-c-${menuId}-menu--heading`,
|
|
116
533
|
className: "ds-u-visibility--screen-reader",
|
|
117
534
|
children: menuName
|
|
118
535
|
}),
|
|
@@ -122,14 +539,16 @@ const $f57121650539d8c5$var$NavBar = ({ links: links, menuName: menuName, menuId
|
|
|
122
539
|
if (link.submenu) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $4f153ca537d853e5$export$2e2bcd8739ae039), {
|
|
123
540
|
link: link,
|
|
124
541
|
wrapLabel: wrapLabel,
|
|
542
|
+
subLinkClasses: subLinkClasses,
|
|
125
543
|
linkClasses: linkClasses
|
|
126
544
|
}, link.id);
|
|
127
545
|
else return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
128
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $
|
|
129
|
-
|
|
546
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
547
|
+
to: link,
|
|
130
548
|
className: linkClasses,
|
|
131
|
-
|
|
132
|
-
|
|
549
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
550
|
+
children: link.label
|
|
551
|
+
})
|
|
133
552
|
})
|
|
134
553
|
}, link.id);
|
|
135
554
|
})
|
|
@@ -144,54 +563,115 @@ var $f57121650539d8c5$export$2e2bcd8739ae039 = $f57121650539d8c5$var$NavBar;
|
|
|
144
563
|
|
|
145
564
|
|
|
146
565
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
componentDidCatch(error, info) {
|
|
163
|
-
// TODO report to logging solution
|
|
164
|
-
console.error({
|
|
165
|
-
error: error,
|
|
166
|
-
info: info
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
render() {
|
|
170
|
-
if (this.props.component) {
|
|
171
|
-
if (this.state.hasError) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
172
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
173
|
-
children: "We're sorry, the site has encountered an unexpected error."
|
|
174
|
-
})
|
|
175
|
-
});
|
|
176
|
-
return this.props.children;
|
|
177
|
-
}
|
|
178
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
179
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
180
|
-
className: "ds-l-container",
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
570
|
+
const { title: title, links: links, mobileMax: mobileMax } = props;
|
|
571
|
+
const active = (0, $hgUW1$useLocation)().pathname;
|
|
572
|
+
const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
|
|
573
|
+
const styleClasses = "dkan-c--sidebar-nav-wrapper ds-u-border--1 ds-u-border--color-gray-lightest ds-u-padding--2";
|
|
574
|
+
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ? "mobile" : "desktop"}`;
|
|
575
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
576
|
+
className: `dkan-c-sidebar-nav ${mobileClass}`,
|
|
577
|
+
children: [
|
|
578
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
579
|
+
className: "dkan-c-sidebar-nav--mobile-header ds-u-align-items--center ds-u-justify-content--between ds-u-padding-y--2 ds-u-fill--primary-darker ds-u-color--white",
|
|
181
580
|
children: [
|
|
182
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("
|
|
183
|
-
className: "ds-text-heading--
|
|
184
|
-
children: "
|
|
581
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
582
|
+
className: "ds-u-margin-left--2 ds-u-margin-y--0 ds-text-heading--xl",
|
|
583
|
+
children: "Pages in this section"
|
|
185
584
|
}),
|
|
186
|
-
/*#__PURE__*/ (0, $hgUW1$
|
|
187
|
-
|
|
585
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
586
|
+
"aria-haspopup": "true",
|
|
587
|
+
variation: "ghost",
|
|
588
|
+
"aria-expanded": `${menuOpen ? "true" : "false"}`,
|
|
589
|
+
onDark: true,
|
|
590
|
+
onClick: ()=>setMenuOpen(!menuOpen),
|
|
591
|
+
children: [
|
|
592
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
593
|
+
className: "ds-u-visibility--screen-reader",
|
|
594
|
+
children: "Toggle menu"
|
|
595
|
+
}),
|
|
596
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
|
|
597
|
+
direction: menuOpen ? "up" : "down"
|
|
598
|
+
})
|
|
599
|
+
]
|
|
188
600
|
})
|
|
189
601
|
]
|
|
602
|
+
}),
|
|
603
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
604
|
+
className: ``,
|
|
605
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
|
|
606
|
+
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ? "open" : "close"}`,
|
|
607
|
+
children: [
|
|
608
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
609
|
+
className: "ds-u-padding--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest",
|
|
610
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h3", {
|
|
611
|
+
className: "ds-text-heading--lg",
|
|
612
|
+
children: title
|
|
613
|
+
})
|
|
614
|
+
}),
|
|
615
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
616
|
+
className: "ds-u-padding-bottom--2",
|
|
617
|
+
children: links.map(({ url: url, label: label })=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
618
|
+
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ? "active" : ""}`,
|
|
619
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
620
|
+
className: "ds-u-display--flex ds-u-padding-y--1",
|
|
621
|
+
children: [
|
|
622
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
623
|
+
className: "dkan-c-sidebar-nav-link-status"
|
|
624
|
+
}),
|
|
625
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
626
|
+
to: url,
|
|
627
|
+
className: "dkan-c-sidebar-nav-link ds-u-margin-left--2",
|
|
628
|
+
children: label
|
|
629
|
+
})
|
|
630
|
+
]
|
|
631
|
+
})
|
|
632
|
+
}, `${url}${label}`))
|
|
633
|
+
})
|
|
634
|
+
]
|
|
635
|
+
})
|
|
190
636
|
})
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
var $
|
|
637
|
+
]
|
|
638
|
+
});
|
|
639
|
+
};
|
|
640
|
+
var $953b286f7778640e$export$2e2bcd8739ae039 = $953b286f7778640e$var$SidebarNavigation;
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
const $b0968edc60d7d3a4$var$SidebarPage = (props)=>{
|
|
648
|
+
const { links: links, menuTitle: menuTitle, mobileMaxWidth: mobileMaxWidth = 768, children: children } = props;
|
|
649
|
+
const mobileMax = (0, $hgUW1$useMediaQuery)({
|
|
650
|
+
query: `(max-width: ${mobileMaxWidth}px)`
|
|
651
|
+
});
|
|
652
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
653
|
+
className: `${mobileMax ? "a" : "ds-l-container"}`,
|
|
654
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
655
|
+
className: `${mobileMax ? "a" : "ds-l-row"}`,
|
|
656
|
+
children: [
|
|
657
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
658
|
+
className: `${mobileMax ? "a" : "ds-l-col--4"}`,
|
|
659
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $953b286f7778640e$export$2e2bcd8739ae039), {
|
|
660
|
+
links: links,
|
|
661
|
+
title: menuTitle,
|
|
662
|
+
mobileMax: mobileMax
|
|
663
|
+
})
|
|
664
|
+
}),
|
|
665
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
666
|
+
className: `${mobileMax ? "ds-l-container" : " ds-l-md-col--8"}`,
|
|
667
|
+
children: children
|
|
668
|
+
})
|
|
669
|
+
]
|
|
670
|
+
})
|
|
671
|
+
});
|
|
672
|
+
};
|
|
673
|
+
var $b0968edc60d7d3a4$export$2e2bcd8739ae039 = $b0968edc60d7d3a4$var$SidebarPage;
|
|
674
|
+
|
|
195
675
|
|
|
196
676
|
|
|
197
677
|
|
|
@@ -4115,543 +4595,213 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, additionalPar
|
|
|
4115
4595
|
}),
|
|
4116
4596
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
4117
4597
|
id: "overview",
|
|
4118
|
-
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
4119
|
-
className: "ds-u-color--primary",
|
|
4120
|
-
children: [
|
|
4121
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
4122
|
-
id: "overview"
|
|
4123
|
-
}),
|
|
4124
|
-
"Overview"
|
|
4125
|
-
]
|
|
4126
|
-
}),
|
|
4127
|
-
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
4128
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
|
|
4129
|
-
resource: resource,
|
|
4130
|
-
dataset: dataset,
|
|
4131
|
-
distributions: distributions,
|
|
4132
|
-
metadataMapping: metadataMapping
|
|
4133
|
-
})
|
|
4134
|
-
}),
|
|
4135
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TabPanel), {
|
|
4136
|
-
id: "data-dictionary",
|
|
4137
|
-
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
4138
|
-
className: "ds-u-color--primary",
|
|
4139
|
-
children: [
|
|
4140
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
4141
|
-
id: "data-dictionary"
|
|
4142
|
-
}),
|
|
4143
|
-
"Data Dictionary"
|
|
4144
|
-
]
|
|
4145
|
-
}),
|
|
4146
|
-
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
4147
|
-
children: [
|
|
4148
|
-
displayDataDictionaryTab && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
4149
|
-
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
4150
|
-
datasetDictionaryEndpoint: distribution.data.describedBy,
|
|
4151
|
-
title: "Data Dictionary",
|
|
4152
|
-
additionalParams: additionalParams,
|
|
4153
|
-
csvDownload: dataDictionaryCSV
|
|
4154
|
-
}),
|
|
4155
|
-
!displayDataDictionaryTab && /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4156
|
-
children: "There is no Data Dictionary associated with this dataset."
|
|
4157
|
-
})
|
|
4158
|
-
]
|
|
4159
|
-
}),
|
|
4160
|
-
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
4161
|
-
id: "api",
|
|
4162
|
-
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
4163
|
-
className: "ds-u-color--primary",
|
|
4164
|
-
children: [
|
|
4165
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
4166
|
-
id: "api"
|
|
4167
|
-
}),
|
|
4168
|
-
"API"
|
|
4169
|
-
]
|
|
4170
|
-
}),
|
|
4171
|
-
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
4172
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
|
|
4173
|
-
id: id,
|
|
4174
|
-
rootUrl: rootUrl,
|
|
4175
|
-
apiUrl: apiPageUrl,
|
|
4176
|
-
additionalParams: additionalParams
|
|
4177
|
-
})
|
|
4178
|
-
})
|
|
4179
|
-
]
|
|
4180
|
-
})
|
|
4181
|
-
})
|
|
4182
|
-
})
|
|
4183
|
-
]
|
|
4184
|
-
})
|
|
4185
|
-
});
|
|
4186
|
-
};
|
|
4187
|
-
$a0f13962e513caa1$var$Dataset.propTypes = {
|
|
4188
|
-
id: (0, $hgUW1$proptypes).string.isRequired,
|
|
4189
|
-
rootUrl: (0, $hgUW1$proptypes).string.isRequired
|
|
4190
|
-
};
|
|
4191
|
-
var $a0f13962e513caa1$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039)($a0f13962e513caa1$var$Dataset);
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
const $e5bfafc6d4e6f207$var$SearchModal = ({ headingText: headingText = "Dataset Search", buttonSize: buttonSize = null, inversedSearchButton: inversedSearchButton = true })=>{
|
|
4209
|
-
const navigate = (0, $hgUW1$useNavigate)();
|
|
4210
|
-
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)("");
|
|
4211
|
-
const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
|
|
4212
|
-
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
4213
|
-
minWidth: 0,
|
|
4214
|
-
maxWidth: 543
|
|
4215
|
-
});
|
|
4216
|
-
function searchForDataset(e) {
|
|
4217
|
-
e.preventDefault();
|
|
4218
|
-
if (window) {
|
|
4219
|
-
if (window.location.pathname !== "/datasets") navigate(`/datasets?fulltext=${modalSearchTerm}`);
|
|
4220
|
-
else {
|
|
4221
|
-
window.location.search = `fulltext=${modalSearchTerm}`;
|
|
4222
|
-
setModalSearch(false);
|
|
4223
|
-
}
|
|
4224
|
-
}
|
|
4225
|
-
}
|
|
4226
|
-
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
4227
|
-
children: [
|
|
4228
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
4229
|
-
variation: "ghost",
|
|
4230
|
-
onDark: inversedSearchButton,
|
|
4231
|
-
size: buttonSize,
|
|
4232
|
-
className: "ds-u-border--0 dc-c-search-modal--button",
|
|
4233
|
-
onClick: ()=>setModalSearch(true),
|
|
4234
|
-
children: mobile ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4235
|
-
className: "ds-u-visibility--screen-reader",
|
|
4236
|
-
children: "Search"
|
|
4237
|
-
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
4238
|
-
children: "Search"
|
|
4239
|
-
})
|
|
4240
|
-
}),
|
|
4241
|
-
modalSearch && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
4242
|
-
className: "dc-c-search-dialog",
|
|
4243
|
-
onExit: ()=>setModalSearch(false),
|
|
4244
|
-
heading: `${headingText}`,
|
|
4245
|
-
actions: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
4246
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("form", {
|
|
4247
|
-
className: "ds-u-display--flex ds-u-align-items--stretch ds-u-flex-wrap--nowrap",
|
|
4248
|
-
onSubmit: (e)=>{
|
|
4249
|
-
searchForDataset(e);
|
|
4250
|
-
},
|
|
4251
|
-
children: [
|
|
4252
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4253
|
-
value: modalSearchTerm,
|
|
4254
|
-
fieldClassName: "ds-u-display--inline-block",
|
|
4255
|
-
className: "ds-l-col--9",
|
|
4256
|
-
label: "Search Term",
|
|
4257
|
-
name: "search-modal",
|
|
4258
|
-
labelClassName: "ds-u-visibility--screen-reader",
|
|
4259
|
-
onChange: (e)=>setModalSearchTerm(e.target.value)
|
|
4260
|
-
}),
|
|
4261
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
4262
|
-
type: "submit",
|
|
4263
|
-
className: "ds-l-col--3",
|
|
4264
|
-
children: [
|
|
4265
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4266
|
-
className: "fas fa-search small-text ds-u-sm-display--none"
|
|
4598
|
+
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
4599
|
+
className: "ds-u-color--primary",
|
|
4600
|
+
children: [
|
|
4601
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
4602
|
+
id: "overview"
|
|
4603
|
+
}),
|
|
4604
|
+
"Overview"
|
|
4605
|
+
]
|
|
4267
4606
|
}),
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4607
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
4608
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
|
|
4609
|
+
resource: resource,
|
|
4610
|
+
dataset: dataset,
|
|
4611
|
+
distributions: distributions,
|
|
4612
|
+
metadataMapping: metadataMapping
|
|
4271
4613
|
})
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
}
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4614
|
+
}),
|
|
4615
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TabPanel), {
|
|
4616
|
+
id: "data-dictionary",
|
|
4617
|
+
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
4618
|
+
className: "ds-u-color--primary",
|
|
4619
|
+
children: [
|
|
4620
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
4621
|
+
id: "data-dictionary"
|
|
4622
|
+
}),
|
|
4623
|
+
"Data Dictionary"
|
|
4624
|
+
]
|
|
4625
|
+
}),
|
|
4626
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
4627
|
+
children: [
|
|
4628
|
+
displayDataDictionaryTab && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
4629
|
+
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
4630
|
+
datasetDictionaryEndpoint: distribution.data.describedBy,
|
|
4631
|
+
title: "Data Dictionary",
|
|
4632
|
+
additionalParams: additionalParams,
|
|
4633
|
+
csvDownload: dataDictionaryCSV
|
|
4634
|
+
}),
|
|
4635
|
+
!displayDataDictionaryTab && /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4636
|
+
children: "There is no Data Dictionary associated with this dataset."
|
|
4637
|
+
})
|
|
4638
|
+
]
|
|
4639
|
+
}),
|
|
4640
|
+
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
4641
|
+
id: "api",
|
|
4642
|
+
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
4643
|
+
className: "ds-u-color--primary",
|
|
4644
|
+
children: [
|
|
4645
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
4646
|
+
id: "api"
|
|
4647
|
+
}),
|
|
4648
|
+
"API"
|
|
4649
|
+
]
|
|
4650
|
+
}),
|
|
4651
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
4652
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
|
|
4653
|
+
id: id,
|
|
4654
|
+
rootUrl: rootUrl,
|
|
4655
|
+
apiUrl: apiPageUrl,
|
|
4656
|
+
additionalParams: additionalParams
|
|
4315
4657
|
})
|
|
4316
4658
|
})
|
|
4317
|
-
|
|
4318
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4319
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4320
|
-
className: "cms-text-container",
|
|
4321
|
-
children: tagline
|
|
4322
|
-
})
|
|
4323
|
-
})
|
|
4324
|
-
]
|
|
4325
|
-
}),
|
|
4326
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4327
|
-
className: "ds-u-margin-left--auto",
|
|
4328
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $f57121650539d8c5$export$2e2bcd8739ae039), {
|
|
4329
|
-
links: links.topnav,
|
|
4330
|
-
menuName: "CMS Main Header",
|
|
4331
|
-
menuId: "cmsheader",
|
|
4332
|
-
menuClasses: "ds-u-display--flex ds-u-flex-direction--row dc-c-header--links ds-u-font-size--sm"
|
|
4659
|
+
]
|
|
4333
4660
|
})
|
|
4334
4661
|
})
|
|
4335
|
-
]
|
|
4336
|
-
}),
|
|
4337
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4338
|
-
className: "dc-c-main-navigation",
|
|
4339
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4340
|
-
className: "ds-l-container",
|
|
4341
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4342
|
-
className: "ds-l-row ds-u-align-items--center",
|
|
4343
|
-
children: [
|
|
4344
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4345
|
-
className: "ds-u-margin-right--5 ds-u-padding-y--3 dc-c-site-title",
|
|
4346
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
4347
|
-
className: "ds-c-link--inverse ds-text-heading--3xl",
|
|
4348
|
-
to: "/",
|
|
4349
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4350
|
-
className: "",
|
|
4351
|
-
children: siteName
|
|
4352
|
-
})
|
|
4353
|
-
})
|
|
4354
|
-
}),
|
|
4355
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $f57121650539d8c5$export$2e2bcd8739ae039), {
|
|
4356
|
-
links: links.main,
|
|
4357
|
-
wrapLabel: true,
|
|
4358
|
-
menuName: "CMS Site Main Nav",
|
|
4359
|
-
menuId: "site",
|
|
4360
|
-
menuClasses: "ds-u-display--flex ds-u-flex-direction--row dc-c-header--links ds-u-align-items--center",
|
|
4361
|
-
linkClasses: linkClasses
|
|
4362
|
-
}),
|
|
4363
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4364
|
-
className: "dc-c-main-navigation--search ds-u-margin-left--auto ds-u-lg-padding-left--1 ds-u-xl-padding-left--3",
|
|
4365
|
-
children: customSearch ? customSearch : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e5bfafc6d4e6f207$export$2e2bcd8739ae039), {
|
|
4366
|
-
searchModalText: searchModalText,
|
|
4367
|
-
inversedModalButton: inversedModalButton,
|
|
4368
|
-
inversedSearchButton: inversedSearchButton
|
|
4369
|
-
})
|
|
4370
|
-
})
|
|
4371
|
-
]
|
|
4372
|
-
})
|
|
4373
4662
|
})
|
|
4374
|
-
|
|
4375
|
-
|
|
4663
|
+
]
|
|
4664
|
+
})
|
|
4376
4665
|
});
|
|
4377
4666
|
};
|
|
4378
|
-
$
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
linkClasses: (0, $hgUW1$proptypes).string,
|
|
4382
|
-
includeSearch: (0, $hgUW1$proptypes).bool
|
|
4667
|
+
$a0f13962e513caa1$var$Dataset.propTypes = {
|
|
4668
|
+
id: (0, $hgUW1$proptypes).string.isRequired,
|
|
4669
|
+
rootUrl: (0, $hgUW1$proptypes).string.isRequired
|
|
4383
4670
|
};
|
|
4384
|
-
var $
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4671
|
+
var $a0f13962e513caa1$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039)($a0f13962e513caa1$var$Dataset);
|
|
4392
4672
|
|
|
4393
4673
|
|
|
4394
4674
|
|
|
4395
4675
|
|
|
4396
4676
|
|
|
4397
|
-
var $972485213997ff8b$exports = {};
|
|
4398
|
-
$972485213997ff8b$exports = new URL("CMSgov@2x-white-O.78cd05d3.png", import.meta.url).toString();
|
|
4399
4677
|
|
|
4400
4678
|
|
|
4401
4679
|
|
|
4402
|
-
|
|
4403
|
-
const
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
logo: (0, (/*@__PURE__*/$parcel$interopDefault($52466563e0d69ea8$exports))),
|
|
4408
|
-
logoAltText: "CMS.gov Centers for Medicare & Medicaid Services",
|
|
4409
|
-
inverseLogo: (0, (/*@__PURE__*/$parcel$interopDefault($972485213997ff8b$exports)))
|
|
4410
|
-
}, searchModalText: searchModalText, customSearch: customSearch = false, includeTopNav: includeTopNav = true, inversedModalButton: inversedModalButton, inversedSearchButton: inversedSearchButton, includeSearch: includeSearch = true })=>{
|
|
4411
|
-
const { url: url, logo: logo, urlTitle: urlTitle, logoAltText: logoAltText, inverseLogo: inverseLogo } = org;
|
|
4412
|
-
const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
|
|
4413
|
-
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
4414
|
-
minWidth: 0,
|
|
4415
|
-
maxWidth: 543
|
|
4416
|
-
});
|
|
4417
|
-
const tablet = (0, $hgUW1$useMediaQuery)({
|
|
4418
|
-
minWidth: 544,
|
|
4419
|
-
maxWidth: 1023
|
|
4680
|
+
const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
4681
|
+
const { topNav: topNav, children: children, mobileMaxWidth: mobileMaxWidth = 768, onDark: onDark = false } = props;
|
|
4682
|
+
const [mobileMenuOpen, setMobileMenuOpen] = (0, $hgUW1$react).useState(false);
|
|
4683
|
+
const mobileMax = (0, $hgUW1$useMediaQuery)({
|
|
4684
|
+
query: `(max-width: ${mobileMaxWidth}px)`
|
|
4420
4685
|
});
|
|
4421
4686
|
const menu = (0, $hgUW1$useRef)(null);
|
|
4422
|
-
|
|
4423
|
-
const
|
|
4687
|
+
function closeMobileMenu() {
|
|
4688
|
+
const mobileMenuButtonElement = document.querySelector(".dkan-c-mobile-menu-button");
|
|
4689
|
+
if (!mobileMenuButtonElement) return;
|
|
4690
|
+
mobileMenuButtonElement.focus();
|
|
4691
|
+
}
|
|
4692
|
+
// Close mobile menu with escape.
|
|
4693
|
+
function handleMenuClose(event) {
|
|
4694
|
+
if (event.key === "Escape" && mobileMenuOpen) setMobileMenuOpen(false);
|
|
4695
|
+
}
|
|
4696
|
+
function handleClick(event) {
|
|
4697
|
+
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
4698
|
+
if (menu.current && !menu.current.contains(event.target)) {
|
|
4699
|
+
setMobileMenuOpen(false);
|
|
4700
|
+
closeMobileMenu();
|
|
4701
|
+
}
|
|
4702
|
+
}
|
|
4703
|
+
const getFocusableElements = (container)=>{
|
|
4704
|
+
const allSelectors = container.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])');
|
|
4705
|
+
const visibleSelectors = Array.from(allSelectors).filter((el)=>{
|
|
4706
|
+
return el.offsetWidth > 0 || el.offsetHeight > 0;
|
|
4707
|
+
});
|
|
4708
|
+
return {
|
|
4709
|
+
selectors: {
|
|
4710
|
+
all: allSelectors,
|
|
4711
|
+
visible: visibleSelectors
|
|
4712
|
+
}
|
|
4713
|
+
};
|
|
4714
|
+
};
|
|
4715
|
+
function handleFocusIn() {
|
|
4716
|
+
if (menu.current) {
|
|
4717
|
+
if (!mobileMenuOpen) return;
|
|
4718
|
+
const focusableEls = getFocusableElements(menu.current).selectors.visible;
|
|
4719
|
+
if (focusableEls.length <= 0) return;
|
|
4720
|
+
const firstEl = focusableEls[0];
|
|
4721
|
+
firstEl?.focus();
|
|
4722
|
+
}
|
|
4723
|
+
}
|
|
4724
|
+
const trapFocus = (event)=>{
|
|
4725
|
+
if (menu.current && mobileMenuOpen) {
|
|
4424
4726
|
const focusableEls = getFocusableElements(menu.current).selectors.visible;
|
|
4425
4727
|
const firstEl = focusableEls[0];
|
|
4426
4728
|
const lastEl = focusableEls[focusableEls.length - 1];
|
|
4427
4729
|
if (event.key === "Tab") {
|
|
4428
4730
|
if (event.shiftKey && document.activeElement === firstEl) {
|
|
4429
|
-
lastEl
|
|
4731
|
+
lastEl?.focus();
|
|
4430
4732
|
event.preventDefault();
|
|
4431
4733
|
} else if (!event.shiftKey && document.activeElement === lastEl) {
|
|
4432
|
-
firstEl
|
|
4734
|
+
firstEl?.focus();
|
|
4433
4735
|
event.preventDefault();
|
|
4434
4736
|
}
|
|
4435
4737
|
}
|
|
4436
|
-
};
|
|
4437
|
-
function handleFocusIn(event) {
|
|
4438
|
-
if (!menuOpen) return;
|
|
4439
|
-
const mobileHeaderMenu = document.querySelector(`.${$caaccb8ea608e518$var$mobileHeaderMenuClassName}`);
|
|
4440
|
-
if (!mobileHeaderMenu) return;
|
|
4441
|
-
// Select the first tabbable element in the `mobileHeaderMenu`
|
|
4442
|
-
const firstTabbableElement = mobileHeaderMenu.querySelector('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])');
|
|
4443
|
-
if (!firstTabbableElement) return;
|
|
4444
|
-
firstTabbableElement.focus();
|
|
4445
|
-
}
|
|
4446
|
-
function handleClick(event) {
|
|
4447
|
-
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
4448
|
-
if (event.target.closest(".dc-c-search-dialog")) {
|
|
4449
|
-
document.querySelector(".dc-c-mobile-menu--open").focus();
|
|
4450
|
-
setMenuOpen(false);
|
|
4451
|
-
}
|
|
4452
|
-
}
|
|
4453
|
-
function handleMenuClose(event) {
|
|
4454
|
-
// Close upon user hitting escape
|
|
4455
|
-
if (event.keyCode === 27 && menuOpen) {
|
|
4456
|
-
setMenuOpen(false);
|
|
4457
|
-
document.querySelector(".dc-c-mobile-menu--open").focus();
|
|
4458
|
-
}
|
|
4459
4738
|
}
|
|
4460
|
-
|
|
4739
|
+
};
|
|
4740
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
4461
4741
|
document.addEventListener("keyup", handleMenuClose);
|
|
4462
|
-
|
|
4463
|
-
|
|
4742
|
+
document.addEventListener("mousedown", handleClick);
|
|
4743
|
+
if (mobileMenuOpen) handleFocusIn();
|
|
4744
|
+
else closeMobileMenu();
|
|
4745
|
+
if (menu.current) menu.current.addEventListener("keydown", (evt)=>trapFocus(evt));
|
|
4464
4746
|
return ()=>{
|
|
4465
4747
|
document.removeEventListener("keyup", handleMenuClose);
|
|
4466
|
-
document.
|
|
4748
|
+
document.addEventListener("mousedown", handleClick);
|
|
4467
4749
|
if (menu.current) menu.current.removeEventListener("keydown", trapFocus);
|
|
4468
4750
|
};
|
|
4469
4751
|
}, [
|
|
4470
|
-
|
|
4752
|
+
mobileMenuOpen
|
|
4471
4753
|
]);
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
className: `dc-c-header dc-c-mobile-header ${menuOpen ? "menu-open" : ""}`,
|
|
4493
|
-
"aria-label": "Site header",
|
|
4494
|
-
children: [
|
|
4495
|
-
includeTopNav && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4496
|
-
className: `dc-c-cmsheader ds-u-display--flex ds-u-padding-x--1 ds-u-align-items--center ${mobile ? "ds-u-justify-content--center" : "ds-u-justify-content--between"}`,
|
|
4497
|
-
children: [
|
|
4498
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4499
|
-
className: "cms-link-container",
|
|
4500
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
4501
|
-
href: url,
|
|
4502
|
-
title: urlTitle,
|
|
4503
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("img", {
|
|
4504
|
-
src: menuOpen ? inverseLogo : logo,
|
|
4505
|
-
alt: logoAltText
|
|
4506
|
-
})
|
|
4507
|
-
})
|
|
4508
|
-
}),
|
|
4509
|
-
tablet && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4510
|
-
className: "ds-u-margin-left--auto",
|
|
4511
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $f57121650539d8c5$export$2e2bcd8739ae039), {
|
|
4512
|
-
links: links.topnav,
|
|
4513
|
-
menuName: "CMS Main Header",
|
|
4514
|
-
menuId: "cmsheader",
|
|
4515
|
-
menuClasses: "ds-u-display--flex ds-u-flex-direction--row dc-c-header--links ds-u-font-size--sm ds-u-margin-bottom--2"
|
|
4516
|
-
})
|
|
4517
|
-
})
|
|
4518
|
-
]
|
|
4519
|
-
}),
|
|
4520
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4521
|
-
className: "dc-c-main-navigation ds-u-display--flex ds-u-justify-content--between ds-u-align-items--center",
|
|
4522
|
-
children: [
|
|
4523
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
4524
|
-
variation: "ghost",
|
|
4525
|
-
onDark: true,
|
|
4526
|
-
size: "small",
|
|
4527
|
-
className: "dc-c-mobile-menu--open",
|
|
4528
|
-
onClick: ()=>setMenuOpen(true),
|
|
4529
|
-
children: mobile ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4530
|
-
className: "ds-u-visibility--screen-reader",
|
|
4531
|
-
children: "Menu"
|
|
4532
|
-
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
4533
|
-
children: "Menu"
|
|
4534
|
-
})
|
|
4535
|
-
}),
|
|
4536
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4537
|
-
className: "ds-u-padding-y--3 dc-c-site-title",
|
|
4538
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
4539
|
-
className: "ds-c-link--inverse ds-text-heading--3xl",
|
|
4540
|
-
to: "/",
|
|
4541
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4542
|
-
className: "",
|
|
4543
|
-
children: siteName
|
|
4544
|
-
})
|
|
4545
|
-
})
|
|
4546
|
-
}),
|
|
4547
|
-
includeSearch && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4548
|
-
className: "dc-c-mobile-menu--search",
|
|
4549
|
-
children: customSearch ? customSearch : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e5bfafc6d4e6f207$export$2e2bcd8739ae039), {
|
|
4550
|
-
searchFunc: (e)=>{
|
|
4551
|
-
e.preventDefault();
|
|
4552
|
-
},
|
|
4553
|
-
searchModalText: searchModalText,
|
|
4554
|
-
buttonSize: "small",
|
|
4555
|
-
inversedModalButton: inversedModalButton,
|
|
4556
|
-
inversedSearchButton: inversedSearchButton
|
|
4754
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039).Provider, {
|
|
4755
|
+
value: {
|
|
4756
|
+
mobileMenuOpen: mobileMenuOpen,
|
|
4757
|
+
setMobileMenuOpen: setMobileMenuOpen,
|
|
4758
|
+
menuRef: menu,
|
|
4759
|
+
isMobile: mobileMax,
|
|
4760
|
+
onDark: onDark
|
|
4761
|
+
},
|
|
4762
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
|
|
4763
|
+
"aria-label": "Site header",
|
|
4764
|
+
className: `dkan-c-header dkan-c-header--${mobileMax ? "mobile" : "desktop"}`,
|
|
4765
|
+
children: [
|
|
4766
|
+
topNav && topNav,
|
|
4767
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4768
|
+
className: "dkan-c-main-navigation print-margin-left--2",
|
|
4769
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4770
|
+
className: "ds-l-container",
|
|
4771
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4772
|
+
className: "dkan-c-header--wrapper ds-l-row ds-u-align-items--center",
|
|
4773
|
+
children: children
|
|
4557
4774
|
})
|
|
4558
4775
|
})
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
className: $caaccb8ea608e518$var$mobileHeaderMenuClassName,
|
|
4563
|
-
"data-testid": "mobile-menu",
|
|
4564
|
-
ref: menu,
|
|
4565
|
-
children: [
|
|
4566
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4567
|
-
className: `ds-u-display--flex ${$caaccb8ea608e518$var$mobileHeaderMenuClassName}-close ds-u-justify-content--between`,
|
|
4568
|
-
children: [
|
|
4569
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
4570
|
-
variation: "ghost",
|
|
4571
|
-
onDark: true,
|
|
4572
|
-
size: "small",
|
|
4573
|
-
className: "dc-c-mobile-menu--close ds-u-margin-left--1 ds-u-padding-left--0",
|
|
4574
|
-
onClick: ()=>closeMobileMenu(),
|
|
4575
|
-
children: "Close"
|
|
4576
|
-
}),
|
|
4577
|
-
tablet && includeSearch && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4578
|
-
className: "dc-c-mobile-menu--search",
|
|
4579
|
-
children: customSearch ? customSearch : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e5bfafc6d4e6f207$export$2e2bcd8739ae039), {
|
|
4580
|
-
searchFunc: (e)=>{
|
|
4581
|
-
e.preventDefault();
|
|
4582
|
-
},
|
|
4583
|
-
searchModalText: searchModalText,
|
|
4584
|
-
buttonSize: "small"
|
|
4585
|
-
})
|
|
4586
|
-
})
|
|
4587
|
-
]
|
|
4588
|
-
}),
|
|
4589
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $f57121650539d8c5$export$2e2bcd8739ae039), {
|
|
4590
|
-
links: links.main,
|
|
4591
|
-
wrapLabel: true,
|
|
4592
|
-
menuName: "Main Nav",
|
|
4593
|
-
menuId: "site",
|
|
4594
|
-
menuClasses: "dc-c-header--links dc-c-header--mobile-links",
|
|
4595
|
-
linkClasses: "ds-u-margin-left--1 ds-u-padding-bottom--2 ds-text-heading--md",
|
|
4596
|
-
clickHandler: handleMobileLinkClick
|
|
4597
|
-
}),
|
|
4598
|
-
mobile && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4599
|
-
className: "cms-mobile-header--container",
|
|
4600
|
-
children: [
|
|
4601
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {}),
|
|
4602
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $f57121650539d8c5$export$2e2bcd8739ae039), {
|
|
4603
|
-
links: links.topnav,
|
|
4604
|
-
menuName: "CMS Main Header",
|
|
4605
|
-
menuId: "cms-mobile-header",
|
|
4606
|
-
linkClasses: "ds-u-margin-left--1 ds-u-margin-bottom--2",
|
|
4607
|
-
menuClasses: "dc-c-header--links ds-u-font-size--sm ds-u-margin-bottom--2"
|
|
4608
|
-
})
|
|
4609
|
-
]
|
|
4610
|
-
})
|
|
4611
|
-
]
|
|
4612
|
-
})
|
|
4613
|
-
]
|
|
4776
|
+
})
|
|
4777
|
+
]
|
|
4778
|
+
})
|
|
4614
4779
|
});
|
|
4615
4780
|
};
|
|
4616
|
-
var $
|
|
4781
|
+
var $b9af6ce5e2c06331$export$2e2bcd8739ae039 = $b9af6ce5e2c06331$var$Header;
|
|
4617
4782
|
|
|
4618
4783
|
|
|
4619
4784
|
|
|
4620
4785
|
|
|
4621
4786
|
|
|
4622
|
-
const $a5a6a06d249c33b8$var$Header = ({ mobileMaxWidth: mobileMaxWidth = 1023, desktopMinWidth: desktopMinWidth = 1024, siteName: siteName, links: links, org: org, includeTopNav: includeTopNav = true })=>{
|
|
4623
|
-
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
4624
|
-
minWidth: 0,
|
|
4625
|
-
maxWidth: mobileMaxWidth
|
|
4626
|
-
});
|
|
4627
|
-
const desktop = (0, $hgUW1$useMediaQuery)({
|
|
4628
|
-
minWidth: desktopMinWidth
|
|
4629
|
-
});
|
|
4630
|
-
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
4631
|
-
children: [
|
|
4632
|
-
desktop && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2db98b8f69058a30$export$2e2bcd8739ae039), {
|
|
4633
|
-
siteName: siteName,
|
|
4634
|
-
links: links,
|
|
4635
|
-
org: org,
|
|
4636
|
-
includeTopNav: includeTopNav
|
|
4637
|
-
}),
|
|
4638
|
-
mobile && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $caaccb8ea608e518$export$2e2bcd8739ae039), {
|
|
4639
|
-
siteName: siteName,
|
|
4640
|
-
links: links,
|
|
4641
|
-
org: org,
|
|
4642
|
-
includeTopNav: includeTopNav
|
|
4643
|
-
})
|
|
4644
|
-
]
|
|
4645
|
-
});
|
|
4646
|
-
};
|
|
4647
|
-
var $a5a6a06d249c33b8$export$2e2bcd8739ae039 = $a5a6a06d249c33b8$var$Header;
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
4787
|
|
|
4651
4788
|
|
|
4652
4789
|
|
|
4653
4790
|
|
|
4654
4791
|
|
|
4792
|
+
const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null, wrapLabel: wrapLabel = false, clickHandler: clickHandler })=>{
|
|
4793
|
+
const innerHtml = wrapLabel ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4794
|
+
children: link.label
|
|
4795
|
+
}) : link.label;
|
|
4796
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
4797
|
+
className: ({ isActive: isActive })=>isActive ? `dc-c-active-link ${className}` : `${className}`,
|
|
4798
|
+
to: link.url,
|
|
4799
|
+
onClick: clickHandler ? clickHandler : undefined,
|
|
4800
|
+
children: innerHtml
|
|
4801
|
+
});
|
|
4802
|
+
// }
|
|
4803
|
+
};
|
|
4804
|
+
var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
|
|
4655
4805
|
|
|
4656
4806
|
|
|
4657
4807
|
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", {
|
|
@@ -5276,6 +5426,7 @@ var $669d2782ec2e2250$export$2e2bcd8739ae039 = $669d2782ec2e2250$var$SpecsAndLim
|
|
|
5276
5426
|
|
|
5277
5427
|
|
|
5278
5428
|
|
|
5429
|
+
|
|
5279
5430
|
const $efc410f5f7ac5ef3$var$useSearchAPI = (rootUrl, initialSearchParams = {}, additionalParams = {})=>{
|
|
5280
5431
|
const defaultSort = "";
|
|
5281
5432
|
const defaultFulltext = "";
|
|
@@ -6433,5 +6584,5 @@ var $90fb213ab8eeb2e7$export$2e2bcd8739ae039 = $90fb213ab8eeb2e7$var$useScrollTo
|
|
|
6433
6584
|
|
|
6434
6585
|
|
|
6435
6586
|
|
|
6436
|
-
export {$
|
|
6587
|
+
export {$a8accc31bf9e0bda$export$2e2bcd8739ae039 as CMSTopNav, $c49454ea7d1c4579$export$2e2bcd8739ae039 as ErrorBoundary, $046ded0064bd0a3d$export$2e2bcd8739ae039 as FAQAccordion, $b939b31651e82908$export$2e2bcd8739ae039 as HeaderNav, $1555e1cb3eb7b3e3$export$2e2bcd8739ae039 as HeaderNavIconLink, $fea9297ba4dd394c$export$2e2bcd8739ae039 as HeaderSearch, $9a8892c5ac150556$export$2e2bcd8739ae039 as HeaderSiteTitle, $3c72c298c3a7f21f$export$2e2bcd8739ae039 as HeaderTagline, $403833a4b442d5df$export$2e2bcd8739ae039 as MobileMenuButton, $f57121650539d8c5$export$2e2bcd8739ae039 as NavBar, $953b286f7778640e$export$2e2bcd8739ae039 as SidebarNavigation, $b0968edc60d7d3a4$export$2e2bcd8739ae039 as SidebarPage, $4f153ca537d853e5$export$2e2bcd8739ae039 as SubMenu, $c96c4b9ef7203c1f$export$2e2bcd8739ae039 as APIPage, $026cb986f9fea2b1$export$2e2bcd8739ae039 as PageNotFound, $e873081a6e8f024e$export$2e2bcd8739ae039 as DatasetSearch, $a0f13962e513caa1$export$2e2bcd8739ae039 as Dataset, $a35cf16d1488f54e$export$2e2bcd8739ae039 as DatasetTable, $b9af6ce5e2c06331$export$2e2bcd8739ae039 as Header, $a6df0aa147323304$export$2e2bcd8739ae039 as Footer, $669d2782ec2e2250$export$2e2bcd8739ae039 as SpecsAndLimits, $11500a65bd7d9cf1$export$2e2bcd8739ae039 as HeaderContext, $efc410f5f7ac5ef3$export$2e2bcd8739ae039 as useSearchAPI, $1d3d480a9cfaabe0$export$2e2bcd8739ae039 as useDatastore, $aa4450dcbeef3ac0$export$385a5aba38cc3325 as transformTableSortToQuerySort, $59a079354baa335c$export$2e2bcd8739ae039 as Hero, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $789279954d8eff7f$export$2e2bcd8739ae039 as ApiDocumentation, $af099c546cb226c7$export$2e2bcd8739ae039 as ResourceHeader, $626282d9a03c51d5$export$2e2bcd8739ae039 as ResourcePreview, $072291d44ce1834a$export$2e2bcd8739ae039 as ResourceFooter, $ec3e23baa005dc03$export$2e2bcd8739ae039 as Breadcrumb, $bd76a91923d7e8a7$export$2e2bcd8739ae039 as TransformedDate, $d98f94c79ddf4e0e$export$2e2bcd8739ae039 as DataTable, $5644ebd2c3dbfd7b$export$eea3a12df15499ca as buildRows, $f61ecf9f84951a61$export$2e2bcd8739ae039 as FilteredResource, $bef7bff2823feea2$export$2e2bcd8739ae039 as QueryTitle, $7264a673914aa746$export$2b9377795161999 as buildOperatorOptions, $7264a673914aa746$export$e284ae5d89467c8f as convertUTCToLocalDate, $7264a673914aa746$export$6b5e57d20078142b as cleanText, $7264a673914aa746$export$8049e8f40a9bdfb8 as buildCustomColHeaders, $eb7821d186b1a389$export$2e2bcd8739ae039 as useAddLoginLink, $90fb213ab8eeb2e7$export$2e2bcd8739ae039 as useScrollToTop, $b4aa9c66f2e86959$export$2e2bcd8739ae039 as useMetastoreDataset, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 as withQueryProvider, $6da0396069e23175$export$bc27cf7ecf44639d as defaultMetadataMapping, $2ed0091f7e32d1e6$export$2e2bcd8739ae039 as DataTablePageResults, $1a2bf34e2a8f6b80$export$59a943b34a82e690 as truncateText};
|
|
6437
6588
|
//# sourceMappingURL=main.js.map
|