@civicactions/cmsds-open-data-components 3.9.0-alpha.3 → 3.9.0-alpha.4
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 +4 -14
- package/dist/main.css.map +1 -1
- package/dist/main.js +778 -680
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +45 -44
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -2,7 +2,7 @@ import "./main.css";
|
|
|
2
2
|
import {jsx as $hgUW1$jsx, jsxs as $hgUW1$jsxs, Fragment as $hgUW1$Fragment} from "react/jsx-runtime";
|
|
3
3
|
import {Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, Button as $hgUW1$Button, CloseIconThin as $hgUW1$CloseIconThin, ArrowIcon as $hgUW1$ArrowIcon, Spinner as $hgUW1$Spinner, Alert as $hgUW1$Alert, Dialog as $hgUW1$Dialog, TextField as $hgUW1$TextField, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon, Dropdown as $hgUW1$Dropdown, Choice as $hgUW1$Choice, Pagination as $hgUW1$Pagination, Badge as $hgUW1$Badge, Table as $hgUW1$Table, TableHead as $hgUW1$TableHead, TableRow as $hgUW1$TableRow, TableCell as $hgUW1$TableCell, TableBody as $hgUW1$TableBody, Tabs as $hgUW1$Tabs, TabPanel as $hgUW1$TabPanel} from "@cmsgov/design-system";
|
|
4
4
|
import $hgUW1$react, {createContext as $hgUW1$createContext, useState as $hgUW1$useState, useRef as $hgUW1$useRef, useEffect as $hgUW1$useEffect, useContext as $hgUW1$useContext, useMemo as $hgUW1$useMemo, useCallback as $hgUW1$useCallback} from "react";
|
|
5
|
-
import {NavLink as $hgUW1$NavLink,
|
|
5
|
+
import {NavLink as $hgUW1$NavLink, useLocation as $hgUW1$useLocation, useSearchParams as $hgUW1$useSearchParams, Link as $hgUW1$Link, useNavigate as $hgUW1$useNavigate} from "react-router-dom";
|
|
6
6
|
import $hgUW1$qs from "qs";
|
|
7
7
|
import $hgUW1$axios from "axios";
|
|
8
8
|
import {useQuery as $hgUW1$useQuery, QueryClient as $hgUW1$QueryClient, QueryClientProvider as $hgUW1$QueryClientProvider} from "@tanstack/react-query";
|
|
@@ -41,7 +41,7 @@ function $e49d4387bed21287$export$2e2bcd8739ae039() {
|
|
|
41
41
|
/*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
|
|
42
42
|
children: "offset"
|
|
43
43
|
}),
|
|
44
|
-
|
|
44
|
+
' ',
|
|
45
45
|
"parameters to iterate through result sets that are larger than the row limit when running queries against the datastore API."
|
|
46
46
|
]
|
|
47
47
|
})
|
|
@@ -72,7 +72,7 @@ var $3c72c298c3a7f21f$export$2e2bcd8739ae039 = $3c72c298c3a7f21f$var$HeaderTagli
|
|
|
72
72
|
const $1555e1cb3eb7b3e3$var$HeaderNavIconLink = (props)=>{
|
|
73
73
|
const { url: url, urlTitle: urlTitle, logoFilePath: logoFilePath, logoAltText: logoAltText, backArrow: backArrow } = props;
|
|
74
74
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
75
|
-
className: `dkan-c-header-nav-icon-link ${backArrow ?
|
|
75
|
+
className: `dkan-c-header-nav-icon-link ${backArrow ? 'show-back-arrow' : ''} ds-u-valign--middle `,
|
|
76
76
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
77
77
|
href: url,
|
|
78
78
|
title: urlTitle,
|
|
@@ -232,7 +232,7 @@ const $046ded0064bd0a3d$var$FAQAccordion = (props)=>{
|
|
|
232
232
|
type: "button",
|
|
233
233
|
variation: "ghost",
|
|
234
234
|
onClick: ()=>toggleAll(),
|
|
235
|
-
children: `${expanded ?
|
|
235
|
+
children: `${expanded ? 'Collapse' : 'Expand'} all FAQs`
|
|
236
236
|
}),
|
|
237
237
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
|
|
238
238
|
children: faqItems.map((faq)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
@@ -275,6 +275,7 @@ var $11500a65bd7d9cf1$export$2e2bcd8739ae039 = $11500a65bd7d9cf1$var$HeaderConte
|
|
|
275
275
|
|
|
276
276
|
|
|
277
277
|
|
|
278
|
+
|
|
278
279
|
const $61ff88fb3f6ee2c8$var$queryClient = new (0, $hgUW1$QueryClient)({
|
|
279
280
|
defaultOptions: {
|
|
280
281
|
queries: {
|
|
@@ -298,19 +299,37 @@ var $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 = $61ff88fb3f6ee2c8$var$withQueryPr
|
|
|
298
299
|
|
|
299
300
|
|
|
300
301
|
|
|
302
|
+
|
|
301
303
|
const $4808982eba3feb88$var$DatasetListSubmenuItem = (props)=>{
|
|
302
|
-
const
|
|
304
|
+
const desktop = (0, $hgUW1$useMediaQuery)({
|
|
305
|
+
minWidth: 1024
|
|
306
|
+
});
|
|
307
|
+
const { title: title, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
|
|
308
|
+
let linkContainerClasses = 'ds-u-margin-bottom--2';
|
|
309
|
+
if (dataDictionaryLinks) linkContainerClasses += ' ds-l-col--6 ds-u-padding-right--0';
|
|
310
|
+
else linkContainerClasses += ' ds-l-col--auto ds-u-padding-left--0';
|
|
311
|
+
let linkClasses = 'ds-u-display--block ds-u-text-align--left';
|
|
312
|
+
if (desktop) {
|
|
313
|
+
linkContainerClasses = 'ds-u-padding-x--0';
|
|
314
|
+
linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
|
|
315
|
+
}
|
|
303
316
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
304
|
-
className: "dc-c-list-item",
|
|
305
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)(
|
|
306
|
-
className: `ds-u-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
317
|
+
className: "dc-c-list-item ds-u-padding-top--4",
|
|
318
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
319
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? 'ds-u-border-top--1' : 'ds-u-border-bottom--1 ds-u-padding-bottom--3'}`,
|
|
320
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
321
|
+
className: "ds-l-row ds-u-align-items--start",
|
|
322
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
323
|
+
"aria-describedby": `dataset-${identifier}-updated-date`,
|
|
324
|
+
to: `/dataset/${identifier}`,
|
|
325
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
326
|
+
className: "ds-l-col--12 ds-text-heading--md",
|
|
327
|
+
children: title
|
|
328
|
+
})
|
|
329
|
+
})
|
|
311
330
|
})
|
|
312
331
|
})
|
|
313
|
-
}
|
|
332
|
+
});
|
|
314
333
|
};
|
|
315
334
|
var $4808982eba3feb88$export$2e2bcd8739ae039 = $4808982eba3feb88$var$DatasetListSubmenuItem;
|
|
316
335
|
|
|
@@ -369,12 +388,12 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
369
388
|
fulltext: fulltext ? fulltext : undefined,
|
|
370
389
|
...selectedFacets,
|
|
371
390
|
sort: sort ? sort : undefined,
|
|
372
|
-
[
|
|
391
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
373
392
|
page: page !== 1 ? page : undefined,
|
|
374
|
-
[
|
|
393
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
375
394
|
};
|
|
376
395
|
return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
377
|
-
arrayFormat:
|
|
396
|
+
arrayFormat: 'comma',
|
|
378
397
|
encode: false
|
|
379
398
|
})}`);
|
|
380
399
|
}
|
|
@@ -382,20 +401,21 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
382
401
|
|
|
383
402
|
|
|
384
403
|
|
|
385
|
-
|
|
386
404
|
const $844981eac9b63865$export$eccc29c8d0ff408 = (0, $hgUW1$createContext)({
|
|
387
405
|
ACA: undefined
|
|
388
406
|
});
|
|
389
407
|
|
|
390
408
|
|
|
391
|
-
const $
|
|
392
|
-
defaultSort:
|
|
393
|
-
|
|
394
|
-
|
|
409
|
+
const $9384a736d4d6f425$var$DatasetListSubmenu = (props)=>{
|
|
410
|
+
const { rootUrl: rootUrl, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 3, defaultSort: defaultSort = {
|
|
411
|
+
defaultSort: 'modified',
|
|
412
|
+
defaultOrder: 'desc'
|
|
413
|
+
}, dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
395
414
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
396
415
|
const defaultSortBy = "";
|
|
397
416
|
const defaultSortOrder = "";
|
|
398
417
|
const defaultPage = 1;
|
|
418
|
+
const location = (0, $hgUW1$useLocation)();
|
|
399
419
|
const transformedParams = (0, $eff7d34c30f5a0fc$export$60ec7cc1d341a524)(location.search, defaultSort);
|
|
400
420
|
const [currentResultNumbers, setCurrentResultNumbers] = (0, $hgUW1$useState)({
|
|
401
421
|
total: 0,
|
|
@@ -403,7 +423,7 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
|
|
|
403
423
|
endingNumber: 0
|
|
404
424
|
});
|
|
405
425
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
406
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
426
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)('');
|
|
407
427
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
408
428
|
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
409
429
|
const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
|
|
@@ -414,7 +434,7 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
|
|
|
414
434
|
// Update browser URL with current search params
|
|
415
435
|
const params = buildSearchParams(true);
|
|
416
436
|
const url = new URL(window.location.href);
|
|
417
|
-
window.history.pushState({},
|
|
437
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${params}`);
|
|
418
438
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
419
439
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
420
440
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -453,9 +473,9 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
|
|
|
453
473
|
}
|
|
454
474
|
let params = {
|
|
455
475
|
sort: sort ? sort : undefined,
|
|
456
|
-
[
|
|
476
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
457
477
|
page: page !== 1 ? page : undefined,
|
|
458
|
-
[
|
|
478
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
459
479
|
};
|
|
460
480
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
461
481
|
queryKey: [
|
|
@@ -464,7 +484,7 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
|
|
|
464
484
|
],
|
|
465
485
|
queryFn: ()=>{
|
|
466
486
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
467
|
-
arrayFormat:
|
|
487
|
+
arrayFormat: 'comma',
|
|
468
488
|
encode: false
|
|
469
489
|
})}`);
|
|
470
490
|
}
|
|
@@ -472,43 +492,49 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
|
|
|
472
492
|
if (data && data.data.total && totalItems != data.data.total) setTotalItems(data.data.total);
|
|
473
493
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
474
494
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
475
|
-
className: "
|
|
476
|
-
children:
|
|
477
|
-
className: "ds-u-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
495
|
+
className: "ds-l-container",
|
|
496
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
497
|
+
className: "ds-l-row ds-u-padding-top--4",
|
|
498
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
499
|
+
className: "ds-l-col--12",
|
|
500
|
+
children: isPending ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
501
|
+
className: "ds-u-valign--middle",
|
|
502
|
+
"aria-valuetext": "Dataset Search loading",
|
|
503
|
+
role: "status"
|
|
504
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
485
505
|
children: [
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
heading: "No results found."
|
|
506
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("h3", {
|
|
507
|
+
children: "Test submenu list of new datasets."
|
|
489
508
|
}),
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
509
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
|
|
510
|
+
className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0 ds-u-margin-bottom--4 ds-u-display--block",
|
|
511
|
+
"data-testid": "results-list",
|
|
512
|
+
children: [
|
|
513
|
+
noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
514
|
+
variation: "error",
|
|
515
|
+
heading: "No results found."
|
|
516
|
+
}),
|
|
517
|
+
data && data.data.results ? Object.keys(data.data.results).map((key)=>{
|
|
518
|
+
return data.data.results[key];
|
|
519
|
+
}).map((item)=>{
|
|
520
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $4808982eba3feb88$export$2e2bcd8739ae039), {
|
|
521
|
+
title: item.title,
|
|
522
|
+
identifier: item.identifier,
|
|
523
|
+
paginationEnabled: enablePagination,
|
|
524
|
+
dataDictionaryLinks: dataDictionaryLinks
|
|
525
|
+
}, item.identifier);
|
|
526
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
527
|
+
variation: "error",
|
|
528
|
+
heading: "Could not connect to the API."
|
|
529
|
+
})
|
|
530
|
+
]
|
|
531
|
+
}),
|
|
532
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
533
|
+
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",
|
|
534
|
+
children: enablePagination && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
535
|
+
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--8",
|
|
510
536
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
511
|
-
className: "ds-u-margin-y--0
|
|
537
|
+
className: "ds-u-margin-y--0",
|
|
512
538
|
"aria-hidden": "true",
|
|
513
539
|
children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
514
540
|
children: [
|
|
@@ -519,41 +545,23 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
|
|
|
519
545
|
]
|
|
520
546
|
})
|
|
521
547
|
})
|
|
522
|
-
}),
|
|
523
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
524
|
-
className: "",
|
|
525
|
-
children: data && data.data.total > 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
526
|
-
className: "ds-u-padding--0 ds-c-button ds-c-button--ghost dkan-c-header--link",
|
|
527
|
-
to: `../whats-new`,
|
|
528
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
529
|
-
className: "ds-text-heading--md",
|
|
530
|
-
children: [
|
|
531
|
-
" ",
|
|
532
|
-
`View all ${data.data.total} entries`,
|
|
533
|
-
" "
|
|
534
|
-
]
|
|
535
|
-
})
|
|
536
|
-
})
|
|
537
548
|
})
|
|
538
|
-
|
|
539
|
-
|
|
549
|
+
})
|
|
550
|
+
]
|
|
540
551
|
})
|
|
541
|
-
|
|
552
|
+
})
|
|
542
553
|
})
|
|
543
554
|
})
|
|
544
555
|
});
|
|
545
556
|
};
|
|
546
|
-
var $
|
|
557
|
+
var $9384a736d4d6f425$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039)($9384a736d4d6f425$var$DatasetListSubmenu);
|
|
547
558
|
|
|
548
559
|
|
|
549
560
|
|
|
550
561
|
|
|
551
562
|
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
const $6d0cf21faac6a2dd$var$SubMenuStaticList = ({ submenuArray: submenuArray, subLinkClasses: subLinkClasses, setIsExpanded: setIsExpanded })=>{
|
|
555
|
-
// Render a static list of submenu items as listed in the assets/menu.jsx file.
|
|
556
|
-
let submenuItems = submenuArray.map((s)=>{
|
|
563
|
+
const $4f153ca537d853e5$var$SubMenuStaticItem = (submenuArray, subLinkClasses)=>// @todo: Move into a separate component
|
|
564
|
+
submenuArray.map((s)=>{
|
|
557
565
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
558
566
|
children: s.external || s.drupalPage ? /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
559
567
|
href: s.url,
|
|
@@ -567,7 +575,7 @@ const $6d0cf21faac6a2dd$var$SubMenuStaticList = ({ submenuArray: submenuArray, s
|
|
|
567
575
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$NavLink), {
|
|
568
576
|
to: s.url,
|
|
569
577
|
className: `ds-u-display-flex ds-u-align-items--center ${subLinkClasses}`,
|
|
570
|
-
onClick: ()=>setIsExpanded(
|
|
578
|
+
onClick: ()=>setIsExpanded(!isExpanded),
|
|
571
579
|
children: [
|
|
572
580
|
s.icon ?? null,
|
|
573
581
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -577,16 +585,19 @@ const $6d0cf21faac6a2dd$var$SubMenuStaticList = ({ submenuArray: submenuArray, s
|
|
|
577
585
|
})
|
|
578
586
|
}, s.id);
|
|
579
587
|
});
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
588
|
+
const $4f153ca537d853e5$var$SubMenuDynamicList = ({ rootUrl: rootUrl, location: location })=>{
|
|
589
|
+
// @todo: If we don't need subLinkClasses, call the DatasetListSubmenu component directly.
|
|
590
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $9384a736d4d6f425$export$2e2bcd8739ae039), {
|
|
591
|
+
rootUrl: rootUrl,
|
|
592
|
+
location: location,
|
|
593
|
+
formClassName: "ds-u-display--flex ds-u-align-items--end ds-u-justify-content--between ds-u-margin-bottom--2",
|
|
594
|
+
fulltextLabelClassName: "",
|
|
595
|
+
fulltextPlaceholder: "",
|
|
596
|
+
fulltextLabel: "Dataset submenu List"
|
|
583
597
|
});
|
|
584
598
|
};
|
|
585
|
-
var $6d0cf21faac6a2dd$export$2e2bcd8739ae039 = $6d0cf21faac6a2dd$var$SubMenuStaticList;
|
|
586
|
-
|
|
587
|
-
|
|
588
599
|
const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, subLinkClasses: subLinkClasses, wrapLabel: wrapLabel = true })=>{
|
|
589
|
-
const [
|
|
600
|
+
const [isExpanded1, setIsExpanded1] = (0, $hgUW1$useState)(false);
|
|
590
601
|
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
591
602
|
const innerHtml = wrapLabel ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
592
603
|
children: link.label
|
|
@@ -596,38 +607,27 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
596
607
|
let currentMenu = null;
|
|
597
608
|
if (menu.current) currentMenu = menu.current;
|
|
598
609
|
function handleClickOutside(event) {
|
|
599
|
-
if (currentMenu && !currentMenu.contains(event.target))
|
|
610
|
+
if (currentMenu && !currentMenu.contains(event.target)) setIsExpanded1(false);
|
|
600
611
|
}
|
|
601
612
|
function handleFocusOut(event) {
|
|
602
|
-
if (currentMenu && !currentMenu.contains(event.relatedTarget))
|
|
613
|
+
if (currentMenu && !currentMenu.contains(event.relatedTarget)) setIsExpanded1(false);
|
|
603
614
|
}
|
|
604
|
-
document.addEventListener(
|
|
605
|
-
currentMenu?.addEventListener(
|
|
615
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
616
|
+
currentMenu?.addEventListener('focusout', handleFocusOut);
|
|
606
617
|
return ()=>{
|
|
607
|
-
document.removeEventListener(
|
|
608
|
-
if (currentMenu) currentMenu.removeEventListener(
|
|
618
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
619
|
+
if (currentMenu) currentMenu.removeEventListener('focusout', handleFocusOut);
|
|
609
620
|
};
|
|
610
621
|
}, [
|
|
611
|
-
|
|
622
|
+
isExpanded1
|
|
612
623
|
]);
|
|
613
624
|
let submenuBlock;
|
|
614
625
|
if (link.submenu) {
|
|
615
|
-
if (Array.isArray(link.submenu)) submenuBlock =
|
|
616
|
-
|
|
617
|
-
subLinkClasses: subLinkClasses,
|
|
618
|
-
setIsExpanded: setIsExpanded
|
|
619
|
-
});
|
|
620
|
-
else if (/*#__PURE__*/ (0, $hgUW1$react).isValidElement(link.submenu)) {
|
|
621
|
-
const { rootUrl: rootUrl, location: location } = link.submenu.props;
|
|
622
|
-
submenuBlock = /*#__PURE__*/ (0, $hgUW1$jsx)((0, $10bc3aae21fc1572$export$2e2bcd8739ae039), {
|
|
623
|
-
location: location,
|
|
624
|
-
rootUrl: rootUrl,
|
|
625
|
-
subLinkClasses: subLinkClasses
|
|
626
|
-
});
|
|
627
|
-
}
|
|
626
|
+
if (Array.isArray(link.submenu)) submenuBlock = $4f153ca537d853e5$var$SubMenuStaticItem(link.submenu, subLinkClasses);
|
|
627
|
+
else if (/*#__PURE__*/ (0, $hgUW1$react).isValidElement(link.submenu)) submenuBlock = $4f153ca537d853e5$var$SubMenuDynamicList(link.submenu, subLinkClasses);
|
|
628
628
|
}
|
|
629
629
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
630
|
-
className: `dkan-c-nav-submenu has-submenu${
|
|
630
|
+
className: `dkan-c-nav-submenu has-submenu${isExpanded1 ? ' open' : ''}`,
|
|
631
631
|
ref: menu,
|
|
632
632
|
children: [
|
|
633
633
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
@@ -635,20 +635,23 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
635
635
|
onDark: headerContext.onDark,
|
|
636
636
|
className: `${linkClasses}`,
|
|
637
637
|
"aria-haspopup": "true",
|
|
638
|
-
"aria-expanded":
|
|
638
|
+
"aria-expanded": isExpanded1,
|
|
639
639
|
onClick: (e)=>{
|
|
640
640
|
e.preventDefault();
|
|
641
|
-
|
|
641
|
+
setIsExpanded1(!isExpanded1);
|
|
642
642
|
},
|
|
643
643
|
children: [
|
|
644
644
|
innerHtml,
|
|
645
645
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
|
|
646
646
|
className: "ds-u-margin-left--1",
|
|
647
|
-
direction:
|
|
647
|
+
direction: isExpanded1 ? "down" : "right"
|
|
648
648
|
})
|
|
649
649
|
]
|
|
650
650
|
}),
|
|
651
|
-
|
|
651
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
652
|
+
className: "dkan-c-site-menu--sub-menu",
|
|
653
|
+
children: submenuBlock
|
|
654
|
+
})
|
|
652
655
|
]
|
|
653
656
|
});
|
|
654
657
|
};
|
|
@@ -663,12 +666,12 @@ var $4f153ca537d853e5$export$2e2bcd8739ae039 = $4f153ca537d853e5$var$SubMenu;
|
|
|
663
666
|
const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
|
|
664
667
|
const { headingText: headingText = "Dataset Search" } = props;
|
|
665
668
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
666
|
-
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)(
|
|
669
|
+
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)('');
|
|
667
670
|
const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
|
|
668
671
|
function searchForDataset(e) {
|
|
669
672
|
e.preventDefault();
|
|
670
673
|
if (window) {
|
|
671
|
-
if (window.location.pathname !==
|
|
674
|
+
if (window.location.pathname !== '/datasets') navigate(`/datasets?fulltext=${modalSearchTerm}`);
|
|
672
675
|
else {
|
|
673
676
|
window.location.search = `fulltext=${modalSearchTerm}`;
|
|
674
677
|
setModalSearch(false);
|
|
@@ -735,9 +738,9 @@ const $b939b31651e82908$var$HeaderNav = (props)=>{
|
|
|
735
738
|
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
736
739
|
const { links: links, topNavLinks: topNavLinks, wrapperClasses: wrapperClasses, searchInMobile: searchInMobile } = props;
|
|
737
740
|
const navMenuOpenClass = `dkan-c-nav-menu--${headerContext.mobileMenuOpen ? "open" : "close"}`;
|
|
738
|
-
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ?
|
|
739
|
-
const linkClasses =
|
|
740
|
-
const listClasses =
|
|
741
|
+
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ? 'mobile' : 'desktop'}`;
|
|
742
|
+
const linkClasses = 'dkan-c-header--link ds-c-button ds-c-button--ghost';
|
|
743
|
+
const listClasses = 'dkan-c-header--link-list ';
|
|
741
744
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
742
745
|
className: `dkan-c-nav-menu ${wrapperClasses} ${navMenuOpenClass} ${isMobileClass}`,
|
|
743
746
|
ref: headerContext.menuRef,
|
|
@@ -907,8 +910,8 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
907
910
|
const { title: title, links: links, mobileMax: mobileMax } = props;
|
|
908
911
|
const active = (0, $hgUW1$useLocation)().pathname;
|
|
909
912
|
const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
|
|
910
|
-
const styleClasses =
|
|
911
|
-
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ?
|
|
913
|
+
const styleClasses = 'dkan-c--sidebar-nav-wrapper ds-u-border--1 ds-u-border--color-gray-lightest ds-u-padding--2';
|
|
914
|
+
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ? 'mobile' : 'desktop'}`;
|
|
912
915
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
913
916
|
className: `dkan-c-sidebar-nav ${mobileClass}`,
|
|
914
917
|
children: [
|
|
@@ -922,7 +925,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
922
925
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
923
926
|
"aria-haspopup": "true",
|
|
924
927
|
variation: "ghost",
|
|
925
|
-
"aria-expanded": `${menuOpen ?
|
|
928
|
+
"aria-expanded": `${menuOpen ? 'true' : 'false'}`,
|
|
926
929
|
onDark: true,
|
|
927
930
|
onClick: ()=>setMenuOpen(!menuOpen),
|
|
928
931
|
children: [
|
|
@@ -931,7 +934,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
931
934
|
children: "Toggle menu"
|
|
932
935
|
}),
|
|
933
936
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
|
|
934
|
-
direction: menuOpen ?
|
|
937
|
+
direction: menuOpen ? 'up' : 'down'
|
|
935
938
|
})
|
|
936
939
|
]
|
|
937
940
|
})
|
|
@@ -940,7 +943,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
940
943
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
941
944
|
className: ``,
|
|
942
945
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
|
|
943
|
-
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ?
|
|
946
|
+
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ? 'open' : 'close'}`,
|
|
944
947
|
children: [
|
|
945
948
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
946
949
|
className: "ds-u-padding--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest",
|
|
@@ -952,7 +955,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
952
955
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
953
956
|
className: "ds-u-padding-bottom--2",
|
|
954
957
|
children: links.map(({ url: url, label: label })=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
955
|
-
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ?
|
|
958
|
+
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ? 'active' : ''}`,
|
|
956
959
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
957
960
|
className: "ds-u-display--flex ds-u-padding-y--1",
|
|
958
961
|
children: [
|
|
@@ -987,12 +990,12 @@ const $b0968edc60d7d3a4$var$SidebarPage = (props)=>{
|
|
|
987
990
|
query: `(max-width: ${mobileMaxWidth}px)`
|
|
988
991
|
});
|
|
989
992
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
990
|
-
className: `${mobileMax ? "a" :
|
|
993
|
+
className: `${mobileMax ? "a" : 'ds-l-container'}`,
|
|
991
994
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
992
|
-
className: `${mobileMax ? "a" :
|
|
995
|
+
className: `${mobileMax ? "a" : 'ds-l-row'}`,
|
|
993
996
|
children: [
|
|
994
997
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
995
|
-
className: `${mobileMax ?
|
|
998
|
+
className: `${mobileMax ? 'a' : "ds-l-col--4"}`,
|
|
996
999
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $953b286f7778640e$export$2e2bcd8739ae039), {
|
|
997
1000
|
links: links,
|
|
998
1001
|
title: menuTitle,
|
|
@@ -1015,9 +1018,9 @@ var $b0968edc60d7d3a4$export$2e2bcd8739ae039 = $b0968edc60d7d3a4$var$SidebarPage
|
|
|
1015
1018
|
|
|
1016
1019
|
|
|
1017
1020
|
|
|
1018
|
-
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl =
|
|
1021
|
+
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl = 'datasets', searchKey: searchKey = 'fulltext', textfieldLabel: textfieldLabel = 'Search for a dataset', searchButtonText: searchButtonText = 'Search' })=>{
|
|
1019
1022
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
1020
|
-
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState(
|
|
1023
|
+
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState('');
|
|
1021
1024
|
function submitHero(e) {
|
|
1022
1025
|
e.preventDefault();
|
|
1023
1026
|
navigate(`/${searchUrl}?${searchKey}=${searchValue}`);
|
|
@@ -1044,24 +1047,24 @@ const $59a079354baa335c$var$Hero = ({ title: title, description: description, se
|
|
|
1044
1047
|
onSubmit: (e)=>submitHero(e),
|
|
1045
1048
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1046
1049
|
style: {
|
|
1047
|
-
position:
|
|
1050
|
+
position: 'relative'
|
|
1048
1051
|
},
|
|
1049
1052
|
className: "ds-l-row ds-u-align-items--stretch ds-u-margin-y--4 ds-u-flex-wrap--nowrap",
|
|
1050
1053
|
children: [
|
|
1051
1054
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1052
1055
|
className: "ds-u-padding--0 ds-u-margin-right--1",
|
|
1053
1056
|
style: {
|
|
1054
|
-
flex:
|
|
1055
|
-
maxWidth:
|
|
1057
|
+
flex: '1 1 100%',
|
|
1058
|
+
maxWidth: '100%'
|
|
1056
1059
|
},
|
|
1057
1060
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
1058
1061
|
label: textfieldLabel,
|
|
1059
1062
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
1060
1063
|
name: "search_text_input",
|
|
1061
1064
|
style: {
|
|
1062
|
-
maxWidth:
|
|
1063
|
-
height:
|
|
1064
|
-
margin:
|
|
1065
|
+
maxWidth: 'none',
|
|
1066
|
+
height: '61px',
|
|
1067
|
+
margin: '0 20px 0 0'
|
|
1065
1068
|
},
|
|
1066
1069
|
onChange: (e)=>setSearchValue(e.target.value)
|
|
1067
1070
|
})
|
|
@@ -1099,14 +1102,14 @@ var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
|
|
|
1099
1102
|
|
|
1100
1103
|
|
|
1101
1104
|
const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date, options: options = {
|
|
1102
|
-
year:
|
|
1103
|
-
month:
|
|
1104
|
-
day:
|
|
1105
|
-
timeZone:
|
|
1105
|
+
year: 'numeric',
|
|
1106
|
+
month: 'long',
|
|
1107
|
+
day: 'numeric',
|
|
1108
|
+
timeZone: 'UTC'
|
|
1106
1109
|
} })=>{
|
|
1107
1110
|
const rawDate = new Date(date);
|
|
1108
|
-
let modifiedDate =
|
|
1109
|
-
if (rawDate) modifiedDate = rawDate.toLocaleDateString(
|
|
1111
|
+
let modifiedDate = '';
|
|
1112
|
+
if (rawDate) modifiedDate = rawDate.toLocaleDateString('en-US', options);
|
|
1110
1113
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
1111
1114
|
children: modifiedDate
|
|
1112
1115
|
});
|
|
@@ -1120,25 +1123,25 @@ const $c068004d499082cc$var$DatasetListItem = (props)=>{
|
|
|
1120
1123
|
minWidth: 1024
|
|
1121
1124
|
});
|
|
1122
1125
|
const { title: title, modified: modified, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
|
|
1123
|
-
let linkContainerClasses =
|
|
1124
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1125
|
-
else linkContainerClasses +=
|
|
1126
|
-
let linkClasses =
|
|
1126
|
+
let linkContainerClasses = 'ds-u-margin-bottom--2';
|
|
1127
|
+
if (dataDictionaryLinks) linkContainerClasses += ' ds-l-col--6 ds-u-padding-right--0';
|
|
1128
|
+
else linkContainerClasses += ' ds-l-col--auto ds-u-padding-left--0';
|
|
1129
|
+
let linkClasses = 'ds-u-display--block ds-u-text-align--left';
|
|
1127
1130
|
if (desktop) {
|
|
1128
|
-
linkContainerClasses =
|
|
1129
|
-
linkClasses +=
|
|
1131
|
+
linkContainerClasses = 'ds-u-padding-x--0';
|
|
1132
|
+
linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
|
|
1130
1133
|
}
|
|
1131
1134
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1132
1135
|
className: "dc-c-list-item ds-u-padding-top--4",
|
|
1133
1136
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1134
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1137
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? 'ds-u-border-top--1' : 'ds-u-border-bottom--1 ds-u-padding-bottom--3'}`,
|
|
1135
1138
|
children: [
|
|
1136
1139
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1137
1140
|
className: "ds-l-row ds-u-align-items--start",
|
|
1138
1141
|
children: [
|
|
1139
1142
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1140
1143
|
id: `dataset-${identifier}-updated-date`,
|
|
1141
|
-
className: `ds-l-col--12 ds-u-text-align--left ds-text-heading--sm ${paginationEnabled ?
|
|
1144
|
+
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'}`,
|
|
1142
1145
|
children: [
|
|
1143
1146
|
"Updated ",
|
|
1144
1147
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
@@ -1196,7 +1199,7 @@ var $c068004d499082cc$export$2e2bcd8739ae039 = $c068004d499082cc$var$DatasetList
|
|
|
1196
1199
|
|
|
1197
1200
|
const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
1198
1201
|
switch(props.id){
|
|
1199
|
-
case
|
|
1202
|
+
case 'overview':
|
|
1200
1203
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1201
1204
|
width: "16px",
|
|
1202
1205
|
height: "16px",
|
|
@@ -1238,7 +1241,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1238
1241
|
})
|
|
1239
1242
|
]
|
|
1240
1243
|
});
|
|
1241
|
-
case
|
|
1244
|
+
case 'data-table':
|
|
1242
1245
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1243
1246
|
width: "16px",
|
|
1244
1247
|
height: "12px",
|
|
@@ -1270,7 +1273,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1270
1273
|
})
|
|
1271
1274
|
]
|
|
1272
1275
|
});
|
|
1273
|
-
case
|
|
1276
|
+
case 'api':
|
|
1274
1277
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1275
1278
|
width: "16px",
|
|
1276
1279
|
height: "13px",
|
|
@@ -1302,7 +1305,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1302
1305
|
})
|
|
1303
1306
|
]
|
|
1304
1307
|
});
|
|
1305
|
-
case
|
|
1308
|
+
case 'download':
|
|
1306
1309
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1307
1310
|
width: "16px",
|
|
1308
1311
|
height: "16px",
|
|
@@ -1331,7 +1334,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1331
1334
|
})
|
|
1332
1335
|
]
|
|
1333
1336
|
});
|
|
1334
|
-
case
|
|
1337
|
+
case 'data-dictionary':
|
|
1335
1338
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1336
1339
|
width: "14px",
|
|
1337
1340
|
height: "16px",
|
|
@@ -1432,13 +1435,13 @@ var $b61856b23f5f58a2$export$2e2bcd8739ae039 = $b61856b23f5f58a2$var$LargeFileDi
|
|
|
1432
1435
|
|
|
1433
1436
|
|
|
1434
1437
|
function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240) {
|
|
1435
|
-
if (!textString) return
|
|
1438
|
+
if (!textString) return '';
|
|
1436
1439
|
let cleanedText = textString;
|
|
1437
|
-
if (cleanedText.split(
|
|
1438
|
-
if (cleanedText.split(
|
|
1440
|
+
if (cleanedText.split('</p>').length > 1) cleanedText = cleanedText.split('</p>')[0];
|
|
1441
|
+
if (cleanedText.split('<br/>').length > 1) cleanedText = cleanedText.split('<br/>')[0];
|
|
1439
1442
|
cleanedText = (0, $hgUW1$lodashtruncate)(cleanedText, {
|
|
1440
|
-
|
|
1441
|
-
|
|
1443
|
+
'length': textLength,
|
|
1444
|
+
'separator': ' '
|
|
1442
1445
|
});
|
|
1443
1446
|
return (0, $hgUW1$dompurify).sanitize(cleanedText, {
|
|
1444
1447
|
ALLOWED_TAGS: []
|
|
@@ -1456,9 +1459,9 @@ function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240)
|
|
|
1456
1459
|
const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
1457
1460
|
const { type: type, date: date, boldLabel: boldLabel = false, displayTooltips: displayTooltips = true } = props;
|
|
1458
1461
|
const dateText = {
|
|
1459
|
-
modified:
|
|
1460
|
-
released:
|
|
1461
|
-
refresh:
|
|
1462
|
+
modified: 'Last Modified',
|
|
1463
|
+
released: 'Released',
|
|
1464
|
+
refresh: 'Planned Update'
|
|
1462
1465
|
};
|
|
1463
1466
|
const tooltipContent = {
|
|
1464
1467
|
modified: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -1495,7 +1498,7 @@ const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
|
1495
1498
|
})
|
|
1496
1499
|
};
|
|
1497
1500
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1498
|
-
className: `dataset-date-item${boldLabel ?
|
|
1501
|
+
className: `dataset-date-item${boldLabel ? ' bold-label' : ''}`,
|
|
1499
1502
|
children: [
|
|
1500
1503
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1501
1504
|
className: "dataset-data-item-label",
|
|
@@ -1567,20 +1570,20 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1567
1570
|
});
|
|
1568
1571
|
const { title: title, modified: modified, description: description, downloadUrl: downloadUrl, largeFile: largeFile = false, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks, identifier: identifier, refresh: refresh, released: released, showDateDetails: showDateDetails = false, showTopics: showTopics = false, theme: theme, topicSlugs: topicSlugs } = props;
|
|
1569
1572
|
const location = (0, $hgUW1$useLocation)();
|
|
1570
|
-
let linkContainerClasses =
|
|
1571
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1572
|
-
else linkContainerClasses +=
|
|
1573
|
-
let linkClasses =
|
|
1573
|
+
let linkContainerClasses = 'ds-u-margin-bottom--2';
|
|
1574
|
+
if (dataDictionaryLinks) linkContainerClasses += ' ds-l-col--6 ds-u-padding-right--0';
|
|
1575
|
+
else linkContainerClasses += ' ds-l-col--auto ds-u-padding-left--0';
|
|
1576
|
+
let linkClasses = 'ds-u-display--block ds-u-text-align--left';
|
|
1574
1577
|
if (desktop) {
|
|
1575
|
-
linkContainerClasses =
|
|
1576
|
-
linkClasses +=
|
|
1578
|
+
linkContainerClasses = 'ds-u-padding-x--0';
|
|
1579
|
+
linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
|
|
1577
1580
|
}
|
|
1578
1581
|
let themes;
|
|
1579
1582
|
if (theme && showTopics) themes = /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
1580
1583
|
className: "theme-list item-theme",
|
|
1581
1584
|
children: theme.map((topic, index)=>{
|
|
1582
|
-
const title = topic ||
|
|
1583
|
-
const prefix =
|
|
1585
|
+
const title = topic || 'Unknown Topic';
|
|
1586
|
+
const prefix = 'topics';
|
|
1584
1587
|
// Use the provided slug or fallback to a simple slug generation
|
|
1585
1588
|
const slug = topicSlugs?.[title];
|
|
1586
1589
|
const link = `/${prefix}/${slug}`;
|
|
@@ -1591,7 +1594,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1591
1594
|
state: {
|
|
1592
1595
|
fromUrl: location.pathname,
|
|
1593
1596
|
fromTitle: false,
|
|
1594
|
-
fromSearchList: location.pathname.includes(
|
|
1597
|
+
fromSearchList: location.pathname.includes('search')
|
|
1595
1598
|
},
|
|
1596
1599
|
children: title
|
|
1597
1600
|
})
|
|
@@ -1607,7 +1610,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1607
1610
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1608
1611
|
className: "dc-c-search-list-item ds-u-padding-top--3",
|
|
1609
1612
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1610
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1613
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? 'ds-u-border-top--1' : 'ds-u-border-bottom--1 ds-u-padding-bottom--3'}`,
|
|
1611
1614
|
children: [
|
|
1612
1615
|
themes,
|
|
1613
1616
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
@@ -1615,7 +1618,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1615
1618
|
children: [
|
|
1616
1619
|
!showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1617
1620
|
id: `dataset-${identifier}-updated-date`,
|
|
1618
|
-
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ?
|
|
1621
|
+
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? 'ds-u-padding-top--2' : 'ds-u-padding-top--0'}`,
|
|
1619
1622
|
children: [
|
|
1620
1623
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1621
1624
|
children: "Updated:"
|
|
@@ -1644,13 +1647,13 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1644
1647
|
(0, $1a2bf34e2a8f6b80$export$59a943b34a82e690)(description),
|
|
1645
1648
|
description.length > 240 ? /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1646
1649
|
children: [
|
|
1647
|
-
|
|
1650
|
+
' ',
|
|
1648
1651
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1649
1652
|
to: `/dataset/${identifier}`,
|
|
1650
1653
|
children: "See more"
|
|
1651
1654
|
})
|
|
1652
1655
|
]
|
|
1653
|
-
}) :
|
|
1656
|
+
}) : ''
|
|
1654
1657
|
]
|
|
1655
1658
|
})
|
|
1656
1659
|
}),
|
|
@@ -1678,9 +1681,9 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1678
1681
|
"Download"
|
|
1679
1682
|
]
|
|
1680
1683
|
})
|
|
1681
|
-
}) :
|
|
1684
|
+
}) : '',
|
|
1682
1685
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("ul", {
|
|
1683
|
-
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 ?
|
|
1686
|
+
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' : ''}`,
|
|
1684
1687
|
children: [
|
|
1685
1688
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1686
1689
|
className: linkContainerClasses,
|
|
@@ -1726,7 +1729,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1726
1729
|
]
|
|
1727
1730
|
})
|
|
1728
1731
|
})
|
|
1729
|
-
}) :
|
|
1732
|
+
}) : '',
|
|
1730
1733
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1731
1734
|
className: linkContainerClasses,
|
|
1732
1735
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -1759,7 +1762,6 @@ var $52c6454cae137465$export$2e2bcd8739ae039 = $52c6454cae137465$var$DatasetSear
|
|
|
1759
1762
|
|
|
1760
1763
|
|
|
1761
1764
|
|
|
1762
|
-
|
|
1763
1765
|
const $789279954d8eff7f$var$ApiDocumentation = ({ endpoint: endpoint })=>{
|
|
1764
1766
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1765
1767
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
@@ -1781,7 +1783,7 @@ var $789279954d8eff7f$export$2e2bcd8739ae039 = $789279954d8eff7f$var$ApiDocument
|
|
|
1781
1783
|
|
|
1782
1784
|
|
|
1783
1785
|
|
|
1784
|
-
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className =
|
|
1786
|
+
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className = 'data-table-results' })=>{
|
|
1785
1787
|
const numTotalRows = totalRows;
|
|
1786
1788
|
if (numTotalRows === 0) return /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1787
1789
|
className: className,
|
|
@@ -1799,18 +1801,18 @@ const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limi
|
|
|
1799
1801
|
className: className,
|
|
1800
1802
|
children: [
|
|
1801
1803
|
"Displaying",
|
|
1802
|
-
|
|
1804
|
+
' ',
|
|
1803
1805
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1804
1806
|
className: "ds-u-font-weight--bold",
|
|
1805
1807
|
children: `${startTotal().toLocaleString()} - ${ofTotal().toLocaleString()}`
|
|
1806
1808
|
}),
|
|
1807
|
-
|
|
1809
|
+
' ',
|
|
1808
1810
|
"of ",
|
|
1809
1811
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1810
1812
|
className: "ds-u-font-weight--bold",
|
|
1811
1813
|
children: `${numTotalRows.toLocaleString()}`
|
|
1812
1814
|
}),
|
|
1813
|
-
|
|
1815
|
+
' ',
|
|
1814
1816
|
"results"
|
|
1815
1817
|
]
|
|
1816
1818
|
});
|
|
@@ -1836,16 +1838,16 @@ const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePaddi
|
|
|
1836
1838
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
1837
1839
|
options: [
|
|
1838
1840
|
{
|
|
1839
|
-
label:
|
|
1840
|
-
value:
|
|
1841
|
+
label: 'Tight',
|
|
1842
|
+
value: 'ds-u-padding-y--0'
|
|
1841
1843
|
},
|
|
1842
1844
|
{
|
|
1843
|
-
label:
|
|
1844
|
-
value:
|
|
1845
|
+
label: 'Normal',
|
|
1846
|
+
value: 'ds-u-padding-y--1'
|
|
1845
1847
|
},
|
|
1846
1848
|
{
|
|
1847
|
-
label:
|
|
1848
|
-
value:
|
|
1849
|
+
label: 'Expanded',
|
|
1850
|
+
value: 'ds-u-padding-y--2'
|
|
1849
1851
|
}
|
|
1850
1852
|
],
|
|
1851
1853
|
label: "Display density:",
|
|
@@ -2088,7 +2090,7 @@ function $aa4450dcbeef3ac0$export$385a5aba38cc3325(sortArray) {
|
|
|
2088
2090
|
sortArray.forEach((s)=>{
|
|
2089
2091
|
return newQuery.push({
|
|
2090
2092
|
property: s.id,
|
|
2091
|
-
order: s.desc ?
|
|
2093
|
+
order: s.desc ? 'desc' : 'asc'
|
|
2092
2094
|
});
|
|
2093
2095
|
});
|
|
2094
2096
|
return newQuery;
|
|
@@ -2126,103 +2128,103 @@ function $7264a673914aa746$export$e284ae5d89467c8f(date) {
|
|
|
2126
2128
|
}
|
|
2127
2129
|
function $7264a673914aa746$export$6b5e57d20078142b(value, operator) {
|
|
2128
2130
|
let newValue = value;
|
|
2129
|
-
if (Array.isArray(newValue)) newValue = newValue.join(
|
|
2131
|
+
if (Array.isArray(newValue)) newValue = newValue.join(',');
|
|
2130
2132
|
// return newValue.replace(/(^\%+|\%+$)/gm, '');
|
|
2131
2133
|
return newValue;
|
|
2132
2134
|
}
|
|
2133
2135
|
const $7264a673914aa746$export$5f89a5ae87bc48e1 = [
|
|
2134
2136
|
{
|
|
2135
|
-
label:
|
|
2136
|
-
value:
|
|
2137
|
+
label: 'Is',
|
|
2138
|
+
value: '='
|
|
2137
2139
|
},
|
|
2138
2140
|
{
|
|
2139
|
-
label:
|
|
2140
|
-
value:
|
|
2141
|
+
label: 'Starts With',
|
|
2142
|
+
value: 'starts with'
|
|
2141
2143
|
},
|
|
2142
2144
|
{
|
|
2143
|
-
label:
|
|
2144
|
-
value:
|
|
2145
|
+
label: 'Contains',
|
|
2146
|
+
value: 'contains'
|
|
2145
2147
|
},
|
|
2146
2148
|
{
|
|
2147
|
-
label:
|
|
2148
|
-
value:
|
|
2149
|
+
label: 'Is Not',
|
|
2150
|
+
value: '<>'
|
|
2149
2151
|
},
|
|
2150
2152
|
{
|
|
2151
|
-
label:
|
|
2152
|
-
value:
|
|
2153
|
+
label: 'Or',
|
|
2154
|
+
value: 'in'
|
|
2153
2155
|
},
|
|
2154
2156
|
{
|
|
2155
|
-
label:
|
|
2156
|
-
value:
|
|
2157
|
+
label: 'Is',
|
|
2158
|
+
value: '='
|
|
2157
2159
|
},
|
|
2158
2160
|
{
|
|
2159
|
-
label:
|
|
2160
|
-
value:
|
|
2161
|
+
label: 'Is Not',
|
|
2162
|
+
value: '<>'
|
|
2161
2163
|
},
|
|
2162
2164
|
{
|
|
2163
|
-
label:
|
|
2164
|
-
value:
|
|
2165
|
+
label: 'Greater Than',
|
|
2166
|
+
value: '>'
|
|
2165
2167
|
},
|
|
2166
2168
|
{
|
|
2167
|
-
label:
|
|
2168
|
-
value:
|
|
2169
|
+
label: 'Less Than',
|
|
2170
|
+
value: '<'
|
|
2169
2171
|
}
|
|
2170
2172
|
];
|
|
2171
2173
|
function $7264a673914aa746$export$2b9377795161999(type) {
|
|
2172
2174
|
switch(type){
|
|
2173
|
-
case
|
|
2174
|
-
case
|
|
2175
|
+
case 'text':
|
|
2176
|
+
case 'string':
|
|
2175
2177
|
return [
|
|
2176
2178
|
{
|
|
2177
|
-
label:
|
|
2178
|
-
value:
|
|
2179
|
+
label: 'Is',
|
|
2180
|
+
value: '='
|
|
2179
2181
|
},
|
|
2180
2182
|
{
|
|
2181
|
-
label:
|
|
2182
|
-
value:
|
|
2183
|
+
label: 'Starts With',
|
|
2184
|
+
value: 'starts with'
|
|
2183
2185
|
},
|
|
2184
2186
|
{
|
|
2185
|
-
label:
|
|
2186
|
-
value:
|
|
2187
|
+
label: 'Contains',
|
|
2188
|
+
value: 'contains'
|
|
2187
2189
|
},
|
|
2188
2190
|
{
|
|
2189
|
-
label:
|
|
2190
|
-
value:
|
|
2191
|
+
label: 'Is Not',
|
|
2192
|
+
value: '<>'
|
|
2191
2193
|
},
|
|
2192
2194
|
{
|
|
2193
|
-
label:
|
|
2194
|
-
value:
|
|
2195
|
+
label: 'Or',
|
|
2196
|
+
value: 'in'
|
|
2195
2197
|
}
|
|
2196
2198
|
];
|
|
2197
|
-
case
|
|
2199
|
+
case 'date':
|
|
2198
2200
|
return [
|
|
2199
2201
|
{
|
|
2200
|
-
label:
|
|
2201
|
-
value:
|
|
2202
|
+
label: 'Is',
|
|
2203
|
+
value: '='
|
|
2202
2204
|
},
|
|
2203
2205
|
{
|
|
2204
|
-
label:
|
|
2205
|
-
value:
|
|
2206
|
+
label: 'Is Not',
|
|
2207
|
+
value: '<>'
|
|
2206
2208
|
},
|
|
2207
2209
|
{
|
|
2208
|
-
label:
|
|
2209
|
-
value:
|
|
2210
|
+
label: 'Greater Than',
|
|
2211
|
+
value: '>'
|
|
2210
2212
|
},
|
|
2211
2213
|
{
|
|
2212
|
-
label:
|
|
2213
|
-
value:
|
|
2214
|
+
label: 'Less Than',
|
|
2215
|
+
value: '<'
|
|
2214
2216
|
}
|
|
2215
2217
|
];
|
|
2216
2218
|
default:
|
|
2217
2219
|
// These 2 should be safe for all data types
|
|
2218
2220
|
return [
|
|
2219
2221
|
{
|
|
2220
|
-
label:
|
|
2221
|
-
value:
|
|
2222
|
+
label: 'Is',
|
|
2223
|
+
value: '='
|
|
2222
2224
|
},
|
|
2223
2225
|
{
|
|
2224
|
-
label:
|
|
2225
|
-
value:
|
|
2226
|
+
label: 'Is Not',
|
|
2227
|
+
value: '<>'
|
|
2226
2228
|
}
|
|
2227
2229
|
];
|
|
2228
2230
|
}
|
|
@@ -2239,7 +2241,7 @@ function $7264a673914aa746$export$2b9377795161999(type) {
|
|
|
2239
2241
|
|
|
2240
2242
|
|
|
2241
2243
|
const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: header, sortElement: sortElement, setAriaLiveFeedback: setAriaLiveFeedback })=>{
|
|
2242
|
-
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)(
|
|
2244
|
+
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)('');
|
|
2243
2245
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("th", {
|
|
2244
2246
|
key: header.id,
|
|
2245
2247
|
style: {
|
|
@@ -2252,13 +2254,13 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2252
2254
|
children: [
|
|
2253
2255
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2254
2256
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2255
|
-
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header :
|
|
2257
|
+
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : '',
|
|
2256
2258
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
2257
2259
|
})
|
|
2258
2260
|
}),
|
|
2259
2261
|
sortElement && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2260
2262
|
onClick: header.column.getToggleSortingHandler(),
|
|
2261
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
2263
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : '',
|
|
2262
2264
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
2263
2265
|
})
|
|
2264
2266
|
]
|
|
@@ -2266,18 +2268,18 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2266
2268
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2267
2269
|
onMouseDown: header.getResizeHandler(),
|
|
2268
2270
|
onTouchStart: header.getResizeHandler(),
|
|
2269
|
-
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ?
|
|
2271
|
+
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ? 'isResizing' : ''}`,
|
|
2270
2272
|
"aria-label": `Resize ${header.column.columnDef.header} column`,
|
|
2271
2273
|
onKeyDown: (e)=>{
|
|
2272
2274
|
const columnSizingObject = table.getState().columnSizing;
|
|
2273
2275
|
switch(e.key){
|
|
2274
|
-
case
|
|
2275
|
-
case
|
|
2276
|
+
case 'Enter':
|
|
2277
|
+
case ' ':
|
|
2276
2278
|
e.preventDefault();
|
|
2277
2279
|
e.stopPropagation();
|
|
2278
2280
|
if (columnResizing) {
|
|
2279
2281
|
// end resizing
|
|
2280
|
-
setColumnResizing(
|
|
2282
|
+
setColumnResizing('');
|
|
2281
2283
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2282
2284
|
} else {
|
|
2283
2285
|
// start resizing
|
|
@@ -2285,13 +2287,13 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2285
2287
|
setAriaLiveFeedback(`${header.column.columnDef.header} grabbed.`);
|
|
2286
2288
|
}
|
|
2287
2289
|
break;
|
|
2288
|
-
case
|
|
2290
|
+
case 'Escape':
|
|
2289
2291
|
if (columnResizing) {
|
|
2290
|
-
setColumnResizing(
|
|
2292
|
+
setColumnResizing('');
|
|
2291
2293
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2292
2294
|
}
|
|
2293
2295
|
break;
|
|
2294
|
-
case
|
|
2296
|
+
case 'ArrowRight':
|
|
2295
2297
|
e.preventDefault();
|
|
2296
2298
|
e.stopPropagation();
|
|
2297
2299
|
if (columnResizing) {
|
|
@@ -2300,7 +2302,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2300
2302
|
setAriaLiveFeedback(`${header.column.columnDef.header} has been resized. The new width is ${header.getSize()} pixels.`);
|
|
2301
2303
|
}
|
|
2302
2304
|
break;
|
|
2303
|
-
case
|
|
2305
|
+
case 'ArrowLeft':
|
|
2304
2306
|
e.preventDefault();
|
|
2305
2307
|
e.stopPropagation();
|
|
2306
2308
|
if (columnResizing) {
|
|
@@ -2312,7 +2314,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2312
2314
|
}
|
|
2313
2315
|
},
|
|
2314
2316
|
onBlur: ()=>{
|
|
2315
|
-
setColumnResizing(
|
|
2317
|
+
setColumnResizing('');
|
|
2316
2318
|
}
|
|
2317
2319
|
})
|
|
2318
2320
|
]
|
|
@@ -2361,7 +2363,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2361
2363
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
2362
2364
|
}),
|
|
2363
2365
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2364
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` :
|
|
2366
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` : ''
|
|
2365
2367
|
})
|
|
2366
2368
|
]
|
|
2367
2369
|
})
|
|
@@ -2397,9 +2399,9 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2397
2399
|
transition: transition,
|
|
2398
2400
|
opacity: isDragging ? 0.7 : 1,
|
|
2399
2401
|
zIndex: isDragging ? 1 : 0,
|
|
2400
|
-
position:
|
|
2401
|
-
background:
|
|
2402
|
-
touchAction:
|
|
2402
|
+
position: 'relative',
|
|
2403
|
+
background: 'white',
|
|
2404
|
+
touchAction: 'none'
|
|
2403
2405
|
};
|
|
2404
2406
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
2405
2407
|
className: "ds-u-display--flex ds-u-justify-content--between ds-u-border-bottom--1",
|
|
@@ -2414,7 +2416,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2414
2416
|
// this code forces the repaint without user interaction
|
|
2415
2417
|
const target = e.target;
|
|
2416
2418
|
if (isDragging && target.tagName.toLowerCase() === "label") setTimeout(()=>{
|
|
2417
|
-
target.parentNode.querySelector(
|
|
2419
|
+
target.parentNode.querySelector('input').checked = visible;
|
|
2418
2420
|
}, 1);
|
|
2419
2421
|
},
|
|
2420
2422
|
children: [
|
|
@@ -2431,7 +2433,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2431
2433
|
}
|
|
2432
2434
|
}),
|
|
2433
2435
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2434
|
-
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging &&
|
|
2436
|
+
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && 'grabbed'}`,
|
|
2435
2437
|
"aria-label": `Reorder ${id} column`,
|
|
2436
2438
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2437
2439
|
className: "fa fa-sort"
|
|
@@ -2453,7 +2455,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor extends (0, $hgUW1$Key
|
|
|
2453
2455
|
// Custom function to exclude checkbox from keyboard dragging
|
|
2454
2456
|
static activators = [
|
|
2455
2457
|
{
|
|
2456
|
-
eventName:
|
|
2458
|
+
eventName: 'onKeyDown',
|
|
2457
2459
|
handler: ({ nativeEvent: event })=>{
|
|
2458
2460
|
// prevent scrolling the list
|
|
2459
2461
|
const isCheckbox = [
|
|
@@ -2476,7 +2478,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$Poin
|
|
|
2476
2478
|
// Custom function to stop accidental checkbox clicks on pointer activation
|
|
2477
2479
|
static activators = [
|
|
2478
2480
|
{
|
|
2479
|
-
eventName:
|
|
2481
|
+
eventName: 'onPointerDown',
|
|
2480
2482
|
handler: ({ nativeEvent: event })=>{
|
|
2481
2483
|
if (event.target.tagName.toLowerCase() === "input") return false;
|
|
2482
2484
|
if (event.target.tagName.toLowerCase() === "label") event.target.blur();
|
|
@@ -2544,7 +2546,7 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
2544
2546
|
}));
|
|
2545
2547
|
};
|
|
2546
2548
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2547
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2549
|
+
className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
|
|
2548
2550
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
|
|
2549
2551
|
heading: "Manage columns",
|
|
2550
2552
|
isOpen: modalOpen,
|
|
@@ -2878,12 +2880,12 @@ const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions, schema: sche
|
|
|
2878
2880
|
className: "ds-u-font-weight--bold",
|
|
2879
2881
|
children: description
|
|
2880
2882
|
}),
|
|
2881
|
-
|
|
2883
|
+
' ',
|
|
2882
2884
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2883
2885
|
className: "ds-u-font-weight--normal",
|
|
2884
2886
|
children: operator.label.toUpperCase()
|
|
2885
2887
|
}),
|
|
2886
|
-
|
|
2888
|
+
' ',
|
|
2887
2889
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2888
2890
|
className: "ds-u-color--success",
|
|
2889
2891
|
children: formattedText
|
|
@@ -2913,7 +2915,7 @@ var $bef7bff2823feea2$export$2e2bcd8739ae039 = $bef7bff2823feea2$var$QueryTitle;
|
|
|
2913
2915
|
|
|
2914
2916
|
|
|
2915
2917
|
function $6369abf590ca298f$var$getStartDate(condition, schema, id) {
|
|
2916
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2918
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
2917
2919
|
const newDate = new Date(condition.value.toString());
|
|
2918
2920
|
if (newDate instanceof Date && !isNaN(newDate.getTime())) return newDate;
|
|
2919
2921
|
}
|
|
@@ -2929,9 +2931,9 @@ const $6369abf590ca298f$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
2929
2931
|
});
|
|
2930
2932
|
(0, $hgUW1$useEffect)(()=>{
|
|
2931
2933
|
if (property !== condition.property) {
|
|
2932
|
-
if (property) update(index,
|
|
2933
|
-
else update(index,
|
|
2934
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2934
|
+
if (property) update(index, 'property', property);
|
|
2935
|
+
else update(index, 'property', '');
|
|
2936
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
2935
2937
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
2936
2938
|
}
|
|
2937
2939
|
}
|
|
@@ -2945,16 +2947,16 @@ const $6369abf590ca298f$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
2945
2947
|
]);
|
|
2946
2948
|
(0, $hgUW1$useEffect)(()=>{
|
|
2947
2949
|
if (operator !== condition.operator) {
|
|
2948
|
-
if (operator) update(index,
|
|
2949
|
-
else update(index,
|
|
2950
|
+
if (operator) update(index, 'operator', operator);
|
|
2951
|
+
else update(index, 'operator', '');
|
|
2950
2952
|
}
|
|
2951
2953
|
}, [
|
|
2952
2954
|
operator
|
|
2953
2955
|
]);
|
|
2954
2956
|
(0, $hgUW1$useEffect)(()=>{
|
|
2955
2957
|
if (value !== condition.value) {
|
|
2956
|
-
if (value) update(index,
|
|
2957
|
-
else update(index,
|
|
2958
|
+
if (value) update(index, 'value', value);
|
|
2959
|
+
else update(index, 'value', '');
|
|
2958
2960
|
}
|
|
2959
2961
|
}, [
|
|
2960
2962
|
value
|
|
@@ -2986,7 +2988,7 @@ const $6369abf590ca298f$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
2986
2988
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2987
2989
|
className: "ds-l-col--12 ds-l-md-col--4 ds-u-padding-x--0 ds-u-md-padding-left--2 ds-u-display--flex ds-u-justify-content--between",
|
|
2988
2990
|
children: [
|
|
2989
|
-
schema[id].fields[property].mysql_type ===
|
|
2991
|
+
schema[id].fields[property].mysql_type === 'date' ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2990
2992
|
children: [
|
|
2991
2993
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
2992
2994
|
className: "ds-c-label",
|
|
@@ -3047,9 +3049,9 @@ const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false,
|
|
|
3047
3049
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
3048
3050
|
disabled: disabled,
|
|
3049
3051
|
className: "ds-u-float--right ds-l-md-col--6 ds-l-col--5",
|
|
3050
|
-
variation: small ?
|
|
3052
|
+
variation: small ? 'ghost' : undefined,
|
|
3051
3053
|
onClick: ()=>clearFiltersFn(),
|
|
3052
|
-
children: small ?
|
|
3054
|
+
children: small ? 'Clear all' : 'Clear all filters'
|
|
3053
3055
|
});
|
|
3054
3056
|
};
|
|
3055
3057
|
var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFiltersButton;
|
|
@@ -3058,19 +3060,19 @@ var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFilter
|
|
|
3058
3060
|
function $ee4ad47aa483e5b5$var$updateQueryForDatastore(condition) {
|
|
3059
3061
|
let cond = condition;
|
|
3060
3062
|
delete cond.key;
|
|
3061
|
-
if (cond.operator ===
|
|
3063
|
+
if (cond.operator === '=' || cond.operator === '<>') {
|
|
3062
3064
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3063
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3065
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
3064
3066
|
}
|
|
3065
|
-
if (cond.operator.toLowerCase() ===
|
|
3067
|
+
if (cond.operator.toLowerCase() === 'like') {
|
|
3066
3068
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3067
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3069
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
3068
3070
|
cond.value = `%${cleanedValue}%`;
|
|
3069
3071
|
}
|
|
3070
|
-
if (cond.operator.toLowerCase() ===
|
|
3071
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
3072
|
+
if (cond.operator.toLowerCase() === 'in') {
|
|
3073
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(',');
|
|
3072
3074
|
}
|
|
3073
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
3075
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ''));
|
|
3074
3076
|
return cond;
|
|
3075
3077
|
}
|
|
3076
3078
|
const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, isModal: isModal = false, setPage: setPage, setOffset: setOffset })=>{
|
|
@@ -3089,7 +3091,7 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
3089
3091
|
} else setQueryConditions([
|
|
3090
3092
|
{
|
|
3091
3093
|
property: fields[0],
|
|
3092
|
-
value:
|
|
3094
|
+
value: '',
|
|
3093
3095
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3094
3096
|
key: Date.now().toString()
|
|
3095
3097
|
}
|
|
@@ -3106,7 +3108,7 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
3106
3108
|
...queryConditions,
|
|
3107
3109
|
{
|
|
3108
3110
|
property: fields[0],
|
|
3109
|
-
value:
|
|
3111
|
+
value: '',
|
|
3110
3112
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3111
3113
|
key: Date.now().toString()
|
|
3112
3114
|
}
|
|
@@ -3137,7 +3139,7 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
3137
3139
|
encodeValuesOnly: true,
|
|
3138
3140
|
addQueryPrefix: true
|
|
3139
3141
|
});
|
|
3140
|
-
window.history.pushState({},
|
|
3142
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
3141
3143
|
};
|
|
3142
3144
|
const submitConditions = (e)=>{
|
|
3143
3145
|
// only update the data conditions when "Apply filters" is pressed
|
|
@@ -3290,12 +3292,12 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, closeFul
|
|
|
3290
3292
|
showStoredQueryDownloadButton: showStoredQueryDownloadButton
|
|
3291
3293
|
}),
|
|
3292
3294
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3293
|
-
className: `ds-u-border-x--1 ds-u-border-bottom--1 ${isModal &&
|
|
3295
|
+
className: `ds-u-border-x--1 ds-u-border-bottom--1 ${isModal && 'dkan-datatable-fullscreen-mode'}`,
|
|
3294
3296
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
|
|
3295
3297
|
canResize: true,
|
|
3296
3298
|
columns: columns,
|
|
3297
3299
|
sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
|
|
3298
|
-
tablePadding:
|
|
3300
|
+
tablePadding: 'ds-u-padding-y--2',
|
|
3299
3301
|
loading: resource.loading,
|
|
3300
3302
|
isModal: isModal,
|
|
3301
3303
|
closeFullScreenModal: closeFullScreenModal
|
|
@@ -3328,7 +3330,7 @@ var $a35cf16d1488f54e$export$2e2bcd8739ae039 = $a35cf16d1488f54e$var$DatasetTabl
|
|
|
3328
3330
|
|
|
3329
3331
|
const $16bd41951b91f02d$var$FullScreenDataTable = ({ modalOpen: modalOpen, setModalOpen: setModalOpen })=>{
|
|
3330
3332
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3331
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
3333
|
+
className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
|
|
3332
3334
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
3333
3335
|
heading: "Dataset Explorer",
|
|
3334
3336
|
isOpen: modalOpen,
|
|
@@ -3378,7 +3380,7 @@ const $71b4324f265dec16$var$DataTableControls = ({ id: id, columns: columns, def
|
|
|
3378
3380
|
]
|
|
3379
3381
|
}),
|
|
3380
3382
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
|
|
3381
|
-
"aria-label": isModal ?
|
|
3383
|
+
"aria-label": isModal ? 'Close Full Screen dialog' : 'Full Screen mode - Opens in a dialog',
|
|
3382
3384
|
className: "ds-c-button ds-c-button--ghost ds-u-margin-y--1",
|
|
3383
3385
|
onClick: ()=>{
|
|
3384
3386
|
if (isModal) closeFullScreenModal();
|
|
@@ -3386,7 +3388,7 @@ const $71b4324f265dec16$var$DataTableControls = ({ id: id, columns: columns, def
|
|
|
3386
3388
|
},
|
|
3387
3389
|
children: [
|
|
3388
3390
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3389
|
-
className: `fa ${isModal ?
|
|
3391
|
+
className: `fa ${isModal ? 'fa-compress' : 'fa-expand'} ds-u-margin-right--1`
|
|
3390
3392
|
}),
|
|
3391
3393
|
isModal ? "Exit Full Screen" : "Full Screen"
|
|
3392
3394
|
]
|
|
@@ -3423,7 +3425,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3423
3425
|
const { columnOrder: columnOrder, setColumnOrder: setColumnOrder, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility } = (0, $hgUW1$useContext)((0, $ebda441784d176a5$export$2e2bcd8739ae039));
|
|
3424
3426
|
const data = resource.values;
|
|
3425
3427
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
3426
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
3428
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
|
|
3427
3429
|
const dataTableWrapperElement = (0, $hgUW1$useRef)(null);
|
|
3428
3430
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
3429
3431
|
const table_columns = columns.map((col)=>{
|
|
@@ -3442,9 +3444,9 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3442
3444
|
columnOrder
|
|
3443
3445
|
]);
|
|
3444
3446
|
const sortElement = (isSorted, onClickFn)=>{
|
|
3445
|
-
if (isSorted ===
|
|
3446
|
-
if (isSorted ===
|
|
3447
|
-
return
|
|
3447
|
+
if (isSorted === 'asc') return 'dc-c-sort--asc';
|
|
3448
|
+
if (isSorted === 'desc') return 'dc-c-sort--desc';
|
|
3449
|
+
return 'dc-c-sort--default';
|
|
3448
3450
|
};
|
|
3449
3451
|
const filters = [];
|
|
3450
3452
|
const table = (0, $hgUW1$useReactTable)({
|
|
@@ -3456,7 +3458,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3456
3458
|
columnVisibility: columnVisibility,
|
|
3457
3459
|
sorting: sorting
|
|
3458
3460
|
},
|
|
3459
|
-
columnResizeMode:
|
|
3461
|
+
columnResizeMode: 'onChange',
|
|
3460
3462
|
onSortingChange: setSorting,
|
|
3461
3463
|
onColumnOrderChange: setColumnOrder,
|
|
3462
3464
|
onColumnVisibilityChange: setColumnVisibility,
|
|
@@ -3473,7 +3475,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3473
3475
|
const defaultColumnOrder = (0, $hgUW1$useMemo)(()=>table_columns.map((column)=>column.accessorKey), []);
|
|
3474
3476
|
const tableWrapperWidth = ()=>{
|
|
3475
3477
|
if (dataTableWrapperElement.current) return dataTableWrapperElement.current.offsetWidth;
|
|
3476
|
-
return
|
|
3478
|
+
return 'auto';
|
|
3477
3479
|
};
|
|
3478
3480
|
(0, $hgUW1$useEffect)(()=>{
|
|
3479
3481
|
setHighlightRow(null);
|
|
@@ -3575,7 +3577,7 @@ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, a
|
|
|
3575
3577
|
},
|
|
3576
3578
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3577
3579
|
name: accessor,
|
|
3578
|
-
value: filterValue ||
|
|
3580
|
+
value: filterValue || ''
|
|
3579
3581
|
});
|
|
3580
3582
|
}
|
|
3581
3583
|
const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true })=>{
|
|
@@ -3651,7 +3653,7 @@ const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage, pageTrail:
|
|
|
3651
3653
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3652
3654
|
children: currentPage
|
|
3653
3655
|
})
|
|
3654
|
-
}) :
|
|
3656
|
+
}) : ''
|
|
3655
3657
|
]
|
|
3656
3658
|
})
|
|
3657
3659
|
});
|
|
@@ -3708,11 +3710,11 @@ var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRigh
|
|
|
3708
3710
|
|
|
3709
3711
|
|
|
3710
3712
|
|
|
3711
|
-
const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder =
|
|
3713
|
+
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", {
|
|
3712
3714
|
className: "search-input-container",
|
|
3713
3715
|
children: [
|
|
3714
3716
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
3715
|
-
className: `${showMagnifyingGlass ?
|
|
3717
|
+
className: `${showMagnifyingGlass ? 'left-padding' : ''} ${showSearchButton ? 'right-padding' : ''}`,
|
|
3716
3718
|
label: placeholder,
|
|
3717
3719
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3718
3720
|
placeholder: placeholder,
|
|
@@ -3727,7 +3729,7 @@ const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = "Search
|
|
|
3727
3729
|
}),
|
|
3728
3730
|
showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
3729
3731
|
variation: "solid",
|
|
3730
|
-
className: onDark &&
|
|
3732
|
+
className: onDark && 'on-dark',
|
|
3731
3733
|
onClick: onSubmit,
|
|
3732
3734
|
children: [
|
|
3733
3735
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -3846,7 +3848,7 @@ const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: roo
|
|
|
3846
3848
|
url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
3847
3849
|
addQueryPrefix: true
|
|
3848
3850
|
})}`,
|
|
3849
|
-
docExpansion:
|
|
3851
|
+
docExpansion: 'list',
|
|
3850
3852
|
defaultModelsExpandDepth: -1,
|
|
3851
3853
|
plugins: [
|
|
3852
3854
|
(0, $hgUW1$SpanOpenAPIVersion),
|
|
@@ -3994,7 +3996,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
3994
3996
|
size: "big",
|
|
3995
3997
|
type: "submit",
|
|
3996
3998
|
style: {
|
|
3997
|
-
width:
|
|
3999
|
+
width: '70px'
|
|
3998
4000
|
},
|
|
3999
4001
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4000
4002
|
className: "fas fa-search small-text"
|
|
@@ -4011,7 +4013,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4011
4013
|
className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
|
|
4012
4014
|
children: [
|
|
4013
4015
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4014
|
-
children: text ? text :
|
|
4016
|
+
children: text ? text : 'Search'
|
|
4015
4017
|
}),
|
|
4016
4018
|
` `,
|
|
4017
4019
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4057,26 +4059,26 @@ var $5723016a5461c1ca$export$2e2bcd8739ae039 = $5723016a5461c1ca$var$PageHeader;
|
|
|
4057
4059
|
|
|
4058
4060
|
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
4059
4061
|
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4060
|
-
defaultSort:
|
|
4061
|
-
defaultOrder:
|
|
4062
|
-
}, pageTitle: pageTitle =
|
|
4062
|
+
defaultSort: 'modified',
|
|
4063
|
+
defaultOrder: 'desc'
|
|
4064
|
+
}, pageTitle: pageTitle = 'Dataset Explorer', filterTitle: filterTitle = 'Tags', showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = '', showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
4063
4065
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4064
4066
|
const sortOptions = [
|
|
4065
4067
|
{
|
|
4066
|
-
label:
|
|
4067
|
-
value:
|
|
4068
|
+
label: 'Newest',
|
|
4069
|
+
value: 'newest'
|
|
4068
4070
|
},
|
|
4069
4071
|
{
|
|
4070
|
-
label:
|
|
4071
|
-
value:
|
|
4072
|
+
label: 'Oldest',
|
|
4073
|
+
value: 'oldest'
|
|
4072
4074
|
},
|
|
4073
4075
|
{
|
|
4074
|
-
label:
|
|
4075
|
-
value:
|
|
4076
|
+
label: 'Title A-Z',
|
|
4077
|
+
value: 'titleAZ'
|
|
4076
4078
|
},
|
|
4077
4079
|
{
|
|
4078
|
-
label:
|
|
4079
|
-
value:
|
|
4080
|
+
label: 'Title Z-A',
|
|
4081
|
+
value: 'titleZA'
|
|
4080
4082
|
}
|
|
4081
4083
|
];
|
|
4082
4084
|
const defaultSortBy = "";
|
|
@@ -4095,7 +4097,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4095
4097
|
endingNumber: 0
|
|
4096
4098
|
});
|
|
4097
4099
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4098
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4100
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)('');
|
|
4099
4101
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4100
4102
|
const [fulltext, setFullText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
4101
4103
|
const [filterText, setFilterText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
@@ -4104,7 +4106,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4104
4106
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4105
4107
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4106
4108
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4107
|
-
return sort ===
|
|
4109
|
+
return sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
|
|
4108
4110
|
});
|
|
4109
4111
|
const [selectedFacets, setSelectedFacets] = (0, $hgUW1$useState)(transformedParams.selectedFacets ? transformedParams.selectedFacets : {
|
|
4110
4112
|
theme: [],
|
|
@@ -4113,21 +4115,21 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4113
4115
|
const setSortOptions = (value)=>{
|
|
4114
4116
|
setSortDisplay(value);
|
|
4115
4117
|
switch(value){
|
|
4116
|
-
case
|
|
4117
|
-
setSort(
|
|
4118
|
-
setSortOrder(
|
|
4118
|
+
case 'newest':
|
|
4119
|
+
setSort('modified');
|
|
4120
|
+
setSortOrder('desc');
|
|
4119
4121
|
break;
|
|
4120
|
-
case
|
|
4121
|
-
setSort(
|
|
4122
|
-
setSortOrder(
|
|
4122
|
+
case 'oldest':
|
|
4123
|
+
setSort('modified');
|
|
4124
|
+
setSortOrder('asc');
|
|
4123
4125
|
break;
|
|
4124
|
-
case
|
|
4125
|
-
setSort(
|
|
4126
|
-
setSortOrder(
|
|
4126
|
+
case 'titleAZ':
|
|
4127
|
+
setSort('title');
|
|
4128
|
+
setSortOrder('asc');
|
|
4127
4129
|
break;
|
|
4128
|
-
case
|
|
4129
|
-
setSort(
|
|
4130
|
-
setSortOrder(
|
|
4130
|
+
case 'titleZA':
|
|
4131
|
+
setSort('title');
|
|
4132
|
+
setSortOrder('desc');
|
|
4131
4133
|
break;
|
|
4132
4134
|
}
|
|
4133
4135
|
};
|
|
@@ -4135,12 +4137,12 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4135
4137
|
const newFacets = {
|
|
4136
4138
|
...selectedFacets
|
|
4137
4139
|
};
|
|
4138
|
-
if (key ===
|
|
4140
|
+
if (key === 'theme') {
|
|
4139
4141
|
const existingFacet = newFacets.theme.findIndex((s)=>s === value);
|
|
4140
4142
|
if (existingFacet > -1) newFacets.theme.splice(existingFacet, 1);
|
|
4141
4143
|
else newFacets.theme.push(value);
|
|
4142
4144
|
}
|
|
4143
|
-
if (key ===
|
|
4145
|
+
if (key === 'keyword') {
|
|
4144
4146
|
const existingFacet = newFacets.keyword.findIndex((s)=>s === value);
|
|
4145
4147
|
if (existingFacet > -1) newFacets.keyword.splice(existingFacet, 1);
|
|
4146
4148
|
else newFacets.keyword.push(value);
|
|
@@ -4154,14 +4156,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4154
4156
|
});
|
|
4155
4157
|
setSelectedFacets(newFacets);
|
|
4156
4158
|
const url = new URL(window.location.href);
|
|
4157
|
-
window.history.pushState({},
|
|
4159
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
4158
4160
|
}
|
|
4159
4161
|
const pageSize = defaultPageSize;
|
|
4160
4162
|
(0, $hgUW1$useEffect)(()=>{
|
|
4161
4163
|
// Update browser URL with current search params
|
|
4162
4164
|
const params = buildSearchParams(true);
|
|
4163
4165
|
const url = new URL(window.location.href);
|
|
4164
|
-
window.history.pushState({},
|
|
4166
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${params}`);
|
|
4165
4167
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4166
4168
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4167
4169
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -4200,14 +4202,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4200
4202
|
setSelectedFacets(defaultSelectedFacets);
|
|
4201
4203
|
setPage(defaultPage);
|
|
4202
4204
|
const url = new URL(window.location.href);
|
|
4203
|
-
window.history.pushState({},
|
|
4205
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}`);
|
|
4204
4206
|
}
|
|
4205
4207
|
function buildSearchParams(includePage) {
|
|
4206
4208
|
let newParams = {};
|
|
4207
4209
|
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
4208
4210
|
if (sort !== defaultSort.defaultSort) newParams.sort = sort;
|
|
4209
4211
|
if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
|
|
4210
|
-
if (fulltext !==
|
|
4212
|
+
if (fulltext !== '') newParams.fulltext = fulltext;
|
|
4211
4213
|
if (Object.keys(selectedFacets).length) Object.keys(selectedFacets).forEach((key)=>{
|
|
4212
4214
|
newParams[key] = selectedFacets[key];
|
|
4213
4215
|
});
|
|
@@ -4220,9 +4222,9 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4220
4222
|
fulltext: fulltext ? fulltext : undefined,
|
|
4221
4223
|
...selectedFacets,
|
|
4222
4224
|
sort: sort ? sort : undefined,
|
|
4223
|
-
[
|
|
4225
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
4224
4226
|
page: page !== 1 ? page : undefined,
|
|
4225
|
-
[
|
|
4227
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
4226
4228
|
};
|
|
4227
4229
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4228
4230
|
queryKey: [
|
|
@@ -4231,7 +4233,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4231
4233
|
],
|
|
4232
4234
|
queryFn: ()=>{
|
|
4233
4235
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4234
|
-
arrayFormat:
|
|
4236
|
+
arrayFormat: 'comma',
|
|
4235
4237
|
encode: false
|
|
4236
4238
|
})}`);
|
|
4237
4239
|
}
|
|
@@ -4282,7 +4284,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4282
4284
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4283
4285
|
fieldClassName: "ds-u-margin--0",
|
|
4284
4286
|
value: filterText,
|
|
4285
|
-
className: `ds-u-padding-right--2 ${altMobileSearchButton ?
|
|
4287
|
+
className: `ds-u-padding-right--2 ${altMobileSearchButton ? 'ds-l-col--12 ds-l-md-col--10 --alt-style' : 'ds-l-col--10'}`,
|
|
4286
4288
|
label: "Search datasets",
|
|
4287
4289
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4288
4290
|
placeholder: "Search datasets",
|
|
@@ -4344,7 +4346,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4344
4346
|
"Showing ",
|
|
4345
4347
|
currentResultNumbers.startingNumber,
|
|
4346
4348
|
" -",
|
|
4347
|
-
|
|
4349
|
+
' ',
|
|
4348
4350
|
currentResultNumbers.endingNumber,
|
|
4349
4351
|
" of ",
|
|
4350
4352
|
data.data.total,
|
|
@@ -4421,7 +4423,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4421
4423
|
},
|
|
4422
4424
|
renderHref: (page)=>{
|
|
4423
4425
|
const searchParams = buildSearchParams(false);
|
|
4424
|
-
const includeAnd = searchParams ?
|
|
4426
|
+
const includeAnd = searchParams ? '&' : '';
|
|
4425
4427
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
4426
4428
|
}
|
|
4427
4429
|
})
|
|
@@ -4454,27 +4456,28 @@ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
4454
4456
|
|
|
4455
4457
|
|
|
4456
4458
|
|
|
4457
|
-
const $550bcc185f420ff5$var$DatasetList = ({
|
|
4458
|
-
defaultSort:
|
|
4459
|
-
|
|
4460
|
-
|
|
4459
|
+
const $550bcc185f420ff5$var$DatasetList = (props)=>{
|
|
4460
|
+
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4461
|
+
defaultSort: 'modified',
|
|
4462
|
+
defaultOrder: 'desc'
|
|
4463
|
+
}, pageTitle: pageTitle = 'What\'s New ', showLargeFileWarning: showLargeFileWarning = false, introText: introText = '', dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
4461
4464
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4462
4465
|
const sortOptions = [
|
|
4463
4466
|
{
|
|
4464
|
-
label:
|
|
4465
|
-
value:
|
|
4467
|
+
label: 'Newest',
|
|
4468
|
+
value: 'newest'
|
|
4466
4469
|
},
|
|
4467
4470
|
{
|
|
4468
|
-
label:
|
|
4469
|
-
value:
|
|
4471
|
+
label: 'Oldest',
|
|
4472
|
+
value: 'oldest'
|
|
4470
4473
|
},
|
|
4471
4474
|
{
|
|
4472
|
-
label:
|
|
4473
|
-
value:
|
|
4475
|
+
label: 'Title A-Z',
|
|
4476
|
+
value: 'titleAZ'
|
|
4474
4477
|
},
|
|
4475
4478
|
{
|
|
4476
|
-
label:
|
|
4477
|
-
value:
|
|
4479
|
+
label: 'Title Z-A',
|
|
4480
|
+
value: 'titleZA'
|
|
4478
4481
|
}
|
|
4479
4482
|
];
|
|
4480
4483
|
const defaultSortBy = "";
|
|
@@ -4488,33 +4491,33 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4488
4491
|
endingNumber: 0
|
|
4489
4492
|
});
|
|
4490
4493
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4491
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4494
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)('');
|
|
4492
4495
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4493
4496
|
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
4494
4497
|
const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
|
|
4495
4498
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4496
4499
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4497
4500
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4498
|
-
return sort ===
|
|
4501
|
+
return sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
|
|
4499
4502
|
});
|
|
4500
4503
|
const setSortOptions = (value)=>{
|
|
4501
4504
|
setSortDisplay(value);
|
|
4502
4505
|
switch(value){
|
|
4503
|
-
case
|
|
4504
|
-
setSort(
|
|
4505
|
-
setSortOrder(
|
|
4506
|
+
case 'newest':
|
|
4507
|
+
setSort('modified');
|
|
4508
|
+
setSortOrder('desc');
|
|
4506
4509
|
break;
|
|
4507
|
-
case
|
|
4508
|
-
setSort(
|
|
4509
|
-
setSortOrder(
|
|
4510
|
+
case 'oldest':
|
|
4511
|
+
setSort('modified');
|
|
4512
|
+
setSortOrder('asc');
|
|
4510
4513
|
break;
|
|
4511
|
-
case
|
|
4512
|
-
setSort(
|
|
4513
|
-
setSortOrder(
|
|
4514
|
+
case 'titleAZ':
|
|
4515
|
+
setSort('title');
|
|
4516
|
+
setSortOrder('asc');
|
|
4514
4517
|
break;
|
|
4515
|
-
case
|
|
4516
|
-
setSort(
|
|
4517
|
-
setSortOrder(
|
|
4518
|
+
case 'titleZA':
|
|
4519
|
+
setSort('title');
|
|
4520
|
+
setSortOrder('desc');
|
|
4518
4521
|
break;
|
|
4519
4522
|
}
|
|
4520
4523
|
};
|
|
@@ -4523,7 +4526,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4523
4526
|
// Update browser URL with current search params
|
|
4524
4527
|
const params = buildSearchParams(true);
|
|
4525
4528
|
const url = new URL(window.location.href);
|
|
4526
|
-
window.history.pushState({},
|
|
4529
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${params}`);
|
|
4527
4530
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4528
4531
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4529
4532
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -4562,9 +4565,9 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4562
4565
|
}
|
|
4563
4566
|
let params = {
|
|
4564
4567
|
sort: sort ? sort : undefined,
|
|
4565
|
-
[
|
|
4568
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
4566
4569
|
page: page !== 1 ? page : undefined,
|
|
4567
|
-
[
|
|
4570
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
4568
4571
|
};
|
|
4569
4572
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4570
4573
|
queryKey: [
|
|
@@ -4573,7 +4576,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4573
4576
|
],
|
|
4574
4577
|
queryFn: ()=>{
|
|
4575
4578
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4576
|
-
arrayFormat:
|
|
4579
|
+
arrayFormat: 'comma',
|
|
4577
4580
|
encode: false
|
|
4578
4581
|
})}`);
|
|
4579
4582
|
}
|
|
@@ -4589,26 +4592,29 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4589
4592
|
children: [
|
|
4590
4593
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4591
4594
|
className: "ds-l-row",
|
|
4592
|
-
children: /*#__PURE__*/ (0, $hgUW1$
|
|
4595
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4593
4596
|
className: "ds-l-col--12",
|
|
4594
|
-
children:
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
className: "ds-l-
|
|
4598
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)(
|
|
4599
|
-
|
|
4600
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4597
|
+
children: [
|
|
4598
|
+
introText ? introText : null,
|
|
4599
|
+
showLargeFileWarning && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4600
|
+
className: "ds-l-row ds-u-margin-bottom--2 ds-u-margin-top--4",
|
|
4601
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4602
|
+
className: "ds-l-md-col--12",
|
|
4603
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
|
|
4604
|
+
bordered: true,
|
|
4605
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
4606
|
+
contentClassName: "downloading-datasets",
|
|
4607
|
+
heading: "Please read before downloading datasets",
|
|
4608
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b2d31a9c6cd2284$export$2e2bcd8739ae039), {})
|
|
4609
|
+
})
|
|
4604
4610
|
})
|
|
4605
4611
|
})
|
|
4606
4612
|
})
|
|
4607
|
-
|
|
4613
|
+
]
|
|
4608
4614
|
})
|
|
4609
4615
|
}),
|
|
4610
4616
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4611
|
-
className: "ds-l-row",
|
|
4617
|
+
className: "ds-l-row ds-u-padding-top--4",
|
|
4612
4618
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4613
4619
|
className: "ds-l-col--12",
|
|
4614
4620
|
children: isPending ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
@@ -4620,40 +4626,32 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4620
4626
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4621
4627
|
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",
|
|
4622
4628
|
children: [
|
|
4623
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4629
|
+
enablePagination && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4624
4630
|
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--8 ds-u-sm-padding-left--0",
|
|
4625
4631
|
children: [
|
|
4626
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("
|
|
4627
|
-
className: "ds-u-margin-
|
|
4628
|
-
|
|
4632
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4633
|
+
className: "ds-u-margin-y--0",
|
|
4634
|
+
"aria-hidden": "true",
|
|
4635
|
+
children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
4636
|
+
children: [
|
|
4637
|
+
"Showing ",
|
|
4638
|
+
currentResultNumbers.startingNumber,
|
|
4639
|
+
" -",
|
|
4640
|
+
' ',
|
|
4641
|
+
currentResultNumbers.endingNumber,
|
|
4642
|
+
" of ",
|
|
4643
|
+
data.data.total,
|
|
4644
|
+
" datasets"
|
|
4645
|
+
]
|
|
4646
|
+
})
|
|
4629
4647
|
}),
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
"Showing ",
|
|
4638
|
-
currentResultNumbers.startingNumber,
|
|
4639
|
-
" -",
|
|
4640
|
-
" ",
|
|
4641
|
-
currentResultNumbers.endingNumber,
|
|
4642
|
-
" of ",
|
|
4643
|
-
data.data.total,
|
|
4644
|
-
" datasets"
|
|
4645
|
-
]
|
|
4646
|
-
})
|
|
4647
|
-
}),
|
|
4648
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4649
|
-
className: "ds-u-visibility--screen-reader",
|
|
4650
|
-
role: "status",
|
|
4651
|
-
"aria-live": "assertive",
|
|
4652
|
-
"aria-atomic": "true",
|
|
4653
|
-
"data-testid": "currentResults",
|
|
4654
|
-
children: announcementText
|
|
4655
|
-
})
|
|
4656
|
-
]
|
|
4648
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4649
|
+
className: "ds-u-visibility--screen-reader",
|
|
4650
|
+
role: "status",
|
|
4651
|
+
"aria-live": "assertive",
|
|
4652
|
+
"aria-atomic": "true",
|
|
4653
|
+
"data-testid": "currentResults",
|
|
4654
|
+
children: announcementText
|
|
4657
4655
|
})
|
|
4658
4656
|
]
|
|
4659
4657
|
}),
|
|
@@ -4672,7 +4670,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4672
4670
|
}),
|
|
4673
4671
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
|
|
4674
4672
|
className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0 ds-u-margin-bottom--4 ds-u-display--block",
|
|
4675
|
-
"data-testid": "
|
|
4673
|
+
"data-testid": "results-list",
|
|
4676
4674
|
children: [
|
|
4677
4675
|
noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
4678
4676
|
variation: "error",
|
|
@@ -4704,7 +4702,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4704
4702
|
},
|
|
4705
4703
|
renderHref: (page)=>{
|
|
4706
4704
|
const searchParams = buildSearchParams(false);
|
|
4707
|
-
const includeAnd = searchParams ?
|
|
4705
|
+
const includeAnd = searchParams ? '&' : '';
|
|
4708
4706
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
4709
4707
|
}
|
|
4710
4708
|
})
|
|
@@ -4734,14 +4732,15 @@ var $550bcc185f420ff5$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
4734
4732
|
|
|
4735
4733
|
|
|
4736
4734
|
|
|
4735
|
+
|
|
4737
4736
|
const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
4738
4737
|
const [dataset, setDataset] = (0, $hgUW1$useState)({
|
|
4739
|
-
title:
|
|
4738
|
+
title: '',
|
|
4740
4739
|
distribution: [],
|
|
4741
|
-
error:
|
|
4742
|
-
description:
|
|
4743
|
-
identifier:
|
|
4744
|
-
modified:
|
|
4740
|
+
error: '',
|
|
4741
|
+
description: '',
|
|
4742
|
+
identifier: '',
|
|
4743
|
+
modified: ''
|
|
4745
4744
|
});
|
|
4746
4745
|
const [id, setId] = (0, $hgUW1$useState)(datasetId);
|
|
4747
4746
|
const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
|
|
@@ -4751,7 +4750,7 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
|
4751
4750
|
"metastore" + id
|
|
4752
4751
|
],
|
|
4753
4752
|
queryFn: ()=>{
|
|
4754
|
-
return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ?
|
|
4753
|
+
return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ? '&' : ''}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`).then((res)=>res.data).catch((error)=>{
|
|
4755
4754
|
return {
|
|
4756
4755
|
title: dataset.title,
|
|
4757
4756
|
distribution: dataset.distribution,
|
|
@@ -4817,7 +4816,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
4817
4816
|
...additionalParams
|
|
4818
4817
|
};
|
|
4819
4818
|
params = (0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA);
|
|
4820
|
-
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` :
|
|
4819
|
+
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : '';
|
|
4821
4820
|
let enabled = false;
|
|
4822
4821
|
if (id) {
|
|
4823
4822
|
if (!requireConditions) enabled = true;
|
|
@@ -4897,65 +4896,65 @@ var $1d3d480a9cfaabe0$export$2e2bcd8739ae039 = $1d3d480a9cfaabe0$var$useDatastor
|
|
|
4897
4896
|
|
|
4898
4897
|
|
|
4899
4898
|
const $28f16f59778efa64$export$82b1b1d517e5388a = {
|
|
4900
|
-
|
|
4901
|
-
name:
|
|
4899
|
+
'R/P10Y': {
|
|
4900
|
+
name: 'Decennial'
|
|
4902
4901
|
},
|
|
4903
|
-
|
|
4904
|
-
name:
|
|
4902
|
+
'R/P4Y': {
|
|
4903
|
+
name: 'Quadrennial'
|
|
4905
4904
|
},
|
|
4906
|
-
|
|
4907
|
-
name:
|
|
4905
|
+
'R/P1Y': {
|
|
4906
|
+
name: 'Annual'
|
|
4908
4907
|
},
|
|
4909
|
-
|
|
4910
|
-
name:
|
|
4908
|
+
'R/P2M': {
|
|
4909
|
+
name: 'Bimonthly'
|
|
4911
4910
|
},
|
|
4912
|
-
|
|
4913
|
-
name:
|
|
4911
|
+
'R/P3.5D': {
|
|
4912
|
+
name: 'Semiweekly'
|
|
4914
4913
|
},
|
|
4915
|
-
|
|
4916
|
-
name:
|
|
4914
|
+
'R/P1D': {
|
|
4915
|
+
name: 'Daily'
|
|
4917
4916
|
},
|
|
4918
|
-
|
|
4919
|
-
name:
|
|
4917
|
+
'R/P2W': {
|
|
4918
|
+
name: 'Biweekly'
|
|
4920
4919
|
},
|
|
4921
|
-
|
|
4922
|
-
name:
|
|
4920
|
+
'R/P6M': {
|
|
4921
|
+
name: 'Semiannual'
|
|
4923
4922
|
},
|
|
4924
|
-
|
|
4925
|
-
name:
|
|
4923
|
+
'R/P2Y': {
|
|
4924
|
+
name: 'Biennial'
|
|
4926
4925
|
},
|
|
4927
|
-
|
|
4928
|
-
name:
|
|
4926
|
+
'R/P3Y': {
|
|
4927
|
+
name: 'Triennial'
|
|
4929
4928
|
},
|
|
4930
|
-
|
|
4931
|
-
name:
|
|
4929
|
+
'R/P0.33W': {
|
|
4930
|
+
name: 'Three times a week'
|
|
4932
4931
|
},
|
|
4933
|
-
|
|
4934
|
-
name:
|
|
4932
|
+
'R/P0.33M': {
|
|
4933
|
+
name: 'Three times a month'
|
|
4935
4934
|
},
|
|
4936
|
-
|
|
4937
|
-
name:
|
|
4935
|
+
'R/PT1S': {
|
|
4936
|
+
name: 'Continuously updated'
|
|
4938
4937
|
},
|
|
4939
|
-
|
|
4940
|
-
name:
|
|
4938
|
+
'R/P1M': {
|
|
4939
|
+
name: 'Monthly'
|
|
4941
4940
|
},
|
|
4942
|
-
|
|
4943
|
-
name:
|
|
4941
|
+
'R/P3M': {
|
|
4942
|
+
name: 'Quarterly'
|
|
4944
4943
|
},
|
|
4945
|
-
|
|
4946
|
-
name:
|
|
4944
|
+
'R/P0.5M': {
|
|
4945
|
+
name: 'Semimonthly'
|
|
4947
4946
|
},
|
|
4948
|
-
|
|
4949
|
-
name:
|
|
4947
|
+
'R/P4M': {
|
|
4948
|
+
name: 'Three times a year'
|
|
4950
4949
|
},
|
|
4951
|
-
|
|
4952
|
-
name:
|
|
4950
|
+
'R/P1W': {
|
|
4951
|
+
name: 'Weekly'
|
|
4953
4952
|
},
|
|
4954
|
-
|
|
4955
|
-
name:
|
|
4953
|
+
'R/PT1H': {
|
|
4954
|
+
name: 'Hourly'
|
|
4956
4955
|
},
|
|
4957
4956
|
irregular: {
|
|
4958
|
-
name:
|
|
4957
|
+
name: 'Irregular'
|
|
4959
4958
|
}
|
|
4960
4959
|
};
|
|
4961
4960
|
|
|
@@ -4964,7 +4963,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4964
4963
|
modified: (data)=>{
|
|
4965
4964
|
return [
|
|
4966
4965
|
{
|
|
4967
|
-
label:
|
|
4966
|
+
label: 'Modified',
|
|
4968
4967
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
4969
4968
|
date: data
|
|
4970
4969
|
})
|
|
@@ -4974,7 +4973,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4974
4973
|
issued: (data)=>{
|
|
4975
4974
|
return [
|
|
4976
4975
|
{
|
|
4977
|
-
label:
|
|
4976
|
+
label: 'Issued',
|
|
4978
4977
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
4979
4978
|
date: data
|
|
4980
4979
|
})
|
|
@@ -4984,7 +4983,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4984
4983
|
accrualPeriodicity: (data)=>{
|
|
4985
4984
|
return [
|
|
4986
4985
|
{
|
|
4987
|
-
label:
|
|
4986
|
+
label: 'Frequency',
|
|
4988
4987
|
value: (0, $28f16f59778efa64$export$82b1b1d517e5388a)[data].name
|
|
4989
4988
|
}
|
|
4990
4989
|
];
|
|
@@ -4992,7 +4991,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4992
4991
|
publisher: (data)=>{
|
|
4993
4992
|
if (data.data && data.data.name) return [
|
|
4994
4993
|
{
|
|
4995
|
-
label:
|
|
4994
|
+
label: 'Publisher',
|
|
4996
4995
|
value: data.data.name
|
|
4997
4996
|
}
|
|
4998
4997
|
];
|
|
@@ -5001,7 +5000,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5001
5000
|
identifier: (data)=>{
|
|
5002
5001
|
return [
|
|
5003
5002
|
{
|
|
5004
|
-
label:
|
|
5003
|
+
label: 'Identifier',
|
|
5005
5004
|
value: data
|
|
5006
5005
|
}
|
|
5007
5006
|
];
|
|
@@ -5009,11 +5008,11 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5009
5008
|
contactPoint: (data)=>{
|
|
5010
5009
|
let rows = [];
|
|
5011
5010
|
if (data.fn) rows.push({
|
|
5012
|
-
label:
|
|
5011
|
+
label: 'Contact',
|
|
5013
5012
|
value: data.fn
|
|
5014
5013
|
});
|
|
5015
5014
|
if (data.hasEmail) rows.push({
|
|
5016
|
-
label:
|
|
5015
|
+
label: 'Contact Email',
|
|
5017
5016
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5018
5017
|
href: data.hasEmail.includes("mailto:") ? data.hasEmail : `mailto:${data.hasEmail}`,
|
|
5019
5018
|
children: data.hasEmail.replace("mailto:", "")
|
|
@@ -5024,7 +5023,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5024
5023
|
bureauCode: (data)=>{
|
|
5025
5024
|
if (data.length) return [
|
|
5026
5025
|
{
|
|
5027
|
-
label:
|
|
5026
|
+
label: 'Bureau Code',
|
|
5028
5027
|
value: data[0]
|
|
5029
5028
|
}
|
|
5030
5029
|
];
|
|
@@ -5032,7 +5031,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5032
5031
|
programCode: (data)=>{
|
|
5033
5032
|
if (data.length) return [
|
|
5034
5033
|
{
|
|
5035
|
-
label:
|
|
5034
|
+
label: 'Program Code',
|
|
5036
5035
|
value: data[0]
|
|
5037
5036
|
}
|
|
5038
5037
|
];
|
|
@@ -5040,13 +5039,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5040
5039
|
theme: (data)=>{
|
|
5041
5040
|
return [
|
|
5042
5041
|
{
|
|
5043
|
-
label:
|
|
5042
|
+
label: 'Category',
|
|
5044
5043
|
value: data.map((theme)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5045
5044
|
to: `/datasets?theme[]=${theme.data}`,
|
|
5046
5045
|
children: theme.data
|
|
5047
5046
|
}, theme.data)).reduce((prev, curr)=>[
|
|
5048
5047
|
prev,
|
|
5049
|
-
|
|
5048
|
+
', ',
|
|
5050
5049
|
curr
|
|
5051
5050
|
])
|
|
5052
5051
|
}
|
|
@@ -5055,13 +5054,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5055
5054
|
keyword: (data)=>{
|
|
5056
5055
|
return [
|
|
5057
5056
|
{
|
|
5058
|
-
label:
|
|
5057
|
+
label: 'Tags',
|
|
5059
5058
|
value: data.map((keyword)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5060
5059
|
to: `/datasets?keyword[]=${keyword.data}`,
|
|
5061
5060
|
children: keyword.data
|
|
5062
5061
|
}, keyword.data)).reduce((prev, curr)=>[
|
|
5063
5062
|
prev,
|
|
5064
|
-
|
|
5063
|
+
', ',
|
|
5065
5064
|
curr
|
|
5066
5065
|
])
|
|
5067
5066
|
}
|
|
@@ -5070,7 +5069,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5070
5069
|
license: (data)=>{
|
|
5071
5070
|
return [
|
|
5072
5071
|
{
|
|
5073
|
-
label:
|
|
5072
|
+
label: 'License',
|
|
5074
5073
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5075
5074
|
href: data,
|
|
5076
5075
|
children: data
|
|
@@ -5081,7 +5080,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5081
5080
|
accessLevel: (data)=>{
|
|
5082
5081
|
return [
|
|
5083
5082
|
{
|
|
5084
|
-
label:
|
|
5083
|
+
label: 'Public Access Level',
|
|
5085
5084
|
value: data
|
|
5086
5085
|
}
|
|
5087
5086
|
];
|
|
@@ -5089,7 +5088,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5089
5088
|
temporal: (data)=>{
|
|
5090
5089
|
return [
|
|
5091
5090
|
{
|
|
5092
|
-
label:
|
|
5091
|
+
label: 'Temporal Coverage',
|
|
5093
5092
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5094
5093
|
className: "dc-c-word-break--all",
|
|
5095
5094
|
children: data
|
|
@@ -5100,7 +5099,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5100
5099
|
spatial: (data)=>{
|
|
5101
5100
|
return [
|
|
5102
5101
|
{
|
|
5103
|
-
label:
|
|
5102
|
+
label: 'Spacial/Geographical Coverage',
|
|
5104
5103
|
value: data
|
|
5105
5104
|
}
|
|
5106
5105
|
];
|
|
@@ -5108,7 +5107,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5108
5107
|
references: (data)=>{
|
|
5109
5108
|
return [
|
|
5110
5109
|
{
|
|
5111
|
-
label:
|
|
5110
|
+
label: 'Related Documents',
|
|
5112
5111
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
5113
5112
|
className: "ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0",
|
|
5114
5113
|
children: data.map((item)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -5189,7 +5188,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
5189
5188
|
if (dist && dist.data) {
|
|
5190
5189
|
if (dist.data.format) return dist.data.format.toLowerCase();
|
|
5191
5190
|
if (dist.data.mediaType) {
|
|
5192
|
-
const mediaType = dist.data.mediaType.split(
|
|
5191
|
+
const mediaType = dist.data.mediaType.split('/');
|
|
5193
5192
|
if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
|
|
5194
5193
|
}
|
|
5195
5194
|
if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
|
|
@@ -5199,7 +5198,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
5199
5198
|
}
|
|
5200
5199
|
}
|
|
5201
5200
|
}
|
|
5202
|
-
return
|
|
5201
|
+
return '';
|
|
5203
5202
|
}
|
|
5204
5203
|
|
|
5205
5204
|
|
|
@@ -5243,8 +5242,8 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5243
5242
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
5244
5243
|
href: dist.data.downloadURL,
|
|
5245
5244
|
style: {
|
|
5246
|
-
order: sm ?
|
|
5247
|
-
width: sm ?
|
|
5245
|
+
order: sm ? '1' : '0',
|
|
5246
|
+
width: sm ? '100%' : 'auto'
|
|
5248
5247
|
},
|
|
5249
5248
|
"aria-label": `Download ${dist.data.title || title} ${fileFormat}`,
|
|
5250
5249
|
className: "ds-c-button",
|
|
@@ -5257,7 +5256,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5257
5256
|
})
|
|
5258
5257
|
}),
|
|
5259
5258
|
dist.data.description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5260
|
-
className:
|
|
5259
|
+
className: 'ds-u-measure--wide ds-u-margin-bottom--7',
|
|
5261
5260
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5262
5261
|
className: "dc-c-metadata-description ds-u-margin--0",
|
|
5263
5262
|
dangerouslySetInnerHTML: {
|
|
@@ -5329,7 +5328,7 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5329
5328
|
const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
|
|
5330
5329
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
5331
5330
|
children: [
|
|
5332
|
-
md ?
|
|
5331
|
+
md ? '' : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5333
5332
|
component: "th",
|
|
5334
5333
|
className: "ds-u-font-weight--bold",
|
|
5335
5334
|
children: [
|
|
@@ -5340,8 +5339,8 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5340
5339
|
title: tooltip.title,
|
|
5341
5340
|
// @ts-ignore
|
|
5342
5341
|
style: {
|
|
5343
|
-
border:
|
|
5344
|
-
background:
|
|
5342
|
+
border: 'none',
|
|
5343
|
+
background: 'none'
|
|
5345
5344
|
},
|
|
5346
5345
|
maxWidth: "400px",
|
|
5347
5346
|
placement: "auto",
|
|
@@ -5400,10 +5399,10 @@ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: ap
|
|
|
5400
5399
|
href: apiUrl,
|
|
5401
5400
|
children: [
|
|
5402
5401
|
"View API",
|
|
5403
|
-
|
|
5402
|
+
' ',
|
|
5404
5403
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5405
5404
|
style: {
|
|
5406
|
-
whiteSpace:
|
|
5405
|
+
whiteSpace: 'nowrap'
|
|
5407
5406
|
},
|
|
5408
5407
|
children: [
|
|
5409
5408
|
"specification ",
|
|
@@ -5444,20 +5443,20 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
|
|
|
5444
5443
|
|
|
5445
5444
|
const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
|
|
5446
5445
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
5447
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
5446
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
|
|
5448
5447
|
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
5449
5448
|
minWidth: 0,
|
|
5450
5449
|
maxWidth: 544
|
|
5451
5450
|
});
|
|
5452
5451
|
const sortElement = (isSorted)=>{
|
|
5453
|
-
if (isSorted ===
|
|
5454
|
-
if (isSorted ===
|
|
5455
|
-
return
|
|
5452
|
+
if (isSorted === 'asc') return 'dc-c-sort--asc';
|
|
5453
|
+
if (isSorted === 'desc') return 'dc-c-sort--desc';
|
|
5454
|
+
return 'dc-c-sort--default';
|
|
5456
5455
|
};
|
|
5457
5456
|
const table = (0, $hgUW1$useReactTable)({
|
|
5458
5457
|
data: tableData,
|
|
5459
5458
|
columns: tableColumns,
|
|
5460
|
-
columnResizeMode:
|
|
5459
|
+
columnResizeMode: 'onChange',
|
|
5461
5460
|
getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
|
|
5462
5461
|
getFilteredRowModel: (0, $hgUW1$getFilteredRowModel)(),
|
|
5463
5462
|
getPaginationRowModel: (0, $hgUW1$getPaginationRowModel)(),
|
|
@@ -5476,49 +5475,49 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5476
5475
|
});
|
|
5477
5476
|
const sortOptions = [
|
|
5478
5477
|
{
|
|
5479
|
-
value:
|
|
5480
|
-
label:
|
|
5478
|
+
value: 'default',
|
|
5479
|
+
label: 'No Sort'
|
|
5481
5480
|
},
|
|
5482
5481
|
{
|
|
5483
|
-
value:
|
|
5484
|
-
label:
|
|
5482
|
+
value: 'titleasc',
|
|
5483
|
+
label: 'Title A-Z'
|
|
5485
5484
|
},
|
|
5486
5485
|
{
|
|
5487
|
-
value:
|
|
5488
|
-
label:
|
|
5486
|
+
value: 'titledesc',
|
|
5487
|
+
label: 'Title Z-A'
|
|
5489
5488
|
},
|
|
5490
5489
|
{
|
|
5491
|
-
value:
|
|
5492
|
-
label:
|
|
5490
|
+
value: 'typeasc',
|
|
5491
|
+
label: 'Type A-Z'
|
|
5493
5492
|
},
|
|
5494
5493
|
{
|
|
5495
|
-
value:
|
|
5496
|
-
label:
|
|
5494
|
+
value: 'typedesc',
|
|
5495
|
+
label: 'Type Z-A'
|
|
5497
5496
|
}
|
|
5498
5497
|
];
|
|
5499
5498
|
const sortStatesLookup = {
|
|
5500
5499
|
default: [],
|
|
5501
5500
|
titleasc: [
|
|
5502
5501
|
{
|
|
5503
|
-
id:
|
|
5502
|
+
id: 'titleResizable',
|
|
5504
5503
|
desc: false
|
|
5505
5504
|
}
|
|
5506
5505
|
],
|
|
5507
5506
|
titledesc: [
|
|
5508
5507
|
{
|
|
5509
|
-
id:
|
|
5508
|
+
id: 'titleResizable',
|
|
5510
5509
|
desc: true
|
|
5511
5510
|
}
|
|
5512
5511
|
],
|
|
5513
5512
|
typeasc: [
|
|
5514
5513
|
{
|
|
5515
|
-
id:
|
|
5514
|
+
id: 'type',
|
|
5516
5515
|
desc: false
|
|
5517
5516
|
}
|
|
5518
5517
|
],
|
|
5519
5518
|
typedesc: [
|
|
5520
5519
|
{
|
|
5521
|
-
id:
|
|
5520
|
+
id: 'type',
|
|
5522
5521
|
desc: true
|
|
5523
5522
|
}
|
|
5524
5523
|
]
|
|
@@ -5546,7 +5545,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5546
5545
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
5547
5546
|
className: "dc-c-datatable",
|
|
5548
5547
|
style: {
|
|
5549
|
-
width:
|
|
5548
|
+
width: '100%'
|
|
5550
5549
|
},
|
|
5551
5550
|
stackable: true,
|
|
5552
5551
|
children: [
|
|
@@ -5562,12 +5561,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5562
5561
|
}, header.id + "_resize") : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5563
5562
|
key: header.id,
|
|
5564
5563
|
className: `ds-u-border-y--2 ds-u-border--dark ds-u-border-x--0`,
|
|
5565
|
-
id:
|
|
5564
|
+
id: 'dataDictionary_' + header.id,
|
|
5566
5565
|
children: [
|
|
5567
5566
|
(0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext()),
|
|
5568
|
-
header.id ===
|
|
5567
|
+
header.id === 'type' && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
5569
5568
|
onClick: header.column.getToggleSortingHandler(),
|
|
5570
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
5569
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : '',
|
|
5571
5570
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
5572
5571
|
})
|
|
5573
5572
|
]
|
|
@@ -5582,12 +5581,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5582
5581
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
5583
5582
|
key: cell.id,
|
|
5584
5583
|
style: {
|
|
5585
|
-
maxWidth: mobile ?
|
|
5586
|
-
whiteSpace: cell.column.id === "description" ?
|
|
5584
|
+
maxWidth: mobile ? '100%' : cell.column.getSize(),
|
|
5585
|
+
whiteSpace: cell.column.id === "description" ? 'pre-wrap' : 'normal'
|
|
5587
5586
|
},
|
|
5588
|
-
className: `${cell.column.id ===
|
|
5589
|
-
headers:
|
|
5590
|
-
stackedTitle: cell.column.id ===
|
|
5587
|
+
className: `${cell.column.id === 'titleResizable' ? 'ds-u-word-break' : ''}`,
|
|
5588
|
+
headers: 'dataDictionary_' + cell.column.id,
|
|
5589
|
+
stackedTitle: cell.column.id === 'titleResizable' ? 'Title' : cell.column.columnDef.header,
|
|
5591
5590
|
children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
5592
5591
|
});
|
|
5593
5592
|
})
|
|
@@ -5616,7 +5615,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5616
5615
|
table.setPageIndex(page - 1);
|
|
5617
5616
|
},
|
|
5618
5617
|
renderHref: (page)=>`/page=${page}`
|
|
5619
|
-
}) :
|
|
5618
|
+
}) : ''
|
|
5620
5619
|
]
|
|
5621
5620
|
});
|
|
5622
5621
|
};
|
|
@@ -5626,17 +5625,17 @@ var $6765a74df807d015$export$2e2bcd8739ae039 = $6765a74df807d015$var$DataDiction
|
|
|
5626
5625
|
const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
|
|
5627
5626
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
5628
5627
|
const tableColumns = [
|
|
5629
|
-
columnHelper.accessor(
|
|
5630
|
-
header:
|
|
5628
|
+
columnHelper.accessor('name', {
|
|
5629
|
+
header: 'Name'
|
|
5631
5630
|
}),
|
|
5632
|
-
columnHelper.accessor(
|
|
5633
|
-
header:
|
|
5631
|
+
columnHelper.accessor('title', {
|
|
5632
|
+
header: 'Title'
|
|
5634
5633
|
}),
|
|
5635
|
-
columnHelper.accessor(
|
|
5636
|
-
header:
|
|
5634
|
+
columnHelper.accessor('type', {
|
|
5635
|
+
header: 'Type'
|
|
5637
5636
|
}),
|
|
5638
|
-
columnHelper.accessor(
|
|
5639
|
-
header:
|
|
5637
|
+
columnHelper.accessor('format', {
|
|
5638
|
+
header: 'Format'
|
|
5640
5639
|
})
|
|
5641
5640
|
];
|
|
5642
5641
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6765a74df807d015$export$2e2bcd8739ae039), {
|
|
@@ -5680,7 +5679,7 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
5680
5679
|
});
|
|
5681
5680
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
5682
5681
|
const tableColumns = [
|
|
5683
|
-
columnHelper.accessor(
|
|
5682
|
+
columnHelper.accessor('titleResizable', {
|
|
5684
5683
|
header: ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5685
5684
|
className: "dc-c-tooltip-width-override",
|
|
5686
5685
|
children: [
|
|
@@ -5689,8 +5688,8 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
5689
5688
|
title: "Title represents the column headers of the data file",
|
|
5690
5689
|
// @ts-ignore
|
|
5691
5690
|
style: {
|
|
5692
|
-
border:
|
|
5693
|
-
background:
|
|
5691
|
+
border: 'none',
|
|
5692
|
+
background: 'none'
|
|
5694
5693
|
},
|
|
5695
5694
|
maxWidth: "400px",
|
|
5696
5695
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
|
|
@@ -5700,48 +5699,48 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
5700
5699
|
size: 300,
|
|
5701
5700
|
minSize: 132
|
|
5702
5701
|
}),
|
|
5703
|
-
columnHelper.accessor(
|
|
5704
|
-
header:
|
|
5702
|
+
columnHelper.accessor('description', {
|
|
5703
|
+
header: 'Description',
|
|
5705
5704
|
minSize: 600
|
|
5706
5705
|
}),
|
|
5707
|
-
columnHelper.accessor(
|
|
5708
|
-
header:
|
|
5706
|
+
columnHelper.accessor('type', {
|
|
5707
|
+
header: 'Type',
|
|
5709
5708
|
size: 150,
|
|
5710
5709
|
enableResizing: false
|
|
5711
5710
|
})
|
|
5712
5711
|
];
|
|
5713
5712
|
const typeOptions = [
|
|
5714
5713
|
{
|
|
5715
|
-
value:
|
|
5716
|
-
label:
|
|
5714
|
+
value: 'all',
|
|
5715
|
+
label: 'All Types'
|
|
5717
5716
|
},
|
|
5718
5717
|
{
|
|
5719
|
-
value:
|
|
5720
|
-
label:
|
|
5718
|
+
value: 'string',
|
|
5719
|
+
label: 'String'
|
|
5721
5720
|
},
|
|
5722
5721
|
{
|
|
5723
|
-
value:
|
|
5724
|
-
label:
|
|
5722
|
+
value: 'date',
|
|
5723
|
+
label: 'Date'
|
|
5725
5724
|
},
|
|
5726
5725
|
{
|
|
5727
|
-
value:
|
|
5728
|
-
label:
|
|
5726
|
+
value: 'datetime',
|
|
5727
|
+
label: 'Datetime'
|
|
5729
5728
|
},
|
|
5730
5729
|
{
|
|
5731
|
-
value:
|
|
5732
|
-
label:
|
|
5730
|
+
value: 'year',
|
|
5731
|
+
label: 'Year'
|
|
5733
5732
|
},
|
|
5734
5733
|
{
|
|
5735
|
-
value:
|
|
5736
|
-
label:
|
|
5734
|
+
value: 'integer',
|
|
5735
|
+
label: 'Integer'
|
|
5737
5736
|
},
|
|
5738
5737
|
{
|
|
5739
|
-
value:
|
|
5740
|
-
label:
|
|
5738
|
+
value: 'number',
|
|
5739
|
+
label: 'Number'
|
|
5741
5740
|
},
|
|
5742
5741
|
{
|
|
5743
|
-
value:
|
|
5744
|
-
label:
|
|
5742
|
+
value: 'boolean',
|
|
5743
|
+
label: 'Boolean'
|
|
5745
5744
|
}
|
|
5746
5745
|
];
|
|
5747
5746
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -5848,7 +5847,7 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
|
|
|
5848
5847
|
href: datasetDictionaryEndpoint + "/csv",
|
|
5849
5848
|
className: "ds-c-button",
|
|
5850
5849
|
style: {
|
|
5851
|
-
width:
|
|
5850
|
+
width: '100%'
|
|
5852
5851
|
},
|
|
5853
5852
|
children: [
|
|
5854
5853
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
@@ -5879,6 +5878,86 @@ var $6012b86ffcaf3f71$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
5879
5878
|
|
|
5880
5879
|
|
|
5881
5880
|
|
|
5881
|
+
const $09db8d23c70b6400$var$StoredQueryViewer = ({ id: id })=>{
|
|
5882
|
+
const [loading, setLoading] = (0, $hgUW1$useState)(false);
|
|
5883
|
+
const [data, setData] = (0, $hgUW1$useState)(null);
|
|
5884
|
+
const [error, setError] = (0, $hgUW1$useState)(null);
|
|
5885
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
5886
|
+
if (!id) return;
|
|
5887
|
+
setLoading(true);
|
|
5888
|
+
fetch(`/api/1/stored-query/items/${id}`).then((response)=>{
|
|
5889
|
+
if (!response.ok) throw new Error('Network response was not ok');
|
|
5890
|
+
return response.json();
|
|
5891
|
+
}).then((json)=>{
|
|
5892
|
+
setData(json);
|
|
5893
|
+
setLoading(false);
|
|
5894
|
+
}).catch((err)=>{
|
|
5895
|
+
setError(err.message);
|
|
5896
|
+
setLoading(false);
|
|
5897
|
+
});
|
|
5898
|
+
}, [
|
|
5899
|
+
id
|
|
5900
|
+
]);
|
|
5901
|
+
if (loading) return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5902
|
+
children: "Loading..."
|
|
5903
|
+
});
|
|
5904
|
+
if (error) return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5905
|
+
children: [
|
|
5906
|
+
"Error: ",
|
|
5907
|
+
error
|
|
5908
|
+
]
|
|
5909
|
+
});
|
|
5910
|
+
if (!data) return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5911
|
+
children: "No data found."
|
|
5912
|
+
});
|
|
5913
|
+
const storedQueryUrl = `/stored-query/${data.storedQuery?.uuid}`;
|
|
5914
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
5915
|
+
className: "dc-c-list-item ds-u-padding-top--4",
|
|
5916
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5917
|
+
className: "dc-c-searchlist-item ds-u-border-bottom--1 ds-u-padding-bottom--3",
|
|
5918
|
+
children: [
|
|
5919
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5920
|
+
className: "ds-l-row ds-u-align-items--start",
|
|
5921
|
+
children: [
|
|
5922
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5923
|
+
id: `dataset-${data.storedQuery?.identifier}-updated-date`,
|
|
5924
|
+
className: "ds-l-col--12 ds-u-text-align--left ds-text-heading--sm ds-u-padding-top--0",
|
|
5925
|
+
children: [
|
|
5926
|
+
"Updated ",
|
|
5927
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5928
|
+
date: data.storedQuery?.modified
|
|
5929
|
+
})
|
|
5930
|
+
]
|
|
5931
|
+
}),
|
|
5932
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
5933
|
+
className: "ds-l-col--12 ds-text-heading--2xl",
|
|
5934
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5935
|
+
href: storedQueryUrl,
|
|
5936
|
+
target: "_blank",
|
|
5937
|
+
children: data.storedQuery?.title
|
|
5938
|
+
})
|
|
5939
|
+
})
|
|
5940
|
+
]
|
|
5941
|
+
}),
|
|
5942
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5943
|
+
className: "ds-l-row",
|
|
5944
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5945
|
+
className: "ds-l-col--12",
|
|
5946
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
5947
|
+
children: data.storedQuery?.description
|
|
5948
|
+
})
|
|
5949
|
+
})
|
|
5950
|
+
})
|
|
5951
|
+
]
|
|
5952
|
+
})
|
|
5953
|
+
});
|
|
5954
|
+
};
|
|
5955
|
+
var $09db8d23c70b6400$export$2e2bcd8739ae039 = $09db8d23c70b6400$var$StoredQueryViewer;
|
|
5956
|
+
|
|
5957
|
+
|
|
5958
|
+
|
|
5959
|
+
|
|
5960
|
+
|
|
5882
5961
|
|
|
5883
5962
|
|
|
5884
5963
|
|
|
@@ -5927,7 +6006,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
5927
6006
|
const [description, setDescription] = (0, $hgUW1$useState)("");
|
|
5928
6007
|
if (!distribution && !dataset?.identifier) return null;
|
|
5929
6008
|
(0, $hgUW1$useEffect)(()=>{
|
|
5930
|
-
let newDescription =
|
|
6009
|
+
let newDescription = '';
|
|
5931
6010
|
if (customDescription) newDescription = customDescription(dataset, distribution, resource);
|
|
5932
6011
|
else {
|
|
5933
6012
|
if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
|
|
@@ -5942,7 +6021,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
5942
6021
|
customDescription
|
|
5943
6022
|
]);
|
|
5944
6023
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5945
|
-
className:
|
|
6024
|
+
className: 'ds-u-measure--wide ds-u-margin-bottom--7',
|
|
5946
6025
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5947
6026
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
5948
6027
|
dangerouslySetInnerHTML: {
|
|
@@ -5964,7 +6043,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
5964
6043
|
],
|
|
5965
6044
|
queryFn: ()=>{
|
|
5966
6045
|
return fetch(`${dataDictionaryUrl}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA), {
|
|
5967
|
-
arrayFormat:
|
|
6046
|
+
arrayFormat: 'comma',
|
|
5968
6047
|
encode: false
|
|
5969
6048
|
})}`).then((res)=>res.json());
|
|
5970
6049
|
}
|
|
@@ -5974,7 +6053,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
5974
6053
|
dataDictionaryLoading: isPending
|
|
5975
6054
|
};
|
|
5976
6055
|
};
|
|
5977
|
-
const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns: customColumns, setDatasetTitle: setDatasetTitle, customMetadataMapping: customMetadataMapping, apiPageUrl: apiPageUrl = "/api", dataDictionaryUrl: dataDictionaryUrl, borderlessTabs: borderlessTabs = false, defaultPageSize: defaultPageSize = 25, dataDictionaryCSV: dataDictionaryCSV = false, dataDictionaryBanner: dataDictionaryBanner = false, disableTableControls: disableTableControls = false, hideDataDictionary: hideDataDictionary = false, customDescription: customDescription, updateAriaLive: updateAriaLive, showRowLimitNotice: showRowLimitNotice = false })=>{
|
|
6056
|
+
const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns: customColumns, setDatasetTitle: setDatasetTitle, customMetadataMapping: customMetadataMapping, apiPageUrl: apiPageUrl = "/api", dataDictionaryUrl: dataDictionaryUrl, borderlessTabs: borderlessTabs = false, defaultPageSize: defaultPageSize = 25, dataDictionaryCSV: dataDictionaryCSV = false, dataDictionaryBanner: dataDictionaryBanner = false, disableTableControls: disableTableControls = false, hideDataDictionary: hideDataDictionary = false, hideStoredQuery: hideStoredQuery = false, customDescription: customDescription, updateAriaLive: updateAriaLive, showRowLimitNotice: showRowLimitNotice = false })=>{
|
|
5978
6057
|
const options = location.search ? {
|
|
5979
6058
|
...(0, $hgUW1$qs).parse(location.search, {
|
|
5980
6059
|
ignoreQueryPrefix: true
|
|
@@ -5983,7 +6062,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5983
6062
|
conditions: []
|
|
5984
6063
|
};
|
|
5985
6064
|
const { dataset: dataset, isPending: isPending } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
5986
|
-
const title = dataset.title ? dataset.title :
|
|
6065
|
+
const title = dataset.title ? dataset.title : '';
|
|
5987
6066
|
const metadataMapping = {
|
|
5988
6067
|
...(0, $6da0396069e23175$export$bc27cf7ecf44639d),
|
|
5989
6068
|
...customMetadataMapping
|
|
@@ -5991,7 +6070,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5991
6070
|
let distribution = {};
|
|
5992
6071
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
5993
6072
|
if (distributions.length) distribution = distributions[0];
|
|
5994
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
6073
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
5995
6074
|
...options,
|
|
5996
6075
|
limit: defaultPageSize
|
|
5997
6076
|
});
|
|
@@ -6003,7 +6082,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6003
6082
|
}) : null;
|
|
6004
6083
|
(0, $hgUW1$useEffect)(()=>{
|
|
6005
6084
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6006
|
-
if (localFileFormat ===
|
|
6085
|
+
if (localFileFormat === 'csv') resource.setResource(distribution.identifier);
|
|
6007
6086
|
}, [
|
|
6008
6087
|
distribution
|
|
6009
6088
|
]);
|
|
@@ -6058,26 +6137,26 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6058
6137
|
distribution,
|
|
6059
6138
|
window.location.hash
|
|
6060
6139
|
]);
|
|
6061
|
-
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType ===
|
|
6140
|
+
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === 'application/vnd.tableschema+json' || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
6062
6141
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6063
6142
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
6064
6143
|
content: notFoundContent,
|
|
6065
6144
|
siteUrl: rootUrl
|
|
6066
6145
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6067
|
-
className:
|
|
6146
|
+
className: 'ds-l-container',
|
|
6068
6147
|
children: [
|
|
6069
6148
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6070
|
-
className:
|
|
6149
|
+
className: 'ds-l-row',
|
|
6071
6150
|
children: [
|
|
6072
6151
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6073
|
-
className:
|
|
6152
|
+
className: 'ds-l-md-col--9',
|
|
6074
6153
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
6075
6154
|
className: "ds-text-heading--3xl",
|
|
6076
6155
|
children: title
|
|
6077
6156
|
})
|
|
6078
6157
|
}),
|
|
6079
6158
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6080
|
-
className:
|
|
6159
|
+
className: 'ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right',
|
|
6081
6160
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
6082
6161
|
className: "ds-u-margin--0",
|
|
6083
6162
|
children: [
|
|
@@ -6089,7 +6168,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6089
6168
|
})
|
|
6090
6169
|
}),
|
|
6091
6170
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6092
|
-
className:
|
|
6171
|
+
className: 'ds-l-md-col--9',
|
|
6093
6172
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
6094
6173
|
distribution: distribution,
|
|
6095
6174
|
dataset: dataset,
|
|
@@ -6101,9 +6180,9 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6101
6180
|
]
|
|
6102
6181
|
}),
|
|
6103
6182
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6104
|
-
className:
|
|
6183
|
+
className: 'ds-l-row',
|
|
6105
6184
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6106
|
-
className:
|
|
6185
|
+
className: 'ds-l-md-col--12 dc-dataset',
|
|
6107
6186
|
children: !isPending && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tabs), {
|
|
6108
6187
|
onChange: (selectedId, prevSelectedId)=>{
|
|
6109
6188
|
setSelectedTab(selectedId);
|
|
@@ -6111,7 +6190,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6111
6190
|
selectedId: selectedTab,
|
|
6112
6191
|
children: [
|
|
6113
6192
|
(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6114
|
-
id:
|
|
6193
|
+
id: 'data-table',
|
|
6115
6194
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6116
6195
|
className: "ds-u-color--primary",
|
|
6117
6196
|
children: [
|
|
@@ -6121,7 +6200,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6121
6200
|
"Data Table"
|
|
6122
6201
|
]
|
|
6123
6202
|
}),
|
|
6124
|
-
className: borderlessTabs ?
|
|
6203
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6125
6204
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
6126
6205
|
value: {
|
|
6127
6206
|
id: id,
|
|
@@ -6136,7 +6215,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6136
6215
|
})
|
|
6137
6216
|
}),
|
|
6138
6217
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6139
|
-
id:
|
|
6218
|
+
id: 'overview',
|
|
6140
6219
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6141
6220
|
className: "ds-u-color--primary",
|
|
6142
6221
|
children: [
|
|
@@ -6146,7 +6225,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6146
6225
|
"Overview"
|
|
6147
6226
|
]
|
|
6148
6227
|
}),
|
|
6149
|
-
className: borderlessTabs ?
|
|
6228
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6150
6229
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
|
|
6151
6230
|
resource: resource,
|
|
6152
6231
|
dataset: dataset,
|
|
@@ -6155,7 +6234,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6155
6234
|
})
|
|
6156
6235
|
}),
|
|
6157
6236
|
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TabPanel), {
|
|
6158
|
-
id:
|
|
6237
|
+
id: 'data-dictionary',
|
|
6159
6238
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6160
6239
|
className: "ds-u-color--primary",
|
|
6161
6240
|
children: [
|
|
@@ -6165,7 +6244,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6165
6244
|
"Data Dictionary"
|
|
6166
6245
|
]
|
|
6167
6246
|
}),
|
|
6168
|
-
className: borderlessTabs ?
|
|
6247
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6169
6248
|
children: [
|
|
6170
6249
|
displayDataDictionaryTab && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
6171
6250
|
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
@@ -6178,8 +6257,24 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6178
6257
|
})
|
|
6179
6258
|
]
|
|
6180
6259
|
}),
|
|
6181
|
-
|
|
6182
|
-
id:
|
|
6260
|
+
!hideStoredQuery && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6261
|
+
id: 'storedQuery',
|
|
6262
|
+
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6263
|
+
className: "ds-u-color--primary",
|
|
6264
|
+
children: [
|
|
6265
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
6266
|
+
id: "storedQuery"
|
|
6267
|
+
}),
|
|
6268
|
+
"Stored Query"
|
|
6269
|
+
]
|
|
6270
|
+
}),
|
|
6271
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6272
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $09db8d23c70b6400$export$2e2bcd8739ae039), {
|
|
6273
|
+
id: id
|
|
6274
|
+
})
|
|
6275
|
+
}),
|
|
6276
|
+
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TabPanel), {
|
|
6277
|
+
id: 'api',
|
|
6183
6278
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6184
6279
|
className: "ds-u-color--primary",
|
|
6185
6280
|
children: [
|
|
@@ -6189,13 +6284,16 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6189
6284
|
"API"
|
|
6190
6285
|
]
|
|
6191
6286
|
}),
|
|
6192
|
-
className: borderlessTabs ?
|
|
6193
|
-
children:
|
|
6194
|
-
id
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6287
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6288
|
+
children: [
|
|
6289
|
+
'console.log("id", id)',
|
|
6290
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
|
|
6291
|
+
id: id,
|
|
6292
|
+
rootUrl: rootUrl,
|
|
6293
|
+
apiUrl: apiPageUrl,
|
|
6294
|
+
showRowLimitNotice: showRowLimitNotice
|
|
6295
|
+
})
|
|
6296
|
+
]
|
|
6199
6297
|
})
|
|
6200
6298
|
]
|
|
6201
6299
|
})
|
|
@@ -6226,13 +6324,13 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6226
6324
|
});
|
|
6227
6325
|
const menu = (0, $hgUW1$useRef)(null);
|
|
6228
6326
|
function closeMobileMenu() {
|
|
6229
|
-
const mobileMenuButtonElement = document.querySelector(
|
|
6327
|
+
const mobileMenuButtonElement = document.querySelector('.dkan-c-mobile-menu-button');
|
|
6230
6328
|
if (!mobileMenuButtonElement) return;
|
|
6231
6329
|
mobileMenuButtonElement.focus();
|
|
6232
6330
|
}
|
|
6233
6331
|
// Close mobile menu with escape.
|
|
6234
6332
|
function handleMenuClose(event) {
|
|
6235
|
-
if (event.key ===
|
|
6333
|
+
if (event.key === 'Escape' && mobileMenuOpen) setMobileMenuOpen(false);
|
|
6236
6334
|
}
|
|
6237
6335
|
function handleClick(event) {
|
|
6238
6336
|
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
@@ -6267,7 +6365,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6267
6365
|
const focusableEls = getFocusableElements(menu.current).selectors.visible;
|
|
6268
6366
|
const firstEl = focusableEls[0];
|
|
6269
6367
|
const lastEl = focusableEls[focusableEls.length - 1];
|
|
6270
|
-
if (event.key ===
|
|
6368
|
+
if (event.key === 'Tab') {
|
|
6271
6369
|
if (event.shiftKey && document.activeElement === firstEl) {
|
|
6272
6370
|
lastEl?.focus();
|
|
6273
6371
|
event.preventDefault();
|
|
@@ -6279,15 +6377,15 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6279
6377
|
}
|
|
6280
6378
|
};
|
|
6281
6379
|
(0, $hgUW1$useEffect)(()=>{
|
|
6282
|
-
document.addEventListener(
|
|
6283
|
-
document.addEventListener(
|
|
6380
|
+
document.addEventListener('keyup', handleMenuClose);
|
|
6381
|
+
document.addEventListener('mousedown', handleClick);
|
|
6284
6382
|
if (mobileMenuOpen) handleFocusIn();
|
|
6285
6383
|
else closeMobileMenu();
|
|
6286
|
-
if (menu.current) menu.current.addEventListener(
|
|
6384
|
+
if (menu.current) menu.current.addEventListener('keydown', (evt)=>trapFocus(evt));
|
|
6287
6385
|
return ()=>{
|
|
6288
|
-
document.removeEventListener(
|
|
6289
|
-
document.addEventListener(
|
|
6290
|
-
if (menu.current) menu.current.removeEventListener(
|
|
6386
|
+
document.removeEventListener('keyup', handleMenuClose);
|
|
6387
|
+
document.addEventListener('mousedown', handleClick);
|
|
6388
|
+
if (menu.current) menu.current.removeEventListener('keydown', trapFocus);
|
|
6291
6389
|
};
|
|
6292
6390
|
}, [
|
|
6293
6391
|
mobileMenuOpen
|
|
@@ -6302,7 +6400,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6302
6400
|
},
|
|
6303
6401
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
|
|
6304
6402
|
"aria-label": "Site header",
|
|
6305
|
-
className: `dkan-c-header dkan-c-header--${mobileMax ?
|
|
6403
|
+
className: `dkan-c-header dkan-c-header--${mobileMax ? 'mobile' : 'desktop'}`,
|
|
6306
6404
|
children: [
|
|
6307
6405
|
topNav && topNav,
|
|
6308
6406
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6345,7 +6443,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6345
6443
|
var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
|
|
6346
6444
|
|
|
6347
6445
|
|
|
6348
|
-
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle =
|
|
6446
|
+
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle = 'Get Email Updates', emailBody: emailBody = 'Sign up to get the latest information from CMS by choosing the topics and frequency of emails that are best for you.', emailLink: emailLink = '', emailButton: emailButton = 'Sign up for email updates', socialMediaLinks: socialMediaLinks = null, hhsLogo: hhsLogo, cmsLogo: cmsLogo, trademarkContent: trademarkContent = /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6349
6447
|
children: [
|
|
6350
6448
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6351
6449
|
children: "A federal government website managed and paid for by the U.S. Centers for Medicare & Medicaid Services."
|
|
@@ -6433,14 +6531,14 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6433
6531
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
6434
6532
|
className: "ds-u-font-size--sm",
|
|
6435
6533
|
children: footerAdditionalResourcesLinks.filter((link)=>{
|
|
6436
|
-
const noOnClick = Object.keys(link).findIndex((l)=>l ===
|
|
6534
|
+
const noOnClick = Object.keys(link).findIndex((l)=>l === 'onClick');
|
|
6437
6535
|
if (noOnClick === -1 || link.onClick && link.dataTag) return link;
|
|
6438
6536
|
}).map((link)=>{
|
|
6439
6537
|
if (link.onClick && link.dataTag) return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
6440
6538
|
className: "ds-u-margin-bottom--1",
|
|
6441
6539
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
6442
6540
|
href: link.url,
|
|
6443
|
-
[
|
|
6541
|
+
['data-' + link.dataTag.name]: link.dataTag.value,
|
|
6444
6542
|
onClick: link.onClick,
|
|
6445
6543
|
children: link.label
|
|
6446
6544
|
})
|
|
@@ -6540,7 +6638,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6540
6638
|
children: [
|
|
6541
6639
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6542
6640
|
id: "svg-inline--fa-title-iRCARP7h6Kp3",
|
|
6543
|
-
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title :
|
|
6641
|
+
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title : 'CMS Facebook'
|
|
6544
6642
|
}),
|
|
6545
6643
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6546
6644
|
transform: "translate(160 256)",
|
|
@@ -6593,7 +6691,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6593
6691
|
children: [
|
|
6594
6692
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6595
6693
|
id: "svg-inline--fa-title-4z03ITiPPTVF",
|
|
6596
|
-
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title :
|
|
6694
|
+
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title : 'CMS Twitter'
|
|
6597
6695
|
}),
|
|
6598
6696
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6599
6697
|
transform: "translate(256 256)",
|
|
@@ -6646,7 +6744,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6646
6744
|
children: [
|
|
6647
6745
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6648
6746
|
id: "svg-inline--fa-title-Nm2qsuSKvuRZ",
|
|
6649
|
-
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title :
|
|
6747
|
+
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title : 'CMS LinkedIn'
|
|
6650
6748
|
}),
|
|
6651
6749
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6652
6750
|
transform: "translate(224 256)",
|
|
@@ -6698,7 +6796,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6698
6796
|
children: [
|
|
6699
6797
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6700
6798
|
id: "svg-inline--fa-title-youtube",
|
|
6701
|
-
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title :
|
|
6799
|
+
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title : 'CMS youtube'
|
|
6702
6800
|
}),
|
|
6703
6801
|
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
6704
6802
|
fill: "currentColor",
|
|
@@ -6798,26 +6896,26 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
6798
6896
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6799
6897
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
6800
6898
|
stackable: true,
|
|
6801
|
-
className:
|
|
6899
|
+
className: 'ds-c-table',
|
|
6802
6900
|
children: [
|
|
6803
6901
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
|
|
6804
6902
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
6805
6903
|
children: [
|
|
6806
6904
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6807
|
-
id:
|
|
6808
|
-
headers:
|
|
6905
|
+
id: 'application',
|
|
6906
|
+
headers: 'Application',
|
|
6809
6907
|
children: "Application"
|
|
6810
|
-
},
|
|
6908
|
+
}, 'Application'),
|
|
6811
6909
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6812
|
-
id:
|
|
6813
|
-
headers:
|
|
6910
|
+
id: 'notes',
|
|
6911
|
+
headers: 'Notes',
|
|
6814
6912
|
children: "Notes"
|
|
6815
|
-
},
|
|
6913
|
+
}, 'Notes'),
|
|
6816
6914
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6817
|
-
id:
|
|
6818
|
-
headers:
|
|
6915
|
+
id: 'links',
|
|
6916
|
+
headers: 'Links',
|
|
6819
6917
|
children: "Links"
|
|
6820
|
-
},
|
|
6918
|
+
}, 'Links')
|
|
6821
6919
|
]
|
|
6822
6920
|
})
|
|
6823
6921
|
}),
|
|
@@ -6827,19 +6925,19 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
6827
6925
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6828
6926
|
id: d.id,
|
|
6829
6927
|
stackedTitle: "Application",
|
|
6830
|
-
headers:
|
|
6928
|
+
headers: 'Application',
|
|
6831
6929
|
children: d.application
|
|
6832
6930
|
}, d.id),
|
|
6833
6931
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6834
6932
|
id: d.id,
|
|
6835
6933
|
stackedTitle: "Notes",
|
|
6836
|
-
headers:
|
|
6934
|
+
headers: 'Notes',
|
|
6837
6935
|
children: d.notes
|
|
6838
6936
|
}, `${d.id}-notes`),
|
|
6839
6937
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6840
6938
|
id: d.id,
|
|
6841
6939
|
stackedTitle: "Links",
|
|
6842
|
-
headers:
|
|
6940
|
+
headers: 'Links',
|
|
6843
6941
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
6844
6942
|
className: "dkan-newtab",
|
|
6845
6943
|
href: d.link,
|
|
@@ -6867,44 +6965,44 @@ var $5655284dbbb89508$export$2e2bcd8739ae039 = $5655284dbbb89508$var$Documentati
|
|
|
6867
6965
|
|
|
6868
6966
|
const $c7bf75f7e8a68780$export$7850f4d545d994c6 = [
|
|
6869
6967
|
{
|
|
6870
|
-
id:
|
|
6871
|
-
application:
|
|
6872
|
-
notes:
|
|
6873
|
-
link:
|
|
6874
|
-
linkText:
|
|
6875
|
-
screenReaderOnlyText:
|
|
6968
|
+
id: 'excel',
|
|
6969
|
+
application: 'Microsoft Excel',
|
|
6970
|
+
notes: 'Official size limitations for Microsoft Excel',
|
|
6971
|
+
link: 'https://support.microsoft.com/en-us/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3?redirectSourcePath=%252fen-us%252farticle%252fExcel-specifications-and-limits-ca36e2dc-1f09-4620-b726-67c00b05040f',
|
|
6972
|
+
linkText: 'Excel Specifications and Limits',
|
|
6973
|
+
screenReaderOnlyText: 'on microsoft.com'
|
|
6876
6974
|
},
|
|
6877
6975
|
{
|
|
6878
|
-
id:
|
|
6879
|
-
application:
|
|
6880
|
-
notes:
|
|
6881
|
-
link:
|
|
6882
|
-
linkText:
|
|
6883
|
-
screenReaderOnlyText:
|
|
6976
|
+
id: 'access',
|
|
6977
|
+
application: 'Microsoft Access',
|
|
6978
|
+
notes: 'Official size limitations for Microsoft Access',
|
|
6979
|
+
link: 'https://support.microsoft.com/en-us/office/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c?ui=en-us&rs=en-us&ad=us',
|
|
6980
|
+
linkText: 'Access 2016 Specifications',
|
|
6981
|
+
screenReaderOnlyText: 'on microsoft.com'
|
|
6884
6982
|
},
|
|
6885
6983
|
{
|
|
6886
|
-
id:
|
|
6887
|
-
application:
|
|
6888
|
-
notes:
|
|
6889
|
-
link:
|
|
6890
|
-
linkText:
|
|
6891
|
-
screenReaderOnlyText:
|
|
6984
|
+
id: 'oracle-sql-developer',
|
|
6985
|
+
application: 'Oracle SQL Developer',
|
|
6986
|
+
notes: 'Oracle SQL Developer tool',
|
|
6987
|
+
link: 'https://www.oracle.com/database/sqldeveloper/',
|
|
6988
|
+
linkText: 'Oracle SQL Developer Overview',
|
|
6989
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
6892
6990
|
},
|
|
6893
6991
|
{
|
|
6894
|
-
id:
|
|
6895
|
-
application:
|
|
6896
|
-
notes:
|
|
6897
|
-
link:
|
|
6898
|
-
linkText:
|
|
6899
|
-
screenReaderOnlyText:
|
|
6992
|
+
id: 'oracle-database',
|
|
6993
|
+
application: 'Oracle Database',
|
|
6994
|
+
notes: 'Oracle Database official size limitations',
|
|
6995
|
+
link: 'https://docs.oracle.com/cd/B28359_01/server.111/b28320/limits002.htm#i287915',
|
|
6996
|
+
linkText: 'Oracle Physical Database Limits',
|
|
6997
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
6900
6998
|
},
|
|
6901
6999
|
{
|
|
6902
|
-
id:
|
|
6903
|
-
application:
|
|
6904
|
-
notes:
|
|
6905
|
-
link:
|
|
6906
|
-
linkText:
|
|
6907
|
-
screenReaderOnlyText:
|
|
7000
|
+
id: 'oracle-sql-client-tools',
|
|
7001
|
+
application: 'Oracle SQL Client Tools',
|
|
7002
|
+
notes: 'Oracle SQL Client Tools',
|
|
7003
|
+
link: 'https://www.oracle.com/database/technologies/oracle-database-software-downloads.html',
|
|
7004
|
+
linkText: 'Oracle SQL Client',
|
|
7005
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
6908
7006
|
}
|
|
6909
7007
|
];
|
|
6910
7008
|
|
|
@@ -6932,7 +7030,7 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
6932
7030
|
}),
|
|
6933
7031
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
6934
7032
|
heading: "Notice",
|
|
6935
|
-
className:
|
|
7033
|
+
className: 'ds-u-margin-top--6',
|
|
6936
7034
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6937
7035
|
className: "ds-c-alert__text",
|
|
6938
7036
|
children: "Be aware of the file size and row limitations of the software you are attempting to import the files into. For information on limitations, look at the software's official documentation."
|
|
@@ -6941,16 +7039,16 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
6941
7039
|
]
|
|
6942
7040
|
}),
|
|
6943
7041
|
/*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
6944
|
-
className:
|
|
7042
|
+
className: 'ds-u-margin-top--4 ds-l-row',
|
|
6945
7043
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6946
|
-
className:
|
|
7044
|
+
className: 'ds-l-col--12',
|
|
6947
7045
|
children: [
|
|
6948
7046
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
6949
7047
|
className: "ds-text-heading--2xl ds-text-heading--2xl",
|
|
6950
7048
|
children: "Documentation by Application"
|
|
6951
7049
|
}),
|
|
6952
7050
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6953
|
-
className:
|
|
7051
|
+
className: 'ds-u-margin-top--4',
|
|
6954
7052
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5655284dbbb89508$export$2e2bcd8739ae039), {
|
|
6955
7053
|
data: documentationList
|
|
6956
7054
|
})
|
|
@@ -6978,7 +7076,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
6978
7076
|
const options = {
|
|
6979
7077
|
conditions: query ? JSON.parse(query).map(({ column: column, operator: operator, ...rest })=>({
|
|
6980
7078
|
property: column,
|
|
6981
|
-
operator: operator ===
|
|
7079
|
+
operator: operator === 'is' ? '=' : operator === 'is not' ? '<>' : operator === 'or' ? 'in' : operator,
|
|
6982
7080
|
...rest
|
|
6983
7081
|
})) : []
|
|
6984
7082
|
};
|
|
@@ -6986,13 +7084,13 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
6986
7084
|
let distribution = {};
|
|
6987
7085
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
6988
7086
|
if (distributions.length) distribution = distributions[distributionIndex];
|
|
6989
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7087
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
6990
7088
|
...options,
|
|
6991
7089
|
limit: defaultPageSize
|
|
6992
7090
|
});
|
|
6993
7091
|
(0, $hgUW1$useEffect)(()=>{
|
|
6994
7092
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6995
|
-
if (localFileFormat ===
|
|
7093
|
+
if (localFileFormat === 'csv') resource.setResource(distribution.identifier);
|
|
6996
7094
|
}, [
|
|
6997
7095
|
distribution
|
|
6998
7096
|
]);
|
|
@@ -7043,7 +7141,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7043
7141
|
|
|
7044
7142
|
|
|
7045
7143
|
function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
|
|
7046
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7144
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
7047
7145
|
const newDate = new Date(condition.value);
|
|
7048
7146
|
if (newDate instanceof Date && !isNaN(newDate)) return newDate;
|
|
7049
7147
|
}
|
|
@@ -7060,9 +7158,9 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7060
7158
|
const [startDate, setStartDate] = (0, $hgUW1$react).useState($374c4669b044ddf8$var$getStartDate(condition, schema, id));
|
|
7061
7159
|
(0, $hgUW1$useEffect)(()=>{
|
|
7062
7160
|
if (property !== condition.property) {
|
|
7063
|
-
if (property) update(index,
|
|
7064
|
-
else update(index,
|
|
7065
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7161
|
+
if (property) update(index, 'property', property);
|
|
7162
|
+
else update(index, 'property', '');
|
|
7163
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
7066
7164
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
7067
7165
|
}
|
|
7068
7166
|
}
|
|
@@ -7076,16 +7174,16 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7076
7174
|
]);
|
|
7077
7175
|
(0, $hgUW1$useEffect)(()=>{
|
|
7078
7176
|
if (operator !== condition.operator) {
|
|
7079
|
-
if (operator) update(index,
|
|
7080
|
-
else update(index,
|
|
7177
|
+
if (operator) update(index, 'operator', operator);
|
|
7178
|
+
else update(index, 'operator', '');
|
|
7081
7179
|
}
|
|
7082
7180
|
}, [
|
|
7083
7181
|
operator
|
|
7084
7182
|
]);
|
|
7085
7183
|
(0, $hgUW1$useEffect)(()=>{
|
|
7086
7184
|
if (value !== condition.value) {
|
|
7087
|
-
if (value) update(index,
|
|
7088
|
-
else update(index,
|
|
7185
|
+
if (value) update(index, 'value', value);
|
|
7186
|
+
else update(index, 'value', '');
|
|
7089
7187
|
}
|
|
7090
7188
|
}, [
|
|
7091
7189
|
value
|
|
@@ -7109,7 +7207,7 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7109
7207
|
onChange: (e)=>setOperator(e.target.value),
|
|
7110
7208
|
className: "ds-l-sm-col--3 ds-l-md-col--2 ds-l-col--12 ds-u-padding--0 ds-u-md-padding-right--2 ds-u-margin-bottom--0 ds-u-md-margin-bottom--2"
|
|
7111
7209
|
}),
|
|
7112
|
-
schema[id].fields[property].mysql_type ===
|
|
7210
|
+
schema[id].fields[property].mysql_type === 'date' ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7113
7211
|
className: "ds-l-md-col--5 ds-l-lg-col--4 ds-l-sm-col--8 ds-l-col--12 ds-u-padding--0 ds-u-sm-padding-right--2 ds-u-md-padding-right--0 ds-u-lg-padding-right--2 ds-u-margin-bottom--2",
|
|
7114
7212
|
children: [
|
|
7115
7213
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
@@ -7159,19 +7257,19 @@ var $374c4669b044ddf8$export$2e2bcd8739ae039 = $374c4669b044ddf8$var$QueryRow;
|
|
|
7159
7257
|
function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
|
|
7160
7258
|
let cond = condition;
|
|
7161
7259
|
delete cond.key;
|
|
7162
|
-
if (cond.operator ===
|
|
7260
|
+
if (cond.operator === '=' || cond.operator === '<>') {
|
|
7163
7261
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7164
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7262
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
7165
7263
|
}
|
|
7166
|
-
if (cond.operator.toLowerCase() ===
|
|
7264
|
+
if (cond.operator.toLowerCase() === 'like') {
|
|
7167
7265
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7168
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7266
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
7169
7267
|
cond.value = `%${cleanedValue}%`;
|
|
7170
7268
|
}
|
|
7171
|
-
if (cond.operator.toLowerCase() ===
|
|
7172
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
7269
|
+
if (cond.operator.toLowerCase() === 'in') {
|
|
7270
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(',');
|
|
7173
7271
|
}
|
|
7174
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
7272
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ''));
|
|
7175
7273
|
return cond;
|
|
7176
7274
|
}
|
|
7177
7275
|
const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, setOffset: setOffset })=>{
|
|
@@ -7191,7 +7289,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7191
7289
|
...queryConditions,
|
|
7192
7290
|
{
|
|
7193
7291
|
property: fields[0],
|
|
7194
|
-
value:
|
|
7292
|
+
value: '',
|
|
7195
7293
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
7196
7294
|
key: Date.now()
|
|
7197
7295
|
}
|
|
@@ -7231,7 +7329,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7231
7329
|
encodeValuesOnly: true,
|
|
7232
7330
|
addQueryPrefix: true
|
|
7233
7331
|
});
|
|
7234
|
-
window.history.pushState({},
|
|
7332
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
7235
7333
|
};
|
|
7236
7334
|
const updateCondition = (index, key, value)=>{
|
|
7237
7335
|
let newConditions = [
|
|
@@ -7304,7 +7402,7 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
|
|
|
7304
7402
|
|
|
7305
7403
|
|
|
7306
7404
|
const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset, distIndex: distIndex, location: location, customColumns: customColumns, columnSettings: columnSettings, columnWidths: columnWidths, customTitle: customTitle, customDescription: customDescription, rootUrl: rootUrl, updateAriaLive: updateAriaLive })=>{
|
|
7307
|
-
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState(
|
|
7405
|
+
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState('ds-u-padding-y--1');
|
|
7308
7406
|
let apiDocs = (0, $hgUW1$useRef)();
|
|
7309
7407
|
let distribution = {};
|
|
7310
7408
|
let distribution_array = dataset.distribution ? dataset.distribution : [];
|
|
@@ -7316,7 +7414,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7316
7414
|
} : {
|
|
7317
7415
|
conditions: []
|
|
7318
7416
|
};
|
|
7319
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7417
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
7320
7418
|
...options,
|
|
7321
7419
|
limit: 25
|
|
7322
7420
|
});
|
|
@@ -7330,7 +7428,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7330
7428
|
}, {
|
|
7331
7429
|
encode: true
|
|
7332
7430
|
})}&format=csv`;
|
|
7333
|
-
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !==
|
|
7431
|
+
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !== 'csv' ? distribution.data.title : dataset.title;
|
|
7334
7432
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
7335
7433
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7336
7434
|
className: "ds-l-container ds-u-padding-bottom--3 ds-u-margin-bottom--2",
|
|
@@ -7339,7 +7437,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7339
7437
|
children: Object.keys(distribution).length && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
7340
7438
|
children: [
|
|
7341
7439
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7342
|
-
className:
|
|
7440
|
+
className: 'ds-l-md-col--9',
|
|
7343
7441
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
7344
7442
|
to: `/dataset/${id}`,
|
|
7345
7443
|
className: "ds-u-padding-y--4 ds-u-display--block",
|
|
@@ -7350,14 +7448,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7350
7448
|
})
|
|
7351
7449
|
}),
|
|
7352
7450
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7353
|
-
className:
|
|
7451
|
+
className: 'ds-l-md-col--9',
|
|
7354
7452
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
7355
7453
|
className: "ds-text-heading--3xl",
|
|
7356
7454
|
children: customTitle ? customTitle : pageTitle
|
|
7357
7455
|
})
|
|
7358
7456
|
}),
|
|
7359
7457
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7360
|
-
className:
|
|
7458
|
+
className: 'ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right',
|
|
7361
7459
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
7362
7460
|
className: "ds-u-margin--0",
|
|
7363
7461
|
children: [
|
|
@@ -7369,7 +7467,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7369
7467
|
})
|
|
7370
7468
|
}),
|
|
7371
7469
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7372
|
-
className:
|
|
7470
|
+
className: 'ds-l-md-col--9',
|
|
7373
7471
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
7374
7472
|
distribution: distribution,
|
|
7375
7473
|
dataset: dataset,
|
|
@@ -7379,13 +7477,13 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7379
7477
|
})
|
|
7380
7478
|
}),
|
|
7381
7479
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7382
|
-
className:
|
|
7480
|
+
className: 'ds-l-md-col--12',
|
|
7383
7481
|
children: Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
|
|
7384
7482
|
resource: resource,
|
|
7385
7483
|
id: distribution.identifier,
|
|
7386
7484
|
customColumns: customColumns,
|
|
7387
7485
|
setOffset: resource.setOffset
|
|
7388
|
-
}) :
|
|
7486
|
+
}) : ''
|
|
7389
7487
|
}),
|
|
7390
7488
|
Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
7391
7489
|
value: {
|
|
@@ -7396,7 +7494,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7396
7494
|
customColumns: (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution_array[distIndex].identifier])
|
|
7397
7495
|
},
|
|
7398
7496
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7399
|
-
className:
|
|
7497
|
+
className: 'ds-l-md-col--12',
|
|
7400
7498
|
children: [
|
|
7401
7499
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $af099c546cb226c7$export$2e2bcd8739ae039), {
|
|
7402
7500
|
includeDensity: true,
|
|
@@ -7418,14 +7516,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7418
7516
|
]
|
|
7419
7517
|
})
|
|
7420
7518
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7421
|
-
className:
|
|
7519
|
+
className: 'ds-l-md-col--12',
|
|
7422
7520
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
7423
7521
|
role: "status",
|
|
7424
7522
|
"aria-valuetext": "Resource loading"
|
|
7425
7523
|
})
|
|
7426
7524
|
}),
|
|
7427
7525
|
dataset.identifier && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7428
|
-
className:
|
|
7526
|
+
className: 'ds-l-md-col--12',
|
|
7429
7527
|
ref: apiDocs,
|
|
7430
7528
|
children: [
|
|
7431
7529
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
@@ -7434,7 +7532,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7434
7532
|
}),
|
|
7435
7533
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
7436
7534
|
url: `${rootUrl}/metastore/schemas/dataset/items/${dataset.identifier}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`,
|
|
7437
|
-
docExpansion:
|
|
7535
|
+
docExpansion: 'list',
|
|
7438
7536
|
defaultModelsExpandDepth: -1
|
|
7439
7537
|
})
|
|
7440
7538
|
]
|
|
@@ -7453,7 +7551,7 @@ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, loca
|
|
|
7453
7551
|
const [ready, setReady] = (0, $hgUW1$useState)(false);
|
|
7454
7552
|
const [error, setError] = (0, $hgUW1$useState)(false);
|
|
7455
7553
|
const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
7456
|
-
const distIndex = dist_id ===
|
|
7554
|
+
const distIndex = dist_id === 'data' ? 0 : dist_id;
|
|
7457
7555
|
(0, $hgUW1$useEffect)(()=>{
|
|
7458
7556
|
if (dataset.error) setError(true);
|
|
7459
7557
|
if (dataset.distribution && dataset.distribution.length) {
|
|
@@ -7671,5 +7769,5 @@ var $90fb213ab8eeb2e7$export$2e2bcd8739ae039 = $90fb213ab8eeb2e7$var$useScrollTo
|
|
|
7671
7769
|
|
|
7672
7770
|
|
|
7673
7771
|
|
|
7674
|
-
export {$e49d4387bed21287$export$2e2bcd8739ae039 as ApiRowLimitNotice, $a8accc31bf9e0bda$export$2e2bcd8739ae039 as CMSTopNav, $c49454ea7d1c4579$export$2e2bcd8739ae039 as ErrorBoundary, $046ded0064bd0a3d$export$2e2bcd8739ae039 as FAQAccordion, $b939b31651e82908$export$2e2bcd8739ae039 as HeaderNav, $1555e1cb3eb7b3e3$export$2e2bcd8739ae039 as HeaderNavIconLink, $fea9297ba4dd394c$export$2e2bcd8739ae039 as HeaderSearch, $9a8892c5ac150556$export$2e2bcd8739ae039 as HeaderSiteTitle, $3c72c298c3a7f21f$export$2e2bcd8739ae039 as HeaderTagline, $403833a4b442d5df$export$2e2bcd8739ae039 as MobileMenuButton, $f57121650539d8c5$export$2e2bcd8739ae039 as NavBar, $953b286f7778640e$export$2e2bcd8739ae039 as SidebarNavigation, $b0968edc60d7d3a4$export$2e2bcd8739ae039 as SidebarPage, $4f153ca537d853e5$export$2e2bcd8739ae039 as SubMenu, $59a079354baa335c$export$2e2bcd8739ae039 as Hero, $c068004d499082cc$export$2e2bcd8739ae039 as DatasetListItem, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $17711e94d2ce0ee4$export$2e2bcd8739ae039 as DatasetDateItem, $20de4fedf33d4f9a$export$2e2bcd8739ae039 as DatasetDate, $
|
|
7772
|
+
export {$e49d4387bed21287$export$2e2bcd8739ae039 as ApiRowLimitNotice, $a8accc31bf9e0bda$export$2e2bcd8739ae039 as CMSTopNav, $c49454ea7d1c4579$export$2e2bcd8739ae039 as ErrorBoundary, $046ded0064bd0a3d$export$2e2bcd8739ae039 as FAQAccordion, $b939b31651e82908$export$2e2bcd8739ae039 as HeaderNav, $1555e1cb3eb7b3e3$export$2e2bcd8739ae039 as HeaderNavIconLink, $fea9297ba4dd394c$export$2e2bcd8739ae039 as HeaderSearch, $9a8892c5ac150556$export$2e2bcd8739ae039 as HeaderSiteTitle, $3c72c298c3a7f21f$export$2e2bcd8739ae039 as HeaderTagline, $403833a4b442d5df$export$2e2bcd8739ae039 as MobileMenuButton, $f57121650539d8c5$export$2e2bcd8739ae039 as NavBar, $953b286f7778640e$export$2e2bcd8739ae039 as SidebarNavigation, $b0968edc60d7d3a4$export$2e2bcd8739ae039 as SidebarPage, $4f153ca537d853e5$export$2e2bcd8739ae039 as SubMenu, $59a079354baa335c$export$2e2bcd8739ae039 as Hero, $c068004d499082cc$export$2e2bcd8739ae039 as DatasetListItem, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $17711e94d2ce0ee4$export$2e2bcd8739ae039 as DatasetDateItem, $20de4fedf33d4f9a$export$2e2bcd8739ae039 as DatasetDate, $789279954d8eff7f$export$2e2bcd8739ae039 as ApiDocumentation, $af099c546cb226c7$export$2e2bcd8739ae039 as ResourceHeader, $626282d9a03c51d5$export$2e2bcd8739ae039 as ResourcePreview, $072291d44ce1834a$export$2e2bcd8739ae039 as ResourceFooter, $ec3e23baa005dc03$export$2e2bcd8739ae039 as Breadcrumb, $bd76a91923d7e8a7$export$2e2bcd8739ae039 as TransformedDate, $d98f94c79ddf4e0e$export$2e2bcd8739ae039 as DataTable, $bdb071ea3a6d3466$export$2e2bcd8739ae039 as SearchInput, $5644ebd2c3dbfd7b$export$eea3a12df15499ca as buildRows, $2ed0091f7e32d1e6$export$2e2bcd8739ae039 as DataTablePageResults, $1a2bf34e2a8f6b80$export$59a943b34a82e690 as truncateText, $c96c4b9ef7203c1f$export$2e2bcd8739ae039 as APIPage, $026cb986f9fea2b1$export$2e2bcd8739ae039 as PageNotFound, $e873081a6e8f024e$export$2e2bcd8739ae039 as DatasetSearch, $550bcc185f420ff5$export$2e2bcd8739ae039 as DatasetList, $9384a736d4d6f425$export$2e2bcd8739ae039 as DatasetListSubmenu, $a0f13962e513caa1$export$2e2bcd8739ae039 as Dataset, $a35cf16d1488f54e$export$2e2bcd8739ae039 as DatasetTable, $b9af6ce5e2c06331$export$2e2bcd8739ae039 as Header, $a6df0aa147323304$export$2e2bcd8739ae039 as Footer, $669d2782ec2e2250$export$2e2bcd8739ae039 as SpecsAndLimits, $8b67b7ee3fcfb629$export$2e2bcd8739ae039 as StoredQueryPage, $f61ecf9f84951a61$export$2e2bcd8739ae039 as FilteredResource, $bef7bff2823feea2$export$2e2bcd8739ae039 as QueryTitle, $7264a673914aa746$export$2b9377795161999 as buildOperatorOptions, $7264a673914aa746$export$e284ae5d89467c8f as convertUTCToLocalDate, $7264a673914aa746$export$6b5e57d20078142b as cleanText, $7264a673914aa746$export$8049e8f40a9bdfb8 as buildCustomColHeaders, $11500a65bd7d9cf1$export$2e2bcd8739ae039 as HeaderContext, $43a30d745a7bbc86$export$2e2bcd8739ae039 as DataTableContext, $ebda441784d176a5$export$2e2bcd8739ae039 as ManageColumnsContext, $844981eac9b63865$export$eccc29c8d0ff408 as ACAContext, $efc410f5f7ac5ef3$export$2e2bcd8739ae039 as useSearchAPI, $1d3d480a9cfaabe0$export$2e2bcd8739ae039 as useDatastore, $aa4450dcbeef3ac0$export$385a5aba38cc3325 as transformTableSortToQuerySort, $eb7821d186b1a389$export$2e2bcd8739ae039 as useAddLoginLink, $90fb213ab8eeb2e7$export$2e2bcd8739ae039 as useScrollToTop, $b4aa9c66f2e86959$export$2e2bcd8739ae039 as useMetastoreDataset, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 as withQueryProvider, $6d5c0212e738499b$export$34e95918366a058e as acaToParams, $6da0396069e23175$export$bc27cf7ecf44639d as defaultMetadataMapping};
|
|
7675
7773
|
//# sourceMappingURL=main.js.map
|