@civicactions/cmsds-open-data-components 3.8.2 → 3.8.3-alpha.1
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 +1169 -591
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +55 -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, 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,293 @@ 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
|
+
identifier: item.identifier,
|
|
4517
|
+
paginationEnabled: enablePagination,
|
|
4518
|
+
dataDictionaryLinks: dataDictionaryLinks
|
|
4519
|
+
}, item.identifier);
|
|
4520
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
4521
|
+
variation: "error",
|
|
4522
|
+
heading: "Could not connect to the API."
|
|
4523
|
+
})
|
|
4524
|
+
]
|
|
4525
|
+
}),
|
|
4526
|
+
enablePagination && data && data.data.total && data.data.total != 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
4527
|
+
currentPage: Number(page),
|
|
4528
|
+
totalPages: Math.ceil(Number(data.data.total) / pageSize),
|
|
4529
|
+
onPageChange: (evt, page)=>{
|
|
4530
|
+
evt.preventDefault();
|
|
4531
|
+
window.scroll(0, 0);
|
|
4532
|
+
setPage(page);
|
|
4533
|
+
},
|
|
4534
|
+
renderHref: (page)=>{
|
|
4535
|
+
const searchParams = buildSearchParams(false);
|
|
4536
|
+
const includeAnd = searchParams ? '&' : '';
|
|
4537
|
+
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
4538
|
+
}
|
|
4539
|
+
})
|
|
4540
|
+
]
|
|
4541
|
+
})
|
|
4542
|
+
})
|
|
4543
|
+
})
|
|
4544
|
+
]
|
|
4545
|
+
})
|
|
4546
|
+
]
|
|
4547
|
+
});
|
|
4548
|
+
};
|
|
4549
|
+
var $550bcc185f420ff5$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039)($550bcc185f420ff5$var$DatasetList);
|
|
4550
|
+
|
|
4551
|
+
|
|
4552
|
+
|
|
4553
|
+
|
|
4554
|
+
|
|
4555
|
+
|
|
4556
|
+
|
|
4557
|
+
|
|
4558
|
+
|
|
4559
|
+
|
|
4560
|
+
|
|
4561
|
+
|
|
4562
|
+
|
|
4563
|
+
|
|
4564
|
+
|
|
4565
|
+
|
|
4566
|
+
|
|
3989
4567
|
const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
3990
4568
|
const [dataset, setDataset] = (0, $hgUW1$useState)({
|
|
3991
|
-
title:
|
|
4569
|
+
title: '',
|
|
3992
4570
|
distribution: [],
|
|
3993
|
-
error:
|
|
3994
|
-
description:
|
|
3995
|
-
identifier:
|
|
3996
|
-
modified:
|
|
4571
|
+
error: '',
|
|
4572
|
+
description: '',
|
|
4573
|
+
identifier: '',
|
|
4574
|
+
modified: ''
|
|
3997
4575
|
});
|
|
3998
4576
|
const [id, setId] = (0, $hgUW1$useState)(datasetId);
|
|
3999
4577
|
const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
|
|
@@ -4003,7 +4581,7 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
|
4003
4581
|
"metastore" + id
|
|
4004
4582
|
],
|
|
4005
4583
|
queryFn: ()=>{
|
|
4006
|
-
return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ?
|
|
4584
|
+
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
4585
|
return {
|
|
4008
4586
|
title: dataset.title,
|
|
4009
4587
|
distribution: dataset.distribution,
|
|
@@ -4069,7 +4647,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
4069
4647
|
...additionalParams
|
|
4070
4648
|
};
|
|
4071
4649
|
params = (0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA);
|
|
4072
|
-
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` :
|
|
4650
|
+
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : '';
|
|
4073
4651
|
let enabled = false;
|
|
4074
4652
|
if (id) {
|
|
4075
4653
|
if (!requireConditions) enabled = true;
|
|
@@ -4149,65 +4727,65 @@ var $1d3d480a9cfaabe0$export$2e2bcd8739ae039 = $1d3d480a9cfaabe0$var$useDatastor
|
|
|
4149
4727
|
|
|
4150
4728
|
|
|
4151
4729
|
const $28f16f59778efa64$export$82b1b1d517e5388a = {
|
|
4152
|
-
|
|
4153
|
-
name:
|
|
4730
|
+
'R/P10Y': {
|
|
4731
|
+
name: 'Decennial'
|
|
4154
4732
|
},
|
|
4155
|
-
|
|
4156
|
-
name:
|
|
4733
|
+
'R/P4Y': {
|
|
4734
|
+
name: 'Quadrennial'
|
|
4157
4735
|
},
|
|
4158
|
-
|
|
4159
|
-
name:
|
|
4736
|
+
'R/P1Y': {
|
|
4737
|
+
name: 'Annual'
|
|
4160
4738
|
},
|
|
4161
|
-
|
|
4162
|
-
name:
|
|
4739
|
+
'R/P2M': {
|
|
4740
|
+
name: 'Bimonthly'
|
|
4163
4741
|
},
|
|
4164
|
-
|
|
4165
|
-
name:
|
|
4742
|
+
'R/P3.5D': {
|
|
4743
|
+
name: 'Semiweekly'
|
|
4166
4744
|
},
|
|
4167
|
-
|
|
4168
|
-
name:
|
|
4745
|
+
'R/P1D': {
|
|
4746
|
+
name: 'Daily'
|
|
4169
4747
|
},
|
|
4170
|
-
|
|
4171
|
-
name:
|
|
4748
|
+
'R/P2W': {
|
|
4749
|
+
name: 'Biweekly'
|
|
4172
4750
|
},
|
|
4173
|
-
|
|
4174
|
-
name:
|
|
4751
|
+
'R/P6M': {
|
|
4752
|
+
name: 'Semiannual'
|
|
4175
4753
|
},
|
|
4176
|
-
|
|
4177
|
-
name:
|
|
4754
|
+
'R/P2Y': {
|
|
4755
|
+
name: 'Biennial'
|
|
4178
4756
|
},
|
|
4179
|
-
|
|
4180
|
-
name:
|
|
4757
|
+
'R/P3Y': {
|
|
4758
|
+
name: 'Triennial'
|
|
4181
4759
|
},
|
|
4182
|
-
|
|
4183
|
-
name:
|
|
4760
|
+
'R/P0.33W': {
|
|
4761
|
+
name: 'Three times a week'
|
|
4184
4762
|
},
|
|
4185
|
-
|
|
4186
|
-
name:
|
|
4763
|
+
'R/P0.33M': {
|
|
4764
|
+
name: 'Three times a month'
|
|
4187
4765
|
},
|
|
4188
|
-
|
|
4189
|
-
name:
|
|
4766
|
+
'R/PT1S': {
|
|
4767
|
+
name: 'Continuously updated'
|
|
4190
4768
|
},
|
|
4191
|
-
|
|
4192
|
-
name:
|
|
4769
|
+
'R/P1M': {
|
|
4770
|
+
name: 'Monthly'
|
|
4193
4771
|
},
|
|
4194
|
-
|
|
4195
|
-
name:
|
|
4772
|
+
'R/P3M': {
|
|
4773
|
+
name: 'Quarterly'
|
|
4196
4774
|
},
|
|
4197
|
-
|
|
4198
|
-
name:
|
|
4775
|
+
'R/P0.5M': {
|
|
4776
|
+
name: 'Semimonthly'
|
|
4199
4777
|
},
|
|
4200
|
-
|
|
4201
|
-
name:
|
|
4778
|
+
'R/P4M': {
|
|
4779
|
+
name: 'Three times a year'
|
|
4202
4780
|
},
|
|
4203
|
-
|
|
4204
|
-
name:
|
|
4781
|
+
'R/P1W': {
|
|
4782
|
+
name: 'Weekly'
|
|
4205
4783
|
},
|
|
4206
|
-
|
|
4207
|
-
name:
|
|
4784
|
+
'R/PT1H': {
|
|
4785
|
+
name: 'Hourly'
|
|
4208
4786
|
},
|
|
4209
4787
|
irregular: {
|
|
4210
|
-
name:
|
|
4788
|
+
name: 'Irregular'
|
|
4211
4789
|
}
|
|
4212
4790
|
};
|
|
4213
4791
|
|
|
@@ -4216,7 +4794,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4216
4794
|
modified: (data)=>{
|
|
4217
4795
|
return [
|
|
4218
4796
|
{
|
|
4219
|
-
label:
|
|
4797
|
+
label: 'Modified',
|
|
4220
4798
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
4221
4799
|
date: data
|
|
4222
4800
|
})
|
|
@@ -4226,7 +4804,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4226
4804
|
issued: (data)=>{
|
|
4227
4805
|
return [
|
|
4228
4806
|
{
|
|
4229
|
-
label:
|
|
4807
|
+
label: 'Issued',
|
|
4230
4808
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
4231
4809
|
date: data
|
|
4232
4810
|
})
|
|
@@ -4236,7 +4814,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4236
4814
|
accrualPeriodicity: (data)=>{
|
|
4237
4815
|
return [
|
|
4238
4816
|
{
|
|
4239
|
-
label:
|
|
4817
|
+
label: 'Frequency',
|
|
4240
4818
|
value: (0, $28f16f59778efa64$export$82b1b1d517e5388a)[data].name
|
|
4241
4819
|
}
|
|
4242
4820
|
];
|
|
@@ -4244,7 +4822,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4244
4822
|
publisher: (data)=>{
|
|
4245
4823
|
if (data.data && data.data.name) return [
|
|
4246
4824
|
{
|
|
4247
|
-
label:
|
|
4825
|
+
label: 'Publisher',
|
|
4248
4826
|
value: data.data.name
|
|
4249
4827
|
}
|
|
4250
4828
|
];
|
|
@@ -4253,7 +4831,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4253
4831
|
identifier: (data)=>{
|
|
4254
4832
|
return [
|
|
4255
4833
|
{
|
|
4256
|
-
label:
|
|
4834
|
+
label: 'Identifier',
|
|
4257
4835
|
value: data
|
|
4258
4836
|
}
|
|
4259
4837
|
];
|
|
@@ -4261,11 +4839,11 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4261
4839
|
contactPoint: (data)=>{
|
|
4262
4840
|
let rows = [];
|
|
4263
4841
|
if (data.fn) rows.push({
|
|
4264
|
-
label:
|
|
4842
|
+
label: 'Contact',
|
|
4265
4843
|
value: data.fn
|
|
4266
4844
|
});
|
|
4267
4845
|
if (data.hasEmail) rows.push({
|
|
4268
|
-
label:
|
|
4846
|
+
label: 'Contact Email',
|
|
4269
4847
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
4270
4848
|
href: data.hasEmail.includes("mailto:") ? data.hasEmail : `mailto:${data.hasEmail}`,
|
|
4271
4849
|
children: data.hasEmail.replace("mailto:", "")
|
|
@@ -4276,7 +4854,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4276
4854
|
bureauCode: (data)=>{
|
|
4277
4855
|
if (data.length) return [
|
|
4278
4856
|
{
|
|
4279
|
-
label:
|
|
4857
|
+
label: 'Bureau Code',
|
|
4280
4858
|
value: data[0]
|
|
4281
4859
|
}
|
|
4282
4860
|
];
|
|
@@ -4284,7 +4862,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4284
4862
|
programCode: (data)=>{
|
|
4285
4863
|
if (data.length) return [
|
|
4286
4864
|
{
|
|
4287
|
-
label:
|
|
4865
|
+
label: 'Program Code',
|
|
4288
4866
|
value: data[0]
|
|
4289
4867
|
}
|
|
4290
4868
|
];
|
|
@@ -4292,13 +4870,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4292
4870
|
theme: (data)=>{
|
|
4293
4871
|
return [
|
|
4294
4872
|
{
|
|
4295
|
-
label:
|
|
4873
|
+
label: 'Category',
|
|
4296
4874
|
value: data.map((theme)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
4297
4875
|
to: `/datasets?theme[]=${theme.data}`,
|
|
4298
4876
|
children: theme.data
|
|
4299
4877
|
}, theme.data)).reduce((prev, curr)=>[
|
|
4300
4878
|
prev,
|
|
4301
|
-
|
|
4879
|
+
', ',
|
|
4302
4880
|
curr
|
|
4303
4881
|
])
|
|
4304
4882
|
}
|
|
@@ -4307,13 +4885,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4307
4885
|
keyword: (data)=>{
|
|
4308
4886
|
return [
|
|
4309
4887
|
{
|
|
4310
|
-
label:
|
|
4888
|
+
label: 'Tags',
|
|
4311
4889
|
value: data.map((keyword)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
4312
4890
|
to: `/datasets?keyword[]=${keyword.data}`,
|
|
4313
4891
|
children: keyword.data
|
|
4314
4892
|
}, keyword.data)).reduce((prev, curr)=>[
|
|
4315
4893
|
prev,
|
|
4316
|
-
|
|
4894
|
+
', ',
|
|
4317
4895
|
curr
|
|
4318
4896
|
])
|
|
4319
4897
|
}
|
|
@@ -4322,7 +4900,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4322
4900
|
license: (data)=>{
|
|
4323
4901
|
return [
|
|
4324
4902
|
{
|
|
4325
|
-
label:
|
|
4903
|
+
label: 'License',
|
|
4326
4904
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
4327
4905
|
href: data,
|
|
4328
4906
|
children: data
|
|
@@ -4333,7 +4911,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4333
4911
|
accessLevel: (data)=>{
|
|
4334
4912
|
return [
|
|
4335
4913
|
{
|
|
4336
|
-
label:
|
|
4914
|
+
label: 'Public Access Level',
|
|
4337
4915
|
value: data
|
|
4338
4916
|
}
|
|
4339
4917
|
];
|
|
@@ -4341,7 +4919,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4341
4919
|
temporal: (data)=>{
|
|
4342
4920
|
return [
|
|
4343
4921
|
{
|
|
4344
|
-
label:
|
|
4922
|
+
label: 'Temporal Coverage',
|
|
4345
4923
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4346
4924
|
className: "dc-c-word-break--all",
|
|
4347
4925
|
children: data
|
|
@@ -4352,7 +4930,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4352
4930
|
spatial: (data)=>{
|
|
4353
4931
|
return [
|
|
4354
4932
|
{
|
|
4355
|
-
label:
|
|
4933
|
+
label: 'Spacial/Geographical Coverage',
|
|
4356
4934
|
value: data
|
|
4357
4935
|
}
|
|
4358
4936
|
];
|
|
@@ -4360,7 +4938,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
4360
4938
|
references: (data)=>{
|
|
4361
4939
|
return [
|
|
4362
4940
|
{
|
|
4363
|
-
label:
|
|
4941
|
+
label: 'Related Documents',
|
|
4364
4942
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
4365
4943
|
className: "ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0",
|
|
4366
4944
|
children: data.map((item)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -4441,7 +5019,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
4441
5019
|
if (dist && dist.data) {
|
|
4442
5020
|
if (dist.data.format) return dist.data.format.toLowerCase();
|
|
4443
5021
|
if (dist.data.mediaType) {
|
|
4444
|
-
const mediaType = dist.data.mediaType.split(
|
|
5022
|
+
const mediaType = dist.data.mediaType.split('/');
|
|
4445
5023
|
if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
|
|
4446
5024
|
}
|
|
4447
5025
|
if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
|
|
@@ -4451,7 +5029,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
4451
5029
|
}
|
|
4452
5030
|
}
|
|
4453
5031
|
}
|
|
4454
|
-
return
|
|
5032
|
+
return '';
|
|
4455
5033
|
}
|
|
4456
5034
|
|
|
4457
5035
|
|
|
@@ -4495,8 +5073,8 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
4495
5073
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
4496
5074
|
href: dist.data.downloadURL,
|
|
4497
5075
|
style: {
|
|
4498
|
-
order: sm ?
|
|
4499
|
-
width: sm ?
|
|
5076
|
+
order: sm ? '1' : '0',
|
|
5077
|
+
width: sm ? '100%' : 'auto'
|
|
4500
5078
|
},
|
|
4501
5079
|
"aria-label": `Download ${dist.data.title || title} ${fileFormat}`,
|
|
4502
5080
|
className: "ds-c-button",
|
|
@@ -4509,7 +5087,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
4509
5087
|
})
|
|
4510
5088
|
}),
|
|
4511
5089
|
dist.data.description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4512
|
-
className:
|
|
5090
|
+
className: 'ds-u-measure--wide ds-u-margin-bottom--7',
|
|
4513
5091
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4514
5092
|
className: "dc-c-metadata-description ds-u-margin--0",
|
|
4515
5093
|
dangerouslySetInnerHTML: {
|
|
@@ -4581,7 +5159,7 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
4581
5159
|
const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
|
|
4582
5160
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
4583
5161
|
children: [
|
|
4584
|
-
md ?
|
|
5162
|
+
md ? '' : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
4585
5163
|
component: "th",
|
|
4586
5164
|
className: "ds-u-font-weight--bold",
|
|
4587
5165
|
children: [
|
|
@@ -4592,8 +5170,8 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
4592
5170
|
title: tooltip.title,
|
|
4593
5171
|
// @ts-ignore
|
|
4594
5172
|
style: {
|
|
4595
|
-
border:
|
|
4596
|
-
background:
|
|
5173
|
+
border: 'none',
|
|
5174
|
+
background: 'none'
|
|
4597
5175
|
},
|
|
4598
5176
|
maxWidth: "400px",
|
|
4599
5177
|
placement: "auto",
|
|
@@ -4652,10 +5230,10 @@ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: ap
|
|
|
4652
5230
|
href: apiUrl,
|
|
4653
5231
|
children: [
|
|
4654
5232
|
"View API",
|
|
4655
|
-
|
|
5233
|
+
' ',
|
|
4656
5234
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
4657
5235
|
style: {
|
|
4658
|
-
whiteSpace:
|
|
5236
|
+
whiteSpace: 'nowrap'
|
|
4659
5237
|
},
|
|
4660
5238
|
children: [
|
|
4661
5239
|
"specification ",
|
|
@@ -4696,20 +5274,20 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
|
|
|
4696
5274
|
|
|
4697
5275
|
const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
|
|
4698
5276
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
4699
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)(
|
|
5277
|
+
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
|
|
4700
5278
|
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
4701
5279
|
minWidth: 0,
|
|
4702
5280
|
maxWidth: 544
|
|
4703
5281
|
});
|
|
4704
5282
|
const sortElement = (isSorted)=>{
|
|
4705
|
-
if (isSorted ===
|
|
4706
|
-
if (isSorted ===
|
|
4707
|
-
return
|
|
5283
|
+
if (isSorted === 'asc') return 'dc-c-sort--asc';
|
|
5284
|
+
if (isSorted === 'desc') return 'dc-c-sort--desc';
|
|
5285
|
+
return 'dc-c-sort--default';
|
|
4708
5286
|
};
|
|
4709
5287
|
const table = (0, $hgUW1$useReactTable)({
|
|
4710
5288
|
data: tableData,
|
|
4711
5289
|
columns: tableColumns,
|
|
4712
|
-
columnResizeMode:
|
|
5290
|
+
columnResizeMode: 'onChange',
|
|
4713
5291
|
getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
|
|
4714
5292
|
getFilteredRowModel: (0, $hgUW1$getFilteredRowModel)(),
|
|
4715
5293
|
getPaginationRowModel: (0, $hgUW1$getPaginationRowModel)(),
|
|
@@ -4728,49 +5306,49 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
4728
5306
|
});
|
|
4729
5307
|
const sortOptions = [
|
|
4730
5308
|
{
|
|
4731
|
-
value:
|
|
4732
|
-
label:
|
|
5309
|
+
value: 'default',
|
|
5310
|
+
label: 'No Sort'
|
|
4733
5311
|
},
|
|
4734
5312
|
{
|
|
4735
|
-
value:
|
|
4736
|
-
label:
|
|
5313
|
+
value: 'titleasc',
|
|
5314
|
+
label: 'Title A-Z'
|
|
4737
5315
|
},
|
|
4738
5316
|
{
|
|
4739
|
-
value:
|
|
4740
|
-
label:
|
|
5317
|
+
value: 'titledesc',
|
|
5318
|
+
label: 'Title Z-A'
|
|
4741
5319
|
},
|
|
4742
5320
|
{
|
|
4743
|
-
value:
|
|
4744
|
-
label:
|
|
5321
|
+
value: 'typeasc',
|
|
5322
|
+
label: 'Type A-Z'
|
|
4745
5323
|
},
|
|
4746
5324
|
{
|
|
4747
|
-
value:
|
|
4748
|
-
label:
|
|
5325
|
+
value: 'typedesc',
|
|
5326
|
+
label: 'Type Z-A'
|
|
4749
5327
|
}
|
|
4750
5328
|
];
|
|
4751
5329
|
const sortStatesLookup = {
|
|
4752
5330
|
default: [],
|
|
4753
5331
|
titleasc: [
|
|
4754
5332
|
{
|
|
4755
|
-
id:
|
|
5333
|
+
id: 'titleResizable',
|
|
4756
5334
|
desc: false
|
|
4757
5335
|
}
|
|
4758
5336
|
],
|
|
4759
5337
|
titledesc: [
|
|
4760
5338
|
{
|
|
4761
|
-
id:
|
|
5339
|
+
id: 'titleResizable',
|
|
4762
5340
|
desc: true
|
|
4763
5341
|
}
|
|
4764
5342
|
],
|
|
4765
5343
|
typeasc: [
|
|
4766
5344
|
{
|
|
4767
|
-
id:
|
|
5345
|
+
id: 'type',
|
|
4768
5346
|
desc: false
|
|
4769
5347
|
}
|
|
4770
5348
|
],
|
|
4771
5349
|
typedesc: [
|
|
4772
5350
|
{
|
|
4773
|
-
id:
|
|
5351
|
+
id: 'type',
|
|
4774
5352
|
desc: true
|
|
4775
5353
|
}
|
|
4776
5354
|
]
|
|
@@ -4798,7 +5376,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
4798
5376
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
4799
5377
|
className: "dc-c-datatable",
|
|
4800
5378
|
style: {
|
|
4801
|
-
width:
|
|
5379
|
+
width: '100%'
|
|
4802
5380
|
},
|
|
4803
5381
|
stackable: true,
|
|
4804
5382
|
children: [
|
|
@@ -4814,12 +5392,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
4814
5392
|
}, header.id + "_resize") : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
4815
5393
|
key: header.id,
|
|
4816
5394
|
className: `ds-u-border-y--2 ds-u-border--dark ds-u-border-x--0`,
|
|
4817
|
-
id:
|
|
5395
|
+
id: 'dataDictionary_' + header.id,
|
|
4818
5396
|
children: [
|
|
4819
5397
|
(0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext()),
|
|
4820
|
-
header.id ===
|
|
5398
|
+
header.id === 'type' && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
4821
5399
|
onClick: header.column.getToggleSortingHandler(),
|
|
4822
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
5400
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : '',
|
|
4823
5401
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
4824
5402
|
})
|
|
4825
5403
|
]
|
|
@@ -4834,12 +5412,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
4834
5412
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
4835
5413
|
key: cell.id,
|
|
4836
5414
|
style: {
|
|
4837
|
-
maxWidth: mobile ?
|
|
4838
|
-
whiteSpace: cell.column.id === "description" ?
|
|
5415
|
+
maxWidth: mobile ? '100%' : cell.column.getSize(),
|
|
5416
|
+
whiteSpace: cell.column.id === "description" ? 'pre-wrap' : 'normal'
|
|
4839
5417
|
},
|
|
4840
|
-
className: `${cell.column.id ===
|
|
4841
|
-
headers:
|
|
4842
|
-
stackedTitle: cell.column.id ===
|
|
5418
|
+
className: `${cell.column.id === 'titleResizable' ? 'ds-u-word-break' : ''}`,
|
|
5419
|
+
headers: 'dataDictionary_' + cell.column.id,
|
|
5420
|
+
stackedTitle: cell.column.id === 'titleResizable' ? 'Title' : cell.column.columnDef.header,
|
|
4843
5421
|
children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
4844
5422
|
});
|
|
4845
5423
|
})
|
|
@@ -4868,7 +5446,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
4868
5446
|
table.setPageIndex(page - 1);
|
|
4869
5447
|
},
|
|
4870
5448
|
renderHref: (page)=>`/page=${page}`
|
|
4871
|
-
}) :
|
|
5449
|
+
}) : ''
|
|
4872
5450
|
]
|
|
4873
5451
|
});
|
|
4874
5452
|
};
|
|
@@ -4878,17 +5456,17 @@ var $6765a74df807d015$export$2e2bcd8739ae039 = $6765a74df807d015$var$DataDiction
|
|
|
4878
5456
|
const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
|
|
4879
5457
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
4880
5458
|
const tableColumns = [
|
|
4881
|
-
columnHelper.accessor(
|
|
4882
|
-
header:
|
|
5459
|
+
columnHelper.accessor('name', {
|
|
5460
|
+
header: 'Name'
|
|
4883
5461
|
}),
|
|
4884
|
-
columnHelper.accessor(
|
|
4885
|
-
header:
|
|
5462
|
+
columnHelper.accessor('title', {
|
|
5463
|
+
header: 'Title'
|
|
4886
5464
|
}),
|
|
4887
|
-
columnHelper.accessor(
|
|
4888
|
-
header:
|
|
5465
|
+
columnHelper.accessor('type', {
|
|
5466
|
+
header: 'Type'
|
|
4889
5467
|
}),
|
|
4890
|
-
columnHelper.accessor(
|
|
4891
|
-
header:
|
|
5468
|
+
columnHelper.accessor('format', {
|
|
5469
|
+
header: 'Format'
|
|
4892
5470
|
})
|
|
4893
5471
|
];
|
|
4894
5472
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6765a74df807d015$export$2e2bcd8739ae039), {
|
|
@@ -4932,7 +5510,7 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
4932
5510
|
});
|
|
4933
5511
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
4934
5512
|
const tableColumns = [
|
|
4935
|
-
columnHelper.accessor(
|
|
5513
|
+
columnHelper.accessor('titleResizable', {
|
|
4936
5514
|
header: ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4937
5515
|
className: "dc-c-tooltip-width-override",
|
|
4938
5516
|
children: [
|
|
@@ -4941,8 +5519,8 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
4941
5519
|
title: "Title represents the column headers of the data file",
|
|
4942
5520
|
// @ts-ignore
|
|
4943
5521
|
style: {
|
|
4944
|
-
border:
|
|
4945
|
-
background:
|
|
5522
|
+
border: 'none',
|
|
5523
|
+
background: 'none'
|
|
4946
5524
|
},
|
|
4947
5525
|
maxWidth: "400px",
|
|
4948
5526
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
|
|
@@ -4952,48 +5530,48 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
4952
5530
|
size: 300,
|
|
4953
5531
|
minSize: 132
|
|
4954
5532
|
}),
|
|
4955
|
-
columnHelper.accessor(
|
|
4956
|
-
header:
|
|
5533
|
+
columnHelper.accessor('description', {
|
|
5534
|
+
header: 'Description',
|
|
4957
5535
|
minSize: 600
|
|
4958
5536
|
}),
|
|
4959
|
-
columnHelper.accessor(
|
|
4960
|
-
header:
|
|
5537
|
+
columnHelper.accessor('type', {
|
|
5538
|
+
header: 'Type',
|
|
4961
5539
|
size: 150,
|
|
4962
5540
|
enableResizing: false
|
|
4963
5541
|
})
|
|
4964
5542
|
];
|
|
4965
5543
|
const typeOptions = [
|
|
4966
5544
|
{
|
|
4967
|
-
value:
|
|
4968
|
-
label:
|
|
5545
|
+
value: 'all',
|
|
5546
|
+
label: 'All Types'
|
|
4969
5547
|
},
|
|
4970
5548
|
{
|
|
4971
|
-
value:
|
|
4972
|
-
label:
|
|
5549
|
+
value: 'string',
|
|
5550
|
+
label: 'String'
|
|
4973
5551
|
},
|
|
4974
5552
|
{
|
|
4975
|
-
value:
|
|
4976
|
-
label:
|
|
5553
|
+
value: 'date',
|
|
5554
|
+
label: 'Date'
|
|
4977
5555
|
},
|
|
4978
5556
|
{
|
|
4979
|
-
value:
|
|
4980
|
-
label:
|
|
5557
|
+
value: 'datetime',
|
|
5558
|
+
label: 'Datetime'
|
|
4981
5559
|
},
|
|
4982
5560
|
{
|
|
4983
|
-
value:
|
|
4984
|
-
label:
|
|
5561
|
+
value: 'year',
|
|
5562
|
+
label: 'Year'
|
|
4985
5563
|
},
|
|
4986
5564
|
{
|
|
4987
|
-
value:
|
|
4988
|
-
label:
|
|
5565
|
+
value: 'integer',
|
|
5566
|
+
label: 'Integer'
|
|
4989
5567
|
},
|
|
4990
5568
|
{
|
|
4991
|
-
value:
|
|
4992
|
-
label:
|
|
5569
|
+
value: 'number',
|
|
5570
|
+
label: 'Number'
|
|
4993
5571
|
},
|
|
4994
5572
|
{
|
|
4995
|
-
value:
|
|
4996
|
-
label:
|
|
5573
|
+
value: 'boolean',
|
|
5574
|
+
label: 'Boolean'
|
|
4997
5575
|
}
|
|
4998
5576
|
];
|
|
4999
5577
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -5100,7 +5678,7 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
|
|
|
5100
5678
|
href: datasetDictionaryEndpoint + "/csv",
|
|
5101
5679
|
className: "ds-c-button",
|
|
5102
5680
|
style: {
|
|
5103
|
-
width:
|
|
5681
|
+
width: '100%'
|
|
5104
5682
|
},
|
|
5105
5683
|
children: [
|
|
5106
5684
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
@@ -5179,7 +5757,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
5179
5757
|
const [description, setDescription] = (0, $hgUW1$useState)("");
|
|
5180
5758
|
if (!distribution && !dataset?.identifier) return null;
|
|
5181
5759
|
(0, $hgUW1$useEffect)(()=>{
|
|
5182
|
-
let newDescription =
|
|
5760
|
+
let newDescription = '';
|
|
5183
5761
|
if (customDescription) newDescription = customDescription(dataset, distribution, resource);
|
|
5184
5762
|
else {
|
|
5185
5763
|
if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
|
|
@@ -5194,7 +5772,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
5194
5772
|
customDescription
|
|
5195
5773
|
]);
|
|
5196
5774
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5197
|
-
className:
|
|
5775
|
+
className: 'ds-u-measure--wide ds-u-margin-bottom--7',
|
|
5198
5776
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5199
5777
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
5200
5778
|
dangerouslySetInnerHTML: {
|
|
@@ -5216,7 +5794,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
5216
5794
|
],
|
|
5217
5795
|
queryFn: ()=>{
|
|
5218
5796
|
return fetch(`${dataDictionaryUrl}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA), {
|
|
5219
|
-
arrayFormat:
|
|
5797
|
+
arrayFormat: 'comma',
|
|
5220
5798
|
encode: false
|
|
5221
5799
|
})}`).then((res)=>res.json());
|
|
5222
5800
|
}
|
|
@@ -5235,7 +5813,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5235
5813
|
conditions: []
|
|
5236
5814
|
};
|
|
5237
5815
|
const { dataset: dataset, isPending: isPending } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
5238
|
-
const title = dataset.title ? dataset.title :
|
|
5816
|
+
const title = dataset.title ? dataset.title : '';
|
|
5239
5817
|
const metadataMapping = {
|
|
5240
5818
|
...(0, $6da0396069e23175$export$bc27cf7ecf44639d),
|
|
5241
5819
|
...customMetadataMapping
|
|
@@ -5243,7 +5821,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5243
5821
|
let distribution = {};
|
|
5244
5822
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
5245
5823
|
if (distributions.length) distribution = distributions[0];
|
|
5246
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
5824
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
5247
5825
|
...options,
|
|
5248
5826
|
limit: defaultPageSize
|
|
5249
5827
|
});
|
|
@@ -5255,7 +5833,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5255
5833
|
}) : null;
|
|
5256
5834
|
(0, $hgUW1$useEffect)(()=>{
|
|
5257
5835
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
5258
|
-
if (localFileFormat ===
|
|
5836
|
+
if (localFileFormat === 'csv') resource.setResource(distribution.identifier);
|
|
5259
5837
|
}, [
|
|
5260
5838
|
distribution
|
|
5261
5839
|
]);
|
|
@@ -5310,26 +5888,26 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5310
5888
|
distribution,
|
|
5311
5889
|
window.location.hash
|
|
5312
5890
|
]);
|
|
5313
|
-
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType ===
|
|
5891
|
+
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === 'application/vnd.tableschema+json' || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
5314
5892
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
5315
5893
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
5316
5894
|
content: notFoundContent,
|
|
5317
5895
|
siteUrl: rootUrl
|
|
5318
5896
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5319
|
-
className:
|
|
5897
|
+
className: 'ds-l-container',
|
|
5320
5898
|
children: [
|
|
5321
5899
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5322
|
-
className:
|
|
5900
|
+
className: 'ds-l-row',
|
|
5323
5901
|
children: [
|
|
5324
5902
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5325
|
-
className:
|
|
5903
|
+
className: 'ds-l-md-col--9',
|
|
5326
5904
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
5327
5905
|
className: "ds-text-heading--3xl",
|
|
5328
5906
|
children: title
|
|
5329
5907
|
})
|
|
5330
5908
|
}),
|
|
5331
5909
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5332
|
-
className:
|
|
5910
|
+
className: 'ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right',
|
|
5333
5911
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
5334
5912
|
className: "ds-u-margin--0",
|
|
5335
5913
|
children: [
|
|
@@ -5341,7 +5919,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5341
5919
|
})
|
|
5342
5920
|
}),
|
|
5343
5921
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5344
|
-
className:
|
|
5922
|
+
className: 'ds-l-md-col--9',
|
|
5345
5923
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
5346
5924
|
distribution: distribution,
|
|
5347
5925
|
dataset: dataset,
|
|
@@ -5353,9 +5931,9 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5353
5931
|
]
|
|
5354
5932
|
}),
|
|
5355
5933
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5356
|
-
className:
|
|
5934
|
+
className: 'ds-l-row',
|
|
5357
5935
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5358
|
-
className:
|
|
5936
|
+
className: 'ds-l-md-col--12 dc-dataset',
|
|
5359
5937
|
children: !isPending && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tabs), {
|
|
5360
5938
|
onChange: (selectedId, prevSelectedId)=>{
|
|
5361
5939
|
setSelectedTab(selectedId);
|
|
@@ -5363,7 +5941,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5363
5941
|
selectedId: selectedTab,
|
|
5364
5942
|
children: [
|
|
5365
5943
|
(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
5366
|
-
id:
|
|
5944
|
+
id: 'data-table',
|
|
5367
5945
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5368
5946
|
className: "ds-u-color--primary",
|
|
5369
5947
|
children: [
|
|
@@ -5373,7 +5951,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5373
5951
|
"Data Table"
|
|
5374
5952
|
]
|
|
5375
5953
|
}),
|
|
5376
|
-
className: borderlessTabs ?
|
|
5954
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
5377
5955
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
5378
5956
|
value: {
|
|
5379
5957
|
id: id,
|
|
@@ -5388,7 +5966,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5388
5966
|
})
|
|
5389
5967
|
}),
|
|
5390
5968
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
5391
|
-
id:
|
|
5969
|
+
id: 'overview',
|
|
5392
5970
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5393
5971
|
className: "ds-u-color--primary",
|
|
5394
5972
|
children: [
|
|
@@ -5398,7 +5976,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5398
5976
|
"Overview"
|
|
5399
5977
|
]
|
|
5400
5978
|
}),
|
|
5401
|
-
className: borderlessTabs ?
|
|
5979
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
5402
5980
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
|
|
5403
5981
|
resource: resource,
|
|
5404
5982
|
dataset: dataset,
|
|
@@ -5407,7 +5985,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5407
5985
|
})
|
|
5408
5986
|
}),
|
|
5409
5987
|
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TabPanel), {
|
|
5410
|
-
id:
|
|
5988
|
+
id: 'data-dictionary',
|
|
5411
5989
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5412
5990
|
className: "ds-u-color--primary",
|
|
5413
5991
|
children: [
|
|
@@ -5417,7 +5995,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5417
5995
|
"Data Dictionary"
|
|
5418
5996
|
]
|
|
5419
5997
|
}),
|
|
5420
|
-
className: borderlessTabs ?
|
|
5998
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
5421
5999
|
children: [
|
|
5422
6000
|
displayDataDictionaryTab && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
5423
6001
|
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
@@ -5431,7 +6009,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5431
6009
|
]
|
|
5432
6010
|
}),
|
|
5433
6011
|
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
5434
|
-
id:
|
|
6012
|
+
id: 'api',
|
|
5435
6013
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5436
6014
|
className: "ds-u-color--primary",
|
|
5437
6015
|
children: [
|
|
@@ -5441,7 +6019,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
5441
6019
|
"API"
|
|
5442
6020
|
]
|
|
5443
6021
|
}),
|
|
5444
|
-
className: borderlessTabs ?
|
|
6022
|
+
className: borderlessTabs ? 'ds-u-border--0 ds-u-padding-x--0' : '',
|
|
5445
6023
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
|
|
5446
6024
|
id: id,
|
|
5447
6025
|
rootUrl: rootUrl,
|
|
@@ -5478,13 +6056,13 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
5478
6056
|
});
|
|
5479
6057
|
const menu = (0, $hgUW1$useRef)(null);
|
|
5480
6058
|
function closeMobileMenu() {
|
|
5481
|
-
const mobileMenuButtonElement = document.querySelector(
|
|
6059
|
+
const mobileMenuButtonElement = document.querySelector('.dkan-c-mobile-menu-button');
|
|
5482
6060
|
if (!mobileMenuButtonElement) return;
|
|
5483
6061
|
mobileMenuButtonElement.focus();
|
|
5484
6062
|
}
|
|
5485
6063
|
// Close mobile menu with escape.
|
|
5486
6064
|
function handleMenuClose(event) {
|
|
5487
|
-
if (event.key ===
|
|
6065
|
+
if (event.key === 'Escape' && mobileMenuOpen) setMobileMenuOpen(false);
|
|
5488
6066
|
}
|
|
5489
6067
|
function handleClick(event) {
|
|
5490
6068
|
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
@@ -5519,7 +6097,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
5519
6097
|
const focusableEls = getFocusableElements(menu.current).selectors.visible;
|
|
5520
6098
|
const firstEl = focusableEls[0];
|
|
5521
6099
|
const lastEl = focusableEls[focusableEls.length - 1];
|
|
5522
|
-
if (event.key ===
|
|
6100
|
+
if (event.key === 'Tab') {
|
|
5523
6101
|
if (event.shiftKey && document.activeElement === firstEl) {
|
|
5524
6102
|
lastEl?.focus();
|
|
5525
6103
|
event.preventDefault();
|
|
@@ -5531,15 +6109,15 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
5531
6109
|
}
|
|
5532
6110
|
};
|
|
5533
6111
|
(0, $hgUW1$useEffect)(()=>{
|
|
5534
|
-
document.addEventListener(
|
|
5535
|
-
document.addEventListener(
|
|
6112
|
+
document.addEventListener('keyup', handleMenuClose);
|
|
6113
|
+
document.addEventListener('mousedown', handleClick);
|
|
5536
6114
|
if (mobileMenuOpen) handleFocusIn();
|
|
5537
6115
|
else closeMobileMenu();
|
|
5538
|
-
if (menu.current) menu.current.addEventListener(
|
|
6116
|
+
if (menu.current) menu.current.addEventListener('keydown', (evt)=>trapFocus(evt));
|
|
5539
6117
|
return ()=>{
|
|
5540
|
-
document.removeEventListener(
|
|
5541
|
-
document.addEventListener(
|
|
5542
|
-
if (menu.current) menu.current.removeEventListener(
|
|
6118
|
+
document.removeEventListener('keyup', handleMenuClose);
|
|
6119
|
+
document.addEventListener('mousedown', handleClick);
|
|
6120
|
+
if (menu.current) menu.current.removeEventListener('keydown', trapFocus);
|
|
5543
6121
|
};
|
|
5544
6122
|
}, [
|
|
5545
6123
|
mobileMenuOpen
|
|
@@ -5554,7 +6132,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
5554
6132
|
},
|
|
5555
6133
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
|
|
5556
6134
|
"aria-label": "Site header",
|
|
5557
|
-
className: `dkan-c-header dkan-c-header--${mobileMax ?
|
|
6135
|
+
className: `dkan-c-header dkan-c-header--${mobileMax ? 'mobile' : 'desktop'}`,
|
|
5558
6136
|
children: [
|
|
5559
6137
|
topNav && topNav,
|
|
5560
6138
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -5597,7 +6175,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
5597
6175
|
var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
|
|
5598
6176
|
|
|
5599
6177
|
|
|
5600
|
-
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle =
|
|
6178
|
+
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
6179
|
children: [
|
|
5602
6180
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
5603
6181
|
children: "A federal government website managed and paid for by the U.S. Centers for Medicare & Medicaid Services."
|
|
@@ -5685,14 +6263,14 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
5685
6263
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
5686
6264
|
className: "ds-u-font-size--sm",
|
|
5687
6265
|
children: footerAdditionalResourcesLinks.filter((link)=>{
|
|
5688
|
-
const noOnClick = Object.keys(link).findIndex((l)=>l ===
|
|
6266
|
+
const noOnClick = Object.keys(link).findIndex((l)=>l === 'onClick');
|
|
5689
6267
|
if (noOnClick === -1 || link.onClick && link.dataTag) return link;
|
|
5690
6268
|
}).map((link)=>{
|
|
5691
6269
|
if (link.onClick && link.dataTag) return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
5692
6270
|
className: "ds-u-margin-bottom--1",
|
|
5693
6271
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5694
6272
|
href: link.url,
|
|
5695
|
-
[
|
|
6273
|
+
['data-' + link.dataTag.name]: link.dataTag.value,
|
|
5696
6274
|
onClick: link.onClick,
|
|
5697
6275
|
children: link.label
|
|
5698
6276
|
})
|
|
@@ -5792,7 +6370,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
5792
6370
|
children: [
|
|
5793
6371
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
5794
6372
|
id: "svg-inline--fa-title-iRCARP7h6Kp3",
|
|
5795
|
-
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title :
|
|
6373
|
+
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title : 'CMS Facebook'
|
|
5796
6374
|
}),
|
|
5797
6375
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
5798
6376
|
transform: "translate(160 256)",
|
|
@@ -5845,7 +6423,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
5845
6423
|
children: [
|
|
5846
6424
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
5847
6425
|
id: "svg-inline--fa-title-4z03ITiPPTVF",
|
|
5848
|
-
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title :
|
|
6426
|
+
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title : 'CMS Twitter'
|
|
5849
6427
|
}),
|
|
5850
6428
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
5851
6429
|
transform: "translate(256 256)",
|
|
@@ -5898,7 +6476,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
5898
6476
|
children: [
|
|
5899
6477
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
5900
6478
|
id: "svg-inline--fa-title-Nm2qsuSKvuRZ",
|
|
5901
|
-
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title :
|
|
6479
|
+
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title : 'CMS LinkedIn'
|
|
5902
6480
|
}),
|
|
5903
6481
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
5904
6482
|
transform: "translate(224 256)",
|
|
@@ -5950,7 +6528,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
5950
6528
|
children: [
|
|
5951
6529
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
5952
6530
|
id: "svg-inline--fa-title-youtube",
|
|
5953
|
-
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title :
|
|
6531
|
+
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title : 'CMS youtube'
|
|
5954
6532
|
}),
|
|
5955
6533
|
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
5956
6534
|
fill: "currentColor",
|
|
@@ -6050,26 +6628,26 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
6050
6628
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6051
6629
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
6052
6630
|
stackable: true,
|
|
6053
|
-
className:
|
|
6631
|
+
className: 'ds-c-table',
|
|
6054
6632
|
children: [
|
|
6055
6633
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
|
|
6056
6634
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
6057
6635
|
children: [
|
|
6058
6636
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6059
|
-
id:
|
|
6060
|
-
headers:
|
|
6637
|
+
id: 'application',
|
|
6638
|
+
headers: 'Application',
|
|
6061
6639
|
children: "Application"
|
|
6062
|
-
},
|
|
6640
|
+
}, 'Application'),
|
|
6063
6641
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6064
|
-
id:
|
|
6065
|
-
headers:
|
|
6642
|
+
id: 'notes',
|
|
6643
|
+
headers: 'Notes',
|
|
6066
6644
|
children: "Notes"
|
|
6067
|
-
},
|
|
6645
|
+
}, 'Notes'),
|
|
6068
6646
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6069
|
-
id:
|
|
6070
|
-
headers:
|
|
6647
|
+
id: 'links',
|
|
6648
|
+
headers: 'Links',
|
|
6071
6649
|
children: "Links"
|
|
6072
|
-
},
|
|
6650
|
+
}, 'Links')
|
|
6073
6651
|
]
|
|
6074
6652
|
})
|
|
6075
6653
|
}),
|
|
@@ -6079,19 +6657,19 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
6079
6657
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6080
6658
|
id: d.id,
|
|
6081
6659
|
stackedTitle: "Application",
|
|
6082
|
-
headers:
|
|
6660
|
+
headers: 'Application',
|
|
6083
6661
|
children: d.application
|
|
6084
6662
|
}, d.id),
|
|
6085
6663
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6086
6664
|
id: d.id,
|
|
6087
6665
|
stackedTitle: "Notes",
|
|
6088
|
-
headers:
|
|
6666
|
+
headers: 'Notes',
|
|
6089
6667
|
children: d.notes
|
|
6090
6668
|
}, `${d.id}-notes`),
|
|
6091
6669
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6092
6670
|
id: d.id,
|
|
6093
6671
|
stackedTitle: "Links",
|
|
6094
|
-
headers:
|
|
6672
|
+
headers: 'Links',
|
|
6095
6673
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
6096
6674
|
className: "dkan-newtab",
|
|
6097
6675
|
href: d.link,
|
|
@@ -6119,44 +6697,44 @@ var $5655284dbbb89508$export$2e2bcd8739ae039 = $5655284dbbb89508$var$Documentati
|
|
|
6119
6697
|
|
|
6120
6698
|
const $c7bf75f7e8a68780$export$7850f4d545d994c6 = [
|
|
6121
6699
|
{
|
|
6122
|
-
id:
|
|
6123
|
-
application:
|
|
6124
|
-
notes:
|
|
6125
|
-
link:
|
|
6126
|
-
linkText:
|
|
6127
|
-
screenReaderOnlyText:
|
|
6700
|
+
id: 'excel',
|
|
6701
|
+
application: 'Microsoft Excel',
|
|
6702
|
+
notes: 'Official size limitations for Microsoft Excel',
|
|
6703
|
+
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',
|
|
6704
|
+
linkText: 'Excel Specifications and Limits',
|
|
6705
|
+
screenReaderOnlyText: 'on microsoft.com'
|
|
6128
6706
|
},
|
|
6129
6707
|
{
|
|
6130
|
-
id:
|
|
6131
|
-
application:
|
|
6132
|
-
notes:
|
|
6133
|
-
link:
|
|
6134
|
-
linkText:
|
|
6135
|
-
screenReaderOnlyText:
|
|
6708
|
+
id: 'access',
|
|
6709
|
+
application: 'Microsoft Access',
|
|
6710
|
+
notes: 'Official size limitations for Microsoft Access',
|
|
6711
|
+
link: 'https://support.microsoft.com/en-us/office/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c?ui=en-us&rs=en-us&ad=us',
|
|
6712
|
+
linkText: 'Access 2016 Specifications',
|
|
6713
|
+
screenReaderOnlyText: 'on microsoft.com'
|
|
6136
6714
|
},
|
|
6137
6715
|
{
|
|
6138
|
-
id:
|
|
6139
|
-
application:
|
|
6140
|
-
notes:
|
|
6141
|
-
link:
|
|
6142
|
-
linkText:
|
|
6143
|
-
screenReaderOnlyText:
|
|
6716
|
+
id: 'oracle-sql-developer',
|
|
6717
|
+
application: 'Oracle SQL Developer',
|
|
6718
|
+
notes: 'Oracle SQL Developer tool',
|
|
6719
|
+
link: 'https://www.oracle.com/database/sqldeveloper/',
|
|
6720
|
+
linkText: 'Oracle SQL Developer Overview',
|
|
6721
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
6144
6722
|
},
|
|
6145
6723
|
{
|
|
6146
|
-
id:
|
|
6147
|
-
application:
|
|
6148
|
-
notes:
|
|
6149
|
-
link:
|
|
6150
|
-
linkText:
|
|
6151
|
-
screenReaderOnlyText:
|
|
6724
|
+
id: 'oracle-database',
|
|
6725
|
+
application: 'Oracle Database',
|
|
6726
|
+
notes: 'Oracle Database official size limitations',
|
|
6727
|
+
link: 'https://docs.oracle.com/cd/B28359_01/server.111/b28320/limits002.htm#i287915',
|
|
6728
|
+
linkText: 'Oracle Physical Database Limits',
|
|
6729
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
6152
6730
|
},
|
|
6153
6731
|
{
|
|
6154
|
-
id:
|
|
6155
|
-
application:
|
|
6156
|
-
notes:
|
|
6157
|
-
link:
|
|
6158
|
-
linkText:
|
|
6159
|
-
screenReaderOnlyText:
|
|
6732
|
+
id: 'oracle-sql-client-tools',
|
|
6733
|
+
application: 'Oracle SQL Client Tools',
|
|
6734
|
+
notes: 'Oracle SQL Client Tools',
|
|
6735
|
+
link: 'https://www.oracle.com/database/technologies/oracle-database-software-downloads.html',
|
|
6736
|
+
linkText: 'Oracle SQL Client',
|
|
6737
|
+
screenReaderOnlyText: 'on oracle.com'
|
|
6160
6738
|
}
|
|
6161
6739
|
];
|
|
6162
6740
|
|
|
@@ -6184,7 +6762,7 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
6184
6762
|
}),
|
|
6185
6763
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
6186
6764
|
heading: "Notice",
|
|
6187
|
-
className:
|
|
6765
|
+
className: 'ds-u-margin-top--6',
|
|
6188
6766
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6189
6767
|
className: "ds-c-alert__text",
|
|
6190
6768
|
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 +6771,16 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
6193
6771
|
]
|
|
6194
6772
|
}),
|
|
6195
6773
|
/*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
6196
|
-
className:
|
|
6774
|
+
className: 'ds-u-margin-top--4 ds-l-row',
|
|
6197
6775
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6198
|
-
className:
|
|
6776
|
+
className: 'ds-l-col--12',
|
|
6199
6777
|
children: [
|
|
6200
6778
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
6201
6779
|
className: "ds-text-heading--2xl ds-text-heading--2xl",
|
|
6202
6780
|
children: "Documentation by Application"
|
|
6203
6781
|
}),
|
|
6204
6782
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6205
|
-
className:
|
|
6783
|
+
className: 'ds-u-margin-top--4',
|
|
6206
6784
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5655284dbbb89508$export$2e2bcd8739ae039), {
|
|
6207
6785
|
data: documentationList
|
|
6208
6786
|
})
|
|
@@ -6230,7 +6808,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
6230
6808
|
const options = {
|
|
6231
6809
|
conditions: query ? JSON.parse(query).map(({ column: column, operator: operator, ...rest })=>({
|
|
6232
6810
|
property: column,
|
|
6233
|
-
operator: operator ===
|
|
6811
|
+
operator: operator === 'is' ? '=' : operator === 'is not' ? '<>' : operator === 'or' ? 'in' : operator,
|
|
6234
6812
|
...rest
|
|
6235
6813
|
})) : []
|
|
6236
6814
|
};
|
|
@@ -6238,13 +6816,13 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
6238
6816
|
let distribution = {};
|
|
6239
6817
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
6240
6818
|
if (distributions.length) distribution = distributions[distributionIndex];
|
|
6241
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
6819
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
6242
6820
|
...options,
|
|
6243
6821
|
limit: defaultPageSize
|
|
6244
6822
|
});
|
|
6245
6823
|
(0, $hgUW1$useEffect)(()=>{
|
|
6246
6824
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6247
|
-
if (localFileFormat ===
|
|
6825
|
+
if (localFileFormat === 'csv') resource.setResource(distribution.identifier);
|
|
6248
6826
|
}, [
|
|
6249
6827
|
distribution
|
|
6250
6828
|
]);
|
|
@@ -6295,7 +6873,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
6295
6873
|
|
|
6296
6874
|
|
|
6297
6875
|
function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
|
|
6298
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
6876
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
6299
6877
|
const newDate = new Date(condition.value);
|
|
6300
6878
|
if (newDate instanceof Date && !isNaN(newDate)) return newDate;
|
|
6301
6879
|
}
|
|
@@ -6312,9 +6890,9 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
6312
6890
|
const [startDate, setStartDate] = (0, $hgUW1$react).useState($374c4669b044ddf8$var$getStartDate(condition, schema, id));
|
|
6313
6891
|
(0, $hgUW1$useEffect)(()=>{
|
|
6314
6892
|
if (property !== condition.property) {
|
|
6315
|
-
if (property) update(index,
|
|
6316
|
-
else update(index,
|
|
6317
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
6893
|
+
if (property) update(index, 'property', property);
|
|
6894
|
+
else update(index, 'property', '');
|
|
6895
|
+
if (schema[id].fields[condition.property].mysql_type === 'date') {
|
|
6318
6896
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
6319
6897
|
}
|
|
6320
6898
|
}
|
|
@@ -6328,16 +6906,16 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
6328
6906
|
]);
|
|
6329
6907
|
(0, $hgUW1$useEffect)(()=>{
|
|
6330
6908
|
if (operator !== condition.operator) {
|
|
6331
|
-
if (operator) update(index,
|
|
6332
|
-
else update(index,
|
|
6909
|
+
if (operator) update(index, 'operator', operator);
|
|
6910
|
+
else update(index, 'operator', '');
|
|
6333
6911
|
}
|
|
6334
6912
|
}, [
|
|
6335
6913
|
operator
|
|
6336
6914
|
]);
|
|
6337
6915
|
(0, $hgUW1$useEffect)(()=>{
|
|
6338
6916
|
if (value !== condition.value) {
|
|
6339
|
-
if (value) update(index,
|
|
6340
|
-
else update(index,
|
|
6917
|
+
if (value) update(index, 'value', value);
|
|
6918
|
+
else update(index, 'value', '');
|
|
6341
6919
|
}
|
|
6342
6920
|
}, [
|
|
6343
6921
|
value
|
|
@@ -6361,7 +6939,7 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
6361
6939
|
onChange: (e)=>setOperator(e.target.value),
|
|
6362
6940
|
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
6941
|
}),
|
|
6364
|
-
schema[id].fields[property].mysql_type ===
|
|
6942
|
+
schema[id].fields[property].mysql_type === 'date' ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6365
6943
|
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
6944
|
children: [
|
|
6367
6945
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
@@ -6411,19 +6989,19 @@ var $374c4669b044ddf8$export$2e2bcd8739ae039 = $374c4669b044ddf8$var$QueryRow;
|
|
|
6411
6989
|
function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
|
|
6412
6990
|
let cond = condition;
|
|
6413
6991
|
delete cond.key;
|
|
6414
|
-
if (cond.operator ===
|
|
6992
|
+
if (cond.operator === '=' || cond.operator === '<>') {
|
|
6415
6993
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
6416
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
6994
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
6417
6995
|
}
|
|
6418
|
-
if (cond.operator.toLowerCase() ===
|
|
6996
|
+
if (cond.operator.toLowerCase() === 'like') {
|
|
6419
6997
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
6420
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
6998
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, '');
|
|
6421
6999
|
cond.value = `%${cleanedValue}%`;
|
|
6422
7000
|
}
|
|
6423
|
-
if (cond.operator.toLowerCase() ===
|
|
6424
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
7001
|
+
if (cond.operator.toLowerCase() === 'in') {
|
|
7002
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(',');
|
|
6425
7003
|
}
|
|
6426
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
7004
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ''));
|
|
6427
7005
|
return cond;
|
|
6428
7006
|
}
|
|
6429
7007
|
const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, setOffset: setOffset })=>{
|
|
@@ -6443,7 +7021,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
6443
7021
|
...queryConditions,
|
|
6444
7022
|
{
|
|
6445
7023
|
property: fields[0],
|
|
6446
|
-
value:
|
|
7024
|
+
value: '',
|
|
6447
7025
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
6448
7026
|
key: Date.now()
|
|
6449
7027
|
}
|
|
@@ -6483,7 +7061,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
6483
7061
|
encodeValuesOnly: true,
|
|
6484
7062
|
addQueryPrefix: true
|
|
6485
7063
|
});
|
|
6486
|
-
window.history.pushState({},
|
|
7064
|
+
window.history.pushState({}, '', `${url.origin}${url.pathname}${urlString}`);
|
|
6487
7065
|
};
|
|
6488
7066
|
const updateCondition = (index, key, value)=>{
|
|
6489
7067
|
let newConditions = [
|
|
@@ -6556,7 +7134,7 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
|
|
|
6556
7134
|
|
|
6557
7135
|
|
|
6558
7136
|
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(
|
|
7137
|
+
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState('ds-u-padding-y--1');
|
|
6560
7138
|
let apiDocs = (0, $hgUW1$useRef)();
|
|
6561
7139
|
let distribution = {};
|
|
6562
7140
|
let distribution_array = dataset.distribution ? dataset.distribution : [];
|
|
@@ -6568,7 +7146,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6568
7146
|
} : {
|
|
6569
7147
|
conditions: []
|
|
6570
7148
|
};
|
|
6571
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7149
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)('', rootUrl, {
|
|
6572
7150
|
...options,
|
|
6573
7151
|
limit: 25
|
|
6574
7152
|
});
|
|
@@ -6582,7 +7160,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6582
7160
|
}, {
|
|
6583
7161
|
encode: true
|
|
6584
7162
|
})}&format=csv`;
|
|
6585
|
-
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !==
|
|
7163
|
+
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !== 'csv' ? distribution.data.title : dataset.title;
|
|
6586
7164
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
6587
7165
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
6588
7166
|
className: "ds-l-container ds-u-padding-bottom--3 ds-u-margin-bottom--2",
|
|
@@ -6591,7 +7169,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6591
7169
|
children: Object.keys(distribution).length && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
6592
7170
|
children: [
|
|
6593
7171
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6594
|
-
className:
|
|
7172
|
+
className: 'ds-l-md-col--9',
|
|
6595
7173
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
6596
7174
|
to: `/dataset/${id}`,
|
|
6597
7175
|
className: "ds-u-padding-y--4 ds-u-display--block",
|
|
@@ -6602,14 +7180,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6602
7180
|
})
|
|
6603
7181
|
}),
|
|
6604
7182
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6605
|
-
className:
|
|
7183
|
+
className: 'ds-l-md-col--9',
|
|
6606
7184
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
6607
7185
|
className: "ds-text-heading--3xl",
|
|
6608
7186
|
children: customTitle ? customTitle : pageTitle
|
|
6609
7187
|
})
|
|
6610
7188
|
}),
|
|
6611
7189
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6612
|
-
className:
|
|
7190
|
+
className: 'ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right',
|
|
6613
7191
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
6614
7192
|
className: "ds-u-margin--0",
|
|
6615
7193
|
children: [
|
|
@@ -6621,7 +7199,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6621
7199
|
})
|
|
6622
7200
|
}),
|
|
6623
7201
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6624
|
-
className:
|
|
7202
|
+
className: 'ds-l-md-col--9',
|
|
6625
7203
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
6626
7204
|
distribution: distribution,
|
|
6627
7205
|
dataset: dataset,
|
|
@@ -6631,13 +7209,13 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6631
7209
|
})
|
|
6632
7210
|
}),
|
|
6633
7211
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6634
|
-
className:
|
|
7212
|
+
className: 'ds-l-md-col--12',
|
|
6635
7213
|
children: Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
|
|
6636
7214
|
resource: resource,
|
|
6637
7215
|
id: distribution.identifier,
|
|
6638
7216
|
customColumns: customColumns,
|
|
6639
7217
|
setOffset: resource.setOffset
|
|
6640
|
-
}) :
|
|
7218
|
+
}) : ''
|
|
6641
7219
|
}),
|
|
6642
7220
|
Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
6643
7221
|
value: {
|
|
@@ -6648,7 +7226,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6648
7226
|
customColumns: (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution_array[distIndex].identifier])
|
|
6649
7227
|
},
|
|
6650
7228
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6651
|
-
className:
|
|
7229
|
+
className: 'ds-l-md-col--12',
|
|
6652
7230
|
children: [
|
|
6653
7231
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $af099c546cb226c7$export$2e2bcd8739ae039), {
|
|
6654
7232
|
includeDensity: true,
|
|
@@ -6670,14 +7248,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6670
7248
|
]
|
|
6671
7249
|
})
|
|
6672
7250
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6673
|
-
className:
|
|
7251
|
+
className: 'ds-l-md-col--12',
|
|
6674
7252
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
6675
7253
|
role: "status",
|
|
6676
7254
|
"aria-valuetext": "Resource loading"
|
|
6677
7255
|
})
|
|
6678
7256
|
}),
|
|
6679
7257
|
dataset.identifier && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6680
|
-
className:
|
|
7258
|
+
className: 'ds-l-md-col--12',
|
|
6681
7259
|
ref: apiDocs,
|
|
6682
7260
|
children: [
|
|
6683
7261
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
@@ -6686,7 +7264,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
6686
7264
|
}),
|
|
6687
7265
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
6688
7266
|
url: `${rootUrl}/metastore/schemas/dataset/items/${dataset.identifier}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`,
|
|
6689
|
-
docExpansion:
|
|
7267
|
+
docExpansion: 'list',
|
|
6690
7268
|
defaultModelsExpandDepth: -1
|
|
6691
7269
|
})
|
|
6692
7270
|
]
|
|
@@ -6705,7 +7283,7 @@ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, loca
|
|
|
6705
7283
|
const [ready, setReady] = (0, $hgUW1$useState)(false);
|
|
6706
7284
|
const [error, setError] = (0, $hgUW1$useState)(false);
|
|
6707
7285
|
const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
6708
|
-
const distIndex = dist_id ===
|
|
7286
|
+
const distIndex = dist_id === 'data' ? 0 : dist_id;
|
|
6709
7287
|
(0, $hgUW1$useEffect)(()=>{
|
|
6710
7288
|
if (dataset.error) setError(true);
|
|
6711
7289
|
if (dataset.distribution && dataset.distribution.length) {
|
|
@@ -6923,5 +7501,5 @@ var $90fb213ab8eeb2e7$export$2e2bcd8739ae039 = $90fb213ab8eeb2e7$var$useScrollTo
|
|
|
6923
7501
|
|
|
6924
7502
|
|
|
6925
7503
|
|
|
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};
|
|
7504
|
+
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
7505
|
//# sourceMappingURL=main.js.map
|