@civicactions/cmsds-open-data-components 3.9.0-alpha.2 → 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 +32 -42
- package/dist/main.css.map +1 -1
- package/dist/main.js +1027 -760
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +83 -46
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/main.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./main.css";
|
|
2
2
|
import {jsx as $hgUW1$jsx, jsxs as $hgUW1$jsxs, Fragment as $hgUW1$Fragment} from "react/jsx-runtime";
|
|
3
|
-
import {Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, Button as $hgUW1$Button, CloseIconThin as $hgUW1$CloseIconThin, ArrowIcon as $hgUW1$ArrowIcon, Spinner as $hgUW1$Spinner, Alert as $hgUW1$Alert, Dialog as $hgUW1$Dialog, TextField as $hgUW1$TextField, Tooltip as $hgUW1$Tooltip, 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
|
|
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 $
|
|
547
|
-
|
|
548
|
-
|
|
557
|
+
var $9384a736d4d6f425$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039)($9384a736d4d6f425$var$DatasetListSubmenu);
|
|
549
558
|
|
|
550
559
|
|
|
551
560
|
|
|
552
561
|
|
|
553
562
|
|
|
554
|
-
const $
|
|
555
|
-
|
|
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
|
})
|
|
@@ -1098,12 +1101,105 @@ var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
|
|
|
1098
1101
|
|
|
1099
1102
|
|
|
1100
1103
|
|
|
1104
|
+
const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date, options: options = {
|
|
1105
|
+
year: 'numeric',
|
|
1106
|
+
month: 'long',
|
|
1107
|
+
day: 'numeric',
|
|
1108
|
+
timeZone: 'UTC'
|
|
1109
|
+
} })=>{
|
|
1110
|
+
const rawDate = new Date(date);
|
|
1111
|
+
let modifiedDate = '';
|
|
1112
|
+
if (rawDate) modifiedDate = rawDate.toLocaleDateString('en-US', options);
|
|
1113
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
1114
|
+
children: modifiedDate
|
|
1115
|
+
});
|
|
1116
|
+
};
|
|
1117
|
+
var $bd76a91923d7e8a7$export$2e2bcd8739ae039 = $bd76a91923d7e8a7$var$TransformedDate;
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
const $c068004d499082cc$var$DatasetListItem = (props)=>{
|
|
1122
|
+
const desktop = (0, $hgUW1$useMediaQuery)({
|
|
1123
|
+
minWidth: 1024
|
|
1124
|
+
});
|
|
1125
|
+
const { title: title, modified: modified, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
|
|
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';
|
|
1130
|
+
if (desktop) {
|
|
1131
|
+
linkContainerClasses = 'ds-u-padding-x--0';
|
|
1132
|
+
linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
|
|
1133
|
+
}
|
|
1134
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1135
|
+
className: "dc-c-list-item ds-u-padding-top--4",
|
|
1136
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1137
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? 'ds-u-border-top--1' : 'ds-u-border-bottom--1 ds-u-padding-bottom--3'}`,
|
|
1138
|
+
children: [
|
|
1139
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1140
|
+
className: "ds-l-row ds-u-align-items--start",
|
|
1141
|
+
children: [
|
|
1142
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1143
|
+
id: `dataset-${identifier}-updated-date`,
|
|
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'}`,
|
|
1145
|
+
children: [
|
|
1146
|
+
"Updated ",
|
|
1147
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
1148
|
+
date: modified
|
|
1149
|
+
})
|
|
1150
|
+
]
|
|
1151
|
+
}),
|
|
1152
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
1153
|
+
className: "ds-l-col--12 ds-text-heading--2xl",
|
|
1154
|
+
children: title
|
|
1155
|
+
})
|
|
1156
|
+
]
|
|
1157
|
+
}),
|
|
1158
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1159
|
+
className: "ds-l-row",
|
|
1160
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1161
|
+
className: "ds-l-col--12 ds-l-md-col--12 ds-u-margin-top--2",
|
|
1162
|
+
children: [
|
|
1163
|
+
"The ",
|
|
1164
|
+
title,
|
|
1165
|
+
" dataset was updated."
|
|
1166
|
+
]
|
|
1167
|
+
})
|
|
1168
|
+
}),
|
|
1169
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1170
|
+
className: "ds-l-row",
|
|
1171
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1172
|
+
className: "ds-l-col--12",
|
|
1173
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1174
|
+
"aria-describedby": `dataset-${identifier}-updated-date`,
|
|
1175
|
+
to: `/dataset/${identifier}`,
|
|
1176
|
+
children: [
|
|
1177
|
+
"View the Dataset for ",
|
|
1178
|
+
title,
|
|
1179
|
+
" "
|
|
1180
|
+
]
|
|
1181
|
+
})
|
|
1182
|
+
})
|
|
1183
|
+
})
|
|
1184
|
+
]
|
|
1185
|
+
})
|
|
1186
|
+
});
|
|
1187
|
+
};
|
|
1188
|
+
var $c068004d499082cc$export$2e2bcd8739ae039 = $c068004d499082cc$var$DatasetListItem;
|
|
1189
|
+
|
|
1190
|
+
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
|
|
1101
1197
|
|
|
1102
1198
|
|
|
1103
1199
|
|
|
1104
1200
|
const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
1105
1201
|
switch(props.id){
|
|
1106
|
-
case
|
|
1202
|
+
case 'overview':
|
|
1107
1203
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1108
1204
|
width: "16px",
|
|
1109
1205
|
height: "16px",
|
|
@@ -1145,7 +1241,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1145
1241
|
})
|
|
1146
1242
|
]
|
|
1147
1243
|
});
|
|
1148
|
-
case
|
|
1244
|
+
case 'data-table':
|
|
1149
1245
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1150
1246
|
width: "16px",
|
|
1151
1247
|
height: "12px",
|
|
@@ -1177,7 +1273,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1177
1273
|
})
|
|
1178
1274
|
]
|
|
1179
1275
|
});
|
|
1180
|
-
case
|
|
1276
|
+
case 'api':
|
|
1181
1277
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1182
1278
|
width: "16px",
|
|
1183
1279
|
height: "13px",
|
|
@@ -1209,7 +1305,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1209
1305
|
})
|
|
1210
1306
|
]
|
|
1211
1307
|
});
|
|
1212
|
-
case
|
|
1308
|
+
case 'download':
|
|
1213
1309
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1214
1310
|
width: "16px",
|
|
1215
1311
|
height: "16px",
|
|
@@ -1238,7 +1334,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1238
1334
|
})
|
|
1239
1335
|
]
|
|
1240
1336
|
});
|
|
1241
|
-
case
|
|
1337
|
+
case 'data-dictionary':
|
|
1242
1338
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1243
1339
|
width: "14px",
|
|
1244
1340
|
height: "16px",
|
|
@@ -1336,33 +1432,16 @@ var $b61856b23f5f58a2$export$2e2bcd8739ae039 = $b61856b23f5f58a2$var$LargeFileDi
|
|
|
1336
1432
|
|
|
1337
1433
|
|
|
1338
1434
|
|
|
1339
|
-
const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date, options: options = {
|
|
1340
|
-
year: "numeric",
|
|
1341
|
-
month: "long",
|
|
1342
|
-
day: "numeric",
|
|
1343
|
-
timeZone: "UTC"
|
|
1344
|
-
} })=>{
|
|
1345
|
-
const rawDate = new Date(date);
|
|
1346
|
-
let modifiedDate = "";
|
|
1347
|
-
if (rawDate) modifiedDate = rawDate.toLocaleDateString("en-US", options);
|
|
1348
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
1349
|
-
children: modifiedDate
|
|
1350
|
-
});
|
|
1351
|
-
};
|
|
1352
|
-
var $bd76a91923d7e8a7$export$2e2bcd8739ae039 = $bd76a91923d7e8a7$var$TransformedDate;
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
1435
|
|
|
1357
1436
|
|
|
1358
1437
|
function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240) {
|
|
1359
|
-
if (!textString) return
|
|
1438
|
+
if (!textString) return '';
|
|
1360
1439
|
let cleanedText = textString;
|
|
1361
|
-
if (cleanedText.split(
|
|
1362
|
-
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];
|
|
1363
1442
|
cleanedText = (0, $hgUW1$lodashtruncate)(cleanedText, {
|
|
1364
|
-
|
|
1365
|
-
|
|
1443
|
+
'length': textLength,
|
|
1444
|
+
'separator': ' '
|
|
1366
1445
|
});
|
|
1367
1446
|
return (0, $hgUW1$dompurify).sanitize(cleanedText, {
|
|
1368
1447
|
ALLOWED_TAGS: []
|
|
@@ -1371,32 +1450,180 @@ function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240)
|
|
|
1371
1450
|
|
|
1372
1451
|
|
|
1373
1452
|
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
|
|
1456
|
+
|
|
1457
|
+
|
|
1458
|
+
|
|
1459
|
+
const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
1460
|
+
const { type: type, date: date, boldLabel: boldLabel = false, displayTooltips: displayTooltips = true } = props;
|
|
1461
|
+
const dateText = {
|
|
1462
|
+
modified: 'Last Modified',
|
|
1463
|
+
released: 'Released',
|
|
1464
|
+
refresh: 'Planned Update'
|
|
1465
|
+
};
|
|
1466
|
+
const tooltipContent = {
|
|
1467
|
+
modified: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1468
|
+
children: [
|
|
1469
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
|
|
1470
|
+
children: "Last Modified: "
|
|
1471
|
+
}),
|
|
1472
|
+
" The date the ",
|
|
1473
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
|
|
1474
|
+
"dataset was last updated."
|
|
1475
|
+
]
|
|
1476
|
+
}),
|
|
1477
|
+
released: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1478
|
+
children: [
|
|
1479
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
|
|
1480
|
+
children: "Released: "
|
|
1481
|
+
}),
|
|
1482
|
+
" The date the most ",
|
|
1483
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
|
|
1484
|
+
"recent dataset was made available",
|
|
1485
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
|
|
1486
|
+
"to the public."
|
|
1487
|
+
]
|
|
1488
|
+
}),
|
|
1489
|
+
refresh: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1490
|
+
children: [
|
|
1491
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("strong", {
|
|
1492
|
+
children: "Planned Update:"
|
|
1493
|
+
}),
|
|
1494
|
+
" The date the ",
|
|
1495
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("br", {}),
|
|
1496
|
+
"dataset is scheduled to be updated."
|
|
1497
|
+
]
|
|
1498
|
+
})
|
|
1499
|
+
};
|
|
1500
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1501
|
+
className: `dataset-date-item${boldLabel ? ' bold-label' : ''}`,
|
|
1502
|
+
children: [
|
|
1503
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1504
|
+
className: "dataset-data-item-label",
|
|
1505
|
+
children: [
|
|
1506
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1507
|
+
children: dateText[type]
|
|
1508
|
+
}),
|
|
1509
|
+
": ",
|
|
1510
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
1511
|
+
date: date
|
|
1512
|
+
})
|
|
1513
|
+
]
|
|
1514
|
+
}),
|
|
1515
|
+
displayTooltips === true && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Tooltip), {
|
|
1516
|
+
"aria-label": dateText[type],
|
|
1517
|
+
className: "ds-c-tooltip__trigger-icon ds-u-display--inline ds-u-padding-left--0 ds-uw-padding-right--0",
|
|
1518
|
+
title: tooltipContent[type],
|
|
1519
|
+
placement: "top",
|
|
1520
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
|
|
1521
|
+
})
|
|
1522
|
+
]
|
|
1523
|
+
});
|
|
1524
|
+
};
|
|
1525
|
+
var $17711e94d2ce0ee4$export$2e2bcd8739ae039 = $17711e94d2ce0ee4$var$DatasetDateItem;
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
const $20de4fedf33d4f9a$var$DatasetDate = (props)=>{
|
|
1529
|
+
const { date: date, updatedBoldLabel: updatedBoldLabel = false, releasedBoldLabel: releasedBoldLabel = false, refreshBoldLabel: refreshBoldLabel = false, displayTooltips: displayTooltips = true } = props;
|
|
1530
|
+
const { modified: modified, released: released, refresh: refresh } = date;
|
|
1531
|
+
// Create an array of date items to render
|
|
1532
|
+
const dateItems = [];
|
|
1533
|
+
if (modified) dateItems.push(/*#__PURE__*/ (0, $hgUW1$jsx)((0, $17711e94d2ce0ee4$export$2e2bcd8739ae039), {
|
|
1534
|
+
displayTooltips: displayTooltips,
|
|
1535
|
+
type: "modified",
|
|
1536
|
+
date: modified,
|
|
1537
|
+
boldLabel: updatedBoldLabel
|
|
1538
|
+
}, "modified"));
|
|
1539
|
+
if (released) dateItems.push(/*#__PURE__*/ (0, $hgUW1$jsx)((0, $17711e94d2ce0ee4$export$2e2bcd8739ae039), {
|
|
1540
|
+
displayTooltips: displayTooltips,
|
|
1541
|
+
type: "released",
|
|
1542
|
+
date: released,
|
|
1543
|
+
boldLabel: releasedBoldLabel
|
|
1544
|
+
}, "released"));
|
|
1545
|
+
if (refresh) dateItems.push(/*#__PURE__*/ (0, $hgUW1$jsx)((0, $17711e94d2ce0ee4$export$2e2bcd8739ae039), {
|
|
1546
|
+
displayTooltips: displayTooltips,
|
|
1547
|
+
type: "refresh",
|
|
1548
|
+
date: refresh,
|
|
1549
|
+
boldLabel: refreshBoldLabel
|
|
1550
|
+
}, "refresh"));
|
|
1551
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1552
|
+
className: "dataset-date",
|
|
1553
|
+
children: dateItems.map((item, index)=>/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$react).Fragment, {
|
|
1554
|
+
children: [
|
|
1555
|
+
item,
|
|
1556
|
+
index < dateItems.length - 1 && /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1557
|
+
className: "bullet-point",
|
|
1558
|
+
children: "\u2022"
|
|
1559
|
+
})
|
|
1560
|
+
]
|
|
1561
|
+
}, index))
|
|
1562
|
+
});
|
|
1563
|
+
};
|
|
1564
|
+
var $20de4fedf33d4f9a$export$2e2bcd8739ae039 = $20de4fedf33d4f9a$var$DatasetDate;
|
|
1565
|
+
|
|
1566
|
+
|
|
1374
1567
|
const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
1375
1568
|
const desktop = (0, $hgUW1$useMediaQuery)({
|
|
1376
1569
|
minWidth: 1024
|
|
1377
1570
|
});
|
|
1378
|
-
const { title: title, modified: modified, description: description,
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
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;
|
|
1572
|
+
const location = (0, $hgUW1$useLocation)();
|
|
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';
|
|
1383
1577
|
if (desktop) {
|
|
1384
|
-
linkContainerClasses =
|
|
1385
|
-
linkClasses +=
|
|
1578
|
+
linkContainerClasses = 'ds-u-padding-x--0';
|
|
1579
|
+
linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
|
|
1386
1580
|
}
|
|
1581
|
+
let themes;
|
|
1582
|
+
if (theme && showTopics) themes = /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
1583
|
+
className: "theme-list item-theme",
|
|
1584
|
+
children: theme.map((topic, index)=>{
|
|
1585
|
+
const title = topic || 'Unknown Topic';
|
|
1586
|
+
const prefix = 'topics';
|
|
1587
|
+
// Use the provided slug or fallback to a simple slug generation
|
|
1588
|
+
const slug = topicSlugs?.[title];
|
|
1589
|
+
const link = `/${prefix}/${slug}`;
|
|
1590
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1591
|
+
className: "ds-u-fill--primary ds-u-radius--pill",
|
|
1592
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1593
|
+
to: link,
|
|
1594
|
+
state: {
|
|
1595
|
+
fromUrl: location.pathname,
|
|
1596
|
+
fromTitle: false,
|
|
1597
|
+
fromSearchList: location.pathname.includes('search')
|
|
1598
|
+
},
|
|
1599
|
+
children: title
|
|
1600
|
+
})
|
|
1601
|
+
}, `dist-${title}-${index}`);
|
|
1602
|
+
})
|
|
1603
|
+
});
|
|
1604
|
+
const date = {
|
|
1605
|
+
modified: modified,
|
|
1606
|
+
released: released,
|
|
1607
|
+
refresh: refresh
|
|
1608
|
+
};
|
|
1609
|
+
const url = `/dataset/${identifier}`;
|
|
1387
1610
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1388
1611
|
className: "dc-c-search-list-item ds-u-padding-top--3",
|
|
1389
1612
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1390
|
-
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'}`,
|
|
1391
1614
|
children: [
|
|
1615
|
+
themes,
|
|
1392
1616
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1393
1617
|
className: "ds-l-row ds-u-align-items--start",
|
|
1394
1618
|
children: [
|
|
1395
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1619
|
+
!showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1396
1620
|
id: `dataset-${identifier}-updated-date`,
|
|
1397
|
-
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'}`,
|
|
1398
1622
|
children: [
|
|
1399
|
-
|
|
1623
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1624
|
+
children: "Updated:"
|
|
1625
|
+
}),
|
|
1626
|
+
" ",
|
|
1400
1627
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
1401
1628
|
date: modified
|
|
1402
1629
|
})
|
|
@@ -1406,21 +1633,39 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1406
1633
|
className: "ds-l-col--12 ds-text-heading--2xl",
|
|
1407
1634
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1408
1635
|
"aria-describedby": `dataset-${identifier}-updated-date`,
|
|
1409
|
-
to:
|
|
1636
|
+
to: `${url}`,
|
|
1410
1637
|
children: title
|
|
1411
1638
|
})
|
|
1412
1639
|
})
|
|
1413
1640
|
]
|
|
1414
1641
|
}),
|
|
1415
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1642
|
+
description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1416
1643
|
className: "ds-l-row",
|
|
1417
|
-
children: /*#__PURE__*/ (0, $hgUW1$
|
|
1644
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1418
1645
|
className: "ds-l-col--12 ds-l-md-col--12 ds-u-margin-top--2",
|
|
1419
|
-
children:
|
|
1646
|
+
children: [
|
|
1647
|
+
(0, $1a2bf34e2a8f6b80$export$59a943b34a82e690)(description),
|
|
1648
|
+
description.length > 240 ? /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1649
|
+
children: [
|
|
1650
|
+
' ',
|
|
1651
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1652
|
+
to: `/dataset/${identifier}`,
|
|
1653
|
+
children: "See more"
|
|
1654
|
+
})
|
|
1655
|
+
]
|
|
1656
|
+
}) : ''
|
|
1657
|
+
]
|
|
1658
|
+
})
|
|
1659
|
+
}),
|
|
1660
|
+
showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1661
|
+
className: "dataset-dates",
|
|
1662
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $20de4fedf33d4f9a$export$2e2bcd8739ae039), {
|
|
1663
|
+
date: date,
|
|
1664
|
+
displayTooltips: false
|
|
1420
1665
|
})
|
|
1421
1666
|
}),
|
|
1422
1667
|
downloadUrl ? /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1423
|
-
className: `ds-u-margin-top--3 ds-u-padding-left--0`,
|
|
1668
|
+
className: `ds-u-margin-top--3 ds-u-padding-left--0 download-button`,
|
|
1424
1669
|
children: largeFile ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1425
1670
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $b61856b23f5f58a2$export$2e2bcd8739ae039), {
|
|
1426
1671
|
downloadUrl: downloadUrl
|
|
@@ -1436,16 +1681,16 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1436
1681
|
"Download"
|
|
1437
1682
|
]
|
|
1438
1683
|
})
|
|
1439
|
-
}) :
|
|
1684
|
+
}) : '',
|
|
1440
1685
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("ul", {
|
|
1441
|
-
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' : ''}`,
|
|
1442
1687
|
children: [
|
|
1443
1688
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1444
1689
|
className: linkContainerClasses,
|
|
1445
1690
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1446
1691
|
className: linkClasses,
|
|
1447
1692
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1448
|
-
to:
|
|
1693
|
+
to: `${url}#data-table`,
|
|
1449
1694
|
children: [
|
|
1450
1695
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1451
1696
|
id: "data-table"
|
|
@@ -1460,7 +1705,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1460
1705
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1461
1706
|
className: linkClasses,
|
|
1462
1707
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1463
|
-
to:
|
|
1708
|
+
to: `${url}#overview`,
|
|
1464
1709
|
children: [
|
|
1465
1710
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1466
1711
|
id: "overview"
|
|
@@ -1475,7 +1720,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1475
1720
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1476
1721
|
className: linkClasses,
|
|
1477
1722
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1478
|
-
to:
|
|
1723
|
+
to: `${url}#data-dictionary`,
|
|
1479
1724
|
children: [
|
|
1480
1725
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1481
1726
|
id: "data-dictionary"
|
|
@@ -1484,13 +1729,13 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1484
1729
|
]
|
|
1485
1730
|
})
|
|
1486
1731
|
})
|
|
1487
|
-
}) :
|
|
1732
|
+
}) : '',
|
|
1488
1733
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1489
1734
|
className: linkContainerClasses,
|
|
1490
1735
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1491
1736
|
className: linkClasses,
|
|
1492
1737
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1493
|
-
to:
|
|
1738
|
+
to: `${url}#api`,
|
|
1494
1739
|
children: [
|
|
1495
1740
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
1496
1741
|
id: "api"
|
|
@@ -1515,81 +1760,6 @@ var $52c6454cae137465$export$2e2bcd8739ae039 = $52c6454cae137465$var$DatasetSear
|
|
|
1515
1760
|
|
|
1516
1761
|
|
|
1517
1762
|
|
|
1518
|
-
const $c068004d499082cc$var$DatasetListItem = (props)=>{
|
|
1519
|
-
const desktop = (0, $hgUW1$useMediaQuery)({
|
|
1520
|
-
minWidth: 1024
|
|
1521
|
-
});
|
|
1522
|
-
const { title: title, modified: modified, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
|
|
1523
|
-
let linkContainerClasses = "ds-u-margin-bottom--2";
|
|
1524
|
-
if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
|
|
1525
|
-
else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
|
|
1526
|
-
let linkClasses = "ds-u-display--block ds-u-text-align--left";
|
|
1527
|
-
if (desktop) {
|
|
1528
|
-
linkContainerClasses = "ds-u-padding-x--0";
|
|
1529
|
-
linkClasses += " ds-l-col--4 ds-l-md-col--auto";
|
|
1530
|
-
}
|
|
1531
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1532
|
-
className: "dc-c-list-item ds-u-padding-top--4",
|
|
1533
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1534
|
-
className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
|
|
1535
|
-
children: [
|
|
1536
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1537
|
-
className: "ds-l-row ds-u-align-items--start",
|
|
1538
|
-
children: [
|
|
1539
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1540
|
-
id: `dataset-${identifier}-updated-date`,
|
|
1541
|
-
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"}`,
|
|
1542
|
-
children: [
|
|
1543
|
-
"Updated ",
|
|
1544
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
1545
|
-
date: modified
|
|
1546
|
-
})
|
|
1547
|
-
]
|
|
1548
|
-
}),
|
|
1549
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
1550
|
-
className: "ds-l-col--12 ds-text-heading--2xl",
|
|
1551
|
-
children: title
|
|
1552
|
-
})
|
|
1553
|
-
]
|
|
1554
|
-
}),
|
|
1555
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1556
|
-
className: "ds-l-row",
|
|
1557
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1558
|
-
className: "ds-l-col--12 ds-l-md-col--12 ds-u-margin-top--2",
|
|
1559
|
-
children: [
|
|
1560
|
-
"The ",
|
|
1561
|
-
title,
|
|
1562
|
-
" dataset was updated."
|
|
1563
|
-
]
|
|
1564
|
-
})
|
|
1565
|
-
}),
|
|
1566
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1567
|
-
className: "ds-l-row",
|
|
1568
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1569
|
-
className: "ds-l-col--12",
|
|
1570
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1571
|
-
"aria-describedby": `dataset-${identifier}-updated-date`,
|
|
1572
|
-
to: `/dataset/${identifier}`,
|
|
1573
|
-
children: [
|
|
1574
|
-
"View the Dataset for ",
|
|
1575
|
-
title,
|
|
1576
|
-
" "
|
|
1577
|
-
]
|
|
1578
|
-
})
|
|
1579
|
-
})
|
|
1580
|
-
})
|
|
1581
|
-
]
|
|
1582
|
-
})
|
|
1583
|
-
});
|
|
1584
|
-
};
|
|
1585
|
-
var $c068004d499082cc$export$2e2bcd8739ae039 = $c068004d499082cc$var$DatasetListItem;
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
1763
|
|
|
1594
1764
|
|
|
1595
1765
|
const $789279954d8eff7f$var$ApiDocumentation = ({ endpoint: endpoint })=>{
|
|
@@ -1613,7 +1783,7 @@ var $789279954d8eff7f$export$2e2bcd8739ae039 = $789279954d8eff7f$var$ApiDocument
|
|
|
1613
1783
|
|
|
1614
1784
|
|
|
1615
1785
|
|
|
1616
|
-
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' })=>{
|
|
1617
1787
|
const numTotalRows = totalRows;
|
|
1618
1788
|
if (numTotalRows === 0) return /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1619
1789
|
className: className,
|
|
@@ -1631,18 +1801,18 @@ const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limi
|
|
|
1631
1801
|
className: className,
|
|
1632
1802
|
children: [
|
|
1633
1803
|
"Displaying",
|
|
1634
|
-
|
|
1804
|
+
' ',
|
|
1635
1805
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1636
1806
|
className: "ds-u-font-weight--bold",
|
|
1637
1807
|
children: `${startTotal().toLocaleString()} - ${ofTotal().toLocaleString()}`
|
|
1638
1808
|
}),
|
|
1639
|
-
|
|
1809
|
+
' ',
|
|
1640
1810
|
"of ",
|
|
1641
1811
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1642
1812
|
className: "ds-u-font-weight--bold",
|
|
1643
1813
|
children: `${numTotalRows.toLocaleString()}`
|
|
1644
1814
|
}),
|
|
1645
|
-
|
|
1815
|
+
' ',
|
|
1646
1816
|
"results"
|
|
1647
1817
|
]
|
|
1648
1818
|
});
|
|
@@ -1668,16 +1838,16 @@ const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePaddi
|
|
|
1668
1838
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
1669
1839
|
options: [
|
|
1670
1840
|
{
|
|
1671
|
-
label:
|
|
1672
|
-
value:
|
|
1841
|
+
label: 'Tight',
|
|
1842
|
+
value: 'ds-u-padding-y--0'
|
|
1673
1843
|
},
|
|
1674
1844
|
{
|
|
1675
|
-
label:
|
|
1676
|
-
value:
|
|
1845
|
+
label: 'Normal',
|
|
1846
|
+
value: 'ds-u-padding-y--1'
|
|
1677
1847
|
},
|
|
1678
1848
|
{
|
|
1679
|
-
label:
|
|
1680
|
-
value:
|
|
1849
|
+
label: 'Expanded',
|
|
1850
|
+
value: 'ds-u-padding-y--2'
|
|
1681
1851
|
}
|
|
1682
1852
|
],
|
|
1683
1853
|
label: "Display density:",
|
|
@@ -1920,7 +2090,7 @@ function $aa4450dcbeef3ac0$export$385a5aba38cc3325(sortArray) {
|
|
|
1920
2090
|
sortArray.forEach((s)=>{
|
|
1921
2091
|
return newQuery.push({
|
|
1922
2092
|
property: s.id,
|
|
1923
|
-
order: s.desc ?
|
|
2093
|
+
order: s.desc ? 'desc' : 'asc'
|
|
1924
2094
|
});
|
|
1925
2095
|
});
|
|
1926
2096
|
return newQuery;
|
|
@@ -1958,103 +2128,103 @@ function $7264a673914aa746$export$e284ae5d89467c8f(date) {
|
|
|
1958
2128
|
}
|
|
1959
2129
|
function $7264a673914aa746$export$6b5e57d20078142b(value, operator) {
|
|
1960
2130
|
let newValue = value;
|
|
1961
|
-
if (Array.isArray(newValue)) newValue = newValue.join(
|
|
2131
|
+
if (Array.isArray(newValue)) newValue = newValue.join(',');
|
|
1962
2132
|
// return newValue.replace(/(^\%+|\%+$)/gm, '');
|
|
1963
2133
|
return newValue;
|
|
1964
2134
|
}
|
|
1965
2135
|
const $7264a673914aa746$export$5f89a5ae87bc48e1 = [
|
|
1966
2136
|
{
|
|
1967
|
-
label:
|
|
1968
|
-
value:
|
|
2137
|
+
label: 'Is',
|
|
2138
|
+
value: '='
|
|
1969
2139
|
},
|
|
1970
2140
|
{
|
|
1971
|
-
label:
|
|
1972
|
-
value:
|
|
2141
|
+
label: 'Starts With',
|
|
2142
|
+
value: 'starts with'
|
|
1973
2143
|
},
|
|
1974
2144
|
{
|
|
1975
|
-
label:
|
|
1976
|
-
value:
|
|
2145
|
+
label: 'Contains',
|
|
2146
|
+
value: 'contains'
|
|
1977
2147
|
},
|
|
1978
2148
|
{
|
|
1979
|
-
label:
|
|
1980
|
-
value:
|
|
2149
|
+
label: 'Is Not',
|
|
2150
|
+
value: '<>'
|
|
1981
2151
|
},
|
|
1982
2152
|
{
|
|
1983
|
-
label:
|
|
1984
|
-
value:
|
|
2153
|
+
label: 'Or',
|
|
2154
|
+
value: 'in'
|
|
1985
2155
|
},
|
|
1986
2156
|
{
|
|
1987
|
-
label:
|
|
1988
|
-
value:
|
|
2157
|
+
label: 'Is',
|
|
2158
|
+
value: '='
|
|
1989
2159
|
},
|
|
1990
2160
|
{
|
|
1991
|
-
label:
|
|
1992
|
-
value:
|
|
2161
|
+
label: 'Is Not',
|
|
2162
|
+
value: '<>'
|
|
1993
2163
|
},
|
|
1994
2164
|
{
|
|
1995
|
-
label:
|
|
1996
|
-
value:
|
|
2165
|
+
label: 'Greater Than',
|
|
2166
|
+
value: '>'
|
|
1997
2167
|
},
|
|
1998
2168
|
{
|
|
1999
|
-
label:
|
|
2000
|
-
value:
|
|
2169
|
+
label: 'Less Than',
|
|
2170
|
+
value: '<'
|
|
2001
2171
|
}
|
|
2002
2172
|
];
|
|
2003
2173
|
function $7264a673914aa746$export$2b9377795161999(type) {
|
|
2004
2174
|
switch(type){
|
|
2005
|
-
case
|
|
2006
|
-
case
|
|
2175
|
+
case 'text':
|
|
2176
|
+
case 'string':
|
|
2007
2177
|
return [
|
|
2008
2178
|
{
|
|
2009
|
-
label:
|
|
2010
|
-
value:
|
|
2179
|
+
label: 'Is',
|
|
2180
|
+
value: '='
|
|
2011
2181
|
},
|
|
2012
2182
|
{
|
|
2013
|
-
label:
|
|
2014
|
-
value:
|
|
2183
|
+
label: 'Starts With',
|
|
2184
|
+
value: 'starts with'
|
|
2015
2185
|
},
|
|
2016
2186
|
{
|
|
2017
|
-
label:
|
|
2018
|
-
value:
|
|
2187
|
+
label: 'Contains',
|
|
2188
|
+
value: 'contains'
|
|
2019
2189
|
},
|
|
2020
2190
|
{
|
|
2021
|
-
label:
|
|
2022
|
-
value:
|
|
2191
|
+
label: 'Is Not',
|
|
2192
|
+
value: '<>'
|
|
2023
2193
|
},
|
|
2024
2194
|
{
|
|
2025
|
-
label:
|
|
2026
|
-
value:
|
|
2195
|
+
label: 'Or',
|
|
2196
|
+
value: 'in'
|
|
2027
2197
|
}
|
|
2028
2198
|
];
|
|
2029
|
-
case
|
|
2199
|
+
case 'date':
|
|
2030
2200
|
return [
|
|
2031
2201
|
{
|
|
2032
|
-
label:
|
|
2033
|
-
value:
|
|
2202
|
+
label: 'Is',
|
|
2203
|
+
value: '='
|
|
2034
2204
|
},
|
|
2035
2205
|
{
|
|
2036
|
-
label:
|
|
2037
|
-
value:
|
|
2206
|
+
label: 'Is Not',
|
|
2207
|
+
value: '<>'
|
|
2038
2208
|
},
|
|
2039
2209
|
{
|
|
2040
|
-
label:
|
|
2041
|
-
value:
|
|
2210
|
+
label: 'Greater Than',
|
|
2211
|
+
value: '>'
|
|
2042
2212
|
},
|
|
2043
2213
|
{
|
|
2044
|
-
label:
|
|
2045
|
-
value:
|
|
2214
|
+
label: 'Less Than',
|
|
2215
|
+
value: '<'
|
|
2046
2216
|
}
|
|
2047
2217
|
];
|
|
2048
2218
|
default:
|
|
2049
2219
|
// These 2 should be safe for all data types
|
|
2050
2220
|
return [
|
|
2051
2221
|
{
|
|
2052
|
-
label:
|
|
2053
|
-
value:
|
|
2222
|
+
label: 'Is',
|
|
2223
|
+
value: '='
|
|
2054
2224
|
},
|
|
2055
2225
|
{
|
|
2056
|
-
label:
|
|
2057
|
-
value:
|
|
2226
|
+
label: 'Is Not',
|
|
2227
|
+
value: '<>'
|
|
2058
2228
|
}
|
|
2059
2229
|
];
|
|
2060
2230
|
}
|
|
@@ -2071,7 +2241,7 @@ function $7264a673914aa746$export$2b9377795161999(type) {
|
|
|
2071
2241
|
|
|
2072
2242
|
|
|
2073
2243
|
const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: header, sortElement: sortElement, setAriaLiveFeedback: setAriaLiveFeedback })=>{
|
|
2074
|
-
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)(
|
|
2244
|
+
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)('');
|
|
2075
2245
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("th", {
|
|
2076
2246
|
key: header.id,
|
|
2077
2247
|
style: {
|
|
@@ -2084,13 +2254,13 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2084
2254
|
children: [
|
|
2085
2255
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2086
2256
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2087
|
-
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header :
|
|
2257
|
+
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : '',
|
|
2088
2258
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
2089
2259
|
})
|
|
2090
2260
|
}),
|
|
2091
2261
|
sortElement && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2092
2262
|
onClick: header.column.getToggleSortingHandler(),
|
|
2093
|
-
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())}` : '',
|
|
2094
2264
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
2095
2265
|
})
|
|
2096
2266
|
]
|
|
@@ -2098,18 +2268,18 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2098
2268
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2099
2269
|
onMouseDown: header.getResizeHandler(),
|
|
2100
2270
|
onTouchStart: header.getResizeHandler(),
|
|
2101
|
-
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' : ''}`,
|
|
2102
2272
|
"aria-label": `Resize ${header.column.columnDef.header} column`,
|
|
2103
2273
|
onKeyDown: (e)=>{
|
|
2104
2274
|
const columnSizingObject = table.getState().columnSizing;
|
|
2105
2275
|
switch(e.key){
|
|
2106
|
-
case
|
|
2107
|
-
case
|
|
2276
|
+
case 'Enter':
|
|
2277
|
+
case ' ':
|
|
2108
2278
|
e.preventDefault();
|
|
2109
2279
|
e.stopPropagation();
|
|
2110
2280
|
if (columnResizing) {
|
|
2111
2281
|
// end resizing
|
|
2112
|
-
setColumnResizing(
|
|
2282
|
+
setColumnResizing('');
|
|
2113
2283
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2114
2284
|
} else {
|
|
2115
2285
|
// start resizing
|
|
@@ -2117,13 +2287,13 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2117
2287
|
setAriaLiveFeedback(`${header.column.columnDef.header} grabbed.`);
|
|
2118
2288
|
}
|
|
2119
2289
|
break;
|
|
2120
|
-
case
|
|
2290
|
+
case 'Escape':
|
|
2121
2291
|
if (columnResizing) {
|
|
2122
|
-
setColumnResizing(
|
|
2292
|
+
setColumnResizing('');
|
|
2123
2293
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2124
2294
|
}
|
|
2125
2295
|
break;
|
|
2126
|
-
case
|
|
2296
|
+
case 'ArrowRight':
|
|
2127
2297
|
e.preventDefault();
|
|
2128
2298
|
e.stopPropagation();
|
|
2129
2299
|
if (columnResizing) {
|
|
@@ -2132,7 +2302,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2132
2302
|
setAriaLiveFeedback(`${header.column.columnDef.header} has been resized. The new width is ${header.getSize()} pixels.`);
|
|
2133
2303
|
}
|
|
2134
2304
|
break;
|
|
2135
|
-
case
|
|
2305
|
+
case 'ArrowLeft':
|
|
2136
2306
|
e.preventDefault();
|
|
2137
2307
|
e.stopPropagation();
|
|
2138
2308
|
if (columnResizing) {
|
|
@@ -2144,7 +2314,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2144
2314
|
}
|
|
2145
2315
|
},
|
|
2146
2316
|
onBlur: ()=>{
|
|
2147
|
-
setColumnResizing(
|
|
2317
|
+
setColumnResizing('');
|
|
2148
2318
|
}
|
|
2149
2319
|
})
|
|
2150
2320
|
]
|
|
@@ -2193,7 +2363,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2193
2363
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
2194
2364
|
}),
|
|
2195
2365
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2196
|
-
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())}` : ''
|
|
2197
2367
|
})
|
|
2198
2368
|
]
|
|
2199
2369
|
})
|
|
@@ -2229,9 +2399,9 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2229
2399
|
transition: transition,
|
|
2230
2400
|
opacity: isDragging ? 0.7 : 1,
|
|
2231
2401
|
zIndex: isDragging ? 1 : 0,
|
|
2232
|
-
position:
|
|
2233
|
-
background:
|
|
2234
|
-
touchAction:
|
|
2402
|
+
position: 'relative',
|
|
2403
|
+
background: 'white',
|
|
2404
|
+
touchAction: 'none'
|
|
2235
2405
|
};
|
|
2236
2406
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
2237
2407
|
className: "ds-u-display--flex ds-u-justify-content--between ds-u-border-bottom--1",
|
|
@@ -2246,7 +2416,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2246
2416
|
// this code forces the repaint without user interaction
|
|
2247
2417
|
const target = e.target;
|
|
2248
2418
|
if (isDragging && target.tagName.toLowerCase() === "label") setTimeout(()=>{
|
|
2249
|
-
target.parentNode.querySelector(
|
|
2419
|
+
target.parentNode.querySelector('input').checked = visible;
|
|
2250
2420
|
}, 1);
|
|
2251
2421
|
},
|
|
2252
2422
|
children: [
|
|
@@ -2263,7 +2433,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2263
2433
|
}
|
|
2264
2434
|
}),
|
|
2265
2435
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2266
|
-
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging &&
|
|
2436
|
+
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && 'grabbed'}`,
|
|
2267
2437
|
"aria-label": `Reorder ${id} column`,
|
|
2268
2438
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2269
2439
|
className: "fa fa-sort"
|
|
@@ -2285,7 +2455,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor extends (0, $hgUW1$Key
|
|
|
2285
2455
|
// Custom function to exclude checkbox from keyboard dragging
|
|
2286
2456
|
static activators = [
|
|
2287
2457
|
{
|
|
2288
|
-
eventName:
|
|
2458
|
+
eventName: 'onKeyDown',
|
|
2289
2459
|
handler: ({ nativeEvent: event })=>{
|
|
2290
2460
|
// prevent scrolling the list
|
|
2291
2461
|
const isCheckbox = [
|
|
@@ -2308,7 +2478,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$Poin
|
|
|
2308
2478
|
// Custom function to stop accidental checkbox clicks on pointer activation
|
|
2309
2479
|
static activators = [
|
|
2310
2480
|
{
|
|
2311
|
-
eventName:
|
|
2481
|
+
eventName: 'onPointerDown',
|
|
2312
2482
|
handler: ({ nativeEvent: event })=>{
|
|
2313
2483
|
if (event.target.tagName.toLowerCase() === "input") return false;
|
|
2314
2484
|
if (event.target.tagName.toLowerCase() === "label") event.target.blur();
|
|
@@ -2376,7 +2546,7 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
2376
2546
|
}));
|
|
2377
2547
|
};
|
|
2378
2548
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2379
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2549
|
+
className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
|
|
2380
2550
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
|
|
2381
2551
|
heading: "Manage columns",
|
|
2382
2552
|
isOpen: modalOpen,
|
|
@@ -2710,12 +2880,12 @@ const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions, schema: sche
|
|
|
2710
2880
|
className: "ds-u-font-weight--bold",
|
|
2711
2881
|
children: description
|
|
2712
2882
|
}),
|
|
2713
|
-
|
|
2883
|
+
' ',
|
|
2714
2884
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2715
2885
|
className: "ds-u-font-weight--normal",
|
|
2716
2886
|
children: operator.label.toUpperCase()
|
|
2717
2887
|
}),
|
|
2718
|
-
|
|
2888
|
+
' ',
|
|
2719
2889
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2720
2890
|
className: "ds-u-color--success",
|
|
2721
2891
|
children: formattedText
|
|
@@ -2745,7 +2915,7 @@ var $bef7bff2823feea2$export$2e2bcd8739ae039 = $bef7bff2823feea2$var$QueryTitle;
|
|
|
2745
2915
|
|
|
2746
2916
|
|
|
2747
2917
|
function $6369abf590ca298f$var$getStartDate(condition, schema, id) {
|
|
2748
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2918
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
2749
2919
|
const newDate = new Date(condition.value.toString());
|
|
2750
2920
|
if (newDate instanceof Date && !isNaN(newDate.getTime())) return newDate;
|
|
2751
2921
|
}
|
|
@@ -2761,9 +2931,9 @@ const $6369abf590ca298f$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
2761
2931
|
});
|
|
2762
2932
|
(0, $hgUW1$useEffect)(()=>{
|
|
2763
2933
|
if (property !== condition.property) {
|
|
2764
|
-
if (property) update(index,
|
|
2765
|
-
else update(index,
|
|
2766
|
-
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') {
|
|
2767
2937
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
2768
2938
|
}
|
|
2769
2939
|
}
|
|
@@ -2777,16 +2947,16 @@ const $6369abf590ca298f$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
2777
2947
|
]);
|
|
2778
2948
|
(0, $hgUW1$useEffect)(()=>{
|
|
2779
2949
|
if (operator !== condition.operator) {
|
|
2780
|
-
if (operator) update(index,
|
|
2781
|
-
else update(index,
|
|
2950
|
+
if (operator) update(index, 'operator', operator);
|
|
2951
|
+
else update(index, 'operator', '');
|
|
2782
2952
|
}
|
|
2783
2953
|
}, [
|
|
2784
2954
|
operator
|
|
2785
2955
|
]);
|
|
2786
2956
|
(0, $hgUW1$useEffect)(()=>{
|
|
2787
2957
|
if (value !== condition.value) {
|
|
2788
|
-
if (value) update(index,
|
|
2789
|
-
else update(index,
|
|
2958
|
+
if (value) update(index, 'value', value);
|
|
2959
|
+
else update(index, 'value', '');
|
|
2790
2960
|
}
|
|
2791
2961
|
}, [
|
|
2792
2962
|
value
|
|
@@ -2818,7 +2988,7 @@ const $6369abf590ca298f$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
2818
2988
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2819
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",
|
|
2820
2990
|
children: [
|
|
2821
|
-
schema[id].fields[property].mysql_type ===
|
|
2991
|
+
schema[id].fields[property].mysql_type === 'date' ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2822
2992
|
children: [
|
|
2823
2993
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
2824
2994
|
className: "ds-c-label",
|
|
@@ -2879,9 +3049,9 @@ const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false,
|
|
|
2879
3049
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
2880
3050
|
disabled: disabled,
|
|
2881
3051
|
className: "ds-u-float--right ds-l-md-col--6 ds-l-col--5",
|
|
2882
|
-
variation: small ?
|
|
3052
|
+
variation: small ? 'ghost' : undefined,
|
|
2883
3053
|
onClick: ()=>clearFiltersFn(),
|
|
2884
|
-
children: small ?
|
|
3054
|
+
children: small ? 'Clear all' : 'Clear all filters'
|
|
2885
3055
|
});
|
|
2886
3056
|
};
|
|
2887
3057
|
var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFiltersButton;
|
|
@@ -2890,19 +3060,19 @@ var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFilter
|
|
|
2890
3060
|
function $ee4ad47aa483e5b5$var$updateQueryForDatastore(condition) {
|
|
2891
3061
|
let cond = condition;
|
|
2892
3062
|
delete cond.key;
|
|
2893
|
-
if (cond.operator ===
|
|
3063
|
+
if (cond.operator === '=' || cond.operator === '<>') {
|
|
2894
3064
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
2895
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3065
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
2896
3066
|
}
|
|
2897
|
-
if (cond.operator.toLowerCase() ===
|
|
3067
|
+
if (cond.operator.toLowerCase() === 'like') {
|
|
2898
3068
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
2899
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3069
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
2900
3070
|
cond.value = `%${cleanedValue}%`;
|
|
2901
3071
|
}
|
|
2902
|
-
if (cond.operator.toLowerCase() ===
|
|
2903
|
-
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(',');
|
|
2904
3074
|
}
|
|
2905
|
-
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, ''));
|
|
2906
3076
|
return cond;
|
|
2907
3077
|
}
|
|
2908
3078
|
const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, isModal: isModal = false, setPage: setPage, setOffset: setOffset })=>{
|
|
@@ -2921,7 +3091,7 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
2921
3091
|
} else setQueryConditions([
|
|
2922
3092
|
{
|
|
2923
3093
|
property: fields[0],
|
|
2924
|
-
value:
|
|
3094
|
+
value: '',
|
|
2925
3095
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
2926
3096
|
key: Date.now().toString()
|
|
2927
3097
|
}
|
|
@@ -2938,7 +3108,7 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
2938
3108
|
...queryConditions,
|
|
2939
3109
|
{
|
|
2940
3110
|
property: fields[0],
|
|
2941
|
-
value:
|
|
3111
|
+
value: '',
|
|
2942
3112
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
2943
3113
|
key: Date.now().toString()
|
|
2944
3114
|
}
|
|
@@ -2969,7 +3139,7 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
2969
3139
|
encodeValuesOnly: true,
|
|
2970
3140
|
addQueryPrefix: true
|
|
2971
3141
|
});
|
|
2972
|
-
window.history.pushState({},
|
|
3142
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
2973
3143
|
};
|
|
2974
3144
|
const submitConditions = (e)=>{
|
|
2975
3145
|
// only update the data conditions when "Apply filters" is pressed
|
|
@@ -3122,12 +3292,12 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, closeFul
|
|
|
3122
3292
|
showStoredQueryDownloadButton: showStoredQueryDownloadButton
|
|
3123
3293
|
}),
|
|
3124
3294
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3125
|
-
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'}`,
|
|
3126
3296
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
|
|
3127
3297
|
canResize: true,
|
|
3128
3298
|
columns: columns,
|
|
3129
3299
|
sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
|
|
3130
|
-
tablePadding:
|
|
3300
|
+
tablePadding: 'ds-u-padding-y--2',
|
|
3131
3301
|
loading: resource.loading,
|
|
3132
3302
|
isModal: isModal,
|
|
3133
3303
|
closeFullScreenModal: closeFullScreenModal
|
|
@@ -3160,7 +3330,7 @@ var $a35cf16d1488f54e$export$2e2bcd8739ae039 = $a35cf16d1488f54e$var$DatasetTabl
|
|
|
3160
3330
|
|
|
3161
3331
|
const $16bd41951b91f02d$var$FullScreenDataTable = ({ modalOpen: modalOpen, setModalOpen: setModalOpen })=>{
|
|
3162
3332
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3163
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
3333
|
+
className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
|
|
3164
3334
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
3165
3335
|
heading: "Dataset Explorer",
|
|
3166
3336
|
isOpen: modalOpen,
|
|
@@ -3210,7 +3380,7 @@ const $71b4324f265dec16$var$DataTableControls = ({ id: id, columns: columns, def
|
|
|
3210
3380
|
]
|
|
3211
3381
|
}),
|
|
3212
3382
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
|
|
3213
|
-
"aria-label": isModal ?
|
|
3383
|
+
"aria-label": isModal ? 'Close Full Screen dialog' : 'Full Screen mode - Opens in a dialog',
|
|
3214
3384
|
className: "ds-c-button ds-c-button--ghost ds-u-margin-y--1",
|
|
3215
3385
|
onClick: ()=>{
|
|
3216
3386
|
if (isModal) closeFullScreenModal();
|
|
@@ -3218,7 +3388,7 @@ const $71b4324f265dec16$var$DataTableControls = ({ id: id, columns: columns, def
|
|
|
3218
3388
|
},
|
|
3219
3389
|
children: [
|
|
3220
3390
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3221
|
-
className: `fa ${isModal ?
|
|
3391
|
+
className: `fa ${isModal ? 'fa-compress' : 'fa-expand'} ds-u-margin-right--1`
|
|
3222
3392
|
}),
|
|
3223
3393
|
isModal ? "Exit Full Screen" : "Full Screen"
|
|
3224
3394
|
]
|
|
@@ -3255,7 +3425,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3255
3425
|
const { columnOrder: columnOrder, setColumnOrder: setColumnOrder, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility } = (0, $hgUW1$useContext)((0, $ebda441784d176a5$export$2e2bcd8739ae039));
|
|
3256
3426
|
const data = resource.values;
|
|
3257
3427
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
3258
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
3428
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
|
|
3259
3429
|
const dataTableWrapperElement = (0, $hgUW1$useRef)(null);
|
|
3260
3430
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
3261
3431
|
const table_columns = columns.map((col)=>{
|
|
@@ -3274,9 +3444,9 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3274
3444
|
columnOrder
|
|
3275
3445
|
]);
|
|
3276
3446
|
const sortElement = (isSorted, onClickFn)=>{
|
|
3277
|
-
if (isSorted ===
|
|
3278
|
-
if (isSorted ===
|
|
3279
|
-
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';
|
|
3280
3450
|
};
|
|
3281
3451
|
const filters = [];
|
|
3282
3452
|
const table = (0, $hgUW1$useReactTable)({
|
|
@@ -3288,7 +3458,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3288
3458
|
columnVisibility: columnVisibility,
|
|
3289
3459
|
sorting: sorting
|
|
3290
3460
|
},
|
|
3291
|
-
columnResizeMode:
|
|
3461
|
+
columnResizeMode: 'onChange',
|
|
3292
3462
|
onSortingChange: setSorting,
|
|
3293
3463
|
onColumnOrderChange: setColumnOrder,
|
|
3294
3464
|
onColumnVisibilityChange: setColumnVisibility,
|
|
@@ -3305,7 +3475,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3305
3475
|
const defaultColumnOrder = (0, $hgUW1$useMemo)(()=>table_columns.map((column)=>column.accessorKey), []);
|
|
3306
3476
|
const tableWrapperWidth = ()=>{
|
|
3307
3477
|
if (dataTableWrapperElement.current) return dataTableWrapperElement.current.offsetWidth;
|
|
3308
|
-
return
|
|
3478
|
+
return 'auto';
|
|
3309
3479
|
};
|
|
3310
3480
|
(0, $hgUW1$useEffect)(()=>{
|
|
3311
3481
|
setHighlightRow(null);
|
|
@@ -3407,7 +3577,7 @@ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, a
|
|
|
3407
3577
|
},
|
|
3408
3578
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3409
3579
|
name: accessor,
|
|
3410
|
-
value: filterValue ||
|
|
3580
|
+
value: filterValue || ''
|
|
3411
3581
|
});
|
|
3412
3582
|
}
|
|
3413
3583
|
const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true })=>{
|
|
@@ -3483,7 +3653,7 @@ const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage, pageTrail:
|
|
|
3483
3653
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3484
3654
|
children: currentPage
|
|
3485
3655
|
})
|
|
3486
|
-
}) :
|
|
3656
|
+
}) : ''
|
|
3487
3657
|
]
|
|
3488
3658
|
})
|
|
3489
3659
|
});
|
|
@@ -3540,11 +3710,11 @@ var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRigh
|
|
|
3540
3710
|
|
|
3541
3711
|
|
|
3542
3712
|
|
|
3543
|
-
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", {
|
|
3544
3714
|
className: "search-input-container",
|
|
3545
3715
|
children: [
|
|
3546
3716
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
3547
|
-
className: `${showMagnifyingGlass ?
|
|
3717
|
+
className: `${showMagnifyingGlass ? 'left-padding' : ''} ${showSearchButton ? 'right-padding' : ''}`,
|
|
3548
3718
|
label: placeholder,
|
|
3549
3719
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3550
3720
|
placeholder: placeholder,
|
|
@@ -3559,7 +3729,7 @@ const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = "Search
|
|
|
3559
3729
|
}),
|
|
3560
3730
|
showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
3561
3731
|
variation: "solid",
|
|
3562
|
-
className: onDark &&
|
|
3732
|
+
className: onDark && 'on-dark',
|
|
3563
3733
|
onClick: onSubmit,
|
|
3564
3734
|
children: [
|
|
3565
3735
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -3678,7 +3848,7 @@ const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: roo
|
|
|
3678
3848
|
url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
3679
3849
|
addQueryPrefix: true
|
|
3680
3850
|
})}`,
|
|
3681
|
-
docExpansion:
|
|
3851
|
+
docExpansion: 'list',
|
|
3682
3852
|
defaultModelsExpandDepth: -1,
|
|
3683
3853
|
plugins: [
|
|
3684
3854
|
(0, $hgUW1$SpanOpenAPIVersion),
|
|
@@ -3826,7 +3996,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
3826
3996
|
size: "big",
|
|
3827
3997
|
type: "submit",
|
|
3828
3998
|
style: {
|
|
3829
|
-
width:
|
|
3999
|
+
width: '70px'
|
|
3830
4000
|
},
|
|
3831
4001
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3832
4002
|
className: "fas fa-search small-text"
|
|
@@ -3843,7 +4013,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
3843
4013
|
className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
|
|
3844
4014
|
children: [
|
|
3845
4015
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3846
|
-
children: text ? text :
|
|
4016
|
+
children: text ? text : 'Search'
|
|
3847
4017
|
}),
|
|
3848
4018
|
` `,
|
|
3849
4019
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -3889,26 +4059,26 @@ var $5723016a5461c1ca$export$2e2bcd8739ae039 = $5723016a5461c1ca$var$PageHeader;
|
|
|
3889
4059
|
|
|
3890
4060
|
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
3891
4061
|
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
3892
|
-
defaultSort:
|
|
3893
|
-
defaultOrder:
|
|
3894
|
-
}, 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;
|
|
3895
4065
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
3896
4066
|
const sortOptions = [
|
|
3897
4067
|
{
|
|
3898
|
-
label:
|
|
3899
|
-
value:
|
|
4068
|
+
label: 'Newest',
|
|
4069
|
+
value: 'newest'
|
|
3900
4070
|
},
|
|
3901
4071
|
{
|
|
3902
|
-
label:
|
|
3903
|
-
value:
|
|
4072
|
+
label: 'Oldest',
|
|
4073
|
+
value: 'oldest'
|
|
3904
4074
|
},
|
|
3905
4075
|
{
|
|
3906
|
-
label:
|
|
3907
|
-
value:
|
|
4076
|
+
label: 'Title A-Z',
|
|
4077
|
+
value: 'titleAZ'
|
|
3908
4078
|
},
|
|
3909
4079
|
{
|
|
3910
|
-
label:
|
|
3911
|
-
value:
|
|
4080
|
+
label: 'Title Z-A',
|
|
4081
|
+
value: 'titleZA'
|
|
3912
4082
|
}
|
|
3913
4083
|
];
|
|
3914
4084
|
const defaultSortBy = "";
|
|
@@ -3927,7 +4097,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3927
4097
|
endingNumber: 0
|
|
3928
4098
|
});
|
|
3929
4099
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
3930
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4100
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)('');
|
|
3931
4101
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
3932
4102
|
const [fulltext, setFullText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
3933
4103
|
const [filterText, setFilterText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
@@ -3936,7 +4106,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3936
4106
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
3937
4107
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
3938
4108
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
3939
|
-
return sort ===
|
|
4109
|
+
return sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
|
|
3940
4110
|
});
|
|
3941
4111
|
const [selectedFacets, setSelectedFacets] = (0, $hgUW1$useState)(transformedParams.selectedFacets ? transformedParams.selectedFacets : {
|
|
3942
4112
|
theme: [],
|
|
@@ -3945,21 +4115,21 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3945
4115
|
const setSortOptions = (value)=>{
|
|
3946
4116
|
setSortDisplay(value);
|
|
3947
4117
|
switch(value){
|
|
3948
|
-
case
|
|
3949
|
-
setSort(
|
|
3950
|
-
setSortOrder(
|
|
4118
|
+
case 'newest':
|
|
4119
|
+
setSort('modified');
|
|
4120
|
+
setSortOrder('desc');
|
|
3951
4121
|
break;
|
|
3952
|
-
case
|
|
3953
|
-
setSort(
|
|
3954
|
-
setSortOrder(
|
|
4122
|
+
case 'oldest':
|
|
4123
|
+
setSort('modified');
|
|
4124
|
+
setSortOrder('asc');
|
|
3955
4125
|
break;
|
|
3956
|
-
case
|
|
3957
|
-
setSort(
|
|
3958
|
-
setSortOrder(
|
|
4126
|
+
case 'titleAZ':
|
|
4127
|
+
setSort('title');
|
|
4128
|
+
setSortOrder('asc');
|
|
3959
4129
|
break;
|
|
3960
|
-
case
|
|
3961
|
-
setSort(
|
|
3962
|
-
setSortOrder(
|
|
4130
|
+
case 'titleZA':
|
|
4131
|
+
setSort('title');
|
|
4132
|
+
setSortOrder('desc');
|
|
3963
4133
|
break;
|
|
3964
4134
|
}
|
|
3965
4135
|
};
|
|
@@ -3967,12 +4137,12 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3967
4137
|
const newFacets = {
|
|
3968
4138
|
...selectedFacets
|
|
3969
4139
|
};
|
|
3970
|
-
if (key ===
|
|
4140
|
+
if (key === 'theme') {
|
|
3971
4141
|
const existingFacet = newFacets.theme.findIndex((s)=>s === value);
|
|
3972
4142
|
if (existingFacet > -1) newFacets.theme.splice(existingFacet, 1);
|
|
3973
4143
|
else newFacets.theme.push(value);
|
|
3974
4144
|
}
|
|
3975
|
-
if (key ===
|
|
4145
|
+
if (key === 'keyword') {
|
|
3976
4146
|
const existingFacet = newFacets.keyword.findIndex((s)=>s === value);
|
|
3977
4147
|
if (existingFacet > -1) newFacets.keyword.splice(existingFacet, 1);
|
|
3978
4148
|
else newFacets.keyword.push(value);
|
|
@@ -3986,14 +4156,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3986
4156
|
});
|
|
3987
4157
|
setSelectedFacets(newFacets);
|
|
3988
4158
|
const url = new URL(window.location.href);
|
|
3989
|
-
window.history.pushState({},
|
|
4159
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
3990
4160
|
}
|
|
3991
4161
|
const pageSize = defaultPageSize;
|
|
3992
4162
|
(0, $hgUW1$useEffect)(()=>{
|
|
3993
4163
|
// Update browser URL with current search params
|
|
3994
4164
|
const params = buildSearchParams(true);
|
|
3995
4165
|
const url = new URL(window.location.href);
|
|
3996
|
-
window.history.pushState({},
|
|
4166
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${params}`);
|
|
3997
4167
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
3998
4168
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
3999
4169
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -4032,14 +4202,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4032
4202
|
setSelectedFacets(defaultSelectedFacets);
|
|
4033
4203
|
setPage(defaultPage);
|
|
4034
4204
|
const url = new URL(window.location.href);
|
|
4035
|
-
window.history.pushState({},
|
|
4205
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}`);
|
|
4036
4206
|
}
|
|
4037
4207
|
function buildSearchParams(includePage) {
|
|
4038
4208
|
let newParams = {};
|
|
4039
4209
|
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
4040
4210
|
if (sort !== defaultSort.defaultSort) newParams.sort = sort;
|
|
4041
4211
|
if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
|
|
4042
|
-
if (fulltext !==
|
|
4212
|
+
if (fulltext !== '') newParams.fulltext = fulltext;
|
|
4043
4213
|
if (Object.keys(selectedFacets).length) Object.keys(selectedFacets).forEach((key)=>{
|
|
4044
4214
|
newParams[key] = selectedFacets[key];
|
|
4045
4215
|
});
|
|
@@ -4052,9 +4222,9 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4052
4222
|
fulltext: fulltext ? fulltext : undefined,
|
|
4053
4223
|
...selectedFacets,
|
|
4054
4224
|
sort: sort ? sort : undefined,
|
|
4055
|
-
[
|
|
4225
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
4056
4226
|
page: page !== 1 ? page : undefined,
|
|
4057
|
-
[
|
|
4227
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
4058
4228
|
};
|
|
4059
4229
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4060
4230
|
queryKey: [
|
|
@@ -4063,7 +4233,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4063
4233
|
],
|
|
4064
4234
|
queryFn: ()=>{
|
|
4065
4235
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4066
|
-
arrayFormat:
|
|
4236
|
+
arrayFormat: 'comma',
|
|
4067
4237
|
encode: false
|
|
4068
4238
|
})}`);
|
|
4069
4239
|
}
|
|
@@ -4114,7 +4284,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4114
4284
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4115
4285
|
fieldClassName: "ds-u-margin--0",
|
|
4116
4286
|
value: filterText,
|
|
4117
|
-
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'}`,
|
|
4118
4288
|
label: "Search datasets",
|
|
4119
4289
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4120
4290
|
placeholder: "Search datasets",
|
|
@@ -4176,7 +4346,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4176
4346
|
"Showing ",
|
|
4177
4347
|
currentResultNumbers.startingNumber,
|
|
4178
4348
|
" -",
|
|
4179
|
-
|
|
4349
|
+
' ',
|
|
4180
4350
|
currentResultNumbers.endingNumber,
|
|
4181
4351
|
" of ",
|
|
4182
4352
|
data.data.total,
|
|
@@ -4227,6 +4397,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4227
4397
|
if (item.theme.includes(theme)) showLargeFile = true;
|
|
4228
4398
|
});
|
|
4229
4399
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $52c6454cae137465$export$2e2bcd8739ae039), {
|
|
4400
|
+
location: location,
|
|
4230
4401
|
title: item.title,
|
|
4231
4402
|
modified: item.modified,
|
|
4232
4403
|
description: item.description,
|
|
@@ -4252,7 +4423,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4252
4423
|
},
|
|
4253
4424
|
renderHref: (page)=>{
|
|
4254
4425
|
const searchParams = buildSearchParams(false);
|
|
4255
|
-
const includeAnd = searchParams ?
|
|
4426
|
+
const includeAnd = searchParams ? '&' : '';
|
|
4256
4427
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
4257
4428
|
}
|
|
4258
4429
|
})
|
|
@@ -4285,27 +4456,28 @@ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
4285
4456
|
|
|
4286
4457
|
|
|
4287
4458
|
|
|
4288
|
-
const $550bcc185f420ff5$var$DatasetList = ({
|
|
4289
|
-
defaultSort:
|
|
4290
|
-
|
|
4291
|
-
|
|
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;
|
|
4292
4464
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4293
4465
|
const sortOptions = [
|
|
4294
4466
|
{
|
|
4295
|
-
label:
|
|
4296
|
-
value:
|
|
4467
|
+
label: 'Newest',
|
|
4468
|
+
value: 'newest'
|
|
4297
4469
|
},
|
|
4298
4470
|
{
|
|
4299
|
-
label:
|
|
4300
|
-
value:
|
|
4471
|
+
label: 'Oldest',
|
|
4472
|
+
value: 'oldest'
|
|
4301
4473
|
},
|
|
4302
4474
|
{
|
|
4303
|
-
label:
|
|
4304
|
-
value:
|
|
4475
|
+
label: 'Title A-Z',
|
|
4476
|
+
value: 'titleAZ'
|
|
4305
4477
|
},
|
|
4306
4478
|
{
|
|
4307
|
-
label:
|
|
4308
|
-
value:
|
|
4479
|
+
label: 'Title Z-A',
|
|
4480
|
+
value: 'titleZA'
|
|
4309
4481
|
}
|
|
4310
4482
|
];
|
|
4311
4483
|
const defaultSortBy = "";
|
|
@@ -4319,33 +4491,33 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4319
4491
|
endingNumber: 0
|
|
4320
4492
|
});
|
|
4321
4493
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4322
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4494
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)('');
|
|
4323
4495
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4324
4496
|
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
4325
4497
|
const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
|
|
4326
4498
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4327
4499
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4328
4500
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4329
|
-
return sort ===
|
|
4501
|
+
return sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
|
|
4330
4502
|
});
|
|
4331
4503
|
const setSortOptions = (value)=>{
|
|
4332
4504
|
setSortDisplay(value);
|
|
4333
4505
|
switch(value){
|
|
4334
|
-
case
|
|
4335
|
-
setSort(
|
|
4336
|
-
setSortOrder(
|
|
4506
|
+
case 'newest':
|
|
4507
|
+
setSort('modified');
|
|
4508
|
+
setSortOrder('desc');
|
|
4337
4509
|
break;
|
|
4338
|
-
case
|
|
4339
|
-
setSort(
|
|
4340
|
-
setSortOrder(
|
|
4510
|
+
case 'oldest':
|
|
4511
|
+
setSort('modified');
|
|
4512
|
+
setSortOrder('asc');
|
|
4341
4513
|
break;
|
|
4342
|
-
case
|
|
4343
|
-
setSort(
|
|
4344
|
-
setSortOrder(
|
|
4514
|
+
case 'titleAZ':
|
|
4515
|
+
setSort('title');
|
|
4516
|
+
setSortOrder('asc');
|
|
4345
4517
|
break;
|
|
4346
|
-
case
|
|
4347
|
-
setSort(
|
|
4348
|
-
setSortOrder(
|
|
4518
|
+
case 'titleZA':
|
|
4519
|
+
setSort('title');
|
|
4520
|
+
setSortOrder('desc');
|
|
4349
4521
|
break;
|
|
4350
4522
|
}
|
|
4351
4523
|
};
|
|
@@ -4354,7 +4526,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4354
4526
|
// Update browser URL with current search params
|
|
4355
4527
|
const params = buildSearchParams(true);
|
|
4356
4528
|
const url = new URL(window.location.href);
|
|
4357
|
-
window.history.pushState({},
|
|
4529
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${params}`);
|
|
4358
4530
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4359
4531
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4360
4532
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -4393,9 +4565,9 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4393
4565
|
}
|
|
4394
4566
|
let params = {
|
|
4395
4567
|
sort: sort ? sort : undefined,
|
|
4396
|
-
[
|
|
4568
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
4397
4569
|
page: page !== 1 ? page : undefined,
|
|
4398
|
-
[
|
|
4570
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
4399
4571
|
};
|
|
4400
4572
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4401
4573
|
queryKey: [
|
|
@@ -4404,7 +4576,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4404
4576
|
],
|
|
4405
4577
|
queryFn: ()=>{
|
|
4406
4578
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4407
|
-
arrayFormat:
|
|
4579
|
+
arrayFormat: 'comma',
|
|
4408
4580
|
encode: false
|
|
4409
4581
|
})}`);
|
|
4410
4582
|
}
|
|
@@ -4420,26 +4592,29 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4420
4592
|
children: [
|
|
4421
4593
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4422
4594
|
className: "ds-l-row",
|
|
4423
|
-
children: /*#__PURE__*/ (0, $hgUW1$
|
|
4595
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4424
4596
|
className: "ds-l-col--12",
|
|
4425
|
-
children:
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
className: "ds-l-
|
|
4429
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)(
|
|
4430
|
-
|
|
4431
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
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
|
+
})
|
|
4435
4610
|
})
|
|
4436
4611
|
})
|
|
4437
4612
|
})
|
|
4438
|
-
|
|
4613
|
+
]
|
|
4439
4614
|
})
|
|
4440
4615
|
}),
|
|
4441
4616
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4442
|
-
className: "ds-l-row",
|
|
4617
|
+
className: "ds-l-row ds-u-padding-top--4",
|
|
4443
4618
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4444
4619
|
className: "ds-l-col--12",
|
|
4445
4620
|
children: isPending ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
@@ -4451,40 +4626,32 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4451
4626
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4452
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",
|
|
4453
4628
|
children: [
|
|
4454
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4629
|
+
enablePagination && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4455
4630
|
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--8 ds-u-sm-padding-left--0",
|
|
4456
4631
|
children: [
|
|
4457
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("
|
|
4458
|
-
className: "ds-u-margin-
|
|
4459
|
-
|
|
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
|
+
})
|
|
4460
4647
|
}),
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
"Showing ",
|
|
4469
|
-
currentResultNumbers.startingNumber,
|
|
4470
|
-
" -",
|
|
4471
|
-
" ",
|
|
4472
|
-
currentResultNumbers.endingNumber,
|
|
4473
|
-
" of ",
|
|
4474
|
-
data.data.total,
|
|
4475
|
-
" datasets"
|
|
4476
|
-
]
|
|
4477
|
-
})
|
|
4478
|
-
}),
|
|
4479
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4480
|
-
className: "ds-u-visibility--screen-reader",
|
|
4481
|
-
role: "status",
|
|
4482
|
-
"aria-live": "assertive",
|
|
4483
|
-
"aria-atomic": "true",
|
|
4484
|
-
"data-testid": "currentResults",
|
|
4485
|
-
children: announcementText
|
|
4486
|
-
})
|
|
4487
|
-
]
|
|
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
|
|
4488
4655
|
})
|
|
4489
4656
|
]
|
|
4490
4657
|
}),
|
|
@@ -4535,7 +4702,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4535
4702
|
},
|
|
4536
4703
|
renderHref: (page)=>{
|
|
4537
4704
|
const searchParams = buildSearchParams(false);
|
|
4538
|
-
const includeAnd = searchParams ?
|
|
4705
|
+
const includeAnd = searchParams ? '&' : '';
|
|
4539
4706
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
4540
4707
|
}
|
|
4541
4708
|
})
|
|
@@ -4565,14 +4732,15 @@ var $550bcc185f420ff5$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
4565
4732
|
|
|
4566
4733
|
|
|
4567
4734
|
|
|
4735
|
+
|
|
4568
4736
|
const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
4569
4737
|
const [dataset, setDataset] = (0, $hgUW1$useState)({
|
|
4570
|
-
title:
|
|
4738
|
+
title: '',
|
|
4571
4739
|
distribution: [],
|
|
4572
|
-
error:
|
|
4573
|
-
description:
|
|
4574
|
-
identifier:
|
|
4575
|
-
modified:
|
|
4740
|
+
error: '',
|
|
4741
|
+
description: '',
|
|
4742
|
+
identifier: '',
|
|
4743
|
+
modified: ''
|
|
4576
4744
|
});
|
|
4577
4745
|
const [id, setId] = (0, $hgUW1$useState)(datasetId);
|
|
4578
4746
|
const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
|
|
@@ -4582,7 +4750,7 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
|
4582
4750
|
"metastore" + id
|
|
4583
4751
|
],
|
|
4584
4752
|
queryFn: ()=>{
|
|
4585
|
-
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)=>{
|
|
4586
4754
|
return {
|
|
4587
4755
|
title: dataset.title,
|
|
4588
4756
|
distribution: dataset.distribution,
|
|
@@ -4648,7 +4816,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
4648
4816
|
...additionalParams
|
|
4649
4817
|
};
|
|
4650
4818
|
params = (0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA);
|
|
4651
|
-
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` :
|
|
4819
|
+
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : '';
|
|
4652
4820
|
let enabled = false;
|
|
4653
4821
|
if (id) {
|
|
4654
4822
|
if (!requireConditions) enabled = true;
|
|
@@ -4728,65 +4896,65 @@ var $1d3d480a9cfaabe0$export$2e2bcd8739ae039 = $1d3d480a9cfaabe0$var$useDatastor
|
|
|
4728
4896
|
|
|
4729
4897
|
|
|
4730
4898
|
const $28f16f59778efa64$export$82b1b1d517e5388a = {
|
|
4731
|
-
|
|
4732
|
-
name:
|
|
4899
|
+
'R/P10Y': {
|
|
4900
|
+
name: 'Decennial'
|
|
4733
4901
|
},
|
|
4734
|
-
|
|
4735
|
-
name:
|
|
4902
|
+
'R/P4Y': {
|
|
4903
|
+
name: 'Quadrennial'
|
|
4736
4904
|
},
|
|
4737
|
-
|
|
4738
|
-
name:
|
|
4905
|
+
'R/P1Y': {
|
|
4906
|
+
name: 'Annual'
|
|
4739
4907
|
},
|
|
4740
|
-
|
|
4741
|
-
name:
|
|
4908
|
+
'R/P2M': {
|
|
4909
|
+
name: 'Bimonthly'
|
|
4742
4910
|
},
|
|
4743
|
-
|
|
4744
|
-
name:
|
|
4911
|
+
'R/P3.5D': {
|
|
4912
|
+
name: 'Semiweekly'
|
|
4745
4913
|
},
|
|
4746
|
-
|
|
4747
|
-
name:
|
|
4914
|
+
'R/P1D': {
|
|
4915
|
+
name: 'Daily'
|
|
4748
4916
|
},
|
|
4749
|
-
|
|
4750
|
-
name:
|
|
4917
|
+
'R/P2W': {
|
|
4918
|
+
name: 'Biweekly'
|
|
4751
4919
|
},
|
|
4752
|
-
|
|
4753
|
-
name:
|
|
4920
|
+
'R/P6M': {
|
|
4921
|
+
name: 'Semiannual'
|
|
4754
4922
|
},
|
|
4755
|
-
|
|
4756
|
-
name:
|
|
4923
|
+
'R/P2Y': {
|
|
4924
|
+
name: 'Biennial'
|
|
4757
4925
|
},
|
|
4758
|
-
|
|
4759
|
-
name:
|
|
4926
|
+
'R/P3Y': {
|
|
4927
|
+
name: 'Triennial'
|
|
4760
4928
|
},
|
|
4761
|
-
|
|
4762
|
-
name:
|
|
4929
|
+
'R/P0.33W': {
|
|
4930
|
+
name: 'Three times a week'
|
|
4763
4931
|
},
|
|
4764
|
-
|
|
4765
|
-
name:
|
|
4932
|
+
'R/P0.33M': {
|
|
4933
|
+
name: 'Three times a month'
|
|
4766
4934
|
},
|
|
4767
|
-
|
|
4768
|
-
name:
|
|
4935
|
+
'R/PT1S': {
|
|
4936
|
+
name: 'Continuously updated'
|
|
4769
4937
|
},
|
|
4770
|
-
|
|
4771
|
-
name:
|
|
4938
|
+
'R/P1M': {
|
|
4939
|
+
name: 'Monthly'
|
|
4772
4940
|
},
|
|
4773
|
-
|
|
4774
|
-
name:
|
|
4941
|
+
'R/P3M': {
|
|
4942
|
+
name: 'Quarterly'
|
|
4775
4943
|
},
|
|
4776
|
-
|
|
4777
|
-
name:
|
|
4944
|
+
'R/P0.5M': {
|
|
4945
|
+
name: 'Semimonthly'
|
|
4778
4946
|
},
|
|
4779
|
-
|
|
4780
|
-
name:
|
|
4947
|
+
'R/P4M': {
|
|
4948
|
+
name: 'Three times a year'
|
|
4781
4949
|
},
|
|
4782
|
-
|
|
4783
|
-
name:
|
|
4950
|
+
'R/P1W': {
|
|
4951
|
+
name: 'Weekly'
|
|
4784
4952
|
},
|
|
4785
|
-
|
|
4786
|
-
name:
|
|
4953
|
+
'R/PT1H': {
|
|
4954
|
+
name: 'Hourly'
|
|
4787
4955
|
},
|
|
4788
4956
|
irregular: {
|
|
4789
|
-
name:
|
|
4957
|
+
name: 'Irregular'
|
|
4790
4958
|
}
|
|
4791
4959
|
};
|
|
4792
4960
|
|
|
@@ -4795,7 +4963,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4795
4963
|
modified: (data)=>{
|
|
4796
4964
|
return [
|
|
4797
4965
|
{
|
|
4798
|
-
label:
|
|
4966
|
+
label: 'Modified',
|
|
4799
4967
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
4800
4968
|
date: data
|
|
4801
4969
|
})
|
|
@@ -4805,7 +4973,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4805
4973
|
issued: (data)=>{
|
|
4806
4974
|
return [
|
|
4807
4975
|
{
|
|
4808
|
-
label:
|
|
4976
|
+
label: 'Issued',
|
|
4809
4977
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
4810
4978
|
date: data
|
|
4811
4979
|
})
|
|
@@ -4815,7 +4983,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4815
4983
|
accrualPeriodicity: (data)=>{
|
|
4816
4984
|
return [
|
|
4817
4985
|
{
|
|
4818
|
-
label:
|
|
4986
|
+
label: 'Frequency',
|
|
4819
4987
|
value: (0, $28f16f59778efa64$export$82b1b1d517e5388a)[data].name
|
|
4820
4988
|
}
|
|
4821
4989
|
];
|
|
@@ -4823,7 +4991,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4823
4991
|
publisher: (data)=>{
|
|
4824
4992
|
if (data.data && data.data.name) return [
|
|
4825
4993
|
{
|
|
4826
|
-
label:
|
|
4994
|
+
label: 'Publisher',
|
|
4827
4995
|
value: data.data.name
|
|
4828
4996
|
}
|
|
4829
4997
|
];
|
|
@@ -4832,7 +5000,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4832
5000
|
identifier: (data)=>{
|
|
4833
5001
|
return [
|
|
4834
5002
|
{
|
|
4835
|
-
label:
|
|
5003
|
+
label: 'Identifier',
|
|
4836
5004
|
value: data
|
|
4837
5005
|
}
|
|
4838
5006
|
];
|
|
@@ -4840,11 +5008,11 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4840
5008
|
contactPoint: (data)=>{
|
|
4841
5009
|
let rows = [];
|
|
4842
5010
|
if (data.fn) rows.push({
|
|
4843
|
-
label:
|
|
5011
|
+
label: 'Contact',
|
|
4844
5012
|
value: data.fn
|
|
4845
5013
|
});
|
|
4846
5014
|
if (data.hasEmail) rows.push({
|
|
4847
|
-
label:
|
|
5015
|
+
label: 'Contact Email',
|
|
4848
5016
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
4849
5017
|
href: data.hasEmail.includes("mailto:") ? data.hasEmail : `mailto:${data.hasEmail}`,
|
|
4850
5018
|
children: data.hasEmail.replace("mailto:", "")
|
|
@@ -4855,7 +5023,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4855
5023
|
bureauCode: (data)=>{
|
|
4856
5024
|
if (data.length) return [
|
|
4857
5025
|
{
|
|
4858
|
-
label:
|
|
5026
|
+
label: 'Bureau Code',
|
|
4859
5027
|
value: data[0]
|
|
4860
5028
|
}
|
|
4861
5029
|
];
|
|
@@ -4863,7 +5031,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4863
5031
|
programCode: (data)=>{
|
|
4864
5032
|
if (data.length) return [
|
|
4865
5033
|
{
|
|
4866
|
-
label:
|
|
5034
|
+
label: 'Program Code',
|
|
4867
5035
|
value: data[0]
|
|
4868
5036
|
}
|
|
4869
5037
|
];
|
|
@@ -4871,13 +5039,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4871
5039
|
theme: (data)=>{
|
|
4872
5040
|
return [
|
|
4873
5041
|
{
|
|
4874
|
-
label:
|
|
5042
|
+
label: 'Category',
|
|
4875
5043
|
value: data.map((theme)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
4876
5044
|
to: `/datasets?theme[]=${theme.data}`,
|
|
4877
5045
|
children: theme.data
|
|
4878
5046
|
}, theme.data)).reduce((prev, curr)=>[
|
|
4879
5047
|
prev,
|
|
4880
|
-
|
|
5048
|
+
', ',
|
|
4881
5049
|
curr
|
|
4882
5050
|
])
|
|
4883
5051
|
}
|
|
@@ -4886,13 +5054,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4886
5054
|
keyword: (data)=>{
|
|
4887
5055
|
return [
|
|
4888
5056
|
{
|
|
4889
|
-
label:
|
|
5057
|
+
label: 'Tags',
|
|
4890
5058
|
value: data.map((keyword)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
4891
5059
|
to: `/datasets?keyword[]=${keyword.data}`,
|
|
4892
5060
|
children: keyword.data
|
|
4893
5061
|
}, keyword.data)).reduce((prev, curr)=>[
|
|
4894
5062
|
prev,
|
|
4895
|
-
|
|
5063
|
+
', ',
|
|
4896
5064
|
curr
|
|
4897
5065
|
])
|
|
4898
5066
|
}
|
|
@@ -4901,7 +5069,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4901
5069
|
license: (data)=>{
|
|
4902
5070
|
return [
|
|
4903
5071
|
{
|
|
4904
|
-
label:
|
|
5072
|
+
label: 'License',
|
|
4905
5073
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
4906
5074
|
href: data,
|
|
4907
5075
|
children: data
|
|
@@ -4912,7 +5080,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4912
5080
|
accessLevel: (data)=>{
|
|
4913
5081
|
return [
|
|
4914
5082
|
{
|
|
4915
|
-
label:
|
|
5083
|
+
label: 'Public Access Level',
|
|
4916
5084
|
value: data
|
|
4917
5085
|
}
|
|
4918
5086
|
];
|
|
@@ -4920,7 +5088,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4920
5088
|
temporal: (data)=>{
|
|
4921
5089
|
return [
|
|
4922
5090
|
{
|
|
4923
|
-
label:
|
|
5091
|
+
label: 'Temporal Coverage',
|
|
4924
5092
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4925
5093
|
className: "dc-c-word-break--all",
|
|
4926
5094
|
children: data
|
|
@@ -4931,7 +5099,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4931
5099
|
spatial: (data)=>{
|
|
4932
5100
|
return [
|
|
4933
5101
|
{
|
|
4934
|
-
label:
|
|
5102
|
+
label: 'Spacial/Geographical Coverage',
|
|
4935
5103
|
value: data
|
|
4936
5104
|
}
|
|
4937
5105
|
];
|
|
@@ -4939,7 +5107,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4939
5107
|
references: (data)=>{
|
|
4940
5108
|
return [
|
|
4941
5109
|
{
|
|
4942
|
-
label:
|
|
5110
|
+
label: 'Related Documents',
|
|
4943
5111
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
4944
5112
|
className: "ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0",
|
|
4945
5113
|
children: data.map((item)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -5020,7 +5188,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
5020
5188
|
if (dist && dist.data) {
|
|
5021
5189
|
if (dist.data.format) return dist.data.format.toLowerCase();
|
|
5022
5190
|
if (dist.data.mediaType) {
|
|
5023
|
-
const mediaType = dist.data.mediaType.split(
|
|
5191
|
+
const mediaType = dist.data.mediaType.split('/');
|
|
5024
5192
|
if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
|
|
5025
5193
|
}
|
|
5026
5194
|
if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
|
|
@@ -5030,7 +5198,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
5030
5198
|
}
|
|
5031
5199
|
}
|
|
5032
5200
|
}
|
|
5033
|
-
return
|
|
5201
|
+
return '';
|
|
5034
5202
|
}
|
|
5035
5203
|
|
|
5036
5204
|
|
|
@@ -5074,8 +5242,8 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5074
5242
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
5075
5243
|
href: dist.data.downloadURL,
|
|
5076
5244
|
style: {
|
|
5077
|
-
order: sm ?
|
|
5078
|
-
width: sm ?
|
|
5245
|
+
order: sm ? '1' : '0',
|
|
5246
|
+
width: sm ? '100%' : 'auto'
|
|
5079
5247
|
},
|
|
5080
5248
|
"aria-label": `Download ${dist.data.title || title} ${fileFormat}`,
|
|
5081
5249
|
className: "ds-c-button",
|
|
@@ -5088,7 +5256,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5088
5256
|
})
|
|
5089
5257
|
}),
|
|
5090
5258
|
dist.data.description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5091
|
-
className:
|
|
5259
|
+
className: 'ds-u-measure--wide ds-u-margin-bottom--7',
|
|
5092
5260
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5093
5261
|
className: "dc-c-metadata-description ds-u-margin--0",
|
|
5094
5262
|
dangerouslySetInnerHTML: {
|
|
@@ -5160,7 +5328,7 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5160
5328
|
const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
|
|
5161
5329
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
5162
5330
|
children: [
|
|
5163
|
-
md ?
|
|
5331
|
+
md ? '' : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5164
5332
|
component: "th",
|
|
5165
5333
|
className: "ds-u-font-weight--bold",
|
|
5166
5334
|
children: [
|
|
@@ -5171,8 +5339,8 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5171
5339
|
title: tooltip.title,
|
|
5172
5340
|
// @ts-ignore
|
|
5173
5341
|
style: {
|
|
5174
|
-
border:
|
|
5175
|
-
background:
|
|
5342
|
+
border: 'none',
|
|
5343
|
+
background: 'none'
|
|
5176
5344
|
},
|
|
5177
5345
|
maxWidth: "400px",
|
|
5178
5346
|
placement: "auto",
|
|
@@ -5231,10 +5399,10 @@ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: ap
|
|
|
5231
5399
|
href: apiUrl,
|
|
5232
5400
|
children: [
|
|
5233
5401
|
"View API",
|
|
5234
|
-
|
|
5402
|
+
' ',
|
|
5235
5403
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5236
5404
|
style: {
|
|
5237
|
-
whiteSpace:
|
|
5405
|
+
whiteSpace: 'nowrap'
|
|
5238
5406
|
},
|
|
5239
5407
|
children: [
|
|
5240
5408
|
"specification ",
|
|
@@ -5275,20 +5443,20 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
|
|
|
5275
5443
|
|
|
5276
5444
|
const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
|
|
5277
5445
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
5278
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
5446
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
|
|
5279
5447
|
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
5280
5448
|
minWidth: 0,
|
|
5281
5449
|
maxWidth: 544
|
|
5282
5450
|
});
|
|
5283
5451
|
const sortElement = (isSorted)=>{
|
|
5284
|
-
if (isSorted ===
|
|
5285
|
-
if (isSorted ===
|
|
5286
|
-
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';
|
|
5287
5455
|
};
|
|
5288
5456
|
const table = (0, $hgUW1$useReactTable)({
|
|
5289
5457
|
data: tableData,
|
|
5290
5458
|
columns: tableColumns,
|
|
5291
|
-
columnResizeMode:
|
|
5459
|
+
columnResizeMode: 'onChange',
|
|
5292
5460
|
getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
|
|
5293
5461
|
getFilteredRowModel: (0, $hgUW1$getFilteredRowModel)(),
|
|
5294
5462
|
getPaginationRowModel: (0, $hgUW1$getPaginationRowModel)(),
|
|
@@ -5307,49 +5475,49 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5307
5475
|
});
|
|
5308
5476
|
const sortOptions = [
|
|
5309
5477
|
{
|
|
5310
|
-
value:
|
|
5311
|
-
label:
|
|
5478
|
+
value: 'default',
|
|
5479
|
+
label: 'No Sort'
|
|
5312
5480
|
},
|
|
5313
5481
|
{
|
|
5314
|
-
value:
|
|
5315
|
-
label:
|
|
5482
|
+
value: 'titleasc',
|
|
5483
|
+
label: 'Title A-Z'
|
|
5316
5484
|
},
|
|
5317
5485
|
{
|
|
5318
|
-
value:
|
|
5319
|
-
label:
|
|
5486
|
+
value: 'titledesc',
|
|
5487
|
+
label: 'Title Z-A'
|
|
5320
5488
|
},
|
|
5321
5489
|
{
|
|
5322
|
-
value:
|
|
5323
|
-
label:
|
|
5490
|
+
value: 'typeasc',
|
|
5491
|
+
label: 'Type A-Z'
|
|
5324
5492
|
},
|
|
5325
5493
|
{
|
|
5326
|
-
value:
|
|
5327
|
-
label:
|
|
5494
|
+
value: 'typedesc',
|
|
5495
|
+
label: 'Type Z-A'
|
|
5328
5496
|
}
|
|
5329
5497
|
];
|
|
5330
5498
|
const sortStatesLookup = {
|
|
5331
5499
|
default: [],
|
|
5332
5500
|
titleasc: [
|
|
5333
5501
|
{
|
|
5334
|
-
id:
|
|
5502
|
+
id: 'titleResizable',
|
|
5335
5503
|
desc: false
|
|
5336
5504
|
}
|
|
5337
5505
|
],
|
|
5338
5506
|
titledesc: [
|
|
5339
5507
|
{
|
|
5340
|
-
id:
|
|
5508
|
+
id: 'titleResizable',
|
|
5341
5509
|
desc: true
|
|
5342
5510
|
}
|
|
5343
5511
|
],
|
|
5344
5512
|
typeasc: [
|
|
5345
5513
|
{
|
|
5346
|
-
id:
|
|
5514
|
+
id: 'type',
|
|
5347
5515
|
desc: false
|
|
5348
5516
|
}
|
|
5349
5517
|
],
|
|
5350
5518
|
typedesc: [
|
|
5351
5519
|
{
|
|
5352
|
-
id:
|
|
5520
|
+
id: 'type',
|
|
5353
5521
|
desc: true
|
|
5354
5522
|
}
|
|
5355
5523
|
]
|
|
@@ -5377,7 +5545,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5377
5545
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
5378
5546
|
className: "dc-c-datatable",
|
|
5379
5547
|
style: {
|
|
5380
|
-
width:
|
|
5548
|
+
width: '100%'
|
|
5381
5549
|
},
|
|
5382
5550
|
stackable: true,
|
|
5383
5551
|
children: [
|
|
@@ -5393,12 +5561,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5393
5561
|
}, header.id + "_resize") : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5394
5562
|
key: header.id,
|
|
5395
5563
|
className: `ds-u-border-y--2 ds-u-border--dark ds-u-border-x--0`,
|
|
5396
|
-
id:
|
|
5564
|
+
id: 'dataDictionary_' + header.id,
|
|
5397
5565
|
children: [
|
|
5398
5566
|
(0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext()),
|
|
5399
|
-
header.id ===
|
|
5567
|
+
header.id === 'type' && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
5400
5568
|
onClick: header.column.getToggleSortingHandler(),
|
|
5401
|
-
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())}` : '',
|
|
5402
5570
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
5403
5571
|
})
|
|
5404
5572
|
]
|
|
@@ -5413,12 +5581,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5413
5581
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
5414
5582
|
key: cell.id,
|
|
5415
5583
|
style: {
|
|
5416
|
-
maxWidth: mobile ?
|
|
5417
|
-
whiteSpace: cell.column.id === "description" ?
|
|
5584
|
+
maxWidth: mobile ? '100%' : cell.column.getSize(),
|
|
5585
|
+
whiteSpace: cell.column.id === "description" ? 'pre-wrap' : 'normal'
|
|
5418
5586
|
},
|
|
5419
|
-
className: `${cell.column.id ===
|
|
5420
|
-
headers:
|
|
5421
|
-
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,
|
|
5422
5590
|
children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
5423
5591
|
});
|
|
5424
5592
|
})
|
|
@@ -5447,7 +5615,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5447
5615
|
table.setPageIndex(page - 1);
|
|
5448
5616
|
},
|
|
5449
5617
|
renderHref: (page)=>`/page=${page}`
|
|
5450
|
-
}) :
|
|
5618
|
+
}) : ''
|
|
5451
5619
|
]
|
|
5452
5620
|
});
|
|
5453
5621
|
};
|
|
@@ -5457,17 +5625,17 @@ var $6765a74df807d015$export$2e2bcd8739ae039 = $6765a74df807d015$var$DataDiction
|
|
|
5457
5625
|
const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
|
|
5458
5626
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
5459
5627
|
const tableColumns = [
|
|
5460
|
-
columnHelper.accessor(
|
|
5461
|
-
header:
|
|
5628
|
+
columnHelper.accessor('name', {
|
|
5629
|
+
header: 'Name'
|
|
5462
5630
|
}),
|
|
5463
|
-
columnHelper.accessor(
|
|
5464
|
-
header:
|
|
5631
|
+
columnHelper.accessor('title', {
|
|
5632
|
+
header: 'Title'
|
|
5465
5633
|
}),
|
|
5466
|
-
columnHelper.accessor(
|
|
5467
|
-
header:
|
|
5634
|
+
columnHelper.accessor('type', {
|
|
5635
|
+
header: 'Type'
|
|
5468
5636
|
}),
|
|
5469
|
-
columnHelper.accessor(
|
|
5470
|
-
header:
|
|
5637
|
+
columnHelper.accessor('format', {
|
|
5638
|
+
header: 'Format'
|
|
5471
5639
|
})
|
|
5472
5640
|
];
|
|
5473
5641
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6765a74df807d015$export$2e2bcd8739ae039), {
|
|
@@ -5511,7 +5679,7 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
5511
5679
|
});
|
|
5512
5680
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
5513
5681
|
const tableColumns = [
|
|
5514
|
-
columnHelper.accessor(
|
|
5682
|
+
columnHelper.accessor('titleResizable', {
|
|
5515
5683
|
header: ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5516
5684
|
className: "dc-c-tooltip-width-override",
|
|
5517
5685
|
children: [
|
|
@@ -5520,8 +5688,8 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
5520
5688
|
title: "Title represents the column headers of the data file",
|
|
5521
5689
|
// @ts-ignore
|
|
5522
5690
|
style: {
|
|
5523
|
-
border:
|
|
5524
|
-
background:
|
|
5691
|
+
border: 'none',
|
|
5692
|
+
background: 'none'
|
|
5525
5693
|
},
|
|
5526
5694
|
maxWidth: "400px",
|
|
5527
5695
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
|
|
@@ -5531,48 +5699,48 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
5531
5699
|
size: 300,
|
|
5532
5700
|
minSize: 132
|
|
5533
5701
|
}),
|
|
5534
|
-
columnHelper.accessor(
|
|
5535
|
-
header:
|
|
5702
|
+
columnHelper.accessor('description', {
|
|
5703
|
+
header: 'Description',
|
|
5536
5704
|
minSize: 600
|
|
5537
5705
|
}),
|
|
5538
|
-
columnHelper.accessor(
|
|
5539
|
-
header:
|
|
5706
|
+
columnHelper.accessor('type', {
|
|
5707
|
+
header: 'Type',
|
|
5540
5708
|
size: 150,
|
|
5541
5709
|
enableResizing: false
|
|
5542
5710
|
})
|
|
5543
5711
|
];
|
|
5544
5712
|
const typeOptions = [
|
|
5545
5713
|
{
|
|
5546
|
-
value:
|
|
5547
|
-
label:
|
|
5714
|
+
value: 'all',
|
|
5715
|
+
label: 'All Types'
|
|
5548
5716
|
},
|
|
5549
5717
|
{
|
|
5550
|
-
value:
|
|
5551
|
-
label:
|
|
5718
|
+
value: 'string',
|
|
5719
|
+
label: 'String'
|
|
5552
5720
|
},
|
|
5553
5721
|
{
|
|
5554
|
-
value:
|
|
5555
|
-
label:
|
|
5722
|
+
value: 'date',
|
|
5723
|
+
label: 'Date'
|
|
5556
5724
|
},
|
|
5557
5725
|
{
|
|
5558
|
-
value:
|
|
5559
|
-
label:
|
|
5726
|
+
value: 'datetime',
|
|
5727
|
+
label: 'Datetime'
|
|
5560
5728
|
},
|
|
5561
5729
|
{
|
|
5562
|
-
value:
|
|
5563
|
-
label:
|
|
5730
|
+
value: 'year',
|
|
5731
|
+
label: 'Year'
|
|
5564
5732
|
},
|
|
5565
5733
|
{
|
|
5566
|
-
value:
|
|
5567
|
-
label:
|
|
5734
|
+
value: 'integer',
|
|
5735
|
+
label: 'Integer'
|
|
5568
5736
|
},
|
|
5569
5737
|
{
|
|
5570
|
-
value:
|
|
5571
|
-
label:
|
|
5738
|
+
value: 'number',
|
|
5739
|
+
label: 'Number'
|
|
5572
5740
|
},
|
|
5573
5741
|
{
|
|
5574
|
-
value:
|
|
5575
|
-
label:
|
|
5742
|
+
value: 'boolean',
|
|
5743
|
+
label: 'Boolean'
|
|
5576
5744
|
}
|
|
5577
5745
|
];
|
|
5578
5746
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -5679,7 +5847,7 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
|
|
|
5679
5847
|
href: datasetDictionaryEndpoint + "/csv",
|
|
5680
5848
|
className: "ds-c-button",
|
|
5681
5849
|
style: {
|
|
5682
|
-
width:
|
|
5850
|
+
width: '100%'
|
|
5683
5851
|
},
|
|
5684
5852
|
children: [
|
|
5685
5853
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
@@ -5710,6 +5878,86 @@ var $6012b86ffcaf3f71$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
5710
5878
|
|
|
5711
5879
|
|
|
5712
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
|
+
|
|
5713
5961
|
|
|
5714
5962
|
|
|
5715
5963
|
|
|
@@ -5758,7 +6006,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
5758
6006
|
const [description, setDescription] = (0, $hgUW1$useState)("");
|
|
5759
6007
|
if (!distribution && !dataset?.identifier) return null;
|
|
5760
6008
|
(0, $hgUW1$useEffect)(()=>{
|
|
5761
|
-
let newDescription =
|
|
6009
|
+
let newDescription = '';
|
|
5762
6010
|
if (customDescription) newDescription = customDescription(dataset, distribution, resource);
|
|
5763
6011
|
else {
|
|
5764
6012
|
if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
|
|
@@ -5773,7 +6021,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
5773
6021
|
customDescription
|
|
5774
6022
|
]);
|
|
5775
6023
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5776
|
-
className:
|
|
6024
|
+
className: 'ds-u-measure--wide ds-u-margin-bottom--7',
|
|
5777
6025
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5778
6026
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
5779
6027
|
dangerouslySetInnerHTML: {
|
|
@@ -5795,7 +6043,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
5795
6043
|
],
|
|
5796
6044
|
queryFn: ()=>{
|
|
5797
6045
|
return fetch(`${dataDictionaryUrl}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA), {
|
|
5798
|
-
arrayFormat:
|
|
6046
|
+
arrayFormat: 'comma',
|
|
5799
6047
|
encode: false
|
|
5800
6048
|
})}`).then((res)=>res.json());
|
|
5801
6049
|
}
|
|
@@ -5805,7 +6053,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
5805
6053
|
dataDictionaryLoading: isPending
|
|
5806
6054
|
};
|
|
5807
6055
|
};
|
|
5808
|
-
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 })=>{
|
|
5809
6057
|
const options = location.search ? {
|
|
5810
6058
|
...(0, $hgUW1$qs).parse(location.search, {
|
|
5811
6059
|
ignoreQueryPrefix: true
|
|
@@ -5814,7 +6062,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5814
6062
|
conditions: []
|
|
5815
6063
|
};
|
|
5816
6064
|
const { dataset: dataset, isPending: isPending } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
5817
|
-
const title = dataset.title ? dataset.title :
|
|
6065
|
+
const title = dataset.title ? dataset.title : '';
|
|
5818
6066
|
const metadataMapping = {
|
|
5819
6067
|
...(0, $6da0396069e23175$export$bc27cf7ecf44639d),
|
|
5820
6068
|
...customMetadataMapping
|
|
@@ -5822,7 +6070,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5822
6070
|
let distribution = {};
|
|
5823
6071
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
5824
6072
|
if (distributions.length) distribution = distributions[0];
|
|
5825
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
6073
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
5826
6074
|
...options,
|
|
5827
6075
|
limit: defaultPageSize
|
|
5828
6076
|
});
|
|
@@ -5834,7 +6082,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5834
6082
|
}) : null;
|
|
5835
6083
|
(0, $hgUW1$useEffect)(()=>{
|
|
5836
6084
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
5837
|
-
if (localFileFormat ===
|
|
6085
|
+
if (localFileFormat === 'csv') resource.setResource(distribution.identifier);
|
|
5838
6086
|
}, [
|
|
5839
6087
|
distribution
|
|
5840
6088
|
]);
|
|
@@ -5889,26 +6137,26 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5889
6137
|
distribution,
|
|
5890
6138
|
window.location.hash
|
|
5891
6139
|
]);
|
|
5892
|
-
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;
|
|
5893
6141
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
5894
6142
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
5895
6143
|
content: notFoundContent,
|
|
5896
6144
|
siteUrl: rootUrl
|
|
5897
6145
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5898
|
-
className:
|
|
6146
|
+
className: 'ds-l-container',
|
|
5899
6147
|
children: [
|
|
5900
6148
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5901
|
-
className:
|
|
6149
|
+
className: 'ds-l-row',
|
|
5902
6150
|
children: [
|
|
5903
6151
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5904
|
-
className:
|
|
6152
|
+
className: 'ds-l-md-col--9',
|
|
5905
6153
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
5906
6154
|
className: "ds-text-heading--3xl",
|
|
5907
6155
|
children: title
|
|
5908
6156
|
})
|
|
5909
6157
|
}),
|
|
5910
6158
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5911
|
-
className:
|
|
6159
|
+
className: 'ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right',
|
|
5912
6160
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
5913
6161
|
className: "ds-u-margin--0",
|
|
5914
6162
|
children: [
|
|
@@ -5920,7 +6168,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5920
6168
|
})
|
|
5921
6169
|
}),
|
|
5922
6170
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5923
|
-
className:
|
|
6171
|
+
className: 'ds-l-md-col--9',
|
|
5924
6172
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
5925
6173
|
distribution: distribution,
|
|
5926
6174
|
dataset: dataset,
|
|
@@ -5932,9 +6180,9 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5932
6180
|
]
|
|
5933
6181
|
}),
|
|
5934
6182
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5935
|
-
className:
|
|
6183
|
+
className: 'ds-l-row',
|
|
5936
6184
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5937
|
-
className:
|
|
6185
|
+
className: 'ds-l-md-col--12 dc-dataset',
|
|
5938
6186
|
children: !isPending && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tabs), {
|
|
5939
6187
|
onChange: (selectedId, prevSelectedId)=>{
|
|
5940
6188
|
setSelectedTab(selectedId);
|
|
@@ -5942,7 +6190,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5942
6190
|
selectedId: selectedTab,
|
|
5943
6191
|
children: [
|
|
5944
6192
|
(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
5945
|
-
id:
|
|
6193
|
+
id: 'data-table',
|
|
5946
6194
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5947
6195
|
className: "ds-u-color--primary",
|
|
5948
6196
|
children: [
|
|
@@ -5952,7 +6200,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5952
6200
|
"Data Table"
|
|
5953
6201
|
]
|
|
5954
6202
|
}),
|
|
5955
|
-
className: borderlessTabs ?
|
|
6203
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
5956
6204
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
5957
6205
|
value: {
|
|
5958
6206
|
id: id,
|
|
@@ -5967,7 +6215,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5967
6215
|
})
|
|
5968
6216
|
}),
|
|
5969
6217
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
5970
|
-
id:
|
|
6218
|
+
id: 'overview',
|
|
5971
6219
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5972
6220
|
className: "ds-u-color--primary",
|
|
5973
6221
|
children: [
|
|
@@ -5977,7 +6225,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5977
6225
|
"Overview"
|
|
5978
6226
|
]
|
|
5979
6227
|
}),
|
|
5980
|
-
className: borderlessTabs ?
|
|
6228
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
5981
6229
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
|
|
5982
6230
|
resource: resource,
|
|
5983
6231
|
dataset: dataset,
|
|
@@ -5986,7 +6234,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5986
6234
|
})
|
|
5987
6235
|
}),
|
|
5988
6236
|
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TabPanel), {
|
|
5989
|
-
id:
|
|
6237
|
+
id: 'data-dictionary',
|
|
5990
6238
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5991
6239
|
className: "ds-u-color--primary",
|
|
5992
6240
|
children: [
|
|
@@ -5996,7 +6244,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5996
6244
|
"Data Dictionary"
|
|
5997
6245
|
]
|
|
5998
6246
|
}),
|
|
5999
|
-
className: borderlessTabs ?
|
|
6247
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
6000
6248
|
children: [
|
|
6001
6249
|
displayDataDictionaryTab && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
6002
6250
|
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
@@ -6009,8 +6257,24 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6009
6257
|
})
|
|
6010
6258
|
]
|
|
6011
6259
|
}),
|
|
6012
|
-
|
|
6013
|
-
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',
|
|
6014
6278
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6015
6279
|
className: "ds-u-color--primary",
|
|
6016
6280
|
children: [
|
|
@@ -6020,13 +6284,16 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6020
6284
|
"API"
|
|
6021
6285
|
]
|
|
6022
6286
|
}),
|
|
6023
|
-
className: borderlessTabs ?
|
|
6024
|
-
children:
|
|
6025
|
-
id
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
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
|
+
]
|
|
6030
6297
|
})
|
|
6031
6298
|
]
|
|
6032
6299
|
})
|
|
@@ -6057,13 +6324,13 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6057
6324
|
});
|
|
6058
6325
|
const menu = (0, $hgUW1$useRef)(null);
|
|
6059
6326
|
function closeMobileMenu() {
|
|
6060
|
-
const mobileMenuButtonElement = document.querySelector(
|
|
6327
|
+
const mobileMenuButtonElement = document.querySelector('.dkan-c-mobile-menu-button');
|
|
6061
6328
|
if (!mobileMenuButtonElement) return;
|
|
6062
6329
|
mobileMenuButtonElement.focus();
|
|
6063
6330
|
}
|
|
6064
6331
|
// Close mobile menu with escape.
|
|
6065
6332
|
function handleMenuClose(event) {
|
|
6066
|
-
if (event.key ===
|
|
6333
|
+
if (event.key === 'Escape' && mobileMenuOpen) setMobileMenuOpen(false);
|
|
6067
6334
|
}
|
|
6068
6335
|
function handleClick(event) {
|
|
6069
6336
|
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
@@ -6098,7 +6365,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6098
6365
|
const focusableEls = getFocusableElements(menu.current).selectors.visible;
|
|
6099
6366
|
const firstEl = focusableEls[0];
|
|
6100
6367
|
const lastEl = focusableEls[focusableEls.length - 1];
|
|
6101
|
-
if (event.key ===
|
|
6368
|
+
if (event.key === 'Tab') {
|
|
6102
6369
|
if (event.shiftKey && document.activeElement === firstEl) {
|
|
6103
6370
|
lastEl?.focus();
|
|
6104
6371
|
event.preventDefault();
|
|
@@ -6110,15 +6377,15 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6110
6377
|
}
|
|
6111
6378
|
};
|
|
6112
6379
|
(0, $hgUW1$useEffect)(()=>{
|
|
6113
|
-
document.addEventListener(
|
|
6114
|
-
document.addEventListener(
|
|
6380
|
+
document.addEventListener('keyup', handleMenuClose);
|
|
6381
|
+
document.addEventListener('mousedown', handleClick);
|
|
6115
6382
|
if (mobileMenuOpen) handleFocusIn();
|
|
6116
6383
|
else closeMobileMenu();
|
|
6117
|
-
if (menu.current) menu.current.addEventListener(
|
|
6384
|
+
if (menu.current) menu.current.addEventListener('keydown', (evt)=>trapFocus(evt));
|
|
6118
6385
|
return ()=>{
|
|
6119
|
-
document.removeEventListener(
|
|
6120
|
-
document.addEventListener(
|
|
6121
|
-
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);
|
|
6122
6389
|
};
|
|
6123
6390
|
}, [
|
|
6124
6391
|
mobileMenuOpen
|
|
@@ -6133,7 +6400,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6133
6400
|
},
|
|
6134
6401
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
|
|
6135
6402
|
"aria-label": "Site header",
|
|
6136
|
-
className: `dkan-c-header dkan-c-header--${mobileMax ?
|
|
6403
|
+
className: `dkan-c-header dkan-c-header--${mobileMax ? 'mobile' : 'desktop'}`,
|
|
6137
6404
|
children: [
|
|
6138
6405
|
topNav && topNav,
|
|
6139
6406
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6176,7 +6443,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6176
6443
|
var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
|
|
6177
6444
|
|
|
6178
6445
|
|
|
6179
|
-
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", {
|
|
6180
6447
|
children: [
|
|
6181
6448
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6182
6449
|
children: "A federal government website managed and paid for by the U.S. Centers for Medicare & Medicaid Services."
|
|
@@ -6264,14 +6531,14 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6264
6531
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
6265
6532
|
className: "ds-u-font-size--sm",
|
|
6266
6533
|
children: footerAdditionalResourcesLinks.filter((link)=>{
|
|
6267
|
-
const noOnClick = Object.keys(link).findIndex((l)=>l ===
|
|
6534
|
+
const noOnClick = Object.keys(link).findIndex((l)=>l === 'onClick');
|
|
6268
6535
|
if (noOnClick === -1 || link.onClick && link.dataTag) return link;
|
|
6269
6536
|
}).map((link)=>{
|
|
6270
6537
|
if (link.onClick && link.dataTag) return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
6271
6538
|
className: "ds-u-margin-bottom--1",
|
|
6272
6539
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
6273
6540
|
href: link.url,
|
|
6274
|
-
[
|
|
6541
|
+
['data-' + link.dataTag.name]: link.dataTag.value,
|
|
6275
6542
|
onClick: link.onClick,
|
|
6276
6543
|
children: link.label
|
|
6277
6544
|
})
|
|
@@ -6371,7 +6638,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6371
6638
|
children: [
|
|
6372
6639
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6373
6640
|
id: "svg-inline--fa-title-iRCARP7h6Kp3",
|
|
6374
|
-
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title :
|
|
6641
|
+
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title : 'CMS Facebook'
|
|
6375
6642
|
}),
|
|
6376
6643
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6377
6644
|
transform: "translate(160 256)",
|
|
@@ -6424,7 +6691,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6424
6691
|
children: [
|
|
6425
6692
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6426
6693
|
id: "svg-inline--fa-title-4z03ITiPPTVF",
|
|
6427
|
-
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title :
|
|
6694
|
+
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title : 'CMS Twitter'
|
|
6428
6695
|
}),
|
|
6429
6696
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6430
6697
|
transform: "translate(256 256)",
|
|
@@ -6477,7 +6744,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6477
6744
|
children: [
|
|
6478
6745
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6479
6746
|
id: "svg-inline--fa-title-Nm2qsuSKvuRZ",
|
|
6480
|
-
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title :
|
|
6747
|
+
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title : 'CMS LinkedIn'
|
|
6481
6748
|
}),
|
|
6482
6749
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6483
6750
|
transform: "translate(224 256)",
|
|
@@ -6529,7 +6796,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6529
6796
|
children: [
|
|
6530
6797
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6531
6798
|
id: "svg-inline--fa-title-youtube",
|
|
6532
|
-
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title :
|
|
6799
|
+
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title : 'CMS youtube'
|
|
6533
6800
|
}),
|
|
6534
6801
|
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
6535
6802
|
fill: "currentColor",
|
|
@@ -6629,26 +6896,26 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
6629
6896
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6630
6897
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
6631
6898
|
stackable: true,
|
|
6632
|
-
className:
|
|
6899
|
+
className: 'ds-c-table',
|
|
6633
6900
|
children: [
|
|
6634
6901
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
|
|
6635
6902
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
6636
6903
|
children: [
|
|
6637
6904
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6638
|
-
id:
|
|
6639
|
-
headers:
|
|
6905
|
+
id: 'application',
|
|
6906
|
+
headers: 'Application',
|
|
6640
6907
|
children: "Application"
|
|
6641
|
-
},
|
|
6908
|
+
}, 'Application'),
|
|
6642
6909
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6643
|
-
id:
|
|
6644
|
-
headers:
|
|
6910
|
+
id: 'notes',
|
|
6911
|
+
headers: 'Notes',
|
|
6645
6912
|
children: "Notes"
|
|
6646
|
-
},
|
|
6913
|
+
}, 'Notes'),
|
|
6647
6914
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6648
|
-
id:
|
|
6649
|
-
headers:
|
|
6915
|
+
id: 'links',
|
|
6916
|
+
headers: 'Links',
|
|
6650
6917
|
children: "Links"
|
|
6651
|
-
},
|
|
6918
|
+
}, 'Links')
|
|
6652
6919
|
]
|
|
6653
6920
|
})
|
|
6654
6921
|
}),
|
|
@@ -6658,19 +6925,19 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
6658
6925
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6659
6926
|
id: d.id,
|
|
6660
6927
|
stackedTitle: "Application",
|
|
6661
|
-
headers:
|
|
6928
|
+
headers: 'Application',
|
|
6662
6929
|
children: d.application
|
|
6663
6930
|
}, d.id),
|
|
6664
6931
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6665
6932
|
id: d.id,
|
|
6666
6933
|
stackedTitle: "Notes",
|
|
6667
|
-
headers:
|
|
6934
|
+
headers: 'Notes',
|
|
6668
6935
|
children: d.notes
|
|
6669
6936
|
}, `${d.id}-notes`),
|
|
6670
6937
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6671
6938
|
id: d.id,
|
|
6672
6939
|
stackedTitle: "Links",
|
|
6673
|
-
headers:
|
|
6940
|
+
headers: 'Links',
|
|
6674
6941
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
6675
6942
|
className: "dkan-newtab",
|
|
6676
6943
|
href: d.link,
|
|
@@ -6698,44 +6965,44 @@ var $5655284dbbb89508$export$2e2bcd8739ae039 = $5655284dbbb89508$var$Documentati
|
|
|
6698
6965
|
|
|
6699
6966
|
const $c7bf75f7e8a68780$export$7850f4d545d994c6 = [
|
|
6700
6967
|
{
|
|
6701
|
-
id:
|
|
6702
|
-
application:
|
|
6703
|
-
notes:
|
|
6704
|
-
link:
|
|
6705
|
-
linkText:
|
|
6706
|
-
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'
|
|
6707
6974
|
},
|
|
6708
6975
|
{
|
|
6709
|
-
id:
|
|
6710
|
-
application:
|
|
6711
|
-
notes:
|
|
6712
|
-
link:
|
|
6713
|
-
linkText:
|
|
6714
|
-
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'
|
|
6715
6982
|
},
|
|
6716
6983
|
{
|
|
6717
|
-
id:
|
|
6718
|
-
application:
|
|
6719
|
-
notes:
|
|
6720
|
-
link:
|
|
6721
|
-
linkText:
|
|
6722
|
-
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'
|
|
6723
6990
|
},
|
|
6724
6991
|
{
|
|
6725
|
-
id:
|
|
6726
|
-
application:
|
|
6727
|
-
notes:
|
|
6728
|
-
link:
|
|
6729
|
-
linkText:
|
|
6730
|
-
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'
|
|
6731
6998
|
},
|
|
6732
6999
|
{
|
|
6733
|
-
id:
|
|
6734
|
-
application:
|
|
6735
|
-
notes:
|
|
6736
|
-
link:
|
|
6737
|
-
linkText:
|
|
6738
|
-
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'
|
|
6739
7006
|
}
|
|
6740
7007
|
];
|
|
6741
7008
|
|
|
@@ -6763,7 +7030,7 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
6763
7030
|
}),
|
|
6764
7031
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
6765
7032
|
heading: "Notice",
|
|
6766
|
-
className:
|
|
7033
|
+
className: 'ds-u-margin-top--6',
|
|
6767
7034
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6768
7035
|
className: "ds-c-alert__text",
|
|
6769
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."
|
|
@@ -6772,16 +7039,16 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
6772
7039
|
]
|
|
6773
7040
|
}),
|
|
6774
7041
|
/*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
6775
|
-
className:
|
|
7042
|
+
className: 'ds-u-margin-top--4 ds-l-row',
|
|
6776
7043
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6777
|
-
className:
|
|
7044
|
+
className: 'ds-l-col--12',
|
|
6778
7045
|
children: [
|
|
6779
7046
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
6780
7047
|
className: "ds-text-heading--2xl ds-text-heading--2xl",
|
|
6781
7048
|
children: "Documentation by Application"
|
|
6782
7049
|
}),
|
|
6783
7050
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6784
|
-
className:
|
|
7051
|
+
className: 'ds-u-margin-top--4',
|
|
6785
7052
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5655284dbbb89508$export$2e2bcd8739ae039), {
|
|
6786
7053
|
data: documentationList
|
|
6787
7054
|
})
|
|
@@ -6809,7 +7076,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
6809
7076
|
const options = {
|
|
6810
7077
|
conditions: query ? JSON.parse(query).map(({ column: column, operator: operator, ...rest })=>({
|
|
6811
7078
|
property: column,
|
|
6812
|
-
operator: operator ===
|
|
7079
|
+
operator: operator === 'is' ? '=' : operator === 'is not' ? '<>' : operator === 'or' ? 'in' : operator,
|
|
6813
7080
|
...rest
|
|
6814
7081
|
})) : []
|
|
6815
7082
|
};
|
|
@@ -6817,13 +7084,13 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
6817
7084
|
let distribution = {};
|
|
6818
7085
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
6819
7086
|
if (distributions.length) distribution = distributions[distributionIndex];
|
|
6820
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7087
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
6821
7088
|
...options,
|
|
6822
7089
|
limit: defaultPageSize
|
|
6823
7090
|
});
|
|
6824
7091
|
(0, $hgUW1$useEffect)(()=>{
|
|
6825
7092
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6826
|
-
if (localFileFormat ===
|
|
7093
|
+
if (localFileFormat === 'csv') resource.setResource(distribution.identifier);
|
|
6827
7094
|
}, [
|
|
6828
7095
|
distribution
|
|
6829
7096
|
]);
|
|
@@ -6874,7 +7141,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
6874
7141
|
|
|
6875
7142
|
|
|
6876
7143
|
function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
|
|
6877
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7144
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
6878
7145
|
const newDate = new Date(condition.value);
|
|
6879
7146
|
if (newDate instanceof Date && !isNaN(newDate)) return newDate;
|
|
6880
7147
|
}
|
|
@@ -6891,9 +7158,9 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
6891
7158
|
const [startDate, setStartDate] = (0, $hgUW1$react).useState($374c4669b044ddf8$var$getStartDate(condition, schema, id));
|
|
6892
7159
|
(0, $hgUW1$useEffect)(()=>{
|
|
6893
7160
|
if (property !== condition.property) {
|
|
6894
|
-
if (property) update(index,
|
|
6895
|
-
else update(index,
|
|
6896
|
-
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') {
|
|
6897
7164
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
6898
7165
|
}
|
|
6899
7166
|
}
|
|
@@ -6907,16 +7174,16 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
6907
7174
|
]);
|
|
6908
7175
|
(0, $hgUW1$useEffect)(()=>{
|
|
6909
7176
|
if (operator !== condition.operator) {
|
|
6910
|
-
if (operator) update(index,
|
|
6911
|
-
else update(index,
|
|
7177
|
+
if (operator) update(index, 'operator', operator);
|
|
7178
|
+
else update(index, 'operator', '');
|
|
6912
7179
|
}
|
|
6913
7180
|
}, [
|
|
6914
7181
|
operator
|
|
6915
7182
|
]);
|
|
6916
7183
|
(0, $hgUW1$useEffect)(()=>{
|
|
6917
7184
|
if (value !== condition.value) {
|
|
6918
|
-
if (value) update(index,
|
|
6919
|
-
else update(index,
|
|
7185
|
+
if (value) update(index, 'value', value);
|
|
7186
|
+
else update(index, 'value', '');
|
|
6920
7187
|
}
|
|
6921
7188
|
}, [
|
|
6922
7189
|
value
|
|
@@ -6940,7 +7207,7 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
6940
7207
|
onChange: (e)=>setOperator(e.target.value),
|
|
6941
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"
|
|
6942
7209
|
}),
|
|
6943
|
-
schema[id].fields[property].mysql_type ===
|
|
7210
|
+
schema[id].fields[property].mysql_type === 'date' ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6944
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",
|
|
6945
7212
|
children: [
|
|
6946
7213
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
@@ -6990,19 +7257,19 @@ var $374c4669b044ddf8$export$2e2bcd8739ae039 = $374c4669b044ddf8$var$QueryRow;
|
|
|
6990
7257
|
function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
|
|
6991
7258
|
let cond = condition;
|
|
6992
7259
|
delete cond.key;
|
|
6993
|
-
if (cond.operator ===
|
|
7260
|
+
if (cond.operator === '=' || cond.operator === '<>') {
|
|
6994
7261
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
6995
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7262
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
6996
7263
|
}
|
|
6997
|
-
if (cond.operator.toLowerCase() ===
|
|
7264
|
+
if (cond.operator.toLowerCase() === 'like') {
|
|
6998
7265
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
6999
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7266
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
7000
7267
|
cond.value = `%${cleanedValue}%`;
|
|
7001
7268
|
}
|
|
7002
|
-
if (cond.operator.toLowerCase() ===
|
|
7003
|
-
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(',');
|
|
7004
7271
|
}
|
|
7005
|
-
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, ''));
|
|
7006
7273
|
return cond;
|
|
7007
7274
|
}
|
|
7008
7275
|
const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, setOffset: setOffset })=>{
|
|
@@ -7022,7 +7289,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7022
7289
|
...queryConditions,
|
|
7023
7290
|
{
|
|
7024
7291
|
property: fields[0],
|
|
7025
|
-
value:
|
|
7292
|
+
value: '',
|
|
7026
7293
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
7027
7294
|
key: Date.now()
|
|
7028
7295
|
}
|
|
@@ -7062,7 +7329,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7062
7329
|
encodeValuesOnly: true,
|
|
7063
7330
|
addQueryPrefix: true
|
|
7064
7331
|
});
|
|
7065
|
-
window.history.pushState({},
|
|
7332
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
7066
7333
|
};
|
|
7067
7334
|
const updateCondition = (index, key, value)=>{
|
|
7068
7335
|
let newConditions = [
|
|
@@ -7135,7 +7402,7 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
|
|
|
7135
7402
|
|
|
7136
7403
|
|
|
7137
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 })=>{
|
|
7138
|
-
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState(
|
|
7405
|
+
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState('ds-u-padding-y--1');
|
|
7139
7406
|
let apiDocs = (0, $hgUW1$useRef)();
|
|
7140
7407
|
let distribution = {};
|
|
7141
7408
|
let distribution_array = dataset.distribution ? dataset.distribution : [];
|
|
@@ -7147,7 +7414,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7147
7414
|
} : {
|
|
7148
7415
|
conditions: []
|
|
7149
7416
|
};
|
|
7150
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7417
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
7151
7418
|
...options,
|
|
7152
7419
|
limit: 25
|
|
7153
7420
|
});
|
|
@@ -7161,7 +7428,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7161
7428
|
}, {
|
|
7162
7429
|
encode: true
|
|
7163
7430
|
})}&format=csv`;
|
|
7164
|
-
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;
|
|
7165
7432
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
7166
7433
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7167
7434
|
className: "ds-l-container ds-u-padding-bottom--3 ds-u-margin-bottom--2",
|
|
@@ -7170,7 +7437,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7170
7437
|
children: Object.keys(distribution).length && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
7171
7438
|
children: [
|
|
7172
7439
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7173
|
-
className:
|
|
7440
|
+
className: 'ds-l-md-col--9',
|
|
7174
7441
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
7175
7442
|
to: `/dataset/${id}`,
|
|
7176
7443
|
className: "ds-u-padding-y--4 ds-u-display--block",
|
|
@@ -7181,14 +7448,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7181
7448
|
})
|
|
7182
7449
|
}),
|
|
7183
7450
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7184
|
-
className:
|
|
7451
|
+
className: 'ds-l-md-col--9',
|
|
7185
7452
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
7186
7453
|
className: "ds-text-heading--3xl",
|
|
7187
7454
|
children: customTitle ? customTitle : pageTitle
|
|
7188
7455
|
})
|
|
7189
7456
|
}),
|
|
7190
7457
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7191
|
-
className:
|
|
7458
|
+
className: 'ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right',
|
|
7192
7459
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
7193
7460
|
className: "ds-u-margin--0",
|
|
7194
7461
|
children: [
|
|
@@ -7200,7 +7467,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7200
7467
|
})
|
|
7201
7468
|
}),
|
|
7202
7469
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7203
|
-
className:
|
|
7470
|
+
className: 'ds-l-md-col--9',
|
|
7204
7471
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
7205
7472
|
distribution: distribution,
|
|
7206
7473
|
dataset: dataset,
|
|
@@ -7210,13 +7477,13 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7210
7477
|
})
|
|
7211
7478
|
}),
|
|
7212
7479
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7213
|
-
className:
|
|
7480
|
+
className: 'ds-l-md-col--12',
|
|
7214
7481
|
children: Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
|
|
7215
7482
|
resource: resource,
|
|
7216
7483
|
id: distribution.identifier,
|
|
7217
7484
|
customColumns: customColumns,
|
|
7218
7485
|
setOffset: resource.setOffset
|
|
7219
|
-
}) :
|
|
7486
|
+
}) : ''
|
|
7220
7487
|
}),
|
|
7221
7488
|
Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
7222
7489
|
value: {
|
|
@@ -7227,7 +7494,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7227
7494
|
customColumns: (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution_array[distIndex].identifier])
|
|
7228
7495
|
},
|
|
7229
7496
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7230
|
-
className:
|
|
7497
|
+
className: 'ds-l-md-col--12',
|
|
7231
7498
|
children: [
|
|
7232
7499
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $af099c546cb226c7$export$2e2bcd8739ae039), {
|
|
7233
7500
|
includeDensity: true,
|
|
@@ -7249,14 +7516,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7249
7516
|
]
|
|
7250
7517
|
})
|
|
7251
7518
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7252
|
-
className:
|
|
7519
|
+
className: 'ds-l-md-col--12',
|
|
7253
7520
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
7254
7521
|
role: "status",
|
|
7255
7522
|
"aria-valuetext": "Resource loading"
|
|
7256
7523
|
})
|
|
7257
7524
|
}),
|
|
7258
7525
|
dataset.identifier && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7259
|
-
className:
|
|
7526
|
+
className: 'ds-l-md-col--12',
|
|
7260
7527
|
ref: apiDocs,
|
|
7261
7528
|
children: [
|
|
7262
7529
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
@@ -7265,7 +7532,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7265
7532
|
}),
|
|
7266
7533
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
7267
7534
|
url: `${rootUrl}/metastore/schemas/dataset/items/${dataset.identifier}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`,
|
|
7268
|
-
docExpansion:
|
|
7535
|
+
docExpansion: 'list',
|
|
7269
7536
|
defaultModelsExpandDepth: -1
|
|
7270
7537
|
})
|
|
7271
7538
|
]
|
|
@@ -7284,7 +7551,7 @@ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, loca
|
|
|
7284
7551
|
const [ready, setReady] = (0, $hgUW1$useState)(false);
|
|
7285
7552
|
const [error, setError] = (0, $hgUW1$useState)(false);
|
|
7286
7553
|
const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
7287
|
-
const distIndex = dist_id ===
|
|
7554
|
+
const distIndex = dist_id === 'data' ? 0 : dist_id;
|
|
7288
7555
|
(0, $hgUW1$useEffect)(()=>{
|
|
7289
7556
|
if (dataset.error) setError(true);
|
|
7290
7557
|
if (dataset.distribution && dataset.distribution.length) {
|
|
@@ -7502,5 +7769,5 @@ var $90fb213ab8eeb2e7$export$2e2bcd8739ae039 = $90fb213ab8eeb2e7$var$useScrollTo
|
|
|
7502
7769
|
|
|
7503
7770
|
|
|
7504
7771
|
|
|
7505
|
-
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, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $
|
|
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};
|
|
7506
7773
|
//# sourceMappingURL=main.js.map
|