@civicactions/cmsds-open-data-components 3.1.0-alpha.1 → 3.1.0-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 +9 -9
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -527,7 +527,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
527
527
|
const desktop = (0, $hgUW1$useMediaQuery)({
|
|
528
528
|
minWidth: 1024
|
|
529
529
|
});
|
|
530
|
-
const { title: title , modified: modified , description: description , theme: theme , identifier: identifier , downloadUrl: downloadUrl , largeFile: largeFile = false } = props;
|
|
530
|
+
const { title: title , modified: modified , description: description , theme: theme , identifier: identifier , downloadUrl: downloadUrl , largeFile: largeFile = false , paginationEnabled: paginationEnabled } = props;
|
|
531
531
|
let linkContainerClasses = "ds-l-col--12 ds-u-margin-bottom--2";
|
|
532
532
|
let linkClasses = "ds-c-button ds-u-display--block ds-u-text-align--left";
|
|
533
533
|
if (desktop) {
|
|
@@ -545,13 +545,13 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
|
|
|
545
545
|
return /*#__PURE__*/ (0, $hgUW1$jsx)("li", {
|
|
546
546
|
className: "dc-c-search-list-item ds-u-padding-top--3",
|
|
547
547
|
children: /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
548
|
-
className:
|
|
548
|
+
className: `dc-c-searchlist-item ${paginationEnabled ? "ds-u-border-top--1" : "ds-u-border-bottom--1 ds-u-padding-bottom--3"}`,
|
|
549
549
|
children: [
|
|
550
550
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
551
551
|
className: "ds-l-row ds-u-align-items--start",
|
|
552
552
|
children: [
|
|
553
553
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
|
|
554
|
-
className:
|
|
554
|
+
className: `ds-l-col--12 ds-u-text-align--right ${paginationEnabled ? "ds-u-padding-top--2" : "ds-u-padding-top--0"}`,
|
|
555
555
|
children: [
|
|
556
556
|
"Updated ",
|
|
557
557
|
/*#__PURE__*/ (0, $hgUW1$jsx)((0, $bd76a91923d7e8a7$export$2e2bcd8739ae039), {
|
|
@@ -827,7 +827,7 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, addit
|
|
|
827
827
|
|
|
828
828
|
|
|
829
829
|
const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
830
|
-
const { rootUrl: rootUrl , surveyLink: surveyLink , additionalParams: additionalParams , enableSort: enableSort , defaultSort: defaultSort , pageTitle: pageTitle , filterTitle: filterTitle , showLargeFileWarning: showLargeFileWarning , largeFileThemes: largeFileThemes , introText: introText , showDownloadIcon: showDownloadIcon } = props;
|
|
830
|
+
const { rootUrl: rootUrl , surveyLink: surveyLink , additionalParams: additionalParams , enableSort: enableSort , enablePagination: enablePagination = true , defaultPageSize: defaultPageSize = 10 , defaultSort: defaultSort , pageTitle: pageTitle , filterTitle: filterTitle , showLargeFileWarning: showLargeFileWarning , largeFileThemes: largeFileThemes , introText: introText , showDownloadIcon: showDownloadIcon } = props;
|
|
831
831
|
const sortOptions = [
|
|
832
832
|
{
|
|
833
833
|
label: "Newest",
|
|
@@ -854,7 +854,6 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
854
854
|
};
|
|
855
855
|
const defaultSortOrder = "";
|
|
856
856
|
const defaultPage = 1;
|
|
857
|
-
const defaultPageSize = 10;
|
|
858
857
|
const location = (0, $hgUW1$useLocation)();
|
|
859
858
|
const transformedParams = (0, $eff7d34c30f5a0fc$export$60ec7cc1d341a524)(location.search, [
|
|
860
859
|
"theme",
|
|
@@ -1080,7 +1079,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1080
1079
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
|
|
1081
1080
|
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",
|
|
1082
1081
|
children: [
|
|
1083
|
-
/*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1082
|
+
enablePagination && /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
|
|
1084
1083
|
className: "ds-l-col--12 ds-l-sm-col--6 ds-l-md-col--8",
|
|
1085
1084
|
children: currentResultNumbers && data && /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
|
|
1086
1085
|
className: "ds-u-margin-y--0",
|
|
@@ -1113,7 +1112,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1113
1112
|
]
|
|
1114
1113
|
}),
|
|
1115
1114
|
/*#__PURE__*/ (0, $hgUW1$jsxs)("ol", {
|
|
1116
|
-
className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0",
|
|
1115
|
+
className: "dc-dataset-search-list ds-u-padding--0 ds-u-margin-top--0 ds-u-display--block",
|
|
1117
1116
|
"data-testid": "results-list",
|
|
1118
1117
|
children: [
|
|
1119
1118
|
noResults && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
@@ -1138,7 +1137,8 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1138
1137
|
theme: item.theme,
|
|
1139
1138
|
identifier: item.identifier,
|
|
1140
1139
|
downloadUrl: showDownloadIcon ? getDownloadUrl(item) : null,
|
|
1141
|
-
largeFile: showLargeFile
|
|
1140
|
+
largeFile: showLargeFile,
|
|
1141
|
+
paginationEnabled: enablePagination
|
|
1142
1142
|
});
|
|
1143
1143
|
}) : /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Alert), {
|
|
1144
1144
|
variation: "error",
|
|
@@ -1146,7 +1146,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
|
|
|
1146
1146
|
})
|
|
1147
1147
|
]
|
|
1148
1148
|
}),
|
|
1149
|
-
data && data.data.total && data.data.total != 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
1149
|
+
enablePagination && data && data.data.total && data.data.total != 0 && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
|
|
1150
1150
|
currentPage: Number(page),
|
|
1151
1151
|
totalPages: Math.ceil(Number(data.data.total) / pageSize),
|
|
1152
1152
|
onPageChange: (evt, page)=>{
|