@civicactions/cmsds-open-data-components 4.2.0-alpha.2 → 4.2.1-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.css +495 -494
- package/dist/main.css.map +1 -1
- package/dist/main.js +2115 -2089
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +103 -83
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/main.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import "./main.css";
|
|
2
2
|
import {jsx as $hgUW1$jsx, jsxs as $hgUW1$jsxs, Fragment as $hgUW1$Fragment} from "react/jsx-runtime";
|
|
3
|
-
import
|
|
4
|
-
import $hgUW1$
|
|
5
|
-
import {NavLink as $hgUW1$NavLink,
|
|
6
|
-
import $hgUW1$qs from "qs";
|
|
7
|
-
import $hgUW1$axios from "axios";
|
|
8
|
-
import {useQuery as $hgUW1$useQuery, QueryClient as $hgUW1$QueryClient, QueryClientProvider as $hgUW1$QueryClientProvider} from "@tanstack/react-query";
|
|
3
|
+
import $hgUW1$react, {createContext as $hgUW1$createContext, useState as $hgUW1$useState, useEffect as $hgUW1$useEffect, useRef as $hgUW1$useRef, useContext as $hgUW1$useContext, useMemo as $hgUW1$useMemo, useCallback as $hgUW1$useCallback} from "react";
|
|
4
|
+
import {Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, Button as $hgUW1$Button, CloseIconThin as $hgUW1$CloseIconThin, ArrowIcon as $hgUW1$ArrowIcon, Dialog as $hgUW1$Dialog, TextField as $hgUW1$TextField, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon, Choice as $hgUW1$Choice, Pagination as $hgUW1$Pagination, Spinner as $hgUW1$Spinner, Alert as $hgUW1$Alert, Dropdown as $hgUW1$Dropdown, Table as $hgUW1$Table, TableHead as $hgUW1$TableHead, TableRow as $hgUW1$TableRow, TableCell as $hgUW1$TableCell, TableBody as $hgUW1$TableBody, Tabs as $hgUW1$Tabs, TabPanel as $hgUW1$TabPanel, ExternalLinkIcon as $hgUW1$ExternalLinkIcon, Badge as $hgUW1$Badge} from "@cmsgov/design-system";
|
|
5
|
+
import {NavLink as $hgUW1$NavLink, useLocation as $hgUW1$useLocation, useNavigate as $hgUW1$useNavigate, Link as $hgUW1$Link, useSearchParams as $hgUW1$useSearchParams} from "react-router-dom";
|
|
9
6
|
import {useMediaQuery as $hgUW1$useMediaQuery} from "react-responsive";
|
|
10
7
|
import $hgUW1$dompurify from "dompurify";
|
|
11
8
|
import $hgUW1$lodashtruncate from "lodash.truncate";
|
|
9
|
+
import $hgUW1$qs from "qs";
|
|
12
10
|
import $hgUW1$proptypes from "prop-types";
|
|
13
11
|
import {KeyboardSensor as $hgUW1$KeyboardSensor, PointerSensor as $hgUW1$PointerSensor, useSensors as $hgUW1$useSensors, useSensor as $hgUW1$useSensor, DndContext as $hgUW1$DndContext, closestCenter as $hgUW1$closestCenter} from "@dnd-kit/core";
|
|
14
12
|
import {sortableKeyboardCoordinates as $hgUW1$sortableKeyboardCoordinates, arrayMove as $hgUW1$arrayMove, SortableContext as $hgUW1$SortableContext, verticalListSortingStrategy as $hgUW1$verticalListSortingStrategy, useSortable as $hgUW1$useSortable} from "@dnd-kit/sortable";
|
|
@@ -17,6 +15,8 @@ import {CSS as $hgUW1$CSS} from "@dnd-kit/utilities";
|
|
|
17
15
|
import {createColumnHelper as $hgUW1$createColumnHelper, useReactTable as $hgUW1$useReactTable, getCoreRowModel as $hgUW1$getCoreRowModel, getSortedRowModel as $hgUW1$getSortedRowModel, flexRender as $hgUW1$flexRender, getFilteredRowModel as $hgUW1$getFilteredRowModel, getPaginationRowModel as $hgUW1$getPaginationRowModel} from "@tanstack/react-table";
|
|
18
16
|
import $hgUW1$reactdatepicker from "react-datepicker";
|
|
19
17
|
import "react-datepicker/dist/react-datepicker.css";
|
|
18
|
+
import $hgUW1$axios from "axios";
|
|
19
|
+
import {useQuery as $hgUW1$useQuery, QueryClient as $hgUW1$QueryClient, QueryClientProvider as $hgUW1$QueryClientProvider} from "@tanstack/react-query";
|
|
20
20
|
import $hgUW1$swaggeruireact from "swagger-ui-react";
|
|
21
21
|
import "swagger-ui-react/swagger-ui.css";
|
|
22
22
|
import {List as $hgUW1$List, Map as $hgUW1$Map} from "immutable";
|
|
@@ -24,6 +24,7 @@ import {List as $hgUW1$List, Map as $hgUW1$Map} from "immutable";
|
|
|
24
24
|
// Components
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
|
|
27
28
|
function $e49d4387bed21287$export$2e2bcd8739ae039() {
|
|
28
29
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
29
30
|
className: "ds-u-padding-top--3 ds-u-margin-bottom--2",
|
|
@@ -122,7 +123,7 @@ const $a8accc31bf9e0bda$var$CMSTopNav = (props)=>{
|
|
|
122
123
|
children: link.label
|
|
123
124
|
})
|
|
124
125
|
})
|
|
125
|
-
});
|
|
126
|
+
}, link.id);
|
|
126
127
|
})
|
|
127
128
|
})
|
|
128
129
|
})
|
|
@@ -272,197 +273,6 @@ var $11500a65bd7d9cf1$export$2e2bcd8739ae039 = $11500a65bd7d9cf1$var$HeaderConte
|
|
|
272
273
|
|
|
273
274
|
|
|
274
275
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
const $61ff88fb3f6ee2c8$var$queryClient = new (0, $hgUW1$QueryClient)({
|
|
279
|
-
defaultOptions: {
|
|
280
|
-
queries: {
|
|
281
|
-
refetchOnWindowFocus: false
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
});
|
|
285
|
-
const $61ff88fb3f6ee2c8$var$withQueryProvider = (WrappedComponent)=>(props)=>{
|
|
286
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$QueryClientProvider), {
|
|
287
|
-
client: $61ff88fb3f6ee2c8$var$queryClient,
|
|
288
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)(WrappedComponent, {
|
|
289
|
-
...props
|
|
290
|
-
})
|
|
291
|
-
});
|
|
292
|
-
};
|
|
293
|
-
var $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 = $61ff88fb3f6ee2c8$var$withQueryProvider;
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
const $4808982eba3feb88$var$DatasetListSubmenuItem = (props)=>{
|
|
302
|
-
const { title: title, identifier: identifier, linkClasses: linkClasses } = props;
|
|
303
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
304
|
-
className: "dc-c-list-item",
|
|
305
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
306
|
-
className: `ds-u-display-flex ds-u-align-items--center ds-u-text-align--left ${linkClasses}`,
|
|
307
|
-
to: `/dataset/${identifier}`,
|
|
308
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
309
|
-
className: "ds-text-heading--md ds-u-margin-left--0",
|
|
310
|
-
children: title
|
|
311
|
-
})
|
|
312
|
-
})
|
|
313
|
-
}, identifier);
|
|
314
|
-
};
|
|
315
|
-
var $4808982eba3feb88$export$2e2bcd8739ae039 = $4808982eba3feb88$var$DatasetListSubmenuItem;
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
function $6d5c0212e738499b$export$34e95918366a058e(params, ACA) {
|
|
321
|
-
if (ACA) params = Object.assign(params, {
|
|
322
|
-
ACA: ACA,
|
|
323
|
-
redirect: false
|
|
324
|
-
});
|
|
325
|
-
return params;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
const $844981eac9b63865$export$eccc29c8d0ff408 = (0, $hgUW1$createContext)({
|
|
331
|
-
ACA: undefined
|
|
332
|
-
});
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 4, defaultSort: defaultSort = {
|
|
336
|
-
defaultSort: 'modified',
|
|
337
|
-
defaultOrder: 'desc'
|
|
338
|
-
}, subLinkClasses: subLinkClasses })=>{
|
|
339
|
-
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
340
|
-
const [currentResultNumbers, setCurrentResultNumbers] = (0, $hgUW1$useState)({
|
|
341
|
-
total: 0,
|
|
342
|
-
startingNumber: 0,
|
|
343
|
-
endingNumber: 0
|
|
344
|
-
});
|
|
345
|
-
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
346
|
-
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
347
|
-
const pageSize = defaultPageSize;
|
|
348
|
-
(0, $hgUW1$useEffect)(()=>{
|
|
349
|
-
if (totalItems <= 0 && currentResultNumbers !== null) setNoResults(true);
|
|
350
|
-
else setNoResults(false);
|
|
351
|
-
}, [
|
|
352
|
-
totalItems,
|
|
353
|
-
pageSize
|
|
354
|
-
]);
|
|
355
|
-
let params = {
|
|
356
|
-
sort: defaultSort.defaultSort,
|
|
357
|
-
['sort-order']: defaultSort.defaultOrder,
|
|
358
|
-
['page-size']: defaultPageSize
|
|
359
|
-
};
|
|
360
|
-
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
361
|
-
queryKey: [
|
|
362
|
-
"datasets",
|
|
363
|
-
params
|
|
364
|
-
],
|
|
365
|
-
queryFn: ()=>{
|
|
366
|
-
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
367
|
-
arrayFormat: 'comma',
|
|
368
|
-
encode: false
|
|
369
|
-
})}`);
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
// Sync totalItems state with API response data
|
|
373
|
-
// Moved to useEffect to prevent state updates during render (which can cause infinite loops)
|
|
374
|
-
(0, $hgUW1$useEffect)(()=>{
|
|
375
|
-
if (data?.data?.total !== undefined && data.data.total !== totalItems) setTotalItems(data.data.total);
|
|
376
|
-
}, [
|
|
377
|
-
data?.data?.total
|
|
378
|
-
]);
|
|
379
|
-
let submenuItemsCount = 0;
|
|
380
|
-
if (data) {
|
|
381
|
-
let resultsCount = Object.keys(data.data.results).length;
|
|
382
|
-
// For the submenu pager, If there are fewer than 4 dataset items, display the dataset item count, otherwise, show "Viewing 4..".
|
|
383
|
-
submenuItemsCount = resultsCount > defaultPageSize ? defaultPageSize : resultsCount;
|
|
384
|
-
}
|
|
385
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
386
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
387
|
-
className: " dkan-c-site-menu--sub-menu",
|
|
388
|
-
children: isPending ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
389
|
-
className: "ds-u-valign--middle",
|
|
390
|
-
"aria-valuetext": "Dataset Search loading",
|
|
391
|
-
role: "status"
|
|
392
|
-
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
393
|
-
children: [
|
|
394
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
|
|
395
|
-
className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0 ds-u-lg-margin-top--2 ds-u-margin-bottom--2 ds-u-display--block",
|
|
396
|
-
"data-testid": "submenu-results-list",
|
|
397
|
-
children: [
|
|
398
|
-
noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
399
|
-
variation: "error",
|
|
400
|
-
heading: "No results found."
|
|
401
|
-
}),
|
|
402
|
-
data && data.data.results ? Object.keys(data.data.results).map((key)=>{
|
|
403
|
-
return data.data.results[key];
|
|
404
|
-
}).map((item)=>{
|
|
405
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $4808982eba3feb88$export$2e2bcd8739ae039), {
|
|
406
|
-
title: item.title,
|
|
407
|
-
identifier: item.identifier,
|
|
408
|
-
linkClasses: subLinkClasses
|
|
409
|
-
}, item.identifier);
|
|
410
|
-
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
411
|
-
variation: "error",
|
|
412
|
-
heading: "Could not connect to the API."
|
|
413
|
-
})
|
|
414
|
-
]
|
|
415
|
-
}),
|
|
416
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
417
|
-
className: "ds-u-display--flex ds-u-justify-content--between ds-u-align-items--center ds-u-border-top--1 ds-u-padding-top--3 ds-u-padding-bottom--2 ds-u-margin-x--3 ds-u-lg-margin-x--0",
|
|
418
|
-
children: enablePagination && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
419
|
-
children: [
|
|
420
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
421
|
-
className: "",
|
|
422
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
423
|
-
className: "ds-u-margin-y--0 ds-u-font-size--sm",
|
|
424
|
-
"aria-hidden": "true",
|
|
425
|
-
children: data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
426
|
-
children: [
|
|
427
|
-
"Viewing ",
|
|
428
|
-
submenuItemsCount,
|
|
429
|
-
" of ",
|
|
430
|
-
data.data.total
|
|
431
|
-
]
|
|
432
|
-
})
|
|
433
|
-
})
|
|
434
|
-
}),
|
|
435
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
436
|
-
className: "",
|
|
437
|
-
children: data && data.data.total > 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
438
|
-
className: "ds-u-padding--0 ds-c-button ds-c-button--ghost dkan-c-header--link",
|
|
439
|
-
to: `../whats-new`,
|
|
440
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
441
|
-
className: "ds-text-heading--md",
|
|
442
|
-
children: [
|
|
443
|
-
" ",
|
|
444
|
-
`View all ${data.data.total} entries`,
|
|
445
|
-
" "
|
|
446
|
-
]
|
|
447
|
-
})
|
|
448
|
-
})
|
|
449
|
-
})
|
|
450
|
-
]
|
|
451
|
-
})
|
|
452
|
-
})
|
|
453
|
-
]
|
|
454
|
-
})
|
|
455
|
-
})
|
|
456
|
-
});
|
|
457
|
-
};
|
|
458
|
-
var $10bc3aae21fc1572$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039)($10bc3aae21fc1572$var$DatasetListSubmenu);
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
276
|
const $6d0cf21faac6a2dd$var$SubMenuStaticList = ({ submenuArray: submenuArray, subLinkClasses: subLinkClasses, setIsExpanded: setIsExpanded })=>{
|
|
467
277
|
// Render a static list of submenu items as listed in the assets/menu.jsx file.
|
|
468
278
|
let submenuItems = submenuArray.map((s)=>{
|
|
@@ -479,7 +289,7 @@ const $6d0cf21faac6a2dd$var$SubMenuStaticList = ({ submenuArray: submenuArray, s
|
|
|
479
289
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$NavLink), {
|
|
480
290
|
to: s.url,
|
|
481
291
|
className: `ds-u-display-flex ds-u-align-items--center ${subLinkClasses}`,
|
|
482
|
-
onClick: ()=>setIsExpanded(
|
|
292
|
+
onClick: ()=>setIsExpanded(false),
|
|
483
293
|
children: [
|
|
484
294
|
s.icon ?? null,
|
|
485
295
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -500,6 +310,12 @@ var $6d0cf21faac6a2dd$export$2e2bcd8739ae039 = $6d0cf21faac6a2dd$var$SubMenuStat
|
|
|
500
310
|
const $669b51f08325b4e3$var$SubMenu = ({ link: link, linkClasses: linkClasses, subLinkClasses: subLinkClasses, wrapLabel: wrapLabel = true })=>{
|
|
501
311
|
const [isExpanded, setIsExpanded] = (0, $hgUW1$useState)(false);
|
|
502
312
|
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
313
|
+
const location = (0, $hgUW1$useLocation)();
|
|
314
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
315
|
+
setIsExpanded(false);
|
|
316
|
+
}, [
|
|
317
|
+
location
|
|
318
|
+
]);
|
|
503
319
|
const innerHtml = wrapLabel ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
504
320
|
children: link.label
|
|
505
321
|
}) : link.label;
|
|
@@ -529,14 +345,9 @@ const $669b51f08325b4e3$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
529
345
|
subLinkClasses: subLinkClasses,
|
|
530
346
|
setIsExpanded: setIsExpanded
|
|
531
347
|
});
|
|
532
|
-
else if (/*#__PURE__*/ (0, $hgUW1$react).isValidElement(link.submenu)) {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
location: location,
|
|
536
|
-
rootUrl: rootUrl,
|
|
537
|
-
subLinkClasses: subLinkClasses
|
|
538
|
-
});
|
|
539
|
-
}
|
|
348
|
+
else if (/*#__PURE__*/ (0, $hgUW1$react).isValidElement(link.submenu)) submenuBlock = /*#__PURE__*/ (0, $hgUW1$react).cloneElement(link.submenu, {
|
|
349
|
+
subLinkClasses: subLinkClasses
|
|
350
|
+
});
|
|
540
351
|
}
|
|
541
352
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
542
353
|
className: `dkan-c-nav-submenu has-submenu${isExpanded ? ' open' : ''}`,
|
|
@@ -573,294 +384,179 @@ var $669b51f08325b4e3$export$2e2bcd8739ae039 = $669b51f08325b4e3$var$SubMenu;
|
|
|
573
384
|
|
|
574
385
|
|
|
575
386
|
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
594
|
-
width: "16px",
|
|
595
|
-
height: "16px",
|
|
596
|
-
viewBox: "0 0 16 16",
|
|
597
|
-
version: "1.1",
|
|
598
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
599
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
600
|
-
"aria-hidden": "true",
|
|
601
|
-
children: [
|
|
602
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
603
|
-
children: "Overview Icon"
|
|
604
|
-
}),
|
|
605
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
606
|
-
stroke: "none",
|
|
607
|
-
strokeWidth: "1",
|
|
608
|
-
fillRule: "evenodd",
|
|
609
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
610
|
-
transform: "translate(0.000000, -4.000000)",
|
|
611
|
-
fillRule: "nonzero",
|
|
612
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
613
|
-
transform: "translate(0.000000, -1.000000)",
|
|
614
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("g", {
|
|
615
|
-
transform: "translate(0.000000, 5.000000)",
|
|
616
|
-
children: [
|
|
617
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
618
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
619
|
-
d: "M9.55610973,15.6404494 C9.31670823,15.8801498 9.02743142,16 8.6882793,16 C8.34912718,16 8.05985037,15.8801498 7.82044888,15.6404494 L0.33915212,8.14981273 C0.206151288,8.01664586 0.116375727,7.87682064 0.0698254364,7.73033708 C0.0232751455,7.58385352 0,7.43071161 0,7.27091136 L0,1.19850187 C0,0.852267998 0.113050707,0.565959218 0.33915212,0.339575531 C0.565253533,0.113191844 0.85120532,0 1.19700748,0 L7.26184539,0 C7.42144638,0 7.58104738,0.0233042031 7.74064838,0.0699126092 C7.90024938,0.116521015 8.04655029,0.206408656 8.17955112,0.339575531 L15.6209476,7.79026217 C15.8736492,8.04327923 16,8.33957553 16,8.67915106 C16,9.01872659 15.8736492,9.31502289 15.6209476,9.56803995 L9.55610973,15.6404494 Z M8.75953079,15 L15,8.75953079 L7.24046921,1 L1,1 L1,7.24046921 L8.75953079,15 Z M3,4 C3.26923077,4 3.50320513,3.90064103 3.70192308,3.70192308 C3.90064103,3.50320513 4,3.26923077 4,3 C4,2.73076923 3.90064103,2.49679487 3.70192308,2.29807692 C3.50320513,2.09935897 3.26923077,2 3,2 C2.73076923,2 2.49679487,2.09935897 2.29807692,2.29807692 C2.09935897,2.49679487 2,2.73076923 2,3 C2,3.26923077 2.09935897,3.50320513 2.29807692,3.70192308 C2.49679487,3.90064103 2.73076923,4 3,4 L3,4 Z"
|
|
620
|
-
})
|
|
621
|
-
}),
|
|
622
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
623
|
-
transform: "translate(7.890470, 8.890470) rotate(45.000000) translate(-7.890470, -8.890470) translate(3.543164, 6.321607)",
|
|
624
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
625
|
-
d: "M6.16557222,4.98656515 C6.09634145,5.05213515 6.01557222,5.08309876 5.92326452,5.07945598 C5.83095683,5.07581321 5.7501876,5.04120682 5.68095683,4.97563682 C5.61172606,4.91006682 5.57711068,4.8317471 5.57711068,4.74067766 C5.57711068,4.64960821 5.61172606,4.57128849 5.68095683,4.50571849 L7.72326452,2.57140353 L5.69249529,0.648016895 C5.62326452,0.582446896 5.59057222,0.504127176 5.59441837,0.413057733 C5.59826452,0.32198829 5.63480299,0.243668569 5.70403375,0.17809857 C5.77326452,0.112528571 5.85595683,0.0797435719 5.95211068,0.0797435719 C6.04826452,0.0797435719 6.13095683,0.112528571 6.2001876,0.17809857 L8.47326452,2.34190853 C8.54249529,2.40747853 8.57711068,2.48397686 8.57711068,2.57140353 C8.57711068,2.65883019 8.54249529,2.73532853 8.47326452,2.80089852 L6.16557222,4.98656515 Z M2.29670341,4.98413866 L0.0208413435,2.82877761 C-0.0481241737,2.7631321 -0.0826069324,2.68654566 -0.0826069324,2.59901831 C-0.0826069324,2.51149096 -0.0481241737,2.43490453 0.0208413435,2.36925901 L2.31969192,0.181075204 C2.38865744,0.115429689 2.47103291,0.0826069324 2.56681835,0.0826069324 C2.6626038,0.0826069324 2.74497927,0.115429689 2.81394479,0.181075204 C2.88291031,0.246720718 2.91739307,0.325130638 2.91739307,0.416304963 C2.91739307,0.507479288 2.88291031,0.585889208 2.81394479,0.651534722 L0.76796778,2.59901831 L2.79095629,4.52462006 C2.8599218,4.59026558 2.89440456,4.66685201 2.89440456,4.75437936 C2.89440456,4.84190671 2.8599218,4.91849315 2.79095629,4.98413866 C2.72199077,5.04978418 2.63961529,5.08260693 2.54382985,5.08260693 C2.44804441,5.08260693 2.36566893,5.04978418 2.29670341,4.98413866 L2.29670341,4.98413866 Z"
|
|
626
|
-
})
|
|
627
|
-
})
|
|
628
|
-
]
|
|
629
|
-
})
|
|
630
|
-
})
|
|
631
|
-
})
|
|
632
|
-
})
|
|
633
|
-
]
|
|
634
|
-
});
|
|
635
|
-
case 'data-table':
|
|
636
|
-
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
637
|
-
width: "16px",
|
|
638
|
-
height: "12px",
|
|
639
|
-
viewBox: "0 0 16 12",
|
|
640
|
-
version: "1.1",
|
|
641
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
642
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
643
|
-
"aria-hidden": "true",
|
|
644
|
-
children: [
|
|
645
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
646
|
-
children: "Data Table Icon"
|
|
647
|
-
}),
|
|
648
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
649
|
-
stroke: "none",
|
|
650
|
-
strokeWidth: "1",
|
|
651
|
-
fillRule: "evenodd",
|
|
652
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
653
|
-
transform: "translate(-132.000000, -6.000000)",
|
|
654
|
-
fillRule: "nonzero",
|
|
655
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
656
|
-
transform: "translate(132.000000, -1.000000)",
|
|
657
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
658
|
-
transform: "translate(8.000000, 13.000000) scale(1, -1) translate(-8.000000, -13.000000) translate(0.000000, 7.000000)",
|
|
659
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
660
|
-
d: "M0,12 L0,0 L16,0 L16,12 L0,12 Z M1,10 L5,10 L5,1 L1,1 L1,10 Z M6,10 L10,10 L10,1 L6,1 L6,10 Z M11,10 L15,10 L15,1 L11,1 L11,10 Z"
|
|
661
|
-
})
|
|
662
|
-
})
|
|
663
|
-
})
|
|
664
|
-
})
|
|
665
|
-
})
|
|
666
|
-
]
|
|
667
|
-
});
|
|
668
|
-
case 'api':
|
|
669
|
-
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
670
|
-
width: "16px",
|
|
671
|
-
height: "13px",
|
|
672
|
-
viewBox: "0 0 16 13",
|
|
673
|
-
version: "1.1",
|
|
674
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
675
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
676
|
-
"aria-hidden": "true",
|
|
677
|
-
children: [
|
|
678
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
679
|
-
children: "API Icon"
|
|
680
|
-
}),
|
|
681
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
682
|
-
stroke: "none",
|
|
683
|
-
strokeWidth: "1",
|
|
684
|
-
fillRule: "evenodd",
|
|
685
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
686
|
-
transform: "translate(-279.000000, -6.000000)",
|
|
687
|
-
fillRule: "nonzero",
|
|
688
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
689
|
-
transform: "translate(279.000000, -1.000000)",
|
|
690
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
691
|
-
transform: "translate(0.000000, 7.000000)",
|
|
692
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
693
|
-
d: "M10.5806452,13 C10.4129032,13 10.2741935,12.9424479 10.1645161,12.8273438 C10.0548387,12.7122396 10,12.5666667 10,12.390625 C10,12.2145833 10.0548387,12.0690104 10.1645161,11.9539062 C10.2741935,11.8388021 10.4129032,11.78125 10.5806452,11.78125 L12.3225806,11.78125 C12.5935484,11.78125 12.8225806,11.6830729 13.0096774,11.4867188 C13.1967742,11.2903646 13.2903226,11.05 13.2903226,10.765625 L13.2903226,8.734375 C13.2903226,8.23333333 13.4354839,7.78645833 13.7258065,7.39375 C14.016129,7.00104167 14.3870968,6.73020833 14.8387097,6.58125 L14.8387097,6.41875 C14.3870968,6.28333333 14.016129,6.01588542 13.7258065,5.61640625 C13.4354839,5.21692708 13.2903226,4.76666667 13.2903226,4.265625 L13.2903226,2.234375 C13.2903226,1.95 13.1967742,1.70963542 13.0096774,1.51328125 C12.8225806,1.31692708 12.5935484,1.21875 12.3225806,1.21875 L10.5806452,1.21875 C10.4129032,1.21875 10.2741935,1.16119792 10.1645161,1.04609375 C10.0548387,0.930989583 10,0.785416667 10,0.609375 C10,0.433333333 10.0548387,0.287760417 10.1645161,0.17265625 C10.2741935,0.0575520833 10.4129032,8.8817842e-16 10.5806452,8.8817842e-16 L12.3225806,8.8817842e-16 C12.916129,8.8817842e-16 13.4193548,0.216666667 13.8322581,0.65 C14.2451613,1.08333333 14.4516129,1.61145833 14.4516129,2.234375 L14.4516129,4.265625 C14.4516129,4.55 14.5451613,4.79036458 14.7322581,4.98671875 C14.9193548,5.18307292 15.1483871,5.28125 15.4193548,5.28125 C15.5870968,5.28125 15.7258065,5.33880208 15.8354839,5.45390625 C15.9451613,5.56901042 16,5.71458333 16,5.890625 L16,7.109375 C16,7.271875 15.9451613,7.4140625 15.8354839,7.5359375 C15.7258065,7.6578125 15.5870968,7.71875 15.4193548,7.71875 C15.1483871,7.71875 14.9193548,7.81692708 14.7322581,8.01328125 C14.5451613,8.20963542 14.4516129,8.45 14.4516129,8.734375 L14.4516129,10.765625 C14.4516129,11.3885417 14.2451613,11.9166667 13.8322581,12.35 C13.4193548,12.7833333 12.916129,13 12.3225806,13 L10.5806452,13 Z M3.67741935,13 C3.08387097,13 2.58064516,12.7833333 2.16774194,12.35 C1.75483871,11.9166667 1.5483871,11.3885417 1.5483871,10.765625 L1.5483871,8.734375 C1.5483871,8.45 1.45483871,8.20963542 1.26774194,8.01328125 C1.08064516,7.81692708 0.851612903,7.71875 0.580645161,7.71875 C0.425806452,7.71875 0.290322581,7.6578125 0.174193548,7.5359375 C0.0580645161,7.4140625 3.52606833e-13,7.271875 3.52606833e-13,7.109375 L3.52606833e-13,5.890625 C3.52606833e-13,5.71458333 0.0580645161,5.56901042 0.174193548,5.45390625 C0.290322581,5.33880208 0.425806452,5.28125 0.580645161,5.28125 C0.851612903,5.28125 1.08064516,5.18307292 1.26774194,4.98671875 C1.45483871,4.79036458 1.5483871,4.55 1.5483871,4.265625 L1.5483871,2.234375 C1.5483871,1.61145833 1.75483871,1.08333333 2.16774194,0.65 C2.58064516,0.216666667 3.08387097,8.8817842e-16 3.67741935,8.8817842e-16 L5.41935484,8.8817842e-16 C5.58709677,8.8817842e-16 5.72580645,0.0575520833 5.83548387,0.17265625 C5.94516129,0.287760417 6,0.433333333 6,0.609375 C6,0.785416667 5.94516129,0.930989583 5.83548387,1.04609375 C5.72580645,1.16119792 5.58709677,1.21875 5.41935484,1.21875 L3.67741935,1.21875 C3.40645161,1.21875 3.17741935,1.31692708 2.99032258,1.51328125 C2.80322581,1.70963542 2.70967742,1.95 2.70967742,2.234375 L2.70967742,4.265625 C2.70967742,4.76666667 2.56451613,5.21692708 2.27419355,5.61640625 C1.98387097,6.01588542 1.61290323,6.28333333 1.16129032,6.41875 L1.16129032,6.58125 C1.61290323,6.73020833 1.98387097,7.00104167 2.27419355,7.39375 C2.56451613,7.78645833 2.70967742,8.23333333 2.70967742,8.734375 L2.70967742,10.765625 C2.70967742,11.05 2.80322581,11.2903646 2.99032258,11.4867188 C3.17741935,11.6830729 3.40645161,11.78125 3.67741935,11.78125 L5.41935484,11.78125 C5.58709677,11.78125 5.72580645,11.8388021 5.83548387,11.9539062 C5.94516129,12.0690104 6,12.2145833 6,12.390625 C6,12.5666667 5.94516129,12.7122396 5.83548387,12.8273438 C5.72580645,12.9424479 5.58709677,13 5.41935484,13 L3.67741935,13 Z"
|
|
694
|
-
})
|
|
695
|
-
})
|
|
696
|
-
})
|
|
697
|
-
})
|
|
698
|
-
})
|
|
699
|
-
]
|
|
700
|
-
});
|
|
701
|
-
case 'download':
|
|
702
|
-
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
703
|
-
width: "16px",
|
|
704
|
-
height: "16px",
|
|
705
|
-
viewBox: "0 0 16 16",
|
|
706
|
-
version: "1.1",
|
|
707
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
708
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
709
|
-
"aria-hidden": "true",
|
|
710
|
-
children: [
|
|
711
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
712
|
-
children: "Download Icon"
|
|
713
|
-
}),
|
|
714
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
715
|
-
stroke: "none",
|
|
716
|
-
strokeWidth: "1",
|
|
717
|
-
fillRule: "evenodd",
|
|
718
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
719
|
-
transform: "translate(-370.000000, -4.000000)",
|
|
720
|
-
fillRule: "nonzero",
|
|
721
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
722
|
-
transform: "translate(370.000000, -1.000000)",
|
|
723
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
724
|
-
d: "M9,6 C9,5.446875 8.553125,5 8,5 C7.446875,5 7,5.446875 7,6 L7,13.584375 L4.70625,11.290625 C4.315625,10.9 3.68125,10.9 3.290625,11.290625 C2.9,11.68125 2.9,12.315625 3.290625,12.70625 L7.290625,16.70625 C7.68125,17.096875 8.315625,17.096875 8.70625,16.70625 L12.70625,12.70625 C13.096875,12.315625 13.096875,11.68125 12.70625,11.290625 C12.315625,10.9 11.68125,10.9 11.290625,11.290625 L9,13.584375 L9,6 Z M2,16 C0.896875,16 0,16.896875 0,18 L0,19 C0,20.103125 0.896875,21 2,21 L14,21 C15.103125,21 16,20.103125 16,19 L16,18 C16,16.896875 15.103125,16 14,16 L10.828125,16 L9.4125,17.415625 C8.63125,18.196875 7.365625,18.196875 6.584375,17.415625 L5.171875,16 L2,16 Z M13.5,19.25 C13.084375,19.25 12.75,18.915625 12.75,18.5 C12.75,18.084375 13.084375,17.75 13.5,17.75 C13.915625,17.75 14.25,18.084375 14.25,18.5 C14.25,18.915625 13.915625,19.25 13.5,19.25 Z"
|
|
725
|
-
})
|
|
726
|
-
})
|
|
727
|
-
})
|
|
728
|
-
})
|
|
729
|
-
]
|
|
730
|
-
});
|
|
731
|
-
case 'data-dictionary':
|
|
732
|
-
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
733
|
-
width: "14px",
|
|
734
|
-
height: "16px",
|
|
735
|
-
viewBox: "0 0 14 16",
|
|
736
|
-
version: "1.1",
|
|
737
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
738
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
739
|
-
"aria-hidden": "true",
|
|
740
|
-
children: [
|
|
741
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
742
|
-
children: "Data Dictionary Icon"
|
|
743
|
-
}),
|
|
744
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
745
|
-
id: "Dev-Handoff",
|
|
746
|
-
stroke: "none",
|
|
747
|
-
strokeWidth: "1",
|
|
748
|
-
fillRule: "evenodd",
|
|
749
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("g", {
|
|
750
|
-
id: "Group-15",
|
|
751
|
-
transform: "translate(0, 0)",
|
|
752
|
-
fillRule: "nonzero",
|
|
753
|
-
children: [
|
|
754
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
755
|
-
d: "M0.0218026938,8.0971396 C0.0218026938,6.24591342 -0.0192244811,4.39368657 0.0358119731,2.54446171 C0.0728364968,1.28162525 1.07950328,0.231929969 2.34434106,0.0678212692 C2.69057039,0.022791443 3.04180304,0.00477951255 3.39003369,0.00477951255 C6.28395052,-0.000223801472 9.17786735,-0.00322578988 12.0717842,0.00578017535 C12.6811878,0.00778150096 13.2435603,0.169888875 13.6428248,0.683228893 C13.9059991,1.02145292 13.9950581,1.42171804 13.9970594,1.83299045 C14.0050647,4.76793446 14.0080667,7.70287846 13.9950581,10.6378225 C13.9920561,11.280248 13.7689083,11.8466231 13.1875232,12.2078624 C13.0464297,12.2959207 12.992394,12.4099963 12.9953959,12.5811096 C13.0054026,13.1394795 13.0064032,13.69885 12.9953959,14.2572198 C12.9913933,14.4473458 13.0364231,14.5173922 13.2425597,14.5243968 C13.6178082,14.5364047 13.8979938,14.7765638 13.9720428,15.0987772 C14.0450912,15.4129854 13.9069998,15.7482074 13.6088022,15.9013088 C13.4827187,15.9663519 13.3226127,15.9933698 13.1775166,15.9933698 C9.62516362,15.9983731 6.07181,16.0053777 2.51945705,15.9933698 C1.09851587,15.9883665 0.0708351712,15.0207255 0.0268060079,13.5997844 C-0.0202251439,12.0507583 0.00979474021,10.4987303 0.00579208899,8.94770299 C0.00579208899,8.66451541 0.00579208899,8.38032718 0.00579208899,8.0971396 C0.010795403,8.0971396 0.015798717,8.0971396 0.0218026938,8.0971396 L0.0218026938,8.0971396 Z M1.49477834,11.1421565 C1.99510974,11.1071333 2.44740933,11.0490949 2.90070958,11.0480942 C5.91970926,11.0400889 8.93870894,11.0440916 11.9577086,11.0430909 C12.4020029,11.0430909 12.5280864,10.9200094 12.5280864,10.4837204 C12.5280864,7.66585394 12.5280864,4.84698682 12.5280864,2.02912036 C12.5280864,1.58382542 12.4430301,1.49976974 12.0057404,1.49976974 C9.7952763,1.49976974 7.58581283,1.49976974 5.37534869,1.49976974 C4.50777404,1.49976974 3.64019939,1.4927651 2.7736254,1.50277173 C2.01712432,1.51177769 1.47576575,2.0711482 1.47576575,2.82664862 C1.47576575,5.50342162 1.47576575,8.17919395 1.47576575,10.855967 C1.47576575,10.9610365 1.48877436,11.0661061 1.49377768,11.1421565 L1.49477834,11.1421565 Z M6.8923535,14.5153908 C8.3263033,14.5153908 9.7602531,14.5093869 11.1932022,14.5203941 C11.4393653,14.5223955 11.5334276,14.467359 11.5224203,14.2041847 C11.5014064,13.7388765 11.5044084,13.2705663 11.5224203,12.8042574 C11.5314263,12.5630977 11.4553759,12.4960533 11.2132155,12.4960533 C8.37933843,12.5040586 5.54446071,12.5010566 2.71058365,12.5020573 C2.5935061,12.5020573 2.47642855,12.4990553 2.36135233,12.5140652 C1.64988108,12.6031242 1.26662722,13.4186644 1.63387047,14.0360733 C1.86102093,14.4173259 2.22426152,14.5083862 2.61652134,14.5113882 C4.04146518,14.5203941 5.46740967,14.5153908 6.8923535,14.5153908 L6.8923535,14.5153908 Z",
|
|
756
|
-
id: "Shape"
|
|
757
|
-
}),
|
|
758
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
759
|
-
d: "M7.50976245,7.49574126 C6.62717786,7.49574126 5.7435926,7.49774259 4.86100801,7.49574126 C4.36167727,7.49373993 4.05747578,7.22956495 4.03045788,6.787272 C4.00243933,6.33597307 4.34366534,6.01476031 4.87101464,6.01275899 C5.95373179,6.00775567 7.03644895,6.01175832 8.1191661,6.01175832 C8.79361283,6.01175832 9.46805956,6.00675501 10.143507,6.01375965 C10.7519099,6.01976362 11.0981393,6.45305062 10.9360319,6.99140721 C10.8429703,7.30261334 10.55578,7.4947406 10.1585169,7.49674192 C9.2759323,7.50074457 8.39234705,7.49774259 7.50976245,7.49774259 L7.50976245,7.49574126 Z",
|
|
760
|
-
id: "Path"
|
|
761
|
-
}),
|
|
762
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
763
|
-
d: "M7.50776113,5.00108889 C6.61617057,5.00108889 5.72458001,5.0060922 4.83298945,4.99908757 C4.25360569,4.99508491 3.90237305,4.53177804 4.07248572,4.01643669 C4.1565414,3.76226834 4.33365871,3.61517091 4.5868264,3.55913379 C4.6999013,3.53411722 4.81797951,3.52611192 4.9340564,3.52611192 C6.6501931,3.52411059 8.36733048,3.52411059 10.0834672,3.52611192 C10.5577814,3.52611192 10.8299616,3.69022062 10.9340306,4.03044597 C11.090134,4.53778201 10.7439046,4.99408425 10.1825328,4.99908757 C9.29094224,5.00709287 8.39935169,5.00108889 7.50776113,5.00108889 L7.50776113,5.00108889 Z",
|
|
764
|
-
id: "Path"
|
|
765
|
-
})
|
|
766
|
-
]
|
|
767
|
-
})
|
|
768
|
-
})
|
|
769
|
-
]
|
|
770
|
-
});
|
|
771
|
-
default:
|
|
772
|
-
return null;
|
|
387
|
+
const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
|
|
388
|
+
const { headingText: headingText = "Dataset Search" } = props;
|
|
389
|
+
const navigate = (0, $hgUW1$useNavigate)();
|
|
390
|
+
const { isMobile: isMobile } = (0, $hgUW1$useContext)((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
391
|
+
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)('');
|
|
392
|
+
const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
|
|
393
|
+
function searchForDataset(e) {
|
|
394
|
+
e.preventDefault();
|
|
395
|
+
if (window) {
|
|
396
|
+
if (window.location.pathname !== '/datasets') {
|
|
397
|
+
navigate(`/datasets?fulltext=${modalSearchTerm}`);
|
|
398
|
+
setModalSearch(false);
|
|
399
|
+
} else {
|
|
400
|
+
window.location.search = `fulltext=${modalSearchTerm}`;
|
|
401
|
+
setModalSearch(false);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
773
404
|
}
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
const $b61856b23f5f58a2$var$LargeFileDialog = (props)=>{
|
|
779
|
-
const [modalOpen, setModalOpen] = (0, $hgUW1$useState)(false);
|
|
780
|
-
const { downloadUrl: downloadUrl } = props;
|
|
781
|
-
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
405
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
406
|
+
className: "dkan-c-main-navigation--search",
|
|
782
407
|
children: [
|
|
783
|
-
/*#__PURE__*/ (0, $hgUW1$
|
|
784
|
-
variation:
|
|
785
|
-
className: "ds-
|
|
786
|
-
onClick: ()=>
|
|
787
|
-
children:
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
}),
|
|
791
|
-
"Download"
|
|
792
|
-
]
|
|
408
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
409
|
+
variation: isMobile ? undefined : 'ghost',
|
|
410
|
+
className: "ds-u-lg-border--0 dkan-c-header-search--modal-button",
|
|
411
|
+
onClick: ()=>setModalSearch(true),
|
|
412
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
413
|
+
children: "Search"
|
|
414
|
+
})
|
|
793
415
|
}),
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
isOpen:
|
|
797
|
-
|
|
798
|
-
|
|
416
|
+
modalSearch && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
417
|
+
className: "dc-c-search-dialog",
|
|
418
|
+
isOpen: modalSearch,
|
|
419
|
+
onExit: ()=>setModalSearch(false),
|
|
420
|
+
heading: `${headingText}`,
|
|
421
|
+
actions: /*#__PURE__*/ (0, $hgUW1$jsxs)("form", {
|
|
422
|
+
className: "dkan-dataset-search ds-u-display--flex ds-u-align-items--start ds-u-flex-wrap--nowrap",
|
|
423
|
+
onSubmit: (e)=>{
|
|
424
|
+
searchForDataset(e);
|
|
425
|
+
},
|
|
799
426
|
children: [
|
|
800
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
427
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
428
|
+
value: modalSearchTerm,
|
|
429
|
+
fieldClassName: "ds-u-display--inline-block ds-u-margin--0",
|
|
430
|
+
className: "ds-l-col--9",
|
|
431
|
+
label: "Search Term",
|
|
432
|
+
name: "search-modal",
|
|
433
|
+
labelClassName: "ds-u-visibility--screen-reader",
|
|
434
|
+
onChange: (e)=>{
|
|
435
|
+
setModalSearchTerm(e.target.value);
|
|
436
|
+
}
|
|
805
437
|
}),
|
|
806
|
-
/*#__PURE__*/ (0, $hgUW1$
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
children:
|
|
438
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
439
|
+
type: "submit",
|
|
440
|
+
className: "ds-l-col--3",
|
|
441
|
+
children: [
|
|
442
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
443
|
+
className: "fas fa-search small-text ds-u-sm-display--none"
|
|
444
|
+
}),
|
|
445
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
446
|
+
className: "full-text ds-u-display--none ds-u-sm-display--inline-block",
|
|
447
|
+
children: "Search"
|
|
448
|
+
})
|
|
449
|
+
]
|
|
810
450
|
})
|
|
811
451
|
]
|
|
812
|
-
})
|
|
813
|
-
children: [
|
|
814
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
815
|
-
children: "This is a very large file and, depending on your network characteristics and software, may take a long time to download or fail to download. Additionally, the number of rows in the file may larger than the maximum rows your version of Microsoft Excel supports. If you can't download the file, we recommend engaging your IT support staff. If you are able to download the file but are unable to open it in MS Excel or get a message that the data has been truncated, we recommend trying alternative programs such as MS Access, Universal Viewer, Editpad or any other software your organization has available for large datasets."
|
|
816
|
-
}),
|
|
817
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
818
|
-
children: "Would you like to proceed?"
|
|
819
|
-
})
|
|
820
|
-
]
|
|
452
|
+
})
|
|
821
453
|
})
|
|
822
454
|
]
|
|
823
455
|
});
|
|
824
456
|
};
|
|
825
|
-
var $
|
|
826
|
-
|
|
827
|
-
|
|
457
|
+
var $fea9297ba4dd394c$export$2e2bcd8739ae039 = $fea9297ba4dd394c$var$HeaderSearch;
|
|
828
458
|
|
|
829
459
|
|
|
830
460
|
|
|
831
|
-
const $
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
const
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
children:
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
461
|
+
const $b939b31651e82908$var$HeaderNav = (props)=>{
|
|
462
|
+
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
463
|
+
const { links: links, topNavLinks: topNavLinks, wrapperClasses: wrapperClasses, searchInMobile: searchInMobile } = props;
|
|
464
|
+
const navMenuOpenClass = `dkan-c-nav-menu--${headerContext.mobileMenuOpen ? "open" : "close"}`;
|
|
465
|
+
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ? 'mobile' : 'desktop'}`;
|
|
466
|
+
const linkClasses = 'dkan-c-header--link ds-c-button ds-c-button--ghost';
|
|
467
|
+
const listClasses = 'dkan-c-header--link-list ';
|
|
468
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
469
|
+
className: `dkan-c-nav-menu ${wrapperClasses} ${navMenuOpenClass} ${isMobileClass}`,
|
|
470
|
+
ref: headerContext.menuRef,
|
|
471
|
+
children: [
|
|
472
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
473
|
+
variation: "ghost",
|
|
474
|
+
className: "dkan-c-nav-menu--mobile-close-button",
|
|
475
|
+
onClick: ()=>headerContext.setMobileMenuOpen(false),
|
|
476
|
+
children: [
|
|
477
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$CloseIconThin), {}),
|
|
478
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
479
|
+
className: "ds-u-margin-left--1",
|
|
480
|
+
children: "Close"
|
|
481
|
+
})
|
|
482
|
+
]
|
|
483
|
+
}),
|
|
484
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("nav", {
|
|
485
|
+
className: "dkan-c-main-nav",
|
|
486
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
487
|
+
className: listClasses,
|
|
488
|
+
children: links.map((link)=>{
|
|
489
|
+
if (link.submenu) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $669b51f08325b4e3$export$2e2bcd8739ae039), {
|
|
490
|
+
link: link,
|
|
491
|
+
wrapLabel: true,
|
|
492
|
+
subLinkClasses: linkClasses,
|
|
493
|
+
linkClasses: linkClasses
|
|
494
|
+
}, link.id);
|
|
495
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
496
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
497
|
+
to: link.url,
|
|
498
|
+
className: linkClasses,
|
|
499
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
500
|
+
children: link.label
|
|
501
|
+
})
|
|
502
|
+
})
|
|
503
|
+
}, link.id);
|
|
504
|
+
})
|
|
505
|
+
})
|
|
506
|
+
}),
|
|
507
|
+
topNavLinks && /*#__PURE__*/ (0, $hgUW1$jsx)("nav", {
|
|
508
|
+
className: "dkan-c-top-nav",
|
|
509
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
510
|
+
className: listClasses,
|
|
511
|
+
children: topNavLinks.map((link)=>{
|
|
512
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
513
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
514
|
+
to: link.url,
|
|
515
|
+
className: linkClasses,
|
|
516
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
517
|
+
children: link.label
|
|
518
|
+
})
|
|
519
|
+
})
|
|
520
|
+
}, link.id);
|
|
521
|
+
})
|
|
522
|
+
})
|
|
523
|
+
}),
|
|
524
|
+
searchInMobile && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $fea9297ba4dd394c$export$2e2bcd8739ae039), {})
|
|
525
|
+
]
|
|
526
|
+
});
|
|
527
|
+
};
|
|
528
|
+
var $b939b31651e82908$export$2e2bcd8739ae039 = $b939b31651e82908$var$HeaderNav;
|
|
845
529
|
|
|
846
530
|
|
|
847
531
|
|
|
848
532
|
|
|
849
533
|
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
const $9a8892c5ac150556$var$HeaderSiteTitle = (props)=>{
|
|
537
|
+
const inverse = props.inverse;
|
|
538
|
+
const { logoFilePath: logoFilePath, logoAltText: logoAltText, urlTitle: urlTitle } = props.org;
|
|
539
|
+
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";
|
|
540
|
+
if (logoFilePath) return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
541
|
+
className: classList,
|
|
542
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
543
|
+
to: "/",
|
|
544
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("img", {
|
|
545
|
+
src: logoFilePath,
|
|
546
|
+
alt: logoAltText
|
|
547
|
+
})
|
|
548
|
+
})
|
|
858
549
|
});
|
|
859
|
-
return (0, $hgUW1$
|
|
860
|
-
|
|
550
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
551
|
+
className: classList,
|
|
552
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
553
|
+
to: "/",
|
|
554
|
+
className: `${inverse ? "ds-c-link--inverse " : ""} ds-u-font-size--2xl ds-u-lg-font-size--3xl`,
|
|
555
|
+
children: urlTitle
|
|
556
|
+
})
|
|
861
557
|
});
|
|
862
|
-
}
|
|
863
|
-
|
|
558
|
+
};
|
|
559
|
+
var $9a8892c5ac150556$export$2e2bcd8739ae039 = $9a8892c5ac150556$var$HeaderSiteTitle;
|
|
864
560
|
|
|
865
561
|
|
|
866
562
|
|
|
@@ -869,131 +565,290 @@ function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240)
|
|
|
869
565
|
|
|
870
566
|
|
|
871
567
|
|
|
872
|
-
const $
|
|
873
|
-
const
|
|
874
|
-
const
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
children:
|
|
882
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
|
|
883
|
-
children: "Last Modified: "
|
|
884
|
-
}),
|
|
885
|
-
" The date the ",
|
|
886
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
|
|
887
|
-
"dataset was last updated."
|
|
888
|
-
]
|
|
889
|
-
}),
|
|
890
|
-
released: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
891
|
-
children: [
|
|
892
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
|
|
893
|
-
children: "Released: "
|
|
894
|
-
}),
|
|
895
|
-
" The date the most ",
|
|
896
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
|
|
897
|
-
"recent dataset was made available",
|
|
898
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
|
|
899
|
-
"to the public."
|
|
900
|
-
]
|
|
901
|
-
}),
|
|
902
|
-
refresh: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
903
|
-
children: [
|
|
904
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
|
|
905
|
-
children: "Planned Update:"
|
|
906
|
-
}),
|
|
907
|
-
" The date the ",
|
|
908
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
|
|
909
|
-
"dataset is scheduled to be updated."
|
|
910
|
-
]
|
|
568
|
+
const $403833a4b442d5df$var$MobileMenuButton = (props)=>{
|
|
569
|
+
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
570
|
+
const { wrapperClasses: wrapperClasses } = props;
|
|
571
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
572
|
+
"aria-haspopup": "true",
|
|
573
|
+
"aria-expanded": headerContext.mobileMenuOpen,
|
|
574
|
+
className: `dkan-c-mobile-menu-button ${wrapperClasses} dkan-c-mobile-menu-button--${headerContext.mobileMenuOpen ? "close" : "open"}`,
|
|
575
|
+
onClick: ()=>headerContext.setMobileMenuOpen(!headerContext.mobileMenuOpen),
|
|
576
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
577
|
+
children: "Menu"
|
|
911
578
|
})
|
|
912
|
-
};
|
|
913
|
-
|
|
914
|
-
|
|
579
|
+
});
|
|
580
|
+
};
|
|
581
|
+
var $403833a4b442d5df$export$2e2bcd8739ae039 = $403833a4b442d5df$var$MobileMenuButton;
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
const $f57121650539d8c5$var$NavBar = (props)=>{
|
|
590
|
+
const { links: links, menuName: menuName, menuId: menuId, menuClasses: menuClasses, linkClasses: linkClasses, subLinkClasses: subLinkClasses, wrapLabel: wrapLabel = false } = props;
|
|
591
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
|
|
592
|
+
className: `dkan-c-${menuId}-menu`,
|
|
593
|
+
"aria-labelledby": `dkan-c-${menuId}-menu--heading`,
|
|
915
594
|
children: [
|
|
916
|
-
/*#__PURE__*/ (0, $hgUW1$
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
children: dateText[type]
|
|
921
|
-
}),
|
|
922
|
-
": ",
|
|
923
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $727b038175bac6f5$export$2e2bcd8739ae039), {
|
|
924
|
-
date: date
|
|
925
|
-
})
|
|
926
|
-
]
|
|
595
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
596
|
+
id: `dkan-c-${menuId}-menu--heading`,
|
|
597
|
+
className: "ds-u-visibility--screen-reader",
|
|
598
|
+
children: menuName
|
|
927
599
|
}),
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
600
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
601
|
+
className: menuClasses,
|
|
602
|
+
children: links.map((link)=>{
|
|
603
|
+
if (link.submenu) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $669b51f08325b4e3$export$2e2bcd8739ae039), {
|
|
604
|
+
link: link,
|
|
605
|
+
wrapLabel: wrapLabel,
|
|
606
|
+
subLinkClasses: subLinkClasses,
|
|
607
|
+
linkClasses: linkClasses
|
|
608
|
+
}, link.id);
|
|
609
|
+
else return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
610
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
611
|
+
to: link,
|
|
612
|
+
className: linkClasses,
|
|
613
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
614
|
+
children: link.label
|
|
615
|
+
})
|
|
616
|
+
})
|
|
617
|
+
}, link.id);
|
|
618
|
+
})
|
|
934
619
|
})
|
|
935
620
|
]
|
|
936
621
|
});
|
|
937
622
|
};
|
|
938
|
-
var $
|
|
623
|
+
var $f57121650539d8c5$export$2e2bcd8739ae039 = $f57121650539d8c5$var$NavBar;
|
|
939
624
|
|
|
940
625
|
|
|
941
626
|
|
|
942
|
-
const $20de4fedf33d4f9a$var$DatasetDate = (props)=>{
|
|
943
|
-
const { date: date, modifiedBoldLabel: modifiedBoldLabel = false, releasedBoldLabel: releasedBoldLabel = false, refreshBoldLabel: refreshBoldLabel = false, displayTooltips: displayTooltips = true } = props;
|
|
944
|
-
// Create an array of date items to render
|
|
945
|
-
const dateItems = [];
|
|
946
|
-
Object.entries(date).forEach(([key, value])=>{
|
|
947
|
-
if (value) {
|
|
948
|
-
const bold = key === "modified" && modifiedBoldLabel || key === "released" && releasedBoldLabel || key === "refresh" && refreshBoldLabel;
|
|
949
|
-
dateItems.push(/*#__PURE__*/ (0, $hgUW1$jsx)((0, $17711e94d2ce0ee4$export$2e2bcd8739ae039), {
|
|
950
|
-
type: key,
|
|
951
|
-
displayTooltips: displayTooltips,
|
|
952
|
-
date: value,
|
|
953
|
-
boldLabel: bold
|
|
954
|
-
}, key));
|
|
955
|
-
}
|
|
956
|
-
});
|
|
957
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
958
|
-
className: "dataset-date ds-u-display--flex ds-u-flex-wrap--wrap ds-u-font-size--sm ds-u-align-items--start",
|
|
959
|
-
children: dateItems.map((item, index)=>/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$react).Fragment, {
|
|
960
|
-
children: [
|
|
961
|
-
item,
|
|
962
|
-
index < dateItems.length - 1 && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
963
|
-
className: "bullet-point",
|
|
964
|
-
children: "\u2022"
|
|
965
|
-
})
|
|
966
|
-
]
|
|
967
|
-
}, index))
|
|
968
|
-
});
|
|
969
|
-
};
|
|
970
|
-
var $20de4fedf33d4f9a$export$2e2bcd8739ae039 = $20de4fedf33d4f9a$var$DatasetDate;
|
|
971
627
|
|
|
972
628
|
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
634
|
+
const { title: title, links: links, mobileMax: mobileMax } = props;
|
|
635
|
+
const active = (0, $hgUW1$useLocation)().pathname;
|
|
636
|
+
const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
|
|
637
|
+
const styleClasses = 'dkan-c--sidebar-nav-wrapper ds-u-border--1 ds-u-border--color-gray-lightest ds-u-padding--2';
|
|
638
|
+
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ? 'mobile' : 'desktop'}`;
|
|
639
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
640
|
+
className: `dkan-c-sidebar-nav ${mobileClass}`,
|
|
641
|
+
children: [
|
|
642
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
643
|
+
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",
|
|
644
|
+
children: [
|
|
645
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
646
|
+
className: "ds-u-margin-left--2 ds-u-margin-y--0 ds-text-heading--xl",
|
|
647
|
+
children: "Pages in this section"
|
|
648
|
+
}),
|
|
649
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
650
|
+
"aria-haspopup": "true",
|
|
651
|
+
variation: "ghost",
|
|
652
|
+
"aria-expanded": `${menuOpen ? 'true' : 'false'}`,
|
|
653
|
+
onDark: true,
|
|
654
|
+
onClick: ()=>setMenuOpen(!menuOpen),
|
|
655
|
+
children: [
|
|
656
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
657
|
+
className: "ds-u-visibility--screen-reader",
|
|
658
|
+
children: "Toggle menu"
|
|
659
|
+
}),
|
|
660
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
|
|
661
|
+
direction: menuOpen ? 'up' : 'down'
|
|
662
|
+
})
|
|
663
|
+
]
|
|
664
|
+
})
|
|
665
|
+
]
|
|
666
|
+
}),
|
|
667
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
668
|
+
className: ``,
|
|
669
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
|
|
670
|
+
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ? 'open' : 'close'}`,
|
|
671
|
+
children: [
|
|
672
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
673
|
+
className: "ds-u-padding--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest",
|
|
674
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h3", {
|
|
675
|
+
className: "ds-text-heading--lg",
|
|
676
|
+
children: title
|
|
677
|
+
})
|
|
678
|
+
}),
|
|
679
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
680
|
+
className: "ds-u-padding-bottom--2",
|
|
681
|
+
children: links.map(({ url: url, label: label })=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
682
|
+
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ? 'active' : ''}`,
|
|
683
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
684
|
+
className: "ds-u-display--flex ds-u-padding-y--1",
|
|
685
|
+
children: [
|
|
686
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
687
|
+
className: "dkan-c-sidebar-nav-link-status"
|
|
688
|
+
}),
|
|
689
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
690
|
+
to: url,
|
|
691
|
+
className: "dkan-c-sidebar-nav-link ds-u-margin-left--2",
|
|
692
|
+
children: label
|
|
693
|
+
})
|
|
694
|
+
]
|
|
695
|
+
})
|
|
696
|
+
}, `${url}${label}`))
|
|
697
|
+
})
|
|
698
|
+
]
|
|
699
|
+
})
|
|
700
|
+
})
|
|
701
|
+
]
|
|
702
|
+
});
|
|
703
|
+
};
|
|
704
|
+
var $953b286f7778640e$export$2e2bcd8739ae039 = $953b286f7778640e$var$SidebarNavigation;
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
const $b0968edc60d7d3a4$var$SidebarPage = (props)=>{
|
|
712
|
+
const { links: links, menuTitle: menuTitle, mobileMaxWidth: mobileMaxWidth = 768, children: children } = props;
|
|
713
|
+
const mobileMax = (0, $hgUW1$useMediaQuery)({
|
|
714
|
+
query: `(max-width: ${mobileMaxWidth}px)`
|
|
715
|
+
});
|
|
716
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
717
|
+
className: `${mobileMax ? "a" : 'ds-l-container'}`,
|
|
718
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
719
|
+
className: `${mobileMax ? "a" : 'ds-l-row'}`,
|
|
720
|
+
children: [
|
|
721
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
722
|
+
className: `${mobileMax ? 'a' : "ds-l-col--4"}`,
|
|
723
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $953b286f7778640e$export$2e2bcd8739ae039), {
|
|
724
|
+
links: links,
|
|
725
|
+
title: menuTitle,
|
|
726
|
+
mobileMax: mobileMax
|
|
727
|
+
})
|
|
728
|
+
}),
|
|
729
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
730
|
+
className: `${mobileMax ? "ds-l-container" : " ds-l-md-col--8"}`,
|
|
731
|
+
children: children
|
|
732
|
+
})
|
|
733
|
+
]
|
|
734
|
+
})
|
|
735
|
+
});
|
|
736
|
+
};
|
|
737
|
+
var $b0968edc60d7d3a4$export$2e2bcd8739ae039 = $b0968edc60d7d3a4$var$SidebarPage;
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl = 'datasets', searchKey: searchKey = 'fulltext', textfieldLabel: textfieldLabel = 'Search for a dataset', searchButtonText: searchButtonText = 'Search' })=>{
|
|
746
|
+
const navigate = (0, $hgUW1$useNavigate)();
|
|
747
|
+
const [searchValue, setSearchValue] = (0, $hgUW1$useState)('');
|
|
748
|
+
function submitHero(e) {
|
|
749
|
+
e.preventDefault();
|
|
750
|
+
navigate(`/${searchUrl}?${searchKey}=${searchValue}`);
|
|
986
751
|
}
|
|
987
|
-
return
|
|
988
|
-
|
|
752
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
753
|
+
className: `dc-c-hero ds-base ds-u-padding--2`,
|
|
754
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
755
|
+
className: "ds-l-container",
|
|
756
|
+
children: [
|
|
757
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
758
|
+
className: "ds-l-row",
|
|
759
|
+
children: [
|
|
760
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
761
|
+
className: "ds-text-heading--5xl ds-u-color--white ds-u-margin-y--1",
|
|
762
|
+
children: title
|
|
763
|
+
}),
|
|
764
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
765
|
+
className: "ds-u-color--white ds-u-measure--wide",
|
|
766
|
+
children: description
|
|
767
|
+
})
|
|
768
|
+
]
|
|
769
|
+
}),
|
|
770
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("form", {
|
|
771
|
+
onSubmit: (e)=>submitHero(e),
|
|
772
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
773
|
+
style: {
|
|
774
|
+
position: 'relative'
|
|
775
|
+
},
|
|
776
|
+
className: "ds-l-row ds-u-align-items--stretch ds-u-margin-y--4 ds-u-flex-wrap--nowrap",
|
|
777
|
+
children: [
|
|
778
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
779
|
+
className: "ds-u-padding--0 ds-u-margin-right--1",
|
|
780
|
+
style: {
|
|
781
|
+
flex: '1 1 100%',
|
|
782
|
+
maxWidth: '100%'
|
|
783
|
+
},
|
|
784
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
785
|
+
label: textfieldLabel,
|
|
786
|
+
labelClassName: "ds-u-visibility--screen-reader",
|
|
787
|
+
name: "search_text_input",
|
|
788
|
+
style: {
|
|
789
|
+
maxWidth: 'none',
|
|
790
|
+
height: '61px',
|
|
791
|
+
margin: '0 20px 0 0'
|
|
792
|
+
},
|
|
793
|
+
onChange: (e)=>{
|
|
794
|
+
setSearchValue(e.target.value);
|
|
795
|
+
}
|
|
796
|
+
})
|
|
797
|
+
}),
|
|
798
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
799
|
+
className: "ds-u-margin-left--auto",
|
|
800
|
+
size: "big",
|
|
801
|
+
type: "submit",
|
|
802
|
+
variation: "solid",
|
|
803
|
+
onDark: true,
|
|
804
|
+
children: [
|
|
805
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
806
|
+
className: "fas fa-search small-text ds-u-sm-display--none"
|
|
807
|
+
}),
|
|
808
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
809
|
+
className: "full-text ds-u-display--none ds-u-sm-display--inline-block",
|
|
810
|
+
children: searchButtonText
|
|
811
|
+
})
|
|
812
|
+
]
|
|
813
|
+
})
|
|
814
|
+
]
|
|
815
|
+
})
|
|
816
|
+
})
|
|
817
|
+
]
|
|
818
|
+
})
|
|
819
|
+
});
|
|
820
|
+
};
|
|
821
|
+
var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
|
|
989
822
|
|
|
990
823
|
|
|
991
|
-
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
const $727b038175bac6f5$var$TransformedDate = ({ date: date, options: options = {
|
|
831
|
+
year: 'numeric',
|
|
832
|
+
month: 'long',
|
|
833
|
+
day: 'numeric',
|
|
834
|
+
timeZone: 'UTC'
|
|
835
|
+
} })=>{
|
|
836
|
+
const rawDate = new Date(date);
|
|
837
|
+
let modifiedDate = '';
|
|
838
|
+
if (rawDate) modifiedDate = rawDate.toLocaleDateString('en-US', options);
|
|
839
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
840
|
+
children: modifiedDate
|
|
841
|
+
});
|
|
842
|
+
};
|
|
843
|
+
var $727b038175bac6f5$export$2e2bcd8739ae039 = $727b038175bac6f5$var$TransformedDate;
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
const $c068004d499082cc$var$DatasetListItem = (props)=>{
|
|
992
848
|
const desktop = (0, $hgUW1$useMediaQuery)({
|
|
993
849
|
minWidth: 1024
|
|
994
850
|
});
|
|
995
|
-
const { title: title, modified: modified,
|
|
996
|
-
const location = (0, $hgUW1$useLocation)();
|
|
851
|
+
const { title: title, modified: modified, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
|
|
997
852
|
let linkContainerClasses = 'ds-u-margin-bottom--2';
|
|
998
853
|
if (dataDictionaryLinks) linkContainerClasses += ' ds-l-col--6 ds-u-padding-right--0';
|
|
999
854
|
else linkContainerClasses += ' ds-l-col--auto ds-u-padding-left--0';
|
|
@@ -1002,1312 +857,462 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1002
857
|
linkContainerClasses = 'ds-u-padding-x--0';
|
|
1003
858
|
linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
|
|
1004
859
|
}
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
const title = topic || 'Unknown Topic';
|
|
1010
|
-
const prefix = 'topics';
|
|
1011
|
-
// Use the provided slug or fallback to a simple slug generation
|
|
1012
|
-
const slug = topicSlugs?.[title];
|
|
1013
|
-
const link = `/${prefix}/${slug}`;
|
|
1014
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1015
|
-
className: "ds-u-fill--primary ds-u-radius--pill",
|
|
1016
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1017
|
-
to: link,
|
|
1018
|
-
state: {
|
|
1019
|
-
fromUrl: location.pathname,
|
|
1020
|
-
fromTitle: false,
|
|
1021
|
-
fromSearchList: location.pathname.includes('search')
|
|
1022
|
-
},
|
|
1023
|
-
children: title
|
|
1024
|
-
})
|
|
1025
|
-
}, `dist-${title}-${index}`);
|
|
1026
|
-
})
|
|
1027
|
-
});
|
|
1028
|
-
const date = {
|
|
1029
|
-
modified: modified,
|
|
1030
|
-
released: released,
|
|
1031
|
-
refresh: refresh
|
|
1032
|
-
};
|
|
1033
|
-
const url = `/dataset/${identifier}`;
|
|
1034
|
-
const DataTableLink = ()=>{
|
|
1035
|
-
if ((0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv") return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1036
|
-
to: `${url}#data-table`,
|
|
1037
|
-
children: [
|
|
1038
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1039
|
-
id: "data-table"
|
|
1040
|
-
}),
|
|
1041
|
-
"Data Table"
|
|
1042
|
-
]
|
|
1043
|
-
});
|
|
1044
|
-
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
|
|
1045
|
-
className: "dkan-disabled-link",
|
|
1046
|
-
component: "a",
|
|
1047
|
-
offset: [
|
|
1048
|
-
0,
|
|
1049
|
-
5
|
|
1050
|
-
],
|
|
1051
|
-
title: "There is no Data Table associated with this dataset. Data Tables will only display for CSV files.",
|
|
1052
|
-
children: [
|
|
1053
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1054
|
-
id: "data-table"
|
|
1055
|
-
}),
|
|
1056
|
-
"Data Table"
|
|
1057
|
-
]
|
|
1058
|
-
});
|
|
1059
|
-
};
|
|
1060
|
-
const dataDictionaryExists = ()=>{
|
|
1061
|
-
if (distribution && "data" in distribution) {
|
|
1062
|
-
if ("describedBy" in distribution.data && "describedByType" in distribution.data) {
|
|
1063
|
-
const types = [
|
|
1064
|
-
'application/vnd.tableschema+json',
|
|
1065
|
-
'application/pdf'
|
|
1066
|
-
];
|
|
1067
|
-
const isValidType = types.includes(distribution.data.describedByType);
|
|
1068
|
-
return isValidType;
|
|
1069
|
-
}
|
|
1070
|
-
}
|
|
1071
|
-
return false;
|
|
1072
|
-
};
|
|
1073
|
-
const DataDictionaryLink = ()=>{
|
|
1074
|
-
if (dataDictionaryExists()) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1075
|
-
to: `${url}#data-dictionary`,
|
|
1076
|
-
children: [
|
|
1077
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1078
|
-
id: "data-dictionary"
|
|
1079
|
-
}),
|
|
1080
|
-
"Data Dictionary"
|
|
1081
|
-
]
|
|
1082
|
-
});
|
|
1083
|
-
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
|
|
1084
|
-
className: "dkan-disabled-link",
|
|
1085
|
-
component: "a",
|
|
1086
|
-
offset: [
|
|
1087
|
-
0,
|
|
1088
|
-
5
|
|
1089
|
-
],
|
|
1090
|
-
title: "There is no Data Dictionary associated with this dataset.",
|
|
1091
|
-
children: [
|
|
1092
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1093
|
-
id: "data-dictionary"
|
|
1094
|
-
}),
|
|
1095
|
-
"Data Dictionary"
|
|
1096
|
-
]
|
|
1097
|
-
});
|
|
1098
|
-
};
|
|
1099
|
-
const dateOptions = updateDateMonthYearOnly ? {
|
|
1100
|
-
year: 'numeric',
|
|
1101
|
-
month: 'long',
|
|
1102
|
-
day: undefined,
|
|
1103
|
-
timeZone: 'UTC'
|
|
1104
|
-
} : undefined;
|
|
1105
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1106
|
-
className: "dc-c-search-list-item ds-u-padding-top--3",
|
|
1107
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1108
|
-
className: `dc-c-searchlist-item ${paginationEnabled ? 'ds-u-border-top--1' : 'ds-u-border-bottom--1 ds-u-padding-bottom--3'}`,
|
|
860
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
861
|
+
className: "dc-c-list-item ds-u-padding-top--4",
|
|
862
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
863
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? 'ds-u-border-top--1' : 'ds-u-border-bottom--1 ds-u-padding-bottom--3'}`,
|
|
1109
864
|
children: [
|
|
1110
865
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1111
866
|
className: "ds-l-row ds-u-align-items--start",
|
|
1112
867
|
children: [
|
|
1113
|
-
|
|
868
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1114
869
|
id: `dataset-${identifier}-updated-date`,
|
|
1115
|
-
className: `ds-l-col--12 ds-u-text-align--
|
|
870
|
+
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'}`,
|
|
1116
871
|
children: [
|
|
1117
|
-
|
|
1118
|
-
children: "Updated:"
|
|
1119
|
-
}),
|
|
1120
|
-
" ",
|
|
872
|
+
"Updated ",
|
|
1121
873
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $727b038175bac6f5$export$2e2bcd8739ae039), {
|
|
1122
|
-
date: modified
|
|
1123
|
-
options: dateOptions
|
|
874
|
+
date: modified
|
|
1124
875
|
})
|
|
1125
876
|
]
|
|
1126
877
|
}),
|
|
1127
878
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
1128
|
-
className:
|
|
1129
|
-
children:
|
|
1130
|
-
|
|
1131
|
-
to: `${url}`,
|
|
1132
|
-
children: title
|
|
1133
|
-
})
|
|
1134
|
-
}),
|
|
1135
|
-
themes
|
|
879
|
+
className: "ds-l-col--12 ds-text-heading--2xl",
|
|
880
|
+
children: title
|
|
881
|
+
})
|
|
1136
882
|
]
|
|
1137
883
|
}),
|
|
1138
|
-
|
|
884
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1139
885
|
className: "ds-l-row",
|
|
1140
886
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1141
887
|
className: "ds-l-col--12 ds-l-md-col--12 ds-u-margin-top--2",
|
|
1142
888
|
children: [
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
' ',
|
|
1147
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1148
|
-
to: `/dataset/${identifier}`,
|
|
1149
|
-
children: "See more"
|
|
1150
|
-
})
|
|
1151
|
-
]
|
|
1152
|
-
}) : ''
|
|
889
|
+
"The ",
|
|
890
|
+
title,
|
|
891
|
+
" dataset was updated."
|
|
1153
892
|
]
|
|
1154
893
|
})
|
|
1155
894
|
}),
|
|
1156
|
-
|
|
1157
|
-
className: "
|
|
1158
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)(
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
895
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
896
|
+
className: "ds-l-row",
|
|
897
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
898
|
+
className: "ds-l-col--12",
|
|
899
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
900
|
+
"aria-describedby": `dataset-${identifier}-updated-date`,
|
|
901
|
+
to: `/dataset/${identifier}`,
|
|
902
|
+
children: [
|
|
903
|
+
"View the Dataset for ",
|
|
904
|
+
title,
|
|
905
|
+
" "
|
|
906
|
+
]
|
|
1168
907
|
})
|
|
1169
|
-
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
1170
|
-
href: downloadUrl,
|
|
1171
|
-
variation: "solid",
|
|
1172
|
-
className: "ds-l-col--12 ds-l-md-col--auto",
|
|
1173
|
-
children: [
|
|
1174
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1175
|
-
id: "download"
|
|
1176
|
-
}),
|
|
1177
|
-
"Download"
|
|
1178
|
-
]
|
|
1179
908
|
})
|
|
1180
|
-
}) : '',
|
|
1181
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("ul", {
|
|
1182
|
-
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' : ''}`,
|
|
1183
|
-
children: [
|
|
1184
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1185
|
-
className: linkContainerClasses,
|
|
1186
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1187
|
-
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? '' : ' dkan-disabled-link-wrapper'}`,
|
|
1188
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataTableLink, {})
|
|
1189
|
-
})
|
|
1190
|
-
}),
|
|
1191
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1192
|
-
className: linkContainerClasses,
|
|
1193
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1194
|
-
className: linkClasses,
|
|
1195
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1196
|
-
to: `${url}#overview`,
|
|
1197
|
-
children: [
|
|
1198
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1199
|
-
id: "overview"
|
|
1200
|
-
}),
|
|
1201
|
-
"Overview"
|
|
1202
|
-
]
|
|
1203
|
-
})
|
|
1204
|
-
})
|
|
1205
|
-
}),
|
|
1206
|
-
dataDictionaryLinks ? /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1207
|
-
className: linkContainerClasses,
|
|
1208
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1209
|
-
className: `${linkClasses}${dataDictionaryExists() ? '' : ' dkan-disabled-link-wrapper'}`,
|
|
1210
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataDictionaryLink, {})
|
|
1211
|
-
})
|
|
1212
|
-
}) : '',
|
|
1213
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1214
|
-
className: linkContainerClasses,
|
|
1215
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1216
|
-
className: linkClasses,
|
|
1217
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1218
|
-
to: `${url}#api`,
|
|
1219
|
-
children: [
|
|
1220
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1221
|
-
id: "api"
|
|
1222
|
-
}),
|
|
1223
|
-
"API"
|
|
1224
|
-
]
|
|
1225
|
-
})
|
|
1226
|
-
})
|
|
1227
|
-
})
|
|
1228
|
-
]
|
|
1229
909
|
})
|
|
1230
910
|
]
|
|
1231
911
|
})
|
|
1232
912
|
});
|
|
1233
913
|
};
|
|
1234
|
-
var $
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
914
|
+
var $c068004d499082cc$export$2e2bcd8739ae039 = $c068004d499082cc$var$DatasetListItem;
|
|
1240
915
|
|
|
1241
|
-
const $e011250e8a3bd5e5$var$SearchFacets = (props)=>{
|
|
1242
|
-
const { facets: facets, title: title, onClickFunction: onClickFunction, selectedFacets: selectedFacets = [] } = props;
|
|
1243
|
-
const filteredFacets = facets.filter((f)=>{
|
|
1244
|
-
return Number(f.total) > 0 || selectedFacets.findIndex((i)=>i === f.name) !== -1;
|
|
1245
|
-
});
|
|
1246
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1247
|
-
className: "dkan-dataset-search--facet-container ds-u-margin-bottom--4",
|
|
1248
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
|
|
1249
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
1250
|
-
contentClassName: "ds-u-padding-left--1 ds-u-padding-right--0",
|
|
1251
|
-
heading: title,
|
|
1252
|
-
defaultOpen: true,
|
|
1253
|
-
children: !filteredFacets.length ? /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1254
|
-
className: "ds-text-heading--md",
|
|
1255
|
-
children: "No matching facets found."
|
|
1256
|
-
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
1257
|
-
children: filteredFacets.map((f)=>{
|
|
1258
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1259
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Choice), {
|
|
1260
|
-
className: "ds-u-margin-y--1",
|
|
1261
|
-
checked: selectedFacets.findIndex((s)=>s === f.name) > -1 ? true : false,
|
|
1262
|
-
name: `facet_theme_${f.name}`,
|
|
1263
|
-
type: "checkbox",
|
|
1264
|
-
label: `${f.name} (${f.total})`,
|
|
1265
|
-
value: f.name,
|
|
1266
|
-
onClick: ()=>onClickFunction(f.type, f.name)
|
|
1267
|
-
})
|
|
1268
|
-
}, f.name);
|
|
1269
|
-
})
|
|
1270
|
-
})
|
|
1271
|
-
})
|
|
1272
|
-
})
|
|
1273
|
-
});
|
|
1274
|
-
};
|
|
1275
|
-
var $e011250e8a3bd5e5$export$2e2bcd8739ae039 = $e011250e8a3bd5e5$var$SearchFacets;
|
|
1276
916
|
|
|
1277
917
|
|
|
1278
918
|
|
|
1279
919
|
|
|
1280
|
-
const $3b2d31a9c6cd2284$var$LargeFileInfo = (props)=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1281
|
-
className: props.className,
|
|
1282
|
-
children: [
|
|
1283
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1284
|
-
children: "Some datasets contain very large files and, depending on your network characteristics and software, may take a long time to download or fail to download. Additionally, the number of rows in the file may be larger than the maximum rows your version of Microsoft Excel supports. If you can't download the file, we recommend engaging your IT support staff. If you are able to download the file but are unable to open it in MS Excel or get a message that the data has been truncated, we recommend trying alternative programs such as MS Access, Universal Viewer, Editpad or any other software your organization has available for large datasets."
|
|
1285
|
-
}),
|
|
1286
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1287
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1288
|
-
to: "/about/software-specs-and-limits",
|
|
1289
|
-
children: "Click here to learn more about software specifications and limits."
|
|
1290
|
-
})
|
|
1291
|
-
})
|
|
1292
|
-
]
|
|
1293
|
-
});
|
|
1294
|
-
var $3b2d31a9c6cd2284$export$2e2bcd8739ae039 = $3b2d31a9c6cd2284$var$LargeFileInfo;
|
|
1295
920
|
|
|
1296
921
|
|
|
1297
922
|
|
|
1298
923
|
|
|
1299
924
|
|
|
1300
925
|
|
|
1301
|
-
const $
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
926
|
+
const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
927
|
+
switch(props.id){
|
|
928
|
+
case 'overview':
|
|
929
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
930
|
+
width: "16px",
|
|
931
|
+
height: "16px",
|
|
932
|
+
viewBox: "0 0 16 16",
|
|
933
|
+
version: "1.1",
|
|
934
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
935
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
936
|
+
"aria-hidden": "true",
|
|
937
|
+
children: [
|
|
938
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
939
|
+
children: "Overview Icon"
|
|
940
|
+
}),
|
|
941
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
942
|
+
stroke: "none",
|
|
943
|
+
strokeWidth: "1",
|
|
944
|
+
fillRule: "evenodd",
|
|
945
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
946
|
+
transform: "translate(0.000000, -4.000000)",
|
|
947
|
+
fillRule: "nonzero",
|
|
948
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
949
|
+
transform: "translate(0.000000, -1.000000)",
|
|
950
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("g", {
|
|
951
|
+
transform: "translate(0.000000, 5.000000)",
|
|
952
|
+
children: [
|
|
953
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
954
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
955
|
+
d: "M9.55610973,15.6404494 C9.31670823,15.8801498 9.02743142,16 8.6882793,16 C8.34912718,16 8.05985037,15.8801498 7.82044888,15.6404494 L0.33915212,8.14981273 C0.206151288,8.01664586 0.116375727,7.87682064 0.0698254364,7.73033708 C0.0232751455,7.58385352 0,7.43071161 0,7.27091136 L0,1.19850187 C0,0.852267998 0.113050707,0.565959218 0.33915212,0.339575531 C0.565253533,0.113191844 0.85120532,0 1.19700748,0 L7.26184539,0 C7.42144638,0 7.58104738,0.0233042031 7.74064838,0.0699126092 C7.90024938,0.116521015 8.04655029,0.206408656 8.17955112,0.339575531 L15.6209476,7.79026217 C15.8736492,8.04327923 16,8.33957553 16,8.67915106 C16,9.01872659 15.8736492,9.31502289 15.6209476,9.56803995 L9.55610973,15.6404494 Z M8.75953079,15 L15,8.75953079 L7.24046921,1 L1,1 L1,7.24046921 L8.75953079,15 Z M3,4 C3.26923077,4 3.50320513,3.90064103 3.70192308,3.70192308 C3.90064103,3.50320513 4,3.26923077 4,3 C4,2.73076923 3.90064103,2.49679487 3.70192308,2.29807692 C3.50320513,2.09935897 3.26923077,2 3,2 C2.73076923,2 2.49679487,2.09935897 2.29807692,2.29807692 C2.09935897,2.49679487 2,2.73076923 2,3 C2,3.26923077 2.09935897,3.50320513 2.29807692,3.70192308 C2.49679487,3.90064103 2.73076923,4 3,4 L3,4 Z"
|
|
956
|
+
})
|
|
957
|
+
}),
|
|
958
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
959
|
+
transform: "translate(7.890470, 8.890470) rotate(45.000000) translate(-7.890470, -8.890470) translate(3.543164, 6.321607)",
|
|
960
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
961
|
+
d: "M6.16557222,4.98656515 C6.09634145,5.05213515 6.01557222,5.08309876 5.92326452,5.07945598 C5.83095683,5.07581321 5.7501876,5.04120682 5.68095683,4.97563682 C5.61172606,4.91006682 5.57711068,4.8317471 5.57711068,4.74067766 C5.57711068,4.64960821 5.61172606,4.57128849 5.68095683,4.50571849 L7.72326452,2.57140353 L5.69249529,0.648016895 C5.62326452,0.582446896 5.59057222,0.504127176 5.59441837,0.413057733 C5.59826452,0.32198829 5.63480299,0.243668569 5.70403375,0.17809857 C5.77326452,0.112528571 5.85595683,0.0797435719 5.95211068,0.0797435719 C6.04826452,0.0797435719 6.13095683,0.112528571 6.2001876,0.17809857 L8.47326452,2.34190853 C8.54249529,2.40747853 8.57711068,2.48397686 8.57711068,2.57140353 C8.57711068,2.65883019 8.54249529,2.73532853 8.47326452,2.80089852 L6.16557222,4.98656515 Z M2.29670341,4.98413866 L0.0208413435,2.82877761 C-0.0481241737,2.7631321 -0.0826069324,2.68654566 -0.0826069324,2.59901831 C-0.0826069324,2.51149096 -0.0481241737,2.43490453 0.0208413435,2.36925901 L2.31969192,0.181075204 C2.38865744,0.115429689 2.47103291,0.0826069324 2.56681835,0.0826069324 C2.6626038,0.0826069324 2.74497927,0.115429689 2.81394479,0.181075204 C2.88291031,0.246720718 2.91739307,0.325130638 2.91739307,0.416304963 C2.91739307,0.507479288 2.88291031,0.585889208 2.81394479,0.651534722 L0.76796778,2.59901831 L2.79095629,4.52462006 C2.8599218,4.59026558 2.89440456,4.66685201 2.89440456,4.75437936 C2.89440456,4.84190671 2.8599218,4.91849315 2.79095629,4.98413866 C2.72199077,5.04978418 2.63961529,5.08260693 2.54382985,5.08260693 C2.44804441,5.08260693 2.36566893,5.04978418 2.29670341,4.98413866 L2.29670341,4.98413866 Z"
|
|
962
|
+
})
|
|
963
|
+
})
|
|
964
|
+
]
|
|
965
|
+
})
|
|
966
|
+
})
|
|
967
|
+
})
|
|
968
|
+
})
|
|
969
|
+
]
|
|
970
|
+
});
|
|
971
|
+
case 'data-table':
|
|
972
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
973
|
+
width: "16px",
|
|
974
|
+
height: "12px",
|
|
975
|
+
viewBox: "0 0 16 12",
|
|
976
|
+
version: "1.1",
|
|
977
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
978
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
979
|
+
"aria-hidden": "true",
|
|
980
|
+
children: [
|
|
981
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
982
|
+
children: "Data Table Icon"
|
|
983
|
+
}),
|
|
984
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
985
|
+
stroke: "none",
|
|
986
|
+
strokeWidth: "1",
|
|
987
|
+
fillRule: "evenodd",
|
|
988
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
989
|
+
transform: "translate(-132.000000, -6.000000)",
|
|
990
|
+
fillRule: "nonzero",
|
|
991
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
992
|
+
transform: "translate(132.000000, -1.000000)",
|
|
993
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
994
|
+
transform: "translate(8.000000, 13.000000) scale(1, -1) translate(-8.000000, -13.000000) translate(0.000000, 7.000000)",
|
|
995
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
996
|
+
d: "M0,12 L0,0 L16,0 L16,12 L0,12 Z M1,10 L5,10 L5,1 L1,1 L1,10 Z M6,10 L10,10 L10,1 L6,1 L6,10 Z M11,10 L15,10 L15,1 L11,1 L11,10 Z"
|
|
997
|
+
})
|
|
998
|
+
})
|
|
999
|
+
})
|
|
1000
|
+
})
|
|
1001
|
+
})
|
|
1002
|
+
]
|
|
1003
|
+
});
|
|
1004
|
+
case 'api':
|
|
1005
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1006
|
+
width: "16px",
|
|
1007
|
+
height: "13px",
|
|
1008
|
+
viewBox: "0 0 16 13",
|
|
1009
|
+
version: "1.1",
|
|
1010
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1011
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1012
|
+
"aria-hidden": "true",
|
|
1013
|
+
children: [
|
|
1014
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
1015
|
+
children: "API Icon"
|
|
1016
|
+
}),
|
|
1017
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
1018
|
+
stroke: "none",
|
|
1019
|
+
strokeWidth: "1",
|
|
1020
|
+
fillRule: "evenodd",
|
|
1021
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
1022
|
+
transform: "translate(-279.000000, -6.000000)",
|
|
1023
|
+
fillRule: "nonzero",
|
|
1024
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
1025
|
+
transform: "translate(279.000000, -1.000000)",
|
|
1026
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
1027
|
+
transform: "translate(0.000000, 7.000000)",
|
|
1028
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
1029
|
+
d: "M10.5806452,13 C10.4129032,13 10.2741935,12.9424479 10.1645161,12.8273438 C10.0548387,12.7122396 10,12.5666667 10,12.390625 C10,12.2145833 10.0548387,12.0690104 10.1645161,11.9539062 C10.2741935,11.8388021 10.4129032,11.78125 10.5806452,11.78125 L12.3225806,11.78125 C12.5935484,11.78125 12.8225806,11.6830729 13.0096774,11.4867188 C13.1967742,11.2903646 13.2903226,11.05 13.2903226,10.765625 L13.2903226,8.734375 C13.2903226,8.23333333 13.4354839,7.78645833 13.7258065,7.39375 C14.016129,7.00104167 14.3870968,6.73020833 14.8387097,6.58125 L14.8387097,6.41875 C14.3870968,6.28333333 14.016129,6.01588542 13.7258065,5.61640625 C13.4354839,5.21692708 13.2903226,4.76666667 13.2903226,4.265625 L13.2903226,2.234375 C13.2903226,1.95 13.1967742,1.70963542 13.0096774,1.51328125 C12.8225806,1.31692708 12.5935484,1.21875 12.3225806,1.21875 L10.5806452,1.21875 C10.4129032,1.21875 10.2741935,1.16119792 10.1645161,1.04609375 C10.0548387,0.930989583 10,0.785416667 10,0.609375 C10,0.433333333 10.0548387,0.287760417 10.1645161,0.17265625 C10.2741935,0.0575520833 10.4129032,8.8817842e-16 10.5806452,8.8817842e-16 L12.3225806,8.8817842e-16 C12.916129,8.8817842e-16 13.4193548,0.216666667 13.8322581,0.65 C14.2451613,1.08333333 14.4516129,1.61145833 14.4516129,2.234375 L14.4516129,4.265625 C14.4516129,4.55 14.5451613,4.79036458 14.7322581,4.98671875 C14.9193548,5.18307292 15.1483871,5.28125 15.4193548,5.28125 C15.5870968,5.28125 15.7258065,5.33880208 15.8354839,5.45390625 C15.9451613,5.56901042 16,5.71458333 16,5.890625 L16,7.109375 C16,7.271875 15.9451613,7.4140625 15.8354839,7.5359375 C15.7258065,7.6578125 15.5870968,7.71875 15.4193548,7.71875 C15.1483871,7.71875 14.9193548,7.81692708 14.7322581,8.01328125 C14.5451613,8.20963542 14.4516129,8.45 14.4516129,8.734375 L14.4516129,10.765625 C14.4516129,11.3885417 14.2451613,11.9166667 13.8322581,12.35 C13.4193548,12.7833333 12.916129,13 12.3225806,13 L10.5806452,13 Z M3.67741935,13 C3.08387097,13 2.58064516,12.7833333 2.16774194,12.35 C1.75483871,11.9166667 1.5483871,11.3885417 1.5483871,10.765625 L1.5483871,8.734375 C1.5483871,8.45 1.45483871,8.20963542 1.26774194,8.01328125 C1.08064516,7.81692708 0.851612903,7.71875 0.580645161,7.71875 C0.425806452,7.71875 0.290322581,7.6578125 0.174193548,7.5359375 C0.0580645161,7.4140625 3.52606833e-13,7.271875 3.52606833e-13,7.109375 L3.52606833e-13,5.890625 C3.52606833e-13,5.71458333 0.0580645161,5.56901042 0.174193548,5.45390625 C0.290322581,5.33880208 0.425806452,5.28125 0.580645161,5.28125 C0.851612903,5.28125 1.08064516,5.18307292 1.26774194,4.98671875 C1.45483871,4.79036458 1.5483871,4.55 1.5483871,4.265625 L1.5483871,2.234375 C1.5483871,1.61145833 1.75483871,1.08333333 2.16774194,0.65 C2.58064516,0.216666667 3.08387097,8.8817842e-16 3.67741935,8.8817842e-16 L5.41935484,8.8817842e-16 C5.58709677,8.8817842e-16 5.72580645,0.0575520833 5.83548387,0.17265625 C5.94516129,0.287760417 6,0.433333333 6,0.609375 C6,0.785416667 5.94516129,0.930989583 5.83548387,1.04609375 C5.72580645,1.16119792 5.58709677,1.21875 5.41935484,1.21875 L3.67741935,1.21875 C3.40645161,1.21875 3.17741935,1.31692708 2.99032258,1.51328125 C2.80322581,1.70963542 2.70967742,1.95 2.70967742,2.234375 L2.70967742,4.265625 C2.70967742,4.76666667 2.56451613,5.21692708 2.27419355,5.61640625 C1.98387097,6.01588542 1.61290323,6.28333333 1.16129032,6.41875 L1.16129032,6.58125 C1.61290323,6.73020833 1.98387097,7.00104167 2.27419355,7.39375 C2.56451613,7.78645833 2.70967742,8.23333333 2.70967742,8.734375 L2.70967742,10.765625 C2.70967742,11.05 2.80322581,11.2903646 2.99032258,11.4867188 C3.17741935,11.6830729 3.40645161,11.78125 3.67741935,11.78125 L5.41935484,11.78125 C5.58709677,11.78125 5.72580645,11.8388021 5.83548387,11.9539062 C5.94516129,12.0690104 6,12.2145833 6,12.390625 C6,12.5666667 5.94516129,12.7122396 5.83548387,12.8273438 C5.72580645,12.9424479 5.58709677,13 5.41935484,13 L3.67741935,13 Z"
|
|
1030
|
+
})
|
|
1031
|
+
})
|
|
1032
|
+
})
|
|
1033
|
+
})
|
|
1034
|
+
})
|
|
1035
|
+
]
|
|
1036
|
+
});
|
|
1037
|
+
case 'download':
|
|
1038
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1039
|
+
width: "16px",
|
|
1040
|
+
height: "16px",
|
|
1041
|
+
viewBox: "0 0 16 16",
|
|
1042
|
+
version: "1.1",
|
|
1043
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1044
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1045
|
+
"aria-hidden": "true",
|
|
1046
|
+
children: [
|
|
1047
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
1048
|
+
children: "Download Icon"
|
|
1049
|
+
}),
|
|
1050
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
1051
|
+
stroke: "none",
|
|
1052
|
+
strokeWidth: "1",
|
|
1053
|
+
fillRule: "evenodd",
|
|
1054
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
1055
|
+
transform: "translate(-370.000000, -4.000000)",
|
|
1056
|
+
fillRule: "nonzero",
|
|
1057
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
1058
|
+
transform: "translate(370.000000, -1.000000)",
|
|
1059
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
1060
|
+
d: "M9,6 C9,5.446875 8.553125,5 8,5 C7.446875,5 7,5.446875 7,6 L7,13.584375 L4.70625,11.290625 C4.315625,10.9 3.68125,10.9 3.290625,11.290625 C2.9,11.68125 2.9,12.315625 3.290625,12.70625 L7.290625,16.70625 C7.68125,17.096875 8.315625,17.096875 8.70625,16.70625 L12.70625,12.70625 C13.096875,12.315625 13.096875,11.68125 12.70625,11.290625 C12.315625,10.9 11.68125,10.9 11.290625,11.290625 L9,13.584375 L9,6 Z M2,16 C0.896875,16 0,16.896875 0,18 L0,19 C0,20.103125 0.896875,21 2,21 L14,21 C15.103125,21 16,20.103125 16,19 L16,18 C16,16.896875 15.103125,16 14,16 L10.828125,16 L9.4125,17.415625 C8.63125,18.196875 7.365625,18.196875 6.584375,17.415625 L5.171875,16 L2,16 Z M13.5,19.25 C13.084375,19.25 12.75,18.915625 12.75,18.5 C12.75,18.084375 13.084375,17.75 13.5,17.75 C13.915625,17.75 14.25,18.084375 14.25,18.5 C14.25,18.915625 13.915625,19.25 13.5,19.25 Z"
|
|
1061
|
+
})
|
|
1062
|
+
})
|
|
1063
|
+
})
|
|
1064
|
+
})
|
|
1065
|
+
]
|
|
1066
|
+
});
|
|
1067
|
+
case 'data-dictionary':
|
|
1068
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1069
|
+
width: "14px",
|
|
1070
|
+
height: "16px",
|
|
1071
|
+
viewBox: "0 0 14 16",
|
|
1072
|
+
version: "1.1",
|
|
1073
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1074
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1075
|
+
"aria-hidden": "true",
|
|
1076
|
+
children: [
|
|
1077
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
1078
|
+
children: "Data Dictionary Icon"
|
|
1079
|
+
}),
|
|
1080
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
1081
|
+
id: "Dev-Handoff",
|
|
1082
|
+
stroke: "none",
|
|
1083
|
+
strokeWidth: "1",
|
|
1084
|
+
fillRule: "evenodd",
|
|
1085
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("g", {
|
|
1086
|
+
id: "Group-15",
|
|
1087
|
+
transform: "translate(0, 0)",
|
|
1088
|
+
fillRule: "nonzero",
|
|
1089
|
+
children: [
|
|
1090
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
1091
|
+
d: "M0.0218026938,8.0971396 C0.0218026938,6.24591342 -0.0192244811,4.39368657 0.0358119731,2.54446171 C0.0728364968,1.28162525 1.07950328,0.231929969 2.34434106,0.0678212692 C2.69057039,0.022791443 3.04180304,0.00477951255 3.39003369,0.00477951255 C6.28395052,-0.000223801472 9.17786735,-0.00322578988 12.0717842,0.00578017535 C12.6811878,0.00778150096 13.2435603,0.169888875 13.6428248,0.683228893 C13.9059991,1.02145292 13.9950581,1.42171804 13.9970594,1.83299045 C14.0050647,4.76793446 14.0080667,7.70287846 13.9950581,10.6378225 C13.9920561,11.280248 13.7689083,11.8466231 13.1875232,12.2078624 C13.0464297,12.2959207 12.992394,12.4099963 12.9953959,12.5811096 C13.0054026,13.1394795 13.0064032,13.69885 12.9953959,14.2572198 C12.9913933,14.4473458 13.0364231,14.5173922 13.2425597,14.5243968 C13.6178082,14.5364047 13.8979938,14.7765638 13.9720428,15.0987772 C14.0450912,15.4129854 13.9069998,15.7482074 13.6088022,15.9013088 C13.4827187,15.9663519 13.3226127,15.9933698 13.1775166,15.9933698 C9.62516362,15.9983731 6.07181,16.0053777 2.51945705,15.9933698 C1.09851587,15.9883665 0.0708351712,15.0207255 0.0268060079,13.5997844 C-0.0202251439,12.0507583 0.00979474021,10.4987303 0.00579208899,8.94770299 C0.00579208899,8.66451541 0.00579208899,8.38032718 0.00579208899,8.0971396 C0.010795403,8.0971396 0.015798717,8.0971396 0.0218026938,8.0971396 L0.0218026938,8.0971396 Z M1.49477834,11.1421565 C1.99510974,11.1071333 2.44740933,11.0490949 2.90070958,11.0480942 C5.91970926,11.0400889 8.93870894,11.0440916 11.9577086,11.0430909 C12.4020029,11.0430909 12.5280864,10.9200094 12.5280864,10.4837204 C12.5280864,7.66585394 12.5280864,4.84698682 12.5280864,2.02912036 C12.5280864,1.58382542 12.4430301,1.49976974 12.0057404,1.49976974 C9.7952763,1.49976974 7.58581283,1.49976974 5.37534869,1.49976974 C4.50777404,1.49976974 3.64019939,1.4927651 2.7736254,1.50277173 C2.01712432,1.51177769 1.47576575,2.0711482 1.47576575,2.82664862 C1.47576575,5.50342162 1.47576575,8.17919395 1.47576575,10.855967 C1.47576575,10.9610365 1.48877436,11.0661061 1.49377768,11.1421565 L1.49477834,11.1421565 Z M6.8923535,14.5153908 C8.3263033,14.5153908 9.7602531,14.5093869 11.1932022,14.5203941 C11.4393653,14.5223955 11.5334276,14.467359 11.5224203,14.2041847 C11.5014064,13.7388765 11.5044084,13.2705663 11.5224203,12.8042574 C11.5314263,12.5630977 11.4553759,12.4960533 11.2132155,12.4960533 C8.37933843,12.5040586 5.54446071,12.5010566 2.71058365,12.5020573 C2.5935061,12.5020573 2.47642855,12.4990553 2.36135233,12.5140652 C1.64988108,12.6031242 1.26662722,13.4186644 1.63387047,14.0360733 C1.86102093,14.4173259 2.22426152,14.5083862 2.61652134,14.5113882 C4.04146518,14.5203941 5.46740967,14.5153908 6.8923535,14.5153908 L6.8923535,14.5153908 Z",
|
|
1092
|
+
id: "Shape"
|
|
1093
|
+
}),
|
|
1094
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
1095
|
+
d: "M7.50976245,7.49574126 C6.62717786,7.49574126 5.7435926,7.49774259 4.86100801,7.49574126 C4.36167727,7.49373993 4.05747578,7.22956495 4.03045788,6.787272 C4.00243933,6.33597307 4.34366534,6.01476031 4.87101464,6.01275899 C5.95373179,6.00775567 7.03644895,6.01175832 8.1191661,6.01175832 C8.79361283,6.01175832 9.46805956,6.00675501 10.143507,6.01375965 C10.7519099,6.01976362 11.0981393,6.45305062 10.9360319,6.99140721 C10.8429703,7.30261334 10.55578,7.4947406 10.1585169,7.49674192 C9.2759323,7.50074457 8.39234705,7.49774259 7.50976245,7.49774259 L7.50976245,7.49574126 Z",
|
|
1096
|
+
id: "Path"
|
|
1097
|
+
}),
|
|
1098
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
1099
|
+
d: "M7.50776113,5.00108889 C6.61617057,5.00108889 5.72458001,5.0060922 4.83298945,4.99908757 C4.25360569,4.99508491 3.90237305,4.53177804 4.07248572,4.01643669 C4.1565414,3.76226834 4.33365871,3.61517091 4.5868264,3.55913379 C4.6999013,3.53411722 4.81797951,3.52611192 4.9340564,3.52611192 C6.6501931,3.52411059 8.36733048,3.52411059 10.0834672,3.52611192 C10.5577814,3.52611192 10.8299616,3.69022062 10.9340306,4.03044597 C11.090134,4.53778201 10.7439046,4.99408425 10.1825328,4.99908757 C9.29094224,5.00709287 8.39935169,5.00108889 7.50776113,5.00108889 L7.50776113,5.00108889 Z",
|
|
1100
|
+
id: "Path"
|
|
1101
|
+
})
|
|
1102
|
+
]
|
|
1103
|
+
})
|
|
1104
|
+
})
|
|
1105
|
+
]
|
|
1106
|
+
});
|
|
1107
|
+
default:
|
|
1108
|
+
return null;
|
|
1109
|
+
}
|
|
1110
|
+
};
|
|
1111
|
+
var $b38839fd67928f42$export$2e2bcd8739ae039 = $b38839fd67928f42$var$SearchItemIcon;
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
const $b61856b23f5f58a2$var$LargeFileDialog = (props)=>{
|
|
1115
|
+
const [modalOpen, setModalOpen] = (0, $hgUW1$useState)(false);
|
|
1116
|
+
const { downloadUrl: downloadUrl } = props;
|
|
1117
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1321
1118
|
children: [
|
|
1322
|
-
/*#__PURE__*/ (0, $hgUW1$
|
|
1323
|
-
|
|
1119
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
1120
|
+
variation: "solid",
|
|
1121
|
+
className: "ds-l-col--12 ds-l-md-col--auto",
|
|
1122
|
+
onClick: ()=>setModalOpen(true),
|
|
1123
|
+
children: [
|
|
1124
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1125
|
+
id: "download"
|
|
1126
|
+
}),
|
|
1127
|
+
"Download"
|
|
1128
|
+
]
|
|
1324
1129
|
}),
|
|
1325
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)(
|
|
1326
|
-
|
|
1130
|
+
modalOpen && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
|
|
1131
|
+
onExit: ()=>setModalOpen(false),
|
|
1132
|
+
isOpen: modalOpen,
|
|
1133
|
+
heading: "Notice: Large File Size",
|
|
1134
|
+
actions: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1135
|
+
children: [
|
|
1136
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
1137
|
+
href: downloadUrl,
|
|
1138
|
+
className: "ds-u-margin-right--2 ",
|
|
1139
|
+
variation: "solid",
|
|
1140
|
+
children: "Yes, download"
|
|
1141
|
+
}),
|
|
1142
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
1143
|
+
variation: "ghost",
|
|
1144
|
+
onClick: ()=>setModalOpen(false),
|
|
1145
|
+
children: "No, cancel"
|
|
1146
|
+
})
|
|
1147
|
+
]
|
|
1148
|
+
}),
|
|
1327
1149
|
children: [
|
|
1328
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("
|
|
1329
|
-
children:
|
|
1150
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1151
|
+
children: "This is a very large file and, depending on your network characteristics and software, may take a long time to download or fail to download. Additionally, the number of rows in the file may larger than the maximum rows your version of Microsoft Excel supports. If you can't download the file, we recommend engaging your IT support staff. If you are able to download the file but are unable to open it in MS Excel or get a message that the data has been truncated, we recommend trying alternative programs such as MS Access, Universal Viewer, Editpad or any other software your organization has available for large datasets."
|
|
1330
1152
|
}),
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
className: "fas fa-arrow-right"
|
|
1153
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1154
|
+
children: "Would you like to proceed?"
|
|
1334
1155
|
})
|
|
1335
1156
|
]
|
|
1336
1157
|
})
|
|
1337
1158
|
]
|
|
1338
1159
|
});
|
|
1339
1160
|
};
|
|
1340
|
-
var $
|
|
1161
|
+
var $b61856b23f5f58a2$export$2e2bcd8739ae039 = $b61856b23f5f58a2$var$LargeFileDialog;
|
|
1341
1162
|
|
|
1342
1163
|
|
|
1343
1164
|
|
|
1344
1165
|
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
className: "ds-u-margin-right--2",
|
|
1357
|
-
"data-testid": "profile-full-name",
|
|
1358
|
-
children: headerText
|
|
1359
|
-
})
|
|
1360
|
-
})
|
|
1361
|
-
})
|
|
1362
|
-
})
|
|
1166
|
+
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240) {
|
|
1170
|
+
if (!textString) return '';
|
|
1171
|
+
let cleanedText = textString;
|
|
1172
|
+
if (cleanedText.split('</p>').length > 1) cleanedText = cleanedText.split('</p>')[0];
|
|
1173
|
+
if (cleanedText.split('<br/>').length > 1) cleanedText = cleanedText.split('<br/>')[0];
|
|
1174
|
+
cleanedText = (0, $hgUW1$lodashtruncate)(cleanedText, {
|
|
1175
|
+
'length': textLength,
|
|
1176
|
+
'separator': ' '
|
|
1363
1177
|
});
|
|
1364
|
-
|
|
1365
|
-
|
|
1178
|
+
return (0, $hgUW1$dompurify).sanitize(cleanedText, {
|
|
1179
|
+
ALLOWED_TAGS: []
|
|
1180
|
+
});
|
|
1181
|
+
}
|
|
1366
1182
|
|
|
1367
1183
|
|
|
1368
1184
|
|
|
1369
1185
|
|
|
1370
1186
|
|
|
1371
1187
|
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
f
|
|
1382
|
-
];
|
|
1383
|
-
});
|
|
1384
|
-
// sort facets descending by int value, put non int last
|
|
1385
|
-
if (facetObj.keyword) facetObj.keyword.sort((a, b)=>{
|
|
1386
|
-
if (Number(a.name) && Number(b.name)) return Number(b.name) - Number(a.name);
|
|
1387
|
-
});
|
|
1388
|
-
return facetObj;
|
|
1389
|
-
}
|
|
1390
|
-
}
|
|
1391
|
-
function $eff7d34c30f5a0fc$export$60ec7cc1d341a524(searchParams, defaultSortOptions) {
|
|
1392
|
-
const params = (0, $hgUW1$qs).parse(searchParams, {
|
|
1393
|
-
ignoreQueryPrefix: true
|
|
1394
|
-
});
|
|
1395
|
-
let themes = params.theme;
|
|
1396
|
-
let keywords = params.keyword;
|
|
1397
|
-
return {
|
|
1398
|
-
page: params.page,
|
|
1399
|
-
sort: !params.sort ? defaultSortOptions.defaultSort : params.sort,
|
|
1400
|
-
sortOrder: !params.sortOrder ? defaultSortOptions.defaultOrder : params.sortOrder,
|
|
1401
|
-
fulltext: params.fulltext,
|
|
1402
|
-
selectedFacets: {
|
|
1403
|
-
theme: themes ? themes : [],
|
|
1404
|
-
keyword: keywords ? keywords : []
|
|
1405
|
-
}
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
|
|
1191
|
+
const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
1192
|
+
const { type: type, date: date, boldLabel: boldLabel = false, displayTooltips: displayTooltips = true } = props;
|
|
1193
|
+
const dateText = {
|
|
1194
|
+
modified: 'Last Modified',
|
|
1195
|
+
released: 'Released',
|
|
1196
|
+
refresh: 'Planned Update'
|
|
1406
1197
|
};
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1198
|
+
const tooltipContent = {
|
|
1199
|
+
modified: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1200
|
+
children: [
|
|
1201
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
|
|
1202
|
+
children: "Last Modified: "
|
|
1203
|
+
}),
|
|
1204
|
+
" The date the ",
|
|
1205
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
|
|
1206
|
+
"dataset was last updated."
|
|
1207
|
+
]
|
|
1208
|
+
}),
|
|
1209
|
+
released: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1210
|
+
children: [
|
|
1211
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
|
|
1212
|
+
children: "Released: "
|
|
1213
|
+
}),
|
|
1214
|
+
" The date the most ",
|
|
1215
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
|
|
1216
|
+
"recent dataset was made available",
|
|
1217
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
|
|
1218
|
+
"to the public."
|
|
1219
|
+
]
|
|
1220
|
+
}),
|
|
1221
|
+
refresh: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1222
|
+
children: [
|
|
1223
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
|
|
1224
|
+
children: "Planned Update:"
|
|
1225
|
+
}),
|
|
1226
|
+
" The date the ",
|
|
1227
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
|
|
1228
|
+
"dataset is scheduled to be updated."
|
|
1229
|
+
]
|
|
1230
|
+
})
|
|
1417
1231
|
};
|
|
1418
|
-
return
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
}
|
|
1232
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1233
|
+
className: "dataset-date-item ds-l-sm-col--auto ds-l-col--12 ds-u-padding--0",
|
|
1234
|
+
children: [
|
|
1235
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1236
|
+
className: `dataset-date-item-label ${boldLabel ? 'ds-u-font-weight--bold' : ''}`,
|
|
1237
|
+
children: [
|
|
1238
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1239
|
+
children: dateText[type]
|
|
1240
|
+
}),
|
|
1241
|
+
": ",
|
|
1242
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $727b038175bac6f5$export$2e2bcd8739ae039), {
|
|
1243
|
+
date: date
|
|
1244
|
+
})
|
|
1245
|
+
]
|
|
1246
|
+
}),
|
|
1247
|
+
displayTooltips === true && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Tooltip), {
|
|
1248
|
+
"aria-label": dateText[type],
|
|
1249
|
+
className: "ds-c-tooltip__trigger-icon ds-u-display--inline ds-u-padding-left--0 ds-uw-padding-right--0 ds-u-font-weight--normal",
|
|
1250
|
+
title: tooltipContent[type],
|
|
1251
|
+
placement: "top",
|
|
1252
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
|
|
1253
|
+
})
|
|
1254
|
+
]
|
|
1255
|
+
});
|
|
1256
|
+
};
|
|
1257
|
+
var $17711e94d2ce0ee4$export$2e2bcd8739ae039 = $17711e94d2ce0ee4$var$DatasetDateItem;
|
|
1423
1258
|
|
|
1424
1259
|
|
|
1425
1260
|
|
|
1261
|
+
const $20de4fedf33d4f9a$var$DatasetDate = (props)=>{
|
|
1262
|
+
const { date: date, modifiedBoldLabel: modifiedBoldLabel = false, releasedBoldLabel: releasedBoldLabel = false, refreshBoldLabel: refreshBoldLabel = false, displayTooltips: displayTooltips = true } = props;
|
|
1263
|
+
// Create an array of date items to render
|
|
1264
|
+
const dateItems = [];
|
|
1265
|
+
Object.entries(date).forEach(([key, value])=>{
|
|
1266
|
+
if (value) {
|
|
1267
|
+
const bold = key === "modified" && modifiedBoldLabel || key === "released" && releasedBoldLabel || key === "refresh" && refreshBoldLabel;
|
|
1268
|
+
dateItems.push(/*#__PURE__*/ (0, $hgUW1$jsx)((0, $17711e94d2ce0ee4$export$2e2bcd8739ae039), {
|
|
1269
|
+
type: key,
|
|
1270
|
+
displayTooltips: displayTooltips,
|
|
1271
|
+
date: value,
|
|
1272
|
+
boldLabel: bold
|
|
1273
|
+
}, key));
|
|
1274
|
+
}
|
|
1275
|
+
});
|
|
1276
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1277
|
+
className: "dataset-date ds-u-display--flex ds-u-flex-wrap--wrap ds-u-font-size--sm ds-u-align-items--start",
|
|
1278
|
+
children: dateItems.map((item, index)=>/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$react).Fragment, {
|
|
1279
|
+
children: [
|
|
1280
|
+
item,
|
|
1281
|
+
index < dateItems.length - 1 && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1282
|
+
className: "bullet-point",
|
|
1283
|
+
children: "\u2022"
|
|
1284
|
+
})
|
|
1285
|
+
]
|
|
1286
|
+
}, index))
|
|
1287
|
+
});
|
|
1288
|
+
};
|
|
1289
|
+
var $20de4fedf33d4f9a$export$2e2bcd8739ae039 = $20de4fedf33d4f9a$var$DatasetDate;
|
|
1426
1290
|
|
|
1427
1291
|
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
label: 'Title A-Z',
|
|
1442
|
-
value: 'titleAZ'
|
|
1443
|
-
},
|
|
1444
|
-
{
|
|
1445
|
-
label: 'Title Z-A',
|
|
1446
|
-
value: 'titleZA'
|
|
1292
|
+
function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
1293
|
+
if (dist && dist.data) {
|
|
1294
|
+
if (dist.data.format) return dist.data.format.toLowerCase();
|
|
1295
|
+
if (dist.data.mediaType) {
|
|
1296
|
+
const mediaType = dist.data.mediaType.split('/');
|
|
1297
|
+
if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
|
|
1298
|
+
}
|
|
1299
|
+
if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
|
|
1300
|
+
if (dist.data["%Ref:downloadURL"][0].data.mimeType) {
|
|
1301
|
+
const mimeType = dist.data["%Ref:downloadURL"][0].data.mimeType.split("/");
|
|
1302
|
+
if (mimeType.length && mimeType[1]) return mimeType[1].toLowerCase();
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1447
1305
|
}
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
1451
|
-
defaultSort: 'modified',
|
|
1452
|
-
defaultOrder: 'desc'
|
|
1453
|
-
}, pageTitle: pageTitle = 'Dataset Explorer', categoriesTitle: categoriesTitle = 'Categories', filterTitle: filterTitle = 'Tags', showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = '', showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false, showDateDetails: showDateDetails = false, updateDateMonthYearOnly: updateDateMonthYearOnly = false, showTopics: showTopics = false, topicSlugFunction: topicSlugFunction, children: children } = props;
|
|
1454
|
-
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
1455
|
-
const [searchParams] = (0, $hgUW1$useSearchParams)();
|
|
1456
|
-
const navigate = (0, $hgUW1$useNavigate)();
|
|
1457
|
-
// Derive all search state from URL params
|
|
1458
|
-
const selectedFacets = (0, $hgUW1$useMemo)(()=>{
|
|
1459
|
-
const parsed = (0, $hgUW1$qs).parse(searchParams.toString());
|
|
1460
|
-
const toArray = (val)=>{
|
|
1461
|
-
if (Array.isArray(val)) return val.filter((v)=>typeof v === 'string');
|
|
1462
|
-
if (typeof val === 'string') return [
|
|
1463
|
-
val
|
|
1464
|
-
];
|
|
1465
|
-
return [];
|
|
1466
|
-
};
|
|
1467
|
-
return {
|
|
1468
|
-
theme: toArray(parsed.theme),
|
|
1469
|
-
keyword: toArray(parsed.keyword)
|
|
1470
|
-
};
|
|
1471
|
-
}, [
|
|
1472
|
-
searchParams
|
|
1473
|
-
]);
|
|
1474
|
-
const page = Number(searchParams.get('page')) || 1;
|
|
1475
|
-
const sort = searchParams.get('sort') || defaultSort.defaultSort;
|
|
1476
|
-
const sortOrder = searchParams.get('sortOrder') || defaultSort.defaultOrder;
|
|
1477
|
-
const fulltext = searchParams.get('fulltext') || '';
|
|
1478
|
-
const sortDisplay = sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
|
|
1479
|
-
// Local UI state only
|
|
1480
|
-
const [filterText, setFilterText] = (0, $hgUW1$useState)(fulltext);
|
|
1481
|
-
const [invalidSearch, setInvalidSearch] = (0, $hgUW1$useState)(false);
|
|
1482
|
-
// Sync filterText from URL on back/forward
|
|
1483
|
-
(0, $hgUW1$useEffect)(()=>{
|
|
1484
|
-
setFilterText(fulltext);
|
|
1485
|
-
}, [
|
|
1486
|
-
fulltext
|
|
1487
|
-
]);
|
|
1488
|
-
function buildNextQueryString(overrides) {
|
|
1489
|
-
const current = (0, $hgUW1$qs).parse(searchParams.toString());
|
|
1490
|
-
const merged = {
|
|
1491
|
-
...current
|
|
1492
|
-
};
|
|
1493
|
-
Object.entries(overrides).forEach(([key, value])=>{
|
|
1494
|
-
if (value === null) delete merged[key];
|
|
1495
|
-
else merged[key] = value;
|
|
1496
|
-
});
|
|
1497
|
-
return (0, $hgUW1$qs).stringify(merged, {
|
|
1498
|
-
arrayFormat: 'indices',
|
|
1499
|
-
encode: true
|
|
1500
|
-
});
|
|
1501
|
-
}
|
|
1502
|
-
function updateSelectedFacets(key, value) {
|
|
1503
|
-
const current = selectedFacets[key] || [];
|
|
1504
|
-
const idx = current.indexOf(value);
|
|
1505
|
-
const updated = idx > -1 ? current.filter((_, i)=>i !== idx) : [
|
|
1506
|
-
...current,
|
|
1507
|
-
value
|
|
1508
|
-
];
|
|
1509
|
-
navigate({
|
|
1510
|
-
search: buildNextQueryString({
|
|
1511
|
-
[key]: updated.length ? updated : null,
|
|
1512
|
-
page: null
|
|
1513
|
-
})
|
|
1514
|
-
});
|
|
1515
|
-
}
|
|
1516
|
-
const setSortOptionsHandler = (value)=>{
|
|
1517
|
-
let nextSort;
|
|
1518
|
-
let nextSortOrder;
|
|
1519
|
-
switch(value){
|
|
1520
|
-
case 'newest':
|
|
1521
|
-
nextSort = 'modified';
|
|
1522
|
-
nextSortOrder = 'desc';
|
|
1523
|
-
break;
|
|
1524
|
-
case 'oldest':
|
|
1525
|
-
nextSort = 'modified';
|
|
1526
|
-
nextSortOrder = 'asc';
|
|
1527
|
-
break;
|
|
1528
|
-
case 'titleAZ':
|
|
1529
|
-
nextSort = 'title';
|
|
1530
|
-
nextSortOrder = 'asc';
|
|
1531
|
-
break;
|
|
1532
|
-
case 'titleZA':
|
|
1533
|
-
nextSort = 'title';
|
|
1534
|
-
nextSortOrder = 'desc';
|
|
1535
|
-
break;
|
|
1536
|
-
default:
|
|
1537
|
-
return;
|
|
1538
|
-
}
|
|
1539
|
-
const overrides = {
|
|
1540
|
-
sort: nextSort === defaultSort.defaultSort ? null : nextSort,
|
|
1541
|
-
sortOrder: nextSortOrder === defaultSort.defaultOrder ? null : nextSortOrder
|
|
1542
|
-
};
|
|
1543
|
-
navigate({
|
|
1544
|
-
search: buildNextQueryString(overrides)
|
|
1545
|
-
});
|
|
1546
|
-
};
|
|
1547
|
-
function resetFilters() {
|
|
1548
|
-
setFilterText('');
|
|
1549
|
-
navigate({
|
|
1550
|
-
search: ''
|
|
1551
|
-
});
|
|
1552
|
-
}
|
|
1553
|
-
const pageSize = defaultPageSize;
|
|
1554
|
-
const params = {
|
|
1555
|
-
fulltext: fulltext ? fulltext : undefined,
|
|
1556
|
-
...selectedFacets,
|
|
1557
|
-
sort: sort ? sort : undefined,
|
|
1558
|
-
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
1559
|
-
page: page !== 1 ? page : undefined,
|
|
1560
|
-
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
1561
|
-
};
|
|
1562
|
-
const { data: data, isPending: isPending } = (0, $hgUW1$useQuery)({
|
|
1563
|
-
queryKey: [
|
|
1564
|
-
"datasets",
|
|
1565
|
-
params
|
|
1566
|
-
],
|
|
1567
|
-
queryFn: ()=>{
|
|
1568
|
-
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
1569
|
-
arrayFormat: 'comma',
|
|
1570
|
-
encode: false
|
|
1571
|
-
})}`);
|
|
1572
|
-
}
|
|
1573
|
-
});
|
|
1574
|
-
const totalItems = data?.data?.total ? Number(data.data.total) : 0;
|
|
1575
|
-
const facets = data && data.data.facets ? (0, $eff7d34c30f5a0fc$export$959638e8dca60ce6)(data.data.facets) : {
|
|
1576
|
-
theme: null,
|
|
1577
|
-
keyword: null
|
|
1578
|
-
};
|
|
1579
|
-
const currentResultNumbers = (0, $hgUW1$useMemo)(()=>{
|
|
1580
|
-
const baseNumber = totalItems > 0 ? 1 : 0;
|
|
1581
|
-
const startingNumber = baseNumber + (pageSize * page - pageSize);
|
|
1582
|
-
const endingNumber = pageSize * page;
|
|
1583
|
-
return {
|
|
1584
|
-
total: totalItems,
|
|
1585
|
-
startingNumber: totalItems >= startingNumber ? startingNumber : 0,
|
|
1586
|
-
endingNumber: totalItems < endingNumber ? totalItems : endingNumber
|
|
1587
|
-
};
|
|
1588
|
-
}, [
|
|
1589
|
-
totalItems,
|
|
1590
|
-
pageSize,
|
|
1591
|
-
page
|
|
1592
|
-
]);
|
|
1593
|
-
const noResults = totalItems <= 0 && !isPending && data?.data?.results !== undefined;
|
|
1594
|
-
const announcementText = (0, $hgUW1$useMemo)(()=>{
|
|
1595
|
-
if (noResults) return 'No results found.';
|
|
1596
|
-
if (!isPending && (!data || !data.data.results)) return 'Could not connect to the API.';
|
|
1597
|
-
return `Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`;
|
|
1598
|
-
}, [
|
|
1599
|
-
data,
|
|
1600
|
-
isPending,
|
|
1601
|
-
noResults,
|
|
1602
|
-
currentResultNumbers
|
|
1603
|
-
]);
|
|
1604
|
-
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1605
|
-
children: [
|
|
1606
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $5723016a5461c1ca$export$2e2bcd8739ae039), {
|
|
1607
|
-
headerText: pageTitle
|
|
1608
|
-
}),
|
|
1609
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("section", {
|
|
1610
|
-
className: "ds-l-container",
|
|
1611
|
-
children: [
|
|
1612
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1613
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1614
|
-
className: "ds-u-visibility--screen-reader",
|
|
1615
|
-
"aria-live": "assertive",
|
|
1616
|
-
"aria-atomic": "true",
|
|
1617
|
-
"data-testid": "currentResults",
|
|
1618
|
-
children: announcementText
|
|
1619
|
-
})
|
|
1620
|
-
}),
|
|
1621
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1622
|
-
className: "ds-l-row",
|
|
1623
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1624
|
-
className: "ds-l-col--12",
|
|
1625
|
-
children: [
|
|
1626
|
-
children,
|
|
1627
|
-
introText ? introText : null,
|
|
1628
|
-
showLargeFileWarning && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1629
|
-
className: "ds-l-row ds-u-margin-bottom--2 ds-u-margin-top--4",
|
|
1630
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1631
|
-
className: "ds-l-md-col--12",
|
|
1632
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
|
|
1633
|
-
bordered: true,
|
|
1634
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
1635
|
-
contentClassName: "downloading-datasets",
|
|
1636
|
-
heading: "Please read before downloading datasets",
|
|
1637
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b2d31a9c6cd2284$export$2e2bcd8739ae039), {})
|
|
1638
|
-
})
|
|
1639
|
-
})
|
|
1640
|
-
})
|
|
1641
|
-
}),
|
|
1642
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("form", {
|
|
1643
|
-
onSubmit: (e)=>{
|
|
1644
|
-
e.preventDefault();
|
|
1645
|
-
if (filterText) {
|
|
1646
|
-
if ($e873081a6e8f024e$export$1040147c129fdde9(filterText)) {
|
|
1647
|
-
setInvalidSearch(false);
|
|
1648
|
-
navigate({
|
|
1649
|
-
search: buildNextQueryString({
|
|
1650
|
-
fulltext: filterText,
|
|
1651
|
-
page: null
|
|
1652
|
-
})
|
|
1653
|
-
});
|
|
1654
|
-
} else setInvalidSearch(true);
|
|
1655
|
-
} else {
|
|
1656
|
-
setInvalidSearch(false);
|
|
1657
|
-
navigate({
|
|
1658
|
-
search: buildNextQueryString({
|
|
1659
|
-
fulltext: null,
|
|
1660
|
-
page: null
|
|
1661
|
-
})
|
|
1662
|
-
});
|
|
1663
|
-
}
|
|
1664
|
-
},
|
|
1665
|
-
className: "dkan-dataset-search ds-l-form-row ds-u-padding-bottom--4 ds-u-border-bottom--1",
|
|
1666
|
-
children: [
|
|
1667
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1668
|
-
className: "ds-c-field__before fas fa-search ds-u-display--none ds-u-sm-display--inline-block"
|
|
1669
|
-
}),
|
|
1670
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
1671
|
-
errorMessage: invalidSearch ? 'No special characters allowed. Please enter a valid search term.' : undefined,
|
|
1672
|
-
errorPlacement: "bottom",
|
|
1673
|
-
fieldClassName: "ds-u-margin--0",
|
|
1674
|
-
value: filterText,
|
|
1675
|
-
className: `ds-u-padding-right--2 ${altMobileSearchButton ? 'ds-l-col--12 ds-l-md-col--10 --alt-style' : 'ds-l-col--10'}`,
|
|
1676
|
-
label: "Search datasets",
|
|
1677
|
-
labelClassName: "ds-u-visibility--screen-reader",
|
|
1678
|
-
placeholder: "Search datasets",
|
|
1679
|
-
name: "dataset_fulltext_search",
|
|
1680
|
-
onChange: (e)=>{
|
|
1681
|
-
setInvalidSearch(false);
|
|
1682
|
-
setFilterText(e.target.value);
|
|
1683
|
-
}
|
|
1684
|
-
}),
|
|
1685
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $0a551147dc92a718$export$2e2bcd8739ae039), {
|
|
1686
|
-
altMobileStyle: altMobileSearchButton
|
|
1687
|
-
})
|
|
1688
|
-
]
|
|
1689
|
-
})
|
|
1690
|
-
]
|
|
1691
|
-
})
|
|
1692
|
-
}),
|
|
1693
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1694
|
-
className: "ds-l-row ds-u-padding-top--4",
|
|
1695
|
-
children: [
|
|
1696
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1697
|
-
className: "ds-l-col--12 ds-l-sm-col--4",
|
|
1698
|
-
children: [
|
|
1699
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
1700
|
-
className: "dc-dataset-search--clear-all-filters ds-u-margin-bottom--2",
|
|
1701
|
-
onClick: ()=>resetFilters(),
|
|
1702
|
-
children: "Clear all filters"
|
|
1703
|
-
}),
|
|
1704
|
-
facets.theme && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e011250e8a3bd5e5$export$2e2bcd8739ae039), {
|
|
1705
|
-
facets: facets.theme,
|
|
1706
|
-
title: categoriesTitle,
|
|
1707
|
-
onClickFunction: updateSelectedFacets,
|
|
1708
|
-
selectedFacets: selectedFacets.theme
|
|
1709
|
-
}),
|
|
1710
|
-
facets.keyword && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e011250e8a3bd5e5$export$2e2bcd8739ae039), {
|
|
1711
|
-
facets: facets.keyword,
|
|
1712
|
-
title: filterTitle,
|
|
1713
|
-
onClickFunction: updateSelectedFacets,
|
|
1714
|
-
selectedFacets: selectedFacets.keyword
|
|
1715
|
-
})
|
|
1716
|
-
]
|
|
1717
|
-
}),
|
|
1718
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1719
|
-
className: "ds-l-col--12 ds-l-sm-col--8",
|
|
1720
|
-
children: isPending ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
1721
|
-
className: "ds-u-valign--middle",
|
|
1722
|
-
"aria-valuetext": "Dataset Search loading",
|
|
1723
|
-
role: "status"
|
|
1724
|
-
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1725
|
-
children: [
|
|
1726
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1727
|
-
className: "ds-u-display--flex ds-u-justify-content--between ds-u-align-items--end ds-u-flex-wrap--reverse ds-u-sm-flex-wrap--wrap",
|
|
1728
|
-
children: [
|
|
1729
|
-
enablePagination && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1730
|
-
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--8 ds-u-sm-padding-left--0",
|
|
1731
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1732
|
-
className: "ds-u-margin-y--0",
|
|
1733
|
-
children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1734
|
-
children: [
|
|
1735
|
-
"Showing ",
|
|
1736
|
-
currentResultNumbers.startingNumber,
|
|
1737
|
-
" -",
|
|
1738
|
-
' ',
|
|
1739
|
-
currentResultNumbers.endingNumber,
|
|
1740
|
-
" of ",
|
|
1741
|
-
data.data.total,
|
|
1742
|
-
" datasets"
|
|
1743
|
-
]
|
|
1744
|
-
})
|
|
1745
|
-
})
|
|
1746
|
-
}),
|
|
1747
|
-
enableSort && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1748
|
-
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4 ds-u-sm-padding-right--0",
|
|
1749
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
1750
|
-
options: $e873081a6e8f024e$var$sortOptions,
|
|
1751
|
-
value: sortDisplay,
|
|
1752
|
-
label: "Sort",
|
|
1753
|
-
labelClassName: "ds-u-margin-top--0",
|
|
1754
|
-
name: "dataset_search_sort",
|
|
1755
|
-
onChange: (e)=>setSortOptionsHandler(e.target.value)
|
|
1756
|
-
})
|
|
1757
|
-
})
|
|
1758
|
-
]
|
|
1759
|
-
}),
|
|
1760
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
|
|
1761
|
-
className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0 ds-u-margin-bottom--4 ds-u-display--block",
|
|
1762
|
-
"data-testid": "results-list",
|
|
1763
|
-
children: [
|
|
1764
|
-
noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
1765
|
-
variation: "error",
|
|
1766
|
-
role: "region",
|
|
1767
|
-
heading: "No results found."
|
|
1768
|
-
}),
|
|
1769
|
-
data && data.data.results ? Object.values(data.data.results).map((item)=>{
|
|
1770
|
-
const downloadUrl = (()=>{
|
|
1771
|
-
const distribution_array = item.distribution ?? [];
|
|
1772
|
-
return distribution_array.length ? distribution_array[0].downloadURL : null;
|
|
1773
|
-
})();
|
|
1774
|
-
const showLargeFile = largeFileThemes && item.theme ? largeFileThemes.some((theme)=>item.theme.includes(theme)) : false;
|
|
1775
|
-
const dateDetailProps = showDateDetails ? {
|
|
1776
|
-
showDateDetails: showDateDetails,
|
|
1777
|
-
released: item.released,
|
|
1778
|
-
refresh: item.nextUpdateDate
|
|
1779
|
-
} : {};
|
|
1780
|
-
const topicProps = (()=>{
|
|
1781
|
-
if (!showTopics) return {};
|
|
1782
|
-
const topicSlugs = {};
|
|
1783
|
-
if (item.theme && Array.isArray(item.theme)) item.theme.forEach((topic)=>{
|
|
1784
|
-
if (topic) {
|
|
1785
|
-
const slug = topicSlugFunction ? topicSlugFunction(topic) : topic.split(' ').join('-').toLowerCase();
|
|
1786
|
-
if (slug) topicSlugs[topic] = slug;
|
|
1787
|
-
}
|
|
1788
|
-
});
|
|
1789
|
-
return {
|
|
1790
|
-
showTopics: showTopics,
|
|
1791
|
-
theme: item.theme,
|
|
1792
|
-
topicSlugs: topicSlugs
|
|
1793
|
-
};
|
|
1794
|
-
})();
|
|
1795
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $52c6454cae137465$export$2e2bcd8739ae039), {
|
|
1796
|
-
title: item.title,
|
|
1797
|
-
modified: item.modified,
|
|
1798
|
-
description: item.description,
|
|
1799
|
-
identifier: item.identifier,
|
|
1800
|
-
downloadUrl: showDownloadIcon ? downloadUrl : null,
|
|
1801
|
-
largeFile: showLargeFile,
|
|
1802
|
-
paginationEnabled: enablePagination,
|
|
1803
|
-
dataDictionaryLinks: dataDictionaryLinks,
|
|
1804
|
-
distribution: "%Ref:distribution" in item && item["%Ref:distribution"] ? item["%Ref:distribution"][0] : {},
|
|
1805
|
-
updateDateMonthYearOnly: updateDateMonthYearOnly,
|
|
1806
|
-
...dateDetailProps,
|
|
1807
|
-
...topicProps
|
|
1808
|
-
}, item.identifier);
|
|
1809
|
-
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
1810
|
-
variation: "error",
|
|
1811
|
-
role: "region",
|
|
1812
|
-
heading: "Could not connect to the API."
|
|
1813
|
-
})
|
|
1814
|
-
]
|
|
1815
|
-
}),
|
|
1816
|
-
enablePagination && data && data.data.total && Number(data.data.total) !== 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
1817
|
-
currentPage: Number(page),
|
|
1818
|
-
totalPages: Math.ceil(Number(data.data.total) / pageSize),
|
|
1819
|
-
onPageChange: (evt, page)=>{
|
|
1820
|
-
evt.preventDefault();
|
|
1821
|
-
window.scroll(0, 0);
|
|
1822
|
-
navigate({
|
|
1823
|
-
search: buildNextQueryString({
|
|
1824
|
-
page: page > 1 ? String(page) : null
|
|
1825
|
-
})
|
|
1826
|
-
});
|
|
1827
|
-
},
|
|
1828
|
-
renderHref: (p)=>{
|
|
1829
|
-
const nextQs = buildNextQueryString({
|
|
1830
|
-
page: p > 1 ? String(p) : null
|
|
1831
|
-
});
|
|
1832
|
-
return `/datasets?${nextQs}`;
|
|
1833
|
-
}
|
|
1834
|
-
})
|
|
1835
|
-
]
|
|
1836
|
-
})
|
|
1837
|
-
})
|
|
1838
|
-
]
|
|
1839
|
-
})
|
|
1840
|
-
]
|
|
1841
|
-
})
|
|
1842
|
-
]
|
|
1843
|
-
});
|
|
1844
|
-
};
|
|
1845
|
-
var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039)($e873081a6e8f024e$var$DatasetSearch);
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
|
|
1850
|
-
const { headingText: headingText = "Dataset Search" } = props;
|
|
1851
|
-
const navigate = (0, $hgUW1$useNavigate)();
|
|
1852
|
-
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)('');
|
|
1853
|
-
const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
|
|
1854
|
-
const [invalidSearch, setInvalidSearch] = (0, $hgUW1$useState)(false);
|
|
1855
|
-
function searchForDataset(e) {
|
|
1856
|
-
e.preventDefault();
|
|
1857
|
-
if (window) {
|
|
1858
|
-
if ((0, $e873081a6e8f024e$export$1040147c129fdde9)(modalSearchTerm)) {
|
|
1859
|
-
setInvalidSearch(false);
|
|
1860
|
-
if (window.location.pathname !== '/datasets') navigate(`/datasets?fulltext=${modalSearchTerm}`);
|
|
1861
|
-
else {
|
|
1862
|
-
window.location.search = `fulltext=${modalSearchTerm}`;
|
|
1863
|
-
setModalSearch(false);
|
|
1864
|
-
}
|
|
1865
|
-
} else setInvalidSearch(true);
|
|
1866
|
-
}
|
|
1867
|
-
}
|
|
1868
|
-
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1869
|
-
className: "dkan-c-main-navigation--search",
|
|
1870
|
-
children: [
|
|
1871
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
1872
|
-
variation: "ghost",
|
|
1873
|
-
onDark: true,
|
|
1874
|
-
className: "ds-u-border--0 dkan-c-header-search--modal-button",
|
|
1875
|
-
onClick: ()=>setModalSearch(true),
|
|
1876
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1877
|
-
children: "Search"
|
|
1878
|
-
})
|
|
1879
|
-
}),
|
|
1880
|
-
modalSearch && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
1881
|
-
className: "dc-c-search-dialog",
|
|
1882
|
-
isOpen: modalSearch,
|
|
1883
|
-
onExit: ()=>setModalSearch(false),
|
|
1884
|
-
heading: `${headingText}`,
|
|
1885
|
-
actions: /*#__PURE__*/ (0, $hgUW1$jsxs)("form", {
|
|
1886
|
-
className: "dkan-dataset-search ds-u-display--flex ds-u-align-items--start ds-u-flex-wrap--nowrap",
|
|
1887
|
-
onSubmit: (e)=>{
|
|
1888
|
-
searchForDataset(e);
|
|
1889
|
-
},
|
|
1890
|
-
children: [
|
|
1891
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
1892
|
-
errorMessage: invalidSearch ? 'No special characters allowed. Please enter a valid search term.' : undefined,
|
|
1893
|
-
errorPlacement: "bottom",
|
|
1894
|
-
value: modalSearchTerm,
|
|
1895
|
-
fieldClassName: "ds-u-display--inline-block ds-u-margin--0",
|
|
1896
|
-
className: "ds-l-col--9",
|
|
1897
|
-
label: "Search Term",
|
|
1898
|
-
name: "search-modal",
|
|
1899
|
-
labelClassName: "ds-u-visibility--screen-reader",
|
|
1900
|
-
onChange: (e)=>{
|
|
1901
|
-
setInvalidSearch(false);
|
|
1902
|
-
setModalSearchTerm(e.target.value);
|
|
1903
|
-
}
|
|
1904
|
-
}),
|
|
1905
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
1906
|
-
type: "submit",
|
|
1907
|
-
className: "ds-l-col--3",
|
|
1908
|
-
children: [
|
|
1909
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1910
|
-
className: "fas fa-search small-text ds-u-sm-display--none"
|
|
1911
|
-
}),
|
|
1912
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1913
|
-
className: "full-text ds-u-display--none ds-u-sm-display--inline-block",
|
|
1914
|
-
children: "Search"
|
|
1915
|
-
})
|
|
1916
|
-
]
|
|
1917
|
-
})
|
|
1918
|
-
]
|
|
1919
|
-
})
|
|
1920
|
-
})
|
|
1921
|
-
]
|
|
1922
|
-
});
|
|
1923
|
-
};
|
|
1924
|
-
var $fea9297ba4dd394c$export$2e2bcd8739ae039 = $fea9297ba4dd394c$var$HeaderSearch;
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
const $b939b31651e82908$var$HeaderNav = (props)=>{
|
|
1929
|
-
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
1930
|
-
const { links: links, topNavLinks: topNavLinks, wrapperClasses: wrapperClasses, searchInMobile: searchInMobile } = props;
|
|
1931
|
-
const navMenuOpenClass = `dkan-c-nav-menu--${headerContext.mobileMenuOpen ? "open" : "close"}`;
|
|
1932
|
-
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ? 'mobile' : 'desktop'}`;
|
|
1933
|
-
const linkClasses = 'dkan-c-header--link ds-c-button ds-c-button--ghost';
|
|
1934
|
-
const listClasses = 'dkan-c-header--link-list ';
|
|
1935
|
-
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1936
|
-
className: `dkan-c-nav-menu ${wrapperClasses} ${navMenuOpenClass} ${isMobileClass}`,
|
|
1937
|
-
ref: headerContext.menuRef,
|
|
1938
|
-
children: [
|
|
1939
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
1940
|
-
variation: "ghost",
|
|
1941
|
-
onDark: true,
|
|
1942
|
-
className: "dkan-c-nav-menu--mobile-close-button",
|
|
1943
|
-
onClick: ()=>headerContext.setMobileMenuOpen(false),
|
|
1944
|
-
children: [
|
|
1945
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$CloseIconThin), {}),
|
|
1946
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1947
|
-
className: "ds-u-margin-left--1",
|
|
1948
|
-
children: "Close"
|
|
1949
|
-
})
|
|
1950
|
-
]
|
|
1951
|
-
}),
|
|
1952
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("nav", {
|
|
1953
|
-
className: "dkan-c-main-nav",
|
|
1954
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
1955
|
-
className: listClasses,
|
|
1956
|
-
children: links.map((link)=>{
|
|
1957
|
-
if (link.submenu) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $669b51f08325b4e3$export$2e2bcd8739ae039), {
|
|
1958
|
-
link: link,
|
|
1959
|
-
wrapLabel: true,
|
|
1960
|
-
subLinkClasses: linkClasses,
|
|
1961
|
-
linkClasses: linkClasses
|
|
1962
|
-
}, link.id);
|
|
1963
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1964
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
1965
|
-
to: link.url,
|
|
1966
|
-
className: linkClasses,
|
|
1967
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1968
|
-
children: link.label
|
|
1969
|
-
})
|
|
1970
|
-
})
|
|
1971
|
-
});
|
|
1972
|
-
})
|
|
1973
|
-
})
|
|
1974
|
-
}),
|
|
1975
|
-
topNavLinks && /*#__PURE__*/ (0, $hgUW1$jsx)("nav", {
|
|
1976
|
-
className: "dkan-c-top-nav",
|
|
1977
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
1978
|
-
className: listClasses,
|
|
1979
|
-
children: topNavLinks.map((link)=>{
|
|
1980
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1981
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
1982
|
-
to: link.url,
|
|
1983
|
-
className: linkClasses,
|
|
1984
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1985
|
-
children: link.label
|
|
1986
|
-
})
|
|
1987
|
-
})
|
|
1988
|
-
});
|
|
1989
|
-
})
|
|
1990
|
-
})
|
|
1991
|
-
}),
|
|
1992
|
-
searchInMobile && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $fea9297ba4dd394c$export$2e2bcd8739ae039), {})
|
|
1993
|
-
]
|
|
1994
|
-
});
|
|
1995
|
-
};
|
|
1996
|
-
var $b939b31651e82908$export$2e2bcd8739ae039 = $b939b31651e82908$var$HeaderNav;
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
const $9a8892c5ac150556$var$HeaderSiteTitle = (props)=>{
|
|
2005
|
-
const inverse = props.inverse;
|
|
2006
|
-
const { logoFilePath: logoFilePath, logoAltText: logoAltText, urlTitle: urlTitle } = props.org;
|
|
2007
|
-
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";
|
|
2008
|
-
if (logoFilePath) return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2009
|
-
className: classList,
|
|
2010
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
2011
|
-
to: "/",
|
|
2012
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("img", {
|
|
2013
|
-
src: logoFilePath,
|
|
2014
|
-
alt: logoAltText
|
|
2015
|
-
})
|
|
2016
|
-
})
|
|
2017
|
-
});
|
|
2018
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2019
|
-
className: classList,
|
|
2020
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
2021
|
-
to: "/",
|
|
2022
|
-
className: `${inverse ? "ds-c-link--inverse " : ""} ds-u-font-size--2xl ds-u-lg-font-size--3xl`,
|
|
2023
|
-
children: urlTitle
|
|
2024
|
-
})
|
|
2025
|
-
});
|
|
2026
|
-
};
|
|
2027
|
-
var $9a8892c5ac150556$export$2e2bcd8739ae039 = $9a8892c5ac150556$var$HeaderSiteTitle;
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
const $403833a4b442d5df$var$MobileMenuButton = (props)=>{
|
|
2037
|
-
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
2038
|
-
const { wrapperClasses: wrapperClasses } = props;
|
|
2039
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
2040
|
-
"aria-haspopup": "true",
|
|
2041
|
-
"aria-expanded": headerContext.mobileMenuOpen,
|
|
2042
|
-
className: `dkan-c-mobile-menu-button ${wrapperClasses} dkan-c-mobile-menu-button--${headerContext.mobileMenuOpen ? "close" : "open"}`,
|
|
2043
|
-
onClick: ()=>headerContext.setMobileMenuOpen(!headerContext.mobileMenuOpen),
|
|
2044
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2045
|
-
children: "Menu"
|
|
2046
|
-
})
|
|
2047
|
-
});
|
|
2048
|
-
};
|
|
2049
|
-
var $403833a4b442d5df$export$2e2bcd8739ae039 = $403833a4b442d5df$var$MobileMenuButton;
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
const $f57121650539d8c5$var$NavBar = (props)=>{
|
|
2057
|
-
const { links: links, menuName: menuName, menuId: menuId, menuClasses: menuClasses, linkClasses: linkClasses, subLinkClasses: subLinkClasses, wrapLabel: wrapLabel = false } = props;
|
|
2058
|
-
return /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
|
|
2059
|
-
className: `dkan-c-${menuId}-menu`,
|
|
2060
|
-
"aria-labelledby": `dkan-c-${menuId}-menu--heading`,
|
|
2061
|
-
children: [
|
|
2062
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
2063
|
-
id: `dkan-c-${menuId}-menu--heading`,
|
|
2064
|
-
className: "ds-u-visibility--screen-reader",
|
|
2065
|
-
children: menuName
|
|
2066
|
-
}),
|
|
2067
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
2068
|
-
className: menuClasses,
|
|
2069
|
-
children: links.map((link)=>{
|
|
2070
|
-
if (link.submenu) return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $669b51f08325b4e3$export$2e2bcd8739ae039), {
|
|
2071
|
-
link: link,
|
|
2072
|
-
wrapLabel: wrapLabel,
|
|
2073
|
-
subLinkClasses: subLinkClasses,
|
|
2074
|
-
linkClasses: linkClasses
|
|
2075
|
-
}, link.id);
|
|
2076
|
-
else return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
2077
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
2078
|
-
to: link,
|
|
2079
|
-
className: linkClasses,
|
|
2080
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2081
|
-
children: link.label
|
|
2082
|
-
})
|
|
2083
|
-
})
|
|
2084
|
-
}, link.id);
|
|
2085
|
-
})
|
|
2086
|
-
})
|
|
2087
|
-
]
|
|
2088
|
-
});
|
|
2089
|
-
};
|
|
2090
|
-
var $f57121650539d8c5$export$2e2bcd8739ae039 = $f57121650539d8c5$var$NavBar;
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
2101
|
-
const { title: title, links: links, mobileMax: mobileMax } = props;
|
|
2102
|
-
const active = (0, $hgUW1$useLocation)().pathname;
|
|
2103
|
-
const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
|
|
2104
|
-
const styleClasses = 'dkan-c--sidebar-nav-wrapper ds-u-border--1 ds-u-border--color-gray-lightest ds-u-padding--2';
|
|
2105
|
-
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ? 'mobile' : 'desktop'}`;
|
|
2106
|
-
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2107
|
-
className: `dkan-c-sidebar-nav ${mobileClass}`,
|
|
2108
|
-
children: [
|
|
2109
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2110
|
-
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",
|
|
2111
|
-
children: [
|
|
2112
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2113
|
-
className: "ds-u-margin-left--2 ds-u-margin-y--0 ds-text-heading--xl",
|
|
2114
|
-
children: "Pages in this section"
|
|
2115
|
-
}),
|
|
2116
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
2117
|
-
"aria-haspopup": "true",
|
|
2118
|
-
variation: "ghost",
|
|
2119
|
-
"aria-expanded": `${menuOpen ? 'true' : 'false'}`,
|
|
2120
|
-
onDark: true,
|
|
2121
|
-
onClick: ()=>setMenuOpen(!menuOpen),
|
|
2122
|
-
children: [
|
|
2123
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2124
|
-
className: "ds-u-visibility--screen-reader",
|
|
2125
|
-
children: "Toggle menu"
|
|
2126
|
-
}),
|
|
2127
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
|
|
2128
|
-
direction: menuOpen ? 'up' : 'down'
|
|
2129
|
-
})
|
|
2130
|
-
]
|
|
2131
|
-
})
|
|
2132
|
-
]
|
|
2133
|
-
}),
|
|
2134
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2135
|
-
className: ``,
|
|
2136
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
|
|
2137
|
-
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ? 'open' : 'close'}`,
|
|
2138
|
-
children: [
|
|
2139
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2140
|
-
className: "ds-u-padding--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest",
|
|
2141
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h3", {
|
|
2142
|
-
className: "ds-text-heading--lg",
|
|
2143
|
-
children: title
|
|
2144
|
-
})
|
|
2145
|
-
}),
|
|
2146
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
2147
|
-
className: "ds-u-padding-bottom--2",
|
|
2148
|
-
children: links.map(({ url: url, label: label })=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
2149
|
-
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ? 'active' : ''}`,
|
|
2150
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2151
|
-
className: "ds-u-display--flex ds-u-padding-y--1",
|
|
2152
|
-
children: [
|
|
2153
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2154
|
-
className: "dkan-c-sidebar-nav-link-status"
|
|
2155
|
-
}),
|
|
2156
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
2157
|
-
to: url,
|
|
2158
|
-
className: "dkan-c-sidebar-nav-link ds-u-margin-left--2",
|
|
2159
|
-
children: label
|
|
2160
|
-
})
|
|
2161
|
-
]
|
|
2162
|
-
})
|
|
2163
|
-
}, `${url}${label}`))
|
|
2164
|
-
})
|
|
2165
|
-
]
|
|
2166
|
-
})
|
|
2167
|
-
})
|
|
2168
|
-
]
|
|
2169
|
-
});
|
|
2170
|
-
};
|
|
2171
|
-
var $953b286f7778640e$export$2e2bcd8739ae039 = $953b286f7778640e$var$SidebarNavigation;
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
const $b0968edc60d7d3a4$var$SidebarPage = (props)=>{
|
|
2179
|
-
const { links: links, menuTitle: menuTitle, mobileMaxWidth: mobileMaxWidth = 768, children: children } = props;
|
|
2180
|
-
const mobileMax = (0, $hgUW1$useMediaQuery)({
|
|
2181
|
-
query: `(max-width: ${mobileMaxWidth}px)`
|
|
2182
|
-
});
|
|
2183
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2184
|
-
className: `${mobileMax ? "a" : 'ds-l-container'}`,
|
|
2185
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2186
|
-
className: `${mobileMax ? "a" : 'ds-l-row'}`,
|
|
2187
|
-
children: [
|
|
2188
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2189
|
-
className: `${mobileMax ? 'a' : "ds-l-col--4"}`,
|
|
2190
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $953b286f7778640e$export$2e2bcd8739ae039), {
|
|
2191
|
-
links: links,
|
|
2192
|
-
title: menuTitle,
|
|
2193
|
-
mobileMax: mobileMax
|
|
2194
|
-
})
|
|
2195
|
-
}),
|
|
2196
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2197
|
-
className: `${mobileMax ? "ds-l-container" : " ds-l-md-col--8"}`,
|
|
2198
|
-
children: children
|
|
2199
|
-
})
|
|
2200
|
-
]
|
|
2201
|
-
})
|
|
2202
|
-
});
|
|
2203
|
-
};
|
|
2204
|
-
var $b0968edc60d7d3a4$export$2e2bcd8739ae039 = $b0968edc60d7d3a4$var$SidebarPage;
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl = 'datasets', searchKey: searchKey = 'fulltext', textfieldLabel: textfieldLabel = 'Search for a dataset', searchButtonText: searchButtonText = 'Search' })=>{
|
|
2215
|
-
const navigate = (0, $hgUW1$useNavigate)();
|
|
2216
|
-
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState('');
|
|
2217
|
-
const [invalidSearch, setInvalidSearch] = (0, $hgUW1$useState)(false);
|
|
2218
|
-
function submitHero(e) {
|
|
2219
|
-
e.preventDefault();
|
|
2220
|
-
if ((0, $e873081a6e8f024e$export$1040147c129fdde9)(searchValue)) {
|
|
2221
|
-
setInvalidSearch(false);
|
|
2222
|
-
navigate(`/${searchUrl}?${searchKey}=${searchValue}`);
|
|
2223
|
-
} else setInvalidSearch(true);
|
|
2224
|
-
}
|
|
2225
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
2226
|
-
className: `dc-c-hero ds-base ds-u-padding--2`,
|
|
2227
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2228
|
-
className: "ds-l-container",
|
|
2229
|
-
children: [
|
|
2230
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2231
|
-
className: "ds-l-row",
|
|
2232
|
-
children: [
|
|
2233
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
2234
|
-
className: "ds-text-heading--5xl ds-u-color--white ds-u-margin-y--1",
|
|
2235
|
-
children: title
|
|
2236
|
-
}),
|
|
2237
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
2238
|
-
className: "ds-u-color--white ds-u-measure--wide",
|
|
2239
|
-
children: description
|
|
2240
|
-
})
|
|
2241
|
-
]
|
|
2242
|
-
}),
|
|
2243
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("form", {
|
|
2244
|
-
onSubmit: (e)=>submitHero(e),
|
|
2245
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2246
|
-
style: {
|
|
2247
|
-
position: 'relative'
|
|
2248
|
-
},
|
|
2249
|
-
className: "ds-l-row ds-u-align-items--stretch ds-u-margin-y--4 ds-u-flex-wrap--nowrap",
|
|
2250
|
-
children: [
|
|
2251
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2252
|
-
className: "ds-u-padding--0 ds-u-margin-right--1",
|
|
2253
|
-
style: {
|
|
2254
|
-
flex: '1 1 100%',
|
|
2255
|
-
maxWidth: '100%'
|
|
2256
|
-
},
|
|
2257
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
2258
|
-
errorMessage: invalidSearch ? 'No special characters allowed. Please enter a valid search term.' : undefined,
|
|
2259
|
-
errorPlacement: "bottom",
|
|
2260
|
-
label: textfieldLabel,
|
|
2261
|
-
labelClassName: "ds-u-visibility--screen-reader",
|
|
2262
|
-
name: "search_text_input",
|
|
2263
|
-
style: {
|
|
2264
|
-
maxWidth: 'none',
|
|
2265
|
-
height: '61px',
|
|
2266
|
-
margin: '0 20px 0 0'
|
|
2267
|
-
},
|
|
2268
|
-
onChange: (e)=>{
|
|
2269
|
-
setInvalidSearch(false);
|
|
2270
|
-
setSearchValue(e.target.value);
|
|
2271
|
-
}
|
|
2272
|
-
})
|
|
2273
|
-
}),
|
|
2274
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
2275
|
-
className: "ds-u-margin-left--auto",
|
|
2276
|
-
size: "big",
|
|
2277
|
-
type: "submit",
|
|
2278
|
-
variation: "solid",
|
|
2279
|
-
onDark: true,
|
|
2280
|
-
children: [
|
|
2281
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2282
|
-
className: "fas fa-search small-text ds-u-sm-display--none"
|
|
2283
|
-
}),
|
|
2284
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2285
|
-
className: "full-text ds-u-display--none ds-u-sm-display--inline-block",
|
|
2286
|
-
children: searchButtonText
|
|
2287
|
-
})
|
|
2288
|
-
]
|
|
2289
|
-
})
|
|
2290
|
-
]
|
|
2291
|
-
})
|
|
2292
|
-
})
|
|
2293
|
-
]
|
|
2294
|
-
})
|
|
2295
|
-
});
|
|
2296
|
-
};
|
|
2297
|
-
var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
1306
|
+
return '';
|
|
1307
|
+
}
|
|
2304
1308
|
|
|
2305
1309
|
|
|
2306
|
-
const $
|
|
1310
|
+
const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
2307
1311
|
const desktop = (0, $hgUW1$useMediaQuery)({
|
|
2308
1312
|
minWidth: 1024
|
|
2309
1313
|
});
|
|
2310
|
-
const { title: title, modified: modified,
|
|
1314
|
+
const { title: title, modified: modified, description: description, downloadUrl: downloadUrl, largeFile: largeFile = false, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks, identifier: identifier, refresh: refresh, released: released, showDateDetails: showDateDetails = false, updateDateMonthYearOnly: updateDateMonthYearOnly = false, showTopics: showTopics = false, theme: theme, topicSlugs: topicSlugs, distribution: distribution } = props;
|
|
1315
|
+
const location = (0, $hgUW1$useLocation)();
|
|
2311
1316
|
let linkContainerClasses = 'ds-u-margin-bottom--2';
|
|
2312
1317
|
if (dataDictionaryLinks) linkContainerClasses += ' ds-l-col--6 ds-u-padding-right--0';
|
|
2313
1318
|
else linkContainerClasses += ' ds-l-col--auto ds-u-padding-left--0';
|
|
@@ -2316,62 +1321,236 @@ const $c068004d499082cc$var$DatasetListItem = (props)=>{
|
|
|
2316
1321
|
linkContainerClasses = 'ds-u-padding-x--0';
|
|
2317
1322
|
linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
|
|
2318
1323
|
}
|
|
1324
|
+
let themes;
|
|
1325
|
+
if (theme && showTopics) themes = /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
1326
|
+
className: "theme-list item-theme ds-u-padding-left--2 ds-u-margin-top--2 ds-u-margin-bottom--0",
|
|
1327
|
+
children: theme.map((topic, index)=>{
|
|
1328
|
+
const title = topic || 'Unknown Topic';
|
|
1329
|
+
const prefix = 'topics';
|
|
1330
|
+
// Use the provided slug or fallback to a simple slug generation
|
|
1331
|
+
const slug = topicSlugs?.[title];
|
|
1332
|
+
const link = `/${prefix}/${slug}`;
|
|
1333
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1334
|
+
className: "ds-u-fill--primary ds-u-radius--pill",
|
|
1335
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1336
|
+
to: link,
|
|
1337
|
+
state: {
|
|
1338
|
+
fromUrl: location.pathname,
|
|
1339
|
+
fromTitle: false,
|
|
1340
|
+
fromSearchList: location.pathname.includes('search')
|
|
1341
|
+
},
|
|
1342
|
+
children: title
|
|
1343
|
+
})
|
|
1344
|
+
}, `dist-${title}-${index}`);
|
|
1345
|
+
})
|
|
1346
|
+
});
|
|
1347
|
+
const date = {
|
|
1348
|
+
modified: modified,
|
|
1349
|
+
released: released,
|
|
1350
|
+
refresh: refresh
|
|
1351
|
+
};
|
|
1352
|
+
const url = `/dataset/${identifier}`;
|
|
1353
|
+
const DataTableLink = ()=>{
|
|
1354
|
+
if ((0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv") return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1355
|
+
to: `${url}#data-table`,
|
|
1356
|
+
children: [
|
|
1357
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1358
|
+
id: "data-table"
|
|
1359
|
+
}),
|
|
1360
|
+
"Data Table"
|
|
1361
|
+
]
|
|
1362
|
+
});
|
|
1363
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
|
|
1364
|
+
className: "dkan-disabled-link",
|
|
1365
|
+
component: "a",
|
|
1366
|
+
offset: [
|
|
1367
|
+
0,
|
|
1368
|
+
5
|
|
1369
|
+
],
|
|
1370
|
+
title: "There is no Data Table associated with this dataset. Data Tables will only display for CSV files.",
|
|
1371
|
+
children: [
|
|
1372
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1373
|
+
id: "data-table"
|
|
1374
|
+
}),
|
|
1375
|
+
"Data Table"
|
|
1376
|
+
]
|
|
1377
|
+
});
|
|
1378
|
+
};
|
|
1379
|
+
const dataDictionaryExists = ()=>{
|
|
1380
|
+
if (distribution && "data" in distribution) {
|
|
1381
|
+
if ("describedBy" in distribution.data && "describedByType" in distribution.data) {
|
|
1382
|
+
const types = [
|
|
1383
|
+
'application/vnd.tableschema+json',
|
|
1384
|
+
'application/pdf'
|
|
1385
|
+
];
|
|
1386
|
+
const isValidType = types.includes(distribution.data.describedByType);
|
|
1387
|
+
return isValidType;
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
return false;
|
|
1391
|
+
};
|
|
1392
|
+
const DataDictionaryLink = ()=>{
|
|
1393
|
+
if (dataDictionaryExists()) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1394
|
+
to: `${url}#data-dictionary`,
|
|
1395
|
+
children: [
|
|
1396
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1397
|
+
id: "data-dictionary"
|
|
1398
|
+
}),
|
|
1399
|
+
"Data Dictionary"
|
|
1400
|
+
]
|
|
1401
|
+
});
|
|
1402
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tooltip), {
|
|
1403
|
+
className: "dkan-disabled-link",
|
|
1404
|
+
component: "a",
|
|
1405
|
+
offset: [
|
|
1406
|
+
0,
|
|
1407
|
+
5
|
|
1408
|
+
],
|
|
1409
|
+
title: "There is no Data Dictionary associated with this dataset.",
|
|
1410
|
+
children: [
|
|
1411
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1412
|
+
id: "data-dictionary"
|
|
1413
|
+
}),
|
|
1414
|
+
"Data Dictionary"
|
|
1415
|
+
]
|
|
1416
|
+
});
|
|
1417
|
+
};
|
|
1418
|
+
const dateOptions = updateDateMonthYearOnly ? {
|
|
1419
|
+
year: 'numeric',
|
|
1420
|
+
month: 'long',
|
|
1421
|
+
day: undefined,
|
|
1422
|
+
timeZone: 'UTC'
|
|
1423
|
+
} : undefined;
|
|
2319
1424
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
2320
|
-
className: "dc-c-list-item ds-u-padding-top--
|
|
1425
|
+
className: "dc-c-search-list-item ds-u-padding-top--3",
|
|
2321
1426
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2322
1427
|
className: `dc-c-searchlist-item ${paginationEnabled ? 'ds-u-border-top--1' : 'ds-u-border-bottom--1 ds-u-padding-bottom--3'}`,
|
|
2323
1428
|
children: [
|
|
2324
1429
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2325
1430
|
className: "ds-l-row ds-u-align-items--start",
|
|
2326
1431
|
children: [
|
|
2327
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1432
|
+
!showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
2328
1433
|
id: `dataset-${identifier}-updated-date`,
|
|
2329
|
-
className: `ds-l-col--12 ds-u-text-align--
|
|
1434
|
+
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? 'ds-u-padding-top--2' : 'ds-u-padding-top--0'}`,
|
|
2330
1435
|
children: [
|
|
2331
|
-
|
|
1436
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1437
|
+
children: "Updated:"
|
|
1438
|
+
}),
|
|
1439
|
+
" ",
|
|
2332
1440
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $727b038175bac6f5$export$2e2bcd8739ae039), {
|
|
2333
|
-
date: modified
|
|
1441
|
+
date: modified,
|
|
1442
|
+
options: dateOptions
|
|
2334
1443
|
})
|
|
2335
1444
|
]
|
|
2336
1445
|
}),
|
|
2337
1446
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
2338
|
-
className:
|
|
2339
|
-
children:
|
|
2340
|
-
|
|
1447
|
+
className: `ds-l-col--12 ds-text-heading--2xl ${showDateDetails ? "ds-u-margin-top--2 ds-u-margin-bottom--0" : ""}`,
|
|
1448
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1449
|
+
"aria-describedby": `dataset-${identifier}-updated-date`,
|
|
1450
|
+
to: `${url}`,
|
|
1451
|
+
children: title
|
|
1452
|
+
})
|
|
1453
|
+
}),
|
|
1454
|
+
themes
|
|
2341
1455
|
]
|
|
2342
1456
|
}),
|
|
2343
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1457
|
+
description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2344
1458
|
className: "ds-l-row",
|
|
2345
1459
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2346
1460
|
className: "ds-l-col--12 ds-l-md-col--12 ds-u-margin-top--2",
|
|
2347
1461
|
children: [
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
1462
|
+
(0, $1a2bf34e2a8f6b80$export$59a943b34a82e690)(description),
|
|
1463
|
+
description.length > 240 ? /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1464
|
+
children: [
|
|
1465
|
+
' ',
|
|
1466
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1467
|
+
to: `/dataset/${identifier}`,
|
|
1468
|
+
children: "See more"
|
|
1469
|
+
})
|
|
1470
|
+
]
|
|
1471
|
+
}) : ''
|
|
2351
1472
|
]
|
|
2352
1473
|
})
|
|
2353
1474
|
}),
|
|
2354
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2355
|
-
className: "ds-
|
|
2356
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)(
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
1475
|
+
showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1476
|
+
className: "dataset-dates ds-u-margin-top--2",
|
|
1477
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $20de4fedf33d4f9a$export$2e2bcd8739ae039), {
|
|
1478
|
+
date: date,
|
|
1479
|
+
displayTooltips: false
|
|
1480
|
+
})
|
|
1481
|
+
}),
|
|
1482
|
+
downloadUrl ? /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1483
|
+
className: `ds-u-margin-top--3 ds-u-padding-left--0 download-button`,
|
|
1484
|
+
children: largeFile ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1485
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b61856b23f5f58a2$export$2e2bcd8739ae039), {
|
|
1486
|
+
downloadUrl: downloadUrl
|
|
1487
|
+
})
|
|
1488
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
1489
|
+
href: downloadUrl,
|
|
1490
|
+
variation: "solid",
|
|
1491
|
+
className: "ds-l-col--12 ds-l-md-col--auto",
|
|
1492
|
+
children: [
|
|
1493
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1494
|
+
id: "download"
|
|
1495
|
+
}),
|
|
1496
|
+
"Download"
|
|
1497
|
+
]
|
|
1498
|
+
})
|
|
1499
|
+
}) : '',
|
|
1500
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("ul", {
|
|
1501
|
+
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' : ''}`,
|
|
1502
|
+
children: [
|
|
1503
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1504
|
+
className: linkContainerClasses,
|
|
1505
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1506
|
+
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? '' : ' dkan-disabled-link-wrapper'}`,
|
|
1507
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataTableLink, {})
|
|
1508
|
+
})
|
|
1509
|
+
}),
|
|
1510
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1511
|
+
className: linkContainerClasses,
|
|
1512
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1513
|
+
className: linkClasses,
|
|
1514
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1515
|
+
to: `${url}#overview`,
|
|
1516
|
+
children: [
|
|
1517
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1518
|
+
id: "overview"
|
|
1519
|
+
}),
|
|
1520
|
+
"Overview"
|
|
1521
|
+
]
|
|
1522
|
+
})
|
|
1523
|
+
})
|
|
1524
|
+
}),
|
|
1525
|
+
dataDictionaryLinks ? /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1526
|
+
className: linkContainerClasses,
|
|
1527
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1528
|
+
className: `${linkClasses}${dataDictionaryExists() ? '' : ' dkan-disabled-link-wrapper'}`,
|
|
1529
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataDictionaryLink, {})
|
|
1530
|
+
})
|
|
1531
|
+
}) : '',
|
|
1532
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1533
|
+
className: linkContainerClasses,
|
|
1534
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1535
|
+
className: linkClasses,
|
|
1536
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1537
|
+
to: `${url}#api`,
|
|
1538
|
+
children: [
|
|
1539
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1540
|
+
id: "api"
|
|
1541
|
+
}),
|
|
1542
|
+
"API"
|
|
1543
|
+
]
|
|
1544
|
+
})
|
|
1545
|
+
})
|
|
2366
1546
|
})
|
|
2367
|
-
|
|
1547
|
+
]
|
|
2368
1548
|
})
|
|
2369
1549
|
]
|
|
2370
1550
|
})
|
|
2371
1551
|
});
|
|
2372
1552
|
};
|
|
2373
|
-
var $
|
|
2374
|
-
|
|
1553
|
+
var $52c6454cae137465$export$2e2bcd8739ae039 = $52c6454cae137465$var$DatasetSearchListItem;
|
|
2375
1554
|
|
|
2376
1555
|
|
|
2377
1556
|
|
|
@@ -2620,13 +1799,12 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
2620
1799
|
]);
|
|
2621
1800
|
// keep state in sync
|
|
2622
1801
|
(0, $hgUW1$useEffect)(()=>{
|
|
2623
|
-
if (columnOrder?.length) setCards(columnOrder.map((
|
|
2624
|
-
|
|
2625
|
-
|
|
1802
|
+
if (columnOrder?.length) setCards(columnOrder.map((id)=>columns.find((col)=>col.id === id)) // Get list of cards in order
|
|
1803
|
+
.filter(Boolean) // Filter out any possible undefined/non-matches
|
|
1804
|
+
.map((column)=>({
|
|
2626
1805
|
id: column.id,
|
|
2627
1806
|
visible: column.getIsVisible()
|
|
2628
|
-
};
|
|
2629
|
-
}));
|
|
1807
|
+
})));
|
|
2630
1808
|
}, [
|
|
2631
1809
|
columnOrder
|
|
2632
1810
|
]);
|
|
@@ -2762,13 +1940,12 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
2762
1940
|
onClick: ()=>{
|
|
2763
1941
|
// reset to default column order and set all cards to visible
|
|
2764
1942
|
// do not save this to the table state until the "Save" button is clicked
|
|
2765
|
-
setCards(defaultColumnOrder.map((
|
|
2766
|
-
|
|
2767
|
-
|
|
1943
|
+
setCards(defaultColumnOrder.map((id)=>cards.find((c)=>c.id === id)) // Get list of cards in order
|
|
1944
|
+
.filter(Boolean) // Filter out any possible undefined/non-matches
|
|
1945
|
+
.map((card)=>({
|
|
2768
1946
|
...card,
|
|
2769
1947
|
visible: true
|
|
2770
|
-
};
|
|
2771
|
-
}));
|
|
1948
|
+
})));
|
|
2772
1949
|
},
|
|
2773
1950
|
children: "Reset Columns"
|
|
2774
1951
|
})
|
|
@@ -3461,7 +2638,7 @@ function $a35cf16d1488f54e$export$1147582dfae658c6(columns, schema) {
|
|
|
3461
2638
|
}));
|
|
3462
2639
|
}
|
|
3463
2640
|
const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopyLinkButton: showCopyLinkButton = true, showDataTableToolbar: showDataTableToolbar = true, showDownloadFilteredDataButton: showDownloadFilteredDataButton = true, showDownloadFullDataButton: showDownloadFullDataButton = true, showStoredQueryDownloadButton: showStoredQueryDownloadButton = false, showTableResults: showTableResults = true, showFilterDatasetButton: showFilterDatasetButton = true, showManageColumnsButton: showManageColumnsButton = true, showDisplaySettingsButton: showDisplaySettingsButton = true, showFullScreenButton: showFullScreenButton = true, showInfoShareContainer: showInfoShareContainer = true })=>{
|
|
3464
|
-
const { id: id, distribution: distribution, resource: resource, rootUrl: rootUrl, customColumns: customColumns = [], dataDictionaryBanner: dataDictionaryBanner } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
|
|
2641
|
+
const { id: id, distribution: distribution, resource: resource, rootUrl: rootUrl, customColumns: customColumns = [], dataDictionaryBanner: dataDictionaryBanner, relativeHomeUrlPrepend: relativeHomeUrlPrepend } = (0, $hgUW1$useContext)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039));
|
|
3465
2642
|
const { page: page, setPage: setPage, tableDensity: tableDensity } = (0, $hgUW1$useContext)((0, $ee0d4d4f34048447$export$f814ea079e65d8fe));
|
|
3466
2643
|
const defaultPageSize = 10;
|
|
3467
2644
|
const schema = resource?.schema?.[distribution?.identifier] ?? resource?.schema?.[id];
|
|
@@ -3474,7 +2651,18 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
3474
2651
|
}, {
|
|
3475
2652
|
encode: true
|
|
3476
2653
|
})}&format=csv`;
|
|
3477
|
-
|
|
2654
|
+
const useDatastoreErrorMessages = {
|
|
2655
|
+
400: {
|
|
2656
|
+
title: 'Data unavailable',
|
|
2657
|
+
message: 'This data is not available for preview at this time. Please try again later.'
|
|
2658
|
+
},
|
|
2659
|
+
500: {
|
|
2660
|
+
title: 'Something went wrong',
|
|
2661
|
+
message: 'Something went wrong on our end. Please try again later.'
|
|
2662
|
+
}
|
|
2663
|
+
};
|
|
2664
|
+
// Data loaded successfully
|
|
2665
|
+
if (!resource.error && Object.keys(resource).length && columns.length && resource.schema && Object.keys(distribution).length) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
3478
2666
|
children: [
|
|
3479
2667
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3480
2668
|
className: isModal ? 'dkan-datatable-fullscreen-mode' : '',
|
|
@@ -3525,7 +2713,28 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
3525
2713
|
})
|
|
3526
2714
|
]
|
|
3527
2715
|
});
|
|
3528
|
-
else
|
|
2716
|
+
else if (resource.error && !resource.loading) {
|
|
2717
|
+
const resourceErrorStatus = resource.error.status in useDatastoreErrorMessages ? resource.error.status : 500;
|
|
2718
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2719
|
+
children: [
|
|
2720
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
2721
|
+
className: "ds-text-heading--lg ds-u-margin--0 ds-u-color--primary",
|
|
2722
|
+
children: useDatastoreErrorMessages[resourceErrorStatus].title
|
|
2723
|
+
}),
|
|
2724
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
2725
|
+
className: "ds-u-padding-bottom--2 ds-u-margin-bottom--7",
|
|
2726
|
+
children: useDatastoreErrorMessages[resourceErrorStatus].message
|
|
2727
|
+
}),
|
|
2728
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
2729
|
+
href: `${relativeHomeUrlPrepend}/`,
|
|
2730
|
+
variation: "solid",
|
|
2731
|
+
className: "",
|
|
2732
|
+
children: "Go to home"
|
|
2733
|
+
})
|
|
2734
|
+
]
|
|
2735
|
+
});
|
|
2736
|
+
// Data loading
|
|
2737
|
+
} else return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
3529
2738
|
"aria-valuetext": "Dataset loading",
|
|
3530
2739
|
role: "status",
|
|
3531
2740
|
className: "ds-u-margin--3"
|
|
@@ -4351,16 +3560,248 @@ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, co
|
|
|
4351
3560
|
children: "Clear all filters"
|
|
4352
3561
|
})
|
|
4353
3562
|
})
|
|
4354
|
-
]
|
|
3563
|
+
]
|
|
3564
|
+
})
|
|
3565
|
+
]
|
|
3566
|
+
})
|
|
3567
|
+
]
|
|
3568
|
+
});
|
|
3569
|
+
};
|
|
3570
|
+
var $85f8ff1ff89899c7$export$2e2bcd8739ae039 = $85f8ff1ff89899c7$var$DataTableToolbar;
|
|
3571
|
+
|
|
3572
|
+
|
|
3573
|
+
|
|
3574
|
+
|
|
3575
|
+
|
|
3576
|
+
|
|
3577
|
+
|
|
3578
|
+
|
|
3579
|
+
|
|
3580
|
+
|
|
3581
|
+
const $61ff88fb3f6ee2c8$var$queryClient = new (0, $hgUW1$QueryClient)({
|
|
3582
|
+
defaultOptions: {
|
|
3583
|
+
queries: {
|
|
3584
|
+
refetchOnWindowFocus: false
|
|
3585
|
+
}
|
|
3586
|
+
}
|
|
3587
|
+
});
|
|
3588
|
+
const $61ff88fb3f6ee2c8$var$withQueryProvider = (WrappedComponent)=>(props)=>{
|
|
3589
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$QueryClientProvider), {
|
|
3590
|
+
client: $61ff88fb3f6ee2c8$var$queryClient,
|
|
3591
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)(WrappedComponent, {
|
|
3592
|
+
...props
|
|
3593
|
+
})
|
|
3594
|
+
});
|
|
3595
|
+
};
|
|
3596
|
+
var $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 = $61ff88fb3f6ee2c8$var$withQueryProvider;
|
|
3597
|
+
|
|
3598
|
+
|
|
3599
|
+
|
|
3600
|
+
|
|
3601
|
+
|
|
3602
|
+
|
|
3603
|
+
|
|
3604
|
+
const $4808982eba3feb88$var$DatasetListSubmenuItem = (props)=>{
|
|
3605
|
+
const { title: title, identifier: identifier, linkClasses: linkClasses } = props;
|
|
3606
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
3607
|
+
className: "dc-c-list-item",
|
|
3608
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
3609
|
+
className: `ds-u-display-flex ds-u-align-items--center ds-u-text-align--left ${linkClasses}`,
|
|
3610
|
+
to: `/dataset/${identifier}`,
|
|
3611
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3612
|
+
className: "ds-text-heading--md ds-u-margin-left--0",
|
|
3613
|
+
children: title
|
|
3614
|
+
})
|
|
3615
|
+
})
|
|
3616
|
+
}, identifier);
|
|
3617
|
+
};
|
|
3618
|
+
var $4808982eba3feb88$export$2e2bcd8739ae039 = $4808982eba3feb88$var$DatasetListSubmenuItem;
|
|
3619
|
+
|
|
3620
|
+
|
|
3621
|
+
|
|
3622
|
+
|
|
3623
|
+
function $6d5c0212e738499b$export$34e95918366a058e(params, ACA) {
|
|
3624
|
+
if (ACA) params = Object.assign(params, {
|
|
3625
|
+
ACA: ACA,
|
|
3626
|
+
redirect: false
|
|
3627
|
+
});
|
|
3628
|
+
return params;
|
|
3629
|
+
}
|
|
3630
|
+
|
|
3631
|
+
|
|
3632
|
+
|
|
3633
|
+
const $844981eac9b63865$export$eccc29c8d0ff408 = (0, $hgUW1$createContext)({
|
|
3634
|
+
ACA: undefined
|
|
3635
|
+
});
|
|
3636
|
+
|
|
3637
|
+
|
|
3638
|
+
const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 4, defaultSort: defaultSort = {
|
|
3639
|
+
defaultSort: 'modified',
|
|
3640
|
+
defaultOrder: 'desc'
|
|
3641
|
+
}, subLinkClasses: subLinkClasses })=>{
|
|
3642
|
+
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
3643
|
+
const [currentResultNumbers, setCurrentResultNumbers] = (0, $hgUW1$useState)({
|
|
3644
|
+
total: 0,
|
|
3645
|
+
startingNumber: 0,
|
|
3646
|
+
endingNumber: 0
|
|
3647
|
+
});
|
|
3648
|
+
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
3649
|
+
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
3650
|
+
const pageSize = defaultPageSize;
|
|
3651
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
3652
|
+
if (totalItems <= 0 && currentResultNumbers !== null) setNoResults(true);
|
|
3653
|
+
else setNoResults(false);
|
|
3654
|
+
}, [
|
|
3655
|
+
totalItems,
|
|
3656
|
+
pageSize
|
|
3657
|
+
]);
|
|
3658
|
+
let params = {
|
|
3659
|
+
sort: defaultSort.defaultSort,
|
|
3660
|
+
['sort-order']: defaultSort.defaultOrder,
|
|
3661
|
+
['page-size']: defaultPageSize
|
|
3662
|
+
};
|
|
3663
|
+
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
3664
|
+
queryKey: [
|
|
3665
|
+
"datasets",
|
|
3666
|
+
params
|
|
3667
|
+
],
|
|
3668
|
+
queryFn: ()=>{
|
|
3669
|
+
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
3670
|
+
arrayFormat: 'comma',
|
|
3671
|
+
encode: false
|
|
3672
|
+
})}`);
|
|
3673
|
+
}
|
|
3674
|
+
});
|
|
3675
|
+
// Sync totalItems state with API response data
|
|
3676
|
+
// Moved to useEffect to prevent state updates during render (which can cause infinite loops)
|
|
3677
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
3678
|
+
if (data?.data?.total !== undefined && data.data.total !== totalItems) setTotalItems(data.data.total);
|
|
3679
|
+
}, [
|
|
3680
|
+
data?.data?.total
|
|
3681
|
+
]);
|
|
3682
|
+
let submenuItemsCount = 0;
|
|
3683
|
+
if (data) {
|
|
3684
|
+
let resultsCount = Object.keys(data.data.results).length;
|
|
3685
|
+
// For the submenu pager, If there are fewer than 4 dataset items, display the dataset item count, otherwise, show "Viewing 4..".
|
|
3686
|
+
submenuItemsCount = resultsCount > defaultPageSize ? defaultPageSize : resultsCount;
|
|
3687
|
+
}
|
|
3688
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
3689
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
3690
|
+
className: " dkan-c-site-menu--sub-menu",
|
|
3691
|
+
children: isPending ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
3692
|
+
className: "ds-u-valign--middle",
|
|
3693
|
+
"aria-valuetext": "Dataset Search loading",
|
|
3694
|
+
role: "status"
|
|
3695
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
3696
|
+
children: [
|
|
3697
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
|
|
3698
|
+
className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0 ds-u-lg-margin-top--2 ds-u-margin-bottom--2 ds-u-display--block",
|
|
3699
|
+
"data-testid": "submenu-results-list",
|
|
3700
|
+
children: [
|
|
3701
|
+
noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
3702
|
+
variation: "error",
|
|
3703
|
+
heading: "No results found."
|
|
3704
|
+
}),
|
|
3705
|
+
data && data.data.results ? Object.keys(data.data.results).map((key)=>{
|
|
3706
|
+
return data.data.results[key];
|
|
3707
|
+
}).map((item)=>{
|
|
3708
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $4808982eba3feb88$export$2e2bcd8739ae039), {
|
|
3709
|
+
title: item.title,
|
|
3710
|
+
identifier: item.identifier,
|
|
3711
|
+
linkClasses: subLinkClasses
|
|
3712
|
+
}, item.identifier);
|
|
3713
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
3714
|
+
variation: "error",
|
|
3715
|
+
heading: "Could not connect to the API."
|
|
3716
|
+
})
|
|
3717
|
+
]
|
|
3718
|
+
}),
|
|
3719
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3720
|
+
className: "ds-u-display--flex ds-u-justify-content--between ds-u-align-items--center ds-u-border-top--1 ds-u-padding-top--3 ds-u-padding-bottom--2 ds-u-margin-x--3 ds-u-lg-margin-x--0",
|
|
3721
|
+
children: enablePagination && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
3722
|
+
children: [
|
|
3723
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3724
|
+
className: "",
|
|
3725
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
3726
|
+
className: "ds-u-margin-y--0 ds-u-font-size--sm",
|
|
3727
|
+
"aria-hidden": "true",
|
|
3728
|
+
children: data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
3729
|
+
children: [
|
|
3730
|
+
"Viewing ",
|
|
3731
|
+
submenuItemsCount,
|
|
3732
|
+
" of ",
|
|
3733
|
+
data.data.total
|
|
3734
|
+
]
|
|
3735
|
+
})
|
|
3736
|
+
})
|
|
3737
|
+
}),
|
|
3738
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3739
|
+
className: "",
|
|
3740
|
+
children: data && data.data.total > 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
3741
|
+
className: "ds-u-padding--0 ds-c-button ds-c-button--ghost dkan-c-header--link",
|
|
3742
|
+
to: `../whats-new`,
|
|
3743
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
3744
|
+
className: "ds-text-heading--md",
|
|
3745
|
+
children: [
|
|
3746
|
+
" ",
|
|
3747
|
+
`View all ${data.data.total} entries`,
|
|
3748
|
+
" "
|
|
3749
|
+
]
|
|
3750
|
+
})
|
|
3751
|
+
})
|
|
3752
|
+
})
|
|
3753
|
+
]
|
|
3754
|
+
})
|
|
3755
|
+
})
|
|
3756
|
+
]
|
|
3757
|
+
})
|
|
3758
|
+
})
|
|
3759
|
+
});
|
|
3760
|
+
};
|
|
3761
|
+
var $10bc3aae21fc1572$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039)($10bc3aae21fc1572$var$DatasetListSubmenu);
|
|
3762
|
+
|
|
3763
|
+
|
|
3764
|
+
|
|
3765
|
+
|
|
3766
|
+
|
|
3767
|
+
|
|
3768
|
+
|
|
3769
|
+
|
|
3770
|
+
const $e011250e8a3bd5e5$var$SearchFacets = (props)=>{
|
|
3771
|
+
const { facets: facets, title: title, onClickFunction: onClickFunction, selectedFacets: selectedFacets = [] } = props;
|
|
3772
|
+
const filteredFacets = facets.filter((f)=>{
|
|
3773
|
+
return Number(f.total) > 0 || selectedFacets.findIndex((i)=>i === f.name) !== -1;
|
|
3774
|
+
});
|
|
3775
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3776
|
+
className: "dkan-dataset-search--facet-container ds-u-margin-bottom--4",
|
|
3777
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
|
|
3778
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
3779
|
+
contentClassName: "ds-u-padding-left--1 ds-u-padding-right--0",
|
|
3780
|
+
heading: title,
|
|
3781
|
+
defaultOpen: true,
|
|
3782
|
+
children: !filteredFacets.length ? /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
3783
|
+
className: "ds-text-heading--md",
|
|
3784
|
+
children: "No matching facets found."
|
|
3785
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
3786
|
+
children: filteredFacets.map((f)=>{
|
|
3787
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
3788
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Choice), {
|
|
3789
|
+
className: "ds-u-margin-y--1",
|
|
3790
|
+
checked: selectedFacets.findIndex((s)=>s === f.name) > -1 ? true : false,
|
|
3791
|
+
name: `facet_theme_${f.name}`,
|
|
3792
|
+
type: "checkbox",
|
|
3793
|
+
label: `${f.name} (${f.total})`,
|
|
3794
|
+
value: f.name,
|
|
3795
|
+
onClick: ()=>onClickFunction(f.type, f.name)
|
|
3796
|
+
})
|
|
3797
|
+
}, f.name);
|
|
4355
3798
|
})
|
|
4356
|
-
|
|
3799
|
+
})
|
|
4357
3800
|
})
|
|
4358
|
-
|
|
3801
|
+
})
|
|
4359
3802
|
});
|
|
4360
3803
|
};
|
|
4361
|
-
var $
|
|
4362
|
-
|
|
4363
|
-
|
|
3804
|
+
var $e011250e8a3bd5e5$export$2e2bcd8739ae039 = $e011250e8a3bd5e5$var$SearchFacets;
|
|
4364
3805
|
|
|
4365
3806
|
|
|
4366
3807
|
|
|
@@ -4417,6 +3858,7 @@ var $ffd9c403a1c2fc39$export$2e2bcd8739ae039 = $ffd9c403a1c2fc39$var$SpanVersion
|
|
|
4417
3858
|
|
|
4418
3859
|
|
|
4419
3860
|
|
|
3861
|
+
|
|
4420
3862
|
const $d42ff6af4a8dee64$var$ApiDocsInfo = ({ url: url, getComponent: getComponent, isDatasetDocs: isDatasetDocs, showRowLimitNotice: showRowLimitNotice, docsURL: docsURL })=>{
|
|
4421
3863
|
const VersionStamp = getComponent("VersionStamp");
|
|
4422
3864
|
const OpenAPIVersion = getComponent("OpenAPIVersion");
|
|
@@ -5320,51 +4762,296 @@ const $072291d44ce1834a$var$ResourceFooter = ({ resource: resource })=>{
|
|
|
5320
4762
|
})
|
|
5321
4763
|
});
|
|
5322
4764
|
};
|
|
5323
|
-
var $072291d44ce1834a$export$2e2bcd8739ae039 = $072291d44ce1834a$var$ResourceFooter;
|
|
5324
|
-
|
|
4765
|
+
var $072291d44ce1834a$export$2e2bcd8739ae039 = $072291d44ce1834a$var$ResourceFooter;
|
|
4766
|
+
|
|
4767
|
+
|
|
4768
|
+
|
|
4769
|
+
|
|
4770
|
+
|
|
4771
|
+
|
|
4772
|
+
|
|
4773
|
+
const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage, pageTrail: pageTrail = [] })=>{
|
|
4774
|
+
const pageTrailContent = pageTrail.map((page)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
4775
|
+
className: "dc-c-breadcrumb__list-item",
|
|
4776
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
4777
|
+
to: page.path,
|
|
4778
|
+
className: "dc-c-breadcrumb__link",
|
|
4779
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4780
|
+
children: page.title
|
|
4781
|
+
})
|
|
4782
|
+
})
|
|
4783
|
+
}, page.path));
|
|
4784
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("nav", {
|
|
4785
|
+
className: "dc-c-breadcrumb ds-u-margin-top--6",
|
|
4786
|
+
"aria-label": "Breadcrumbs",
|
|
4787
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
|
|
4788
|
+
className: "dc-c-breadcrumb__list",
|
|
4789
|
+
children: [
|
|
4790
|
+
pageTrailContent,
|
|
4791
|
+
currentPage ? /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
4792
|
+
className: "dc-c-breadcrumb__list-item dc-c-current",
|
|
4793
|
+
"aria-current": "page",
|
|
4794
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4795
|
+
children: currentPage
|
|
4796
|
+
})
|
|
4797
|
+
}) : ''
|
|
4798
|
+
]
|
|
4799
|
+
})
|
|
4800
|
+
});
|
|
4801
|
+
};
|
|
4802
|
+
$ec3e23baa005dc03$var$Breadcrumb.propTypes = {
|
|
4803
|
+
currentPage: (0, $hgUW1$proptypes).string.isRequired,
|
|
4804
|
+
pageTrail: (0, $hgUW1$proptypes).arrayOf((0, $hgUW1$proptypes).shape({
|
|
4805
|
+
path: (0, $hgUW1$proptypes).string.isRequired,
|
|
4806
|
+
title: (0, $hgUW1$proptypes).string.isRequired
|
|
4807
|
+
}))
|
|
4808
|
+
};
|
|
4809
|
+
var $ec3e23baa005dc03$export$2e2bcd8739ae039 = $ec3e23baa005dc03$var$Breadcrumb;
|
|
4810
|
+
|
|
4811
|
+
|
|
4812
|
+
|
|
4813
|
+
|
|
4814
|
+
|
|
4815
|
+
|
|
4816
|
+
|
|
4817
|
+
|
|
4818
|
+
|
|
4819
|
+
|
|
4820
|
+
|
|
4821
|
+
|
|
4822
|
+
const $94764de04eaf82f6$var$MagnifyingGlassIcon = (props)=>/*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
4823
|
+
fill: "#000000",
|
|
4824
|
+
width: "24px",
|
|
4825
|
+
height: "24px",
|
|
4826
|
+
viewBox: "0 0 250 250",
|
|
4827
|
+
id: "Flat",
|
|
4828
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4829
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
4830
|
+
d: "M232.47656,215.51563l-40.67773-40.67774a96.10791,96.10791,0,1,0-16.97168,16.96973l40.67871,40.67871a12.0001,12.0001,0,1,0,16.9707-16.9707ZM43.99707,116a72,72,0,1,1,72,72A72.08124,72.08124,0,0,1,43.99707,116Z"
|
|
4831
|
+
})
|
|
4832
|
+
});
|
|
4833
|
+
var $94764de04eaf82f6$export$2e2bcd8739ae039 = $94764de04eaf82f6$var$MagnifyingGlassIcon;
|
|
4834
|
+
|
|
4835
|
+
|
|
4836
|
+
|
|
4837
|
+
|
|
4838
|
+
const $10acbeaa4d8f6040$var$ChevronRightIcon = (props)=>/*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
4839
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4840
|
+
width: 16,
|
|
4841
|
+
height: 28,
|
|
4842
|
+
fill: "currentColor",
|
|
4843
|
+
className: "mi-solid mi-chevron-right",
|
|
4844
|
+
viewBox: "10.125 3.25 9.5 19.5",
|
|
4845
|
+
...props,
|
|
4846
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
4847
|
+
d: "M10.064 7.269a1.08 1.08 0 0 0 0 1.527L14.267 13l-4.203 4.203a1.079 1.079 0 1 0 1.527 1.527l4.973 -4.973a1.08 1.08 0 0 0 0 -1.527l-4.973 -4.973a1.087 1.087 0 0 0 -1.527 0.011"
|
|
4848
|
+
})
|
|
4849
|
+
});
|
|
4850
|
+
var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRightIcon;
|
|
4851
|
+
|
|
4852
|
+
|
|
4853
|
+
|
|
4854
|
+
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", {
|
|
4855
|
+
className: "search-input-container",
|
|
4856
|
+
children: [
|
|
4857
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4858
|
+
className: `${showMagnifyingGlass ? 'left-padding' : ''} ${showSearchButton ? 'right-padding' : ''}`,
|
|
4859
|
+
label: placeholder,
|
|
4860
|
+
labelClassName: "ds-u-visibility--screen-reader",
|
|
4861
|
+
placeholder: placeholder,
|
|
4862
|
+
onBlur: ()=>{},
|
|
4863
|
+
onChange: onChange,
|
|
4864
|
+
onKeyDown: onKeyDown,
|
|
4865
|
+
defaultValue: defaultValue
|
|
4866
|
+
}),
|
|
4867
|
+
showMagnifyingGlass && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4868
|
+
className: "magnifying-glass-icon ds-u-visibility--hidden ds-u-sm-visibility--visible",
|
|
4869
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $94764de04eaf82f6$export$2e2bcd8739ae039), {})
|
|
4870
|
+
}),
|
|
4871
|
+
showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
4872
|
+
variation: "solid",
|
|
4873
|
+
className: onDark && 'on-dark',
|
|
4874
|
+
onClick: onSubmit,
|
|
4875
|
+
children: [
|
|
4876
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4877
|
+
className: "magnifying-glass-icon",
|
|
4878
|
+
"aria-label": "Search the Data",
|
|
4879
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $94764de04eaf82f6$export$2e2bcd8739ae039), {})
|
|
4880
|
+
}),
|
|
4881
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
4882
|
+
className: "sm-label",
|
|
4883
|
+
children: [
|
|
4884
|
+
"Search the Data ",
|
|
4885
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $10acbeaa4d8f6040$export$2e2bcd8739ae039), {})
|
|
4886
|
+
]
|
|
4887
|
+
})
|
|
4888
|
+
]
|
|
4889
|
+
}),
|
|
4890
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4891
|
+
className: "rounded-border"
|
|
4892
|
+
})
|
|
4893
|
+
]
|
|
4894
|
+
});
|
|
4895
|
+
$bdb071ea3a6d3466$var$SearchInput.propTypes = {
|
|
4896
|
+
placeholder: (0, $hgUW1$proptypes).string,
|
|
4897
|
+
showMagnifyingGlass: (0, $hgUW1$proptypes).bool,
|
|
4898
|
+
showSearchButton: (0, $hgUW1$proptypes).bool,
|
|
4899
|
+
onDark: (0, $hgUW1$proptypes).bool,
|
|
4900
|
+
onChange: (0, $hgUW1$proptypes).func,
|
|
4901
|
+
onSubmit: (0, $hgUW1$proptypes).func,
|
|
4902
|
+
onKeyDown: (0, $hgUW1$proptypes).func,
|
|
4903
|
+
defaultValue: (0, $hgUW1$proptypes).string
|
|
4904
|
+
};
|
|
4905
|
+
var $bdb071ea3a6d3466$export$2e2bcd8739ae039 = $bdb071ea3a6d3466$var$SearchInput;
|
|
4906
|
+
|
|
4907
|
+
|
|
4908
|
+
|
|
4909
|
+
|
|
4910
|
+
|
|
4911
|
+
|
|
4912
|
+
function $5644ebd2c3dbfd7b$export$eea3a12df15499ca(metadataMapping, datasetInfo) {
|
|
4913
|
+
const rows = [];
|
|
4914
|
+
Object.keys(metadataMapping).forEach((d)=>{
|
|
4915
|
+
if (!datasetInfo[d]) return null;
|
|
4916
|
+
else rows.push(...metadataMapping[d](datasetInfo[d]));
|
|
4917
|
+
});
|
|
4918
|
+
return rows;
|
|
4919
|
+
}
|
|
4920
|
+
const $5644ebd2c3dbfd7b$var$DatasetAdditionalInformation = ({ datasetInfo: datasetInfo, id: id, metadataMapping: metadataMapping })=>{
|
|
4921
|
+
const rows = $5644ebd2c3dbfd7b$export$eea3a12df15499ca(metadataMapping, datasetInfo);
|
|
4922
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4923
|
+
className: "dc-c-additional-info-table ds-u-margin-bottom--6",
|
|
4924
|
+
children: [
|
|
4925
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
4926
|
+
className: "ds-text-heading--2xl ds-u-margin-y--3",
|
|
4927
|
+
children: "Additional Information"
|
|
4928
|
+
}),
|
|
4929
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
4930
|
+
compact: true,
|
|
4931
|
+
striped: true,
|
|
4932
|
+
children: [
|
|
4933
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
|
|
4934
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
4935
|
+
children: [
|
|
4936
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
4937
|
+
children: "Field"
|
|
4938
|
+
}),
|
|
4939
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
4940
|
+
children: "Value"
|
|
4941
|
+
})
|
|
4942
|
+
]
|
|
4943
|
+
})
|
|
4944
|
+
}),
|
|
4945
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableBody), {
|
|
4946
|
+
children: rows.map((r)=>/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
4947
|
+
children: [
|
|
4948
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
4949
|
+
children: r.label
|
|
4950
|
+
}),
|
|
4951
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
4952
|
+
className: "ds-u-word-break-anywhere",
|
|
4953
|
+
children: r.value
|
|
4954
|
+
})
|
|
4955
|
+
]
|
|
4956
|
+
}, `${r.label}_${id}`))
|
|
4957
|
+
})
|
|
4958
|
+
]
|
|
4959
|
+
})
|
|
4960
|
+
]
|
|
4961
|
+
});
|
|
4962
|
+
};
|
|
4963
|
+
var $5644ebd2c3dbfd7b$export$2e2bcd8739ae039 = $5644ebd2c3dbfd7b$var$DatasetAdditionalInformation;
|
|
4964
|
+
|
|
4965
|
+
|
|
4966
|
+
|
|
4967
|
+
|
|
4968
|
+
|
|
4969
|
+
|
|
4970
|
+
|
|
4971
|
+
|
|
4972
|
+
|
|
4973
|
+
|
|
4974
|
+
|
|
4975
|
+
|
|
4976
|
+
|
|
4977
|
+
|
|
4978
|
+
|
|
4979
|
+
const $6fd40f23575fa7f0$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: rootUrl, showRowLimitNotice: showRowLimitNotice = false, swaggerButtonClassNames: swaggerButtonClassNames = {} })=>{
|
|
4980
|
+
let params = {
|
|
4981
|
+
authentication: hideAuth ? false : undefined
|
|
4982
|
+
};
|
|
4983
|
+
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4984
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
4985
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
4986
|
+
className: "ds-l-container ds-u-padding--0 ds-u-margin-top--5",
|
|
4987
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
4988
|
+
url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4989
|
+
addQueryPrefix: true
|
|
4990
|
+
})}`,
|
|
4991
|
+
docExpansion: 'list',
|
|
4992
|
+
defaultModelsExpandDepth: -1,
|
|
4993
|
+
plugins: [
|
|
4994
|
+
(0, $5b656f0283afa250$export$2e2bcd8739ae039),
|
|
4995
|
+
(0, $ffd9c403a1c2fc39$export$2e2bcd8739ae039),
|
|
4996
|
+
(0, $30bfb3d671300bcd$export$2e2bcd8739ae039)({
|
|
4997
|
+
showRowLimitNotice: showRowLimitNotice,
|
|
4998
|
+
buttonClassNames: swaggerButtonClassNames
|
|
4999
|
+
})
|
|
5000
|
+
]
|
|
5001
|
+
})
|
|
5002
|
+
})
|
|
5003
|
+
});
|
|
5004
|
+
};
|
|
5005
|
+
var $6fd40f23575fa7f0$export$2e2bcd8739ae039 = $6fd40f23575fa7f0$var$APIPage;
|
|
5325
5006
|
|
|
5326
5007
|
|
|
5327
5008
|
|
|
5328
5009
|
|
|
5329
5010
|
|
|
5330
5011
|
|
|
5331
|
-
const $
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
to: page.path,
|
|
5336
|
-
class: "dc-c-breadcrumb__link",
|
|
5337
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5338
|
-
children: page.title
|
|
5339
|
-
})
|
|
5340
|
-
})
|
|
5341
|
-
}));
|
|
5342
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("nav", {
|
|
5343
|
-
class: "dc-c-breadcrumb ds-u-margin-top--6",
|
|
5344
|
-
"aria-label": "Breadcrumbs",
|
|
5345
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
|
|
5346
|
-
class: "dc-c-breadcrumb__list",
|
|
5012
|
+
const $026cb986f9fea2b1$var$PageNotFound = ({ siteUrl: siteUrl, content: content })=>{
|
|
5013
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
5014
|
+
className: "ds-l-container ds-u-padding-top--3",
|
|
5015
|
+
children: content ? content : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
5347
5016
|
children: [
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5017
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
5018
|
+
className: "ds-text-heading--4xl",
|
|
5019
|
+
children: "Error: Page not found"
|
|
5020
|
+
}),
|
|
5021
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
5022
|
+
children: [
|
|
5023
|
+
"We're sorry, but there is no ",
|
|
5024
|
+
siteUrl,
|
|
5025
|
+
" web page that matches your entry. You may have been directed here because:"
|
|
5026
|
+
]
|
|
5027
|
+
}),
|
|
5028
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
|
|
5029
|
+
children: [
|
|
5030
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
5031
|
+
children: "The address you typed contains a typo;"
|
|
5032
|
+
}),
|
|
5033
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
5034
|
+
children: "The requested page may have expired or;"
|
|
5035
|
+
}),
|
|
5036
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
5037
|
+
children: "The requested page may have been moved."
|
|
5038
|
+
})
|
|
5039
|
+
]
|
|
5040
|
+
}),
|
|
5041
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
5042
|
+
children: [
|
|
5043
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5044
|
+
className: "ds-u-font-weight--bold",
|
|
5045
|
+
children: "Note:"
|
|
5046
|
+
}),
|
|
5047
|
+
" If you were using a bookmark, please reset it once you find the correct page."
|
|
5048
|
+
]
|
|
5049
|
+
})
|
|
5356
5050
|
]
|
|
5357
5051
|
})
|
|
5358
5052
|
});
|
|
5359
5053
|
};
|
|
5360
|
-
$
|
|
5361
|
-
currentPage: (0, $hgUW1$proptypes).string.isRequired,
|
|
5362
|
-
pageTrail: (0, $hgUW1$proptypes).arrayOf((0, $hgUW1$proptypes).shape({
|
|
5363
|
-
path: (0, $hgUW1$proptypes).string.isRequired,
|
|
5364
|
-
title: (0, $hgUW1$proptypes).string.isRequired
|
|
5365
|
-
}))
|
|
5366
|
-
};
|
|
5367
|
-
var $ec3e23baa005dc03$export$2e2bcd8739ae039 = $ec3e23baa005dc03$var$Breadcrumb;
|
|
5054
|
+
var $026cb986f9fea2b1$export$2e2bcd8739ae039 = $026cb986f9fea2b1$var$PageNotFound;
|
|
5368
5055
|
|
|
5369
5056
|
|
|
5370
5057
|
|
|
@@ -5377,242 +5064,569 @@ var $ec3e23baa005dc03$export$2e2bcd8739ae039 = $ec3e23baa005dc03$var$Breadcrumb;
|
|
|
5377
5064
|
|
|
5378
5065
|
|
|
5379
5066
|
|
|
5380
|
-
const $94764de04eaf82f6$var$MagnifyingGlassIcon = (props)=>/*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
5381
|
-
fill: "#000000",
|
|
5382
|
-
width: "24px",
|
|
5383
|
-
height: "24px",
|
|
5384
|
-
viewBox: "0 0 250 250",
|
|
5385
|
-
id: "Flat",
|
|
5386
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5387
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
5388
|
-
d: "M232.47656,215.51563l-40.67773-40.67774a96.10791,96.10791,0,1,0-16.97168,16.96973l40.67871,40.67871a12.0001,12.0001,0,1,0,16.9707-16.9707ZM43.99707,116a72,72,0,1,1,72,72A72.08124,72.08124,0,0,1,43.99707,116Z"
|
|
5389
|
-
})
|
|
5390
|
-
});
|
|
5391
|
-
var $94764de04eaf82f6$export$2e2bcd8739ae039 = $94764de04eaf82f6$var$MagnifyingGlassIcon;
|
|
5392
5067
|
|
|
5393
5068
|
|
|
5394
5069
|
|
|
5395
5070
|
|
|
5396
|
-
const $
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5071
|
+
const $3b2d31a9c6cd2284$var$LargeFileInfo = (props)=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5072
|
+
className: props.className,
|
|
5073
|
+
children: [
|
|
5074
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
5075
|
+
children: "Some datasets contain very large files and, depending on your network characteristics and software, may take a long time to download or fail to download. Additionally, the number of rows in the file may be larger than the maximum rows your version of Microsoft Excel supports. If you can't download the file, we recommend engaging your IT support staff. If you are able to download the file but are unable to open it in MS Excel or get a message that the data has been truncated, we recommend trying alternative programs such as MS Access, Universal Viewer, Editpad or any other software your organization has available for large datasets."
|
|
5076
|
+
}),
|
|
5077
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
5078
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5079
|
+
to: "/about/software-specs-and-limits",
|
|
5080
|
+
children: "Click here to learn more about software specifications and limits."
|
|
5081
|
+
})
|
|
5082
|
+
})
|
|
5083
|
+
]
|
|
5407
5084
|
});
|
|
5408
|
-
var $
|
|
5085
|
+
var $3b2d31a9c6cd2284$export$2e2bcd8739ae039 = $3b2d31a9c6cd2284$var$LargeFileInfo;
|
|
5409
5086
|
|
|
5410
5087
|
|
|
5411
5088
|
|
|
5412
|
-
|
|
5413
|
-
|
|
5089
|
+
|
|
5090
|
+
|
|
5091
|
+
|
|
5092
|
+
const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
5093
|
+
const { text: text, altMobileStyle: altMobileStyle } = props;
|
|
5094
|
+
const sm = (0, $hgUW1$useMediaQuery)({
|
|
5095
|
+
minWidth: 0,
|
|
5096
|
+
maxWidth: 768
|
|
5097
|
+
});
|
|
5098
|
+
return altMobileStyle && sm ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
5099
|
+
className: "ds-u-margin-left--auto ds-u-padding-x--0 ds-c-button--solid dc-c-search-button-mobile",
|
|
5100
|
+
size: "big",
|
|
5101
|
+
type: "submit",
|
|
5102
|
+
style: {
|
|
5103
|
+
width: '70px'
|
|
5104
|
+
},
|
|
5105
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5106
|
+
className: "fas fa-search small-text"
|
|
5107
|
+
})
|
|
5108
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
5109
|
+
type: "submit",
|
|
5110
|
+
variation: "solid",
|
|
5111
|
+
className: "ds-l-col--2",
|
|
5414
5112
|
children: [
|
|
5415
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)(
|
|
5416
|
-
className:
|
|
5417
|
-
label: placeholder,
|
|
5418
|
-
labelClassName: "ds-u-visibility--screen-reader",
|
|
5419
|
-
placeholder: placeholder,
|
|
5420
|
-
onBlur: ()=>{},
|
|
5421
|
-
onChange: onChange,
|
|
5422
|
-
onKeyDown: onKeyDown,
|
|
5423
|
-
defaultValue: defaultValue
|
|
5424
|
-
}),
|
|
5425
|
-
showMagnifyingGlass && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5426
|
-
className: "magnifying-glass-icon ds-u-visibility--hidden ds-u-sm-visibility--visible",
|
|
5427
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $94764de04eaf82f6$export$2e2bcd8739ae039), {})
|
|
5113
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5114
|
+
className: "fas fa-search small-text ds-u-sm-display--none"
|
|
5428
5115
|
}),
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
className: onDark && 'on-dark',
|
|
5432
|
-
onClick: onSubmit,
|
|
5116
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5117
|
+
className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
|
|
5433
5118
|
children: [
|
|
5434
5119
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5435
|
-
|
|
5436
|
-
"aria-label": "Search the Data",
|
|
5437
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $94764de04eaf82f6$export$2e2bcd8739ae039), {})
|
|
5120
|
+
children: text ? text : 'Search'
|
|
5438
5121
|
}),
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
"Search the Data ",
|
|
5443
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $10acbeaa4d8f6040$export$2e2bcd8739ae039), {})
|
|
5444
|
-
]
|
|
5122
|
+
` `,
|
|
5123
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5124
|
+
className: "fas fa-arrow-right"
|
|
5445
5125
|
})
|
|
5446
5126
|
]
|
|
5447
|
-
}),
|
|
5448
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5449
|
-
className: "rounded-border"
|
|
5450
5127
|
})
|
|
5451
5128
|
]
|
|
5452
5129
|
});
|
|
5453
|
-
$bdb071ea3a6d3466$var$SearchInput.propTypes = {
|
|
5454
|
-
placeholder: (0, $hgUW1$proptypes).string,
|
|
5455
|
-
showMagnifyingGlass: (0, $hgUW1$proptypes).bool,
|
|
5456
|
-
showSearchButton: (0, $hgUW1$proptypes).bool,
|
|
5457
|
-
onDark: (0, $hgUW1$proptypes).bool,
|
|
5458
|
-
onChange: (0, $hgUW1$proptypes).func,
|
|
5459
|
-
onSubmit: (0, $hgUW1$proptypes).func,
|
|
5460
|
-
onKeyDown: (0, $hgUW1$proptypes).func,
|
|
5461
|
-
defaultValue: (0, $hgUW1$proptypes).string
|
|
5462
5130
|
};
|
|
5463
|
-
var $
|
|
5131
|
+
var $0a551147dc92a718$export$2e2bcd8739ae039 = $0a551147dc92a718$var$SearchButton;
|
|
5132
|
+
|
|
5133
|
+
|
|
5134
|
+
|
|
5135
|
+
|
|
5136
|
+
const $5723016a5461c1ca$var$PageHeader = (props)=>{
|
|
5137
|
+
const { headerText: headerText } = props;
|
|
5138
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5139
|
+
className: "ds-l-container",
|
|
5140
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5141
|
+
className: "ds-l-row",
|
|
5142
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5143
|
+
className: "ds-l-md-col--8",
|
|
5144
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
5145
|
+
className: "dc-c-entity__name ds-text-heading--3xl ds-u-margin-bottom--4",
|
|
5146
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5147
|
+
className: "ds-u-margin-right--2",
|
|
5148
|
+
"data-testid": "profile-full-name",
|
|
5149
|
+
children: headerText
|
|
5150
|
+
})
|
|
5151
|
+
})
|
|
5152
|
+
})
|
|
5153
|
+
})
|
|
5154
|
+
});
|
|
5155
|
+
};
|
|
5156
|
+
var $5723016a5461c1ca$export$2e2bcd8739ae039 = $5723016a5461c1ca$var$PageHeader;
|
|
5157
|
+
|
|
5158
|
+
|
|
5159
|
+
|
|
5464
5160
|
|
|
5465
5161
|
|
|
5466
5162
|
|
|
5163
|
+
function $eff7d34c30f5a0fc$export$959638e8dca60ce6(facets) {
|
|
5164
|
+
let facetObj = {};
|
|
5165
|
+
if (facets) {
|
|
5166
|
+
facets.forEach((f)=>{
|
|
5167
|
+
if (facetObj[f.type]) facetObj[f.type] = [
|
|
5168
|
+
...facetObj[f.type],
|
|
5169
|
+
f
|
|
5170
|
+
];
|
|
5171
|
+
else facetObj[f.type] = [
|
|
5172
|
+
f
|
|
5173
|
+
];
|
|
5174
|
+
});
|
|
5175
|
+
// sort facets descending by int value, put non int last
|
|
5176
|
+
if (facetObj.keyword) facetObj.keyword.sort((a, b)=>{
|
|
5177
|
+
if (Number(a.name) && Number(b.name)) return Number(b.name) - Number(a.name);
|
|
5178
|
+
});
|
|
5179
|
+
return facetObj;
|
|
5180
|
+
}
|
|
5181
|
+
}
|
|
5182
|
+
function $eff7d34c30f5a0fc$export$60ec7cc1d341a524(searchParams, defaultSortOptions) {
|
|
5183
|
+
const params = (0, $hgUW1$qs).parse(searchParams, {
|
|
5184
|
+
ignoreQueryPrefix: true
|
|
5185
|
+
});
|
|
5186
|
+
let themes = params.theme;
|
|
5187
|
+
let keywords = params.keyword;
|
|
5188
|
+
return {
|
|
5189
|
+
page: params.page,
|
|
5190
|
+
sort: !params.sort ? defaultSortOptions.defaultSort : params.sort,
|
|
5191
|
+
sortOrder: !params.sortOrder ? defaultSortOptions.defaultOrder : params.sortOrder,
|
|
5192
|
+
fulltext: params.fulltext,
|
|
5193
|
+
selectedFacets: {
|
|
5194
|
+
theme: themes ? themes : [],
|
|
5195
|
+
keyword: keywords ? keywords : []
|
|
5196
|
+
}
|
|
5197
|
+
};
|
|
5198
|
+
}
|
|
5199
|
+
async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA) {
|
|
5200
|
+
const { fulltext: fulltext, selectedFacets: selectedFacets, sort: sort, sortOrder: sortOrder, page: page, pageSize: pageSize } = options;
|
|
5201
|
+
let params = {
|
|
5202
|
+
fulltext: fulltext ? fulltext : undefined,
|
|
5203
|
+
...selectedFacets,
|
|
5204
|
+
sort: sort ? sort : undefined,
|
|
5205
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
5206
|
+
page: page !== 1 ? page : undefined,
|
|
5207
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
5208
|
+
};
|
|
5209
|
+
return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
5210
|
+
arrayFormat: 'comma',
|
|
5211
|
+
encode: false
|
|
5212
|
+
})}`);
|
|
5213
|
+
}
|
|
5214
|
+
|
|
5215
|
+
|
|
5467
5216
|
|
|
5468
5217
|
|
|
5469
5218
|
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5219
|
+
const $e873081a6e8f024e$var$sortOptions = [
|
|
5220
|
+
{
|
|
5221
|
+
label: 'Newest',
|
|
5222
|
+
value: 'newest'
|
|
5223
|
+
},
|
|
5224
|
+
{
|
|
5225
|
+
label: 'Oldest',
|
|
5226
|
+
value: 'oldest'
|
|
5227
|
+
},
|
|
5228
|
+
{
|
|
5229
|
+
label: 'Title A-Z',
|
|
5230
|
+
value: 'titleAZ'
|
|
5231
|
+
},
|
|
5232
|
+
{
|
|
5233
|
+
label: 'Title Z-A',
|
|
5234
|
+
value: 'titleZA'
|
|
5235
|
+
}
|
|
5236
|
+
];
|
|
5237
|
+
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
5238
|
+
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
5239
|
+
defaultSort: 'modified',
|
|
5240
|
+
defaultOrder: 'desc'
|
|
5241
|
+
}, pageTitle: pageTitle = 'Dataset Explorer', categoriesTitle: categoriesTitle = 'Categories', filterTitle: filterTitle = 'Tags', showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = '', showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false, showDateDetails: showDateDetails = false, updateDateMonthYearOnly: updateDateMonthYearOnly = false, showTopics: showTopics = false, topicSlugFunction: topicSlugFunction, analytics: analytics = false, onAnalyticsEvent: onAnalyticsEvent = ()=>{}, children: children } = props;
|
|
5242
|
+
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
5243
|
+
const [searchParams] = (0, $hgUW1$useSearchParams)();
|
|
5244
|
+
const navigate = (0, $hgUW1$useNavigate)();
|
|
5245
|
+
const location = (0, $hgUW1$useLocation)();
|
|
5246
|
+
// Derive all search state from URL params
|
|
5247
|
+
const selectedFacets = (0, $hgUW1$useMemo)(()=>{
|
|
5248
|
+
const parsed = (0, $hgUW1$qs).parse(searchParams.toString());
|
|
5249
|
+
const toArray = (val)=>{
|
|
5250
|
+
if (Array.isArray(val)) return val.filter((v)=>typeof v === 'string');
|
|
5251
|
+
if (typeof val === 'string') return [
|
|
5252
|
+
val
|
|
5253
|
+
];
|
|
5254
|
+
return [];
|
|
5255
|
+
};
|
|
5256
|
+
return {
|
|
5257
|
+
theme: toArray(parsed.theme),
|
|
5258
|
+
keyword: toArray(parsed.keyword)
|
|
5259
|
+
};
|
|
5260
|
+
}, [
|
|
5261
|
+
searchParams
|
|
5262
|
+
]);
|
|
5263
|
+
const page = Number(searchParams.get('page')) || 1;
|
|
5264
|
+
const sort = searchParams.get('sort') || defaultSort.defaultSort;
|
|
5265
|
+
const sortOrder = searchParams.get('sortOrder') || defaultSort.defaultOrder;
|
|
5266
|
+
const fulltext = searchParams.get('fulltext') || '';
|
|
5267
|
+
const sortDisplay = sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
|
|
5268
|
+
// Local UI state only
|
|
5269
|
+
const [filterText, setFilterText] = (0, $hgUW1$useState)(fulltext);
|
|
5270
|
+
// Sync filterText from URL on back/forward
|
|
5271
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
5272
|
+
setFilterText(fulltext);
|
|
5273
|
+
}, [
|
|
5274
|
+
fulltext
|
|
5275
|
+
]);
|
|
5276
|
+
function buildNextQueryString(overrides) {
|
|
5277
|
+
const current = (0, $hgUW1$qs).parse(searchParams.toString());
|
|
5278
|
+
const merged = {
|
|
5279
|
+
...current
|
|
5280
|
+
};
|
|
5281
|
+
Object.entries(overrides).forEach(([key, value])=>{
|
|
5282
|
+
if (value === null) delete merged[key];
|
|
5283
|
+
else merged[key] = value;
|
|
5284
|
+
});
|
|
5285
|
+
return (0, $hgUW1$qs).stringify(merged, {
|
|
5286
|
+
arrayFormat: 'indices',
|
|
5287
|
+
encode: true
|
|
5288
|
+
});
|
|
5289
|
+
}
|
|
5290
|
+
function updateSelectedFacets(key, value) {
|
|
5291
|
+
const current = selectedFacets[key] || [];
|
|
5292
|
+
const idx = current.indexOf(value);
|
|
5293
|
+
const updated = idx > -1 ? current.filter((_, i)=>i !== idx) : [
|
|
5294
|
+
...current,
|
|
5295
|
+
value
|
|
5296
|
+
];
|
|
5297
|
+
navigate({
|
|
5298
|
+
search: buildNextQueryString({
|
|
5299
|
+
[key]: updated.length ? updated : null,
|
|
5300
|
+
page: null
|
|
5301
|
+
})
|
|
5302
|
+
});
|
|
5303
|
+
}
|
|
5304
|
+
const setSortOptionsHandler = (value)=>{
|
|
5305
|
+
let nextSort;
|
|
5306
|
+
let nextSortOrder;
|
|
5307
|
+
switch(value){
|
|
5308
|
+
case 'newest':
|
|
5309
|
+
nextSort = 'modified';
|
|
5310
|
+
nextSortOrder = 'desc';
|
|
5311
|
+
break;
|
|
5312
|
+
case 'oldest':
|
|
5313
|
+
nextSort = 'modified';
|
|
5314
|
+
nextSortOrder = 'asc';
|
|
5315
|
+
break;
|
|
5316
|
+
case 'titleAZ':
|
|
5317
|
+
nextSort = 'title';
|
|
5318
|
+
nextSortOrder = 'asc';
|
|
5319
|
+
break;
|
|
5320
|
+
case 'titleZA':
|
|
5321
|
+
nextSort = 'title';
|
|
5322
|
+
nextSortOrder = 'desc';
|
|
5323
|
+
break;
|
|
5324
|
+
default:
|
|
5325
|
+
return;
|
|
5326
|
+
}
|
|
5327
|
+
const overrides = {
|
|
5328
|
+
sort: nextSort === defaultSort.defaultSort ? null : nextSort,
|
|
5329
|
+
sortOrder: nextSortOrder === defaultSort.defaultOrder ? null : nextSortOrder
|
|
5330
|
+
};
|
|
5331
|
+
navigate({
|
|
5332
|
+
search: buildNextQueryString(overrides)
|
|
5333
|
+
});
|
|
5334
|
+
};
|
|
5335
|
+
function resetFilters() {
|
|
5336
|
+
setFilterText('');
|
|
5337
|
+
navigate({
|
|
5338
|
+
search: ''
|
|
5339
|
+
});
|
|
5340
|
+
}
|
|
5341
|
+
const pageSize = defaultPageSize;
|
|
5342
|
+
const params = {
|
|
5343
|
+
fulltext: fulltext ? fulltext : undefined,
|
|
5344
|
+
...selectedFacets,
|
|
5345
|
+
sort: sort ? sort : undefined,
|
|
5346
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
5347
|
+
page: page !== 1 ? page : undefined,
|
|
5348
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
5349
|
+
};
|
|
5350
|
+
const { data: data, isPending: isPending } = (0, $hgUW1$useQuery)({
|
|
5351
|
+
queryKey: [
|
|
5352
|
+
"datasets",
|
|
5353
|
+
params
|
|
5354
|
+
],
|
|
5355
|
+
queryFn: ()=>{
|
|
5356
|
+
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
5357
|
+
arrayFormat: 'comma',
|
|
5358
|
+
encode: false
|
|
5359
|
+
})}`);
|
|
5360
|
+
}
|
|
5475
5361
|
});
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5362
|
+
const totalItems = data?.data?.total ? Number(data.data.total) : 0;
|
|
5363
|
+
const facets = data && data.data.facets ? (0, $eff7d34c30f5a0fc$export$959638e8dca60ce6)(data.data.facets) : {
|
|
5364
|
+
theme: null,
|
|
5365
|
+
keyword: null
|
|
5366
|
+
};
|
|
5367
|
+
const currentResultNumbers = (0, $hgUW1$useMemo)(()=>{
|
|
5368
|
+
const baseNumber = totalItems > 0 ? 1 : 0;
|
|
5369
|
+
const startingNumber = baseNumber + (pageSize * page - pageSize);
|
|
5370
|
+
const endingNumber = pageSize * page;
|
|
5371
|
+
return {
|
|
5372
|
+
total: totalItems,
|
|
5373
|
+
startingNumber: totalItems >= startingNumber ? startingNumber : 0,
|
|
5374
|
+
endingNumber: totalItems < endingNumber ? totalItems : endingNumber
|
|
5375
|
+
};
|
|
5376
|
+
}, [
|
|
5377
|
+
totalItems,
|
|
5378
|
+
pageSize,
|
|
5379
|
+
page
|
|
5380
|
+
]);
|
|
5381
|
+
const noResults = totalItems <= 0 && !isPending && data?.data?.results !== undefined;
|
|
5382
|
+
const announcementText = (0, $hgUW1$useMemo)(()=>{
|
|
5383
|
+
if (noResults) return 'No results found.';
|
|
5384
|
+
if (!isPending && (!data || !data.data.results)) return 'Could not connect to the API.';
|
|
5385
|
+
return `Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`;
|
|
5386
|
+
}, [
|
|
5387
|
+
data,
|
|
5388
|
+
isPending,
|
|
5389
|
+
noResults,
|
|
5390
|
+
currentResultNumbers
|
|
5391
|
+
]);
|
|
5392
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
5393
|
+
if (analytics && location.search) onAnalyticsEvent(location);
|
|
5394
|
+
}, [
|
|
5395
|
+
analytics,
|
|
5396
|
+
location.search
|
|
5397
|
+
]);
|
|
5398
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
5482
5399
|
children: [
|
|
5483
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)(
|
|
5484
|
-
|
|
5485
|
-
children: "Additional Information"
|
|
5400
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $5723016a5461c1ca$export$2e2bcd8739ae039), {
|
|
5401
|
+
headerText: pageTitle
|
|
5486
5402
|
}),
|
|
5487
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)(
|
|
5488
|
-
|
|
5489
|
-
striped: true,
|
|
5403
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("section", {
|
|
5404
|
+
className: "ds-l-container",
|
|
5490
5405
|
children: [
|
|
5491
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)(
|
|
5492
|
-
children: /*#__PURE__*/ (0, $hgUW1$
|
|
5406
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5407
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
5408
|
+
className: "ds-u-visibility--screen-reader",
|
|
5409
|
+
"aria-live": "assertive",
|
|
5410
|
+
"aria-atomic": "true",
|
|
5411
|
+
"data-testid": "currentResults",
|
|
5412
|
+
children: announcementText
|
|
5413
|
+
})
|
|
5414
|
+
}),
|
|
5415
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5416
|
+
className: "ds-l-row",
|
|
5417
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5418
|
+
className: "ds-l-col--12",
|
|
5493
5419
|
children: [
|
|
5494
|
-
|
|
5495
|
-
|
|
5420
|
+
children,
|
|
5421
|
+
introText ? introText : null,
|
|
5422
|
+
showLargeFileWarning && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5423
|
+
className: "ds-l-row ds-u-margin-bottom--2 ds-u-margin-top--4",
|
|
5424
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5425
|
+
className: "ds-l-md-col--12",
|
|
5426
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
|
|
5427
|
+
bordered: true,
|
|
5428
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
5429
|
+
contentClassName: "downloading-datasets",
|
|
5430
|
+
heading: "Please read before downloading datasets",
|
|
5431
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b2d31a9c6cd2284$export$2e2bcd8739ae039), {})
|
|
5432
|
+
})
|
|
5433
|
+
})
|
|
5434
|
+
})
|
|
5496
5435
|
}),
|
|
5497
|
-
/*#__PURE__*/ (0, $hgUW1$
|
|
5498
|
-
|
|
5436
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("form", {
|
|
5437
|
+
onSubmit: (e)=>{
|
|
5438
|
+
e.preventDefault();
|
|
5439
|
+
if (filterText) navigate({
|
|
5440
|
+
search: buildNextQueryString({
|
|
5441
|
+
fulltext: filterText,
|
|
5442
|
+
page: null
|
|
5443
|
+
})
|
|
5444
|
+
});
|
|
5445
|
+
else navigate({
|
|
5446
|
+
search: buildNextQueryString({
|
|
5447
|
+
fulltext: null,
|
|
5448
|
+
page: null
|
|
5449
|
+
})
|
|
5450
|
+
});
|
|
5451
|
+
},
|
|
5452
|
+
className: "dkan-dataset-search ds-l-form-row ds-u-padding-bottom--4 ds-u-border-bottom--1",
|
|
5453
|
+
children: [
|
|
5454
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5455
|
+
className: "ds-c-field__before fas fa-search ds-u-display--none ds-u-sm-display--inline-block"
|
|
5456
|
+
}),
|
|
5457
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
5458
|
+
fieldClassName: "ds-u-margin--0",
|
|
5459
|
+
value: filterText,
|
|
5460
|
+
className: `ds-u-padding-right--2 ${altMobileSearchButton ? 'ds-l-col--12 ds-l-md-col--10 --alt-style' : 'ds-l-col--10'}`,
|
|
5461
|
+
label: "Search datasets",
|
|
5462
|
+
labelClassName: "ds-u-visibility--screen-reader",
|
|
5463
|
+
placeholder: "Search datasets",
|
|
5464
|
+
name: "dataset_fulltext_search",
|
|
5465
|
+
onChange: (e)=>{
|
|
5466
|
+
setFilterText(e.target.value);
|
|
5467
|
+
}
|
|
5468
|
+
}),
|
|
5469
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $0a551147dc92a718$export$2e2bcd8739ae039), {
|
|
5470
|
+
altMobileStyle: altMobileSearchButton
|
|
5471
|
+
})
|
|
5472
|
+
]
|
|
5499
5473
|
})
|
|
5500
5474
|
]
|
|
5501
5475
|
})
|
|
5502
5476
|
}),
|
|
5503
|
-
/*#__PURE__*/ (0, $hgUW1$
|
|
5504
|
-
|
|
5477
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5478
|
+
className: "ds-l-row ds-u-padding-top--4",
|
|
5479
|
+
children: [
|
|
5480
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5481
|
+
className: "ds-l-col--12 ds-l-sm-col--4",
|
|
5505
5482
|
children: [
|
|
5506
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$
|
|
5507
|
-
|
|
5483
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
5484
|
+
className: "dc-dataset-search--clear-all-filters ds-u-margin-bottom--2",
|
|
5485
|
+
onClick: ()=>resetFilters(),
|
|
5486
|
+
children: "Clear all filters"
|
|
5508
5487
|
}),
|
|
5509
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $
|
|
5510
|
-
|
|
5511
|
-
|
|
5488
|
+
facets.theme && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e011250e8a3bd5e5$export$2e2bcd8739ae039), {
|
|
5489
|
+
facets: facets.theme,
|
|
5490
|
+
title: categoriesTitle,
|
|
5491
|
+
onClickFunction: updateSelectedFacets,
|
|
5492
|
+
selectedFacets: selectedFacets.theme
|
|
5493
|
+
}),
|
|
5494
|
+
facets.keyword && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $e011250e8a3bd5e5$export$2e2bcd8739ae039), {
|
|
5495
|
+
facets: facets.keyword,
|
|
5496
|
+
title: filterTitle,
|
|
5497
|
+
onClickFunction: updateSelectedFacets,
|
|
5498
|
+
selectedFacets: selectedFacets.keyword
|
|
5512
5499
|
})
|
|
5513
5500
|
]
|
|
5514
|
-
},
|
|
5501
|
+
}),
|
|
5502
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5503
|
+
className: "ds-l-col--12 ds-l-sm-col--8",
|
|
5504
|
+
children: isPending ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
5505
|
+
className: "ds-u-valign--middle",
|
|
5506
|
+
"aria-valuetext": "Dataset Search loading",
|
|
5507
|
+
role: "status"
|
|
5508
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
5509
|
+
children: [
|
|
5510
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5511
|
+
className: "ds-u-display--flex ds-u-justify-content--between ds-u-align-items--end ds-u-flex-wrap--reverse ds-u-sm-flex-wrap--wrap",
|
|
5512
|
+
children: [
|
|
5513
|
+
enablePagination && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5514
|
+
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--8 ds-u-sm-padding-left--0",
|
|
5515
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
5516
|
+
className: "ds-u-margin-y--0",
|
|
5517
|
+
children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
5518
|
+
children: [
|
|
5519
|
+
"Showing ",
|
|
5520
|
+
currentResultNumbers.startingNumber,
|
|
5521
|
+
" -",
|
|
5522
|
+
' ',
|
|
5523
|
+
currentResultNumbers.endingNumber,
|
|
5524
|
+
" of ",
|
|
5525
|
+
data.data.total,
|
|
5526
|
+
" datasets"
|
|
5527
|
+
]
|
|
5528
|
+
})
|
|
5529
|
+
})
|
|
5530
|
+
}),
|
|
5531
|
+
enableSort && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5532
|
+
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4 ds-u-sm-padding-right--0",
|
|
5533
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
5534
|
+
options: $e873081a6e8f024e$var$sortOptions,
|
|
5535
|
+
value: sortDisplay,
|
|
5536
|
+
label: "Sort",
|
|
5537
|
+
labelClassName: "ds-u-margin-top--0",
|
|
5538
|
+
name: "dataset_search_sort",
|
|
5539
|
+
onChange: (e)=>setSortOptionsHandler(e.target.value)
|
|
5540
|
+
})
|
|
5541
|
+
})
|
|
5542
|
+
]
|
|
5543
|
+
}),
|
|
5544
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
|
|
5545
|
+
className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0 ds-u-margin-bottom--4 ds-u-display--block",
|
|
5546
|
+
"data-testid": "results-list",
|
|
5547
|
+
children: [
|
|
5548
|
+
noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
5549
|
+
variation: "error",
|
|
5550
|
+
role: "region",
|
|
5551
|
+
heading: "No results found."
|
|
5552
|
+
}),
|
|
5553
|
+
data && data.data.results ? Object.values(data.data.results).map((item)=>{
|
|
5554
|
+
const downloadUrl = (()=>{
|
|
5555
|
+
const distribution_array = item.distribution ?? [];
|
|
5556
|
+
return distribution_array.length ? distribution_array[0].downloadURL : null;
|
|
5557
|
+
})();
|
|
5558
|
+
const showLargeFile = largeFileThemes && item.theme ? largeFileThemes.some((theme)=>item.theme.includes(theme)) : false;
|
|
5559
|
+
const dateDetailProps = showDateDetails ? {
|
|
5560
|
+
showDateDetails: showDateDetails,
|
|
5561
|
+
released: item.released,
|
|
5562
|
+
refresh: item.nextUpdateDate
|
|
5563
|
+
} : {};
|
|
5564
|
+
const topicProps = (()=>{
|
|
5565
|
+
if (!showTopics) return {};
|
|
5566
|
+
const topicSlugs = {};
|
|
5567
|
+
if (item.theme && Array.isArray(item.theme)) item.theme.forEach((topic)=>{
|
|
5568
|
+
if (topic) {
|
|
5569
|
+
const slug = topicSlugFunction ? topicSlugFunction(topic) : topic.split(' ').join('-').toLowerCase();
|
|
5570
|
+
if (slug) topicSlugs[topic] = slug;
|
|
5571
|
+
}
|
|
5572
|
+
});
|
|
5573
|
+
return {
|
|
5574
|
+
showTopics: showTopics,
|
|
5575
|
+
theme: item.theme,
|
|
5576
|
+
topicSlugs: topicSlugs
|
|
5577
|
+
};
|
|
5578
|
+
})();
|
|
5579
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $52c6454cae137465$export$2e2bcd8739ae039), {
|
|
5580
|
+
title: item.title,
|
|
5581
|
+
modified: item.modified,
|
|
5582
|
+
description: item.description,
|
|
5583
|
+
identifier: item.identifier,
|
|
5584
|
+
downloadUrl: showDownloadIcon ? downloadUrl : null,
|
|
5585
|
+
largeFile: showLargeFile,
|
|
5586
|
+
paginationEnabled: enablePagination,
|
|
5587
|
+
dataDictionaryLinks: dataDictionaryLinks,
|
|
5588
|
+
distribution: "%Ref:distribution" in item && item["%Ref:distribution"] ? item["%Ref:distribution"][0] : {},
|
|
5589
|
+
updateDateMonthYearOnly: updateDateMonthYearOnly,
|
|
5590
|
+
...dateDetailProps,
|
|
5591
|
+
...topicProps
|
|
5592
|
+
}, item.identifier);
|
|
5593
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
5594
|
+
variation: "error",
|
|
5595
|
+
role: "region",
|
|
5596
|
+
heading: "Could not connect to the API."
|
|
5597
|
+
})
|
|
5598
|
+
]
|
|
5599
|
+
}),
|
|
5600
|
+
enablePagination && data && data.data.total && Number(data.data.total) !== 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
5601
|
+
currentPage: Number(page),
|
|
5602
|
+
totalPages: Math.ceil(Number(data.data.total) / pageSize),
|
|
5603
|
+
onPageChange: (evt, page)=>{
|
|
5604
|
+
evt.preventDefault();
|
|
5605
|
+
window.scroll(0, 0);
|
|
5606
|
+
navigate({
|
|
5607
|
+
search: buildNextQueryString({
|
|
5608
|
+
page: page > 1 ? String(page) : null
|
|
5609
|
+
})
|
|
5610
|
+
});
|
|
5611
|
+
},
|
|
5612
|
+
renderHref: (p)=>{
|
|
5613
|
+
const nextQs = buildNextQueryString({
|
|
5614
|
+
page: p > 1 ? String(p) : null
|
|
5615
|
+
});
|
|
5616
|
+
return `/datasets?${nextQs}`;
|
|
5617
|
+
}
|
|
5618
|
+
})
|
|
5619
|
+
]
|
|
5620
|
+
})
|
|
5621
|
+
})
|
|
5622
|
+
]
|
|
5515
5623
|
})
|
|
5516
5624
|
]
|
|
5517
5625
|
})
|
|
5518
5626
|
]
|
|
5519
5627
|
});
|
|
5520
5628
|
};
|
|
5521
|
-
var $
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
const $6fd40f23575fa7f0$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: rootUrl, showRowLimitNotice: showRowLimitNotice = false, swaggerButtonClassNames: swaggerButtonClassNames = {} })=>{
|
|
5538
|
-
let params = {
|
|
5539
|
-
authentication: hideAuth ? false : undefined
|
|
5540
|
-
};
|
|
5541
|
-
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
5542
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
5543
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
5544
|
-
className: "ds-l-container ds-u-padding--0 ds-u-margin-top--5",
|
|
5545
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
5546
|
-
url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
5547
|
-
addQueryPrefix: true
|
|
5548
|
-
})}`,
|
|
5549
|
-
docExpansion: 'list',
|
|
5550
|
-
defaultModelsExpandDepth: -1,
|
|
5551
|
-
plugins: [
|
|
5552
|
-
(0, $5b656f0283afa250$export$2e2bcd8739ae039),
|
|
5553
|
-
(0, $ffd9c403a1c2fc39$export$2e2bcd8739ae039),
|
|
5554
|
-
(0, $30bfb3d671300bcd$export$2e2bcd8739ae039)({
|
|
5555
|
-
showRowLimitNotice: showRowLimitNotice,
|
|
5556
|
-
buttonClassNames: swaggerButtonClassNames
|
|
5557
|
-
})
|
|
5558
|
-
]
|
|
5559
|
-
})
|
|
5560
|
-
})
|
|
5561
|
-
});
|
|
5562
|
-
};
|
|
5563
|
-
var $6fd40f23575fa7f0$export$2e2bcd8739ae039 = $6fd40f23575fa7f0$var$APIPage;
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
const $026cb986f9fea2b1$var$PageNotFound = ({ siteUrl: siteUrl, content: content })=>{
|
|
5571
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
5572
|
-
className: "ds-l-container ds-u-padding-top--3",
|
|
5573
|
-
children: content ? content : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
5574
|
-
children: [
|
|
5575
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
5576
|
-
className: "ds-text-heading--4xl",
|
|
5577
|
-
children: "Error: Page not found"
|
|
5578
|
-
}),
|
|
5579
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
5580
|
-
children: [
|
|
5581
|
-
"We're sorry, but there is no ",
|
|
5582
|
-
siteUrl,
|
|
5583
|
-
" web page that matches your entry. You may have been directed here because:"
|
|
5584
|
-
]
|
|
5585
|
-
}),
|
|
5586
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
|
|
5587
|
-
children: [
|
|
5588
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
5589
|
-
children: "The address you typed contains a typo;"
|
|
5590
|
-
}),
|
|
5591
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
5592
|
-
children: "The requested page may have expired or;"
|
|
5593
|
-
}),
|
|
5594
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
5595
|
-
children: "The requested page may have been moved."
|
|
5596
|
-
})
|
|
5597
|
-
]
|
|
5598
|
-
}),
|
|
5599
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
5600
|
-
children: [
|
|
5601
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5602
|
-
className: "ds-u-font-weight--bold",
|
|
5603
|
-
children: "Note:"
|
|
5604
|
-
}),
|
|
5605
|
-
" If you were using a bookmark, please reset it once you find the correct page."
|
|
5606
|
-
]
|
|
5607
|
-
})
|
|
5608
|
-
]
|
|
5609
|
-
})
|
|
5610
|
-
});
|
|
5611
|
-
};
|
|
5612
|
-
var $026cb986f9fea2b1$export$2e2bcd8739ae039 = $026cb986f9fea2b1$var$PageNotFound;
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5629
|
+
var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039)($e873081a6e8f024e$var$DatasetSearch);
|
|
5616
5630
|
|
|
5617
5631
|
|
|
5618
5632
|
|
|
@@ -6034,13 +6048,23 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
6034
6048
|
}
|
|
6035
6049
|
// Change whether distribution API or dataset API is used based on option
|
|
6036
6050
|
const queryID = useDatasetAPI && datasetID ? `${datasetID}/0` : id;
|
|
6051
|
+
async function fetchJson(url) {
|
|
6052
|
+
const res = await fetch(url);
|
|
6053
|
+
const body = await res.json().catch(()=>({}));
|
|
6054
|
+
if (!res.ok) {
|
|
6055
|
+
const err = new Error(body.message || body.error || res.statusText);
|
|
6056
|
+
err.status = res.status;
|
|
6057
|
+
throw err;
|
|
6058
|
+
}
|
|
6059
|
+
return body;
|
|
6060
|
+
}
|
|
6037
6061
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
6038
6062
|
queryKey: [
|
|
6039
6063
|
"datastore" + id + paramsString
|
|
6040
6064
|
],
|
|
6041
6065
|
queryFn: ()=>{
|
|
6042
6066
|
setCount(null);
|
|
6043
|
-
return
|
|
6067
|
+
return fetchJson(`${rootUrl}/datastore/query/${queryID}?${paramsString}`);
|
|
6044
6068
|
},
|
|
6045
6069
|
enabled: enabled
|
|
6046
6070
|
});
|
|
@@ -6054,7 +6078,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
6054
6078
|
count: true,
|
|
6055
6079
|
schema: true
|
|
6056
6080
|
};
|
|
6057
|
-
return
|
|
6081
|
+
return fetchJson(`${rootUrl}/datastore/query/${queryID}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(unfilteredParams, ACA))}`);
|
|
6058
6082
|
}
|
|
6059
6083
|
});
|
|
6060
6084
|
(0, $hgUW1$useEffect)(()=>{
|
|
@@ -6077,6 +6101,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
6077
6101
|
]);
|
|
6078
6102
|
return {
|
|
6079
6103
|
loading: enabled ? isPending : false,
|
|
6104
|
+
error: error,
|
|
6080
6105
|
values: values,
|
|
6081
6106
|
count: count,
|
|
6082
6107
|
columns: columns,
|
|
@@ -7421,7 +7446,8 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
7421
7446
|
customColumns: customColumns,
|
|
7422
7447
|
dataDictionaryBanner: dataDictionaryBanner && displayDataDictionaryTab,
|
|
7423
7448
|
datasetTableControls: !disableTableControls,
|
|
7424
|
-
enableEmptyFilters: enableEmptyFilters
|
|
7449
|
+
enableEmptyFilters: enableEmptyFilters,
|
|
7450
|
+
relativeHomeUrlPrepend: tabHrefPrepend
|
|
7425
7451
|
},
|
|
7426
7452
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $39bc4d98030a5599$export$2e2bcd8739ae039), {})
|
|
7427
7453
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|