@civicactions/cmsds-open-data-components 4.0.9-alpha.1 → 4.0.9-alpha.2
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.js +140 -128
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +26 -26
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -1
- package/scripts/generate-usage-report.cjs +0 -0
package/dist/main.js
CHANGED
|
@@ -4544,42 +4544,6 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4544
4544
|
window.history.pushState({}, "", `${url.origin}${url.pathname}${urlString}`);
|
|
4545
4545
|
}
|
|
4546
4546
|
const pageSize = defaultPageSize;
|
|
4547
|
-
(0, $hgUW1$useEffect)(()=>{
|
|
4548
|
-
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4549
|
-
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4550
|
-
const endingNumber = Number(pageSize) * Number(page);
|
|
4551
|
-
setCurrentResultNumbers({
|
|
4552
|
-
total: Number(totalItems),
|
|
4553
|
-
startingNumber: Number(totalItems) >= startingNumber ? startingNumber : 0,
|
|
4554
|
-
endingNumber: Number(totalItems) < endingNumber ? Number(totalItems) : endingNumber
|
|
4555
|
-
});
|
|
4556
|
-
setTimeout(()=>{
|
|
4557
|
-
setAnnouncementText(`Showing ${startingNumber} to ${endingNumber} of ${totalItems} datasets`);
|
|
4558
|
-
}, 100);
|
|
4559
|
-
if (totalItems <= 0 && currentResultNumbers !== null) setNoResults(true);
|
|
4560
|
-
else setNoResults(false);
|
|
4561
|
-
}, [
|
|
4562
|
-
totalItems,
|
|
4563
|
-
pageSize,
|
|
4564
|
-
page
|
|
4565
|
-
]);
|
|
4566
|
-
(0, $hgUW1$useEffect)(()=>{
|
|
4567
|
-
if (page !== 1 && (transformedParams.fulltext !== fulltext || transformedParams.selectedFacets !== selectedFacets)) setPage(1);
|
|
4568
|
-
}, [
|
|
4569
|
-
fulltext,
|
|
4570
|
-
selectedFacets
|
|
4571
|
-
]);
|
|
4572
|
-
(0, $hgUW1$useEffect)(()=>{
|
|
4573
|
-
if (totalItems !== null && totalItems !== undefined && totalItems > 0) {
|
|
4574
|
-
var params = buildSearchParams(true);
|
|
4575
|
-
if (params !== location.search) setSearchParams(params);
|
|
4576
|
-
}
|
|
4577
|
-
}, [
|
|
4578
|
-
page,
|
|
4579
|
-
sort,
|
|
4580
|
-
sortOrder,
|
|
4581
|
-
totalItems
|
|
4582
|
-
]);
|
|
4583
4547
|
function resetFilters() {
|
|
4584
4548
|
setFullText(defaultFulltext);
|
|
4585
4549
|
setFilterText(defaultFulltext);
|
|
@@ -4627,6 +4591,50 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4627
4591
|
theme: null,
|
|
4628
4592
|
keyword: null
|
|
4629
4593
|
};
|
|
4594
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
4595
|
+
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4596
|
+
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4597
|
+
const endingNumber = Number(pageSize) * Number(page);
|
|
4598
|
+
setCurrentResultNumbers({
|
|
4599
|
+
total: Number(totalItems),
|
|
4600
|
+
startingNumber: Number(totalItems) >= startingNumber ? startingNumber : 0,
|
|
4601
|
+
endingNumber: Number(totalItems) < endingNumber ? Number(totalItems) : endingNumber
|
|
4602
|
+
});
|
|
4603
|
+
if (totalItems <= 0 && currentResultNumbers !== null) setNoResults(true);
|
|
4604
|
+
else setNoResults(false);
|
|
4605
|
+
}, [
|
|
4606
|
+
totalItems,
|
|
4607
|
+
pageSize,
|
|
4608
|
+
page
|
|
4609
|
+
]);
|
|
4610
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
4611
|
+
if (page !== 1 && (transformedParams.fulltext !== fulltext || transformedParams.selectedFacets !== selectedFacets)) setPage(1);
|
|
4612
|
+
}, [
|
|
4613
|
+
fulltext,
|
|
4614
|
+
selectedFacets
|
|
4615
|
+
]);
|
|
4616
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
4617
|
+
if (totalItems !== null && totalItems !== undefined && totalItems > 0) {
|
|
4618
|
+
var params = buildSearchParams(true);
|
|
4619
|
+
if (params !== location.search) setSearchParams(params);
|
|
4620
|
+
}
|
|
4621
|
+
}, [
|
|
4622
|
+
page,
|
|
4623
|
+
sort,
|
|
4624
|
+
sortOrder,
|
|
4625
|
+
totalItems
|
|
4626
|
+
]);
|
|
4627
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
4628
|
+
// No results found
|
|
4629
|
+
if (noResults) setAnnouncementText("No results found.");
|
|
4630
|
+
else if (!isPending && (!data || !data.data.results)) setAnnouncementText("Could not connect to the API.");
|
|
4631
|
+
else setAnnouncementText(`Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`);
|
|
4632
|
+
}, [
|
|
4633
|
+
data,
|
|
4634
|
+
isPending,
|
|
4635
|
+
noResults,
|
|
4636
|
+
currentResultNumbers
|
|
4637
|
+
]);
|
|
4630
4638
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
4631
4639
|
children: [
|
|
4632
4640
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $5723016a5461c1ca$export$2e2bcd8739ae039), {
|
|
@@ -4635,6 +4643,15 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4635
4643
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("section", {
|
|
4636
4644
|
className: "ds-l-container",
|
|
4637
4645
|
children: [
|
|
4646
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4647
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4648
|
+
className: "ds-u-visibility--screen-reader",
|
|
4649
|
+
"aria-live": "assertive",
|
|
4650
|
+
"aria-atomic": "true",
|
|
4651
|
+
"data-testid": "currentResults",
|
|
4652
|
+
children: announcementText
|
|
4653
|
+
})
|
|
4654
|
+
}),
|
|
4638
4655
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4639
4656
|
className: "ds-l-row",
|
|
4640
4657
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
@@ -4719,34 +4736,23 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4719
4736
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
4720
4737
|
className: "ds-u-display--flex ds-u-justify-content--between ds-u-align-items--end ds-u-flex-wrap--reverse ds-u-sm-flex-wrap--wrap",
|
|
4721
4738
|
children: [
|
|
4722
|
-
enablePagination && /*#__PURE__*/ (0, $hgUW1$
|
|
4739
|
+
enablePagination && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4723
4740
|
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--8 ds-u-sm-padding-left--0",
|
|
4724
|
-
children:
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
" datasets"
|
|
4738
|
-
]
|
|
4739
|
-
})
|
|
4740
|
-
}),
|
|
4741
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4742
|
-
className: "ds-u-visibility--screen-reader",
|
|
4743
|
-
role: "status",
|
|
4744
|
-
"aria-live": "assertive",
|
|
4745
|
-
"aria-atomic": "true",
|
|
4746
|
-
"data-testid": "currentResults",
|
|
4747
|
-
children: announcementText
|
|
4741
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4742
|
+
className: "ds-u-margin-y--0",
|
|
4743
|
+
children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
4744
|
+
children: [
|
|
4745
|
+
"Showing ",
|
|
4746
|
+
currentResultNumbers.startingNumber,
|
|
4747
|
+
" -",
|
|
4748
|
+
" ",
|
|
4749
|
+
currentResultNumbers.endingNumber,
|
|
4750
|
+
" of ",
|
|
4751
|
+
data.data.total,
|
|
4752
|
+
" datasets"
|
|
4753
|
+
]
|
|
4748
4754
|
})
|
|
4749
|
-
|
|
4755
|
+
})
|
|
4750
4756
|
}),
|
|
4751
4757
|
enableSort && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4752
4758
|
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--4 ds-u-sm-padding-right--0",
|
|
@@ -4767,6 +4773,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4767
4773
|
children: [
|
|
4768
4774
|
noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
4769
4775
|
variation: "error",
|
|
4776
|
+
role: "region",
|
|
4770
4777
|
heading: "No results found."
|
|
4771
4778
|
}),
|
|
4772
4779
|
data && data.data.results ? Object.keys(data.data.results).map((key)=>{
|
|
@@ -4794,6 +4801,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
4794
4801
|
}, item.identifier);
|
|
4795
4802
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
4796
4803
|
variation: "error",
|
|
4804
|
+
role: "region",
|
|
4797
4805
|
heading: "Could not connect to the API."
|
|
4798
4806
|
})
|
|
4799
4807
|
]
|
|
@@ -4906,37 +4914,6 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4906
4914
|
}
|
|
4907
4915
|
};
|
|
4908
4916
|
const pageSize = defaultPageSize;
|
|
4909
|
-
(0, $hgUW1$useEffect)(()=>{
|
|
4910
|
-
// Update browser URL with current search params
|
|
4911
|
-
const params = buildSearchParams(true);
|
|
4912
|
-
const url = new URL(window.location.href);
|
|
4913
|
-
window.history.pushState({}, "", `${url.origin}${url.pathname}${params}`);
|
|
4914
|
-
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4915
|
-
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4916
|
-
const endingNumber = Number(pageSize) * Number(page);
|
|
4917
|
-
setCurrentResultNumbers({
|
|
4918
|
-
total: Number(totalItems),
|
|
4919
|
-
startingNumber: Number(totalItems) >= startingNumber ? startingNumber : 0,
|
|
4920
|
-
endingNumber: Number(totalItems) < endingNumber ? Number(totalItems) : endingNumber
|
|
4921
|
-
});
|
|
4922
|
-
setTimeout(()=>{
|
|
4923
|
-
setAnnouncementText(`Showing ${startingNumber} to ${endingNumber} of ${totalItems} datasets`);
|
|
4924
|
-
}, 100);
|
|
4925
|
-
if (totalItems <= 0 && currentResultNumbers !== null) setNoResults(true);
|
|
4926
|
-
else setNoResults(false);
|
|
4927
|
-
}, [
|
|
4928
|
-
totalItems,
|
|
4929
|
-
pageSize,
|
|
4930
|
-
page
|
|
4931
|
-
]);
|
|
4932
|
-
(0, $hgUW1$useEffect)(()=>{
|
|
4933
|
-
var params = buildSearchParams(true);
|
|
4934
|
-
if (params !== location.search) setSearchParams(params);
|
|
4935
|
-
}, [
|
|
4936
|
-
page,
|
|
4937
|
-
sort,
|
|
4938
|
-
sortOrder
|
|
4939
|
-
]);
|
|
4940
4917
|
function buildSearchParams(includePage) {
|
|
4941
4918
|
let newParams = {};
|
|
4942
4919
|
if (Number(page) !== 1 && includePage) newParams.page = page;
|
|
@@ -4966,6 +4943,45 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4966
4943
|
}
|
|
4967
4944
|
});
|
|
4968
4945
|
if (data && data.data.total && totalItems != data.data.total) setTotalItems(data.data.total);
|
|
4946
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
4947
|
+
// Update browser URL with current search params
|
|
4948
|
+
const params = buildSearchParams(true);
|
|
4949
|
+
const url = new URL(window.location.href);
|
|
4950
|
+
window.history.pushState({}, "", `${url.origin}${url.pathname}${params}`);
|
|
4951
|
+
const baseNumber = Number(totalItems) > 0 ? 1 : 0;
|
|
4952
|
+
const startingNumber = baseNumber + (Number(pageSize) * Number(page) - Number(pageSize));
|
|
4953
|
+
const endingNumber = Number(pageSize) * Number(page);
|
|
4954
|
+
setCurrentResultNumbers({
|
|
4955
|
+
total: Number(totalItems),
|
|
4956
|
+
startingNumber: Number(totalItems) >= startingNumber ? startingNumber : 0,
|
|
4957
|
+
endingNumber: Number(totalItems) < endingNumber ? Number(totalItems) : endingNumber
|
|
4958
|
+
});
|
|
4959
|
+
if (totalItems <= 0 && currentResultNumbers !== null) setNoResults(true);
|
|
4960
|
+
else setNoResults(false);
|
|
4961
|
+
}, [
|
|
4962
|
+
totalItems,
|
|
4963
|
+
pageSize,
|
|
4964
|
+
page
|
|
4965
|
+
]);
|
|
4966
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
4967
|
+
var params = buildSearchParams(true);
|
|
4968
|
+
if (params !== location.search) setSearchParams(params);
|
|
4969
|
+
}, [
|
|
4970
|
+
page,
|
|
4971
|
+
sort,
|
|
4972
|
+
sortOrder
|
|
4973
|
+
]);
|
|
4974
|
+
(0, $hgUW1$useEffect)(()=>{
|
|
4975
|
+
// No results found
|
|
4976
|
+
if (noResults) setAnnouncementText("No results found.");
|
|
4977
|
+
else if (!isPending && (!data || !data.data.results)) setAnnouncementText("Could not connect to the API.");
|
|
4978
|
+
else setAnnouncementText(`Showing ${currentResultNumbers.startingNumber} to ${currentResultNumbers.endingNumber} of ${currentResultNumbers.total} datasets`);
|
|
4979
|
+
}, [
|
|
4980
|
+
data,
|
|
4981
|
+
isPending,
|
|
4982
|
+
noResults,
|
|
4983
|
+
currentResultNumbers
|
|
4984
|
+
]);
|
|
4969
4985
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
4970
4986
|
children: [
|
|
4971
4987
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $5723016a5461c1ca$export$2e2bcd8739ae039), {
|
|
@@ -4974,6 +4990,15 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
4974
4990
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("section", {
|
|
4975
4991
|
className: "ds-l-container",
|
|
4976
4992
|
children: [
|
|
4993
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4994
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
4995
|
+
className: "ds-u-visibility--screen-reader",
|
|
4996
|
+
"aria-live": "assertive",
|
|
4997
|
+
"aria-atomic": "true",
|
|
4998
|
+
"data-testid": "currentResults",
|
|
4999
|
+
children: announcementText
|
|
5000
|
+
})
|
|
5001
|
+
}),
|
|
4977
5002
|
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
4978
5003
|
className: "ds-l-row",
|
|
4979
5004
|
children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
@@ -5014,33 +5039,22 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5014
5039
|
className: "ds-u-margin-bottom--3",
|
|
5015
5040
|
children: introText ? introText : null
|
|
5016
5041
|
}),
|
|
5017
|
-
enablePagination && /*#__PURE__*/ (0, $hgUW1$
|
|
5018
|
-
children:
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
" datasets"
|
|
5032
|
-
]
|
|
5033
|
-
})
|
|
5034
|
-
}),
|
|
5035
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
5036
|
-
className: "ds-u-visibility--screen-reader",
|
|
5037
|
-
role: "status",
|
|
5038
|
-
"aria-live": "assertive",
|
|
5039
|
-
"aria-atomic": "true",
|
|
5040
|
-
"data-testid": "currentResults",
|
|
5041
|
-
children: announcementText
|
|
5042
|
+
enablePagination && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
5043
|
+
children: /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
|
|
5044
|
+
className: "ds-u-margin-y--0",
|
|
5045
|
+
children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
|
|
5046
|
+
children: [
|
|
5047
|
+
"Showing ",
|
|
5048
|
+
currentResultNumbers.startingNumber,
|
|
5049
|
+
" -",
|
|
5050
|
+
" ",
|
|
5051
|
+
currentResultNumbers.endingNumber,
|
|
5052
|
+
" of ",
|
|
5053
|
+
data.data.total,
|
|
5054
|
+
" datasets"
|
|
5055
|
+
]
|
|
5042
5056
|
})
|
|
5043
|
-
|
|
5057
|
+
})
|
|
5044
5058
|
})
|
|
5045
5059
|
]
|
|
5046
5060
|
}),
|
|
@@ -5063,6 +5077,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5063
5077
|
children: [
|
|
5064
5078
|
noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
5065
5079
|
variation: "error",
|
|
5080
|
+
role: "region",
|
|
5066
5081
|
heading: "No results found."
|
|
5067
5082
|
}),
|
|
5068
5083
|
data && data.data.results ? Object.keys(data.data.results).map((key)=>{
|
|
@@ -5077,6 +5092,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
|
|
|
5077
5092
|
}, item.identifier);
|
|
5078
5093
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
5079
5094
|
variation: "error",
|
|
5095
|
+
role: "region",
|
|
5080
5096
|
heading: "Could not connect to the API."
|
|
5081
5097
|
})
|
|
5082
5098
|
]
|
|
@@ -5210,15 +5226,13 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5210
5226
|
if (!requireConditions) enabled = true;
|
|
5211
5227
|
if (conditions && conditions.length) enabled = true;
|
|
5212
5228
|
}
|
|
5213
|
-
// Change whether distribution API or dataset API is used based on option
|
|
5214
|
-
const queryID = options.useDatasetAPI ? params.datasetID + "/0" : id;
|
|
5215
5229
|
const { data: data, isPending: isPending, error: error } = (0, $hgUW1$useQuery)({
|
|
5216
5230
|
queryKey: [
|
|
5217
5231
|
"datastore" + id + paramsString
|
|
5218
5232
|
],
|
|
5219
5233
|
queryFn: ()=>{
|
|
5220
5234
|
setCount(null);
|
|
5221
|
-
return fetch(`${rootUrl}/datastore/query/${
|
|
5235
|
+
return fetch(`${rootUrl}/datastore/query/${id}?${paramsString}`).then((res)=>res.json());
|
|
5222
5236
|
},
|
|
5223
5237
|
enabled: enabled
|
|
5224
5238
|
});
|
|
@@ -5232,7 +5246,7 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
|
|
|
5232
5246
|
count: true,
|
|
5233
5247
|
schema: true
|
|
5234
5248
|
};
|
|
5235
|
-
return fetch(`${rootUrl}/datastore/query/${
|
|
5249
|
+
return fetch(`${rootUrl}/datastore/query/${id}?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(unfilteredParams, ACA))}`).then((res)=>res.json());
|
|
5236
5250
|
}
|
|
5237
5251
|
});
|
|
5238
5252
|
(0, $hgUW1$useEffect)(()=>{
|
|
@@ -6345,7 +6359,7 @@ const $a0f13962e513caa1$var$getDataDictionary = (dataDictionaryUrl)=>{
|
|
|
6345
6359
|
dataDictionaryLoading: isPending
|
|
6346
6360
|
};
|
|
6347
6361
|
};
|
|
6348
|
-
const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns: customColumns, setDatasetTitle: setDatasetTitle, customMetadataMapping: customMetadataMapping, apiPageUrl: apiPageUrl = "/api", dataDictionaryUrl: dataDictionaryUrl, borderlessTabs: borderlessTabs = false, defaultPageSize: defaultPageSize = 25, dataDictionaryCSV: dataDictionaryCSV = false, dataDictionaryBanner: dataDictionaryBanner = false, disableTableControls: disableTableControls = false, hideDataDictionary: hideDataDictionary = false, customDescription: customDescription, updateAriaLive: updateAriaLive, showRowLimitNotice: showRowLimitNotice = false
|
|
6362
|
+
const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns: customColumns, setDatasetTitle: setDatasetTitle, customMetadataMapping: customMetadataMapping, apiPageUrl: apiPageUrl = "/api", dataDictionaryUrl: dataDictionaryUrl, borderlessTabs: borderlessTabs = false, defaultPageSize: defaultPageSize = 25, dataDictionaryCSV: dataDictionaryCSV = false, dataDictionaryBanner: dataDictionaryBanner = false, disableTableControls: disableTableControls = false, hideDataDictionary: hideDataDictionary = false, customDescription: customDescription, updateAriaLive: updateAriaLive, showRowLimitNotice: showRowLimitNotice = false })=>{
|
|
6349
6363
|
const options = location.search ? {
|
|
6350
6364
|
...(0, $hgUW1$qs).parse(location.search, {
|
|
6351
6365
|
ignoreQueryPrefix: true
|
|
@@ -6364,10 +6378,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6364
6378
|
if (distributions.length) distribution = distributions[0];
|
|
6365
6379
|
const resource = (0, $1d3d480a9cfaabe0$export$2e2bcd8739ae039)("", rootUrl, {
|
|
6366
6380
|
...options,
|
|
6367
|
-
limit: defaultPageSize
|
|
6368
|
-
useDatasetAPI: useDatasetAPI
|
|
6369
|
-
}, {
|
|
6370
|
-
datasetID: id // pass datasetID into additional params to enable dataset API option in useDatastore
|
|
6381
|
+
limit: defaultPageSize
|
|
6371
6382
|
});
|
|
6372
6383
|
const siteWideDataDictionary = dataDictionaryUrl ? $a0f13962e513caa1$var$getDataDictionary(rootUrl + dataDictionaryUrl).dataDictionary : null;
|
|
6373
6384
|
// compare schema fields with siteWideDataDictionary to display commonalities for now
|
|
@@ -6433,6 +6444,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, customColumns
|
|
|
6433
6444
|
window.location.hash
|
|
6434
6445
|
]);
|
|
6435
6446
|
const displayDataDictionaryTab = distribution.data && distribution.data.describedBy && distribution.data.describedByType === "application/vnd.tableschema+json" || datasetSitewideDictionary && datasetSitewideDictionary.length > 0;
|
|
6447
|
+
const formatType = (0, $f764661366bd9e1b$export$ee48b7e0e4eb536e)(distribution);
|
|
6436
6448
|
return /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Fragment), {
|
|
6437
6449
|
children: dataset.error ? /*#__PURE__*/ (0, $hgUW1$jsx)((0, $026cb986f9fea2b1$export$2e2bcd8739ae039), {
|
|
6438
6450
|
content: notFoundContent,
|