@civicactions/cmsds-open-data-components 3.9.2-alpha.0 → 3.9.2-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 +11 -1
- package/dist/main.css.map +1 -1
- package/dist/main.js +228 -365
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -2,7 +2,7 @@ import "./main.css";
|
|
|
2
2
|
import {jsx as $hgUW1$jsx, jsxs as $hgUW1$jsxs, Fragment as $hgUW1$Fragment} from "react/jsx-runtime";
|
|
3
3
|
import {Accordion as $hgUW1$Accordion, AccordionItem as $hgUW1$AccordionItem, Button as $hgUW1$Button, CloseIconThin as $hgUW1$CloseIconThin, ArrowIcon as $hgUW1$ArrowIcon, Spinner as $hgUW1$Spinner, Alert as $hgUW1$Alert, Dialog as $hgUW1$Dialog, TextField as $hgUW1$TextField, Tooltip as $hgUW1$Tooltip, TooltipIcon as $hgUW1$TooltipIcon, Dropdown as $hgUW1$Dropdown, Choice as $hgUW1$Choice, Pagination as $hgUW1$Pagination, Badge as $hgUW1$Badge, Table as $hgUW1$Table, TableHead as $hgUW1$TableHead, TableRow as $hgUW1$TableRow, TableCell as $hgUW1$TableCell, TableBody as $hgUW1$TableBody, Tabs as $hgUW1$Tabs, TabPanel as $hgUW1$TabPanel} from "@cmsgov/design-system";
|
|
4
4
|
import $hgUW1$react, {createContext as $hgUW1$createContext, useState as $hgUW1$useState, useRef as $hgUW1$useRef, useEffect as $hgUW1$useEffect, useContext as $hgUW1$useContext, useMemo as $hgUW1$useMemo, useCallback as $hgUW1$useCallback} from "react";
|
|
5
|
-
import {NavLink as $hgUW1$NavLink,
|
|
5
|
+
import {NavLink as $hgUW1$NavLink, Link as $hgUW1$Link, useNavigate as $hgUW1$useNavigate, useLocation as $hgUW1$useLocation, useSearchParams as $hgUW1$useSearchParams} from "react-router-dom";
|
|
6
6
|
import $hgUW1$qs from "qs";
|
|
7
7
|
import $hgUW1$axios from "axios";
|
|
8
8
|
import {useQuery as $hgUW1$useQuery, QueryClient as $hgUW1$QueryClient, QueryClientProvider as $hgUW1$QueryClientProvider} from "@tanstack/react-query";
|
|
@@ -275,7 +275,6 @@ var $11500a65bd7d9cf1$export$2e2bcd8739ae039 = $11500a65bd7d9cf1$var$HeaderConte
|
|
|
275
275
|
|
|
276
276
|
|
|
277
277
|
|
|
278
|
-
|
|
279
278
|
const $61ff88fb3f6ee2c8$var$queryClient = new (0, $hgUW1$QueryClient)({
|
|
280
279
|
defaultOptions: {
|
|
281
280
|
queries: {
|
|
@@ -299,44 +298,25 @@ var $61ff88fb3f6ee2c8$export$2e2bcd8739ae039 = $61ff88fb3f6ee2c8$var$withQueryPr
|
|
|
299
298
|
|
|
300
299
|
|
|
301
300
|
|
|
302
|
-
|
|
303
301
|
const $4808982eba3feb88$var$DatasetListSubmenuItem = (props)=>{
|
|
304
|
-
const
|
|
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
|
-
}
|
|
302
|
+
const { title: title, identifier: identifier, linkClasses: linkClasses } = props;
|
|
316
303
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
317
|
-
className: "dc-c-list-item
|
|
318
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)(
|
|
319
|
-
className: `
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
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
|
-
})
|
|
304
|
+
className: "dc-c-list-item",
|
|
305
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$NavLink), {
|
|
306
|
+
className: `ds-u-display-flex ds-u-align-items--center ds-u-text-align--left ${linkClasses}`,
|
|
307
|
+
to: `/dataset/${identifier}`,
|
|
308
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
309
|
+
className: "ds-text-heading--md ds-u-margin-left--0",
|
|
310
|
+
children: title
|
|
330
311
|
})
|
|
331
312
|
})
|
|
332
|
-
});
|
|
313
|
+
}, identifier);
|
|
333
314
|
};
|
|
334
315
|
var $4808982eba3feb88$export$2e2bcd8739ae039 = $4808982eba3feb88$var$DatasetListSubmenuItem;
|
|
335
316
|
|
|
336
317
|
|
|
337
318
|
|
|
338
319
|
|
|
339
|
-
|
|
340
320
|
function $6d5c0212e738499b$export$34e95918366a058e(params, ACA) {
|
|
341
321
|
if (ACA) params = Object.assign(params, {
|
|
342
322
|
ACA: ACA,
|
|
@@ -346,136 +326,36 @@ function $6d5c0212e738499b$export$34e95918366a058e(params, ACA) {
|
|
|
346
326
|
}
|
|
347
327
|
|
|
348
328
|
|
|
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
329
|
|
|
404
330
|
const $844981eac9b63865$export$eccc29c8d0ff408 = (0, $hgUW1$createContext)({
|
|
405
331
|
ACA: undefined
|
|
406
332
|
});
|
|
407
333
|
|
|
408
334
|
|
|
409
|
-
const $
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
}, dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
335
|
+
const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 4, defaultSort: defaultSort = {
|
|
336
|
+
defaultSort: "modified",
|
|
337
|
+
defaultOrder: "desc"
|
|
338
|
+
}, subLinkClasses: subLinkClasses })=>{
|
|
414
339
|
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
340
|
const [currentResultNumbers, setCurrentResultNumbers] = (0, $hgUW1$useState)({
|
|
421
341
|
total: 0,
|
|
422
342
|
startingNumber: 0,
|
|
423
343
|
endingNumber: 0
|
|
424
344
|
});
|
|
425
345
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
426
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
|
|
427
|
-
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
428
346
|
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
347
|
const pageSize = defaultPageSize;
|
|
433
348
|
(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
349
|
if (totalItems <= 0 && currentResultNumbers !== null) setNoResults(true);
|
|
450
350
|
else setNoResults(false);
|
|
451
351
|
}, [
|
|
452
352
|
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
|
|
353
|
+
pageSize
|
|
463
354
|
]);
|
|
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
355
|
let params = {
|
|
475
|
-
sort:
|
|
476
|
-
["sort-order"]:
|
|
477
|
-
page:
|
|
478
|
-
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
356
|
+
sort: defaultSort.defaultSort,
|
|
357
|
+
["sort-order"]: defaultSort.defaultOrder,
|
|
358
|
+
["page-size"]: defaultPageSize
|
|
479
359
|
};
|
|
480
360
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
481
361
|
queryKey: [
|
|
@@ -489,79 +369,97 @@ const $9384a736d4d6f425$var$DatasetListSubmenu = (props)=>{
|
|
|
489
369
|
})}`);
|
|
490
370
|
}
|
|
491
371
|
});
|
|
492
|
-
|
|
372
|
+
let submenuItemsCount = 0;
|
|
373
|
+
if (data) {
|
|
374
|
+
if (data.data.total && totalItems !== data.data.total) setTotalItems(data.data.total);
|
|
375
|
+
let resultsCount = Object.keys(data.data.results).length;
|
|
376
|
+
// For the submenu pager, If there are fewer than 4 dataset items, display the dataset item count, otherwise, show "Viewing 4..".
|
|
377
|
+
submenuItemsCount = resultsCount > defaultPageSize ? defaultPageSize : resultsCount;
|
|
378
|
+
}
|
|
493
379
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
494
380
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
495
|
-
className: "
|
|
496
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)(
|
|
497
|
-
className: "ds-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
381
|
+
className: " dkan-c-site-menu--sub-menu",
|
|
382
|
+
children: isPending ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
383
|
+
className: "ds-u-valign--middle",
|
|
384
|
+
"aria-valuetext": "Dataset Search loading",
|
|
385
|
+
role: "status"
|
|
386
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
387
|
+
children: [
|
|
388
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
|
|
389
|
+
className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0 ds-u-lg-margin-top--2 ds-u-margin-bottom--2 ds-u-display--block",
|
|
390
|
+
"data-testid": "submenu-results-list",
|
|
505
391
|
children: [
|
|
506
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)(
|
|
507
|
-
|
|
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
|
-
]
|
|
392
|
+
noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
393
|
+
variation: "error",
|
|
394
|
+
heading: "No results found."
|
|
531
395
|
}),
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
396
|
+
data && data.data.results ? Object.keys(data.data.results).map((key)=>{
|
|
397
|
+
return data.data.results[key];
|
|
398
|
+
}).map((item)=>{
|
|
399
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $4808982eba3feb88$export$2e2bcd8739ae039), {
|
|
400
|
+
title: item.title,
|
|
401
|
+
identifier: item.identifier,
|
|
402
|
+
linkClasses: subLinkClasses
|
|
403
|
+
}, item.identifier);
|
|
404
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
405
|
+
variation: "error",
|
|
406
|
+
heading: "Could not connect to the API."
|
|
407
|
+
})
|
|
408
|
+
]
|
|
409
|
+
}),
|
|
410
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
411
|
+
className: "ds-u-display--flex ds-u-justify-content--between ds-u-align-items--center ds-u-border-top--1 ds-u-padding-top--3 ds-u-padding-bottom--2 ds-u-margin-x--3 ds-u-lg-margin-x--0",
|
|
412
|
+
children: enablePagination && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
413
|
+
children: [
|
|
414
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
415
|
+
className: "",
|
|
536
416
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
537
|
-
className: "ds-u-margin-y--0",
|
|
417
|
+
className: "ds-u-margin-y--0 ds-u-font-size--sm",
|
|
538
418
|
"aria-hidden": "true",
|
|
539
|
-
children:
|
|
419
|
+
children: data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
540
420
|
children: [
|
|
541
421
|
"Viewing ",
|
|
542
|
-
|
|
422
|
+
submenuItemsCount,
|
|
543
423
|
" of ",
|
|
544
424
|
data.data.total
|
|
545
425
|
]
|
|
546
426
|
})
|
|
547
427
|
})
|
|
428
|
+
}),
|
|
429
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
430
|
+
className: "",
|
|
431
|
+
children: data && data.data.total > 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
432
|
+
className: "ds-u-padding--0 ds-c-button ds-c-button--ghost dkan-c-header--link",
|
|
433
|
+
to: `../whats-new`,
|
|
434
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
435
|
+
className: "ds-text-heading--md",
|
|
436
|
+
children: [
|
|
437
|
+
" ",
|
|
438
|
+
`View all ${data.data.total} entries`,
|
|
439
|
+
" "
|
|
440
|
+
]
|
|
441
|
+
})
|
|
442
|
+
})
|
|
548
443
|
})
|
|
549
|
-
|
|
550
|
-
|
|
444
|
+
]
|
|
445
|
+
})
|
|
551
446
|
})
|
|
552
|
-
|
|
447
|
+
]
|
|
553
448
|
})
|
|
554
449
|
})
|
|
555
450
|
});
|
|
556
451
|
};
|
|
557
|
-
var $
|
|
452
|
+
var $10bc3aae21fc1572$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2bcd8739ae039)($10bc3aae21fc1572$var$DatasetListSubmenu);
|
|
453
|
+
|
|
558
454
|
|
|
559
455
|
|
|
560
456
|
|
|
561
457
|
|
|
562
458
|
|
|
563
|
-
|
|
564
|
-
|
|
459
|
+
|
|
460
|
+
const $6d0cf21faac6a2dd$var$SubMenuStaticList = ({ submenuArray: submenuArray, subLinkClasses: subLinkClasses, setIsExpanded: setIsExpanded })=>{
|
|
461
|
+
// Render a static list of submenu items as listed in the assets/menu.jsx file.
|
|
462
|
+
let submenuItems = submenuArray.map((s)=>{
|
|
565
463
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
566
464
|
children: s.external || s.drupalPage ? /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
567
465
|
href: s.url,
|
|
@@ -575,7 +473,7 @@ const $4f153ca537d853e5$var$SubMenuStaticItem = (submenuArray, subLinkClasses)=>
|
|
|
575
473
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$NavLink), {
|
|
576
474
|
to: s.url,
|
|
577
475
|
className: `ds-u-display-flex ds-u-align-items--center ${subLinkClasses}`,
|
|
578
|
-
onClick: ()=>setIsExpanded(
|
|
476
|
+
onClick: ()=>setIsExpanded((prev)=>!prev),
|
|
579
477
|
children: [
|
|
580
478
|
s.icon ?? null,
|
|
581
479
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -585,19 +483,16 @@ const $4f153ca537d853e5$var$SubMenuStaticItem = (submenuArray, subLinkClasses)=>
|
|
|
585
483
|
})
|
|
586
484
|
}, s.id);
|
|
587
485
|
});
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
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"
|
|
486
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
487
|
+
className: `dkan-c-site-menu--sub-menu`,
|
|
488
|
+
children: submenuItems
|
|
597
489
|
});
|
|
598
490
|
};
|
|
491
|
+
var $6d0cf21faac6a2dd$export$2e2bcd8739ae039 = $6d0cf21faac6a2dd$var$SubMenuStaticList;
|
|
492
|
+
|
|
493
|
+
|
|
599
494
|
const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, subLinkClasses: subLinkClasses, wrapLabel: wrapLabel = true })=>{
|
|
600
|
-
const [
|
|
495
|
+
const [isExpanded, setIsExpanded] = (0, $hgUW1$useState)(false);
|
|
601
496
|
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
602
497
|
const innerHtml = wrapLabel ? /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
603
498
|
children: link.label
|
|
@@ -607,10 +502,10 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
607
502
|
let currentMenu = null;
|
|
608
503
|
if (menu.current) currentMenu = menu.current;
|
|
609
504
|
function handleClickOutside(event) {
|
|
610
|
-
if (currentMenu && !currentMenu.contains(event.target))
|
|
505
|
+
if (currentMenu && !currentMenu.contains(event.target)) setIsExpanded(false);
|
|
611
506
|
}
|
|
612
507
|
function handleFocusOut(event) {
|
|
613
|
-
if (currentMenu && !currentMenu.contains(event.relatedTarget))
|
|
508
|
+
if (currentMenu && !currentMenu.contains(event.relatedTarget)) setIsExpanded(false);
|
|
614
509
|
}
|
|
615
510
|
document.addEventListener("mousedown", handleClickOutside);
|
|
616
511
|
currentMenu?.addEventListener("focusout", handleFocusOut);
|
|
@@ -619,15 +514,26 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
619
514
|
if (currentMenu) currentMenu.removeEventListener("focusout", handleFocusOut);
|
|
620
515
|
};
|
|
621
516
|
}, [
|
|
622
|
-
|
|
517
|
+
isExpanded
|
|
623
518
|
]);
|
|
624
519
|
let submenuBlock;
|
|
625
520
|
if (link.submenu) {
|
|
626
|
-
if (Array.isArray(link.submenu)) submenuBlock = $
|
|
627
|
-
|
|
521
|
+
if (Array.isArray(link.submenu)) submenuBlock = /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6d0cf21faac6a2dd$export$2e2bcd8739ae039), {
|
|
522
|
+
submenuArray: link.submenu,
|
|
523
|
+
subLinkClasses: subLinkClasses,
|
|
524
|
+
setIsExpanded: setIsExpanded
|
|
525
|
+
});
|
|
526
|
+
else if (/*#__PURE__*/ (0, $hgUW1$react).isValidElement(link.submenu)) {
|
|
527
|
+
const { rootUrl: rootUrl, location: location } = link.submenu.props;
|
|
528
|
+
submenuBlock = /*#__PURE__*/ (0, $hgUW1$jsx)((0, $10bc3aae21fc1572$export$2e2bcd8739ae039), {
|
|
529
|
+
location: location,
|
|
530
|
+
rootUrl: rootUrl,
|
|
531
|
+
subLinkClasses: subLinkClasses
|
|
532
|
+
});
|
|
533
|
+
}
|
|
628
534
|
}
|
|
629
535
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
630
|
-
className: `dkan-c-nav-submenu has-submenu${
|
|
536
|
+
className: `dkan-c-nav-submenu has-submenu${isExpanded ? " open" : ""}`,
|
|
631
537
|
ref: menu,
|
|
632
538
|
children: [
|
|
633
539
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
@@ -635,23 +541,20 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
635
541
|
onDark: headerContext.onDark,
|
|
636
542
|
className: `${linkClasses}`,
|
|
637
543
|
"aria-haspopup": "true",
|
|
638
|
-
"aria-expanded":
|
|
544
|
+
"aria-expanded": isExpanded,
|
|
639
545
|
onClick: (e)=>{
|
|
640
546
|
e.preventDefault();
|
|
641
|
-
|
|
547
|
+
setIsExpanded(!isExpanded);
|
|
642
548
|
},
|
|
643
549
|
children: [
|
|
644
550
|
innerHtml,
|
|
645
551
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
|
|
646
552
|
className: "ds-u-margin-left--1",
|
|
647
|
-
direction:
|
|
553
|
+
direction: isExpanded ? "down" : "right"
|
|
648
554
|
})
|
|
649
555
|
]
|
|
650
556
|
}),
|
|
651
|
-
|
|
652
|
-
className: "dkan-c-site-menu--sub-menu",
|
|
653
|
-
children: submenuBlock
|
|
654
|
-
})
|
|
557
|
+
submenuBlock
|
|
655
558
|
]
|
|
656
559
|
});
|
|
657
560
|
};
|
|
@@ -1762,6 +1665,7 @@ var $52c6454cae137465$export$2e2bcd8739ae039 = $52c6454cae137465$var$DatasetSear
|
|
|
1762
1665
|
|
|
1763
1666
|
|
|
1764
1667
|
|
|
1668
|
+
|
|
1765
1669
|
const $789279954d8eff7f$var$ApiDocumentation = ({ endpoint: endpoint })=>{
|
|
1766
1670
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1767
1671
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
@@ -4056,6 +3960,61 @@ var $5723016a5461c1ca$export$2e2bcd8739ae039 = $5723016a5461c1ca$var$PageHeader;
|
|
|
4056
3960
|
|
|
4057
3961
|
|
|
4058
3962
|
|
|
3963
|
+
function $eff7d34c30f5a0fc$export$959638e8dca60ce6(facets) {
|
|
3964
|
+
let facetObj = {};
|
|
3965
|
+
if (facets) {
|
|
3966
|
+
facets.forEach((f)=>{
|
|
3967
|
+
if (facetObj[f.type]) facetObj[f.type] = [
|
|
3968
|
+
...facetObj[f.type],
|
|
3969
|
+
f
|
|
3970
|
+
];
|
|
3971
|
+
else facetObj[f.type] = [
|
|
3972
|
+
f
|
|
3973
|
+
];
|
|
3974
|
+
});
|
|
3975
|
+
// sort facets descending by int value, put non int last
|
|
3976
|
+
if (facetObj.keyword) facetObj.keyword.sort((a, b)=>{
|
|
3977
|
+
if (Number(a.name) && Number(b.name)) return Number(b.name) - Number(a.name);
|
|
3978
|
+
});
|
|
3979
|
+
return facetObj;
|
|
3980
|
+
}
|
|
3981
|
+
}
|
|
3982
|
+
function $eff7d34c30f5a0fc$export$60ec7cc1d341a524(searchParams, defaultSortOptions) {
|
|
3983
|
+
const params = (0, $hgUW1$qs).parse(searchParams, {
|
|
3984
|
+
ignoreQueryPrefix: true
|
|
3985
|
+
});
|
|
3986
|
+
let themes = params.theme;
|
|
3987
|
+
let keywords = params.keyword;
|
|
3988
|
+
return {
|
|
3989
|
+
page: params.page,
|
|
3990
|
+
sort: !params.sort ? defaultSortOptions.defaultSort : params.sort,
|
|
3991
|
+
sortOrder: !params.sortOrder ? defaultSortOptions.defaultOrder : params.sortOrder,
|
|
3992
|
+
fulltext: params.fulltext,
|
|
3993
|
+
selectedFacets: {
|
|
3994
|
+
theme: themes ? themes : [],
|
|
3995
|
+
keyword: keywords ? keywords : []
|
|
3996
|
+
}
|
|
3997
|
+
};
|
|
3998
|
+
}
|
|
3999
|
+
async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA) {
|
|
4000
|
+
const { fulltext: fulltext, selectedFacets: selectedFacets, sort: sort, sortOrder: sortOrder, page: page, pageSize: pageSize } = options;
|
|
4001
|
+
let params = {
|
|
4002
|
+
fulltext: fulltext ? fulltext : undefined,
|
|
4003
|
+
...selectedFacets,
|
|
4004
|
+
sort: sort ? sort : undefined,
|
|
4005
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4006
|
+
page: page !== 1 ? page : undefined,
|
|
4007
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4008
|
+
};
|
|
4009
|
+
return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4010
|
+
arrayFormat: "comma",
|
|
4011
|
+
encode: false
|
|
4012
|
+
})}`);
|
|
4013
|
+
}
|
|
4014
|
+
|
|
4015
|
+
|
|
4016
|
+
|
|
4017
|
+
|
|
4059
4018
|
|
|
4060
4019
|
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
4061
4020
|
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
@@ -4456,11 +4415,10 @@ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
4456
4415
|
|
|
4457
4416
|
|
|
4458
4417
|
|
|
4459
|
-
const $550bcc185f420ff5$var$DatasetList = (
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
}, pageTitle: pageTitle = "What's New ", showLargeFileWarning: showLargeFileWarning = false, introText: introText = "", dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
4418
|
+
const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4419
|
+
defaultSort: "modified",
|
|
4420
|
+
defaultOrder: "desc"
|
|
4421
|
+
}, pageTitle: pageTitle = "What's New ", showLargeFileWarning: showLargeFileWarning = false, introText: introText = "", dataDictionaryLinks: dataDictionaryLinks = false })=>{
|
|
4464
4422
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4465
4423
|
const sortOptions = [
|
|
4466
4424
|
{
|
|
@@ -4592,29 +4550,26 @@ const $550bcc185f420ff5$var$DatasetList = (props)=>{
|
|
|
4592
4550
|
children: [
|
|
4593
4551
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4594
4552
|
className: "ds-l-row",
|
|
4595
|
-
children: /*#__PURE__*/ (0, $hgUW1$
|
|
4553
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4596
4554
|
className: "ds-l-col--12",
|
|
4597
|
-
children:
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
className: "ds-l-
|
|
4601
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)(
|
|
4602
|
-
|
|
4603
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
heading: "Please read before downloading datasets",
|
|
4608
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b2d31a9c6cd2284$export$2e2bcd8739ae039), {})
|
|
4609
|
-
})
|
|
4555
|
+
children: showLargeFileWarning && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4556
|
+
className: "ds-l-row ds-u-margin-bottom--2 ds-u-margin-top--4",
|
|
4557
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4558
|
+
className: "ds-l-md-col--12",
|
|
4559
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Accordion), {
|
|
4560
|
+
bordered: true,
|
|
4561
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$AccordionItem), {
|
|
4562
|
+
contentClassName: "downloading-datasets",
|
|
4563
|
+
heading: "Please read before downloading datasets",
|
|
4564
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b2d31a9c6cd2284$export$2e2bcd8739ae039), {})
|
|
4610
4565
|
})
|
|
4611
4566
|
})
|
|
4612
4567
|
})
|
|
4613
|
-
|
|
4568
|
+
})
|
|
4614
4569
|
})
|
|
4615
4570
|
}),
|
|
4616
4571
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4617
|
-
className: "ds-l-row
|
|
4572
|
+
className: "ds-l-row",
|
|
4618
4573
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4619
4574
|
className: "ds-l-col--12",
|
|
4620
4575
|
children: isPending ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
@@ -4626,32 +4581,40 @@ const $550bcc185f420ff5$var$DatasetList = (props)=>{
|
|
|
4626
4581
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4627
4582
|
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",
|
|
4628
4583
|
children: [
|
|
4629
|
-
|
|
4584
|
+
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4630
4585
|
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--8 ds-u-sm-padding-left--0",
|
|
4631
4586
|
children: [
|
|
4632
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("
|
|
4633
|
-
className: "ds-u-margin-
|
|
4634
|
-
|
|
4635
|
-
children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
4636
|
-
children: [
|
|
4637
|
-
"Showing ",
|
|
4638
|
-
currentResultNumbers.startingNumber,
|
|
4639
|
-
" -",
|
|
4640
|
-
" ",
|
|
4641
|
-
currentResultNumbers.endingNumber,
|
|
4642
|
-
" of ",
|
|
4643
|
-
data.data.total,
|
|
4644
|
-
" datasets"
|
|
4645
|
-
]
|
|
4646
|
-
})
|
|
4587
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4588
|
+
className: "ds-u-margin-bottom--3",
|
|
4589
|
+
children: introText ? introText : null
|
|
4647
4590
|
}),
|
|
4648
|
-
/*#__PURE__*/ (0, $hgUW1$
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4591
|
+
enablePagination && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4592
|
+
children: [
|
|
4593
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4594
|
+
className: "ds-u-margin-y--0",
|
|
4595
|
+
"aria-hidden": "true",
|
|
4596
|
+
children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
4597
|
+
children: [
|
|
4598
|
+
"Showing ",
|
|
4599
|
+
currentResultNumbers.startingNumber,
|
|
4600
|
+
" -",
|
|
4601
|
+
" ",
|
|
4602
|
+
currentResultNumbers.endingNumber,
|
|
4603
|
+
" of ",
|
|
4604
|
+
data.data.total,
|
|
4605
|
+
" datasets"
|
|
4606
|
+
]
|
|
4607
|
+
})
|
|
4608
|
+
}),
|
|
4609
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4610
|
+
className: "ds-u-visibility--screen-reader",
|
|
4611
|
+
role: "status",
|
|
4612
|
+
"aria-live": "assertive",
|
|
4613
|
+
"aria-atomic": "true",
|
|
4614
|
+
"data-testid": "currentResults",
|
|
4615
|
+
children: announcementText
|
|
4616
|
+
})
|
|
4617
|
+
]
|
|
4655
4618
|
})
|
|
4656
4619
|
]
|
|
4657
4620
|
}),
|
|
@@ -4670,7 +4633,7 @@ const $550bcc185f420ff5$var$DatasetList = (props)=>{
|
|
|
4670
4633
|
}),
|
|
4671
4634
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
|
|
4672
4635
|
className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0 ds-u-margin-bottom--4 ds-u-display--block",
|
|
4673
|
-
"data-testid": "results-list",
|
|
4636
|
+
"data-testid": "datasetlist-results-list",
|
|
4674
4637
|
children: [
|
|
4675
4638
|
noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
4676
4639
|
variation: "error",
|
|
@@ -4732,7 +4695,6 @@ var $550bcc185f420ff5$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
4732
4695
|
|
|
4733
4696
|
|
|
4734
4697
|
|
|
4735
|
-
|
|
4736
4698
|
const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
4737
4699
|
const [dataset, setDataset] = (0, $hgUW1$useState)({
|
|
4738
4700
|
title: "",
|
|
@@ -5878,86 +5840,6 @@ var $6012b86ffcaf3f71$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
5878
5840
|
|
|
5879
5841
|
|
|
5880
5842
|
|
|
5881
|
-
const $09db8d23c70b6400$var$StoredQueryViewer = ({ id: id })=>{
|
|
5882
|
-
const [loading, setLoading] = (0, $hgUW1$useState)(false);
|
|
5883
|
-
const [data, setData] = (0, $hgUW1$useState)(null);
|
|
5884
|
-
const [error, setError] = (0, $hgUW1$useState)(null);
|
|
5885
|
-
(0, $hgUW1$useEffect)(()=>{
|
|
5886
|
-
if (!id) return;
|
|
5887
|
-
setLoading(true);
|
|
5888
|
-
fetch(`/api/1/stored-query/items/${id}`).then((response)=>{
|
|
5889
|
-
if (!response.ok) throw new Error("Network response was not ok");
|
|
5890
|
-
return response.json();
|
|
5891
|
-
}).then((json)=>{
|
|
5892
|
-
setData(json);
|
|
5893
|
-
setLoading(false);
|
|
5894
|
-
}).catch((err)=>{
|
|
5895
|
-
setError(err.message);
|
|
5896
|
-
setLoading(false);
|
|
5897
|
-
});
|
|
5898
|
-
}, [
|
|
5899
|
-
id
|
|
5900
|
-
]);
|
|
5901
|
-
if (loading) return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5902
|
-
children: "Loading..."
|
|
5903
|
-
});
|
|
5904
|
-
if (error) return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5905
|
-
children: [
|
|
5906
|
-
"Error: ",
|
|
5907
|
-
error
|
|
5908
|
-
]
|
|
5909
|
-
});
|
|
5910
|
-
if (!data) return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5911
|
-
children: "No data found."
|
|
5912
|
-
});
|
|
5913
|
-
const storedQueryUrl = `/stored-query/${data.storedQuery?.uuid}`;
|
|
5914
|
-
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
5915
|
-
className: "dc-c-list-item ds-u-padding-top--4",
|
|
5916
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5917
|
-
className: "dc-c-searchlist-item ds-u-border-bottom--1 ds-u-padding-bottom--3",
|
|
5918
|
-
children: [
|
|
5919
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
5920
|
-
className: "ds-l-row ds-u-align-items--start",
|
|
5921
|
-
children: [
|
|
5922
|
-
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5923
|
-
id: `dataset-${data.storedQuery?.identifier}-updated-date`,
|
|
5924
|
-
className: "ds-l-col--12 ds-u-text-align--left ds-text-heading--sm ds-u-padding-top--0",
|
|
5925
|
-
children: [
|
|
5926
|
-
"Updated ",
|
|
5927
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5928
|
-
date: data.storedQuery?.modified
|
|
5929
|
-
})
|
|
5930
|
-
]
|
|
5931
|
-
}),
|
|
5932
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
5933
|
-
className: "ds-l-col--12 ds-text-heading--2xl",
|
|
5934
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5935
|
-
href: storedQueryUrl,
|
|
5936
|
-
target: "_blank",
|
|
5937
|
-
children: data.storedQuery?.title
|
|
5938
|
-
})
|
|
5939
|
-
})
|
|
5940
|
-
]
|
|
5941
|
-
}),
|
|
5942
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5943
|
-
className: "ds-l-row",
|
|
5944
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5945
|
-
className: "ds-l-col--12",
|
|
5946
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
5947
|
-
children: data.storedQuery?.description
|
|
5948
|
-
})
|
|
5949
|
-
})
|
|
5950
|
-
})
|
|
5951
|
-
]
|
|
5952
|
-
})
|
|
5953
|
-
});
|
|
5954
|
-
};
|
|
5955
|
-
var $09db8d23c70b6400$export$2e2bcd8739ae039 = $09db8d23c70b6400$var$StoredQueryViewer;
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
5843
|
|
|
5962
5844
|
|
|
5963
5845
|
|
|
@@ -6053,7 +5935,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
6053
5935
|
dataDictionaryLoading: isPending
|
|
6054
5936
|
};
|
|
6055
5937
|
};
|
|
6056
|
-
const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns: customColumns, setDatasetTitle: setDatasetTitle, customMetadataMapping: customMetadataMapping, apiPageUrl: apiPageUrl = "/api", dataDictionaryUrl: dataDictionaryUrl, borderlessTabs: borderlessTabs = false, defaultPageSize: defaultPageSize = 25, dataDictionaryCSV: dataDictionaryCSV = false, dataDictionaryBanner: dataDictionaryBanner = false, disableTableControls: disableTableControls = false, hideDataDictionary: hideDataDictionary = false,
|
|
5938
|
+
const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns: customColumns, setDatasetTitle: setDatasetTitle, customMetadataMapping: customMetadataMapping, apiPageUrl: apiPageUrl = "/api", dataDictionaryUrl: dataDictionaryUrl, borderlessTabs: borderlessTabs = false, defaultPageSize: defaultPageSize = 25, dataDictionaryCSV: dataDictionaryCSV = false, dataDictionaryBanner: dataDictionaryBanner = false, disableTableControls: disableTableControls = false, hideDataDictionary: hideDataDictionary = false, customDescription: customDescription, updateAriaLive: updateAriaLive, showRowLimitNotice: showRowLimitNotice = false })=>{
|
|
6057
5939
|
const options = location.search ? {
|
|
6058
5940
|
...(0, $hgUW1$qs).parse(location.search, {
|
|
6059
5941
|
ignoreQueryPrefix: true
|
|
@@ -6257,23 +6139,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6257
6139
|
})
|
|
6258
6140
|
]
|
|
6259
6141
|
}),
|
|
6260
|
-
|
|
6261
|
-
id: "storedQuery",
|
|
6262
|
-
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6263
|
-
className: "ds-u-color--primary",
|
|
6264
|
-
children: [
|
|
6265
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $b38839fd67928f42$export$2e2bcd8739ae039), {
|
|
6266
|
-
id: "storedQuery"
|
|
6267
|
-
}),
|
|
6268
|
-
"Stored Query"
|
|
6269
|
-
]
|
|
6270
|
-
}),
|
|
6271
|
-
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6272
|
-
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $09db8d23c70b6400$export$2e2bcd8739ae039), {
|
|
6273
|
-
id: id
|
|
6274
|
-
})
|
|
6275
|
-
}),
|
|
6276
|
-
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TabPanel), {
|
|
6142
|
+
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6277
6143
|
id: "api",
|
|
6278
6144
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6279
6145
|
className: "ds-u-color--primary",
|
|
@@ -6285,15 +6151,12 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6285
6151
|
]
|
|
6286
6152
|
}),
|
|
6287
6153
|
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6288
|
-
children:
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
showRowLimitNotice: showRowLimitNotice
|
|
6295
|
-
})
|
|
6296
|
-
]
|
|
6154
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
|
|
6155
|
+
id: id,
|
|
6156
|
+
rootUrl: rootUrl,
|
|
6157
|
+
apiUrl: apiPageUrl,
|
|
6158
|
+
showRowLimitNotice: showRowLimitNotice
|
|
6159
|
+
})
|
|
6297
6160
|
})
|
|
6298
6161
|
]
|
|
6299
6162
|
})
|
|
@@ -7769,5 +7632,5 @@ var $90fb213ab8eeb2e7$export$2e2bcd8739ae039 = $90fb213ab8eeb2e7$var$useScrollTo
|
|
|
7769
7632
|
|
|
7770
7633
|
|
|
7771
7634
|
|
|
7772
|
-
export {$e49d4387bed21287$export$2e2bcd8739ae039 as ApiRowLimitNotice, $a8accc31bf9e0bda$export$2e2bcd8739ae039 as CMSTopNav, $c49454ea7d1c4579$export$2e2bcd8739ae039 as ErrorBoundary, $046ded0064bd0a3d$export$2e2bcd8739ae039 as FAQAccordion, $b939b31651e82908$export$2e2bcd8739ae039 as HeaderNav, $1555e1cb3eb7b3e3$export$2e2bcd8739ae039 as HeaderNavIconLink, $fea9297ba4dd394c$export$2e2bcd8739ae039 as HeaderSearch, $9a8892c5ac150556$export$2e2bcd8739ae039 as HeaderSiteTitle, $3c72c298c3a7f21f$export$2e2bcd8739ae039 as HeaderTagline, $403833a4b442d5df$export$2e2bcd8739ae039 as MobileMenuButton, $f57121650539d8c5$export$2e2bcd8739ae039 as NavBar, $953b286f7778640e$export$2e2bcd8739ae039 as SidebarNavigation, $b0968edc60d7d3a4$export$2e2bcd8739ae039 as SidebarPage, $4f153ca537d853e5$export$2e2bcd8739ae039 as SubMenu, $59a079354baa335c$export$2e2bcd8739ae039 as Hero, $c068004d499082cc$export$2e2bcd8739ae039 as DatasetListItem, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $17711e94d2ce0ee4$export$2e2bcd8739ae039 as DatasetDateItem, $20de4fedf33d4f9a$export$2e2bcd8739ae039 as DatasetDate, $789279954d8eff7f$export$2e2bcd8739ae039 as ApiDocumentation, $af099c546cb226c7$export$2e2bcd8739ae039 as ResourceHeader, $626282d9a03c51d5$export$2e2bcd8739ae039 as ResourcePreview, $072291d44ce1834a$export$2e2bcd8739ae039 as ResourceFooter, $ec3e23baa005dc03$export$2e2bcd8739ae039 as Breadcrumb, $bd76a91923d7e8a7$export$2e2bcd8739ae039 as TransformedDate, $d98f94c79ddf4e0e$export$2e2bcd8739ae039 as DataTable, $bdb071ea3a6d3466$export$2e2bcd8739ae039 as SearchInput, $5644ebd2c3dbfd7b$export$eea3a12df15499ca as buildRows, $2ed0091f7e32d1e6$export$2e2bcd8739ae039 as DataTablePageResults, $1a2bf34e2a8f6b80$export$59a943b34a82e690 as truncateText, $c96c4b9ef7203c1f$export$2e2bcd8739ae039 as APIPage, $026cb986f9fea2b1$export$2e2bcd8739ae039 as PageNotFound, $e873081a6e8f024e$export$2e2bcd8739ae039 as DatasetSearch, $550bcc185f420ff5$export$2e2bcd8739ae039 as DatasetList, $
|
|
7635
|
+
export {$e49d4387bed21287$export$2e2bcd8739ae039 as ApiRowLimitNotice, $a8accc31bf9e0bda$export$2e2bcd8739ae039 as CMSTopNav, $c49454ea7d1c4579$export$2e2bcd8739ae039 as ErrorBoundary, $046ded0064bd0a3d$export$2e2bcd8739ae039 as FAQAccordion, $b939b31651e82908$export$2e2bcd8739ae039 as HeaderNav, $1555e1cb3eb7b3e3$export$2e2bcd8739ae039 as HeaderNavIconLink, $fea9297ba4dd394c$export$2e2bcd8739ae039 as HeaderSearch, $9a8892c5ac150556$export$2e2bcd8739ae039 as HeaderSiteTitle, $3c72c298c3a7f21f$export$2e2bcd8739ae039 as HeaderTagline, $403833a4b442d5df$export$2e2bcd8739ae039 as MobileMenuButton, $f57121650539d8c5$export$2e2bcd8739ae039 as NavBar, $953b286f7778640e$export$2e2bcd8739ae039 as SidebarNavigation, $b0968edc60d7d3a4$export$2e2bcd8739ae039 as SidebarPage, $4f153ca537d853e5$export$2e2bcd8739ae039 as SubMenu, $59a079354baa335c$export$2e2bcd8739ae039 as Hero, $c068004d499082cc$export$2e2bcd8739ae039 as DatasetListItem, $52c6454cae137465$export$2e2bcd8739ae039 as DatasetSearchListItem, $17711e94d2ce0ee4$export$2e2bcd8739ae039 as DatasetDateItem, $20de4fedf33d4f9a$export$2e2bcd8739ae039 as DatasetDate, $10bc3aae21fc1572$export$2e2bcd8739ae039 as DatasetListSubmenu, $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, $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};
|
|
7773
7636
|
//# sourceMappingURL=main.js.map
|