@civicactions/cmsds-open-data-components 3.8.2 → 3.8.3-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.css +51 -3
- package/dist/main.css.map +1 -1
- package/dist/main.js +1170 -591
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +56 -44
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
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,
|
|
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, TooltipIcon as $hgUW1$TooltipIcon} 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
|
+
import $hgUW1$qs from "qs";
|
|
7
|
+
import $hgUW1$axios from "axios";
|
|
8
|
+
import {useQuery as $hgUW1$useQuery, QueryClient as $hgUW1$QueryClient, QueryClientProvider as $hgUW1$QueryClientProvider} from "@tanstack/react-query";
|
|
6
9
|
import {useMediaQuery as $hgUW1$useMediaQuery} from "react-responsive";
|
|
7
10
|
import $hgUW1$dompurify from "dompurify";
|
|
8
11
|
import $hgUW1$lodashtruncate from "lodash.truncate";
|
|
@@ -15,11 +18,8 @@ import {KeyboardSensor as $hgUW1$KeyboardSensor, PointerSensor as $hgUW1$Pointer
|
|
|
15
18
|
import {sortableKeyboardCoordinates as $hgUW1$sortableKeyboardCoordinates, arrayMove as $hgUW1$arrayMove, SortableContext as $hgUW1$SortableContext, verticalListSortingStrategy as $hgUW1$verticalListSortingStrategy, useSortable as $hgUW1$useSortable} from "@dnd-kit/sortable";
|
|
16
19
|
import {restrictToVerticalAxis as $hgUW1$restrictToVerticalAxis} from "@dnd-kit/modifiers";
|
|
17
20
|
import {CSS as $hgUW1$CSS} from "@dnd-kit/utilities";
|
|
18
|
-
import $hgUW1$qs from "qs";
|
|
19
21
|
import $hgUW1$reactdatepicker from "react-datepicker";
|
|
20
22
|
import "react-datepicker/dist/react-datepicker.css";
|
|
21
|
-
import $hgUW1$axios from "axios";
|
|
22
|
-
import {useQuery as $hgUW1$useQuery, QueryClient as $hgUW1$QueryClient, QueryClientProvider as $hgUW1$QueryClientProvider} from "@tanstack/react-query";
|
|
23
23
|
|
|
24
24
|
// Components
|
|
25
25
|
|
|
@@ -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), {
|
|
@@ -269,8 +269,335 @@ var $11500a65bd7d9cf1$export$2e2bcd8739ae039 = $11500a65bd7d9cf1$var$HeaderConte
|
|
|
269
269
|
|
|
270
270
|
|
|
271
271
|
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
const $61ff88fb3f6ee2c8$var$queryClient = new (0, $hgUW1$QueryClient)({
|
|
280
|
+
defaultOptions: {
|
|
281
|
+
queries: {
|
|
282
|
+
refetchOnWindowFocus: false
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
const $61ff88fb3f6ee2c8$var$withQueryProvider = (WrappedComponent)=>(props)=>{
|
|
287
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$QueryClientProvider), {
|
|
288
|
+
client: $61ff88fb3f6ee2c8$var$queryClient,
|
|
289
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)(WrappedComponent, {
|
|
290
|
+
...props
|
|
291
|
+
})
|
|
292
|
+
});
|
|
293
|
+
};
|
|
294
|
+
var $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 = $61ff88fb3f6ee2c8$var$withQueryProvider;
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
const $4808982eba3feb88$var$DatasetListSubmenuItem = (props)=>{
|
|
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
|
+
}
|
|
316
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
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
|
+
})
|
|
330
|
+
})
|
|
331
|
+
})
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
var $4808982eba3feb88$export$2e2bcd8739ae039 = $4808982eba3feb88$var$DatasetListSubmenuItem;
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
function $6d5c0212e738499b$export$34e95918366a058e(params, ACA) {
|
|
341
|
+
if (ACA) params = Object.assign(params, {
|
|
342
|
+
ACA: ACA,
|
|
343
|
+
redirect: false
|
|
344
|
+
});
|
|
345
|
+
return params;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
function $eff7d34c30f5a0fc$export$959638e8dca60ce6(facets) {
|
|
350
|
+
let facetObj = {};
|
|
351
|
+
if (facets) {
|
|
352
|
+
facets.forEach((f)=>{
|
|
353
|
+
if (facetObj[f.type]) facetObj[f.type] = [
|
|
354
|
+
...facetObj[f.type],
|
|
355
|
+
f
|
|
356
|
+
];
|
|
357
|
+
else facetObj[f.type] = [
|
|
358
|
+
f
|
|
359
|
+
];
|
|
360
|
+
});
|
|
361
|
+
// sort facets descending by int value, put non int last
|
|
362
|
+
if (facetObj.keyword) facetObj.keyword.sort((a, b)=>{
|
|
363
|
+
if (Number(a.name) && Number(b.name)) return Number(b.name) - Number(a.name);
|
|
364
|
+
});
|
|
365
|
+
return facetObj;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
function $eff7d34c30f5a0fc$export$60ec7cc1d341a524(searchParams, defaultSortOptions) {
|
|
369
|
+
const params = (0, $hgUW1$qs).parse(searchParams, {
|
|
370
|
+
ignoreQueryPrefix: true
|
|
371
|
+
});
|
|
372
|
+
let themes = params.theme;
|
|
373
|
+
let keywords = params.keyword;
|
|
374
|
+
return {
|
|
375
|
+
page: params.page,
|
|
376
|
+
sort: !params.sort ? defaultSortOptions.defaultSort : params.sort,
|
|
377
|
+
sortOrder: !params.sortOrder ? defaultSortOptions.defaultOrder : params.sortOrder,
|
|
378
|
+
fulltext: params.fulltext,
|
|
379
|
+
selectedFacets: {
|
|
380
|
+
theme: themes ? themes : [],
|
|
381
|
+
keyword: keywords ? keywords : []
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA) {
|
|
386
|
+
const { fulltext: fulltext, selectedFacets: selectedFacets, sort: sort, sortOrder: sortOrder, page: page, pageSize: pageSize } = options;
|
|
387
|
+
let params = {
|
|
388
|
+
fulltext: fulltext ? fulltext : undefined,
|
|
389
|
+
...selectedFacets,
|
|
390
|
+
sort: sort ? sort : undefined,
|
|
391
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
392
|
+
page: page !== 1 ? page : undefined,
|
|
393
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
394
|
+
};
|
|
395
|
+
return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
396
|
+
arrayFormat: 'comma',
|
|
397
|
+
encode: false
|
|
398
|
+
})}`);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
const $844981eac9b63865$export$eccc29c8d0ff408 = (0, $hgUW1$createContext)({
|
|
405
|
+
ACA: undefined
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
|
|
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;
|
|
414
|
+
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
415
|
+
const defaultSortBy = "";
|
|
416
|
+
const defaultSortOrder = "";
|
|
417
|
+
const defaultPage = 1;
|
|
418
|
+
const location = (0, $hgUW1$useLocation)();
|
|
419
|
+
const transformedParams = (0, $eff7d34c30f5a0fc$export$60ec7cc1d341a524)(location.search, defaultSort);
|
|
420
|
+
const [currentResultNumbers, setCurrentResultNumbers] = (0, $hgUW1$useState)({
|
|
421
|
+
total: 0,
|
|
422
|
+
startingNumber: 0,
|
|
423
|
+
endingNumber: 0
|
|
424
|
+
});
|
|
425
|
+
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
426
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)('');
|
|
427
|
+
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
428
|
+
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
429
|
+
const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
|
|
430
|
+
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
431
|
+
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
432
|
+
const pageSize = defaultPageSize;
|
|
433
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
434
|
+
// Update browser URL with current search params
|
|
435
|
+
const params = buildSearchParams(true);
|
|
436
|
+
const url = new URL(window.location.href);
|
|
437
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${params}`);
|
|
438
|
+
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
439
|
+
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
440
|
+
const endingNumber = Number(pageSize) * Number(page);
|
|
441
|
+
setCurrentResultNumbers({
|
|
442
|
+
total: Number(totalItems),
|
|
443
|
+
startingNumber: Number(totalItems) >= startingNumber ? startingNumber : 0,
|
|
444
|
+
endingNumber: Number(totalItems) < endingNumber ? Number(totalItems) : endingNumber
|
|
445
|
+
});
|
|
446
|
+
setTimeout(()=>{
|
|
447
|
+
setAnnouncementText(`Showing ${startingNumber} to ${endingNumber} of ${totalItems} datasets`);
|
|
448
|
+
}, 100);
|
|
449
|
+
if (totalItems <= 0 && currentResultNumbers !== null) setNoResults(true);
|
|
450
|
+
else setNoResults(false);
|
|
451
|
+
}, [
|
|
452
|
+
totalItems,
|
|
453
|
+
pageSize,
|
|
454
|
+
page
|
|
455
|
+
]);
|
|
456
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
457
|
+
var params = buildSearchParams(true);
|
|
458
|
+
if (params !== location.search) setSearchParams(params);
|
|
459
|
+
}, [
|
|
460
|
+
page,
|
|
461
|
+
sort,
|
|
462
|
+
sortOrder
|
|
463
|
+
]);
|
|
464
|
+
function buildSearchParams(includePage) {
|
|
465
|
+
let newParams = {};
|
|
466
|
+
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
467
|
+
if (sort !== defaultSort.defaultSort) newParams.sort = sort;
|
|
468
|
+
if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
|
|
469
|
+
return (0, $hgUW1$qs).stringify(newParams, {
|
|
470
|
+
addQueryPrefix: includePage,
|
|
471
|
+
encode: true
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
let params = {
|
|
475
|
+
sort: sort ? sort : undefined,
|
|
476
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
477
|
+
page: page !== 1 ? page : undefined,
|
|
478
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
479
|
+
};
|
|
480
|
+
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
481
|
+
queryKey: [
|
|
482
|
+
"datasets",
|
|
483
|
+
params
|
|
484
|
+
],
|
|
485
|
+
queryFn: ()=>{
|
|
486
|
+
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
487
|
+
arrayFormat: 'comma',
|
|
488
|
+
encode: false
|
|
489
|
+
})}`);
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
if (data && data.data.total && totalItems != data.data.total) setTotalItems(data.data.total);
|
|
493
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
494
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
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), {
|
|
505
|
+
children: [
|
|
506
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("h3", {
|
|
507
|
+
children: "Test submenu list of new datasets."
|
|
508
|
+
}),
|
|
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",
|
|
536
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
537
|
+
className: "ds-u-margin-y--0",
|
|
538
|
+
"aria-hidden": "true",
|
|
539
|
+
children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
540
|
+
children: [
|
|
541
|
+
"Viewing ",
|
|
542
|
+
currentResultNumbers.endingNumber,
|
|
543
|
+
" of ",
|
|
544
|
+
data.data.total
|
|
545
|
+
]
|
|
546
|
+
})
|
|
547
|
+
})
|
|
548
|
+
})
|
|
549
|
+
})
|
|
550
|
+
]
|
|
551
|
+
})
|
|
552
|
+
})
|
|
553
|
+
})
|
|
554
|
+
})
|
|
555
|
+
});
|
|
556
|
+
};
|
|
557
|
+
var $9384a736d4d6f425$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039)($9384a736d4d6f425$var$DatasetListSubmenu);
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
const $4f153ca537d853e5$var$SubMenuStaticItem = (submenuArray, subLinkClasses)=>// @todo: Move into a separate component
|
|
564
|
+
submenuArray.map((s)=>{
|
|
565
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
566
|
+
children: s.external || s.drupalPage ? /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
567
|
+
href: s.url,
|
|
568
|
+
className: `ds-u-display-flex ds-u-align-items--center ${subLinkClasses}`,
|
|
569
|
+
children: [
|
|
570
|
+
s.icon ?? null,
|
|
571
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
572
|
+
children: s.label
|
|
573
|
+
})
|
|
574
|
+
]
|
|
575
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$NavLink), {
|
|
576
|
+
to: s.url,
|
|
577
|
+
className: `ds-u-display-flex ds-u-align-items--center ${subLinkClasses}`,
|
|
578
|
+
onClick: ()=>setIsExpanded(!isExpanded),
|
|
579
|
+
children: [
|
|
580
|
+
s.icon ?? null,
|
|
581
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
582
|
+
children: s.label
|
|
583
|
+
})
|
|
584
|
+
]
|
|
585
|
+
})
|
|
586
|
+
}, s.id);
|
|
587
|
+
});
|
|
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"
|
|
597
|
+
});
|
|
598
|
+
};
|
|
272
599
|
const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, subLinkClasses: subLinkClasses, wrapLabel: wrapLabel = true })=>{
|
|
273
|
-
const [
|
|
600
|
+
const [isExpanded1, setIsExpanded1] = (0, $hgUW1$useState)(false);
|
|
274
601
|
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
275
602
|
const innerHtml = wrapLabel ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
276
603
|
children: link.label
|
|
@@ -280,22 +607,27 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
280
607
|
let currentMenu = null;
|
|
281
608
|
if (menu.current) currentMenu = menu.current;
|
|
282
609
|
function handleClickOutside(event) {
|
|
283
|
-
if (currentMenu && !currentMenu.contains(event.target))
|
|
610
|
+
if (currentMenu && !currentMenu.contains(event.target)) setIsExpanded1(false);
|
|
284
611
|
}
|
|
285
612
|
function handleFocusOut(event) {
|
|
286
|
-
if (currentMenu && !currentMenu.contains(event.relatedTarget))
|
|
613
|
+
if (currentMenu && !currentMenu.contains(event.relatedTarget)) setIsExpanded1(false);
|
|
287
614
|
}
|
|
288
|
-
document.addEventListener(
|
|
289
|
-
currentMenu?.addEventListener(
|
|
615
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
616
|
+
currentMenu?.addEventListener('focusout', handleFocusOut);
|
|
290
617
|
return ()=>{
|
|
291
|
-
document.removeEventListener(
|
|
292
|
-
if (currentMenu) currentMenu.removeEventListener(
|
|
618
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
619
|
+
if (currentMenu) currentMenu.removeEventListener('focusout', handleFocusOut);
|
|
293
620
|
};
|
|
294
621
|
}, [
|
|
295
|
-
|
|
622
|
+
isExpanded1
|
|
296
623
|
]);
|
|
624
|
+
let submenuBlock;
|
|
625
|
+
if (link.submenu) {
|
|
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
|
+
}
|
|
297
629
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
298
|
-
className: `dkan-c-nav-submenu has-submenu${
|
|
630
|
+
className: `dkan-c-nav-submenu has-submenu${isExpanded1 ? ' open' : ''}`,
|
|
299
631
|
ref: menu,
|
|
300
632
|
children: [
|
|
301
633
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
@@ -303,43 +635,22 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
303
635
|
onDark: headerContext.onDark,
|
|
304
636
|
className: `${linkClasses}`,
|
|
305
637
|
"aria-haspopup": "true",
|
|
306
|
-
"aria-expanded":
|
|
638
|
+
"aria-expanded": isExpanded1,
|
|
307
639
|
onClick: (e)=>{
|
|
308
640
|
e.preventDefault();
|
|
309
|
-
|
|
641
|
+
setIsExpanded1(!isExpanded1);
|
|
310
642
|
},
|
|
311
643
|
children: [
|
|
312
644
|
innerHtml,
|
|
313
645
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
|
|
314
646
|
className: "ds-u-margin-left--1",
|
|
315
|
-
direction:
|
|
647
|
+
direction: isExpanded1 ? "down" : "right"
|
|
316
648
|
})
|
|
317
649
|
]
|
|
318
650
|
}),
|
|
319
651
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
320
652
|
className: "dkan-c-site-menu--sub-menu",
|
|
321
|
-
children:
|
|
322
|
-
children: s.external || s.drupalPage ? /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
323
|
-
href: s.url,
|
|
324
|
-
className: `ds-u-display-flex ds-u-align-items--center ${subLinkClasses}`,
|
|
325
|
-
children: [
|
|
326
|
-
s.icon ?? null,
|
|
327
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
328
|
-
children: s.label
|
|
329
|
-
})
|
|
330
|
-
]
|
|
331
|
-
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$NavLink), {
|
|
332
|
-
to: s.url,
|
|
333
|
-
className: `ds-u-display-flex ds-u-align-items--center ${subLinkClasses}`,
|
|
334
|
-
onClick: ()=>setIsExpanded(!isExpanded),
|
|
335
|
-
children: [
|
|
336
|
-
s.icon ?? null,
|
|
337
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
338
|
-
children: s.label
|
|
339
|
-
})
|
|
340
|
-
]
|
|
341
|
-
})
|
|
342
|
-
}, s.id))
|
|
653
|
+
children: submenuBlock
|
|
343
654
|
})
|
|
344
655
|
]
|
|
345
656
|
});
|
|
@@ -355,12 +666,12 @@ var $4f153ca537d853e5$export$2e2bcd8739ae039 = $4f153ca537d853e5$var$SubMenu;
|
|
|
355
666
|
const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
|
|
356
667
|
const { headingText: headingText = "Dataset Search" } = props;
|
|
357
668
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
358
|
-
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)(
|
|
669
|
+
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)('');
|
|
359
670
|
const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
|
|
360
671
|
function searchForDataset(e) {
|
|
361
672
|
e.preventDefault();
|
|
362
673
|
if (window) {
|
|
363
|
-
if (window.location.pathname !==
|
|
674
|
+
if (window.location.pathname !== '/datasets') navigate(`/datasets?fulltext=${modalSearchTerm}`);
|
|
364
675
|
else {
|
|
365
676
|
window.location.search = `fulltext=${modalSearchTerm}`;
|
|
366
677
|
setModalSearch(false);
|
|
@@ -427,9 +738,9 @@ const $b939b31651e82908$var$HeaderNav = (props)=>{
|
|
|
427
738
|
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
428
739
|
const { links: links, topNavLinks: topNavLinks, wrapperClasses: wrapperClasses, searchInMobile: searchInMobile } = props;
|
|
429
740
|
const navMenuOpenClass = `dkan-c-nav-menu--${headerContext.mobileMenuOpen ? "open" : "close"}`;
|
|
430
|
-
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ?
|
|
431
|
-
const linkClasses =
|
|
432
|
-
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 ';
|
|
433
744
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
434
745
|
className: `dkan-c-nav-menu ${wrapperClasses} ${navMenuOpenClass} ${isMobileClass}`,
|
|
435
746
|
ref: headerContext.menuRef,
|
|
@@ -599,8 +910,8 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
599
910
|
const { title: title, links: links, mobileMax: mobileMax } = props;
|
|
600
911
|
const active = (0, $hgUW1$useLocation)().pathname;
|
|
601
912
|
const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
|
|
602
|
-
const styleClasses =
|
|
603
|
-
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'}`;
|
|
604
915
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
605
916
|
className: `dkan-c-sidebar-nav ${mobileClass}`,
|
|
606
917
|
children: [
|
|
@@ -614,7 +925,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
614
925
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
615
926
|
"aria-haspopup": "true",
|
|
616
927
|
variation: "ghost",
|
|
617
|
-
"aria-expanded": `${menuOpen ?
|
|
928
|
+
"aria-expanded": `${menuOpen ? 'true' : 'false'}`,
|
|
618
929
|
onDark: true,
|
|
619
930
|
onClick: ()=>setMenuOpen(!menuOpen),
|
|
620
931
|
children: [
|
|
@@ -623,7 +934,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
623
934
|
children: "Toggle menu"
|
|
624
935
|
}),
|
|
625
936
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
|
|
626
|
-
direction: menuOpen ?
|
|
937
|
+
direction: menuOpen ? 'up' : 'down'
|
|
627
938
|
})
|
|
628
939
|
]
|
|
629
940
|
})
|
|
@@ -632,7 +943,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
632
943
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
633
944
|
className: ``,
|
|
634
945
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
|
|
635
|
-
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'}`,
|
|
636
947
|
children: [
|
|
637
948
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
638
949
|
className: "ds-u-padding--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest",
|
|
@@ -644,7 +955,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
644
955
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
645
956
|
className: "ds-u-padding-bottom--2",
|
|
646
957
|
children: links.map(({ url: url, label: label })=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
647
|
-
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' : ''}`,
|
|
648
959
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
649
960
|
className: "ds-u-display--flex ds-u-padding-y--1",
|
|
650
961
|
children: [
|
|
@@ -679,12 +990,12 @@ const $b0968edc60d7d3a4$var$SidebarPage = (props)=>{
|
|
|
679
990
|
query: `(max-width: ${mobileMaxWidth}px)`
|
|
680
991
|
});
|
|
681
992
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
682
|
-
className: `${mobileMax ? "a" :
|
|
993
|
+
className: `${mobileMax ? "a" : 'ds-l-container'}`,
|
|
683
994
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
684
|
-
className: `${mobileMax ? "a" :
|
|
995
|
+
className: `${mobileMax ? "a" : 'ds-l-row'}`,
|
|
685
996
|
children: [
|
|
686
997
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
687
|
-
className: `${mobileMax ?
|
|
998
|
+
className: `${mobileMax ? 'a' : "ds-l-col--4"}`,
|
|
688
999
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $953b286f7778640e$export$2e2bcd8739ae039), {
|
|
689
1000
|
links: links,
|
|
690
1001
|
title: menuTitle,
|
|
@@ -707,9 +1018,9 @@ var $b0968edc60d7d3a4$export$2e2bcd8739ae039 = $b0968edc60d7d3a4$var$SidebarPage
|
|
|
707
1018
|
|
|
708
1019
|
|
|
709
1020
|
|
|
710
|
-
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' })=>{
|
|
711
1022
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
712
|
-
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState(
|
|
1023
|
+
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState('');
|
|
713
1024
|
function submitHero(e) {
|
|
714
1025
|
e.preventDefault();
|
|
715
1026
|
navigate(`/${searchUrl}?${searchKey}=${searchValue}`);
|
|
@@ -736,24 +1047,24 @@ const $59a079354baa335c$var$Hero = ({ title: title, description: description, se
|
|
|
736
1047
|
onSubmit: (e)=>submitHero(e),
|
|
737
1048
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
738
1049
|
style: {
|
|
739
|
-
position:
|
|
1050
|
+
position: 'relative'
|
|
740
1051
|
},
|
|
741
1052
|
className: "ds-l-row ds-u-align-items--stretch ds-u-margin-y--4 ds-u-flex-wrap--nowrap",
|
|
742
1053
|
children: [
|
|
743
1054
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
744
1055
|
className: "ds-u-padding--0 ds-u-margin-right--1",
|
|
745
1056
|
style: {
|
|
746
|
-
flex:
|
|
747
|
-
maxWidth:
|
|
1057
|
+
flex: '1 1 100%',
|
|
1058
|
+
maxWidth: '100%'
|
|
748
1059
|
},
|
|
749
1060
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
750
1061
|
label: textfieldLabel,
|
|
751
1062
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
752
1063
|
name: "search_text_input",
|
|
753
1064
|
style: {
|
|
754
|
-
maxWidth:
|
|
755
|
-
height:
|
|
756
|
-
margin:
|
|
1065
|
+
maxWidth: 'none',
|
|
1066
|
+
height: '61px',
|
|
1067
|
+
margin: '0 20px 0 0'
|
|
757
1068
|
},
|
|
758
1069
|
onChange: (e)=>setSearchValue(e.target.value)
|
|
759
1070
|
})
|
|
@@ -795,7 +1106,7 @@ var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
|
|
|
795
1106
|
|
|
796
1107
|
const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
797
1108
|
switch(props.id){
|
|
798
|
-
case
|
|
1109
|
+
case 'overview':
|
|
799
1110
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
800
1111
|
width: "16px",
|
|
801
1112
|
height: "16px",
|
|
@@ -837,7 +1148,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
837
1148
|
})
|
|
838
1149
|
]
|
|
839
1150
|
});
|
|
840
|
-
case
|
|
1151
|
+
case 'data-table':
|
|
841
1152
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
842
1153
|
width: "16px",
|
|
843
1154
|
height: "12px",
|
|
@@ -869,7 +1180,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
869
1180
|
})
|
|
870
1181
|
]
|
|
871
1182
|
});
|
|
872
|
-
case
|
|
1183
|
+
case 'api':
|
|
873
1184
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
874
1185
|
width: "16px",
|
|
875
1186
|
height: "13px",
|
|
@@ -901,7 +1212,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
901
1212
|
})
|
|
902
1213
|
]
|
|
903
1214
|
});
|
|
904
|
-
case
|
|
1215
|
+
case 'download':
|
|
905
1216
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
906
1217
|
width: "16px",
|
|
907
1218
|
height: "16px",
|
|
@@ -930,7 +1241,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
930
1241
|
})
|
|
931
1242
|
]
|
|
932
1243
|
});
|
|
933
|
-
case
|
|
1244
|
+
case 'data-dictionary':
|
|
934
1245
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
935
1246
|
width: "14px",
|
|
936
1247
|
height: "16px",
|
|
@@ -1029,14 +1340,14 @@ var $b61856b23f5f58a2$export$2e2bcd8739ae039 = $b61856b23f5f58a2$var$LargeFileDi
|
|
|
1029
1340
|
|
|
1030
1341
|
|
|
1031
1342
|
const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date, options: options = {
|
|
1032
|
-
year:
|
|
1033
|
-
month:
|
|
1034
|
-
day:
|
|
1035
|
-
timeZone:
|
|
1343
|
+
year: 'numeric',
|
|
1344
|
+
month: 'long',
|
|
1345
|
+
day: 'numeric',
|
|
1346
|
+
timeZone: 'UTC'
|
|
1036
1347
|
} })=>{
|
|
1037
1348
|
const rawDate = new Date(date);
|
|
1038
|
-
let modifiedDate =
|
|
1039
|
-
if (rawDate) modifiedDate = rawDate.toLocaleDateString(
|
|
1349
|
+
let modifiedDate = '';
|
|
1350
|
+
if (rawDate) modifiedDate = rawDate.toLocaleDateString('en-US', options);
|
|
1040
1351
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
1041
1352
|
children: modifiedDate
|
|
1042
1353
|
});
|
|
@@ -1048,13 +1359,13 @@ var $bd76a91923d7e8a7$export$2e2bcd8739ae039 = $bd76a91923d7e8a7$var$Transformed
|
|
|
1048
1359
|
|
|
1049
1360
|
|
|
1050
1361
|
function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240) {
|
|
1051
|
-
if (!textString) return
|
|
1362
|
+
if (!textString) return '';
|
|
1052
1363
|
let cleanedText = textString;
|
|
1053
|
-
if (cleanedText.split(
|
|
1054
|
-
if (cleanedText.split(
|
|
1364
|
+
if (cleanedText.split('</p>').length > 1) cleanedText = cleanedText.split('</p>')[0];
|
|
1365
|
+
if (cleanedText.split('<br/>').length > 1) cleanedText = cleanedText.split('<br/>')[0];
|
|
1055
1366
|
cleanedText = (0, $hgUW1$lodashtruncate)(cleanedText, {
|
|
1056
|
-
|
|
1057
|
-
|
|
1367
|
+
'length': textLength,
|
|
1368
|
+
'separator': ' '
|
|
1058
1369
|
});
|
|
1059
1370
|
return (0, $hgUW1$dompurify).sanitize(cleanedText, {
|
|
1060
1371
|
ALLOWED_TAGS: []
|
|
@@ -1068,25 +1379,25 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1068
1379
|
minWidth: 1024
|
|
1069
1380
|
});
|
|
1070
1381
|
const { title: title, modified: modified, description: description, identifier: identifier, downloadUrl: downloadUrl, largeFile: largeFile = false, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
|
|
1071
|
-
let linkContainerClasses =
|
|
1072
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1073
|
-
else linkContainerClasses +=
|
|
1074
|
-
let linkClasses =
|
|
1382
|
+
let linkContainerClasses = 'ds-u-margin-bottom--2';
|
|
1383
|
+
if (dataDictionaryLinks) linkContainerClasses += ' ds-l-col--6 ds-u-padding-right--0';
|
|
1384
|
+
else linkContainerClasses += ' ds-l-col--auto ds-u-padding-left--0';
|
|
1385
|
+
let linkClasses = 'ds-u-display--block ds-u-text-align--left';
|
|
1075
1386
|
if (desktop) {
|
|
1076
|
-
linkContainerClasses =
|
|
1077
|
-
linkClasses +=
|
|
1387
|
+
linkContainerClasses = 'ds-u-padding-x--0';
|
|
1388
|
+
linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
|
|
1078
1389
|
}
|
|
1079
1390
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1080
1391
|
className: "dc-c-search-list-item ds-u-padding-top--3",
|
|
1081
1392
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1082
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1393
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? 'ds-u-border-top--1' : 'ds-u-border-bottom--1 ds-u-padding-bottom--3'}`,
|
|
1083
1394
|
children: [
|
|
1084
1395
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1085
1396
|
className: "ds-l-row ds-u-align-items--start",
|
|
1086
1397
|
children: [
|
|
1087
1398
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1088
1399
|
id: `dataset-${identifier}-updated-date`,
|
|
1089
|
-
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ?
|
|
1400
|
+
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? 'ds-u-padding-top--2' : 'ds-u-padding-top--0'}`,
|
|
1090
1401
|
children: [
|
|
1091
1402
|
"Updated ",
|
|
1092
1403
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
@@ -1128,9 +1439,9 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1128
1439
|
"Download"
|
|
1129
1440
|
]
|
|
1130
1441
|
})
|
|
1131
|
-
}) :
|
|
1442
|
+
}) : '',
|
|
1132
1443
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("ul", {
|
|
1133
|
-
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 ?
|
|
1444
|
+
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' : ''}`,
|
|
1134
1445
|
children: [
|
|
1135
1446
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1136
1447
|
className: linkContainerClasses,
|
|
@@ -1176,7 +1487,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1176
1487
|
]
|
|
1177
1488
|
})
|
|
1178
1489
|
})
|
|
1179
|
-
}) :
|
|
1490
|
+
}) : '',
|
|
1180
1491
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1181
1492
|
className: linkContainerClasses,
|
|
1182
1493
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -1207,6 +1518,82 @@ var $52c6454cae137465$export$2e2bcd8739ae039 = $52c6454cae137465$var$DatasetSear
|
|
|
1207
1518
|
|
|
1208
1519
|
|
|
1209
1520
|
|
|
1521
|
+
const $c068004d499082cc$var$DatasetListItem = (props)=>{
|
|
1522
|
+
const desktop = (0, $hgUW1$useMediaQuery)({
|
|
1523
|
+
minWidth: 1024
|
|
1524
|
+
});
|
|
1525
|
+
const { title: title, modified: modified, description: description, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
|
|
1526
|
+
let linkContainerClasses = 'ds-u-margin-bottom--2';
|
|
1527
|
+
if (dataDictionaryLinks) linkContainerClasses += ' ds-l-col--6 ds-u-padding-right--0';
|
|
1528
|
+
else linkContainerClasses += ' ds-l-col--auto ds-u-padding-left--0';
|
|
1529
|
+
let linkClasses = 'ds-u-display--block ds-u-text-align--left';
|
|
1530
|
+
if (desktop) {
|
|
1531
|
+
linkContainerClasses = 'ds-u-padding-x--0';
|
|
1532
|
+
linkClasses += ' ds-l-col--4 ds-l-md-col--auto';
|
|
1533
|
+
}
|
|
1534
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1535
|
+
className: "dc-c-list-item ds-u-padding-top--4",
|
|
1536
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1537
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? 'ds-u-border-top--1' : 'ds-u-border-bottom--1 ds-u-padding-bottom--3'}`,
|
|
1538
|
+
children: [
|
|
1539
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1540
|
+
className: "ds-l-row ds-u-align-items--start",
|
|
1541
|
+
children: [
|
|
1542
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1543
|
+
id: `dataset-${identifier}-updated-date`,
|
|
1544
|
+
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'}`,
|
|
1545
|
+
children: [
|
|
1546
|
+
"Updated ",
|
|
1547
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
1548
|
+
date: modified
|
|
1549
|
+
})
|
|
1550
|
+
]
|
|
1551
|
+
}),
|
|
1552
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
1553
|
+
className: "ds-l-col--12 ds-text-heading--2xl",
|
|
1554
|
+
children: title
|
|
1555
|
+
})
|
|
1556
|
+
]
|
|
1557
|
+
}),
|
|
1558
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1559
|
+
className: "ds-l-row",
|
|
1560
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1561
|
+
className: "ds-l-col--12 ds-l-md-col--12 ds-u-margin-top--2",
|
|
1562
|
+
children: [
|
|
1563
|
+
"The ",
|
|
1564
|
+
title,
|
|
1565
|
+
" dataset was updated."
|
|
1566
|
+
]
|
|
1567
|
+
})
|
|
1568
|
+
}),
|
|
1569
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1570
|
+
className: "ds-l-row",
|
|
1571
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1572
|
+
className: "ds-l-col--12",
|
|
1573
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
1574
|
+
"aria-describedby": `dataset-${identifier}-updated-date`,
|
|
1575
|
+
to: `/dataset/${identifier}`,
|
|
1576
|
+
children: [
|
|
1577
|
+
"View the Dataset for ",
|
|
1578
|
+
title,
|
|
1579
|
+
" "
|
|
1580
|
+
]
|
|
1581
|
+
})
|
|
1582
|
+
})
|
|
1583
|
+
})
|
|
1584
|
+
]
|
|
1585
|
+
})
|
|
1586
|
+
});
|
|
1587
|
+
};
|
|
1588
|
+
var $c068004d499082cc$export$2e2bcd8739ae039 = $c068004d499082cc$var$DatasetListItem;
|
|
1589
|
+
|
|
1590
|
+
|
|
1591
|
+
|
|
1592
|
+
|
|
1593
|
+
|
|
1594
|
+
|
|
1595
|
+
|
|
1596
|
+
|
|
1210
1597
|
const $789279954d8eff7f$var$ApiDocumentation = ({ endpoint: endpoint })=>{
|
|
1211
1598
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1212
1599
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
@@ -1228,7 +1615,7 @@ var $789279954d8eff7f$export$2e2bcd8739ae039 = $789279954d8eff7f$var$ApiDocument
|
|
|
1228
1615
|
|
|
1229
1616
|
|
|
1230
1617
|
|
|
1231
|
-
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className =
|
|
1618
|
+
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className = 'data-table-results' })=>{
|
|
1232
1619
|
const numTotalRows = totalRows;
|
|
1233
1620
|
if (numTotalRows === 0) return /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1234
1621
|
className: className,
|
|
@@ -1246,18 +1633,18 @@ const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limi
|
|
|
1246
1633
|
className: className,
|
|
1247
1634
|
children: [
|
|
1248
1635
|
"Displaying",
|
|
1249
|
-
|
|
1636
|
+
' ',
|
|
1250
1637
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1251
1638
|
className: "ds-u-font-weight--bold",
|
|
1252
1639
|
children: `${startTotal().toLocaleString()} - ${ofTotal().toLocaleString()}`
|
|
1253
1640
|
}),
|
|
1254
|
-
|
|
1641
|
+
' ',
|
|
1255
1642
|
"of ",
|
|
1256
1643
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1257
1644
|
className: "ds-u-font-weight--bold",
|
|
1258
1645
|
children: `${numTotalRows.toLocaleString()}`
|
|
1259
1646
|
}),
|
|
1260
|
-
|
|
1647
|
+
' ',
|
|
1261
1648
|
"results"
|
|
1262
1649
|
]
|
|
1263
1650
|
});
|
|
@@ -1283,16 +1670,16 @@ const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePaddi
|
|
|
1283
1670
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
1284
1671
|
options: [
|
|
1285
1672
|
{
|
|
1286
|
-
label:
|
|
1287
|
-
value:
|
|
1673
|
+
label: 'Tight',
|
|
1674
|
+
value: 'ds-u-padding-y--0'
|
|
1288
1675
|
},
|
|
1289
1676
|
{
|
|
1290
|
-
label:
|
|
1291
|
-
value:
|
|
1677
|
+
label: 'Normal',
|
|
1678
|
+
value: 'ds-u-padding-y--1'
|
|
1292
1679
|
},
|
|
1293
1680
|
{
|
|
1294
|
-
label:
|
|
1295
|
-
value:
|
|
1681
|
+
label: 'Expanded',
|
|
1682
|
+
value: 'ds-u-padding-y--2'
|
|
1296
1683
|
}
|
|
1297
1684
|
],
|
|
1298
1685
|
label: "Display density:",
|
|
@@ -1535,7 +1922,7 @@ function $aa4450dcbeef3ac0$export$385a5aba38cc3325(sortArray) {
|
|
|
1535
1922
|
sortArray.forEach((s)=>{
|
|
1536
1923
|
return newQuery.push({
|
|
1537
1924
|
property: s.id,
|
|
1538
|
-
order: s.desc ?
|
|
1925
|
+
order: s.desc ? 'desc' : 'asc'
|
|
1539
1926
|
});
|
|
1540
1927
|
});
|
|
1541
1928
|
return newQuery;
|
|
@@ -1573,103 +1960,103 @@ function $7264a673914aa746$export$e284ae5d89467c8f(date) {
|
|
|
1573
1960
|
}
|
|
1574
1961
|
function $7264a673914aa746$export$6b5e57d20078142b(value, operator) {
|
|
1575
1962
|
let newValue = value;
|
|
1576
|
-
if (Array.isArray(newValue)) newValue = newValue.join(
|
|
1963
|
+
if (Array.isArray(newValue)) newValue = newValue.join(',');
|
|
1577
1964
|
// return newValue.replace(/(^\%+|\%+$)/gm, '');
|
|
1578
1965
|
return newValue;
|
|
1579
1966
|
}
|
|
1580
1967
|
const $7264a673914aa746$export$5f89a5ae87bc48e1 = [
|
|
1581
1968
|
{
|
|
1582
|
-
label:
|
|
1583
|
-
value:
|
|
1969
|
+
label: 'Is',
|
|
1970
|
+
value: '='
|
|
1584
1971
|
},
|
|
1585
1972
|
{
|
|
1586
|
-
label:
|
|
1587
|
-
value:
|
|
1973
|
+
label: 'Starts With',
|
|
1974
|
+
value: 'starts with'
|
|
1588
1975
|
},
|
|
1589
1976
|
{
|
|
1590
|
-
label:
|
|
1591
|
-
value:
|
|
1977
|
+
label: 'Contains',
|
|
1978
|
+
value: 'contains'
|
|
1592
1979
|
},
|
|
1593
1980
|
{
|
|
1594
|
-
label:
|
|
1595
|
-
value:
|
|
1981
|
+
label: 'Is Not',
|
|
1982
|
+
value: '<>'
|
|
1596
1983
|
},
|
|
1597
1984
|
{
|
|
1598
|
-
label:
|
|
1599
|
-
value:
|
|
1985
|
+
label: 'Or',
|
|
1986
|
+
value: 'in'
|
|
1600
1987
|
},
|
|
1601
1988
|
{
|
|
1602
|
-
label:
|
|
1603
|
-
value:
|
|
1989
|
+
label: 'Is',
|
|
1990
|
+
value: '='
|
|
1604
1991
|
},
|
|
1605
1992
|
{
|
|
1606
|
-
label:
|
|
1607
|
-
value:
|
|
1993
|
+
label: 'Is Not',
|
|
1994
|
+
value: '<>'
|
|
1608
1995
|
},
|
|
1609
1996
|
{
|
|
1610
|
-
label:
|
|
1611
|
-
value:
|
|
1997
|
+
label: 'Greater Than',
|
|
1998
|
+
value: '>'
|
|
1612
1999
|
},
|
|
1613
2000
|
{
|
|
1614
|
-
label:
|
|
1615
|
-
value:
|
|
2001
|
+
label: 'Less Than',
|
|
2002
|
+
value: '<'
|
|
1616
2003
|
}
|
|
1617
2004
|
];
|
|
1618
2005
|
function $7264a673914aa746$export$2b9377795161999(type) {
|
|
1619
2006
|
switch(type){
|
|
1620
|
-
case
|
|
1621
|
-
case
|
|
2007
|
+
case 'text':
|
|
2008
|
+
case 'string':
|
|
1622
2009
|
return [
|
|
1623
2010
|
{
|
|
1624
|
-
label:
|
|
1625
|
-
value:
|
|
2011
|
+
label: 'Is',
|
|
2012
|
+
value: '='
|
|
1626
2013
|
},
|
|
1627
2014
|
{
|
|
1628
|
-
label:
|
|
1629
|
-
value:
|
|
2015
|
+
label: 'Starts With',
|
|
2016
|
+
value: 'starts with'
|
|
1630
2017
|
},
|
|
1631
2018
|
{
|
|
1632
|
-
label:
|
|
1633
|
-
value:
|
|
2019
|
+
label: 'Contains',
|
|
2020
|
+
value: 'contains'
|
|
1634
2021
|
},
|
|
1635
2022
|
{
|
|
1636
|
-
label:
|
|
1637
|
-
value:
|
|
2023
|
+
label: 'Is Not',
|
|
2024
|
+
value: '<>'
|
|
1638
2025
|
},
|
|
1639
2026
|
{
|
|
1640
|
-
label:
|
|
1641
|
-
value:
|
|
2027
|
+
label: 'Or',
|
|
2028
|
+
value: 'in'
|
|
1642
2029
|
}
|
|
1643
2030
|
];
|
|
1644
|
-
case
|
|
2031
|
+
case 'date':
|
|
1645
2032
|
return [
|
|
1646
2033
|
{
|
|
1647
|
-
label:
|
|
1648
|
-
value:
|
|
2034
|
+
label: 'Is',
|
|
2035
|
+
value: '='
|
|
1649
2036
|
},
|
|
1650
2037
|
{
|
|
1651
|
-
label:
|
|
1652
|
-
value:
|
|
2038
|
+
label: 'Is Not',
|
|
2039
|
+
value: '<>'
|
|
1653
2040
|
},
|
|
1654
2041
|
{
|
|
1655
|
-
label:
|
|
1656
|
-
value:
|
|
2042
|
+
label: 'Greater Than',
|
|
2043
|
+
value: '>'
|
|
1657
2044
|
},
|
|
1658
2045
|
{
|
|
1659
|
-
label:
|
|
1660
|
-
value:
|
|
2046
|
+
label: 'Less Than',
|
|
2047
|
+
value: '<'
|
|
1661
2048
|
}
|
|
1662
2049
|
];
|
|
1663
2050
|
default:
|
|
1664
2051
|
// These 2 should be safe for all data types
|
|
1665
2052
|
return [
|
|
1666
2053
|
{
|
|
1667
|
-
label:
|
|
1668
|
-
value:
|
|
2054
|
+
label: 'Is',
|
|
2055
|
+
value: '='
|
|
1669
2056
|
},
|
|
1670
2057
|
{
|
|
1671
|
-
label:
|
|
1672
|
-
value:
|
|
2058
|
+
label: 'Is Not',
|
|
2059
|
+
value: '<>'
|
|
1673
2060
|
}
|
|
1674
2061
|
];
|
|
1675
2062
|
}
|
|
@@ -1686,7 +2073,7 @@ function $7264a673914aa746$export$2b9377795161999(type) {
|
|
|
1686
2073
|
|
|
1687
2074
|
|
|
1688
2075
|
const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: header, sortElement: sortElement, setAriaLiveFeedback: setAriaLiveFeedback })=>{
|
|
1689
|
-
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)(
|
|
2076
|
+
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)('');
|
|
1690
2077
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("th", {
|
|
1691
2078
|
key: header.id,
|
|
1692
2079
|
style: {
|
|
@@ -1699,13 +2086,13 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
1699
2086
|
children: [
|
|
1700
2087
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1701
2088
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1702
|
-
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header :
|
|
2089
|
+
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : '',
|
|
1703
2090
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
1704
2091
|
})
|
|
1705
2092
|
}),
|
|
1706
2093
|
sortElement && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
1707
2094
|
onClick: header.column.getToggleSortingHandler(),
|
|
1708
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
2095
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : '',
|
|
1709
2096
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
1710
2097
|
})
|
|
1711
2098
|
]
|
|
@@ -1713,18 +2100,18 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
1713
2100
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
1714
2101
|
onMouseDown: header.getResizeHandler(),
|
|
1715
2102
|
onTouchStart: header.getResizeHandler(),
|
|
1716
|
-
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ?
|
|
2103
|
+
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ? 'isResizing' : ''}`,
|
|
1717
2104
|
"aria-label": `Resize ${header.column.columnDef.header} column`,
|
|
1718
2105
|
onKeyDown: (e)=>{
|
|
1719
2106
|
const columnSizingObject = table.getState().columnSizing;
|
|
1720
2107
|
switch(e.key){
|
|
1721
|
-
case
|
|
1722
|
-
case
|
|
2108
|
+
case 'Enter':
|
|
2109
|
+
case ' ':
|
|
1723
2110
|
e.preventDefault();
|
|
1724
2111
|
e.stopPropagation();
|
|
1725
2112
|
if (columnResizing) {
|
|
1726
2113
|
// end resizing
|
|
1727
|
-
setColumnResizing(
|
|
2114
|
+
setColumnResizing('');
|
|
1728
2115
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
1729
2116
|
} else {
|
|
1730
2117
|
// start resizing
|
|
@@ -1732,13 +2119,13 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
1732
2119
|
setAriaLiveFeedback(`${header.column.columnDef.header} grabbed.`);
|
|
1733
2120
|
}
|
|
1734
2121
|
break;
|
|
1735
|
-
case
|
|
2122
|
+
case 'Escape':
|
|
1736
2123
|
if (columnResizing) {
|
|
1737
|
-
setColumnResizing(
|
|
2124
|
+
setColumnResizing('');
|
|
1738
2125
|
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
1739
2126
|
}
|
|
1740
2127
|
break;
|
|
1741
|
-
case
|
|
2128
|
+
case 'ArrowRight':
|
|
1742
2129
|
e.preventDefault();
|
|
1743
2130
|
e.stopPropagation();
|
|
1744
2131
|
if (columnResizing) {
|
|
@@ -1747,7 +2134,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
1747
2134
|
setAriaLiveFeedback(`${header.column.columnDef.header} has been resized. The new width is ${header.getSize()} pixels.`);
|
|
1748
2135
|
}
|
|
1749
2136
|
break;
|
|
1750
|
-
case
|
|
2137
|
+
case 'ArrowLeft':
|
|
1751
2138
|
e.preventDefault();
|
|
1752
2139
|
e.stopPropagation();
|
|
1753
2140
|
if (columnResizing) {
|
|
@@ -1759,7 +2146,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
1759
2146
|
}
|
|
1760
2147
|
},
|
|
1761
2148
|
onBlur: ()=>{
|
|
1762
|
-
setColumnResizing(
|
|
2149
|
+
setColumnResizing('');
|
|
1763
2150
|
}
|
|
1764
2151
|
})
|
|
1765
2152
|
]
|
|
@@ -1808,7 +2195,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
1808
2195
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
1809
2196
|
}),
|
|
1810
2197
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1811
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` :
|
|
2198
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` : ''
|
|
1812
2199
|
})
|
|
1813
2200
|
]
|
|
1814
2201
|
})
|
|
@@ -1844,9 +2231,9 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
1844
2231
|
transition: transition,
|
|
1845
2232
|
opacity: isDragging ? 0.7 : 1,
|
|
1846
2233
|
zIndex: isDragging ? 1 : 0,
|
|
1847
|
-
position:
|
|
1848
|
-
background:
|
|
1849
|
-
touchAction:
|
|
2234
|
+
position: 'relative',
|
|
2235
|
+
background: 'white',
|
|
2236
|
+
touchAction: 'none'
|
|
1850
2237
|
};
|
|
1851
2238
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
1852
2239
|
className: "ds-u-display--flex ds-u-justify-content--between ds-u-border-bottom--1",
|
|
@@ -1861,7 +2248,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
1861
2248
|
// this code forces the repaint without user interaction
|
|
1862
2249
|
const target = e.target;
|
|
1863
2250
|
if (isDragging && target.tagName.toLowerCase() === "label") setTimeout(()=>{
|
|
1864
|
-
target.parentNode.querySelector(
|
|
2251
|
+
target.parentNode.querySelector('input').checked = visible;
|
|
1865
2252
|
}, 1);
|
|
1866
2253
|
},
|
|
1867
2254
|
children: [
|
|
@@ -1878,7 +2265,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
1878
2265
|
}
|
|
1879
2266
|
}),
|
|
1880
2267
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
1881
|
-
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging &&
|
|
2268
|
+
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && 'grabbed'}`,
|
|
1882
2269
|
"aria-label": `Reorder ${id} column`,
|
|
1883
2270
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1884
2271
|
className: "fa fa-sort"
|
|
@@ -1900,7 +2287,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor extends (0, $hgUW1$Key
|
|
|
1900
2287
|
// Custom function to exclude checkbox from keyboard dragging
|
|
1901
2288
|
static activators = [
|
|
1902
2289
|
{
|
|
1903
|
-
eventName:
|
|
2290
|
+
eventName: 'onKeyDown',
|
|
1904
2291
|
handler: ({ nativeEvent: event })=>{
|
|
1905
2292
|
// prevent scrolling the list
|
|
1906
2293
|
const isCheckbox = [
|
|
@@ -1923,7 +2310,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$Poin
|
|
|
1923
2310
|
// Custom function to stop accidental checkbox clicks on pointer activation
|
|
1924
2311
|
static activators = [
|
|
1925
2312
|
{
|
|
1926
|
-
eventName:
|
|
2313
|
+
eventName: 'onPointerDown',
|
|
1927
2314
|
handler: ({ nativeEvent: event })=>{
|
|
1928
2315
|
if (event.target.tagName.toLowerCase() === "input") return false;
|
|
1929
2316
|
if (event.target.tagName.toLowerCase() === "label") event.target.blur();
|
|
@@ -1991,7 +2378,7 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
1991
2378
|
}));
|
|
1992
2379
|
};
|
|
1993
2380
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1994
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2381
|
+
className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
|
|
1995
2382
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
|
|
1996
2383
|
heading: "Manage columns",
|
|
1997
2384
|
isOpen: modalOpen,
|
|
@@ -2325,12 +2712,12 @@ const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions, schema: sche
|
|
|
2325
2712
|
className: "ds-u-font-weight--bold",
|
|
2326
2713
|
children: description
|
|
2327
2714
|
}),
|
|
2328
|
-
|
|
2715
|
+
' ',
|
|
2329
2716
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2330
2717
|
className: "ds-u-font-weight--normal",
|
|
2331
2718
|
children: operator.label.toUpperCase()
|
|
2332
2719
|
}),
|
|
2333
|
-
|
|
2720
|
+
' ',
|
|
2334
2721
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2335
2722
|
className: "ds-u-color--success",
|
|
2336
2723
|
children: formattedText
|
|
@@ -2360,7 +2747,7 @@ var $bef7bff2823feea2$export$2e2bcd8739ae039 = $bef7bff2823feea2$var$QueryTitle;
|
|
|
2360
2747
|
|
|
2361
2748
|
|
|
2362
2749
|
function $6369abf590ca298f$var$getStartDate(condition, schema, id) {
|
|
2363
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2750
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
2364
2751
|
const newDate = new Date(condition.value.toString());
|
|
2365
2752
|
if (newDate instanceof Date && !isNaN(newDate.getTime())) return newDate;
|
|
2366
2753
|
}
|
|
@@ -2376,9 +2763,9 @@ const $6369abf590ca298f$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
2376
2763
|
});
|
|
2377
2764
|
(0, $hgUW1$useEffect)(()=>{
|
|
2378
2765
|
if (property !== condition.property) {
|
|
2379
|
-
if (property) update(index,
|
|
2380
|
-
else update(index,
|
|
2381
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2766
|
+
if (property) update(index, 'property', property);
|
|
2767
|
+
else update(index, 'property', '');
|
|
2768
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
2382
2769
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
2383
2770
|
}
|
|
2384
2771
|
}
|
|
@@ -2392,16 +2779,16 @@ const $6369abf590ca298f$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
2392
2779
|
]);
|
|
2393
2780
|
(0, $hgUW1$useEffect)(()=>{
|
|
2394
2781
|
if (operator !== condition.operator) {
|
|
2395
|
-
if (operator) update(index,
|
|
2396
|
-
else update(index,
|
|
2782
|
+
if (operator) update(index, 'operator', operator);
|
|
2783
|
+
else update(index, 'operator', '');
|
|
2397
2784
|
}
|
|
2398
2785
|
}, [
|
|
2399
2786
|
operator
|
|
2400
2787
|
]);
|
|
2401
2788
|
(0, $hgUW1$useEffect)(()=>{
|
|
2402
2789
|
if (value !== condition.value) {
|
|
2403
|
-
if (value) update(index,
|
|
2404
|
-
else update(index,
|
|
2790
|
+
if (value) update(index, 'value', value);
|
|
2791
|
+
else update(index, 'value', '');
|
|
2405
2792
|
}
|
|
2406
2793
|
}, [
|
|
2407
2794
|
value
|
|
@@ -2433,7 +2820,7 @@ const $6369abf590ca298f$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
2433
2820
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2434
2821
|
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",
|
|
2435
2822
|
children: [
|
|
2436
|
-
schema[id].fields[property].mysql_type ===
|
|
2823
|
+
schema[id].fields[property].mysql_type === 'date' ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2437
2824
|
children: [
|
|
2438
2825
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
2439
2826
|
className: "ds-c-label",
|
|
@@ -2494,9 +2881,9 @@ const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false,
|
|
|
2494
2881
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
2495
2882
|
disabled: disabled,
|
|
2496
2883
|
className: "ds-u-float--right ds-l-md-col--6 ds-l-col--5",
|
|
2497
|
-
variation: small ?
|
|
2884
|
+
variation: small ? 'ghost' : undefined,
|
|
2498
2885
|
onClick: ()=>clearFiltersFn(),
|
|
2499
|
-
children: small ?
|
|
2886
|
+
children: small ? 'Clear all' : 'Clear all filters'
|
|
2500
2887
|
});
|
|
2501
2888
|
};
|
|
2502
2889
|
var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFiltersButton;
|
|
@@ -2505,19 +2892,19 @@ var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFilter
|
|
|
2505
2892
|
function $ee4ad47aa483e5b5$var$updateQueryForDatastore(condition) {
|
|
2506
2893
|
let cond = condition;
|
|
2507
2894
|
delete cond.key;
|
|
2508
|
-
if (cond.operator ===
|
|
2895
|
+
if (cond.operator === '=' || cond.operator === '<>') {
|
|
2509
2896
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
2510
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
2897
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
2511
2898
|
}
|
|
2512
|
-
if (cond.operator.toLowerCase() ===
|
|
2899
|
+
if (cond.operator.toLowerCase() === 'like') {
|
|
2513
2900
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
2514
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
2901
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
2515
2902
|
cond.value = `%${cleanedValue}%`;
|
|
2516
2903
|
}
|
|
2517
|
-
if (cond.operator.toLowerCase() ===
|
|
2518
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
2904
|
+
if (cond.operator.toLowerCase() === 'in') {
|
|
2905
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(',');
|
|
2519
2906
|
}
|
|
2520
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
2907
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ''));
|
|
2521
2908
|
return cond;
|
|
2522
2909
|
}
|
|
2523
2910
|
const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, isModal: isModal = false, setPage: setPage, setOffset: setOffset })=>{
|
|
@@ -2536,7 +2923,7 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
2536
2923
|
} else setQueryConditions([
|
|
2537
2924
|
{
|
|
2538
2925
|
property: fields[0],
|
|
2539
|
-
value:
|
|
2926
|
+
value: '',
|
|
2540
2927
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
2541
2928
|
key: Date.now().toString()
|
|
2542
2929
|
}
|
|
@@ -2553,7 +2940,7 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
2553
2940
|
...queryConditions,
|
|
2554
2941
|
{
|
|
2555
2942
|
property: fields[0],
|
|
2556
|
-
value:
|
|
2943
|
+
value: '',
|
|
2557
2944
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
2558
2945
|
key: Date.now().toString()
|
|
2559
2946
|
}
|
|
@@ -2584,7 +2971,7 @@ const $ee4ad47aa483e5b5$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
2584
2971
|
encodeValuesOnly: true,
|
|
2585
2972
|
addQueryPrefix: true
|
|
2586
2973
|
});
|
|
2587
|
-
window.history.pushState({},
|
|
2974
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
2588
2975
|
};
|
|
2589
2976
|
const submitConditions = (e)=>{
|
|
2590
2977
|
// only update the data conditions when "Apply filters" is pressed
|
|
@@ -2737,12 +3124,12 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, closeFul
|
|
|
2737
3124
|
showStoredQueryDownloadButton: showStoredQueryDownloadButton
|
|
2738
3125
|
}),
|
|
2739
3126
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2740
|
-
className: `ds-u-border-x--1 ds-u-border-bottom--1 ${isModal &&
|
|
3127
|
+
className: `ds-u-border-x--1 ds-u-border-bottom--1 ${isModal && 'dkan-datatable-fullscreen-mode'}`,
|
|
2741
3128
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
|
|
2742
3129
|
canResize: true,
|
|
2743
3130
|
columns: columns,
|
|
2744
3131
|
sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
|
|
2745
|
-
tablePadding:
|
|
3132
|
+
tablePadding: 'ds-u-padding-y--2',
|
|
2746
3133
|
loading: resource.loading,
|
|
2747
3134
|
isModal: isModal,
|
|
2748
3135
|
closeFullScreenModal: closeFullScreenModal
|
|
@@ -2775,7 +3162,7 @@ var $a35cf16d1488f54e$export$2e2bcd8739ae039 = $a35cf16d1488f54e$var$DatasetTabl
|
|
|
2775
3162
|
|
|
2776
3163
|
const $16bd41951b91f02d$var$FullScreenDataTable = ({ modalOpen: modalOpen, setModalOpen: setModalOpen })=>{
|
|
2777
3164
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2778
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
3165
|
+
className: `ds-c-dialog-wrap${modalOpen ? ' open' : ''}`,
|
|
2779
3166
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
2780
3167
|
heading: "Dataset Explorer",
|
|
2781
3168
|
isOpen: modalOpen,
|
|
@@ -2825,7 +3212,7 @@ const $71b4324f265dec16$var$DataTableControls = ({ id: id, columns: columns, def
|
|
|
2825
3212
|
]
|
|
2826
3213
|
}),
|
|
2827
3214
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("button", {
|
|
2828
|
-
"aria-label": isModal ?
|
|
3215
|
+
"aria-label": isModal ? 'Close Full Screen dialog' : 'Full Screen mode - Opens in a dialog',
|
|
2829
3216
|
className: "ds-c-button ds-c-button--ghost ds-u-margin-y--1",
|
|
2830
3217
|
onClick: ()=>{
|
|
2831
3218
|
if (isModal) closeFullScreenModal();
|
|
@@ -2833,7 +3220,7 @@ const $71b4324f265dec16$var$DataTableControls = ({ id: id, columns: columns, def
|
|
|
2833
3220
|
},
|
|
2834
3221
|
children: [
|
|
2835
3222
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2836
|
-
className: `fa ${isModal ?
|
|
3223
|
+
className: `fa ${isModal ? 'fa-compress' : 'fa-expand'} ds-u-margin-right--1`
|
|
2837
3224
|
}),
|
|
2838
3225
|
isModal ? "Exit Full Screen" : "Full Screen"
|
|
2839
3226
|
]
|
|
@@ -2870,7 +3257,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
2870
3257
|
const { columnOrder: columnOrder, setColumnOrder: setColumnOrder, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility } = (0, $hgUW1$useContext)((0, $ebda441784d176a5$export$2e2bcd8739ae039));
|
|
2871
3258
|
const data = resource.values;
|
|
2872
3259
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
2873
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
3260
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
|
|
2874
3261
|
const dataTableWrapperElement = (0, $hgUW1$useRef)(null);
|
|
2875
3262
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
2876
3263
|
const table_columns = columns.map((col)=>{
|
|
@@ -2889,9 +3276,9 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
2889
3276
|
columnOrder
|
|
2890
3277
|
]);
|
|
2891
3278
|
const sortElement = (isSorted, onClickFn)=>{
|
|
2892
|
-
if (isSorted ===
|
|
2893
|
-
if (isSorted ===
|
|
2894
|
-
return
|
|
3279
|
+
if (isSorted === 'asc') return 'dc-c-sort--asc';
|
|
3280
|
+
if (isSorted === 'desc') return 'dc-c-sort--desc';
|
|
3281
|
+
return 'dc-c-sort--default';
|
|
2895
3282
|
};
|
|
2896
3283
|
const filters = [];
|
|
2897
3284
|
const table = (0, $hgUW1$useReactTable)({
|
|
@@ -2903,7 +3290,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
2903
3290
|
columnVisibility: columnVisibility,
|
|
2904
3291
|
sorting: sorting
|
|
2905
3292
|
},
|
|
2906
|
-
columnResizeMode:
|
|
3293
|
+
columnResizeMode: 'onChange',
|
|
2907
3294
|
onSortingChange: setSorting,
|
|
2908
3295
|
onColumnOrderChange: setColumnOrder,
|
|
2909
3296
|
onColumnVisibilityChange: setColumnVisibility,
|
|
@@ -2920,7 +3307,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
2920
3307
|
const defaultColumnOrder = (0, $hgUW1$useMemo)(()=>table_columns.map((column)=>column.accessorKey), []);
|
|
2921
3308
|
const tableWrapperWidth = ()=>{
|
|
2922
3309
|
if (dataTableWrapperElement.current) return dataTableWrapperElement.current.offsetWidth;
|
|
2923
|
-
return
|
|
3310
|
+
return 'auto';
|
|
2924
3311
|
};
|
|
2925
3312
|
(0, $hgUW1$useEffect)(()=>{
|
|
2926
3313
|
setHighlightRow(null);
|
|
@@ -3022,7 +3409,7 @@ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, a
|
|
|
3022
3409
|
},
|
|
3023
3410
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3024
3411
|
name: accessor,
|
|
3025
|
-
value: filterValue ||
|
|
3412
|
+
value: filterValue || ''
|
|
3026
3413
|
});
|
|
3027
3414
|
}
|
|
3028
3415
|
const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true })=>{
|
|
@@ -3098,7 +3485,7 @@ const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage, pageTrail:
|
|
|
3098
3485
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3099
3486
|
children: currentPage
|
|
3100
3487
|
})
|
|
3101
|
-
}) :
|
|
3488
|
+
}) : ''
|
|
3102
3489
|
]
|
|
3103
3490
|
})
|
|
3104
3491
|
});
|
|
@@ -3155,11 +3542,11 @@ var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRigh
|
|
|
3155
3542
|
|
|
3156
3543
|
|
|
3157
3544
|
|
|
3158
|
-
const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder =
|
|
3545
|
+
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", {
|
|
3159
3546
|
className: "search-input-container",
|
|
3160
3547
|
children: [
|
|
3161
3548
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
3162
|
-
className: `${showMagnifyingGlass ?
|
|
3549
|
+
className: `${showMagnifyingGlass ? 'left-padding' : ''} ${showSearchButton ? 'right-padding' : ''}`,
|
|
3163
3550
|
label: placeholder,
|
|
3164
3551
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3165
3552
|
placeholder: placeholder,
|
|
@@ -3174,7 +3561,7 @@ const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = "Search
|
|
|
3174
3561
|
}),
|
|
3175
3562
|
showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
3176
3563
|
variation: "solid",
|
|
3177
|
-
className: onDark &&
|
|
3564
|
+
className: onDark && 'on-dark',
|
|
3178
3565
|
onClick: onSubmit,
|
|
3179
3566
|
children: [
|
|
3180
3567
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -3277,19 +3664,6 @@ var $5644ebd2c3dbfd7b$export$2e2bcd8739ae039 = $5644ebd2c3dbfd7b$var$DatasetAddi
|
|
|
3277
3664
|
|
|
3278
3665
|
|
|
3279
3666
|
|
|
3280
|
-
function $6d5c0212e738499b$export$34e95918366a058e(params, ACA) {
|
|
3281
|
-
if (ACA) params = Object.assign(params, {
|
|
3282
|
-
ACA: ACA,
|
|
3283
|
-
redirect: false
|
|
3284
|
-
});
|
|
3285
|
-
return params;
|
|
3286
|
-
}
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
const $844981eac9b63865$export$eccc29c8d0ff408 = (0, $hgUW1$createContext)({
|
|
3291
|
-
ACA: undefined
|
|
3292
|
-
});
|
|
3293
3667
|
|
|
3294
3668
|
|
|
3295
3669
|
const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: rootUrl, showRowLimitNotice: showRowLimitNotice = false })=>{
|
|
@@ -3306,7 +3680,7 @@ const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: roo
|
|
|
3306
3680
|
url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
3307
3681
|
addQueryPrefix: true
|
|
3308
3682
|
})}`,
|
|
3309
|
-
docExpansion:
|
|
3683
|
+
docExpansion: 'list',
|
|
3310
3684
|
defaultModelsExpandDepth: -1,
|
|
3311
3685
|
plugins: [
|
|
3312
3686
|
(0, $hgUW1$SpanOpenAPIVersion),
|
|
@@ -3379,26 +3753,6 @@ var $026cb986f9fea2b1$export$2e2bcd8739ae039 = $026cb986f9fea2b1$var$PageNotFoun
|
|
|
3379
3753
|
|
|
3380
3754
|
|
|
3381
3755
|
|
|
3382
|
-
const $61ff88fb3f6ee2c8$var$queryClient = new (0, $hgUW1$QueryClient)({
|
|
3383
|
-
defaultOptions: {
|
|
3384
|
-
queries: {
|
|
3385
|
-
refetchOnWindowFocus: false
|
|
3386
|
-
}
|
|
3387
|
-
}
|
|
3388
|
-
});
|
|
3389
|
-
const $61ff88fb3f6ee2c8$var$withQueryProvider = (WrappedComponent)=>(props)=>{
|
|
3390
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$QueryClientProvider), {
|
|
3391
|
-
client: $61ff88fb3f6ee2c8$var$queryClient,
|
|
3392
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)(WrappedComponent, {
|
|
3393
|
-
...props
|
|
3394
|
-
})
|
|
3395
|
-
});
|
|
3396
|
-
};
|
|
3397
|
-
var $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 = $61ff88fb3f6ee2c8$var$withQueryProvider;
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
3756
|
|
|
3403
3757
|
|
|
3404
3758
|
|
|
@@ -3474,7 +3828,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
3474
3828
|
size: "big",
|
|
3475
3829
|
type: "submit",
|
|
3476
3830
|
style: {
|
|
3477
|
-
width:
|
|
3831
|
+
width: '70px'
|
|
3478
3832
|
},
|
|
3479
3833
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3480
3834
|
className: "fas fa-search small-text"
|
|
@@ -3491,7 +3845,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
3491
3845
|
className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
|
|
3492
3846
|
children: [
|
|
3493
3847
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3494
|
-
children: text ? text :
|
|
3848
|
+
children: text ? text : 'Search'
|
|
3495
3849
|
}),
|
|
3496
3850
|
` `,
|
|
3497
3851
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -3534,84 +3888,29 @@ var $5723016a5461c1ca$export$2e2bcd8739ae039 = $5723016a5461c1ca$var$PageHeader;
|
|
|
3534
3888
|
|
|
3535
3889
|
|
|
3536
3890
|
|
|
3537
|
-
function $eff7d34c30f5a0fc$export$959638e8dca60ce6(facets) {
|
|
3538
|
-
let facetObj = {};
|
|
3539
|
-
if (facets) {
|
|
3540
|
-
facets.forEach((f)=>{
|
|
3541
|
-
if (facetObj[f.type]) facetObj[f.type] = [
|
|
3542
|
-
...facetObj[f.type],
|
|
3543
|
-
f
|
|
3544
|
-
];
|
|
3545
|
-
else facetObj[f.type] = [
|
|
3546
|
-
f
|
|
3547
|
-
];
|
|
3548
|
-
});
|
|
3549
|
-
// sort facets descending by int value, put non int last
|
|
3550
|
-
if (facetObj.keyword) facetObj.keyword.sort((a, b)=>{
|
|
3551
|
-
if (Number(a.name) && Number(b.name)) return Number(b.name) - Number(a.name);
|
|
3552
|
-
});
|
|
3553
|
-
return facetObj;
|
|
3554
|
-
}
|
|
3555
|
-
}
|
|
3556
|
-
function $eff7d34c30f5a0fc$export$60ec7cc1d341a524(searchParams, defaultSortOptions) {
|
|
3557
|
-
const params = (0, $hgUW1$qs).parse(searchParams, {
|
|
3558
|
-
ignoreQueryPrefix: true
|
|
3559
|
-
});
|
|
3560
|
-
let themes = params.theme;
|
|
3561
|
-
let keywords = params.keyword;
|
|
3562
|
-
return {
|
|
3563
|
-
page: params.page,
|
|
3564
|
-
sort: !params.sort ? defaultSortOptions.defaultSort : params.sort,
|
|
3565
|
-
sortOrder: !params.sortOrder ? defaultSortOptions.defaultOrder : params.sortOrder,
|
|
3566
|
-
fulltext: params.fulltext,
|
|
3567
|
-
selectedFacets: {
|
|
3568
|
-
theme: themes ? themes : [],
|
|
3569
|
-
keyword: keywords ? keywords : []
|
|
3570
|
-
}
|
|
3571
|
-
};
|
|
3572
|
-
}
|
|
3573
|
-
async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA) {
|
|
3574
|
-
const { fulltext: fulltext, selectedFacets: selectedFacets, sort: sort, sortOrder: sortOrder, page: page, pageSize: pageSize } = options;
|
|
3575
|
-
let params = {
|
|
3576
|
-
fulltext: fulltext ? fulltext : undefined,
|
|
3577
|
-
...selectedFacets,
|
|
3578
|
-
sort: sort ? sort : undefined,
|
|
3579
|
-
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
3580
|
-
page: page !== 1 ? page : undefined,
|
|
3581
|
-
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
3582
|
-
};
|
|
3583
|
-
return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
3584
|
-
arrayFormat: "comma",
|
|
3585
|
-
encode: false
|
|
3586
|
-
})}`);
|
|
3587
|
-
}
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
3891
|
|
|
3593
3892
|
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
3594
3893
|
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
3595
|
-
defaultSort:
|
|
3596
|
-
defaultOrder:
|
|
3597
|
-
}, pageTitle: pageTitle =
|
|
3894
|
+
defaultSort: 'modified',
|
|
3895
|
+
defaultOrder: 'desc'
|
|
3896
|
+
}, pageTitle: pageTitle = 'Dataset Explorer', filterTitle: filterTitle = 'Tags', showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = '', showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
3598
3897
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
3599
3898
|
const sortOptions = [
|
|
3600
3899
|
{
|
|
3601
|
-
label:
|
|
3602
|
-
value:
|
|
3900
|
+
label: 'Newest',
|
|
3901
|
+
value: 'newest'
|
|
3603
3902
|
},
|
|
3604
3903
|
{
|
|
3605
|
-
label:
|
|
3606
|
-
value:
|
|
3904
|
+
label: 'Oldest',
|
|
3905
|
+
value: 'oldest'
|
|
3607
3906
|
},
|
|
3608
3907
|
{
|
|
3609
|
-
label:
|
|
3610
|
-
value:
|
|
3908
|
+
label: 'Title A-Z',
|
|
3909
|
+
value: 'titleAZ'
|
|
3611
3910
|
},
|
|
3612
3911
|
{
|
|
3613
|
-
label:
|
|
3614
|
-
value:
|
|
3912
|
+
label: 'Title Z-A',
|
|
3913
|
+
value: 'titleZA'
|
|
3615
3914
|
}
|
|
3616
3915
|
];
|
|
3617
3916
|
const defaultSortBy = "";
|
|
@@ -3630,7 +3929,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3630
3929
|
endingNumber: 0
|
|
3631
3930
|
});
|
|
3632
3931
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
3633
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
3932
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)('');
|
|
3634
3933
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
3635
3934
|
const [fulltext, setFullText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
3636
3935
|
const [filterText, setFilterText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
@@ -3639,7 +3938,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3639
3938
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
3640
3939
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
3641
3940
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
3642
|
-
return sort ===
|
|
3941
|
+
return sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
|
|
3643
3942
|
});
|
|
3644
3943
|
const [selectedFacets, setSelectedFacets] = (0, $hgUW1$useState)(transformedParams.selectedFacets ? transformedParams.selectedFacets : {
|
|
3645
3944
|
theme: [],
|
|
@@ -3648,21 +3947,21 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3648
3947
|
const setSortOptions = (value)=>{
|
|
3649
3948
|
setSortDisplay(value);
|
|
3650
3949
|
switch(value){
|
|
3651
|
-
case
|
|
3652
|
-
setSort(
|
|
3653
|
-
setSortOrder(
|
|
3950
|
+
case 'newest':
|
|
3951
|
+
setSort('modified');
|
|
3952
|
+
setSortOrder('desc');
|
|
3654
3953
|
break;
|
|
3655
|
-
case
|
|
3656
|
-
setSort(
|
|
3657
|
-
setSortOrder(
|
|
3954
|
+
case 'oldest':
|
|
3955
|
+
setSort('modified');
|
|
3956
|
+
setSortOrder('asc');
|
|
3658
3957
|
break;
|
|
3659
|
-
case
|
|
3660
|
-
setSort(
|
|
3661
|
-
setSortOrder(
|
|
3958
|
+
case 'titleAZ':
|
|
3959
|
+
setSort('title');
|
|
3960
|
+
setSortOrder('asc');
|
|
3662
3961
|
break;
|
|
3663
|
-
case
|
|
3664
|
-
setSort(
|
|
3665
|
-
setSortOrder(
|
|
3962
|
+
case 'titleZA':
|
|
3963
|
+
setSort('title');
|
|
3964
|
+
setSortOrder('desc');
|
|
3666
3965
|
break;
|
|
3667
3966
|
}
|
|
3668
3967
|
};
|
|
@@ -3670,12 +3969,12 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3670
3969
|
const newFacets = {
|
|
3671
3970
|
...selectedFacets
|
|
3672
3971
|
};
|
|
3673
|
-
if (key ===
|
|
3972
|
+
if (key === 'theme') {
|
|
3674
3973
|
const existingFacet = newFacets.theme.findIndex((s)=>s === value);
|
|
3675
3974
|
if (existingFacet > -1) newFacets.theme.splice(existingFacet, 1);
|
|
3676
3975
|
else newFacets.theme.push(value);
|
|
3677
3976
|
}
|
|
3678
|
-
if (key ===
|
|
3977
|
+
if (key === 'keyword') {
|
|
3679
3978
|
const existingFacet = newFacets.keyword.findIndex((s)=>s === value);
|
|
3680
3979
|
if (existingFacet > -1) newFacets.keyword.splice(existingFacet, 1);
|
|
3681
3980
|
else newFacets.keyword.push(value);
|
|
@@ -3689,14 +3988,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3689
3988
|
});
|
|
3690
3989
|
setSelectedFacets(newFacets);
|
|
3691
3990
|
const url = new URL(window.location.href);
|
|
3692
|
-
window.history.pushState({},
|
|
3991
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
3693
3992
|
}
|
|
3694
3993
|
const pageSize = defaultPageSize;
|
|
3695
3994
|
(0, $hgUW1$useEffect)(()=>{
|
|
3696
3995
|
// Update browser URL with current search params
|
|
3697
3996
|
const params = buildSearchParams(true);
|
|
3698
3997
|
const url = new URL(window.location.href);
|
|
3699
|
-
window.history.pushState({},
|
|
3998
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${params}`);
|
|
3700
3999
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
3701
4000
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
3702
4001
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -3735,14 +4034,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3735
4034
|
setSelectedFacets(defaultSelectedFacets);
|
|
3736
4035
|
setPage(defaultPage);
|
|
3737
4036
|
const url = new URL(window.location.href);
|
|
3738
|
-
window.history.pushState({},
|
|
4037
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}`);
|
|
3739
4038
|
}
|
|
3740
4039
|
function buildSearchParams(includePage) {
|
|
3741
4040
|
let newParams = {};
|
|
3742
4041
|
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
3743
4042
|
if (sort !== defaultSort.defaultSort) newParams.sort = sort;
|
|
3744
4043
|
if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
|
|
3745
|
-
if (fulltext !==
|
|
4044
|
+
if (fulltext !== '') newParams.fulltext = fulltext;
|
|
3746
4045
|
if (Object.keys(selectedFacets).length) Object.keys(selectedFacets).forEach((key)=>{
|
|
3747
4046
|
newParams[key] = selectedFacets[key];
|
|
3748
4047
|
});
|
|
@@ -3755,9 +4054,9 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3755
4054
|
fulltext: fulltext ? fulltext : undefined,
|
|
3756
4055
|
...selectedFacets,
|
|
3757
4056
|
sort: sort ? sort : undefined,
|
|
3758
|
-
[
|
|
4057
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
3759
4058
|
page: page !== 1 ? page : undefined,
|
|
3760
|
-
[
|
|
4059
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
3761
4060
|
};
|
|
3762
4061
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
3763
4062
|
queryKey: [
|
|
@@ -3766,7 +4065,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3766
4065
|
],
|
|
3767
4066
|
queryFn: ()=>{
|
|
3768
4067
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
3769
|
-
arrayFormat:
|
|
4068
|
+
arrayFormat: 'comma',
|
|
3770
4069
|
encode: false
|
|
3771
4070
|
})}`);
|
|
3772
4071
|
}
|
|
@@ -3817,7 +4116,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3817
4116
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
3818
4117
|
fieldClassName: "ds-u-margin--0",
|
|
3819
4118
|
value: filterText,
|
|
3820
|
-
className: `ds-u-padding-right--2 ${altMobileSearchButton ?
|
|
4119
|
+
className: `ds-u-padding-right--2 ${altMobileSearchButton ? 'ds-l-col--12 ds-l-md-col--10 --alt-style' : 'ds-l-col--10'}`,
|
|
3821
4120
|
label: "Search datasets",
|
|
3822
4121
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3823
4122
|
placeholder: "Search datasets",
|
|
@@ -3879,7 +4178,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3879
4178
|
"Showing ",
|
|
3880
4179
|
currentResultNumbers.startingNumber,
|
|
3881
4180
|
" -",
|
|
3882
|
-
|
|
4181
|
+
' ',
|
|
3883
4182
|
currentResultNumbers.endingNumber,
|
|
3884
4183
|
" of ",
|
|
3885
4184
|
data.data.total,
|
|
@@ -3955,7 +4254,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
3955
4254
|
},
|
|
3956
4255
|
renderHref: (page)=>{
|
|
3957
4256
|
const searchParams = buildSearchParams(false);
|
|
3958
|
-
const includeAnd = searchParams ?
|
|
4257
|
+
const includeAnd = searchParams ? '&' : '';
|
|
3959
4258
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
3960
4259
|
}
|
|
3961
4260
|
})
|
|
@@ -3986,14 +4285,294 @@ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
3986
4285
|
|
|
3987
4286
|
|
|
3988
4287
|
|
|
4288
|
+
|
|
4289
|
+
|
|
4290
|
+
const $550bcc185f420ff5$var$DatasetList = (props)=>{
|
|
4291
|
+
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4292
|
+
defaultSort: 'modified',
|
|
4293
|
+
defaultOrder: 'desc'
|
|
4294
|
+
}, pageTitle: pageTitle = 'What\'s New ', showLargeFileWarning: showLargeFileWarning = false, introText: introText = '', dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
4295
|
+
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4296
|
+
const sortOptions = [
|
|
4297
|
+
{
|
|
4298
|
+
label: 'Newest',
|
|
4299
|
+
value: 'newest'
|
|
4300
|
+
},
|
|
4301
|
+
{
|
|
4302
|
+
label: 'Oldest',
|
|
4303
|
+
value: 'oldest'
|
|
4304
|
+
},
|
|
4305
|
+
{
|
|
4306
|
+
label: 'Title A-Z',
|
|
4307
|
+
value: 'titleAZ'
|
|
4308
|
+
},
|
|
4309
|
+
{
|
|
4310
|
+
label: 'Title Z-A',
|
|
4311
|
+
value: 'titleZA'
|
|
4312
|
+
}
|
|
4313
|
+
];
|
|
4314
|
+
const defaultSortBy = "";
|
|
4315
|
+
const defaultSortOrder = "";
|
|
4316
|
+
const defaultPage = 1;
|
|
4317
|
+
const location = (0, $hgUW1$useLocation)();
|
|
4318
|
+
const transformedParams = (0, $eff7d34c30f5a0fc$export$60ec7cc1d341a524)(location.search, defaultSort);
|
|
4319
|
+
const [currentResultNumbers, setCurrentResultNumbers] = (0, $hgUW1$useState)({
|
|
4320
|
+
total: 0,
|
|
4321
|
+
startingNumber: 0,
|
|
4322
|
+
endingNumber: 0
|
|
4323
|
+
});
|
|
4324
|
+
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4325
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)('');
|
|
4326
|
+
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4327
|
+
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
4328
|
+
const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
|
|
4329
|
+
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4330
|
+
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4331
|
+
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4332
|
+
return sort === 'modified' ? sortOrder === 'desc' ? 'newest' : 'oldest' : sortOrder === 'desc' ? 'titleZA' : 'titleAZ';
|
|
4333
|
+
});
|
|
4334
|
+
const setSortOptions = (value)=>{
|
|
4335
|
+
setSortDisplay(value);
|
|
4336
|
+
switch(value){
|
|
4337
|
+
case 'newest':
|
|
4338
|
+
setSort('modified');
|
|
4339
|
+
setSortOrder('desc');
|
|
4340
|
+
break;
|
|
4341
|
+
case 'oldest':
|
|
4342
|
+
setSort('modified');
|
|
4343
|
+
setSortOrder('asc');
|
|
4344
|
+
break;
|
|
4345
|
+
case 'titleAZ':
|
|
4346
|
+
setSort('title');
|
|
4347
|
+
setSortOrder('asc');
|
|
4348
|
+
break;
|
|
4349
|
+
case 'titleZA':
|
|
4350
|
+
setSort('title');
|
|
4351
|
+
setSortOrder('desc');
|
|
4352
|
+
break;
|
|
4353
|
+
}
|
|
4354
|
+
};
|
|
4355
|
+
const pageSize = defaultPageSize;
|
|
4356
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
4357
|
+
// Update browser URL with current search params
|
|
4358
|
+
const params = buildSearchParams(true);
|
|
4359
|
+
const url = new URL(window.location.href);
|
|
4360
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${params}`);
|
|
4361
|
+
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4362
|
+
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4363
|
+
const endingNumber = Number(pageSize) * Number(page);
|
|
4364
|
+
setCurrentResultNumbers({
|
|
4365
|
+
total: Number(totalItems),
|
|
4366
|
+
startingNumber: Number(totalItems) >= startingNumber ? startingNumber : 0,
|
|
4367
|
+
endingNumber: Number(totalItems) < endingNumber ? Number(totalItems) : endingNumber
|
|
4368
|
+
});
|
|
4369
|
+
setTimeout(()=>{
|
|
4370
|
+
setAnnouncementText(`Showing ${startingNumber} to ${endingNumber} of ${totalItems} datasets`);
|
|
4371
|
+
}, 100);
|
|
4372
|
+
if (totalItems <= 0 && currentResultNumbers !== null) setNoResults(true);
|
|
4373
|
+
else setNoResults(false);
|
|
4374
|
+
}, [
|
|
4375
|
+
totalItems,
|
|
4376
|
+
pageSize,
|
|
4377
|
+
page
|
|
4378
|
+
]);
|
|
4379
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
4380
|
+
var params = buildSearchParams(true);
|
|
4381
|
+
if (params !== location.search) setSearchParams(params);
|
|
4382
|
+
}, [
|
|
4383
|
+
page,
|
|
4384
|
+
sort,
|
|
4385
|
+
sortOrder
|
|
4386
|
+
]);
|
|
4387
|
+
function buildSearchParams(includePage) {
|
|
4388
|
+
let newParams = {};
|
|
4389
|
+
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
4390
|
+
if (sort !== defaultSort.defaultSort) newParams.sort = sort;
|
|
4391
|
+
if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
|
|
4392
|
+
return (0, $hgUW1$qs).stringify(newParams, {
|
|
4393
|
+
addQueryPrefix: includePage,
|
|
4394
|
+
encode: true
|
|
4395
|
+
});
|
|
4396
|
+
}
|
|
4397
|
+
let params = {
|
|
4398
|
+
sort: sort ? sort : undefined,
|
|
4399
|
+
['sort-order']: sortOrder ? sortOrder : undefined,
|
|
4400
|
+
page: page !== 1 ? page : undefined,
|
|
4401
|
+
['page-size']: pageSize !== 10 ? pageSize : undefined
|
|
4402
|
+
};
|
|
4403
|
+
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4404
|
+
queryKey: [
|
|
4405
|
+
"datasets",
|
|
4406
|
+
params
|
|
4407
|
+
],
|
|
4408
|
+
queryFn: ()=>{
|
|
4409
|
+
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4410
|
+
arrayFormat: 'comma',
|
|
4411
|
+
encode: false
|
|
4412
|
+
})}`);
|
|
4413
|
+
}
|
|
4414
|
+
});
|
|
4415
|
+
if (data && data.data.total && totalItems != data.data.total) setTotalItems(data.data.total);
|
|
4416
|
+
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
4417
|
+
children: [
|
|
4418
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $5723016a5461c1ca$export$2e2bcd8739ae039), {
|
|
4419
|
+
headerText: pageTitle
|
|
4420
|
+
}),
|
|
4421
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("section", {
|
|
4422
|
+
className: "ds-l-container",
|
|
4423
|
+
children: [
|
|
4424
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4425
|
+
className: "ds-l-row",
|
|
4426
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4427
|
+
className: "ds-l-col--12",
|
|
4428
|
+
children: [
|
|
4429
|
+
introText ? introText : null,
|
|
4430
|
+
showLargeFileWarning && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4431
|
+
className: "ds-l-row ds-u-margin-bottom--2 ds-u-margin-top--4",
|
|
4432
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4433
|
+
className: "ds-l-md-col--12",
|
|
4434
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
|
|
4435
|
+
bordered: true,
|
|
4436
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
4437
|
+
contentClassName: "downloading-datasets",
|
|
4438
|
+
heading: "Please read before downloading datasets",
|
|
4439
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b2d31a9c6cd2284$export$2e2bcd8739ae039), {})
|
|
4440
|
+
})
|
|
4441
|
+
})
|
|
4442
|
+
})
|
|
4443
|
+
})
|
|
4444
|
+
]
|
|
4445
|
+
})
|
|
4446
|
+
}),
|
|
4447
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4448
|
+
className: "ds-l-row ds-u-padding-top--4",
|
|
4449
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4450
|
+
className: "ds-l-col--12",
|
|
4451
|
+
children: isPending ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
4452
|
+
className: "ds-u-valign--middle",
|
|
4453
|
+
"aria-valuetext": "Dataset Search loading",
|
|
4454
|
+
role: "status"
|
|
4455
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
4456
|
+
children: [
|
|
4457
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4458
|
+
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",
|
|
4459
|
+
children: [
|
|
4460
|
+
enablePagination && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4461
|
+
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--8",
|
|
4462
|
+
children: [
|
|
4463
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4464
|
+
className: "ds-u-margin-y--0",
|
|
4465
|
+
"aria-hidden": "true",
|
|
4466
|
+
children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
4467
|
+
children: [
|
|
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
|
+
]
|
|
4488
|
+
}),
|
|
4489
|
+
enableSort && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4490
|
+
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4 ds-u-sm-padding-right--0",
|
|
4491
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
4492
|
+
options: sortOptions,
|
|
4493
|
+
value: sortDisplay,
|
|
4494
|
+
label: "Sort",
|
|
4495
|
+
labelClassName: "ds-u-margin-top--0",
|
|
4496
|
+
name: "dataset_search_sort",
|
|
4497
|
+
onChange: (e)=>setSortOptions(e.target.value)
|
|
4498
|
+
})
|
|
4499
|
+
})
|
|
4500
|
+
]
|
|
4501
|
+
}),
|
|
4502
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
|
|
4503
|
+
className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0 ds-u-margin-bottom--4 ds-u-display--block",
|
|
4504
|
+
"data-testid": "results-list",
|
|
4505
|
+
children: [
|
|
4506
|
+
noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
4507
|
+
variation: "error",
|
|
4508
|
+
heading: "No results found."
|
|
4509
|
+
}),
|
|
4510
|
+
data && data.data.results ? Object.keys(data.data.results).map((key)=>{
|
|
4511
|
+
return data.data.results[key];
|
|
4512
|
+
}).map((item)=>{
|
|
4513
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $c068004d499082cc$export$2e2bcd8739ae039), {
|
|
4514
|
+
title: item.title,
|
|
4515
|
+
modified: item.modified,
|
|
4516
|
+
description: item.description,
|
|
4517
|
+
identifier: item.identifier,
|
|
4518
|
+
paginationEnabled: enablePagination,
|
|
4519
|
+
dataDictionaryLinks: dataDictionaryLinks
|
|
4520
|
+
}, item.identifier);
|
|
4521
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
4522
|
+
variation: "error",
|
|
4523
|
+
heading: "Could not connect to the API."
|
|
4524
|
+
})
|
|
4525
|
+
]
|
|
4526
|
+
}),
|
|
4527
|
+
enablePagination && data && data.data.total && data.data.total != 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
4528
|
+
currentPage: Number(page),
|
|
4529
|
+
totalPages: Math.ceil(Number(data.data.total) / pageSize),
|
|
4530
|
+
onPageChange: (evt, page)=>{
|
|
4531
|
+
evt.preventDefault();
|
|
4532
|
+
window.scroll(0, 0);
|
|
4533
|
+
setPage(page);
|
|
4534
|
+
},
|
|
4535
|
+
renderHref: (page)=>{
|
|
4536
|
+
const searchParams = buildSearchParams(false);
|
|
4537
|
+
const includeAnd = searchParams ? '&' : '';
|
|
4538
|
+
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
4539
|
+
}
|
|
4540
|
+
})
|
|
4541
|
+
]
|
|
4542
|
+
})
|
|
4543
|
+
})
|
|
4544
|
+
})
|
|
4545
|
+
]
|
|
4546
|
+
})
|
|
4547
|
+
]
|
|
4548
|
+
});
|
|
4549
|
+
};
|
|
4550
|
+
var $550bcc185f420ff5$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039)($550bcc185f420ff5$var$DatasetList);
|
|
4551
|
+
|
|
4552
|
+
|
|
4553
|
+
|
|
4554
|
+
|
|
4555
|
+
|
|
4556
|
+
|
|
4557
|
+
|
|
4558
|
+
|
|
4559
|
+
|
|
4560
|
+
|
|
4561
|
+
|
|
4562
|
+
|
|
4563
|
+
|
|
4564
|
+
|
|
4565
|
+
|
|
4566
|
+
|
|
4567
|
+
|
|
3989
4568
|
const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
3990
4569
|
const [dataset, setDataset] = (0, $hgUW1$useState)({
|
|
3991
|
-
title:
|
|
4570
|
+
title: '',
|
|
3992
4571
|
distribution: [],
|
|
3993
|
-
error:
|
|
3994
|
-
description:
|
|
3995
|
-
identifier:
|
|
3996
|
-
modified:
|
|
4572
|
+
error: '',
|
|
4573
|
+
description: '',
|
|
4574
|
+
identifier: '',
|
|
4575
|
+
modified: ''
|
|
3997
4576
|
});
|
|
3998
4577
|
const [id, setId] = (0, $hgUW1$useState)(datasetId);
|
|
3999
4578
|
const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
|
|
@@ -4003,7 +4582,7 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
|
4003
4582
|
"metastore" + id
|
|
4004
4583
|
],
|
|
4005
4584
|
queryFn: ()=>{
|
|
4006
|
-
return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ?
|
|
4585
|
+
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)=>{
|
|
4007
4586
|
return {
|
|
4008
4587
|
title: dataset.title,
|
|
4009
4588
|
distribution: dataset.distribution,
|
|
@@ -4069,7 +4648,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
4069
4648
|
...additionalParams
|
|
4070
4649
|
};
|
|
4071
4650
|
params = (0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA);
|
|
4072
|
-
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` :
|
|
4651
|
+
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : '';
|
|
4073
4652
|
let enabled = false;
|
|
4074
4653
|
if (id) {
|
|
4075
4654
|
if (!requireConditions) enabled = true;
|
|
@@ -4149,65 +4728,65 @@ var $1d3d480a9cfaabe0$export$2e2bcd8739ae039 = $1d3d480a9cfaabe0$var$useDatastor
|
|
|
4149
4728
|
|
|
4150
4729
|
|
|
4151
4730
|
const $28f16f59778efa64$export$82b1b1d517e5388a = {
|
|
4152
|
-
|
|
4153
|
-
name:
|
|
4731
|
+
'R/P10Y': {
|
|
4732
|
+
name: 'Decennial'
|
|
4154
4733
|
},
|
|
4155
|
-
|
|
4156
|
-
name:
|
|
4734
|
+
'R/P4Y': {
|
|
4735
|
+
name: 'Quadrennial'
|
|
4157
4736
|
},
|
|
4158
|
-
|
|
4159
|
-
name:
|
|
4737
|
+
'R/P1Y': {
|
|
4738
|
+
name: 'Annual'
|
|
4160
4739
|
},
|
|
4161
|
-
|
|
4162
|
-
name:
|
|
4740
|
+
'R/P2M': {
|
|
4741
|
+
name: 'Bimonthly'
|
|
4163
4742
|
},
|
|
4164
|
-
|
|
4165
|
-
name:
|
|
4743
|
+
'R/P3.5D': {
|
|
4744
|
+
name: 'Semiweekly'
|
|
4166
4745
|
},
|
|
4167
|
-
|
|
4168
|
-
name:
|
|
4746
|
+
'R/P1D': {
|
|
4747
|
+
name: 'Daily'
|
|
4169
4748
|
},
|
|
4170
|
-
|
|
4171
|
-
name:
|
|
4749
|
+
'R/P2W': {
|
|
4750
|
+
name: 'Biweekly'
|
|
4172
4751
|
},
|
|
4173
|
-
|
|
4174
|
-
name:
|
|
4752
|
+
'R/P6M': {
|
|
4753
|
+
name: 'Semiannual'
|
|
4175
4754
|
},
|
|
4176
|
-
|
|
4177
|
-
name:
|
|
4755
|
+
'R/P2Y': {
|
|
4756
|
+
name: 'Biennial'
|
|
4178
4757
|
},
|
|
4179
|
-
|
|
4180
|
-
name:
|
|
4758
|
+
'R/P3Y': {
|
|
4759
|
+
name: 'Triennial'
|
|
4181
4760
|
},
|
|
4182
|
-
|
|
4183
|
-
name:
|
|
4761
|
+
'R/P0.33W': {
|
|
4762
|
+
name: 'Three times a week'
|
|
4184
4763
|
},
|
|
4185
|
-
|
|
4186
|
-
name:
|
|
4764
|
+
'R/P0.33M': {
|
|
4765
|
+
name: 'Three times a month'
|
|
4187
4766
|
},
|
|
4188
|
-
|
|
4189
|
-
name:
|
|
4767
|
+
'R/PT1S': {
|
|
4768
|
+
name: 'Continuously updated'
|
|
4190
4769
|
},
|
|
4191
|
-
|
|
4192
|
-
name:
|
|
4770
|
+
'R/P1M': {
|
|
4771
|
+
name: 'Monthly'
|
|
4193
4772
|
},
|
|
4194
|
-
|
|
4195
|
-
name:
|
|
4773
|
+
'R/P3M': {
|
|
4774
|
+
name: 'Quarterly'
|
|
4196
4775
|
},
|
|
4197
|
-
|
|
4198
|
-
name:
|
|
4776
|
+
'R/P0.5M': {
|
|
4777
|
+
name: 'Semimonthly'
|
|
4199
4778
|
},
|
|
4200
|
-
|
|
4201
|
-
name:
|
|
4779
|
+
'R/P4M': {
|
|
4780
|
+
name: 'Three times a year'
|
|
4202
4781
|
},
|
|
4203
|
-
|
|
4204
|
-
name:
|
|
4782
|
+
'R/P1W': {
|
|
4783
|
+
name: 'Weekly'
|
|
4205
4784
|
},
|
|
4206
|
-
|
|
4207
|
-
name:
|
|
4785
|
+
'R/PT1H': {
|
|
4786
|
+
name: 'Hourly'
|
|
4208
4787
|
},
|
|
4209
4788
|
irregular: {
|
|
4210
|
-
name:
|
|
4789
|
+
name: 'Irregular'
|
|
4211
4790
|
}
|
|
4212
4791
|
};
|
|
4213
4792
|
|
|
@@ -4216,7 +4795,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4216
4795
|
modified: (data)=>{
|
|
4217
4796
|
return [
|
|
4218
4797
|
{
|
|
4219
|
-
label:
|
|
4798
|
+
label: 'Modified',
|
|
4220
4799
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
4221
4800
|
date: data
|
|
4222
4801
|
})
|
|
@@ -4226,7 +4805,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4226
4805
|
issued: (data)=>{
|
|
4227
4806
|
return [
|
|
4228
4807
|
{
|
|
4229
|
-
label:
|
|
4808
|
+
label: 'Issued',
|
|
4230
4809
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
4231
4810
|
date: data
|
|
4232
4811
|
})
|
|
@@ -4236,7 +4815,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4236
4815
|
accrualPeriodicity: (data)=>{
|
|
4237
4816
|
return [
|
|
4238
4817
|
{
|
|
4239
|
-
label:
|
|
4818
|
+
label: 'Frequency',
|
|
4240
4819
|
value: (0, $28f16f59778efa64$export$82b1b1d517e5388a)[data].name
|
|
4241
4820
|
}
|
|
4242
4821
|
];
|
|
@@ -4244,7 +4823,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4244
4823
|
publisher: (data)=>{
|
|
4245
4824
|
if (data.data && data.data.name) return [
|
|
4246
4825
|
{
|
|
4247
|
-
label:
|
|
4826
|
+
label: 'Publisher',
|
|
4248
4827
|
value: data.data.name
|
|
4249
4828
|
}
|
|
4250
4829
|
];
|
|
@@ -4253,7 +4832,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4253
4832
|
identifier: (data)=>{
|
|
4254
4833
|
return [
|
|
4255
4834
|
{
|
|
4256
|
-
label:
|
|
4835
|
+
label: 'Identifier',
|
|
4257
4836
|
value: data
|
|
4258
4837
|
}
|
|
4259
4838
|
];
|
|
@@ -4261,11 +4840,11 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4261
4840
|
contactPoint: (data)=>{
|
|
4262
4841
|
let rows = [];
|
|
4263
4842
|
if (data.fn) rows.push({
|
|
4264
|
-
label:
|
|
4843
|
+
label: 'Contact',
|
|
4265
4844
|
value: data.fn
|
|
4266
4845
|
});
|
|
4267
4846
|
if (data.hasEmail) rows.push({
|
|
4268
|
-
label:
|
|
4847
|
+
label: 'Contact Email',
|
|
4269
4848
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
4270
4849
|
href: data.hasEmail.includes("mailto:") ? data.hasEmail : `mailto:${data.hasEmail}`,
|
|
4271
4850
|
children: data.hasEmail.replace("mailto:", "")
|
|
@@ -4276,7 +4855,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4276
4855
|
bureauCode: (data)=>{
|
|
4277
4856
|
if (data.length) return [
|
|
4278
4857
|
{
|
|
4279
|
-
label:
|
|
4858
|
+
label: 'Bureau Code',
|
|
4280
4859
|
value: data[0]
|
|
4281
4860
|
}
|
|
4282
4861
|
];
|
|
@@ -4284,7 +4863,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4284
4863
|
programCode: (data)=>{
|
|
4285
4864
|
if (data.length) return [
|
|
4286
4865
|
{
|
|
4287
|
-
label:
|
|
4866
|
+
label: 'Program Code',
|
|
4288
4867
|
value: data[0]
|
|
4289
4868
|
}
|
|
4290
4869
|
];
|
|
@@ -4292,13 +4871,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4292
4871
|
theme: (data)=>{
|
|
4293
4872
|
return [
|
|
4294
4873
|
{
|
|
4295
|
-
label:
|
|
4874
|
+
label: 'Category',
|
|
4296
4875
|
value: data.map((theme)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
4297
4876
|
to: `/datasets?theme[]=${theme.data}`,
|
|
4298
4877
|
children: theme.data
|
|
4299
4878
|
}, theme.data)).reduce((prev, curr)=>[
|
|
4300
4879
|
prev,
|
|
4301
|
-
|
|
4880
|
+
', ',
|
|
4302
4881
|
curr
|
|
4303
4882
|
])
|
|
4304
4883
|
}
|
|
@@ -4307,13 +4886,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4307
4886
|
keyword: (data)=>{
|
|
4308
4887
|
return [
|
|
4309
4888
|
{
|
|
4310
|
-
label:
|
|
4889
|
+
label: 'Tags',
|
|
4311
4890
|
value: data.map((keyword)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
4312
4891
|
to: `/datasets?keyword[]=${keyword.data}`,
|
|
4313
4892
|
children: keyword.data
|
|
4314
4893
|
}, keyword.data)).reduce((prev, curr)=>[
|
|
4315
4894
|
prev,
|
|
4316
|
-
|
|
4895
|
+
', ',
|
|
4317
4896
|
curr
|
|
4318
4897
|
])
|
|
4319
4898
|
}
|
|
@@ -4322,7 +4901,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4322
4901
|
license: (data)=>{
|
|
4323
4902
|
return [
|
|
4324
4903
|
{
|
|
4325
|
-
label:
|
|
4904
|
+
label: 'License',
|
|
4326
4905
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
4327
4906
|
href: data,
|
|
4328
4907
|
children: data
|
|
@@ -4333,7 +4912,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4333
4912
|
accessLevel: (data)=>{
|
|
4334
4913
|
return [
|
|
4335
4914
|
{
|
|
4336
|
-
label:
|
|
4915
|
+
label: 'Public Access Level',
|
|
4337
4916
|
value: data
|
|
4338
4917
|
}
|
|
4339
4918
|
];
|
|
@@ -4341,7 +4920,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4341
4920
|
temporal: (data)=>{
|
|
4342
4921
|
return [
|
|
4343
4922
|
{
|
|
4344
|
-
label:
|
|
4923
|
+
label: 'Temporal Coverage',
|
|
4345
4924
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4346
4925
|
className: "dc-c-word-break--all",
|
|
4347
4926
|
children: data
|
|
@@ -4352,7 +4931,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4352
4931
|
spatial: (data)=>{
|
|
4353
4932
|
return [
|
|
4354
4933
|
{
|
|
4355
|
-
label:
|
|
4934
|
+
label: 'Spacial/Geographical Coverage',
|
|
4356
4935
|
value: data
|
|
4357
4936
|
}
|
|
4358
4937
|
];
|
|
@@ -4360,7 +4939,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4360
4939
|
references: (data)=>{
|
|
4361
4940
|
return [
|
|
4362
4941
|
{
|
|
4363
|
-
label:
|
|
4942
|
+
label: 'Related Documents',
|
|
4364
4943
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
4365
4944
|
className: "ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0",
|
|
4366
4945
|
children: data.map((item)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -4441,7 +5020,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
4441
5020
|
if (dist && dist.data) {
|
|
4442
5021
|
if (dist.data.format) return dist.data.format.toLowerCase();
|
|
4443
5022
|
if (dist.data.mediaType) {
|
|
4444
|
-
const mediaType = dist.data.mediaType.split(
|
|
5023
|
+
const mediaType = dist.data.mediaType.split('/');
|
|
4445
5024
|
if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
|
|
4446
5025
|
}
|
|
4447
5026
|
if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
|
|
@@ -4451,7 +5030,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
4451
5030
|
}
|
|
4452
5031
|
}
|
|
4453
5032
|
}
|
|
4454
|
-
return
|
|
5033
|
+
return '';
|
|
4455
5034
|
}
|
|
4456
5035
|
|
|
4457
5036
|
|
|
@@ -4495,8 +5074,8 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
4495
5074
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
4496
5075
|
href: dist.data.downloadURL,
|
|
4497
5076
|
style: {
|
|
4498
|
-
order: sm ?
|
|
4499
|
-
width: sm ?
|
|
5077
|
+
order: sm ? '1' : '0',
|
|
5078
|
+
width: sm ? '100%' : 'auto'
|
|
4500
5079
|
},
|
|
4501
5080
|
"aria-label": `Download ${dist.data.title || title} ${fileFormat}`,
|
|
4502
5081
|
className: "ds-c-button",
|
|
@@ -4509,7 +5088,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
4509
5088
|
})
|
|
4510
5089
|
}),
|
|
4511
5090
|
dist.data.description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4512
|
-
className:
|
|
5091
|
+
className: 'ds-u-measure--wide ds-u-margin-bottom--7',
|
|
4513
5092
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4514
5093
|
className: "dc-c-metadata-description ds-u-margin--0",
|
|
4515
5094
|
dangerouslySetInnerHTML: {
|
|
@@ -4581,7 +5160,7 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
4581
5160
|
const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
|
|
4582
5161
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
4583
5162
|
children: [
|
|
4584
|
-
md ?
|
|
5163
|
+
md ? '' : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
4585
5164
|
component: "th",
|
|
4586
5165
|
className: "ds-u-font-weight--bold",
|
|
4587
5166
|
children: [
|
|
@@ -4592,8 +5171,8 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
4592
5171
|
title: tooltip.title,
|
|
4593
5172
|
// @ts-ignore
|
|
4594
5173
|
style: {
|
|
4595
|
-
border:
|
|
4596
|
-
background:
|
|
5174
|
+
border: 'none',
|
|
5175
|
+
background: 'none'
|
|
4597
5176
|
},
|
|
4598
5177
|
maxWidth: "400px",
|
|
4599
5178
|
placement: "auto",
|
|
@@ -4652,10 +5231,10 @@ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: ap
|
|
|
4652
5231
|
href: apiUrl,
|
|
4653
5232
|
children: [
|
|
4654
5233
|
"View API",
|
|
4655
|
-
|
|
5234
|
+
' ',
|
|
4656
5235
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
4657
5236
|
style: {
|
|
4658
|
-
whiteSpace:
|
|
5237
|
+
whiteSpace: 'nowrap'
|
|
4659
5238
|
},
|
|
4660
5239
|
children: [
|
|
4661
5240
|
"specification ",
|
|
@@ -4696,20 +5275,20 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
|
|
|
4696
5275
|
|
|
4697
5276
|
const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
|
|
4698
5277
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
4699
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
5278
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
|
|
4700
5279
|
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
4701
5280
|
minWidth: 0,
|
|
4702
5281
|
maxWidth: 544
|
|
4703
5282
|
});
|
|
4704
5283
|
const sortElement = (isSorted)=>{
|
|
4705
|
-
if (isSorted ===
|
|
4706
|
-
if (isSorted ===
|
|
4707
|
-
return
|
|
5284
|
+
if (isSorted === 'asc') return 'dc-c-sort--asc';
|
|
5285
|
+
if (isSorted === 'desc') return 'dc-c-sort--desc';
|
|
5286
|
+
return 'dc-c-sort--default';
|
|
4708
5287
|
};
|
|
4709
5288
|
const table = (0, $hgUW1$useReactTable)({
|
|
4710
5289
|
data: tableData,
|
|
4711
5290
|
columns: tableColumns,
|
|
4712
|
-
columnResizeMode:
|
|
5291
|
+
columnResizeMode: 'onChange',
|
|
4713
5292
|
getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
|
|
4714
5293
|
getFilteredRowModel: (0, $hgUW1$getFilteredRowModel)(),
|
|
4715
5294
|
getPaginationRowModel: (0, $hgUW1$getPaginationRowModel)(),
|
|
@@ -4728,49 +5307,49 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
4728
5307
|
});
|
|
4729
5308
|
const sortOptions = [
|
|
4730
5309
|
{
|
|
4731
|
-
value:
|
|
4732
|
-
label:
|
|
5310
|
+
value: 'default',
|
|
5311
|
+
label: 'No Sort'
|
|
4733
5312
|
},
|
|
4734
5313
|
{
|
|
4735
|
-
value:
|
|
4736
|
-
label:
|
|
5314
|
+
value: 'titleasc',
|
|
5315
|
+
label: 'Title A-Z'
|
|
4737
5316
|
},
|
|
4738
5317
|
{
|
|
4739
|
-
value:
|
|
4740
|
-
label:
|
|
5318
|
+
value: 'titledesc',
|
|
5319
|
+
label: 'Title Z-A'
|
|
4741
5320
|
},
|
|
4742
5321
|
{
|
|
4743
|
-
value:
|
|
4744
|
-
label:
|
|
5322
|
+
value: 'typeasc',
|
|
5323
|
+
label: 'Type A-Z'
|
|
4745
5324
|
},
|
|
4746
5325
|
{
|
|
4747
|
-
value:
|
|
4748
|
-
label:
|
|
5326
|
+
value: 'typedesc',
|
|
5327
|
+
label: 'Type Z-A'
|
|
4749
5328
|
}
|
|
4750
5329
|
];
|
|
4751
5330
|
const sortStatesLookup = {
|
|
4752
5331
|
default: [],
|
|
4753
5332
|
titleasc: [
|
|
4754
5333
|
{
|
|
4755
|
-
id:
|
|
5334
|
+
id: 'titleResizable',
|
|
4756
5335
|
desc: false
|
|
4757
5336
|
}
|
|
4758
5337
|
],
|
|
4759
5338
|
titledesc: [
|
|
4760
5339
|
{
|
|
4761
|
-
id:
|
|
5340
|
+
id: 'titleResizable',
|
|
4762
5341
|
desc: true
|
|
4763
5342
|
}
|
|
4764
5343
|
],
|
|
4765
5344
|
typeasc: [
|
|
4766
5345
|
{
|
|
4767
|
-
id:
|
|
5346
|
+
id: 'type',
|
|
4768
5347
|
desc: false
|
|
4769
5348
|
}
|
|
4770
5349
|
],
|
|
4771
5350
|
typedesc: [
|
|
4772
5351
|
{
|
|
4773
|
-
id:
|
|
5352
|
+
id: 'type',
|
|
4774
5353
|
desc: true
|
|
4775
5354
|
}
|
|
4776
5355
|
]
|
|
@@ -4798,7 +5377,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
4798
5377
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
4799
5378
|
className: "dc-c-datatable",
|
|
4800
5379
|
style: {
|
|
4801
|
-
width:
|
|
5380
|
+
width: '100%'
|
|
4802
5381
|
},
|
|
4803
5382
|
stackable: true,
|
|
4804
5383
|
children: [
|
|
@@ -4814,12 +5393,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
4814
5393
|
}, header.id + "_resize") : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
4815
5394
|
key: header.id,
|
|
4816
5395
|
className: `ds-u-border-y--2 ds-u-border--dark ds-u-border-x--0`,
|
|
4817
|
-
id:
|
|
5396
|
+
id: 'dataDictionary_' + header.id,
|
|
4818
5397
|
children: [
|
|
4819
5398
|
(0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext()),
|
|
4820
|
-
header.id ===
|
|
5399
|
+
header.id === 'type' && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
4821
5400
|
onClick: header.column.getToggleSortingHandler(),
|
|
4822
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
5401
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : '',
|
|
4823
5402
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
4824
5403
|
})
|
|
4825
5404
|
]
|
|
@@ -4834,12 +5413,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
4834
5413
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
4835
5414
|
key: cell.id,
|
|
4836
5415
|
style: {
|
|
4837
|
-
maxWidth: mobile ?
|
|
4838
|
-
whiteSpace: cell.column.id === "description" ?
|
|
5416
|
+
maxWidth: mobile ? '100%' : cell.column.getSize(),
|
|
5417
|
+
whiteSpace: cell.column.id === "description" ? 'pre-wrap' : 'normal'
|
|
4839
5418
|
},
|
|
4840
|
-
className: `${cell.column.id ===
|
|
4841
|
-
headers:
|
|
4842
|
-
stackedTitle: cell.column.id ===
|
|
5419
|
+
className: `${cell.column.id === 'titleResizable' ? 'ds-u-word-break' : ''}`,
|
|
5420
|
+
headers: 'dataDictionary_' + cell.column.id,
|
|
5421
|
+
stackedTitle: cell.column.id === 'titleResizable' ? 'Title' : cell.column.columnDef.header,
|
|
4843
5422
|
children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
4844
5423
|
});
|
|
4845
5424
|
})
|
|
@@ -4868,7 +5447,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
4868
5447
|
table.setPageIndex(page - 1);
|
|
4869
5448
|
},
|
|
4870
5449
|
renderHref: (page)=>`/page=${page}`
|
|
4871
|
-
}) :
|
|
5450
|
+
}) : ''
|
|
4872
5451
|
]
|
|
4873
5452
|
});
|
|
4874
5453
|
};
|
|
@@ -4878,17 +5457,17 @@ var $6765a74df807d015$export$2e2bcd8739ae039 = $6765a74df807d015$var$DataDiction
|
|
|
4878
5457
|
const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
|
|
4879
5458
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
4880
5459
|
const tableColumns = [
|
|
4881
|
-
columnHelper.accessor(
|
|
4882
|
-
header:
|
|
5460
|
+
columnHelper.accessor('name', {
|
|
5461
|
+
header: 'Name'
|
|
4883
5462
|
}),
|
|
4884
|
-
columnHelper.accessor(
|
|
4885
|
-
header:
|
|
5463
|
+
columnHelper.accessor('title', {
|
|
5464
|
+
header: 'Title'
|
|
4886
5465
|
}),
|
|
4887
|
-
columnHelper.accessor(
|
|
4888
|
-
header:
|
|
5466
|
+
columnHelper.accessor('type', {
|
|
5467
|
+
header: 'Type'
|
|
4889
5468
|
}),
|
|
4890
|
-
columnHelper.accessor(
|
|
4891
|
-
header:
|
|
5469
|
+
columnHelper.accessor('format', {
|
|
5470
|
+
header: 'Format'
|
|
4892
5471
|
})
|
|
4893
5472
|
];
|
|
4894
5473
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6765a74df807d015$export$2e2bcd8739ae039), {
|
|
@@ -4932,7 +5511,7 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
4932
5511
|
});
|
|
4933
5512
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
4934
5513
|
const tableColumns = [
|
|
4935
|
-
columnHelper.accessor(
|
|
5514
|
+
columnHelper.accessor('titleResizable', {
|
|
4936
5515
|
header: ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4937
5516
|
className: "dc-c-tooltip-width-override",
|
|
4938
5517
|
children: [
|
|
@@ -4941,8 +5520,8 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
4941
5520
|
title: "Title represents the column headers of the data file",
|
|
4942
5521
|
// @ts-ignore
|
|
4943
5522
|
style: {
|
|
4944
|
-
border:
|
|
4945
|
-
background:
|
|
5523
|
+
border: 'none',
|
|
5524
|
+
background: 'none'
|
|
4946
5525
|
},
|
|
4947
5526
|
maxWidth: "400px",
|
|
4948
5527
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
|
|
@@ -4952,48 +5531,48 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
4952
5531
|
size: 300,
|
|
4953
5532
|
minSize: 132
|
|
4954
5533
|
}),
|
|
4955
|
-
columnHelper.accessor(
|
|
4956
|
-
header:
|
|
5534
|
+
columnHelper.accessor('description', {
|
|
5535
|
+
header: 'Description',
|
|
4957
5536
|
minSize: 600
|
|
4958
5537
|
}),
|
|
4959
|
-
columnHelper.accessor(
|
|
4960
|
-
header:
|
|
5538
|
+
columnHelper.accessor('type', {
|
|
5539
|
+
header: 'Type',
|
|
4961
5540
|
size: 150,
|
|
4962
5541
|
enableResizing: false
|
|
4963
5542
|
})
|
|
4964
5543
|
];
|
|
4965
5544
|
const typeOptions = [
|
|
4966
5545
|
{
|
|
4967
|
-
value:
|
|
4968
|
-
label:
|
|
5546
|
+
value: 'all',
|
|
5547
|
+
label: 'All Types'
|
|
4969
5548
|
},
|
|
4970
5549
|
{
|
|
4971
|
-
value:
|
|
4972
|
-
label:
|
|
5550
|
+
value: 'string',
|
|
5551
|
+
label: 'String'
|
|
4973
5552
|
},
|
|
4974
5553
|
{
|
|
4975
|
-
value:
|
|
4976
|
-
label:
|
|
5554
|
+
value: 'date',
|
|
5555
|
+
label: 'Date'
|
|
4977
5556
|
},
|
|
4978
5557
|
{
|
|
4979
|
-
value:
|
|
4980
|
-
label:
|
|
5558
|
+
value: 'datetime',
|
|
5559
|
+
label: 'Datetime'
|
|
4981
5560
|
},
|
|
4982
5561
|
{
|
|
4983
|
-
value:
|
|
4984
|
-
label:
|
|
5562
|
+
value: 'year',
|
|
5563
|
+
label: 'Year'
|
|
4985
5564
|
},
|
|
4986
5565
|
{
|
|
4987
|
-
value:
|
|
4988
|
-
label:
|
|
5566
|
+
value: 'integer',
|
|
5567
|
+
label: 'Integer'
|
|
4989
5568
|
},
|
|
4990
5569
|
{
|
|
4991
|
-
value:
|
|
4992
|
-
label:
|
|
5570
|
+
value: 'number',
|
|
5571
|
+
label: 'Number'
|
|
4993
5572
|
},
|
|
4994
5573
|
{
|
|
4995
|
-
value:
|
|
4996
|
-
label:
|
|
5574
|
+
value: 'boolean',
|
|
5575
|
+
label: 'Boolean'
|
|
4997
5576
|
}
|
|
4998
5577
|
];
|
|
4999
5578
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -5100,7 +5679,7 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
|
|
|
5100
5679
|
href: datasetDictionaryEndpoint + "/csv",
|
|
5101
5680
|
className: "ds-c-button",
|
|
5102
5681
|
style: {
|
|
5103
|
-
width:
|
|
5682
|
+
width: '100%'
|
|
5104
5683
|
},
|
|
5105
5684
|
children: [
|
|
5106
5685
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
@@ -5179,7 +5758,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
5179
5758
|
const [description, setDescription] = (0, $hgUW1$useState)("");
|
|
5180
5759
|
if (!distribution && !dataset?.identifier) return null;
|
|
5181
5760
|
(0, $hgUW1$useEffect)(()=>{
|
|
5182
|
-
let newDescription =
|
|
5761
|
+
let newDescription = '';
|
|
5183
5762
|
if (customDescription) newDescription = customDescription(dataset, distribution, resource);
|
|
5184
5763
|
else {
|
|
5185
5764
|
if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
|
|
@@ -5194,7 +5773,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
5194
5773
|
customDescription
|
|
5195
5774
|
]);
|
|
5196
5775
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5197
|
-
className:
|
|
5776
|
+
className: 'ds-u-measure--wide ds-u-margin-bottom--7',
|
|
5198
5777
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5199
5778
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
5200
5779
|
dangerouslySetInnerHTML: {
|
|
@@ -5216,7 +5795,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
5216
5795
|
],
|
|
5217
5796
|
queryFn: ()=>{
|
|
5218
5797
|
return fetch(`${dataDictionaryUrl}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA), {
|
|
5219
|
-
arrayFormat:
|
|
5798
|
+
arrayFormat: 'comma',
|
|
5220
5799
|
encode: false
|
|
5221
5800
|
})}`).then((res)=>res.json());
|
|
5222
5801
|
}
|
|
@@ -5235,7 +5814,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5235
5814
|
conditions: []
|
|
5236
5815
|
};
|
|
5237
5816
|
const { dataset: dataset, isPending: isPending } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
5238
|
-
const title = dataset.title ? dataset.title :
|
|
5817
|
+
const title = dataset.title ? dataset.title : '';
|
|
5239
5818
|
const metadataMapping = {
|
|
5240
5819
|
...(0, $6da0396069e23175$export$bc27cf7ecf44639d),
|
|
5241
5820
|
...customMetadataMapping
|
|
@@ -5243,7 +5822,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5243
5822
|
let distribution = {};
|
|
5244
5823
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
5245
5824
|
if (distributions.length) distribution = distributions[0];
|
|
5246
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
5825
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
5247
5826
|
...options,
|
|
5248
5827
|
limit: defaultPageSize
|
|
5249
5828
|
});
|
|
@@ -5255,7 +5834,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5255
5834
|
}) : null;
|
|
5256
5835
|
(0, $hgUW1$useEffect)(()=>{
|
|
5257
5836
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
5258
|
-
if (localFileFormat ===
|
|
5837
|
+
if (localFileFormat === 'csv') resource.setResource(distribution.identifier);
|
|
5259
5838
|
}, [
|
|
5260
5839
|
distribution
|
|
5261
5840
|
]);
|
|
@@ -5310,26 +5889,26 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5310
5889
|
distribution,
|
|
5311
5890
|
window.location.hash
|
|
5312
5891
|
]);
|
|
5313
|
-
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType ===
|
|
5892
|
+
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === 'application/vnd.tableschema+json' || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
5314
5893
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
5315
5894
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
5316
5895
|
content: notFoundContent,
|
|
5317
5896
|
siteUrl: rootUrl
|
|
5318
5897
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5319
|
-
className:
|
|
5898
|
+
className: 'ds-l-container',
|
|
5320
5899
|
children: [
|
|
5321
5900
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5322
|
-
className:
|
|
5901
|
+
className: 'ds-l-row',
|
|
5323
5902
|
children: [
|
|
5324
5903
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5325
|
-
className:
|
|
5904
|
+
className: 'ds-l-md-col--9',
|
|
5326
5905
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
5327
5906
|
className: "ds-text-heading--3xl",
|
|
5328
5907
|
children: title
|
|
5329
5908
|
})
|
|
5330
5909
|
}),
|
|
5331
5910
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5332
|
-
className:
|
|
5911
|
+
className: 'ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right',
|
|
5333
5912
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
5334
5913
|
className: "ds-u-margin--0",
|
|
5335
5914
|
children: [
|
|
@@ -5341,7 +5920,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5341
5920
|
})
|
|
5342
5921
|
}),
|
|
5343
5922
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5344
|
-
className:
|
|
5923
|
+
className: 'ds-l-md-col--9',
|
|
5345
5924
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
5346
5925
|
distribution: distribution,
|
|
5347
5926
|
dataset: dataset,
|
|
@@ -5353,9 +5932,9 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5353
5932
|
]
|
|
5354
5933
|
}),
|
|
5355
5934
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5356
|
-
className:
|
|
5935
|
+
className: 'ds-l-row',
|
|
5357
5936
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5358
|
-
className:
|
|
5937
|
+
className: 'ds-l-md-col--12 dc-dataset',
|
|
5359
5938
|
children: !isPending && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tabs), {
|
|
5360
5939
|
onChange: (selectedId, prevSelectedId)=>{
|
|
5361
5940
|
setSelectedTab(selectedId);
|
|
@@ -5363,7 +5942,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5363
5942
|
selectedId: selectedTab,
|
|
5364
5943
|
children: [
|
|
5365
5944
|
(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
5366
|
-
id:
|
|
5945
|
+
id: 'data-table',
|
|
5367
5946
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5368
5947
|
className: "ds-u-color--primary",
|
|
5369
5948
|
children: [
|
|
@@ -5373,7 +5952,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5373
5952
|
"Data Table"
|
|
5374
5953
|
]
|
|
5375
5954
|
}),
|
|
5376
|
-
className: borderlessTabs ?
|
|
5955
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
5377
5956
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
5378
5957
|
value: {
|
|
5379
5958
|
id: id,
|
|
@@ -5388,7 +5967,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5388
5967
|
})
|
|
5389
5968
|
}),
|
|
5390
5969
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
5391
|
-
id:
|
|
5970
|
+
id: 'overview',
|
|
5392
5971
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5393
5972
|
className: "ds-u-color--primary",
|
|
5394
5973
|
children: [
|
|
@@ -5398,7 +5977,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5398
5977
|
"Overview"
|
|
5399
5978
|
]
|
|
5400
5979
|
}),
|
|
5401
|
-
className: borderlessTabs ?
|
|
5980
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
5402
5981
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
|
|
5403
5982
|
resource: resource,
|
|
5404
5983
|
dataset: dataset,
|
|
@@ -5407,7 +5986,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5407
5986
|
})
|
|
5408
5987
|
}),
|
|
5409
5988
|
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TabPanel), {
|
|
5410
|
-
id:
|
|
5989
|
+
id: 'data-dictionary',
|
|
5411
5990
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5412
5991
|
className: "ds-u-color--primary",
|
|
5413
5992
|
children: [
|
|
@@ -5417,7 +5996,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5417
5996
|
"Data Dictionary"
|
|
5418
5997
|
]
|
|
5419
5998
|
}),
|
|
5420
|
-
className: borderlessTabs ?
|
|
5999
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
5421
6000
|
children: [
|
|
5422
6001
|
displayDataDictionaryTab && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
5423
6002
|
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
@@ -5431,7 +6010,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5431
6010
|
]
|
|
5432
6011
|
}),
|
|
5433
6012
|
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
5434
|
-
id:
|
|
6013
|
+
id: 'api',
|
|
5435
6014
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5436
6015
|
className: "ds-u-color--primary",
|
|
5437
6016
|
children: [
|
|
@@ -5441,7 +6020,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5441
6020
|
"API"
|
|
5442
6021
|
]
|
|
5443
6022
|
}),
|
|
5444
|
-
className: borderlessTabs ?
|
|
6023
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
5445
6024
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
|
|
5446
6025
|
id: id,
|
|
5447
6026
|
rootUrl: rootUrl,
|
|
@@ -5478,13 +6057,13 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
5478
6057
|
});
|
|
5479
6058
|
const menu = (0, $hgUW1$useRef)(null);
|
|
5480
6059
|
function closeMobileMenu() {
|
|
5481
|
-
const mobileMenuButtonElement = document.querySelector(
|
|
6060
|
+
const mobileMenuButtonElement = document.querySelector('.dkan-c-mobile-menu-button');
|
|
5482
6061
|
if (!mobileMenuButtonElement) return;
|
|
5483
6062
|
mobileMenuButtonElement.focus();
|
|
5484
6063
|
}
|
|
5485
6064
|
// Close mobile menu with escape.
|
|
5486
6065
|
function handleMenuClose(event) {
|
|
5487
|
-
if (event.key ===
|
|
6066
|
+
if (event.key === 'Escape' && mobileMenuOpen) setMobileMenuOpen(false);
|
|
5488
6067
|
}
|
|
5489
6068
|
function handleClick(event) {
|
|
5490
6069
|
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
@@ -5519,7 +6098,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
5519
6098
|
const focusableEls = getFocusableElements(menu.current).selectors.visible;
|
|
5520
6099
|
const firstEl = focusableEls[0];
|
|
5521
6100
|
const lastEl = focusableEls[focusableEls.length - 1];
|
|
5522
|
-
if (event.key ===
|
|
6101
|
+
if (event.key === 'Tab') {
|
|
5523
6102
|
if (event.shiftKey && document.activeElement === firstEl) {
|
|
5524
6103
|
lastEl?.focus();
|
|
5525
6104
|
event.preventDefault();
|
|
@@ -5531,15 +6110,15 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
5531
6110
|
}
|
|
5532
6111
|
};
|
|
5533
6112
|
(0, $hgUW1$useEffect)(()=>{
|
|
5534
|
-
document.addEventListener(
|
|
5535
|
-
document.addEventListener(
|
|
6113
|
+
document.addEventListener('keyup', handleMenuClose);
|
|
6114
|
+
document.addEventListener('mousedown', handleClick);
|
|
5536
6115
|
if (mobileMenuOpen) handleFocusIn();
|
|
5537
6116
|
else closeMobileMenu();
|
|
5538
|
-
if (menu.current) menu.current.addEventListener(
|
|
6117
|
+
if (menu.current) menu.current.addEventListener('keydown', (evt)=>trapFocus(evt));
|
|
5539
6118
|
return ()=>{
|
|
5540
|
-
document.removeEventListener(
|
|
5541
|
-
document.addEventListener(
|
|
5542
|
-
if (menu.current) menu.current.removeEventListener(
|
|
6119
|
+
document.removeEventListener('keyup', handleMenuClose);
|
|
6120
|
+
document.addEventListener('mousedown', handleClick);
|
|
6121
|
+
if (menu.current) menu.current.removeEventListener('keydown', trapFocus);
|
|
5543
6122
|
};
|
|
5544
6123
|
}, [
|
|
5545
6124
|
mobileMenuOpen
|
|
@@ -5554,7 +6133,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
5554
6133
|
},
|
|
5555
6134
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
|
|
5556
6135
|
"aria-label": "Site header",
|
|
5557
|
-
className: `dkan-c-header dkan-c-header--${mobileMax ?
|
|
6136
|
+
className: `dkan-c-header dkan-c-header--${mobileMax ? 'mobile' : 'desktop'}`,
|
|
5558
6137
|
children: [
|
|
5559
6138
|
topNav && topNav,
|
|
5560
6139
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -5597,7 +6176,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
5597
6176
|
var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
|
|
5598
6177
|
|
|
5599
6178
|
|
|
5600
|
-
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle =
|
|
6179
|
+
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", {
|
|
5601
6180
|
children: [
|
|
5602
6181
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
5603
6182
|
children: "A federal government website managed and paid for by the U.S. Centers for Medicare & Medicaid Services."
|
|
@@ -5685,14 +6264,14 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
5685
6264
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
5686
6265
|
className: "ds-u-font-size--sm",
|
|
5687
6266
|
children: footerAdditionalResourcesLinks.filter((link)=>{
|
|
5688
|
-
const noOnClick = Object.keys(link).findIndex((l)=>l ===
|
|
6267
|
+
const noOnClick = Object.keys(link).findIndex((l)=>l === 'onClick');
|
|
5689
6268
|
if (noOnClick === -1 || link.onClick && link.dataTag) return link;
|
|
5690
6269
|
}).map((link)=>{
|
|
5691
6270
|
if (link.onClick && link.dataTag) return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
5692
6271
|
className: "ds-u-margin-bottom--1",
|
|
5693
6272
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5694
6273
|
href: link.url,
|
|
5695
|
-
[
|
|
6274
|
+
['data-' + link.dataTag.name]: link.dataTag.value,
|
|
5696
6275
|
onClick: link.onClick,
|
|
5697
6276
|
children: link.label
|
|
5698
6277
|
})
|
|
@@ -5792,7 +6371,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
5792
6371
|
children: [
|
|
5793
6372
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
5794
6373
|
id: "svg-inline--fa-title-iRCARP7h6Kp3",
|
|
5795
|
-
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title :
|
|
6374
|
+
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title : 'CMS Facebook'
|
|
5796
6375
|
}),
|
|
5797
6376
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
5798
6377
|
transform: "translate(160 256)",
|
|
@@ -5845,7 +6424,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
5845
6424
|
children: [
|
|
5846
6425
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
5847
6426
|
id: "svg-inline--fa-title-4z03ITiPPTVF",
|
|
5848
|
-
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title :
|
|
6427
|
+
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title : 'CMS Twitter'
|
|
5849
6428
|
}),
|
|
5850
6429
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
5851
6430
|
transform: "translate(256 256)",
|
|
@@ -5898,7 +6477,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
5898
6477
|
children: [
|
|
5899
6478
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
5900
6479
|
id: "svg-inline--fa-title-Nm2qsuSKvuRZ",
|
|
5901
|
-
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title :
|
|
6480
|
+
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title : 'CMS LinkedIn'
|
|
5902
6481
|
}),
|
|
5903
6482
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
5904
6483
|
transform: "translate(224 256)",
|
|
@@ -5950,7 +6529,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
5950
6529
|
children: [
|
|
5951
6530
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
5952
6531
|
id: "svg-inline--fa-title-youtube",
|
|
5953
|
-
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title :
|
|
6532
|
+
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title : 'CMS youtube'
|
|
5954
6533
|
}),
|
|
5955
6534
|
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
5956
6535
|
fill: "currentColor",
|
|
@@ -6050,26 +6629,26 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
6050
6629
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6051
6630
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
6052
6631
|
stackable: true,
|
|
6053
|
-
className:
|
|
6632
|
+
className: 'ds-c-table',
|
|
6054
6633
|
children: [
|
|
6055
6634
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
|
|
6056
6635
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
6057
6636
|
children: [
|
|
6058
6637
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6059
|
-
id:
|
|
6060
|
-
headers:
|
|
6638
|
+
id: 'application',
|
|
6639
|
+
headers: 'Application',
|
|
6061
6640
|
children: "Application"
|
|
6062
|
-
},
|
|
6641
|
+
}, 'Application'),
|
|
6063
6642
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6064
|
-
id:
|
|
6065
|
-
headers:
|
|
6643
|
+
id: 'notes',
|
|
6644
|
+
headers: 'Notes',
|
|
6066
6645
|
children: "Notes"
|
|
6067
|
-
},
|
|
6646
|
+
}, 'Notes'),
|
|
6068
6647
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6069
|
-
id:
|
|
6070
|
-
headers:
|
|
6648
|
+
id: 'links',
|
|
6649
|
+
headers: 'Links',
|
|
6071
6650
|
children: "Links"
|
|
6072
|
-
},
|
|
6651
|
+
}, 'Links')
|
|
6073
6652
|
]
|
|
6074
6653
|
})
|
|
6075
6654
|
}),
|
|
@@ -6079,19 +6658,19 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
6079
6658
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6080
6659
|
id: d.id,
|
|
6081
6660
|
stackedTitle: "Application",
|
|
6082
|
-
headers:
|
|
6661
|
+
headers: 'Application',
|
|
6083
6662
|
children: d.application
|
|
6084
6663
|
}, d.id),
|
|
6085
6664
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6086
6665
|
id: d.id,
|
|
6087
6666
|
stackedTitle: "Notes",
|
|
6088
|
-
headers:
|
|
6667
|
+
headers: 'Notes',
|
|
6089
6668
|
children: d.notes
|
|
6090
6669
|
}, `${d.id}-notes`),
|
|
6091
6670
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6092
6671
|
id: d.id,
|
|
6093
6672
|
stackedTitle: "Links",
|
|
6094
|
-
headers:
|
|
6673
|
+
headers: 'Links',
|
|
6095
6674
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
6096
6675
|
className: "dkan-newtab",
|
|
6097
6676
|
href: d.link,
|
|
@@ -6119,44 +6698,44 @@ var $5655284dbbb89508$export$2e2bcd8739ae039 = $5655284dbbb89508$var$Documentati
|
|
|
6119
6698
|
|
|
6120
6699
|
const $c7bf75f7e8a68780$export$7850f4d545d994c6 = [
|
|
6121
6700
|
{
|
|
6122
|
-
id:
|
|
6123
|
-
application:
|
|
6124
|
-
notes:
|
|
6125
|
-
link:
|
|
6126
|
-
linkText:
|
|
6127
|
-
screenReaderOnlyText:
|
|
6701
|
+
id: 'excel',
|
|
6702
|
+
application: 'Microsoft Excel',
|
|
6703
|
+
notes: 'Official size limitations for Microsoft Excel',
|
|
6704
|
+
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',
|
|
6705
|
+
linkText: 'Excel Specifications and Limits',
|
|
6706
|
+
screenReaderOnlyText: 'on microsoft.com'
|
|
6128
6707
|
},
|
|
6129
6708
|
{
|
|
6130
|
-
id:
|
|
6131
|
-
application:
|
|
6132
|
-
notes:
|
|
6133
|
-
link:
|
|
6134
|
-
linkText:
|
|
6135
|
-
screenReaderOnlyText:
|
|
6709
|
+
id: 'access',
|
|
6710
|
+
application: 'Microsoft Access',
|
|
6711
|
+
notes: 'Official size limitations for Microsoft Access',
|
|
6712
|
+
link: 'https://support.microsoft.com/en-us/office/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c?ui=en-us&rs=en-us&ad=us',
|
|
6713
|
+
linkText: 'Access 2016 Specifications',
|
|
6714
|
+
screenReaderOnlyText: 'on microsoft.com'
|
|
6136
6715
|
},
|
|
6137
6716
|
{
|
|
6138
|
-
id:
|
|
6139
|
-
application:
|
|
6140
|
-
notes:
|
|
6141
|
-
link:
|
|
6142
|
-
linkText:
|
|
6143
|
-
screenReaderOnlyText:
|
|
6717
|
+
id: 'oracle-sql-developer',
|
|
6718
|
+
application: 'Oracle SQL Developer',
|
|
6719
|
+
notes: 'Oracle SQL Developer tool',
|
|
6720
|
+
link: 'https://www.oracle.com/database/sqldeveloper/',
|
|
6721
|
+
linkText: 'Oracle SQL Developer Overview',
|
|
6722
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
6144
6723
|
},
|
|
6145
6724
|
{
|
|
6146
|
-
id:
|
|
6147
|
-
application:
|
|
6148
|
-
notes:
|
|
6149
|
-
link:
|
|
6150
|
-
linkText:
|
|
6151
|
-
screenReaderOnlyText:
|
|
6725
|
+
id: 'oracle-database',
|
|
6726
|
+
application: 'Oracle Database',
|
|
6727
|
+
notes: 'Oracle Database official size limitations',
|
|
6728
|
+
link: 'https://docs.oracle.com/cd/B28359_01/server.111/b28320/limits002.htm#i287915',
|
|
6729
|
+
linkText: 'Oracle Physical Database Limits',
|
|
6730
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
6152
6731
|
},
|
|
6153
6732
|
{
|
|
6154
|
-
id:
|
|
6155
|
-
application:
|
|
6156
|
-
notes:
|
|
6157
|
-
link:
|
|
6158
|
-
linkText:
|
|
6159
|
-
screenReaderOnlyText:
|
|
6733
|
+
id: 'oracle-sql-client-tools',
|
|
6734
|
+
application: 'Oracle SQL Client Tools',
|
|
6735
|
+
notes: 'Oracle SQL Client Tools',
|
|
6736
|
+
link: 'https://www.oracle.com/database/technologies/oracle-database-software-downloads.html',
|
|
6737
|
+
linkText: 'Oracle SQL Client',
|
|
6738
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
6160
6739
|
}
|
|
6161
6740
|
];
|
|
6162
6741
|
|
|
@@ -6184,7 +6763,7 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
6184
6763
|
}),
|
|
6185
6764
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
6186
6765
|
heading: "Notice",
|
|
6187
|
-
className:
|
|
6766
|
+
className: 'ds-u-margin-top--6',
|
|
6188
6767
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6189
6768
|
className: "ds-c-alert__text",
|
|
6190
6769
|
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."
|
|
@@ -6193,16 +6772,16 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
6193
6772
|
]
|
|
6194
6773
|
}),
|
|
6195
6774
|
/*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
6196
|
-
className:
|
|
6775
|
+
className: 'ds-u-margin-top--4 ds-l-row',
|
|
6197
6776
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6198
|
-
className:
|
|
6777
|
+
className: 'ds-l-col--12',
|
|
6199
6778
|
children: [
|
|
6200
6779
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
6201
6780
|
className: "ds-text-heading--2xl ds-text-heading--2xl",
|
|
6202
6781
|
children: "Documentation by Application"
|
|
6203
6782
|
}),
|
|
6204
6783
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6205
|
-
className:
|
|
6784
|
+
className: 'ds-u-margin-top--4',
|
|
6206
6785
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5655284dbbb89508$export$2e2bcd8739ae039), {
|
|
6207
6786
|
data: documentationList
|
|
6208
6787
|
})
|
|
@@ -6230,7 +6809,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
6230
6809
|
const options = {
|
|
6231
6810
|
conditions: query ? JSON.parse(query).map(({ column: column, operator: operator, ...rest })=>({
|
|
6232
6811
|
property: column,
|
|
6233
|
-
operator: operator ===
|
|
6812
|
+
operator: operator === 'is' ? '=' : operator === 'is not' ? '<>' : operator === 'or' ? 'in' : operator,
|
|
6234
6813
|
...rest
|
|
6235
6814
|
})) : []
|
|
6236
6815
|
};
|
|
@@ -6238,13 +6817,13 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
6238
6817
|
let distribution = {};
|
|
6239
6818
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
6240
6819
|
if (distributions.length) distribution = distributions[distributionIndex];
|
|
6241
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
6820
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
6242
6821
|
...options,
|
|
6243
6822
|
limit: defaultPageSize
|
|
6244
6823
|
});
|
|
6245
6824
|
(0, $hgUW1$useEffect)(()=>{
|
|
6246
6825
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6247
|
-
if (localFileFormat ===
|
|
6826
|
+
if (localFileFormat === 'csv') resource.setResource(distribution.identifier);
|
|
6248
6827
|
}, [
|
|
6249
6828
|
distribution
|
|
6250
6829
|
]);
|
|
@@ -6295,7 +6874,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
6295
6874
|
|
|
6296
6875
|
|
|
6297
6876
|
function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
|
|
6298
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
6877
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
6299
6878
|
const newDate = new Date(condition.value);
|
|
6300
6879
|
if (newDate instanceof Date && !isNaN(newDate)) return newDate;
|
|
6301
6880
|
}
|
|
@@ -6312,9 +6891,9 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
6312
6891
|
const [startDate, setStartDate] = (0, $hgUW1$react).useState($374c4669b044ddf8$var$getStartDate(condition, schema, id));
|
|
6313
6892
|
(0, $hgUW1$useEffect)(()=>{
|
|
6314
6893
|
if (property !== condition.property) {
|
|
6315
|
-
if (property) update(index,
|
|
6316
|
-
else update(index,
|
|
6317
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
6894
|
+
if (property) update(index, 'property', property);
|
|
6895
|
+
else update(index, 'property', '');
|
|
6896
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
6318
6897
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
6319
6898
|
}
|
|
6320
6899
|
}
|
|
@@ -6328,16 +6907,16 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
6328
6907
|
]);
|
|
6329
6908
|
(0, $hgUW1$useEffect)(()=>{
|
|
6330
6909
|
if (operator !== condition.operator) {
|
|
6331
|
-
if (operator) update(index,
|
|
6332
|
-
else update(index,
|
|
6910
|
+
if (operator) update(index, 'operator', operator);
|
|
6911
|
+
else update(index, 'operator', '');
|
|
6333
6912
|
}
|
|
6334
6913
|
}, [
|
|
6335
6914
|
operator
|
|
6336
6915
|
]);
|
|
6337
6916
|
(0, $hgUW1$useEffect)(()=>{
|
|
6338
6917
|
if (value !== condition.value) {
|
|
6339
|
-
if (value) update(index,
|
|
6340
|
-
else update(index,
|
|
6918
|
+
if (value) update(index, 'value', value);
|
|
6919
|
+
else update(index, 'value', '');
|
|
6341
6920
|
}
|
|
6342
6921
|
}, [
|
|
6343
6922
|
value
|
|
@@ -6361,7 +6940,7 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
6361
6940
|
onChange: (e)=>setOperator(e.target.value),
|
|
6362
6941
|
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"
|
|
6363
6942
|
}),
|
|
6364
|
-
schema[id].fields[property].mysql_type ===
|
|
6943
|
+
schema[id].fields[property].mysql_type === 'date' ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6365
6944
|
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",
|
|
6366
6945
|
children: [
|
|
6367
6946
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
@@ -6411,19 +6990,19 @@ var $374c4669b044ddf8$export$2e2bcd8739ae039 = $374c4669b044ddf8$var$QueryRow;
|
|
|
6411
6990
|
function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
|
|
6412
6991
|
let cond = condition;
|
|
6413
6992
|
delete cond.key;
|
|
6414
|
-
if (cond.operator ===
|
|
6993
|
+
if (cond.operator === '=' || cond.operator === '<>') {
|
|
6415
6994
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
6416
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
6995
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
6417
6996
|
}
|
|
6418
|
-
if (cond.operator.toLowerCase() ===
|
|
6997
|
+
if (cond.operator.toLowerCase() === 'like') {
|
|
6419
6998
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
6420
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
6999
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
6421
7000
|
cond.value = `%${cleanedValue}%`;
|
|
6422
7001
|
}
|
|
6423
|
-
if (cond.operator.toLowerCase() ===
|
|
6424
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
7002
|
+
if (cond.operator.toLowerCase() === 'in') {
|
|
7003
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(',');
|
|
6425
7004
|
}
|
|
6426
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
7005
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ''));
|
|
6427
7006
|
return cond;
|
|
6428
7007
|
}
|
|
6429
7008
|
const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, setOffset: setOffset })=>{
|
|
@@ -6443,7 +7022,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
6443
7022
|
...queryConditions,
|
|
6444
7023
|
{
|
|
6445
7024
|
property: fields[0],
|
|
6446
|
-
value:
|
|
7025
|
+
value: '',
|
|
6447
7026
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
6448
7027
|
key: Date.now()
|
|
6449
7028
|
}
|
|
@@ -6483,7 +7062,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
6483
7062
|
encodeValuesOnly: true,
|
|
6484
7063
|
addQueryPrefix: true
|
|
6485
7064
|
});
|
|
6486
|
-
window.history.pushState({},
|
|
7065
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
6487
7066
|
};
|
|
6488
7067
|
const updateCondition = (index, key, value)=>{
|
|
6489
7068
|
let newConditions = [
|
|
@@ -6556,7 +7135,7 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
|
|
|
6556
7135
|
|
|
6557
7136
|
|
|
6558
7137
|
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 })=>{
|
|
6559
|
-
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState(
|
|
7138
|
+
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState('ds-u-padding-y--1');
|
|
6560
7139
|
let apiDocs = (0, $hgUW1$useRef)();
|
|
6561
7140
|
let distribution = {};
|
|
6562
7141
|
let distribution_array = dataset.distribution ? dataset.distribution : [];
|
|
@@ -6568,7 +7147,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6568
7147
|
} : {
|
|
6569
7148
|
conditions: []
|
|
6570
7149
|
};
|
|
6571
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7150
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
6572
7151
|
...options,
|
|
6573
7152
|
limit: 25
|
|
6574
7153
|
});
|
|
@@ -6582,7 +7161,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6582
7161
|
}, {
|
|
6583
7162
|
encode: true
|
|
6584
7163
|
})}&format=csv`;
|
|
6585
|
-
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !==
|
|
7164
|
+
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !== 'csv' ? distribution.data.title : dataset.title;
|
|
6586
7165
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
6587
7166
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
6588
7167
|
className: "ds-l-container ds-u-padding-bottom--3 ds-u-margin-bottom--2",
|
|
@@ -6591,7 +7170,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6591
7170
|
children: Object.keys(distribution).length && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
6592
7171
|
children: [
|
|
6593
7172
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6594
|
-
className:
|
|
7173
|
+
className: 'ds-l-md-col--9',
|
|
6595
7174
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
6596
7175
|
to: `/dataset/${id}`,
|
|
6597
7176
|
className: "ds-u-padding-y--4 ds-u-display--block",
|
|
@@ -6602,14 +7181,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6602
7181
|
})
|
|
6603
7182
|
}),
|
|
6604
7183
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6605
|
-
className:
|
|
7184
|
+
className: 'ds-l-md-col--9',
|
|
6606
7185
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
6607
7186
|
className: "ds-text-heading--3xl",
|
|
6608
7187
|
children: customTitle ? customTitle : pageTitle
|
|
6609
7188
|
})
|
|
6610
7189
|
}),
|
|
6611
7190
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6612
|
-
className:
|
|
7191
|
+
className: 'ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right',
|
|
6613
7192
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
6614
7193
|
className: "ds-u-margin--0",
|
|
6615
7194
|
children: [
|
|
@@ -6621,7 +7200,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6621
7200
|
})
|
|
6622
7201
|
}),
|
|
6623
7202
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6624
|
-
className:
|
|
7203
|
+
className: 'ds-l-md-col--9',
|
|
6625
7204
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
6626
7205
|
distribution: distribution,
|
|
6627
7206
|
dataset: dataset,
|
|
@@ -6631,13 +7210,13 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6631
7210
|
})
|
|
6632
7211
|
}),
|
|
6633
7212
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6634
|
-
className:
|
|
7213
|
+
className: 'ds-l-md-col--12',
|
|
6635
7214
|
children: Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
|
|
6636
7215
|
resource: resource,
|
|
6637
7216
|
id: distribution.identifier,
|
|
6638
7217
|
customColumns: customColumns,
|
|
6639
7218
|
setOffset: resource.setOffset
|
|
6640
|
-
}) :
|
|
7219
|
+
}) : ''
|
|
6641
7220
|
}),
|
|
6642
7221
|
Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
6643
7222
|
value: {
|
|
@@ -6648,7 +7227,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6648
7227
|
customColumns: (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution_array[distIndex].identifier])
|
|
6649
7228
|
},
|
|
6650
7229
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6651
|
-
className:
|
|
7230
|
+
className: 'ds-l-md-col--12',
|
|
6652
7231
|
children: [
|
|
6653
7232
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $af099c546cb226c7$export$2e2bcd8739ae039), {
|
|
6654
7233
|
includeDensity: true,
|
|
@@ -6670,14 +7249,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6670
7249
|
]
|
|
6671
7250
|
})
|
|
6672
7251
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6673
|
-
className:
|
|
7252
|
+
className: 'ds-l-md-col--12',
|
|
6674
7253
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
6675
7254
|
role: "status",
|
|
6676
7255
|
"aria-valuetext": "Resource loading"
|
|
6677
7256
|
})
|
|
6678
7257
|
}),
|
|
6679
7258
|
dataset.identifier && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6680
|
-
className:
|
|
7259
|
+
className: 'ds-l-md-col--12',
|
|
6681
7260
|
ref: apiDocs,
|
|
6682
7261
|
children: [
|
|
6683
7262
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
@@ -6686,7 +7265,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6686
7265
|
}),
|
|
6687
7266
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
6688
7267
|
url: `${rootUrl}/metastore/schemas/dataset/items/${dataset.identifier}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`,
|
|
6689
|
-
docExpansion:
|
|
7268
|
+
docExpansion: 'list',
|
|
6690
7269
|
defaultModelsExpandDepth: -1
|
|
6691
7270
|
})
|
|
6692
7271
|
]
|
|
@@ -6705,7 +7284,7 @@ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, loca
|
|
|
6705
7284
|
const [ready, setReady] = (0, $hgUW1$useState)(false);
|
|
6706
7285
|
const [error, setError] = (0, $hgUW1$useState)(false);
|
|
6707
7286
|
const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
6708
|
-
const distIndex = dist_id ===
|
|
7287
|
+
const distIndex = dist_id === 'data' ? 0 : dist_id;
|
|
6709
7288
|
(0, $hgUW1$useEffect)(()=>{
|
|
6710
7289
|
if (dataset.error) setError(true);
|
|
6711
7290
|
if (dataset.distribution && dataset.distribution.length) {
|
|
@@ -6923,5 +7502,5 @@ var $90fb213ab8eeb2e7$export$2e2bcd8739ae039 = $90fb213ab8eeb2e7$var$useScrollTo
|
|
|
6923
7502
|
|
|
6924
7503
|
|
|
6925
7504
|
|
|
6926
|
-
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, $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, $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};
|
|
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, $c068004d499082cc$export$2e2bcd8739ae039 as DatasetListItem, $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};
|
|
6927
7506
|
//# sourceMappingURL=main.js.map
|