@civicactions/cmsds-open-data-components 4.0.13-alpha.3 → 4.0.13-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.css +2 -8
- package/dist/main.css.map +1 -1
- package/dist/main.js +608 -664
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +70 -71
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -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), {
|
|
@@ -278,16 +278,7 @@ var $11500a65bd7d9cf1$export$2e2bcd8739ae039 = $11500a65bd7d9cf1$var$HeaderConte
|
|
|
278
278
|
const $61ff88fb3f6ee2c8$var$queryClient = new (0, $hgUW1$QueryClient)({
|
|
279
279
|
defaultOptions: {
|
|
280
280
|
queries: {
|
|
281
|
-
|
|
282
|
-
refetchOnWindowFocus: false,
|
|
283
|
-
// Keep unused cache for 10 minutes (default is 5)
|
|
284
|
-
// Helps users navigating back/forward see cached data while refetch happens
|
|
285
|
-
gcTime: 600000,
|
|
286
|
-
// Reduce retries for slow connections
|
|
287
|
-
// Default is 3 with exponential backoff (can take 7+ seconds)
|
|
288
|
-
retry: 1,
|
|
289
|
-
// Fixed retry delay instead of exponential
|
|
290
|
-
retryDelay: 1000
|
|
281
|
+
refetchOnWindowFocus: false
|
|
291
282
|
}
|
|
292
283
|
}
|
|
293
284
|
});
|
|
@@ -342,8 +333,8 @@ const $844981eac9b63865$export$eccc29c8d0ff408 = (0, $hgUW1$createContext)({
|
|
|
342
333
|
|
|
343
334
|
|
|
344
335
|
const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 4, defaultSort: defaultSort = {
|
|
345
|
-
defaultSort:
|
|
346
|
-
defaultOrder:
|
|
336
|
+
defaultSort: "modified",
|
|
337
|
+
defaultOrder: "desc"
|
|
347
338
|
}, subLinkClasses: subLinkClasses })=>{
|
|
348
339
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
349
340
|
const [currentResultNumbers, setCurrentResultNumbers] = (0, $hgUW1$useState)({
|
|
@@ -363,8 +354,8 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
|
|
|
363
354
|
]);
|
|
364
355
|
let params = {
|
|
365
356
|
sort: defaultSort.defaultSort,
|
|
366
|
-
[
|
|
367
|
-
[
|
|
357
|
+
["sort-order"]: defaultSort.defaultOrder,
|
|
358
|
+
["page-size"]: defaultPageSize
|
|
368
359
|
};
|
|
369
360
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
370
361
|
queryKey: [
|
|
@@ -373,20 +364,14 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
|
|
|
373
364
|
],
|
|
374
365
|
queryFn: ()=>{
|
|
375
366
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
376
|
-
arrayFormat:
|
|
367
|
+
arrayFormat: "comma",
|
|
377
368
|
encode: false
|
|
378
369
|
})}`);
|
|
379
370
|
}
|
|
380
371
|
});
|
|
381
|
-
// Sync totalItems state with API response data
|
|
382
|
-
// Moved to useEffect to prevent state updates during render (which can cause infinite loops)
|
|
383
|
-
(0, $hgUW1$useEffect)(()=>{
|
|
384
|
-
if (data?.data?.total !== undefined && data.data.total !== totalItems) setTotalItems(data.data.total);
|
|
385
|
-
}, [
|
|
386
|
-
data?.data?.total
|
|
387
|
-
]);
|
|
388
372
|
let submenuItemsCount = 0;
|
|
389
373
|
if (data) {
|
|
374
|
+
if (data.data.total && totalItems !== data.data.total) setTotalItems(data.data.total);
|
|
390
375
|
let resultsCount = Object.keys(data.data.results).length;
|
|
391
376
|
// For the submenu pager, If there are fewer than 4 dataset items, display the dataset item count, otherwise, show "Viewing 4..".
|
|
392
377
|
submenuItemsCount = resultsCount > defaultPageSize ? defaultPageSize : resultsCount;
|
|
@@ -522,11 +507,11 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
522
507
|
function handleFocusOut(event) {
|
|
523
508
|
if (currentMenu && !currentMenu.contains(event.relatedTarget)) setIsExpanded(false);
|
|
524
509
|
}
|
|
525
|
-
document.addEventListener(
|
|
526
|
-
currentMenu?.addEventListener(
|
|
510
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
511
|
+
currentMenu?.addEventListener("focusout", handleFocusOut);
|
|
527
512
|
return ()=>{
|
|
528
|
-
document.removeEventListener(
|
|
529
|
-
if (currentMenu) currentMenu.removeEventListener(
|
|
513
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
514
|
+
if (currentMenu) currentMenu.removeEventListener("focusout", handleFocusOut);
|
|
530
515
|
};
|
|
531
516
|
}, [
|
|
532
517
|
isExpanded
|
|
@@ -548,7 +533,7 @@ const $4f153ca537d853e5$var$SubMenu = ({ link: link, linkClasses: linkClasses, s
|
|
|
548
533
|
}
|
|
549
534
|
}
|
|
550
535
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
551
|
-
className: `dkan-c-nav-submenu has-submenu${isExpanded ?
|
|
536
|
+
className: `dkan-c-nav-submenu has-submenu${isExpanded ? " open" : ""}`,
|
|
552
537
|
ref: menu,
|
|
553
538
|
children: [
|
|
554
539
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
@@ -584,12 +569,12 @@ var $4f153ca537d853e5$export$2e2bcd8739ae039 = $4f153ca537d853e5$var$SubMenu;
|
|
|
584
569
|
const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
|
|
585
570
|
const { headingText: headingText = "Dataset Search" } = props;
|
|
586
571
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
587
|
-
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)(
|
|
572
|
+
const [modalSearchTerm, setModalSearchTerm] = (0, $hgUW1$useState)("");
|
|
588
573
|
const [modalSearch, setModalSearch] = (0, $hgUW1$useState)(false);
|
|
589
574
|
function searchForDataset(e) {
|
|
590
575
|
e.preventDefault();
|
|
591
576
|
if (window) {
|
|
592
|
-
if (window.location.pathname !==
|
|
577
|
+
if (window.location.pathname !== "/datasets") navigate(`/datasets?fulltext=${modalSearchTerm}`);
|
|
593
578
|
else {
|
|
594
579
|
window.location.search = `fulltext=${modalSearchTerm}`;
|
|
595
580
|
setModalSearch(false);
|
|
@@ -657,9 +642,9 @@ const $b939b31651e82908$var$HeaderNav = (props)=>{
|
|
|
657
642
|
const headerContext = (0, $hgUW1$react).useContext((0, $11500a65bd7d9cf1$export$2e2bcd8739ae039));
|
|
658
643
|
const { links: links, topNavLinks: topNavLinks, wrapperClasses: wrapperClasses, searchInMobile: searchInMobile } = props;
|
|
659
644
|
const navMenuOpenClass = `dkan-c-nav-menu--${headerContext.mobileMenuOpen ? "open" : "close"}`;
|
|
660
|
-
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ?
|
|
661
|
-
const linkClasses =
|
|
662
|
-
const listClasses =
|
|
645
|
+
const isMobileClass = `dkan-c-nav-menu--${headerContext.isMobile ? "mobile" : "desktop"}`;
|
|
646
|
+
const linkClasses = "dkan-c-header--link ds-c-button ds-c-button--ghost";
|
|
647
|
+
const listClasses = "dkan-c-header--link-list ";
|
|
663
648
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
664
649
|
className: `dkan-c-nav-menu ${wrapperClasses} ${navMenuOpenClass} ${isMobileClass}`,
|
|
665
650
|
ref: headerContext.menuRef,
|
|
@@ -829,8 +814,8 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
829
814
|
const { title: title, links: links, mobileMax: mobileMax } = props;
|
|
830
815
|
const active = (0, $hgUW1$useLocation)().pathname;
|
|
831
816
|
const [menuOpen, setMenuOpen] = (0, $hgUW1$useState)(false);
|
|
832
|
-
const styleClasses =
|
|
833
|
-
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ?
|
|
817
|
+
const styleClasses = "dkan-c--sidebar-nav-wrapper ds-u-border--1 ds-u-border--color-gray-lightest ds-u-padding--2";
|
|
818
|
+
const mobileClass = `dkan-c-sidebar-nav--${mobileMax ? "mobile" : "desktop"}`;
|
|
834
819
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
835
820
|
className: `dkan-c-sidebar-nav ${mobileClass}`,
|
|
836
821
|
children: [
|
|
@@ -844,7 +829,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
844
829
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
845
830
|
"aria-haspopup": "true",
|
|
846
831
|
variation: "ghost",
|
|
847
|
-
"aria-expanded": `${menuOpen ?
|
|
832
|
+
"aria-expanded": `${menuOpen ? "true" : "false"}`,
|
|
848
833
|
onDark: true,
|
|
849
834
|
onClick: ()=>setMenuOpen(!menuOpen),
|
|
850
835
|
children: [
|
|
@@ -853,7 +838,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
853
838
|
children: "Toggle menu"
|
|
854
839
|
}),
|
|
855
840
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ArrowIcon), {
|
|
856
|
-
direction: menuOpen ?
|
|
841
|
+
direction: menuOpen ? "up" : "down"
|
|
857
842
|
})
|
|
858
843
|
]
|
|
859
844
|
})
|
|
@@ -862,7 +847,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
862
847
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
863
848
|
className: ``,
|
|
864
849
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("nav", {
|
|
865
|
-
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ?
|
|
850
|
+
className: `${styleClasses} dkan-c-sidebar-nav-menu dkan-c-sidebar-nav-menu--${menuOpen ? "open" : "close"}`,
|
|
866
851
|
children: [
|
|
867
852
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
868
853
|
className: "ds-u-padding--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest",
|
|
@@ -874,7 +859,7 @@ const $953b286f7778640e$var$SidebarNavigation = (props)=>{
|
|
|
874
859
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
875
860
|
className: "ds-u-padding-bottom--2",
|
|
876
861
|
children: links.map(({ url: url, label: label })=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
877
|
-
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ?
|
|
862
|
+
className: `ds-u-padding--1 ds-u-padding-top--2 ds-u-border-bottom--1 ds-u-border--color-gray-lightest ${active === url ? "active" : ""}`,
|
|
878
863
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
879
864
|
className: "ds-u-display--flex ds-u-padding-y--1",
|
|
880
865
|
children: [
|
|
@@ -909,12 +894,12 @@ const $b0968edc60d7d3a4$var$SidebarPage = (props)=>{
|
|
|
909
894
|
query: `(max-width: ${mobileMaxWidth}px)`
|
|
910
895
|
});
|
|
911
896
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
912
|
-
className: `${mobileMax ? "a" :
|
|
897
|
+
className: `${mobileMax ? "a" : "ds-l-container"}`,
|
|
913
898
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
914
|
-
className: `${mobileMax ? "a" :
|
|
899
|
+
className: `${mobileMax ? "a" : "ds-l-row"}`,
|
|
915
900
|
children: [
|
|
916
901
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
917
|
-
className: `${mobileMax ?
|
|
902
|
+
className: `${mobileMax ? "a" : "ds-l-col--4"}`,
|
|
918
903
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $953b286f7778640e$export$2e2bcd8739ae039), {
|
|
919
904
|
links: links,
|
|
920
905
|
title: menuTitle,
|
|
@@ -937,9 +922,9 @@ var $b0968edc60d7d3a4$export$2e2bcd8739ae039 = $b0968edc60d7d3a4$var$SidebarPage
|
|
|
937
922
|
|
|
938
923
|
|
|
939
924
|
|
|
940
|
-
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl =
|
|
925
|
+
const $59a079354baa335c$var$Hero = ({ title: title, description: description, searchUrl: searchUrl = "datasets", searchKey: searchKey = "fulltext", textfieldLabel: textfieldLabel = "Search for a dataset", searchButtonText: searchButtonText = "Search" })=>{
|
|
941
926
|
const navigate = (0, $hgUW1$useNavigate)();
|
|
942
|
-
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState(
|
|
927
|
+
const [searchValue, setSearchValue] = (0, $hgUW1$react).useState("");
|
|
943
928
|
function submitHero(e) {
|
|
944
929
|
e.preventDefault();
|
|
945
930
|
navigate(`/${searchUrl}?${searchKey}=${searchValue}`);
|
|
@@ -966,24 +951,24 @@ const $59a079354baa335c$var$Hero = ({ title: title, description: description, se
|
|
|
966
951
|
onSubmit: (e)=>submitHero(e),
|
|
967
952
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
968
953
|
style: {
|
|
969
|
-
position:
|
|
954
|
+
position: "relative"
|
|
970
955
|
},
|
|
971
956
|
className: "ds-l-row ds-u-align-items--stretch ds-u-margin-y--4 ds-u-flex-wrap--nowrap",
|
|
972
957
|
children: [
|
|
973
958
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
974
959
|
className: "ds-u-padding--0 ds-u-margin-right--1",
|
|
975
960
|
style: {
|
|
976
|
-
flex:
|
|
977
|
-
maxWidth:
|
|
961
|
+
flex: "1 1 100%",
|
|
962
|
+
maxWidth: "100%"
|
|
978
963
|
},
|
|
979
964
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
980
965
|
label: textfieldLabel,
|
|
981
966
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
982
967
|
name: "search_text_input",
|
|
983
968
|
style: {
|
|
984
|
-
maxWidth:
|
|
985
|
-
height:
|
|
986
|
-
margin:
|
|
969
|
+
maxWidth: "none",
|
|
970
|
+
height: "61px",
|
|
971
|
+
margin: "0 20px 0 0"
|
|
987
972
|
},
|
|
988
973
|
onChange: (e)=>setSearchValue(e.target.value)
|
|
989
974
|
})
|
|
@@ -1021,14 +1006,14 @@ var $59a079354baa335c$export$2e2bcd8739ae039 = $59a079354baa335c$var$Hero;
|
|
|
1021
1006
|
|
|
1022
1007
|
|
|
1023
1008
|
const $bd76a91923d7e8a7$var$TransformedDate = ({ date: date, options: options = {
|
|
1024
|
-
year:
|
|
1025
|
-
month:
|
|
1026
|
-
day:
|
|
1027
|
-
timeZone:
|
|
1009
|
+
year: "numeric",
|
|
1010
|
+
month: "long",
|
|
1011
|
+
day: "numeric",
|
|
1012
|
+
timeZone: "UTC"
|
|
1028
1013
|
} })=>{
|
|
1029
1014
|
const rawDate = new Date(date);
|
|
1030
|
-
let modifiedDate =
|
|
1031
|
-
if (rawDate) modifiedDate = rawDate.toLocaleDateString(
|
|
1015
|
+
let modifiedDate = "";
|
|
1016
|
+
if (rawDate) modifiedDate = rawDate.toLocaleDateString("en-US", options);
|
|
1032
1017
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
1033
1018
|
children: modifiedDate
|
|
1034
1019
|
});
|
|
@@ -1042,25 +1027,25 @@ const $c068004d499082cc$var$DatasetListItem = (props)=>{
|
|
|
1042
1027
|
minWidth: 1024
|
|
1043
1028
|
});
|
|
1044
1029
|
const { title: title, modified: modified, identifier: identifier, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks } = props;
|
|
1045
|
-
let linkContainerClasses =
|
|
1046
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1047
|
-
else linkContainerClasses +=
|
|
1048
|
-
let linkClasses =
|
|
1030
|
+
let linkContainerClasses = "ds-u-margin-bottom--2";
|
|
1031
|
+
if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
|
|
1032
|
+
else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
|
|
1033
|
+
let linkClasses = "ds-u-display--block ds-u-text-align--left";
|
|
1049
1034
|
if (desktop) {
|
|
1050
|
-
linkContainerClasses =
|
|
1051
|
-
linkClasses +=
|
|
1035
|
+
linkContainerClasses = "ds-u-padding-x--0";
|
|
1036
|
+
linkClasses += " ds-l-col--4 ds-l-md-col--auto";
|
|
1052
1037
|
}
|
|
1053
1038
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1054
1039
|
className: "dc-c-list-item ds-u-padding-top--4",
|
|
1055
1040
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1056
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1041
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
|
|
1057
1042
|
children: [
|
|
1058
1043
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1059
1044
|
className: "ds-l-row ds-u-align-items--start",
|
|
1060
1045
|
children: [
|
|
1061
1046
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1062
1047
|
id: `dataset-${identifier}-updated-date`,
|
|
1063
|
-
className: `ds-l-col--12 ds-u-text-align--left ds-text-heading--sm ${paginationEnabled ?
|
|
1048
|
+
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"}`,
|
|
1064
1049
|
children: [
|
|
1065
1050
|
"Updated ",
|
|
1066
1051
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
@@ -1118,7 +1103,7 @@ var $c068004d499082cc$export$2e2bcd8739ae039 = $c068004d499082cc$var$DatasetList
|
|
|
1118
1103
|
|
|
1119
1104
|
const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
1120
1105
|
switch(props.id){
|
|
1121
|
-
case
|
|
1106
|
+
case "overview":
|
|
1122
1107
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1123
1108
|
width: "16px",
|
|
1124
1109
|
height: "16px",
|
|
@@ -1161,7 +1146,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1161
1146
|
})
|
|
1162
1147
|
]
|
|
1163
1148
|
});
|
|
1164
|
-
case
|
|
1149
|
+
case "data-table":
|
|
1165
1150
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1166
1151
|
width: "16px",
|
|
1167
1152
|
height: "12px",
|
|
@@ -1194,7 +1179,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1194
1179
|
})
|
|
1195
1180
|
]
|
|
1196
1181
|
});
|
|
1197
|
-
case
|
|
1182
|
+
case "api":
|
|
1198
1183
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1199
1184
|
width: "16px",
|
|
1200
1185
|
height: "13px",
|
|
@@ -1227,7 +1212,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1227
1212
|
})
|
|
1228
1213
|
]
|
|
1229
1214
|
});
|
|
1230
|
-
case
|
|
1215
|
+
case "download":
|
|
1231
1216
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1232
1217
|
width: "16px",
|
|
1233
1218
|
height: "16px",
|
|
@@ -1257,7 +1242,7 @@ const $b38839fd67928f42$var$SearchItemIcon = (props)=>{
|
|
|
1257
1242
|
})
|
|
1258
1243
|
]
|
|
1259
1244
|
});
|
|
1260
|
-
case
|
|
1245
|
+
case "data-dictionary":
|
|
1261
1246
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("svg", {
|
|
1262
1247
|
width: "14px",
|
|
1263
1248
|
height: "16px",
|
|
@@ -1360,13 +1345,13 @@ var $b61856b23f5f58a2$export$2e2bcd8739ae039 = $b61856b23f5f58a2$var$LargeFileDi
|
|
|
1360
1345
|
|
|
1361
1346
|
|
|
1362
1347
|
function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240) {
|
|
1363
|
-
if (!textString) return
|
|
1348
|
+
if (!textString) return "";
|
|
1364
1349
|
let cleanedText = textString;
|
|
1365
|
-
if (cleanedText.split(
|
|
1366
|
-
if (cleanedText.split(
|
|
1350
|
+
if (cleanedText.split("</p>").length > 1) cleanedText = cleanedText.split("</p>")[0];
|
|
1351
|
+
if (cleanedText.split("<br/>").length > 1) cleanedText = cleanedText.split("<br/>")[0];
|
|
1367
1352
|
cleanedText = (0, $hgUW1$lodashtruncate)(cleanedText, {
|
|
1368
|
-
|
|
1369
|
-
|
|
1353
|
+
"length": textLength,
|
|
1354
|
+
"separator": " "
|
|
1370
1355
|
});
|
|
1371
1356
|
return (0, $hgUW1$dompurify).sanitize(cleanedText, {
|
|
1372
1357
|
ALLOWED_TAGS: []
|
|
@@ -1384,9 +1369,9 @@ function $1a2bf34e2a8f6b80$export$59a943b34a82e690(textString, textLength = 240)
|
|
|
1384
1369
|
const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
1385
1370
|
const { type: type, date: date, boldLabel: boldLabel = false, displayTooltips: displayTooltips = true } = props;
|
|
1386
1371
|
const dateText = {
|
|
1387
|
-
modified:
|
|
1388
|
-
released:
|
|
1389
|
-
refresh:
|
|
1372
|
+
modified: "Last Modified",
|
|
1373
|
+
released: "Released",
|
|
1374
|
+
refresh: "Planned Update"
|
|
1390
1375
|
};
|
|
1391
1376
|
const tooltipContent = {
|
|
1392
1377
|
modified: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -1423,7 +1408,7 @@ const $17711e94d2ce0ee4$var$DatasetDateItem = (props)=>{
|
|
|
1423
1408
|
})
|
|
1424
1409
|
};
|
|
1425
1410
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1426
|
-
className: `dataset-date-item${boldLabel ?
|
|
1411
|
+
className: `dataset-date-item${boldLabel ? " bold-label" : ""}`,
|
|
1427
1412
|
children: [
|
|
1428
1413
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1429
1414
|
className: "dataset-data-item-label",
|
|
@@ -1493,7 +1478,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
1493
1478
|
if (dist && dist.data) {
|
|
1494
1479
|
if (dist.data.format) return dist.data.format.toLowerCase();
|
|
1495
1480
|
if (dist.data.mediaType) {
|
|
1496
|
-
const mediaType = dist.data.mediaType.split(
|
|
1481
|
+
const mediaType = dist.data.mediaType.split("/");
|
|
1497
1482
|
if (mediaType.length && mediaType[1]) return mediaType[1].toLowerCase();
|
|
1498
1483
|
}
|
|
1499
1484
|
if (dist.data["%Ref:downloadURL"].length && dist.data["%Ref:downloadURL"][0].data) {
|
|
@@ -1503,7 +1488,7 @@ function $f764661366bd9e1b$export$ee48b7e0e4eb536e(dist) {
|
|
|
1503
1488
|
}
|
|
1504
1489
|
}
|
|
1505
1490
|
}
|
|
1506
|
-
return
|
|
1491
|
+
return "";
|
|
1507
1492
|
}
|
|
1508
1493
|
|
|
1509
1494
|
|
|
@@ -1513,20 +1498,20 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1513
1498
|
});
|
|
1514
1499
|
const { title: title, modified: modified, description: description, downloadUrl: downloadUrl, largeFile: largeFile = false, paginationEnabled: paginationEnabled, dataDictionaryLinks: dataDictionaryLinks, identifier: identifier, refresh: refresh, released: released, showDateDetails: showDateDetails = false, showTopics: showTopics = false, theme: theme, topicSlugs: topicSlugs, distribution: distribution } = props;
|
|
1515
1500
|
const location = (0, $hgUW1$useLocation)();
|
|
1516
|
-
let linkContainerClasses =
|
|
1517
|
-
if (dataDictionaryLinks) linkContainerClasses +=
|
|
1518
|
-
else linkContainerClasses +=
|
|
1519
|
-
let linkClasses =
|
|
1501
|
+
let linkContainerClasses = "ds-u-margin-bottom--2";
|
|
1502
|
+
if (dataDictionaryLinks) linkContainerClasses += " ds-l-col--6 ds-u-padding-right--0";
|
|
1503
|
+
else linkContainerClasses += " ds-l-col--auto ds-u-padding-left--0";
|
|
1504
|
+
let linkClasses = "ds-u-display--block ds-u-text-align--left";
|
|
1520
1505
|
if (desktop) {
|
|
1521
|
-
linkContainerClasses =
|
|
1522
|
-
linkClasses +=
|
|
1506
|
+
linkContainerClasses = "ds-u-padding-x--0";
|
|
1507
|
+
linkClasses += " ds-l-col--4 ds-l-md-col--auto";
|
|
1523
1508
|
}
|
|
1524
1509
|
let themes;
|
|
1525
1510
|
if (theme && showTopics) themes = /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
1526
1511
|
className: "theme-list item-theme",
|
|
1527
1512
|
children: theme.map((topic, index)=>{
|
|
1528
|
-
const title = topic ||
|
|
1529
|
-
const prefix =
|
|
1513
|
+
const title = topic || "Unknown Topic";
|
|
1514
|
+
const prefix = "topics";
|
|
1530
1515
|
// Use the provided slug or fallback to a simple slug generation
|
|
1531
1516
|
const slug = topicSlugs?.[title];
|
|
1532
1517
|
const link = `/${prefix}/${slug}`;
|
|
@@ -1537,7 +1522,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1537
1522
|
state: {
|
|
1538
1523
|
fromUrl: location.pathname,
|
|
1539
1524
|
fromTitle: false,
|
|
1540
|
-
fromSearchList: location.pathname.includes(
|
|
1525
|
+
fromSearchList: location.pathname.includes("search")
|
|
1541
1526
|
},
|
|
1542
1527
|
children: title
|
|
1543
1528
|
})
|
|
@@ -1579,7 +1564,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1579
1564
|
};
|
|
1580
1565
|
const dataDictionaryExists = ()=>{
|
|
1581
1566
|
if (distribution && "data" in distribution) {
|
|
1582
|
-
if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType ===
|
|
1567
|
+
if ("describedBy" in distribution.data && "describedByType" in distribution.data) return distribution.data.describedByType === "application/vnd.tableschema+json";
|
|
1583
1568
|
}
|
|
1584
1569
|
return false;
|
|
1585
1570
|
};
|
|
@@ -1613,7 +1598,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1613
1598
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1614
1599
|
className: "dc-c-search-list-item ds-u-padding-top--3",
|
|
1615
1600
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1616
|
-
className: `dc-c-searchlist-item ${paginationEnabled ?
|
|
1601
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
|
|
1617
1602
|
children: [
|
|
1618
1603
|
themes,
|
|
1619
1604
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
@@ -1621,7 +1606,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1621
1606
|
children: [
|
|
1622
1607
|
!showDateDetails && /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
1623
1608
|
id: `dataset-${identifier}-updated-date`,
|
|
1624
|
-
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ?
|
|
1609
|
+
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? "ds-u-padding-top--2" : "ds-u-padding-top--0"}`,
|
|
1625
1610
|
children: [
|
|
1626
1611
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1627
1612
|
children: "Updated:"
|
|
@@ -1650,13 +1635,13 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1650
1635
|
(0, $1a2bf34e2a8f6b80$export$59a943b34a82e690)(description),
|
|
1651
1636
|
description.length > 240 ? /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
1652
1637
|
children: [
|
|
1653
|
-
|
|
1638
|
+
" ",
|
|
1654
1639
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
1655
1640
|
to: `/dataset/${identifier}`,
|
|
1656
1641
|
children: "See more"
|
|
1657
1642
|
})
|
|
1658
1643
|
]
|
|
1659
|
-
}) :
|
|
1644
|
+
}) : ""
|
|
1660
1645
|
]
|
|
1661
1646
|
})
|
|
1662
1647
|
}),
|
|
@@ -1684,14 +1669,14 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1684
1669
|
"Download"
|
|
1685
1670
|
]
|
|
1686
1671
|
})
|
|
1687
|
-
}) :
|
|
1672
|
+
}) : "",
|
|
1688
1673
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("ul", {
|
|
1689
|
-
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 ?
|
|
1674
|
+
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" : ""}`,
|
|
1690
1675
|
children: [
|
|
1691
1676
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1692
1677
|
className: linkContainerClasses,
|
|
1693
1678
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1694
|
-
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ?
|
|
1679
|
+
className: `${linkClasses}${(0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? "" : " dkan-disabled-link-wrapper"}`,
|
|
1695
1680
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataTableLink, {})
|
|
1696
1681
|
})
|
|
1697
1682
|
}),
|
|
@@ -1713,10 +1698,10 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
1713
1698
|
dataDictionaryLinks ? /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1714
1699
|
className: linkContainerClasses,
|
|
1715
1700
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1716
|
-
className: `${linkClasses}${dataDictionaryExists() ?
|
|
1701
|
+
className: `${linkClasses}${dataDictionaryExists() ? "" : " dkan-disabled-link-wrapper"}`,
|
|
1717
1702
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)(DataDictionaryLink, {})
|
|
1718
1703
|
})
|
|
1719
|
-
}) :
|
|
1704
|
+
}) : "",
|
|
1720
1705
|
/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
1721
1706
|
className: linkContainerClasses,
|
|
1722
1707
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -1812,7 +1797,7 @@ var $789279954d8eff7f$export$2e2bcd8739ae039 = $789279954d8eff7f$var$ApiDocument
|
|
|
1812
1797
|
|
|
1813
1798
|
|
|
1814
1799
|
|
|
1815
|
-
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className =
|
|
1800
|
+
const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limit: limit, offset: offset, className: className = "data-table-results" })=>{
|
|
1816
1801
|
const numTotalRows = totalRows;
|
|
1817
1802
|
if (numTotalRows === 0) return /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
1818
1803
|
className: className,
|
|
@@ -1830,18 +1815,18 @@ const $2ed0091f7e32d1e6$var$DataTablePageResults = ({ totalRows: totalRows, limi
|
|
|
1830
1815
|
className: className,
|
|
1831
1816
|
children: [
|
|
1832
1817
|
"Displaying",
|
|
1833
|
-
|
|
1818
|
+
" ",
|
|
1834
1819
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1835
1820
|
className: "ds-u-font-weight--bold",
|
|
1836
1821
|
children: `${startTotal().toLocaleString()} - ${ofTotal().toLocaleString()}`
|
|
1837
1822
|
}),
|
|
1838
|
-
|
|
1823
|
+
" ",
|
|
1839
1824
|
"of ",
|
|
1840
1825
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
1841
1826
|
className: "ds-u-font-weight--bold",
|
|
1842
1827
|
children: `${numTotalRows.toLocaleString()}`
|
|
1843
1828
|
}),
|
|
1844
|
-
|
|
1829
|
+
" ",
|
|
1845
1830
|
"rows"
|
|
1846
1831
|
]
|
|
1847
1832
|
});
|
|
@@ -1867,16 +1852,16 @@ const $1e012d1e3b534af0$var$DataTableDensity = ({ setTablePadding: setTablePaddi
|
|
|
1867
1852
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
1868
1853
|
options: [
|
|
1869
1854
|
{
|
|
1870
|
-
label:
|
|
1871
|
-
value:
|
|
1855
|
+
label: "Tight",
|
|
1856
|
+
value: "ds-u-padding-y--0"
|
|
1872
1857
|
},
|
|
1873
1858
|
{
|
|
1874
|
-
label:
|
|
1875
|
-
value:
|
|
1859
|
+
label: "Normal",
|
|
1860
|
+
value: "ds-u-padding-y--1"
|
|
1876
1861
|
},
|
|
1877
1862
|
{
|
|
1878
|
-
label:
|
|
1879
|
-
value:
|
|
1863
|
+
label: "Expanded",
|
|
1864
|
+
value: "ds-u-padding-y--2"
|
|
1880
1865
|
}
|
|
1881
1866
|
],
|
|
1882
1867
|
label: "Display density:",
|
|
@@ -2119,7 +2104,7 @@ function $aa4450dcbeef3ac0$export$385a5aba38cc3325(sortArray) {
|
|
|
2119
2104
|
sortArray.forEach((s)=>{
|
|
2120
2105
|
return newQuery.push({
|
|
2121
2106
|
property: s.id,
|
|
2122
|
-
order: s.desc ?
|
|
2107
|
+
order: s.desc ? "desc" : "asc"
|
|
2123
2108
|
});
|
|
2124
2109
|
});
|
|
2125
2110
|
return newQuery;
|
|
@@ -2157,46 +2142,46 @@ function $7264a673914aa746$export$e284ae5d89467c8f(date) {
|
|
|
2157
2142
|
}
|
|
2158
2143
|
function $7264a673914aa746$export$6b5e57d20078142b(value, operator) {
|
|
2159
2144
|
let newValue = value;
|
|
2160
|
-
if (Array.isArray(newValue)) newValue = newValue.join(
|
|
2145
|
+
if (Array.isArray(newValue)) newValue = newValue.join(",");
|
|
2161
2146
|
// return newValue.replace(/(^\%+|\%+$)/gm, '');
|
|
2162
2147
|
return newValue;
|
|
2163
2148
|
}
|
|
2164
2149
|
const $7264a673914aa746$export$5f89a5ae87bc48e1 = [
|
|
2165
2150
|
{
|
|
2166
|
-
label:
|
|
2167
|
-
value:
|
|
2151
|
+
label: "Is",
|
|
2152
|
+
value: "="
|
|
2168
2153
|
},
|
|
2169
2154
|
{
|
|
2170
|
-
label:
|
|
2171
|
-
value:
|
|
2155
|
+
label: "Starts With",
|
|
2156
|
+
value: "starts with"
|
|
2172
2157
|
},
|
|
2173
2158
|
{
|
|
2174
|
-
label:
|
|
2175
|
-
value:
|
|
2159
|
+
label: "Contains",
|
|
2160
|
+
value: "contains"
|
|
2176
2161
|
},
|
|
2177
2162
|
{
|
|
2178
|
-
label:
|
|
2179
|
-
value:
|
|
2163
|
+
label: "Is Not",
|
|
2164
|
+
value: "<>"
|
|
2180
2165
|
},
|
|
2181
2166
|
{
|
|
2182
|
-
label:
|
|
2183
|
-
value:
|
|
2167
|
+
label: "Or",
|
|
2168
|
+
value: "in"
|
|
2184
2169
|
},
|
|
2185
2170
|
{
|
|
2186
|
-
label:
|
|
2187
|
-
value:
|
|
2171
|
+
label: "Is",
|
|
2172
|
+
value: "="
|
|
2188
2173
|
},
|
|
2189
2174
|
{
|
|
2190
|
-
label:
|
|
2191
|
-
value:
|
|
2175
|
+
label: "Is Not",
|
|
2176
|
+
value: "<>"
|
|
2192
2177
|
},
|
|
2193
2178
|
{
|
|
2194
|
-
label:
|
|
2195
|
-
value:
|
|
2179
|
+
label: "Greater Than",
|
|
2180
|
+
value: ">"
|
|
2196
2181
|
},
|
|
2197
2182
|
{
|
|
2198
|
-
label:
|
|
2199
|
-
value:
|
|
2183
|
+
label: "Less Than",
|
|
2184
|
+
value: "<"
|
|
2200
2185
|
}
|
|
2201
2186
|
];
|
|
2202
2187
|
function $7264a673914aa746$export$d243819c3ad678fb(operatorValue) {
|
|
@@ -2205,59 +2190,59 @@ function $7264a673914aa746$export$d243819c3ad678fb(operatorValue) {
|
|
|
2205
2190
|
}
|
|
2206
2191
|
function $7264a673914aa746$export$2b9377795161999(type) {
|
|
2207
2192
|
switch(type){
|
|
2208
|
-
case
|
|
2209
|
-
case
|
|
2193
|
+
case "text":
|
|
2194
|
+
case "string":
|
|
2210
2195
|
return [
|
|
2211
2196
|
{
|
|
2212
|
-
label:
|
|
2213
|
-
value:
|
|
2197
|
+
label: "Is",
|
|
2198
|
+
value: "="
|
|
2214
2199
|
},
|
|
2215
2200
|
{
|
|
2216
|
-
label:
|
|
2217
|
-
value:
|
|
2201
|
+
label: "Starts With",
|
|
2202
|
+
value: "starts with"
|
|
2218
2203
|
},
|
|
2219
2204
|
{
|
|
2220
|
-
label:
|
|
2221
|
-
value:
|
|
2205
|
+
label: "Contains",
|
|
2206
|
+
value: "contains"
|
|
2222
2207
|
},
|
|
2223
2208
|
{
|
|
2224
|
-
label:
|
|
2225
|
-
value:
|
|
2209
|
+
label: "Is Not",
|
|
2210
|
+
value: "<>"
|
|
2226
2211
|
},
|
|
2227
2212
|
{
|
|
2228
|
-
label:
|
|
2229
|
-
value:
|
|
2213
|
+
label: "Or",
|
|
2214
|
+
value: "in"
|
|
2230
2215
|
}
|
|
2231
2216
|
];
|
|
2232
|
-
case
|
|
2217
|
+
case "date":
|
|
2233
2218
|
return [
|
|
2234
2219
|
{
|
|
2235
|
-
label:
|
|
2236
|
-
value:
|
|
2220
|
+
label: "Is",
|
|
2221
|
+
value: "="
|
|
2237
2222
|
},
|
|
2238
2223
|
{
|
|
2239
|
-
label:
|
|
2240
|
-
value:
|
|
2224
|
+
label: "Is Not",
|
|
2225
|
+
value: "<>"
|
|
2241
2226
|
},
|
|
2242
2227
|
{
|
|
2243
|
-
label:
|
|
2244
|
-
value:
|
|
2228
|
+
label: "Greater Than",
|
|
2229
|
+
value: ">"
|
|
2245
2230
|
},
|
|
2246
2231
|
{
|
|
2247
|
-
label:
|
|
2248
|
-
value:
|
|
2232
|
+
label: "Less Than",
|
|
2233
|
+
value: "<"
|
|
2249
2234
|
}
|
|
2250
2235
|
];
|
|
2251
2236
|
default:
|
|
2252
2237
|
// These 2 should be safe for all data types
|
|
2253
2238
|
return [
|
|
2254
2239
|
{
|
|
2255
|
-
label:
|
|
2256
|
-
value:
|
|
2240
|
+
label: "Is",
|
|
2241
|
+
value: "="
|
|
2257
2242
|
},
|
|
2258
2243
|
{
|
|
2259
|
-
label:
|
|
2260
|
-
value:
|
|
2244
|
+
label: "Is Not",
|
|
2245
|
+
value: "<>"
|
|
2261
2246
|
}
|
|
2262
2247
|
];
|
|
2263
2248
|
}
|
|
@@ -2273,8 +2258,8 @@ function $7264a673914aa746$export$2b9377795161999(type) {
|
|
|
2273
2258
|
|
|
2274
2259
|
|
|
2275
2260
|
|
|
2276
|
-
const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: header, sortElement: sortElement,
|
|
2277
|
-
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)(
|
|
2261
|
+
const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: header, sortElement: sortElement, id: id })=>{
|
|
2262
|
+
const [columnResizing, setColumnResizing] = (0, $hgUW1$useState)("");
|
|
2278
2263
|
// Fix for JSX in Data Dictionary Title header cell
|
|
2279
2264
|
const ariaLabel = header.id === "titleResizable" ? "Title" : header.column.columnDef.header;
|
|
2280
2265
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("th", {
|
|
@@ -2283,9 +2268,9 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2283
2268
|
width: header.getSize()
|
|
2284
2269
|
},
|
|
2285
2270
|
id: id,
|
|
2286
|
-
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header :
|
|
2271
|
+
title: typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : "",
|
|
2287
2272
|
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
|
|
2288
|
-
"aria-sort": header.column.getIsSorted() ===
|
|
2273
|
+
"aria-sort": header.column.getIsSorted() === "asc" ? "ascending" : header.column.getIsSorted() === "desc" ? "descending" : "none",
|
|
2289
2274
|
children: [
|
|
2290
2275
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2291
2276
|
className: "ds-u-display--flex",
|
|
@@ -2297,7 +2282,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2297
2282
|
}),
|
|
2298
2283
|
sortElement && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2299
2284
|
onClick: header.column.getToggleSortingHandler(),
|
|
2300
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
2285
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : "",
|
|
2301
2286
|
"aria-label": `${ariaLabel} sort order`
|
|
2302
2287
|
})
|
|
2303
2288
|
]
|
|
@@ -2305,53 +2290,43 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2305
2290
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2306
2291
|
onMouseDown: header.getResizeHandler(),
|
|
2307
2292
|
onTouchStart: header.getResizeHandler(),
|
|
2308
|
-
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ?
|
|
2293
|
+
className: `dc-c-resize-handle ds-u-focus-visible ${header.column.getIsResizing() || header.column.id == columnResizing ? "isResizing" : ""}`,
|
|
2309
2294
|
"aria-label": `Resize ${ariaLabel} column`,
|
|
2310
2295
|
onKeyDown: (e)=>{
|
|
2311
2296
|
const columnSizingObject = table.getState().columnSizing;
|
|
2312
2297
|
switch(e.key){
|
|
2313
|
-
case
|
|
2314
|
-
case
|
|
2298
|
+
case "Enter":
|
|
2299
|
+
case " ":
|
|
2315
2300
|
e.preventDefault();
|
|
2316
2301
|
e.stopPropagation();
|
|
2317
|
-
if (columnResizing)
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
} else {
|
|
2322
|
-
// start resizing
|
|
2323
|
-
setColumnResizing(header.column.id);
|
|
2324
|
-
setAriaLiveFeedback(`${header.column.columnDef.header} grabbed.`);
|
|
2325
|
-
}
|
|
2302
|
+
if (columnResizing) // end resizing
|
|
2303
|
+
setColumnResizing("");
|
|
2304
|
+
else // start resizing
|
|
2305
|
+
setColumnResizing(header.column.id);
|
|
2326
2306
|
break;
|
|
2327
|
-
case
|
|
2328
|
-
if (columnResizing)
|
|
2329
|
-
setColumnResizing('');
|
|
2330
|
-
setAriaLiveFeedback(`${header.column.columnDef.header} dropped.`);
|
|
2331
|
-
}
|
|
2307
|
+
case "Escape":
|
|
2308
|
+
if (columnResizing) setColumnResizing("");
|
|
2332
2309
|
break;
|
|
2333
|
-
case
|
|
2310
|
+
case "ArrowRight":
|
|
2334
2311
|
e.preventDefault();
|
|
2335
2312
|
e.stopPropagation();
|
|
2336
2313
|
if (columnResizing) {
|
|
2337
2314
|
columnSizingObject[header.column.id] = header.getSize() + 10;
|
|
2338
2315
|
table.setColumnSizing(columnSizingObject);
|
|
2339
|
-
setAriaLiveFeedback(`${header.column.columnDef.header} has been resized. The new width is ${header.getSize()} pixels.`);
|
|
2340
2316
|
}
|
|
2341
2317
|
break;
|
|
2342
|
-
case
|
|
2318
|
+
case "ArrowLeft":
|
|
2343
2319
|
e.preventDefault();
|
|
2344
2320
|
e.stopPropagation();
|
|
2345
2321
|
if (columnResizing) {
|
|
2346
2322
|
columnSizingObject[header.column.id] = header.getSize() - 10;
|
|
2347
2323
|
table.setColumnSizing(columnSizingObject);
|
|
2348
|
-
setAriaLiveFeedback(`${header.column.columnDef.header} has been resized. The new width is ${header.getSize()} pixels.`);
|
|
2349
2324
|
}
|
|
2350
2325
|
break;
|
|
2351
2326
|
}
|
|
2352
2327
|
},
|
|
2353
2328
|
onBlur: ()=>{
|
|
2354
|
-
setColumnResizing(
|
|
2329
|
+
setColumnResizing("");
|
|
2355
2330
|
}
|
|
2356
2331
|
})
|
|
2357
2332
|
]
|
|
@@ -2360,7 +2335,7 @@ const $64a351d3fd8413c3$var$HeaderResizeElement = ({ table: table, header: heade
|
|
|
2360
2335
|
var $64a351d3fd8413c3$export$2e2bcd8739ae039 = $64a351d3fd8413c3$var$HeaderResizeElement;
|
|
2361
2336
|
|
|
2362
2337
|
|
|
2363
|
-
const $96d341d082bffec5$var$TruncatedResizeableTHead = ({ table: table, sortElement: sortElement = null
|
|
2338
|
+
const $96d341d082bffec5$var$TruncatedResizeableTHead = ({ table: table, sortElement: sortElement = null })=>{
|
|
2364
2339
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("thead", {
|
|
2365
2340
|
className: "dc-thead--truncated dc-thead--resizeable",
|
|
2366
2341
|
children: table.getHeaderGroups().map((headerGroup)=>/*#__PURE__*/ (0, $hgUW1$jsx)("tr", {
|
|
@@ -2368,8 +2343,7 @@ const $96d341d082bffec5$var$TruncatedResizeableTHead = ({ table: table, sortElem
|
|
|
2368
2343
|
children: headerGroup.headers.map((header)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $64a351d3fd8413c3$export$2e2bcd8739ae039), {
|
|
2369
2344
|
table: table,
|
|
2370
2345
|
header: header,
|
|
2371
|
-
sortElement: sortElement
|
|
2372
|
-
setAriaLiveFeedback: setAriaLiveFeedback
|
|
2346
|
+
sortElement: sortElement
|
|
2373
2347
|
}, header.id + "_dataTableResize"))
|
|
2374
2348
|
}, headerGroup.id))
|
|
2375
2349
|
});
|
|
@@ -2392,7 +2366,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2392
2366
|
},
|
|
2393
2367
|
title: header.column.columnDef.header,
|
|
2394
2368
|
className: "ds-u-border-y--2 ds-u-padding--2 ds-u-border--dark ds-u-font-weight--bold",
|
|
2395
|
-
"aria-sort": header.column.getIsSorted() ===
|
|
2369
|
+
"aria-sort": header.column.getIsSorted() === "asc" ? "ascending" : header.column.getIsSorted() === "desc" ? "descending" : "none",
|
|
2396
2370
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
2397
2371
|
onClick: header.column.getToggleSortingHandler(),
|
|
2398
2372
|
className: "ds-u-display--flex",
|
|
@@ -2401,7 +2375,7 @@ const $23763e27eda0e8d7$var$FixedSizeTHead = ({ table: table, sortElement: sortE
|
|
|
2401
2375
|
children: header.isPlaceholder ? null : (0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext())
|
|
2402
2376
|
}),
|
|
2403
2377
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2404
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` :
|
|
2378
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ${sortElement(header.column.getIsSorted())}` : ""
|
|
2405
2379
|
})
|
|
2406
2380
|
]
|
|
2407
2381
|
})
|
|
@@ -2432,7 +2406,7 @@ const $ee0d4d4f34048447$var$DataTableActionsContextDefaults = {
|
|
|
2432
2406
|
setColumnVisibility: ()=>{},
|
|
2433
2407
|
page: 1,
|
|
2434
2408
|
setPage: ()=>{},
|
|
2435
|
-
tableDensity:
|
|
2409
|
+
tableDensity: "normal",
|
|
2436
2410
|
setTableDensity: ()=>{}
|
|
2437
2411
|
};
|
|
2438
2412
|
const $ee0d4d4f34048447$export$f814ea079e65d8fe = /*#__PURE__*/ (0, $hgUW1$createContext)($ee0d4d4f34048447$var$DataTableActionsContextDefaults);
|
|
@@ -2451,7 +2425,7 @@ const $ee0d4d4f34048447$var$DataTableActionsProvider = ({ children: children })=
|
|
|
2451
2425
|
if (datasetTableControls && localStorageData) return localStorageData.tableColumnVisibility;
|
|
2452
2426
|
else return {};
|
|
2453
2427
|
});
|
|
2454
|
-
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)(
|
|
2428
|
+
const [tableDensity, setTableDensity] = (0, $hgUW1$useState)("normal");
|
|
2455
2429
|
const providerValue = {
|
|
2456
2430
|
columnOrder: columnOrder,
|
|
2457
2431
|
setColumnOrder: setColumnOrder,
|
|
@@ -2498,9 +2472,9 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2498
2472
|
transition: transition,
|
|
2499
2473
|
opacity: isDragging ? 0.7 : 1,
|
|
2500
2474
|
zIndex: isDragging ? 1 : 0,
|
|
2501
|
-
position:
|
|
2502
|
-
background:
|
|
2503
|
-
touchAction:
|
|
2475
|
+
position: "relative",
|
|
2476
|
+
background: "white",
|
|
2477
|
+
touchAction: "none"
|
|
2504
2478
|
};
|
|
2505
2479
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("li", {
|
|
2506
2480
|
className: "ds-u-display--flex ds-u-justify-content--between ds-u-border-bottom--1",
|
|
@@ -2516,7 +2490,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2516
2490
|
// this code forces the repaint without user interaction
|
|
2517
2491
|
const target = e.target;
|
|
2518
2492
|
if (isDragging && target.tagName.toLowerCase() === "label") setTimeout(()=>{
|
|
2519
|
-
target.parentNode.querySelector(
|
|
2493
|
+
target.parentNode.querySelector("input").checked = visible;
|
|
2520
2494
|
}, 1);
|
|
2521
2495
|
},
|
|
2522
2496
|
children: [
|
|
@@ -2533,7 +2507,7 @@ const $5fe94aeb50e0798b$var$Card = ({ id: id, visible: visible, updateVisibility
|
|
|
2533
2507
|
}
|
|
2534
2508
|
}),
|
|
2535
2509
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
2536
|
-
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging &&
|
|
2510
|
+
className: `ds-l-col--2 dkan-manage-columns-reorder-button ${isDragging && "grabbed"}`,
|
|
2537
2511
|
"aria-label": `Reorder ${id} column`,
|
|
2538
2512
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2539
2513
|
className: "fa fa-sort"
|
|
@@ -2551,7 +2525,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxKeyboardSensor extends (0, $hgUW1$Key
|
|
|
2551
2525
|
// Custom function to exclude checkbox from keyboard dragging
|
|
2552
2526
|
static activators = [
|
|
2553
2527
|
{
|
|
2554
|
-
eventName:
|
|
2528
|
+
eventName: "onKeyDown",
|
|
2555
2529
|
handler: ({ nativeEvent: event })=>{
|
|
2556
2530
|
// prevent scrolling the list
|
|
2557
2531
|
const isCheckbox = [
|
|
@@ -2574,7 +2548,7 @@ class $5d9e2ce238d53d29$var$ExcludeCheckboxPointerSensor extends (0, $hgUW1$Poin
|
|
|
2574
2548
|
// Custom function to stop accidental checkbox clicks on pointer activation
|
|
2575
2549
|
static activators = [
|
|
2576
2550
|
{
|
|
2577
|
-
eventName:
|
|
2551
|
+
eventName: "onPointerDown",
|
|
2578
2552
|
handler: ({ nativeEvent: event })=>{
|
|
2579
2553
|
if (event.target.tagName.toLowerCase() === "input") return false;
|
|
2580
2554
|
if (event.target.tagName.toLowerCase() === "label") event.target.blur();
|
|
@@ -2672,13 +2646,13 @@ const $5d9e2ce238d53d29$var$ManageColumns = ({ id: id, columns: columns, default
|
|
|
2672
2646
|
className: "dkan-dataset-toolbar-button-label",
|
|
2673
2647
|
children: "Manage Columns"
|
|
2674
2648
|
}),
|
|
2675
|
-
hiddenColumns ? ` (${hiddenColumns})` :
|
|
2649
|
+
hiddenColumns ? ` (${hiddenColumns})` : ""
|
|
2676
2650
|
]
|
|
2677
2651
|
})
|
|
2678
2652
|
]
|
|
2679
2653
|
}),
|
|
2680
2654
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2681
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2655
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
2682
2656
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Dialog), {
|
|
2683
2657
|
heading: "Manage columns",
|
|
2684
2658
|
isOpen: modalOpen,
|
|
@@ -2851,12 +2825,12 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
2851
2825
|
if (Object.keys(resource).length && columns.length && resource.schema && Object.keys(distribution).length) return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
2852
2826
|
children: [
|
|
2853
2827
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2854
|
-
className: isModal ?
|
|
2828
|
+
className: isModal ? "dkan-datatable-fullscreen-mode" : "",
|
|
2855
2829
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $d98f94c79ddf4e0e$export$2e2bcd8739ae039), {
|
|
2856
2830
|
canResize: true,
|
|
2857
2831
|
columns: columns,
|
|
2858
2832
|
sortTransform: (0, $aa4450dcbeef3ac0$export$385a5aba38cc3325),
|
|
2859
|
-
tablePadding: tableDensity ===
|
|
2833
|
+
tablePadding: tableDensity === "normal" ? "ds-u-padding-y--2" : tableDensity === "compact" ? "ds-u-padding-y--1" : "ds-u-padding-y--3",
|
|
2860
2834
|
loading: resource.loading,
|
|
2861
2835
|
isModal: isModal,
|
|
2862
2836
|
downloadURL: downloadURL,
|
|
@@ -2871,14 +2845,14 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, showCopy
|
|
|
2871
2845
|
}),
|
|
2872
2846
|
!resource.loading && resource.count !== null && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2873
2847
|
className: [
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
isModal &&
|
|
2881
|
-
].filter(Boolean).join(
|
|
2848
|
+
"ds-u-display--flex",
|
|
2849
|
+
"ds-u-flex-wrap--wrap",
|
|
2850
|
+
"ds-u-justify-content--end",
|
|
2851
|
+
"ds-u-md-justify-content--between",
|
|
2852
|
+
"ds-u-margin-top--2",
|
|
2853
|
+
"ds-u-align-items--center",
|
|
2854
|
+
isModal && "ds-u-margin-bottom--2"
|
|
2855
|
+
].filter(Boolean).join(" "),
|
|
2882
2856
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
2883
2857
|
totalPages: Math.ceil(resource.count ? resource.count / pageSize : 1),
|
|
2884
2858
|
currentPage: Number(page),
|
|
@@ -2917,7 +2891,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
2917
2891
|
},
|
|
2918
2892
|
children: [
|
|
2919
2893
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
2920
|
-
className: `far ${modalOpen ?
|
|
2894
|
+
className: `far ${modalOpen ? "fa-compress" : "fa-expand"} ds-u-margin-right--1`
|
|
2921
2895
|
}),
|
|
2922
2896
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
2923
2897
|
className: "dkan-dataset-toolbar-button-label",
|
|
@@ -2926,7 +2900,7 @@ const $16bd41951b91f02d$var$FullScreenDataTable = ({ isModal: isModal })=>{
|
|
|
2926
2900
|
]
|
|
2927
2901
|
}),
|
|
2928
2902
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
2929
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
2903
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
2930
2904
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
2931
2905
|
heading: "Dataset Explorer",
|
|
2932
2906
|
isOpen: modalOpen,
|
|
@@ -2961,13 +2935,13 @@ var $16bd41951b91f02d$export$2e2bcd8739ae039 = $16bd41951b91f02d$var$FullScreenD
|
|
|
2961
2935
|
|
|
2962
2936
|
|
|
2963
2937
|
function $eadd6431fddf4b6c$var$getStartDate(condition, schema, id) {
|
|
2964
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2938
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
2965
2939
|
const newDate = new Date(condition.value.toString());
|
|
2966
2940
|
if (newDate instanceof Date && !isNaN(newDate.getTime())) return newDate;
|
|
2967
2941
|
}
|
|
2968
2942
|
return new Date();
|
|
2969
2943
|
}
|
|
2970
|
-
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className =
|
|
2944
|
+
const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index: index, update: update, remove: remove, propertyOptions: propertyOptions, schema: schema, className: className = "" })=>{
|
|
2971
2945
|
const [operator, setOperator] = (0, $hgUW1$useState)(condition.operator);
|
|
2972
2946
|
const [property, setProperty] = (0, $hgUW1$useState)(condition.property);
|
|
2973
2947
|
const [value, setValue] = (0, $hgUW1$useState)(condition.value);
|
|
@@ -2977,9 +2951,9 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
2977
2951
|
});
|
|
2978
2952
|
(0, $hgUW1$useEffect)(()=>{
|
|
2979
2953
|
if (property !== condition.property) {
|
|
2980
|
-
if (property) update(index,
|
|
2981
|
-
else update(index,
|
|
2982
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
2954
|
+
if (property) update(index, "property", property);
|
|
2955
|
+
else update(index, "property", "");
|
|
2956
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
2983
2957
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
2984
2958
|
}
|
|
2985
2959
|
}
|
|
@@ -2993,22 +2967,22 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
2993
2967
|
]);
|
|
2994
2968
|
(0, $hgUW1$useEffect)(()=>{
|
|
2995
2969
|
if (operator !== condition.operator) {
|
|
2996
|
-
if (operator) update(index,
|
|
2997
|
-
else update(index,
|
|
2970
|
+
if (operator) update(index, "operator", operator);
|
|
2971
|
+
else update(index, "operator", "");
|
|
2998
2972
|
}
|
|
2999
2973
|
}, [
|
|
3000
2974
|
operator
|
|
3001
2975
|
]);
|
|
3002
2976
|
(0, $hgUW1$useEffect)(()=>{
|
|
3003
2977
|
if (value !== condition.value) {
|
|
3004
|
-
if (value) update(index,
|
|
3005
|
-
else update(index,
|
|
2978
|
+
if (value) update(index, "value", value);
|
|
2979
|
+
else update(index, "value", "");
|
|
3006
2980
|
}
|
|
3007
2981
|
}, [
|
|
3008
2982
|
value
|
|
3009
2983
|
]);
|
|
3010
2984
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("fieldset", {
|
|
3011
|
-
className: `dkan-filter-dataset-control ds-u-padding-x--2 ds-u-md-padding-x--3 ds-u-padding-y--1 ds-u-margin-top--05${className !==
|
|
2985
|
+
className: `dkan-filter-dataset-control ds-u-padding-x--2 ds-u-md-padding-x--3 ds-u-padding-y--1 ds-u-margin-top--05${className !== "" ? ` ${className}` : ""}`,
|
|
3012
2986
|
children: [
|
|
3013
2987
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dropdown), {
|
|
3014
2988
|
options: propertyOptions,
|
|
@@ -3026,7 +3000,7 @@ const $eadd6431fddf4b6c$var$FilterItem = ({ id: id, condition: condition, index:
|
|
|
3026
3000
|
name: `${condition.key}_operator`,
|
|
3027
3001
|
onChange: (e)=>setOperator(e.target.value)
|
|
3028
3002
|
}),
|
|
3029
|
-
schema[id].fields[property].mysql_type ===
|
|
3003
|
+
schema[id].fields[property].mysql_type === "date" ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
3030
3004
|
children: [
|
|
3031
3005
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
3032
3006
|
className: "ds-c-label",
|
|
@@ -3079,15 +3053,15 @@ var $eadd6431fddf4b6c$export$2e2bcd8739ae039 = $eadd6431fddf4b6c$var$FilterItem;
|
|
|
3079
3053
|
|
|
3080
3054
|
|
|
3081
3055
|
|
|
3082
|
-
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className =
|
|
3056
|
+
const $2eec38d4d0dbf714$var$ClearFiltersButton = ({ disabled: disabled = false, clearFiltersFn: clearFiltersFn, disableDefaultClasses: disableDefaultClasses = false, className: className = "" })=>{
|
|
3083
3057
|
const small = (0, $hgUW1$useMediaQuery)({
|
|
3084
3058
|
minWidth: 0,
|
|
3085
3059
|
maxWidth: 544
|
|
3086
3060
|
});
|
|
3087
3061
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Button), {
|
|
3088
3062
|
disabled: disabled,
|
|
3089
|
-
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ?
|
|
3090
|
-
variation: small ?
|
|
3063
|
+
className: `dkan-clear-dataset-filters-button ${disableDefaultClasses ? "" : " ds-u-float--right ds-l-md-col--6 ds-l-col--5"}${className !== "" ? ` ${className}` : ""}`,
|
|
3064
|
+
variation: small ? "ghost" : undefined,
|
|
3091
3065
|
onClick: ()=>clearFiltersFn(),
|
|
3092
3066
|
children: "Reset"
|
|
3093
3067
|
});
|
|
@@ -3099,19 +3073,19 @@ var $2eec38d4d0dbf714$export$2e2bcd8739ae039 = $2eec38d4d0dbf714$var$ClearFilter
|
|
|
3099
3073
|
function $6f4318b1e14124e5$var$updateQueryForDatastore(condition) {
|
|
3100
3074
|
let cond = condition;
|
|
3101
3075
|
delete cond.key;
|
|
3102
|
-
if (cond.operator ===
|
|
3076
|
+
if (cond.operator === "=" || cond.operator === "<>") {
|
|
3103
3077
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3104
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3078
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
3105
3079
|
}
|
|
3106
|
-
if (cond.operator.toLowerCase() ===
|
|
3080
|
+
if (cond.operator.toLowerCase() === "like") {
|
|
3107
3081
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
3108
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
3082
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
3109
3083
|
cond.value = `%${cleanedValue}%`;
|
|
3110
3084
|
}
|
|
3111
|
-
if (cond.operator.toLowerCase() ===
|
|
3112
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
3085
|
+
if (cond.operator.toLowerCase() === "in") {
|
|
3086
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(",");
|
|
3113
3087
|
}
|
|
3114
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
3088
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
|
|
3115
3089
|
return cond;
|
|
3116
3090
|
}
|
|
3117
3091
|
const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
@@ -3137,7 +3111,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3137
3111
|
} else setQueryConditions([
|
|
3138
3112
|
{
|
|
3139
3113
|
property: fields[0],
|
|
3140
|
-
value:
|
|
3114
|
+
value: "",
|
|
3141
3115
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3142
3116
|
key: Date.now().toString()
|
|
3143
3117
|
}
|
|
@@ -3154,7 +3128,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3154
3128
|
...queryConditions,
|
|
3155
3129
|
{
|
|
3156
3130
|
property: fields[0],
|
|
3157
|
-
value:
|
|
3131
|
+
value: "",
|
|
3158
3132
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
3159
3133
|
key: Date.now().toString()
|
|
3160
3134
|
}
|
|
@@ -3185,7 +3159,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3185
3159
|
encodeValuesOnly: true,
|
|
3186
3160
|
addQueryPrefix: true
|
|
3187
3161
|
});
|
|
3188
|
-
window.history.pushState({},
|
|
3162
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
3189
3163
|
};
|
|
3190
3164
|
const submitConditions = ()=>{
|
|
3191
3165
|
// only update the data conditions when "Apply filters" is pressed
|
|
@@ -3259,7 +3233,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3259
3233
|
children: [
|
|
3260
3234
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
3261
3235
|
className: "dkan-dataset-toolbar-button-label",
|
|
3262
|
-
children: conditions.length > 0 ? `Edit Filters` :
|
|
3236
|
+
children: conditions.length > 0 ? `Edit Filters` : "Filter Dataset"
|
|
3263
3237
|
}),
|
|
3264
3238
|
conditions.length > 0 && ` (${conditions.length})`
|
|
3265
3239
|
]
|
|
@@ -3267,7 +3241,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3267
3241
|
]
|
|
3268
3242
|
}),
|
|
3269
3243
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3270
|
-
className: `ds-c-dialog-wrap${modalOpen ?
|
|
3244
|
+
className: `ds-c-dialog-wrap${modalOpen ? " open" : ""}`,
|
|
3271
3245
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Dialog), {
|
|
3272
3246
|
heading: "Filter Dataset",
|
|
3273
3247
|
isOpen: modalOpen,
|
|
@@ -3293,7 +3267,7 @@ const $6f4318b1e14124e5$var$FilterDataset = ()=>{
|
|
|
3293
3267
|
className: "dkan-apply-dataset-filters-button ds-u-float--right ds-l-md-col--auto ds-l-col--auto",
|
|
3294
3268
|
onClick: submitConditions,
|
|
3295
3269
|
variation: "solid",
|
|
3296
|
-
children: `Apply ${conditionsReadyToSubmit(queryConditions).length ||
|
|
3270
|
+
children: `Apply ${conditionsReadyToSubmit(queryConditions).length || ""} filter${conditionsReadyToSubmit(queryConditions).length === 1 ? "" : "s"}`
|
|
3297
3271
|
})
|
|
3298
3272
|
]
|
|
3299
3273
|
})
|
|
@@ -3432,9 +3406,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3432
3406
|
className: "ds-u-display--flex ds-u-align-items--start",
|
|
3433
3407
|
children: [
|
|
3434
3408
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3435
|
-
onClick: ()=>setTableDensity(
|
|
3409
|
+
onClick: ()=>setTableDensity("expanded"),
|
|
3436
3410
|
"aria-label": "Row height, Expanded",
|
|
3437
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3411
|
+
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === "expanded" ? "active ds-u-fill--primary-lightest" : ""}`,
|
|
3438
3412
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3439
3413
|
className: "ds-u-display--block",
|
|
3440
3414
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3453,9 +3427,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3453
3427
|
})
|
|
3454
3428
|
}),
|
|
3455
3429
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3456
|
-
onClick: ()=>setTableDensity(
|
|
3430
|
+
onClick: ()=>setTableDensity("normal"),
|
|
3457
3431
|
"aria-label": "Row height, Normal",
|
|
3458
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3432
|
+
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === "normal" ? "active ds-u-fill--primary-lightest" : ""}`,
|
|
3459
3433
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3460
3434
|
className: "ds-u-display--block",
|
|
3461
3435
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3474,9 +3448,9 @@ const $dae856e97a09bcd6$var$DisplaySettings = ()=>{
|
|
|
3474
3448
|
})
|
|
3475
3449
|
}),
|
|
3476
3450
|
/*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
3477
|
-
onClick: ()=>setTableDensity(
|
|
3451
|
+
onClick: ()=>setTableDensity("compact"),
|
|
3478
3452
|
"aria-label": "Row height, Compact",
|
|
3479
|
-
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity ===
|
|
3453
|
+
className: `dkan-table-density-button ds-u-leading--reset ds-u-padding--1 ds-u-margin--0 ${tableDensity === "compact" ? "active ds-u-fill--primary-lightest " : ""}`,
|
|
3480
3454
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
3481
3455
|
className: "ds-u-display--block",
|
|
3482
3456
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("svg", {
|
|
@@ -3561,7 +3535,7 @@ const $85f8ff1ff89899c7$var$updateBrowserURL = (newConditions)=>{
|
|
|
3561
3535
|
encodeValuesOnly: true,
|
|
3562
3536
|
addQueryPrefix: true
|
|
3563
3537
|
});
|
|
3564
|
-
window.history.pushState({},
|
|
3538
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
3565
3539
|
};
|
|
3566
3540
|
const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, columns: columns, defaultColumnOrder: defaultColumnOrder, isModal: isModal, datasetTableControls: datasetTableControls, columnVisibility: columnVisibility, setColumnVisibility: setColumnVisibility })=>{
|
|
3567
3541
|
const { limit: limit, offset: offset, count: count, conditions: conditions, setConditions: setConditions } = resource;
|
|
@@ -3647,7 +3621,7 @@ const $85f8ff1ff89899c7$var$DataTableToolbar = ({ resource: resource, id: id, co
|
|
|
3647
3621
|
}, index)) : null,
|
|
3648
3622
|
hiddenColumns > 0 ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $c5b172e8d1a8197c$export$2e2bcd8739ae039), {
|
|
3649
3623
|
iconClass: "fa fa-columns",
|
|
3650
|
-
text: `${hiddenColumns} Column${hiddenColumns === 1 ?
|
|
3624
|
+
text: `${hiddenColumns} Column${hiddenColumns === 1 ? "" : "s"} Hidden`,
|
|
3651
3625
|
onClick: ()=>{
|
|
3652
3626
|
resetColumnVisibility();
|
|
3653
3627
|
}
|
|
@@ -3682,7 +3656,6 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3682
3656
|
const { conditions: conditions } = resource;
|
|
3683
3657
|
const data = resource.values;
|
|
3684
3658
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
3685
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
|
|
3686
3659
|
const dataTableWrapperElement = (0, $hgUW1$useRef)(null);
|
|
3687
3660
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
3688
3661
|
const table_columns = columns.map((col)=>{
|
|
@@ -3701,9 +3674,9 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3701
3674
|
columnOrder
|
|
3702
3675
|
]);
|
|
3703
3676
|
const sortElement = (isSorted, onClickFn)=>{
|
|
3704
|
-
if (isSorted ===
|
|
3705
|
-
if (isSorted ===
|
|
3706
|
-
return
|
|
3677
|
+
if (isSorted === "asc") return "dc-c-sort--asc";
|
|
3678
|
+
if (isSorted === "desc") return "dc-c-sort--desc";
|
|
3679
|
+
return "dc-c-sort--default";
|
|
3707
3680
|
};
|
|
3708
3681
|
const filters = [];
|
|
3709
3682
|
const table = (0, $hgUW1$useReactTable)({
|
|
@@ -3715,7 +3688,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3715
3688
|
columnVisibility: columnVisibility,
|
|
3716
3689
|
sorting: sorting
|
|
3717
3690
|
},
|
|
3718
|
-
columnResizeMode:
|
|
3691
|
+
columnResizeMode: "onChange",
|
|
3719
3692
|
onSortingChange: setSorting,
|
|
3720
3693
|
onColumnOrderChange: setColumnOrder,
|
|
3721
3694
|
onColumnVisibilityChange: setColumnVisibility,
|
|
@@ -3732,7 +3705,7 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3732
3705
|
const defaultColumnOrder = (0, $hgUW1$useMemo)(()=>table_columns.map((column)=>column.accessorKey), []);
|
|
3733
3706
|
const tableWrapperWidth = ()=>{
|
|
3734
3707
|
if (dataTableWrapperElement.current) return dataTableWrapperElement.current.offsetWidth;
|
|
3735
|
-
return
|
|
3708
|
+
return "auto";
|
|
3736
3709
|
};
|
|
3737
3710
|
(0, $hgUW1$useEffect)(()=>{
|
|
3738
3711
|
setHighlightRow(null);
|
|
@@ -3878,57 +3851,48 @@ const $d98f94c79ddf4e0e$var$DataTable = ({ columns: columns, sortTransform: sort
|
|
|
3878
3851
|
})
|
|
3879
3852
|
]
|
|
3880
3853
|
}),
|
|
3881
|
-
/*#__PURE__*/ (0, $hgUW1$
|
|
3854
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
3882
3855
|
className: "dc-c-datatable-wrapper ds-u-border-x--1 ds-u-border-bottom--1",
|
|
3883
3856
|
tabIndex: 0,
|
|
3884
3857
|
ref: dataTableWrapperElement,
|
|
3885
|
-
children:
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
})
|
|
3920
|
-
}, row.id);
|
|
3921
|
-
})
|
|
3858
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("table", {
|
|
3859
|
+
style: {
|
|
3860
|
+
width: canResize ? table.getCenterTotalSize() : "100%",
|
|
3861
|
+
minWidth: tableWrapperWidth()
|
|
3862
|
+
},
|
|
3863
|
+
className: "dc-c-datatable",
|
|
3864
|
+
children: [
|
|
3865
|
+
canResize ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $96d341d082bffec5$export$2e2bcd8739ae039), {
|
|
3866
|
+
table: table,
|
|
3867
|
+
sortElement: sortElement
|
|
3868
|
+
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $23763e27eda0e8d7$export$2e2bcd8739ae039), {
|
|
3869
|
+
table: table,
|
|
3870
|
+
sortElement: sortElement
|
|
3871
|
+
}),
|
|
3872
|
+
loading ? /*#__PURE__*/ (0, $hgUW1$jsx)("tbody", {}) : /*#__PURE__*/ (0, $hgUW1$jsx)("tbody", {
|
|
3873
|
+
children: table.getRowModel().rows.map((row, index)=>{
|
|
3874
|
+
const even = (index + 1) % 2 === 0;
|
|
3875
|
+
const highlight = highlightRow === row.id;
|
|
3876
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("tr", {
|
|
3877
|
+
className: `${highlight ? "dc-c-datatable--highlight-row" : even && "dc-c-datatable--even-row"}`,
|
|
3878
|
+
onClick: ()=>setHighlightRow(row.id),
|
|
3879
|
+
children: row.getVisibleCells().map((cell)=>{
|
|
3880
|
+
let classList = "dc-truncate ds-u-padding-x--1";
|
|
3881
|
+
return /*#__PURE__*/ (0, $hgUW1$jsx)("td", {
|
|
3882
|
+
key: cell.id,
|
|
3883
|
+
style: {
|
|
3884
|
+
maxWidth: cell.column.getSize()
|
|
3885
|
+
},
|
|
3886
|
+
className: `${classList} ${tablePadding}`,
|
|
3887
|
+
title: cell.getValue(),
|
|
3888
|
+
children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
3889
|
+
});
|
|
3890
|
+
})
|
|
3891
|
+
}, row.id);
|
|
3922
3892
|
})
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
className: "sr-only",
|
|
3927
|
-
"aria-live": "assertive",
|
|
3928
|
-
"aria-atomic": "true",
|
|
3929
|
-
children: ariaLiveFeedback
|
|
3930
|
-
})
|
|
3931
|
-
]
|
|
3893
|
+
})
|
|
3894
|
+
]
|
|
3895
|
+
})
|
|
3932
3896
|
}),
|
|
3933
3897
|
loading && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
3934
3898
|
"aria-valuetext": "Dataset loading",
|
|
@@ -3962,7 +3926,7 @@ function $626282d9a03c51d5$var$DefaultColumnFilter({ column: { Header: Header, a
|
|
|
3962
3926
|
},
|
|
3963
3927
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
3964
3928
|
name: accessor,
|
|
3965
|
-
value: filterValue ||
|
|
3929
|
+
value: filterValue || ""
|
|
3966
3930
|
});
|
|
3967
3931
|
}
|
|
3968
3932
|
const $626282d9a03c51d5$var$ResourcePreview = ({ tablePadding: tablePadding, id: id, canResize: canResize = true })=>{
|
|
@@ -4038,7 +4002,7 @@ const $ec3e23baa005dc03$var$Breadcrumb = ({ currentPage: currentPage, pageTrail:
|
|
|
4038
4002
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4039
4003
|
children: currentPage
|
|
4040
4004
|
})
|
|
4041
|
-
}) :
|
|
4005
|
+
}) : ""
|
|
4042
4006
|
]
|
|
4043
4007
|
})
|
|
4044
4008
|
});
|
|
@@ -4095,11 +4059,11 @@ var $10acbeaa4d8f6040$export$2e2bcd8739ae039 = $10acbeaa4d8f6040$var$ChevronRigh
|
|
|
4095
4059
|
|
|
4096
4060
|
|
|
4097
4061
|
|
|
4098
|
-
const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder =
|
|
4062
|
+
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", {
|
|
4099
4063
|
className: "search-input-container",
|
|
4100
4064
|
children: [
|
|
4101
4065
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4102
|
-
className: `${showMagnifyingGlass ?
|
|
4066
|
+
className: `${showMagnifyingGlass ? "left-padding" : ""} ${showSearchButton ? "right-padding" : ""}`,
|
|
4103
4067
|
label: placeholder,
|
|
4104
4068
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4105
4069
|
placeholder: placeholder,
|
|
@@ -4114,7 +4078,7 @@ const $bdb071ea3a6d3466$var$SearchInput = ({ placeholder: placeholder = 'Search
|
|
|
4114
4078
|
}),
|
|
4115
4079
|
showSearchButton && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Button), {
|
|
4116
4080
|
variation: "solid",
|
|
4117
|
-
className: onDark &&
|
|
4081
|
+
className: onDark && "on-dark",
|
|
4118
4082
|
onClick: onSubmit,
|
|
4119
4083
|
children: [
|
|
4120
4084
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4233,7 +4197,7 @@ const $c96c4b9ef7203c1f$var$APIPage = ({ hideAuth: hideAuth = true, rootUrl: roo
|
|
|
4233
4197
|
url: `${rootUrl}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4234
4198
|
addQueryPrefix: true
|
|
4235
4199
|
})}`,
|
|
4236
|
-
docExpansion:
|
|
4200
|
+
docExpansion: "list",
|
|
4237
4201
|
defaultModelsExpandDepth: -1,
|
|
4238
4202
|
plugins: [
|
|
4239
4203
|
(0, $hgUW1$SpanOpenAPIVersion),
|
|
@@ -4341,7 +4305,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4341
4305
|
size: "big",
|
|
4342
4306
|
type: "submit",
|
|
4343
4307
|
style: {
|
|
4344
|
-
width:
|
|
4308
|
+
width: "70px"
|
|
4345
4309
|
},
|
|
4346
4310
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4347
4311
|
className: "fas fa-search small-text"
|
|
@@ -4358,7 +4322,7 @@ const $0a551147dc92a718$var$SearchButton = (props)=>{
|
|
|
4358
4322
|
className: "full-text ds-u-display--none ds-u-sm-display--inline-block ds-u-display--flex ds-u-align-items--center",
|
|
4359
4323
|
children: [
|
|
4360
4324
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
4361
|
-
children: text ? text :
|
|
4325
|
+
children: text ? text : "Search"
|
|
4362
4326
|
}),
|
|
4363
4327
|
` `,
|
|
4364
4328
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
@@ -4443,12 +4407,12 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
4443
4407
|
fulltext: fulltext ? fulltext : undefined,
|
|
4444
4408
|
...selectedFacets,
|
|
4445
4409
|
sort: sort ? sort : undefined,
|
|
4446
|
-
[
|
|
4410
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4447
4411
|
page: page !== 1 ? page : undefined,
|
|
4448
|
-
[
|
|
4412
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4449
4413
|
};
|
|
4450
4414
|
return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4451
|
-
arrayFormat:
|
|
4415
|
+
arrayFormat: "comma",
|
|
4452
4416
|
encode: false
|
|
4453
4417
|
})}`);
|
|
4454
4418
|
}
|
|
@@ -4459,26 +4423,26 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
|
|
|
4459
4423
|
|
|
4460
4424
|
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
4461
4425
|
const { rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4462
|
-
defaultSort:
|
|
4463
|
-
defaultOrder:
|
|
4464
|
-
}, pageTitle: pageTitle =
|
|
4426
|
+
defaultSort: "modified",
|
|
4427
|
+
defaultOrder: "desc"
|
|
4428
|
+
}, pageTitle: pageTitle = "Dataset Explorer", filterTitle: filterTitle = "Tags", showLargeFileWarning: showLargeFileWarning = false, largeFileThemes: largeFileThemes, introText: introText = "", showDownloadIcon: showDownloadIcon = false, altMobileSearchButton: altMobileSearchButton, dataDictionaryLinks: dataDictionaryLinks = false } = props;
|
|
4465
4429
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4466
4430
|
const sortOptions = [
|
|
4467
4431
|
{
|
|
4468
|
-
label:
|
|
4469
|
-
value:
|
|
4432
|
+
label: "Newest",
|
|
4433
|
+
value: "newest"
|
|
4470
4434
|
},
|
|
4471
4435
|
{
|
|
4472
|
-
label:
|
|
4473
|
-
value:
|
|
4436
|
+
label: "Oldest",
|
|
4437
|
+
value: "oldest"
|
|
4474
4438
|
},
|
|
4475
4439
|
{
|
|
4476
|
-
label:
|
|
4477
|
-
value:
|
|
4440
|
+
label: "Title A-Z",
|
|
4441
|
+
value: "titleAZ"
|
|
4478
4442
|
},
|
|
4479
4443
|
{
|
|
4480
|
-
label:
|
|
4481
|
-
value:
|
|
4444
|
+
label: "Title Z-A",
|
|
4445
|
+
value: "titleZA"
|
|
4482
4446
|
}
|
|
4483
4447
|
];
|
|
4484
4448
|
const defaultSortBy = "";
|
|
@@ -4497,7 +4461,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4497
4461
|
endingNumber: 0
|
|
4498
4462
|
});
|
|
4499
4463
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4500
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4464
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
|
|
4501
4465
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4502
4466
|
const [fulltext, setFullText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
4503
4467
|
const [filterText, setFilterText] = (0, $hgUW1$useState)(transformedParams.fulltext);
|
|
@@ -4506,7 +4470,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4506
4470
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4507
4471
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4508
4472
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4509
|
-
return sort ===
|
|
4473
|
+
return sort === "modified" ? sortOrder === "desc" ? "newest" : "oldest" : sortOrder === "desc" ? "titleZA" : "titleAZ";
|
|
4510
4474
|
});
|
|
4511
4475
|
const [selectedFacets, setSelectedFacets] = (0, $hgUW1$useState)(transformedParams.selectedFacets ? transformedParams.selectedFacets : {
|
|
4512
4476
|
theme: [],
|
|
@@ -4515,21 +4479,21 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4515
4479
|
const setSortOptions = (value)=>{
|
|
4516
4480
|
setSortDisplay(value);
|
|
4517
4481
|
switch(value){
|
|
4518
|
-
case
|
|
4519
|
-
setSort(
|
|
4520
|
-
setSortOrder(
|
|
4482
|
+
case "newest":
|
|
4483
|
+
setSort("modified");
|
|
4484
|
+
setSortOrder("desc");
|
|
4521
4485
|
break;
|
|
4522
|
-
case
|
|
4523
|
-
setSort(
|
|
4524
|
-
setSortOrder(
|
|
4486
|
+
case "oldest":
|
|
4487
|
+
setSort("modified");
|
|
4488
|
+
setSortOrder("asc");
|
|
4525
4489
|
break;
|
|
4526
|
-
case
|
|
4527
|
-
setSort(
|
|
4528
|
-
setSortOrder(
|
|
4490
|
+
case "titleAZ":
|
|
4491
|
+
setSort("title");
|
|
4492
|
+
setSortOrder("asc");
|
|
4529
4493
|
break;
|
|
4530
|
-
case
|
|
4531
|
-
setSort(
|
|
4532
|
-
setSortOrder(
|
|
4494
|
+
case "titleZA":
|
|
4495
|
+
setSort("title");
|
|
4496
|
+
setSortOrder("desc");
|
|
4533
4497
|
break;
|
|
4534
4498
|
}
|
|
4535
4499
|
};
|
|
@@ -4537,12 +4501,12 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4537
4501
|
const newFacets = {
|
|
4538
4502
|
...selectedFacets
|
|
4539
4503
|
};
|
|
4540
|
-
if (key ===
|
|
4504
|
+
if (key === "theme") {
|
|
4541
4505
|
const existingFacet = newFacets.theme.findIndex((s)=>s === value);
|
|
4542
4506
|
if (existingFacet > -1) newFacets.theme.splice(existingFacet, 1);
|
|
4543
4507
|
else newFacets.theme.push(value);
|
|
4544
4508
|
}
|
|
4545
|
-
if (key ===
|
|
4509
|
+
if (key === "keyword") {
|
|
4546
4510
|
const existingFacet = newFacets.keyword.findIndex((s)=>s === value);
|
|
4547
4511
|
if (existingFacet > -1) newFacets.keyword.splice(existingFacet, 1);
|
|
4548
4512
|
else newFacets.keyword.push(value);
|
|
@@ -4556,7 +4520,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4556
4520
|
});
|
|
4557
4521
|
setSelectedFacets(newFacets);
|
|
4558
4522
|
const url = new URL(window.location.href);
|
|
4559
|
-
window.history.pushState({},
|
|
4523
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
4560
4524
|
}
|
|
4561
4525
|
const pageSize = defaultPageSize;
|
|
4562
4526
|
function resetFilters() {
|
|
@@ -4565,14 +4529,14 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4565
4529
|
setSelectedFacets(defaultSelectedFacets);
|
|
4566
4530
|
setPage(defaultPage);
|
|
4567
4531
|
const url = new URL(window.location.href);
|
|
4568
|
-
window.history.pushState({},
|
|
4532
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}`);
|
|
4569
4533
|
}
|
|
4570
4534
|
function buildSearchParams(includePage) {
|
|
4571
4535
|
let newParams = {};
|
|
4572
4536
|
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
4573
4537
|
if (sort !== defaultSort.defaultSort) newParams.sort = sort;
|
|
4574
4538
|
if (sortOrder !== defaultSort.defaultOrder) newParams.sortOrder = sortOrder;
|
|
4575
|
-
if (fulltext !==
|
|
4539
|
+
if (fulltext !== "") newParams.fulltext = fulltext;
|
|
4576
4540
|
if (Object.keys(selectedFacets).length) Object.keys(selectedFacets).forEach((key)=>{
|
|
4577
4541
|
newParams[key] = selectedFacets[key];
|
|
4578
4542
|
});
|
|
@@ -4585,9 +4549,9 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4585
4549
|
fulltext: fulltext ? fulltext : undefined,
|
|
4586
4550
|
...selectedFacets,
|
|
4587
4551
|
sort: sort ? sort : undefined,
|
|
4588
|
-
[
|
|
4552
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4589
4553
|
page: page !== 1 ? page : undefined,
|
|
4590
|
-
[
|
|
4554
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4591
4555
|
};
|
|
4592
4556
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4593
4557
|
queryKey: [
|
|
@@ -4596,18 +4560,12 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4596
4560
|
],
|
|
4597
4561
|
queryFn: ()=>{
|
|
4598
4562
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4599
|
-
arrayFormat:
|
|
4563
|
+
arrayFormat: "comma",
|
|
4600
4564
|
encode: false
|
|
4601
4565
|
})}`);
|
|
4602
4566
|
}
|
|
4603
4567
|
});
|
|
4604
|
-
|
|
4605
|
-
// Moved to useEffect to prevent state updates during render (which can cause infinite loops)
|
|
4606
|
-
(0, $hgUW1$useEffect)(()=>{
|
|
4607
|
-
if (data?.data?.total !== undefined && data.data.total !== totalItems) setTotalItems(data.data.total);
|
|
4608
|
-
}, [
|
|
4609
|
-
data?.data?.total
|
|
4610
|
-
]);
|
|
4568
|
+
if (data && data.data.total && totalItems != data.data.total) setTotalItems(data.data.total);
|
|
4611
4569
|
const facets = data && data.data.facets ? (0, $eff7d34c30f5a0fc$export$959638e8dca60ce6)(data ? data.data.facets : []) : {
|
|
4612
4570
|
theme: null,
|
|
4613
4571
|
keyword: null
|
|
@@ -4647,8 +4605,8 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4647
4605
|
]);
|
|
4648
4606
|
(0, $hgUW1$useEffect)(()=>{
|
|
4649
4607
|
// No results found
|
|
4650
|
-
if (noResults) setAnnouncementText(
|
|
4651
|
-
else if (!isPending && (!data || !data.data.results)) setAnnouncementText(
|
|
4608
|
+
if (noResults) setAnnouncementText("No results found.");
|
|
4609
|
+
else if (!isPending && (!data || !data.data.results)) setAnnouncementText("Could not connect to the API.");
|
|
4652
4610
|
else setAnnouncementText(`Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`);
|
|
4653
4611
|
}, [
|
|
4654
4612
|
data,
|
|
@@ -4706,7 +4664,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4706
4664
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TextField), {
|
|
4707
4665
|
fieldClassName: "ds-u-margin--0",
|
|
4708
4666
|
value: filterText,
|
|
4709
|
-
className: `ds-u-padding-right--2 ${altMobileSearchButton ?
|
|
4667
|
+
className: `ds-u-padding-right--2 ${altMobileSearchButton ? "ds-l-col--12 ds-l-md-col--10 --alt-style" : "ds-l-col--10"}`,
|
|
4710
4668
|
label: "Search datasets",
|
|
4711
4669
|
labelClassName: "ds-u-visibility--screen-reader",
|
|
4712
4670
|
placeholder: "Search datasets",
|
|
@@ -4766,7 +4724,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4766
4724
|
"Showing ",
|
|
4767
4725
|
currentResultNumbers.startingNumber,
|
|
4768
4726
|
" -",
|
|
4769
|
-
|
|
4727
|
+
" ",
|
|
4770
4728
|
currentResultNumbers.endingNumber,
|
|
4771
4729
|
" of ",
|
|
4772
4730
|
data.data.total,
|
|
@@ -4837,7 +4795,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4837
4795
|
},
|
|
4838
4796
|
renderHref: (page)=>{
|
|
4839
4797
|
const searchParams = buildSearchParams(false);
|
|
4840
|
-
const includeAnd = searchParams ?
|
|
4798
|
+
const includeAnd = searchParams ? "&" : "";
|
|
4841
4799
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
4842
4800
|
}
|
|
4843
4801
|
})
|
|
@@ -4871,26 +4829,26 @@ var $e873081a6e8f024e$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
4871
4829
|
|
|
4872
4830
|
|
|
4873
4831
|
const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enableSort = true, enablePagination: enablePagination = true, defaultPageSize: defaultPageSize = 10, defaultSort: defaultSort = {
|
|
4874
|
-
defaultSort:
|
|
4875
|
-
defaultOrder:
|
|
4876
|
-
}, pageTitle: pageTitle =
|
|
4832
|
+
defaultSort: "modified",
|
|
4833
|
+
defaultOrder: "desc"
|
|
4834
|
+
}, pageTitle: pageTitle = "What's New ", showLargeFileWarning: showLargeFileWarning = false, introText: introText = "", dataDictionaryLinks: dataDictionaryLinks = false })=>{
|
|
4877
4835
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
4878
4836
|
const sortOptions = [
|
|
4879
4837
|
{
|
|
4880
|
-
label:
|
|
4881
|
-
value:
|
|
4838
|
+
label: "Newest",
|
|
4839
|
+
value: "newest"
|
|
4882
4840
|
},
|
|
4883
4841
|
{
|
|
4884
|
-
label:
|
|
4885
|
-
value:
|
|
4842
|
+
label: "Oldest",
|
|
4843
|
+
value: "oldest"
|
|
4886
4844
|
},
|
|
4887
4845
|
{
|
|
4888
|
-
label:
|
|
4889
|
-
value:
|
|
4846
|
+
label: "Title A-Z",
|
|
4847
|
+
value: "titleAZ"
|
|
4890
4848
|
},
|
|
4891
4849
|
{
|
|
4892
|
-
label:
|
|
4893
|
-
value:
|
|
4850
|
+
label: "Title Z-A",
|
|
4851
|
+
value: "titleZA"
|
|
4894
4852
|
}
|
|
4895
4853
|
];
|
|
4896
4854
|
const defaultSortBy = "";
|
|
@@ -4904,33 +4862,33 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4904
4862
|
endingNumber: 0
|
|
4905
4863
|
});
|
|
4906
4864
|
const [noResults, setNoResults] = (0, $hgUW1$useState)(false);
|
|
4907
|
-
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)(
|
|
4865
|
+
const [announcementText, setAnnouncementText] = (0, $hgUW1$useState)("");
|
|
4908
4866
|
let [searchParams, setSearchParams] = (0, $hgUW1$useSearchParams)();
|
|
4909
4867
|
const [totalItems, setTotalItems] = (0, $hgUW1$useState)(0);
|
|
4910
4868
|
const [page, setPage] = (0, $hgUW1$useState)(transformedParams.page ? transformedParams.page : defaultPage);
|
|
4911
4869
|
const [sort, setSort] = (0, $hgUW1$useState)(transformedParams.sort ? transformedParams.sort : defaultSort ? defaultSort.defaultSort : defaultSortBy);
|
|
4912
4870
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(transformedParams.sortOrder ? transformedParams.sortOrder : defaultSort ? defaultSort.defaultOrder : defaultSortOrder);
|
|
4913
4871
|
const [sortDisplay, setSortDisplay] = (0, $hgUW1$useState)(()=>{
|
|
4914
|
-
return sort ===
|
|
4872
|
+
return sort === "modified" ? sortOrder === "desc" ? "newest" : "oldest" : sortOrder === "desc" ? "titleZA" : "titleAZ";
|
|
4915
4873
|
});
|
|
4916
4874
|
const setSortOptions = (value)=>{
|
|
4917
4875
|
setSortDisplay(value);
|
|
4918
4876
|
switch(value){
|
|
4919
|
-
case
|
|
4920
|
-
setSort(
|
|
4921
|
-
setSortOrder(
|
|
4877
|
+
case "newest":
|
|
4878
|
+
setSort("modified");
|
|
4879
|
+
setSortOrder("desc");
|
|
4922
4880
|
break;
|
|
4923
|
-
case
|
|
4924
|
-
setSort(
|
|
4925
|
-
setSortOrder(
|
|
4881
|
+
case "oldest":
|
|
4882
|
+
setSort("modified");
|
|
4883
|
+
setSortOrder("asc");
|
|
4926
4884
|
break;
|
|
4927
|
-
case
|
|
4928
|
-
setSort(
|
|
4929
|
-
setSortOrder(
|
|
4885
|
+
case "titleAZ":
|
|
4886
|
+
setSort("title");
|
|
4887
|
+
setSortOrder("asc");
|
|
4930
4888
|
break;
|
|
4931
|
-
case
|
|
4932
|
-
setSort(
|
|
4933
|
-
setSortOrder(
|
|
4889
|
+
case "titleZA":
|
|
4890
|
+
setSort("title");
|
|
4891
|
+
setSortOrder("desc");
|
|
4934
4892
|
break;
|
|
4935
4893
|
}
|
|
4936
4894
|
};
|
|
@@ -4947,9 +4905,9 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4947
4905
|
}
|
|
4948
4906
|
let params = {
|
|
4949
4907
|
sort: sort ? sort : undefined,
|
|
4950
|
-
[
|
|
4908
|
+
["sort-order"]: sortOrder ? sortOrder : undefined,
|
|
4951
4909
|
page: page !== 1 ? page : undefined,
|
|
4952
|
-
[
|
|
4910
|
+
["page-size"]: pageSize !== 10 ? pageSize : undefined
|
|
4953
4911
|
};
|
|
4954
4912
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
4955
4913
|
queryKey: [
|
|
@@ -4958,23 +4916,17 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4958
4916
|
],
|
|
4959
4917
|
queryFn: ()=>{
|
|
4960
4918
|
return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
|
|
4961
|
-
arrayFormat:
|
|
4919
|
+
arrayFormat: "comma",
|
|
4962
4920
|
encode: false
|
|
4963
4921
|
})}`);
|
|
4964
4922
|
}
|
|
4965
4923
|
});
|
|
4966
|
-
|
|
4967
|
-
// Moved to useEffect to prevent state updates during render (which can cause infinite loops)
|
|
4968
|
-
(0, $hgUW1$useEffect)(()=>{
|
|
4969
|
-
if (data?.data?.total !== undefined && data.data.total !== totalItems) setTotalItems(data.data.total);
|
|
4970
|
-
}, [
|
|
4971
|
-
data?.data?.total
|
|
4972
|
-
]);
|
|
4924
|
+
if (data && data.data.total && totalItems != data.data.total) setTotalItems(data.data.total);
|
|
4973
4925
|
(0, $hgUW1$useEffect)(()=>{
|
|
4974
4926
|
// Update browser URL with current search params
|
|
4975
4927
|
const params = buildSearchParams(true);
|
|
4976
4928
|
const url = new URL(window.location.href);
|
|
4977
|
-
window.history.pushState({},
|
|
4929
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${params}`);
|
|
4978
4930
|
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4979
4931
|
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4980
4932
|
const endingNumber = Number(pageSize) * Number(page);
|
|
@@ -5000,8 +4952,8 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5000
4952
|
]);
|
|
5001
4953
|
(0, $hgUW1$useEffect)(()=>{
|
|
5002
4954
|
// No results found
|
|
5003
|
-
if (noResults) setAnnouncementText(
|
|
5004
|
-
else if (!isPending && (!data || !data.data.results)) setAnnouncementText(
|
|
4955
|
+
if (noResults) setAnnouncementText("No results found.");
|
|
4956
|
+
else if (!isPending && (!data || !data.data.results)) setAnnouncementText("Could not connect to the API.");
|
|
5005
4957
|
else setAnnouncementText(`Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`);
|
|
5006
4958
|
}, [
|
|
5007
4959
|
data,
|
|
@@ -5074,7 +5026,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5074
5026
|
"Showing ",
|
|
5075
5027
|
currentResultNumbers.startingNumber,
|
|
5076
5028
|
" -",
|
|
5077
|
-
|
|
5029
|
+
" ",
|
|
5078
5030
|
currentResultNumbers.endingNumber,
|
|
5079
5031
|
" of ",
|
|
5080
5032
|
data.data.total,
|
|
@@ -5134,7 +5086,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5134
5086
|
},
|
|
5135
5087
|
renderHref: (page)=>{
|
|
5136
5088
|
const searchParams = buildSearchParams(false);
|
|
5137
|
-
const includeAnd = searchParams ?
|
|
5089
|
+
const includeAnd = searchParams ? "&" : "";
|
|
5138
5090
|
return `/datasets?page=${page}${includeAnd}${searchParams}`;
|
|
5139
5091
|
}
|
|
5140
5092
|
})
|
|
@@ -5166,12 +5118,12 @@ var $550bcc185f420ff5$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
5166
5118
|
|
|
5167
5119
|
const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
5168
5120
|
const [dataset, setDataset] = (0, $hgUW1$useState)({
|
|
5169
|
-
title:
|
|
5121
|
+
title: "",
|
|
5170
5122
|
distribution: [],
|
|
5171
|
-
error:
|
|
5172
|
-
description:
|
|
5173
|
-
identifier:
|
|
5174
|
-
modified:
|
|
5123
|
+
error: "",
|
|
5124
|
+
description: "",
|
|
5125
|
+
identifier: "",
|
|
5126
|
+
modified: ""
|
|
5175
5127
|
});
|
|
5176
5128
|
const [id, setId] = (0, $hgUW1$useState)(datasetId);
|
|
5177
5129
|
const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
|
|
@@ -5181,7 +5133,7 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
|
|
|
5181
5133
|
"metastore" + id
|
|
5182
5134
|
],
|
|
5183
5135
|
queryFn: ()=>{
|
|
5184
|
-
return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ?
|
|
5136
|
+
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)=>{
|
|
5185
5137
|
return {
|
|
5186
5138
|
title: dataset.title,
|
|
5187
5139
|
distribution: dataset.distribution,
|
|
@@ -5237,7 +5189,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5237
5189
|
// const [joins, setJoins] = useState()
|
|
5238
5190
|
const [properties, setProperties] = (0, $hgUW1$useState)(options.properties ? options.properties : undefined);
|
|
5239
5191
|
// Check drupalSettings for datastore_query_api
|
|
5240
|
-
const useDatasetAPI = typeof window !==
|
|
5192
|
+
const useDatasetAPI = typeof window !== "undefined" && window.drupalSettings?.datastore_query_api === true;
|
|
5241
5193
|
const datasetID = additionalParams.datasetID;
|
|
5242
5194
|
// Remove datasetID from params to avoid sending it to the API
|
|
5243
5195
|
const { datasetID: _, ...restAdditionalParams } = additionalParams;
|
|
@@ -5252,7 +5204,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5252
5204
|
...restAdditionalParams
|
|
5253
5205
|
};
|
|
5254
5206
|
params = (0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA);
|
|
5255
|
-
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` :
|
|
5207
|
+
const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : "";
|
|
5256
5208
|
let enabled = false;
|
|
5257
5209
|
if (id) {
|
|
5258
5210
|
if (!requireConditions) enabled = true;
|
|
@@ -5334,65 +5286,65 @@ var $1d3d480a9cfaabe0$export$2e2bcd8739ae039 = $1d3d480a9cfaabe0$var$useDatastor
|
|
|
5334
5286
|
|
|
5335
5287
|
|
|
5336
5288
|
const $28f16f59778efa64$export$82b1b1d517e5388a = {
|
|
5337
|
-
|
|
5338
|
-
name:
|
|
5289
|
+
"R/P10Y": {
|
|
5290
|
+
name: "Decennial"
|
|
5339
5291
|
},
|
|
5340
|
-
|
|
5341
|
-
name:
|
|
5292
|
+
"R/P4Y": {
|
|
5293
|
+
name: "Quadrennial"
|
|
5342
5294
|
},
|
|
5343
|
-
|
|
5344
|
-
name:
|
|
5295
|
+
"R/P1Y": {
|
|
5296
|
+
name: "Annual"
|
|
5345
5297
|
},
|
|
5346
|
-
|
|
5347
|
-
name:
|
|
5298
|
+
"R/P2M": {
|
|
5299
|
+
name: "Bimonthly"
|
|
5348
5300
|
},
|
|
5349
|
-
|
|
5350
|
-
name:
|
|
5301
|
+
"R/P3.5D": {
|
|
5302
|
+
name: "Semiweekly"
|
|
5351
5303
|
},
|
|
5352
|
-
|
|
5353
|
-
name:
|
|
5304
|
+
"R/P1D": {
|
|
5305
|
+
name: "Daily"
|
|
5354
5306
|
},
|
|
5355
|
-
|
|
5356
|
-
name:
|
|
5307
|
+
"R/P2W": {
|
|
5308
|
+
name: "Biweekly"
|
|
5357
5309
|
},
|
|
5358
|
-
|
|
5359
|
-
name:
|
|
5310
|
+
"R/P6M": {
|
|
5311
|
+
name: "Semiannual"
|
|
5360
5312
|
},
|
|
5361
|
-
|
|
5362
|
-
name:
|
|
5313
|
+
"R/P2Y": {
|
|
5314
|
+
name: "Biennial"
|
|
5363
5315
|
},
|
|
5364
|
-
|
|
5365
|
-
name:
|
|
5316
|
+
"R/P3Y": {
|
|
5317
|
+
name: "Triennial"
|
|
5366
5318
|
},
|
|
5367
|
-
|
|
5368
|
-
name:
|
|
5319
|
+
"R/P0.33W": {
|
|
5320
|
+
name: "Three times a week"
|
|
5369
5321
|
},
|
|
5370
|
-
|
|
5371
|
-
name:
|
|
5322
|
+
"R/P0.33M": {
|
|
5323
|
+
name: "Three times a month"
|
|
5372
5324
|
},
|
|
5373
|
-
|
|
5374
|
-
name:
|
|
5325
|
+
"R/PT1S": {
|
|
5326
|
+
name: "Continuously updated"
|
|
5375
5327
|
},
|
|
5376
|
-
|
|
5377
|
-
name:
|
|
5328
|
+
"R/P1M": {
|
|
5329
|
+
name: "Monthly"
|
|
5378
5330
|
},
|
|
5379
|
-
|
|
5380
|
-
name:
|
|
5331
|
+
"R/P3M": {
|
|
5332
|
+
name: "Quarterly"
|
|
5381
5333
|
},
|
|
5382
|
-
|
|
5383
|
-
name:
|
|
5334
|
+
"R/P0.5M": {
|
|
5335
|
+
name: "Semimonthly"
|
|
5384
5336
|
},
|
|
5385
|
-
|
|
5386
|
-
name:
|
|
5337
|
+
"R/P4M": {
|
|
5338
|
+
name: "Three times a year"
|
|
5387
5339
|
},
|
|
5388
|
-
|
|
5389
|
-
name:
|
|
5340
|
+
"R/P1W": {
|
|
5341
|
+
name: "Weekly"
|
|
5390
5342
|
},
|
|
5391
|
-
|
|
5392
|
-
name:
|
|
5343
|
+
"R/PT1H": {
|
|
5344
|
+
name: "Hourly"
|
|
5393
5345
|
},
|
|
5394
5346
|
irregular: {
|
|
5395
|
-
name:
|
|
5347
|
+
name: "Irregular"
|
|
5396
5348
|
}
|
|
5397
5349
|
};
|
|
5398
5350
|
|
|
@@ -5401,7 +5353,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5401
5353
|
modified: (data)=>{
|
|
5402
5354
|
return [
|
|
5403
5355
|
{
|
|
5404
|
-
label:
|
|
5356
|
+
label: "Modified",
|
|
5405
5357
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5406
5358
|
date: data
|
|
5407
5359
|
})
|
|
@@ -5411,7 +5363,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5411
5363
|
issued: (data)=>{
|
|
5412
5364
|
return [
|
|
5413
5365
|
{
|
|
5414
|
-
label:
|
|
5366
|
+
label: "Issued",
|
|
5415
5367
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
5416
5368
|
date: data
|
|
5417
5369
|
})
|
|
@@ -5421,7 +5373,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5421
5373
|
accrualPeriodicity: (data)=>{
|
|
5422
5374
|
return [
|
|
5423
5375
|
{
|
|
5424
|
-
label:
|
|
5376
|
+
label: "Frequency",
|
|
5425
5377
|
value: (0, $28f16f59778efa64$export$82b1b1d517e5388a)[data].name
|
|
5426
5378
|
}
|
|
5427
5379
|
];
|
|
@@ -5429,7 +5381,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5429
5381
|
publisher: (data)=>{
|
|
5430
5382
|
if (data.data && data.data.name) return [
|
|
5431
5383
|
{
|
|
5432
|
-
label:
|
|
5384
|
+
label: "Publisher",
|
|
5433
5385
|
value: data.data.name
|
|
5434
5386
|
}
|
|
5435
5387
|
];
|
|
@@ -5438,7 +5390,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5438
5390
|
identifier: (data)=>{
|
|
5439
5391
|
return [
|
|
5440
5392
|
{
|
|
5441
|
-
label:
|
|
5393
|
+
label: "Identifier",
|
|
5442
5394
|
value: data
|
|
5443
5395
|
}
|
|
5444
5396
|
];
|
|
@@ -5446,11 +5398,11 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5446
5398
|
contactPoint: (data)=>{
|
|
5447
5399
|
let rows = [];
|
|
5448
5400
|
if (data.fn) rows.push({
|
|
5449
|
-
label:
|
|
5401
|
+
label: "Contact",
|
|
5450
5402
|
value: data.fn
|
|
5451
5403
|
});
|
|
5452
5404
|
if (data.hasEmail) rows.push({
|
|
5453
|
-
label:
|
|
5405
|
+
label: "Contact Email",
|
|
5454
5406
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5455
5407
|
href: data.hasEmail.includes("mailto:") ? data.hasEmail : `mailto:${data.hasEmail}`,
|
|
5456
5408
|
children: data.hasEmail.replace("mailto:", "")
|
|
@@ -5461,7 +5413,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5461
5413
|
bureauCode: (data)=>{
|
|
5462
5414
|
if (data.length) return [
|
|
5463
5415
|
{
|
|
5464
|
-
label:
|
|
5416
|
+
label: "Bureau Code",
|
|
5465
5417
|
value: data[0]
|
|
5466
5418
|
}
|
|
5467
5419
|
];
|
|
@@ -5469,7 +5421,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5469
5421
|
programCode: (data)=>{
|
|
5470
5422
|
if (data.length) return [
|
|
5471
5423
|
{
|
|
5472
|
-
label:
|
|
5424
|
+
label: "Program Code",
|
|
5473
5425
|
value: data[0]
|
|
5474
5426
|
}
|
|
5475
5427
|
];
|
|
@@ -5477,13 +5429,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5477
5429
|
theme: (data)=>{
|
|
5478
5430
|
return [
|
|
5479
5431
|
{
|
|
5480
|
-
label:
|
|
5432
|
+
label: "Category",
|
|
5481
5433
|
value: data.map((theme)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5482
5434
|
to: `/datasets?theme[]=${theme.data}`,
|
|
5483
5435
|
children: theme.data
|
|
5484
5436
|
}, theme.data)).reduce((prev, curr)=>[
|
|
5485
5437
|
prev,
|
|
5486
|
-
|
|
5438
|
+
", ",
|
|
5487
5439
|
curr
|
|
5488
5440
|
])
|
|
5489
5441
|
}
|
|
@@ -5492,13 +5444,13 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5492
5444
|
keyword: (data)=>{
|
|
5493
5445
|
return [
|
|
5494
5446
|
{
|
|
5495
|
-
label:
|
|
5447
|
+
label: "Tags",
|
|
5496
5448
|
value: data.map((keyword)=>/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Link), {
|
|
5497
5449
|
to: `/datasets?keyword[]=${keyword.data}`,
|
|
5498
5450
|
children: keyword.data
|
|
5499
5451
|
}, keyword.data)).reduce((prev, curr)=>[
|
|
5500
5452
|
prev,
|
|
5501
|
-
|
|
5453
|
+
", ",
|
|
5502
5454
|
curr
|
|
5503
5455
|
])
|
|
5504
5456
|
}
|
|
@@ -5507,7 +5459,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5507
5459
|
license: (data)=>{
|
|
5508
5460
|
return [
|
|
5509
5461
|
{
|
|
5510
|
-
label:
|
|
5462
|
+
label: "License",
|
|
5511
5463
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
5512
5464
|
href: data,
|
|
5513
5465
|
children: data
|
|
@@ -5518,7 +5470,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5518
5470
|
accessLevel: (data)=>{
|
|
5519
5471
|
return [
|
|
5520
5472
|
{
|
|
5521
|
-
label:
|
|
5473
|
+
label: "Public Access Level",
|
|
5522
5474
|
value: data
|
|
5523
5475
|
}
|
|
5524
5476
|
];
|
|
@@ -5526,7 +5478,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5526
5478
|
temporal: (data)=>{
|
|
5527
5479
|
return [
|
|
5528
5480
|
{
|
|
5529
|
-
label:
|
|
5481
|
+
label: "Temporal Coverage",
|
|
5530
5482
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
5531
5483
|
className: "dc-c-word-break--all",
|
|
5532
5484
|
children: data
|
|
@@ -5537,7 +5489,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5537
5489
|
spatial: (data)=>{
|
|
5538
5490
|
return [
|
|
5539
5491
|
{
|
|
5540
|
-
label:
|
|
5492
|
+
label: "Spacial/Geographical Coverage",
|
|
5541
5493
|
value: data
|
|
5542
5494
|
}
|
|
5543
5495
|
];
|
|
@@ -5545,7 +5497,7 @@ const $6da0396069e23175$export$bc27cf7ecf44639d = {
|
|
|
5545
5497
|
references: (data)=>{
|
|
5546
5498
|
return [
|
|
5547
5499
|
{
|
|
5548
|
-
label:
|
|
5500
|
+
label: "Related Documents",
|
|
5549
5501
|
value: /*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
5550
5502
|
className: "ds-u-margin--0 ds-u-padding-y--0 ds-u-padding-left--2 ds-u-padding-right--0",
|
|
5551
5503
|
children: data.map((item)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
@@ -5583,7 +5535,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ distribution: distribution,
|
|
|
5583
5535
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
5584
5536
|
const { data: resource } = (0, $hgUW1$useQuery)({
|
|
5585
5537
|
queryKey: [
|
|
5586
|
-
|
|
5538
|
+
"resource-information",
|
|
5587
5539
|
distribution.identifier
|
|
5588
5540
|
],
|
|
5589
5541
|
queryFn: ()=>(0, $hgUW1$axios).get(`${rootUrl}/datastore/query/${distribution.identifier}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({
|
|
@@ -5610,7 +5562,7 @@ const $0958733ee130fc44$var$ResourceInformation = ({ distribution: distribution,
|
|
|
5610
5562
|
}),
|
|
5611
5563
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5612
5564
|
className: "ds-u-font-weight--bold",
|
|
5613
|
-
children: resource?.count ? Number(resource.count).toLocaleString() :
|
|
5565
|
+
children: resource?.count ? Number(resource.count).toLocaleString() : ""
|
|
5614
5566
|
})
|
|
5615
5567
|
]
|
|
5616
5568
|
}),
|
|
@@ -5678,8 +5630,8 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5678
5630
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
5679
5631
|
href: dist.data.downloadURL,
|
|
5680
5632
|
style: {
|
|
5681
|
-
order: sm ?
|
|
5682
|
-
width: sm ?
|
|
5633
|
+
order: sm ? "1" : "0",
|
|
5634
|
+
width: sm ? "100%" : "auto"
|
|
5683
5635
|
},
|
|
5684
5636
|
"aria-label": `Download ${dist.data.title || title} ${fileFormat}`,
|
|
5685
5637
|
className: "ds-c-button",
|
|
@@ -5692,7 +5644,7 @@ const $7357cc0f79f9c514$var$Resource = ({ distributions: distributions, resource
|
|
|
5692
5644
|
})
|
|
5693
5645
|
}),
|
|
5694
5646
|
dist.data.description && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5695
|
-
className:
|
|
5647
|
+
className: "ds-u-measure--wide ds-u-margin-bottom--7",
|
|
5696
5648
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5697
5649
|
className: "dc-c-metadata-description ds-u-margin--0",
|
|
5698
5650
|
dangerouslySetInnerHTML: {
|
|
@@ -5766,7 +5718,7 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5766
5718
|
const tooltip = tooltips.find((item)=>item.label === r.label.toLowerCase());
|
|
5767
5719
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
5768
5720
|
children: [
|
|
5769
|
-
md ?
|
|
5721
|
+
md ? "" : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
5770
5722
|
component: "th",
|
|
5771
5723
|
className: "ds-u-font-weight--bold",
|
|
5772
5724
|
children: [
|
|
@@ -5778,8 +5730,8 @@ const $364dc44850cd8f7f$var$DatasetOverview = ({ dataset: dataset, resource: res
|
|
|
5778
5730
|
ariaLabel: r.label,
|
|
5779
5731
|
// @ts-ignore
|
|
5780
5732
|
style: {
|
|
5781
|
-
border:
|
|
5782
|
-
background:
|
|
5733
|
+
border: "none",
|
|
5734
|
+
background: "none"
|
|
5783
5735
|
},
|
|
5784
5736
|
maxWidth: "400px",
|
|
5785
5737
|
placement: "auto",
|
|
@@ -5838,10 +5790,10 @@ const $cf6eaefd6b928de3$var$DatasetAPI = ({ id: id, rootUrl: rootUrl, apiUrl: ap
|
|
|
5838
5790
|
href: apiUrl,
|
|
5839
5791
|
children: [
|
|
5840
5792
|
"View API",
|
|
5841
|
-
|
|
5793
|
+
" ",
|
|
5842
5794
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
5843
5795
|
style: {
|
|
5844
|
-
whiteSpace:
|
|
5796
|
+
whiteSpace: "nowrap"
|
|
5845
5797
|
},
|
|
5846
5798
|
children: [
|
|
5847
5799
|
"specification ",
|
|
@@ -5882,20 +5834,19 @@ var $cf6eaefd6b928de3$export$2e2bcd8739ae039 = $cf6eaefd6b928de3$var$DatasetAPI;
|
|
|
5882
5834
|
|
|
5883
5835
|
const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns, tableData: tableData, pageSize: pageSize, columnFilters: columnFilters })=>{
|
|
5884
5836
|
const [sorting, setSorting] = (0, $hgUW1$useState)([]);
|
|
5885
|
-
const [ariaLiveFeedback, setAriaLiveFeedback] = (0, $hgUW1$useState)('');
|
|
5886
5837
|
const mobile = (0, $hgUW1$useMediaQuery)({
|
|
5887
5838
|
minWidth: 0,
|
|
5888
5839
|
maxWidth: 544
|
|
5889
5840
|
});
|
|
5890
5841
|
const sortElement = (isSorted)=>{
|
|
5891
|
-
if (isSorted ===
|
|
5892
|
-
if (isSorted ===
|
|
5893
|
-
return
|
|
5842
|
+
if (isSorted === "asc") return "dc-c-sort--asc";
|
|
5843
|
+
if (isSorted === "desc") return "dc-c-sort--desc";
|
|
5844
|
+
return "dc-c-sort--default";
|
|
5894
5845
|
};
|
|
5895
5846
|
const table = (0, $hgUW1$useReactTable)({
|
|
5896
5847
|
data: tableData,
|
|
5897
5848
|
columns: tableColumns,
|
|
5898
|
-
columnResizeMode:
|
|
5849
|
+
columnResizeMode: "onChange",
|
|
5899
5850
|
getCoreRowModel: (0, $hgUW1$getCoreRowModel)(),
|
|
5900
5851
|
getFilteredRowModel: (0, $hgUW1$getFilteredRowModel)(),
|
|
5901
5852
|
getPaginationRowModel: (0, $hgUW1$getPaginationRowModel)(),
|
|
@@ -5914,49 +5865,49 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5914
5865
|
});
|
|
5915
5866
|
const sortOptions = [
|
|
5916
5867
|
{
|
|
5917
|
-
value:
|
|
5918
|
-
label:
|
|
5868
|
+
value: "default",
|
|
5869
|
+
label: "No Sort"
|
|
5919
5870
|
},
|
|
5920
5871
|
{
|
|
5921
|
-
value:
|
|
5922
|
-
label:
|
|
5872
|
+
value: "titleasc",
|
|
5873
|
+
label: "Title A-Z"
|
|
5923
5874
|
},
|
|
5924
5875
|
{
|
|
5925
|
-
value:
|
|
5926
|
-
label:
|
|
5876
|
+
value: "titledesc",
|
|
5877
|
+
label: "Title Z-A"
|
|
5927
5878
|
},
|
|
5928
5879
|
{
|
|
5929
|
-
value:
|
|
5930
|
-
label:
|
|
5880
|
+
value: "typeasc",
|
|
5881
|
+
label: "Type A-Z"
|
|
5931
5882
|
},
|
|
5932
5883
|
{
|
|
5933
|
-
value:
|
|
5934
|
-
label:
|
|
5884
|
+
value: "typedesc",
|
|
5885
|
+
label: "Type Z-A"
|
|
5935
5886
|
}
|
|
5936
5887
|
];
|
|
5937
5888
|
const sortStatesLookup = {
|
|
5938
5889
|
default: [],
|
|
5939
5890
|
titleasc: [
|
|
5940
5891
|
{
|
|
5941
|
-
id:
|
|
5892
|
+
id: "titleResizable",
|
|
5942
5893
|
desc: false
|
|
5943
5894
|
}
|
|
5944
5895
|
],
|
|
5945
5896
|
titledesc: [
|
|
5946
5897
|
{
|
|
5947
|
-
id:
|
|
5898
|
+
id: "titleResizable",
|
|
5948
5899
|
desc: true
|
|
5949
5900
|
}
|
|
5950
5901
|
],
|
|
5951
5902
|
typeasc: [
|
|
5952
5903
|
{
|
|
5953
|
-
id:
|
|
5904
|
+
id: "type",
|
|
5954
5905
|
desc: false
|
|
5955
5906
|
}
|
|
5956
5907
|
],
|
|
5957
5908
|
typedesc: [
|
|
5958
5909
|
{
|
|
5959
|
-
id:
|
|
5910
|
+
id: "type",
|
|
5960
5911
|
desc: true
|
|
5961
5912
|
}
|
|
5962
5913
|
]
|
|
@@ -5984,7 +5935,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5984
5935
|
/*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
5985
5936
|
className: "dc-c-datatable",
|
|
5986
5937
|
style: {
|
|
5987
|
-
width:
|
|
5938
|
+
width: "100%"
|
|
5988
5939
|
},
|
|
5989
5940
|
stackable: true,
|
|
5990
5941
|
children: [
|
|
@@ -5995,18 +5946,17 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
5995
5946
|
return header.id === "titleResizable" ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $64a351d3fd8413c3$export$2e2bcd8739ae039), {
|
|
5996
5947
|
table: table,
|
|
5997
5948
|
header: header,
|
|
5998
|
-
setAriaLiveFeedback: setAriaLiveFeedback,
|
|
5999
5949
|
sortElement: sortElement,
|
|
6000
|
-
id:
|
|
5950
|
+
id: "dataDictionary_" + header.id
|
|
6001
5951
|
}, header.id + "_resize") : /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableCell), {
|
|
6002
5952
|
key: header.id,
|
|
6003
5953
|
className: `ds-u-border-y--2 ds-u-border--dark ds-u-border-x--0`,
|
|
6004
|
-
id:
|
|
5954
|
+
id: "dataDictionary_" + header.id,
|
|
6005
5955
|
children: [
|
|
6006
5956
|
(0, $hgUW1$flexRender)(header.column.columnDef.header, header.getContext()),
|
|
6007
|
-
header.id ===
|
|
5957
|
+
header.id === "type" && /*#__PURE__*/ (0, $hgUW1$jsx)("button", {
|
|
6008
5958
|
onClick: header.column.getToggleSortingHandler(),
|
|
6009
|
-
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` :
|
|
5959
|
+
className: header.column.getCanSort() ? `cursor-pointer select-none ds-u-focus-visible ${sortElement(header.column.getIsSorted())}` : "",
|
|
6010
5960
|
"aria-label": `${header.column.columnDef.header} sort order`
|
|
6011
5961
|
})
|
|
6012
5962
|
]
|
|
@@ -6021,12 +5971,12 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
6021
5971
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
6022
5972
|
key: cell.id,
|
|
6023
5973
|
style: {
|
|
6024
|
-
maxWidth: mobile ?
|
|
6025
|
-
whiteSpace: cell.column.id === "description" ?
|
|
5974
|
+
maxWidth: mobile ? "100%" : cell.column.getSize(),
|
|
5975
|
+
whiteSpace: cell.column.id === "description" ? "pre-wrap" : "normal"
|
|
6026
5976
|
},
|
|
6027
|
-
className: `${cell.column.id ===
|
|
6028
|
-
headers:
|
|
6029
|
-
stackedTitle: cell.column.id ===
|
|
5977
|
+
className: `${cell.column.id === "titleResizable" ? "ds-u-word-break" : ""}`,
|
|
5978
|
+
headers: "dataDictionary_" + cell.column.id,
|
|
5979
|
+
stackedTitle: cell.column.id === "titleResizable" ? "Title" : cell.column.columnDef.header,
|
|
6030
5980
|
children: (0, $hgUW1$flexRender)(cell.column.columnDef.cell, cell.getContext())
|
|
6031
5981
|
});
|
|
6032
5982
|
})
|
|
@@ -6035,12 +5985,6 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
6035
5985
|
})
|
|
6036
5986
|
]
|
|
6037
5987
|
}),
|
|
6038
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6039
|
-
className: "sr-only",
|
|
6040
|
-
"aria-live": "assertive",
|
|
6041
|
-
"aria-atomic": "true",
|
|
6042
|
-
children: ariaLiveFeedback
|
|
6043
|
-
}),
|
|
6044
5988
|
table.getRowModel().rows.length === 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
6045
5989
|
variation: "warn",
|
|
6046
5990
|
children: "No results found for the current filters"
|
|
@@ -6055,7 +5999,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
|
|
|
6055
5999
|
table.setPageIndex(page - 1);
|
|
6056
6000
|
},
|
|
6057
6001
|
renderHref: (page)=>`/page=${page}`
|
|
6058
|
-
}) :
|
|
6002
|
+
}) : ""
|
|
6059
6003
|
]
|
|
6060
6004
|
});
|
|
6061
6005
|
};
|
|
@@ -6065,17 +6009,17 @@ var $6765a74df807d015$export$2e2bcd8739ae039 = $6765a74df807d015$var$DataDiction
|
|
|
6065
6009
|
const $a24829b27758fe6c$var$SitewideDataDictionaryTable = ({ datasetDictionary: datasetDictionary, pageSize: pageSize })=>{
|
|
6066
6010
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
6067
6011
|
const tableColumns = [
|
|
6068
|
-
columnHelper.accessor(
|
|
6069
|
-
header:
|
|
6012
|
+
columnHelper.accessor("name", {
|
|
6013
|
+
header: "Name"
|
|
6070
6014
|
}),
|
|
6071
|
-
columnHelper.accessor(
|
|
6072
|
-
header:
|
|
6015
|
+
columnHelper.accessor("title", {
|
|
6016
|
+
header: "Title"
|
|
6073
6017
|
}),
|
|
6074
|
-
columnHelper.accessor(
|
|
6075
|
-
header:
|
|
6018
|
+
columnHelper.accessor("type", {
|
|
6019
|
+
header: "Type"
|
|
6076
6020
|
}),
|
|
6077
|
-
columnHelper.accessor(
|
|
6078
|
-
header:
|
|
6021
|
+
columnHelper.accessor("format", {
|
|
6022
|
+
header: "Format"
|
|
6079
6023
|
})
|
|
6080
6024
|
];
|
|
6081
6025
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6765a74df807d015$export$2e2bcd8739ae039), {
|
|
@@ -6119,7 +6063,7 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6119
6063
|
});
|
|
6120
6064
|
const columnHelper = (0, $hgUW1$createColumnHelper)();
|
|
6121
6065
|
const tableColumns = [
|
|
6122
|
-
columnHelper.accessor(
|
|
6066
|
+
columnHelper.accessor("titleResizable", {
|
|
6123
6067
|
header: ()=>/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6124
6068
|
className: "dc-c-tooltip-width-override",
|
|
6125
6069
|
children: [
|
|
@@ -6128,8 +6072,8 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6128
6072
|
title: "Title represents the column headers of the data file",
|
|
6129
6073
|
// @ts-ignore
|
|
6130
6074
|
style: {
|
|
6131
|
-
border:
|
|
6132
|
-
background:
|
|
6075
|
+
border: "none",
|
|
6076
|
+
background: "none"
|
|
6133
6077
|
},
|
|
6134
6078
|
maxWidth: "400px",
|
|
6135
6079
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TooltipIcon), {})
|
|
@@ -6139,48 +6083,48 @@ const $a6e312940f7003ef$var$DatasetDictionaryTable = ({ datasetDictionary: datas
|
|
|
6139
6083
|
size: 300,
|
|
6140
6084
|
minSize: 132
|
|
6141
6085
|
}),
|
|
6142
|
-
columnHelper.accessor(
|
|
6143
|
-
header:
|
|
6086
|
+
columnHelper.accessor("description", {
|
|
6087
|
+
header: "Description",
|
|
6144
6088
|
minSize: 600
|
|
6145
6089
|
}),
|
|
6146
|
-
columnHelper.accessor(
|
|
6147
|
-
header:
|
|
6090
|
+
columnHelper.accessor("type", {
|
|
6091
|
+
header: "Type",
|
|
6148
6092
|
size: 150,
|
|
6149
6093
|
enableResizing: false
|
|
6150
6094
|
})
|
|
6151
6095
|
];
|
|
6152
6096
|
const typeOptions = [
|
|
6153
6097
|
{
|
|
6154
|
-
value:
|
|
6155
|
-
label:
|
|
6098
|
+
value: "all",
|
|
6099
|
+
label: "All Types"
|
|
6156
6100
|
},
|
|
6157
6101
|
{
|
|
6158
|
-
value:
|
|
6159
|
-
label:
|
|
6102
|
+
value: "string",
|
|
6103
|
+
label: "String"
|
|
6160
6104
|
},
|
|
6161
6105
|
{
|
|
6162
|
-
value:
|
|
6163
|
-
label:
|
|
6106
|
+
value: "date",
|
|
6107
|
+
label: "Date"
|
|
6164
6108
|
},
|
|
6165
6109
|
{
|
|
6166
|
-
value:
|
|
6167
|
-
label:
|
|
6110
|
+
value: "datetime",
|
|
6111
|
+
label: "Datetime"
|
|
6168
6112
|
},
|
|
6169
6113
|
{
|
|
6170
|
-
value:
|
|
6171
|
-
label:
|
|
6114
|
+
value: "year",
|
|
6115
|
+
label: "Year"
|
|
6172
6116
|
},
|
|
6173
6117
|
{
|
|
6174
|
-
value:
|
|
6175
|
-
label:
|
|
6118
|
+
value: "integer",
|
|
6119
|
+
label: "Integer"
|
|
6176
6120
|
},
|
|
6177
6121
|
{
|
|
6178
|
-
value:
|
|
6179
|
-
label:
|
|
6122
|
+
value: "number",
|
|
6123
|
+
label: "Number"
|
|
6180
6124
|
},
|
|
6181
6125
|
{
|
|
6182
|
-
value:
|
|
6183
|
-
label:
|
|
6126
|
+
value: "boolean",
|
|
6127
|
+
label: "Boolean"
|
|
6184
6128
|
}
|
|
6185
6129
|
];
|
|
6186
6130
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
@@ -6287,7 +6231,7 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
|
|
|
6287
6231
|
href: datasetDictionaryEndpoint + "/csv",
|
|
6288
6232
|
className: "ds-c-button",
|
|
6289
6233
|
style: {
|
|
6290
|
-
width:
|
|
6234
|
+
width: "100%"
|
|
6291
6235
|
},
|
|
6292
6236
|
children: [
|
|
6293
6237
|
/*#__PURE__*/ (0, $hgUW1$jsx)("i", {
|
|
@@ -6344,7 +6288,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6344
6288
|
const [description, setDescription] = (0, $hgUW1$useState)("");
|
|
6345
6289
|
if (!distribution && !dataset?.identifier) return null;
|
|
6346
6290
|
(0, $hgUW1$useEffect)(()=>{
|
|
6347
|
-
let newDescription =
|
|
6291
|
+
let newDescription = "";
|
|
6348
6292
|
if (customDescription) newDescription = customDescription(dataset, distribution, resource);
|
|
6349
6293
|
else {
|
|
6350
6294
|
if (distribution.data && distribution.data.description) newDescription = distribution.data.description;
|
|
@@ -6359,7 +6303,7 @@ const $2bd73bb95b0c04ed$var$DatasetDescription = ({ distribution: distribution,
|
|
|
6359
6303
|
customDescription
|
|
6360
6304
|
]);
|
|
6361
6305
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6362
|
-
className:
|
|
6306
|
+
className: "ds-u-measure--wide ds-u-margin-bottom--7",
|
|
6363
6307
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6364
6308
|
className: "ds-u-margin-top--0 dc-c-metadata-description",
|
|
6365
6309
|
children: typeof description === "string" ? /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6383,7 +6327,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
6383
6327
|
],
|
|
6384
6328
|
queryFn: ()=>{
|
|
6385
6329
|
return fetch(`${dataDictionaryUrl}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA), {
|
|
6386
|
-
arrayFormat:
|
|
6330
|
+
arrayFormat: "comma",
|
|
6387
6331
|
encode: false
|
|
6388
6332
|
})}`).then((res)=>res.json());
|
|
6389
6333
|
}
|
|
@@ -6402,7 +6346,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6402
6346
|
conditions: []
|
|
6403
6347
|
};
|
|
6404
6348
|
const { dataset: dataset, isPending: isPending } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
6405
|
-
const title = dataset.title ? dataset.title :
|
|
6349
|
+
const title = dataset.title ? dataset.title : "";
|
|
6406
6350
|
const metadataMapping = {
|
|
6407
6351
|
...(0, $6da0396069e23175$export$bc27cf7ecf44639d),
|
|
6408
6352
|
...customMetadataMapping
|
|
@@ -6410,7 +6354,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6410
6354
|
let distribution = {};
|
|
6411
6355
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
6412
6356
|
if (distributions.length) distribution = distributions[0];
|
|
6413
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
6357
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
6414
6358
|
...options,
|
|
6415
6359
|
limit: defaultPageSize
|
|
6416
6360
|
}, {
|
|
@@ -6424,7 +6368,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6424
6368
|
}) : null;
|
|
6425
6369
|
(0, $hgUW1$useEffect)(()=>{
|
|
6426
6370
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6427
|
-
if (localFileFormat ===
|
|
6371
|
+
if (localFileFormat === "csv") resource.setResource(distribution.identifier);
|
|
6428
6372
|
}, [
|
|
6429
6373
|
distribution
|
|
6430
6374
|
]);
|
|
@@ -6479,26 +6423,26 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6479
6423
|
distribution,
|
|
6480
6424
|
window.location.hash
|
|
6481
6425
|
]);
|
|
6482
|
-
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType ===
|
|
6426
|
+
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === "application/vnd.tableschema+json" || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
6483
6427
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6484
6428
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
6485
6429
|
content: notFoundContent,
|
|
6486
6430
|
siteUrl: rootUrl
|
|
6487
6431
|
}) : /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6488
|
-
className:
|
|
6432
|
+
className: "ds-l-container",
|
|
6489
6433
|
children: [
|
|
6490
6434
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
6491
|
-
className:
|
|
6435
|
+
className: "ds-l-row",
|
|
6492
6436
|
children: [
|
|
6493
6437
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6494
|
-
className:
|
|
6438
|
+
className: "ds-l-md-col--9",
|
|
6495
6439
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
6496
6440
|
className: "ds-text-heading--3xl",
|
|
6497
6441
|
children: title
|
|
6498
6442
|
})
|
|
6499
6443
|
}),
|
|
6500
6444
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6501
|
-
className:
|
|
6445
|
+
className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
|
|
6502
6446
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
6503
6447
|
className: "ds-u-margin--0",
|
|
6504
6448
|
children: [
|
|
@@ -6510,7 +6454,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6510
6454
|
})
|
|
6511
6455
|
}),
|
|
6512
6456
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6513
|
-
className:
|
|
6457
|
+
className: "ds-l-md-col--9",
|
|
6514
6458
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
6515
6459
|
distribution: distribution,
|
|
6516
6460
|
dataset: dataset,
|
|
@@ -6522,9 +6466,9 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6522
6466
|
]
|
|
6523
6467
|
}),
|
|
6524
6468
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6525
|
-
className:
|
|
6469
|
+
className: "ds-l-row",
|
|
6526
6470
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
6527
|
-
className:
|
|
6471
|
+
className: "ds-l-md-col--12 dc-dataset",
|
|
6528
6472
|
children: !isPending && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Tabs), {
|
|
6529
6473
|
onChange: (selectedId, prevSelectedId)=>{
|
|
6530
6474
|
setSelectedTab(selectedId);
|
|
@@ -6532,7 +6476,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6532
6476
|
selectedId: selectedTab,
|
|
6533
6477
|
children: [
|
|
6534
6478
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6535
|
-
id:
|
|
6479
|
+
id: "data-table",
|
|
6536
6480
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6537
6481
|
className: "ds-u-color--primary",
|
|
6538
6482
|
children: [
|
|
@@ -6542,7 +6486,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6542
6486
|
"Data Table"
|
|
6543
6487
|
]
|
|
6544
6488
|
}),
|
|
6545
|
-
className: borderlessTabs ?
|
|
6489
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6546
6490
|
children: (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution) === "csv" ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
6547
6491
|
value: {
|
|
6548
6492
|
id: id,
|
|
@@ -6559,7 +6503,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6559
6503
|
})
|
|
6560
6504
|
}),
|
|
6561
6505
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6562
|
-
id:
|
|
6506
|
+
id: "overview",
|
|
6563
6507
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6564
6508
|
className: "ds-u-color--primary",
|
|
6565
6509
|
children: [
|
|
@@ -6569,7 +6513,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6569
6513
|
"Overview"
|
|
6570
6514
|
]
|
|
6571
6515
|
}),
|
|
6572
|
-
className: borderlessTabs ?
|
|
6516
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6573
6517
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $364dc44850cd8f7f$export$2e2bcd8739ae039), {
|
|
6574
6518
|
resource: resource,
|
|
6575
6519
|
dataset: dataset,
|
|
@@ -6579,7 +6523,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6579
6523
|
})
|
|
6580
6524
|
}),
|
|
6581
6525
|
!hideDataDictionary && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6582
|
-
id:
|
|
6526
|
+
id: "data-dictionary",
|
|
6583
6527
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6584
6528
|
className: "ds-u-color--primary",
|
|
6585
6529
|
children: [
|
|
@@ -6589,7 +6533,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6589
6533
|
"Data Dictionary"
|
|
6590
6534
|
]
|
|
6591
6535
|
}),
|
|
6592
|
-
className: borderlessTabs ?
|
|
6536
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6593
6537
|
children: displayDataDictionaryTab ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
|
|
6594
6538
|
datasetSitewideDictionary: datasetSitewideDictionary,
|
|
6595
6539
|
datasetDictionaryEndpoint: distribution.data.describedBy,
|
|
@@ -6600,7 +6544,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6600
6544
|
})
|
|
6601
6545
|
}),
|
|
6602
6546
|
distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
|
|
6603
|
-
id:
|
|
6547
|
+
id: "api",
|
|
6604
6548
|
tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
6605
6549
|
className: "ds-u-color--primary",
|
|
6606
6550
|
children: [
|
|
@@ -6610,7 +6554,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6610
6554
|
"API"
|
|
6611
6555
|
]
|
|
6612
6556
|
}),
|
|
6613
|
-
className: borderlessTabs ?
|
|
6557
|
+
className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
|
|
6614
6558
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $cf6eaefd6b928de3$export$2e2bcd8739ae039), {
|
|
6615
6559
|
id: id,
|
|
6616
6560
|
rootUrl: rootUrl,
|
|
@@ -6647,13 +6591,13 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6647
6591
|
});
|
|
6648
6592
|
const menu = (0, $hgUW1$useRef)(null);
|
|
6649
6593
|
function closeMobileMenu() {
|
|
6650
|
-
const mobileMenuButtonElement = document.querySelector(
|
|
6594
|
+
const mobileMenuButtonElement = document.querySelector(".dkan-c-mobile-menu-button");
|
|
6651
6595
|
if (!mobileMenuButtonElement) return;
|
|
6652
6596
|
mobileMenuButtonElement.focus();
|
|
6653
6597
|
}
|
|
6654
6598
|
// Close mobile menu with escape.
|
|
6655
6599
|
function handleMenuClose(event) {
|
|
6656
|
-
if (event.key ===
|
|
6600
|
+
if (event.key === "Escape" && mobileMenuOpen) setMobileMenuOpen(false);
|
|
6657
6601
|
}
|
|
6658
6602
|
function handleClick(event) {
|
|
6659
6603
|
// Links are wrapped in spans, this checks if the parent is an A, also check if in the search modal.
|
|
@@ -6688,7 +6632,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6688
6632
|
const focusableEls = getFocusableElements(menu.current).selectors.visible;
|
|
6689
6633
|
const firstEl = focusableEls[0];
|
|
6690
6634
|
const lastEl = focusableEls[focusableEls.length - 1];
|
|
6691
|
-
if (event.key ===
|
|
6635
|
+
if (event.key === "Tab") {
|
|
6692
6636
|
if (event.shiftKey && document.activeElement === firstEl) {
|
|
6693
6637
|
lastEl?.focus();
|
|
6694
6638
|
event.preventDefault();
|
|
@@ -6700,15 +6644,15 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6700
6644
|
}
|
|
6701
6645
|
};
|
|
6702
6646
|
(0, $hgUW1$useEffect)(()=>{
|
|
6703
|
-
document.addEventListener(
|
|
6704
|
-
document.addEventListener(
|
|
6647
|
+
document.addEventListener("keyup", handleMenuClose);
|
|
6648
|
+
document.addEventListener("mousedown", handleClick);
|
|
6705
6649
|
if (mobileMenuOpen) handleFocusIn();
|
|
6706
6650
|
else closeMobileMenu();
|
|
6707
|
-
if (menu.current) menu.current.addEventListener(
|
|
6651
|
+
if (menu.current) menu.current.addEventListener("keydown", (evt)=>trapFocus(evt));
|
|
6708
6652
|
return ()=>{
|
|
6709
|
-
document.removeEventListener(
|
|
6710
|
-
document.addEventListener(
|
|
6711
|
-
if (menu.current) menu.current.removeEventListener(
|
|
6653
|
+
document.removeEventListener("keyup", handleMenuClose);
|
|
6654
|
+
document.addEventListener("mousedown", handleClick);
|
|
6655
|
+
if (menu.current) menu.current.removeEventListener("keydown", trapFocus);
|
|
6712
6656
|
};
|
|
6713
6657
|
}, [
|
|
6714
6658
|
mobileMenuOpen
|
|
@@ -6723,7 +6667,7 @@ const $b9af6ce5e2c06331$var$Header = (props)=>{
|
|
|
6723
6667
|
},
|
|
6724
6668
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("header", {
|
|
6725
6669
|
"aria-label": "Site header",
|
|
6726
|
-
className: `dkan-c-header dkan-c-header--${mobileMax ?
|
|
6670
|
+
className: `dkan-c-header dkan-c-header--${mobileMax ? "mobile" : "desktop"}`,
|
|
6727
6671
|
children: [
|
|
6728
6672
|
topNav && topNav,
|
|
6729
6673
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -6762,7 +6706,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6762
6706
|
onClick: clickHandler ? clickHandler : undefined,
|
|
6763
6707
|
children: [
|
|
6764
6708
|
innerHtml,
|
|
6765
|
-
link?.target ===
|
|
6709
|
+
link?.target === "_blank" && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ExternalLinkIcon), {
|
|
6766
6710
|
className: "ds-u-margin-left--05 ds-c-external-link-icon"
|
|
6767
6711
|
})
|
|
6768
6712
|
]
|
|
@@ -6772,7 +6716,7 @@ const $24918217e48ac525$var$NavLink = ({ link: link, className: className = null
|
|
|
6772
6716
|
var $24918217e48ac525$export$2e2bcd8739ae039 = $24918217e48ac525$var$NavLink;
|
|
6773
6717
|
|
|
6774
6718
|
|
|
6775
|
-
const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = true, emailTitle: emailTitle =
|
|
6719
|
+
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", {
|
|
6776
6720
|
children: [
|
|
6777
6721
|
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
6778
6722
|
children: "A federal government website managed and paid for by the U.S. Centers for Medicare & Medicaid Services."
|
|
@@ -6860,14 +6804,14 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6860
6804
|
/*#__PURE__*/ (0, $hgUW1$jsx)("ul", {
|
|
6861
6805
|
className: "ds-u-font-size--sm",
|
|
6862
6806
|
children: footerAdditionalResourcesLinks.filter((link)=>{
|
|
6863
|
-
const noOnClick = Object.keys(link).findIndex((l)=>l ===
|
|
6807
|
+
const noOnClick = Object.keys(link).findIndex((l)=>l === "onClick");
|
|
6864
6808
|
if (noOnClick === -1 || link.onClick && link.dataTag) return link;
|
|
6865
6809
|
}).map((link)=>{
|
|
6866
6810
|
if (link.onClick && link.dataTag) return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
6867
6811
|
className: "ds-u-margin-bottom--1",
|
|
6868
6812
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("a", {
|
|
6869
6813
|
href: link.url,
|
|
6870
|
-
[
|
|
6814
|
+
["data-" + link.dataTag.name]: link.dataTag.value,
|
|
6871
6815
|
onClick: link.onClick,
|
|
6872
6816
|
children: link.label
|
|
6873
6817
|
})
|
|
@@ -6967,7 +6911,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
6967
6911
|
children: [
|
|
6968
6912
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
6969
6913
|
id: "svg-inline--fa-title-iRCARP7h6Kp3",
|
|
6970
|
-
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title :
|
|
6914
|
+
children: socialMediaLinks.facebook.title ? socialMediaLinks.facebook.title : "CMS Facebook"
|
|
6971
6915
|
}),
|
|
6972
6916
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
6973
6917
|
transform: "translate(160 256)",
|
|
@@ -7020,7 +6964,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7020
6964
|
children: [
|
|
7021
6965
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7022
6966
|
id: "svg-inline--fa-title-4z03ITiPPTVF",
|
|
7023
|
-
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title :
|
|
6967
|
+
children: socialMediaLinks.twitter.title ? socialMediaLinks.twitter.title : "CMS Twitter"
|
|
7024
6968
|
}),
|
|
7025
6969
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
7026
6970
|
transform: "translate(256 256)",
|
|
@@ -7073,7 +7017,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7073
7017
|
children: [
|
|
7074
7018
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7075
7019
|
id: "svg-inline--fa-title-Nm2qsuSKvuRZ",
|
|
7076
|
-
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title :
|
|
7020
|
+
children: socialMediaLinks.linkedin.title ? socialMediaLinks.linkedin.title : "CMS LinkedIn"
|
|
7077
7021
|
}),
|
|
7078
7022
|
/*#__PURE__*/ (0, $hgUW1$jsx)("g", {
|
|
7079
7023
|
transform: "translate(224 256)",
|
|
@@ -7125,7 +7069,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7125
7069
|
children: [
|
|
7126
7070
|
/*#__PURE__*/ (0, $hgUW1$jsx)("title", {
|
|
7127
7071
|
id: "svg-inline--fa-title-youtube",
|
|
7128
|
-
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title :
|
|
7072
|
+
children: socialMediaLinks.youtube.title ? socialMediaLinks.youtube.title : "CMS youtube"
|
|
7129
7073
|
}),
|
|
7130
7074
|
/*#__PURE__*/ (0, $hgUW1$jsx)("path", {
|
|
7131
7075
|
fill: "currentColor",
|
|
@@ -7160,7 +7104,7 @@ const $a6df0aa147323304$var$Footer = ({ links: links, showEmail: showEmail = tru
|
|
|
7160
7104
|
className: "ds-u-margin-right--2",
|
|
7161
7105
|
children: [
|
|
7162
7106
|
link.label,
|
|
7163
|
-
link?.target ===
|
|
7107
|
+
link?.target === "_blank" && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$ExternalLinkIcon), {
|
|
7164
7108
|
className: "ds-u-margin-left--05 ds-c-external-link-icon"
|
|
7165
7109
|
})
|
|
7166
7110
|
]
|
|
@@ -7230,26 +7174,26 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7230
7174
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
7231
7175
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Table), {
|
|
7232
7176
|
stackable: true,
|
|
7233
|
-
className:
|
|
7177
|
+
className: "ds-c-table",
|
|
7234
7178
|
children: [
|
|
7235
7179
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableHead), {
|
|
7236
7180
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TableRow), {
|
|
7237
7181
|
children: [
|
|
7238
7182
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7239
|
-
id:
|
|
7240
|
-
headers:
|
|
7183
|
+
id: "application",
|
|
7184
|
+
headers: "Application",
|
|
7241
7185
|
children: "Application"
|
|
7242
|
-
},
|
|
7186
|
+
}, "Application"),
|
|
7243
7187
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7244
|
-
id:
|
|
7245
|
-
headers:
|
|
7188
|
+
id: "notes",
|
|
7189
|
+
headers: "Notes",
|
|
7246
7190
|
children: "Notes"
|
|
7247
|
-
},
|
|
7191
|
+
}, "Notes"),
|
|
7248
7192
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7249
|
-
id:
|
|
7250
|
-
headers:
|
|
7193
|
+
id: "links",
|
|
7194
|
+
headers: "Links",
|
|
7251
7195
|
children: "Links"
|
|
7252
|
-
},
|
|
7196
|
+
}, "Links")
|
|
7253
7197
|
]
|
|
7254
7198
|
})
|
|
7255
7199
|
}),
|
|
@@ -7259,19 +7203,19 @@ const $5655284dbbb89508$var$DocumentationTable = (props)=>{
|
|
|
7259
7203
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7260
7204
|
id: d.id,
|
|
7261
7205
|
stackedTitle: "Application",
|
|
7262
|
-
headers:
|
|
7206
|
+
headers: "Application",
|
|
7263
7207
|
children: d.application
|
|
7264
7208
|
}, d.id),
|
|
7265
7209
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7266
7210
|
id: d.id,
|
|
7267
7211
|
stackedTitle: "Notes",
|
|
7268
|
-
headers:
|
|
7212
|
+
headers: "Notes",
|
|
7269
7213
|
children: d.notes
|
|
7270
7214
|
}, `${d.id}-notes`),
|
|
7271
7215
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TableCell), {
|
|
7272
7216
|
id: d.id,
|
|
7273
7217
|
stackedTitle: "Links",
|
|
7274
|
-
headers:
|
|
7218
|
+
headers: "Links",
|
|
7275
7219
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("a", {
|
|
7276
7220
|
className: "dkan-newtab",
|
|
7277
7221
|
href: d.link,
|
|
@@ -7299,44 +7243,44 @@ var $5655284dbbb89508$export$2e2bcd8739ae039 = $5655284dbbb89508$var$Documentati
|
|
|
7299
7243
|
|
|
7300
7244
|
const $c7bf75f7e8a68780$export$7850f4d545d994c6 = [
|
|
7301
7245
|
{
|
|
7302
|
-
id:
|
|
7303
|
-
application:
|
|
7304
|
-
notes:
|
|
7305
|
-
link:
|
|
7306
|
-
linkText:
|
|
7307
|
-
screenReaderOnlyText:
|
|
7246
|
+
id: "excel",
|
|
7247
|
+
application: "Microsoft Excel",
|
|
7248
|
+
notes: "Official size limitations for Microsoft Excel",
|
|
7249
|
+
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",
|
|
7250
|
+
linkText: "Excel Specifications and Limits",
|
|
7251
|
+
screenReaderOnlyText: "on microsoft.com"
|
|
7308
7252
|
},
|
|
7309
7253
|
{
|
|
7310
|
-
id:
|
|
7311
|
-
application:
|
|
7312
|
-
notes:
|
|
7313
|
-
link:
|
|
7314
|
-
linkText:
|
|
7315
|
-
screenReaderOnlyText:
|
|
7254
|
+
id: "access",
|
|
7255
|
+
application: "Microsoft Access",
|
|
7256
|
+
notes: "Official size limitations for Microsoft Access",
|
|
7257
|
+
link: "https://support.microsoft.com/en-us/office/access-specifications-0cf3c66f-9cf2-4e32-9568-98c1025bb47c?ui=en-us&rs=en-us&ad=us",
|
|
7258
|
+
linkText: "Access 2016 Specifications",
|
|
7259
|
+
screenReaderOnlyText: "on microsoft.com"
|
|
7316
7260
|
},
|
|
7317
7261
|
{
|
|
7318
|
-
id:
|
|
7319
|
-
application:
|
|
7320
|
-
notes:
|
|
7321
|
-
link:
|
|
7322
|
-
linkText:
|
|
7323
|
-
screenReaderOnlyText:
|
|
7262
|
+
id: "oracle-sql-developer",
|
|
7263
|
+
application: "Oracle SQL Developer",
|
|
7264
|
+
notes: "Oracle SQL Developer tool",
|
|
7265
|
+
link: "https://www.oracle.com/database/sqldeveloper/",
|
|
7266
|
+
linkText: "Oracle SQL Developer Overview",
|
|
7267
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7324
7268
|
},
|
|
7325
7269
|
{
|
|
7326
|
-
id:
|
|
7327
|
-
application:
|
|
7328
|
-
notes:
|
|
7329
|
-
link:
|
|
7330
|
-
linkText:
|
|
7331
|
-
screenReaderOnlyText:
|
|
7270
|
+
id: "oracle-database",
|
|
7271
|
+
application: "Oracle Database",
|
|
7272
|
+
notes: "Oracle Database official size limitations",
|
|
7273
|
+
link: "https://docs.oracle.com/cd/B28359_01/server.111/b28320/limits002.htm#i287915",
|
|
7274
|
+
linkText: "Oracle Physical Database Limits",
|
|
7275
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7332
7276
|
},
|
|
7333
7277
|
{
|
|
7334
|
-
id:
|
|
7335
|
-
application:
|
|
7336
|
-
notes:
|
|
7337
|
-
link:
|
|
7338
|
-
linkText:
|
|
7339
|
-
screenReaderOnlyText:
|
|
7278
|
+
id: "oracle-sql-client-tools",
|
|
7279
|
+
application: "Oracle SQL Client Tools",
|
|
7280
|
+
notes: "Oracle SQL Client Tools",
|
|
7281
|
+
link: "https://www.oracle.com/database/technologies/oracle-database-software-downloads.html",
|
|
7282
|
+
linkText: "Oracle SQL Client",
|
|
7283
|
+
screenReaderOnlyText: "on oracle.com"
|
|
7340
7284
|
}
|
|
7341
7285
|
];
|
|
7342
7286
|
|
|
@@ -7364,7 +7308,7 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7364
7308
|
}),
|
|
7365
7309
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
7366
7310
|
heading: "Notice",
|
|
7367
|
-
className:
|
|
7311
|
+
className: "ds-u-margin-top--6",
|
|
7368
7312
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
7369
7313
|
className: "ds-c-alert__text",
|
|
7370
7314
|
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."
|
|
@@ -7373,16 +7317,16 @@ const $669d2782ec2e2250$var$SpecsAndLimits = (props)=>{
|
|
|
7373
7317
|
]
|
|
7374
7318
|
}),
|
|
7375
7319
|
/*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7376
|
-
className:
|
|
7320
|
+
className: "ds-u-margin-top--4 ds-l-row",
|
|
7377
7321
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7378
|
-
className:
|
|
7322
|
+
className: "ds-l-col--12",
|
|
7379
7323
|
children: [
|
|
7380
7324
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
7381
7325
|
className: "ds-text-heading--2xl ds-text-heading--2xl",
|
|
7382
7326
|
children: "Documentation by Application"
|
|
7383
7327
|
}),
|
|
7384
7328
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7385
|
-
className:
|
|
7329
|
+
className: "ds-u-margin-top--4",
|
|
7386
7330
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $5655284dbbb89508$export$2e2bcd8739ae039), {
|
|
7387
7331
|
data: documentationList
|
|
7388
7332
|
})
|
|
@@ -7410,7 +7354,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7410
7354
|
const options = {
|
|
7411
7355
|
conditions: query ? JSON.parse(query).map(({ column: column, operator: operator, ...rest })=>({
|
|
7412
7356
|
property: column,
|
|
7413
|
-
operator: operator ===
|
|
7357
|
+
operator: operator === "is" ? "=" : operator === "is not" ? "<>" : operator === "or" ? "in" : operator,
|
|
7414
7358
|
...rest
|
|
7415
7359
|
})) : []
|
|
7416
7360
|
};
|
|
@@ -7418,13 +7362,13 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7418
7362
|
let distribution = {};
|
|
7419
7363
|
let distributions = dataset.distribution ? dataset.distribution : [];
|
|
7420
7364
|
if (distributions.length) distribution = distributions[distributionIndex];
|
|
7421
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7365
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
7422
7366
|
...options,
|
|
7423
7367
|
limit: defaultPageSize
|
|
7424
7368
|
});
|
|
7425
7369
|
(0, $hgUW1$useEffect)(()=>{
|
|
7426
7370
|
const localFileFormat = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
7427
|
-
if (localFileFormat ===
|
|
7371
|
+
if (localFileFormat === "csv") resource.setResource(distribution.identifier);
|
|
7428
7372
|
}, [
|
|
7429
7373
|
distribution
|
|
7430
7374
|
]);
|
|
@@ -7474,7 +7418,7 @@ function $8b67b7ee3fcfb629$export$2e2bcd8739ae039({ id: id, rootUrl: rootUrl, cu
|
|
|
7474
7418
|
|
|
7475
7419
|
|
|
7476
7420
|
function $374c4669b044ddf8$var$getStartDate(condition, schema, id) {
|
|
7477
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7421
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
7478
7422
|
const newDate = new Date(condition.value);
|
|
7479
7423
|
if (newDate instanceof Date && !isNaN(newDate)) return newDate;
|
|
7480
7424
|
}
|
|
@@ -7491,9 +7435,9 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7491
7435
|
const [startDate, setStartDate] = (0, $hgUW1$react).useState($374c4669b044ddf8$var$getStartDate(condition, schema, id));
|
|
7492
7436
|
(0, $hgUW1$useEffect)(()=>{
|
|
7493
7437
|
if (property !== condition.property) {
|
|
7494
|
-
if (property) update(index,
|
|
7495
|
-
else update(index,
|
|
7496
|
-
if (schema[id].fields[condition.property].mysql_type ===
|
|
7438
|
+
if (property) update(index, "property", property);
|
|
7439
|
+
else update(index, "property", "");
|
|
7440
|
+
if (schema[id].fields[condition.property].mysql_type === "date") {
|
|
7497
7441
|
if (!value) setValue(startDate.toJSON().slice(0, 10));
|
|
7498
7442
|
}
|
|
7499
7443
|
}
|
|
@@ -7507,16 +7451,16 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7507
7451
|
]);
|
|
7508
7452
|
(0, $hgUW1$useEffect)(()=>{
|
|
7509
7453
|
if (operator !== condition.operator) {
|
|
7510
|
-
if (operator) update(index,
|
|
7511
|
-
else update(index,
|
|
7454
|
+
if (operator) update(index, "operator", operator);
|
|
7455
|
+
else update(index, "operator", "");
|
|
7512
7456
|
}
|
|
7513
7457
|
}, [
|
|
7514
7458
|
operator
|
|
7515
7459
|
]);
|
|
7516
7460
|
(0, $hgUW1$useEffect)(()=>{
|
|
7517
7461
|
if (value !== condition.value) {
|
|
7518
|
-
if (value) update(index,
|
|
7519
|
-
else update(index,
|
|
7462
|
+
if (value) update(index, "value", value);
|
|
7463
|
+
else update(index, "value", "");
|
|
7520
7464
|
}
|
|
7521
7465
|
}, [
|
|
7522
7466
|
value
|
|
@@ -7540,7 +7484,7 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id, condition: condition, index: i
|
|
|
7540
7484
|
onChange: (e)=>setOperator(e.target.value),
|
|
7541
7485
|
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"
|
|
7542
7486
|
}),
|
|
7543
|
-
schema[id].fields[property].mysql_type ===
|
|
7487
|
+
schema[id].fields[property].mysql_type === "date" ? /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7544
7488
|
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",
|
|
7545
7489
|
children: [
|
|
7546
7490
|
/*#__PURE__*/ (0, $hgUW1$jsx)("label", {
|
|
@@ -7630,12 +7574,12 @@ const $bef7bff2823feea2$var$QueryTitle = ({ conditions: conditions, schema: sche
|
|
|
7630
7574
|
className: "ds-u-font-weight--bold",
|
|
7631
7575
|
children: description
|
|
7632
7576
|
}),
|
|
7633
|
-
|
|
7577
|
+
" ",
|
|
7634
7578
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7635
7579
|
className: "ds-u-font-weight--normal",
|
|
7636
7580
|
children: operator.label.toUpperCase()
|
|
7637
7581
|
}),
|
|
7638
|
-
|
|
7582
|
+
" ",
|
|
7639
7583
|
/*#__PURE__*/ (0, $hgUW1$jsx)("span", {
|
|
7640
7584
|
className: "ds-u-color--success",
|
|
7641
7585
|
children: formattedText
|
|
@@ -7662,19 +7606,19 @@ var $bef7bff2823feea2$export$2e2bcd8739ae039 = $bef7bff2823feea2$var$QueryTitle;
|
|
|
7662
7606
|
function $3b6ca952e79f0695$var$updateQueryForDatastore(condition) {
|
|
7663
7607
|
let cond = condition;
|
|
7664
7608
|
delete cond.key;
|
|
7665
|
-
if (cond.operator ===
|
|
7609
|
+
if (cond.operator === "=" || cond.operator === "<>") {
|
|
7666
7610
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7667
|
-
cond.value = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7611
|
+
cond.value = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
7668
7612
|
}
|
|
7669
|
-
if (cond.operator.toLowerCase() ===
|
|
7613
|
+
if (cond.operator.toLowerCase() === "like") {
|
|
7670
7614
|
if (Array.isArray(cond.value)) cond.value = cond.value.join();
|
|
7671
|
-
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm,
|
|
7615
|
+
const cleanedValue = cond.value.replace(/(^\%+|\%+$)/gm, "");
|
|
7672
7616
|
cond.value = `%${cleanedValue}%`;
|
|
7673
7617
|
}
|
|
7674
|
-
if (cond.operator.toLowerCase() ===
|
|
7675
|
-
if (!Array.isArray(cond.value)) cond.value = cond.value.split(
|
|
7618
|
+
if (cond.operator.toLowerCase() === "in") {
|
|
7619
|
+
if (!Array.isArray(cond.value)) cond.value = cond.value.split(",");
|
|
7676
7620
|
}
|
|
7677
|
-
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm,
|
|
7621
|
+
if (Array.isArray(cond.value)) cond.value = cond.value.map((v)=>v.trim().replace(/(^\%+|\%+$)/gm, ""));
|
|
7678
7622
|
return cond;
|
|
7679
7623
|
}
|
|
7680
7624
|
const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, customColumns: customColumns, setOffset: setOffset })=>{
|
|
@@ -7694,7 +7638,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7694
7638
|
...queryConditions,
|
|
7695
7639
|
{
|
|
7696
7640
|
property: fields[0],
|
|
7697
|
-
value:
|
|
7641
|
+
value: "",
|
|
7698
7642
|
operator: (0, $7264a673914aa746$export$2b9377795161999)(schema[id].fields[fields[0]].mysql_type)[0].value,
|
|
7699
7643
|
key: Date.now()
|
|
7700
7644
|
}
|
|
@@ -7734,7 +7678,7 @@ const $3b6ca952e79f0695$var$QueryBuilder = ({ resource: resource, id: id, custom
|
|
|
7734
7678
|
encodeValuesOnly: true,
|
|
7735
7679
|
addQueryPrefix: true
|
|
7736
7680
|
});
|
|
7737
|
-
window.history.pushState({},
|
|
7681
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
7738
7682
|
};
|
|
7739
7683
|
const updateCondition = (index, key, value)=>{
|
|
7740
7684
|
let newConditions = [
|
|
@@ -7807,7 +7751,7 @@ var $3b6ca952e79f0695$export$2e2bcd8739ae039 = $3b6ca952e79f0695$var$QueryBuilde
|
|
|
7807
7751
|
|
|
7808
7752
|
|
|
7809
7753
|
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 })=>{
|
|
7810
|
-
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState(
|
|
7754
|
+
const [tablePadding, setTablePadding] = (0, $hgUW1$react).useState("ds-u-padding-y--1");
|
|
7811
7755
|
let apiDocs = (0, $hgUW1$useRef)();
|
|
7812
7756
|
let distribution = {};
|
|
7813
7757
|
let distribution_array = dataset.distribution ? dataset.distribution : [];
|
|
@@ -7819,7 +7763,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7819
7763
|
} : {
|
|
7820
7764
|
conditions: []
|
|
7821
7765
|
};
|
|
7822
|
-
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)(
|
|
7766
|
+
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
7823
7767
|
...options,
|
|
7824
7768
|
limit: 25
|
|
7825
7769
|
}, {
|
|
@@ -7835,7 +7779,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7835
7779
|
}, {
|
|
7836
7780
|
encode: true
|
|
7837
7781
|
})}&format=csv`;
|
|
7838
|
-
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !==
|
|
7782
|
+
const pageTitle = distribution.data.title && distribution.data.title.toLowerCase() !== "csv" ? distribution.data.title : dataset.title;
|
|
7839
7783
|
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
7840
7784
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
|
|
7841
7785
|
className: "ds-l-container ds-u-padding-bottom--3 ds-u-margin-bottom--2",
|
|
@@ -7844,7 +7788,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7844
7788
|
children: Object.keys(distribution).length && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
7845
7789
|
children: [
|
|
7846
7790
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7847
|
-
className:
|
|
7791
|
+
className: "ds-l-md-col--9",
|
|
7848
7792
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Link), {
|
|
7849
7793
|
to: `/dataset/${id}`,
|
|
7850
7794
|
className: "ds-u-padding-y--4 ds-u-display--block",
|
|
@@ -7855,14 +7799,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7855
7799
|
})
|
|
7856
7800
|
}),
|
|
7857
7801
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7858
|
-
className:
|
|
7802
|
+
className: "ds-l-md-col--9",
|
|
7859
7803
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("h1", {
|
|
7860
7804
|
className: "ds-text-heading--3xl",
|
|
7861
7805
|
children: customTitle ? customTitle : pageTitle
|
|
7862
7806
|
})
|
|
7863
7807
|
}),
|
|
7864
7808
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7865
|
-
className:
|
|
7809
|
+
className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
|
|
7866
7810
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
7867
7811
|
className: "ds-u-margin--0",
|
|
7868
7812
|
children: [
|
|
@@ -7874,7 +7818,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7874
7818
|
})
|
|
7875
7819
|
}),
|
|
7876
7820
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7877
|
-
className:
|
|
7821
|
+
className: "ds-l-md-col--9",
|
|
7878
7822
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $2bd73bb95b0c04ed$export$2e2bcd8739ae039), {
|
|
7879
7823
|
distribution: distribution,
|
|
7880
7824
|
dataset: dataset,
|
|
@@ -7884,13 +7828,13 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7884
7828
|
})
|
|
7885
7829
|
}),
|
|
7886
7830
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7887
|
-
className:
|
|
7831
|
+
className: "ds-l-md-col--12",
|
|
7888
7832
|
children: Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $3b6ca952e79f0695$export$2e2bcd8739ae039), {
|
|
7889
7833
|
resource: resource,
|
|
7890
7834
|
id: distribution.identifier,
|
|
7891
7835
|
customColumns: customColumns,
|
|
7892
7836
|
setOffset: resource.setOffset
|
|
7893
|
-
}) :
|
|
7837
|
+
}) : ""
|
|
7894
7838
|
}),
|
|
7895
7839
|
Object.keys(resource).length && resource.columns && Object.keys(resource.schema).length ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $43a30d745a7bbc86$export$2e2bcd8739ae039).Provider, {
|
|
7896
7840
|
value: {
|
|
@@ -7901,7 +7845,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7901
7845
|
customColumns: (0, $7264a673914aa746$export$8049e8f40a9bdfb8)(customColumns, resource.columns, resource.schema[distribution_array[distIndex].identifier])
|
|
7902
7846
|
},
|
|
7903
7847
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7904
|
-
className:
|
|
7848
|
+
className: "ds-l-md-col--12",
|
|
7905
7849
|
children: [
|
|
7906
7850
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $af099c546cb226c7$export$2e2bcd8739ae039), {
|
|
7907
7851
|
includeDensity: true,
|
|
@@ -7923,14 +7867,14 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7923
7867
|
]
|
|
7924
7868
|
})
|
|
7925
7869
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
7926
|
-
className:
|
|
7870
|
+
className: "ds-l-md-col--12",
|
|
7927
7871
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Spinner), {
|
|
7928
7872
|
role: "status",
|
|
7929
7873
|
"aria-valuetext": "Resource loading"
|
|
7930
7874
|
})
|
|
7931
7875
|
}),
|
|
7932
7876
|
dataset.identifier && /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
7933
|
-
className:
|
|
7877
|
+
className: "ds-l-md-col--12",
|
|
7934
7878
|
ref: apiDocs,
|
|
7935
7879
|
children: [
|
|
7936
7880
|
/*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
|
|
@@ -7939,7 +7883,7 @@ const $dd6eb2b30d7ad75d$var$FilteredResourceBody = ({ id: id, dataset: dataset,
|
|
|
7939
7883
|
}),
|
|
7940
7884
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$swaggeruireact), {
|
|
7941
7885
|
url: `${rootUrl}/metastore/schemas/dataset/items/${dataset.identifier}/docs?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`,
|
|
7942
|
-
docExpansion:
|
|
7886
|
+
docExpansion: "list",
|
|
7943
7887
|
defaultModelsExpandDepth: -1
|
|
7944
7888
|
})
|
|
7945
7889
|
]
|
|
@@ -7958,7 +7902,7 @@ const $f61ecf9f84951a61$var$FilteredResource = ({ id: id, dist_id: dist_id, loca
|
|
|
7958
7902
|
const [ready, setReady] = (0, $hgUW1$useState)(false);
|
|
7959
7903
|
const [error, setError] = (0, $hgUW1$useState)(false);
|
|
7960
7904
|
const { dataset: dataset } = (0, $b4aa9c66f2e86959$export$2e2bcd8739ae039)(id, rootUrl);
|
|
7961
|
-
const distIndex = dist_id ===
|
|
7905
|
+
const distIndex = dist_id === "data" ? 0 : dist_id;
|
|
7962
7906
|
(0, $hgUW1$useEffect)(()=>{
|
|
7963
7907
|
if (dataset.error) setError(true);
|
|
7964
7908
|
if (dataset.distribution && dataset.distribution.length) {
|