@civicactions/cmsds-open-data-components 2.1.2 → 2.1.3
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 +12 -6
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -622,8 +622,11 @@ const $007dd6bfbe0f2956$var$DatasetSearch = ({ rootUrl: rootUrl , pageTitle: pag
|
|
|
622
622
|
encode: false,
|
|
623
623
|
skipEmptyString: true
|
|
624
624
|
})}`));
|
|
625
|
-
if (data && totalItems != data.data.total) setTotalItems(data.data.total);
|
|
626
|
-
const { theme: theme , keyword: keyword } = (0, $116bd29db288848e$export$959638e8dca60ce6)(data ? data.data.facets : [])
|
|
625
|
+
if (data && data.data.total && totalItems != data.data.total) setTotalItems(data.data.total);
|
|
626
|
+
const { theme: theme , keyword: keyword } = data && data.data.facets ? (0, $116bd29db288848e$export$959638e8dca60ce6)(data ? data.data.facets : []) : {
|
|
627
|
+
theme: null,
|
|
628
|
+
keyword: null
|
|
629
|
+
};
|
|
627
630
|
return /*#__PURE__*/ (0, $hgUW1$jsxs)("section", {
|
|
628
631
|
className: "ds-l-container",
|
|
629
632
|
children: [
|
|
@@ -721,7 +724,7 @@ const $007dd6bfbe0f2956$var$DatasetSearch = ({ rootUrl: rootUrl , pageTitle: pag
|
|
|
721
724
|
variation: "error",
|
|
722
725
|
heading: "No results found."
|
|
723
726
|
}),
|
|
724
|
-
data && Object.keys(data.data.results).map((key)=>{
|
|
727
|
+
data && data.data.results ? Object.keys(data.data.results).map((key)=>{
|
|
725
728
|
return data.data.results[key];
|
|
726
729
|
}).map((item)=>/*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
727
730
|
className: "ds-u-padding--0",
|
|
@@ -729,10 +732,13 @@ const $007dd6bfbe0f2956$var$DatasetSearch = ({ rootUrl: rootUrl , pageTitle: pag
|
|
|
729
732
|
item: item,
|
|
730
733
|
updateFacets: updateSelectedFacets
|
|
731
734
|
})
|
|
732
|
-
}, item.identifier))
|
|
735
|
+
}, item.identifier)) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
736
|
+
variation: "error",
|
|
737
|
+
heading: "Could not connect to the API."
|
|
738
|
+
})
|
|
733
739
|
]
|
|
734
740
|
}),
|
|
735
|
-
data && data.data.total
|
|
741
|
+
data && data.data.total && data.data.total !== 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
736
742
|
id: "test-default",
|
|
737
743
|
currentPage: Number(page),
|
|
738
744
|
totalPages: Math.ceil(Number(data.data.total) / pageSize),
|
|
@@ -4140,7 +4146,7 @@ const $374c4669b044ddf8$var$QueryRow = ({ id: id , condition: condition , index:
|
|
|
4140
4146
|
children: "Value"
|
|
4141
4147
|
})
|
|
4142
4148
|
}),
|
|
4143
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$reactdatepicker)
|
|
4149
|
+
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$reactdatepicker), {
|
|
4144
4150
|
name: `${condition.key}_date_value`,
|
|
4145
4151
|
selected: (0, $7264a673914aa746$export$e284ae5d89467c8f)(startDate),
|
|
4146
4152
|
onChange: (date)=>{
|