@civicactions/cmsds-open-data-components 3.4.2 → 3.4.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 CHANGED
@@ -1016,7 +1016,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
1016
1016
  page
1017
1017
  ]);
1018
1018
  (0, $hgUW1$useEffect)(()=>{
1019
- setPage(1);
1019
+ if (page !== 1 && (transformedParams.fulltext !== fulltext || transformedParams.selectedFacets !== selectedFacets)) setPage(1);
1020
1020
  }, [
1021
1021
  fulltext,
1022
1022
  selectedFacets
@@ -2272,9 +2272,7 @@ const $6765a74df807d015$var$DataDictionaryTable = ({ tableColumns: tableColumns,
2272
2272
  evt.preventDefault();
2273
2273
  table.setPageIndex(page - 1);
2274
2274
  },
2275
- renderHref: (page)=>{
2276
- return "";
2277
- }
2275
+ renderHref: (page)=>`/page=${page}`
2278
2276
  }) : ""
2279
2277
  ]
2280
2278
  });
@@ -2496,7 +2494,8 @@ const $6012b86ffcaf3f71$var$DataDictionary = ({ datasetDictionaryEndpoint: datas
2496
2494
  enabled: datasetDictionaryEndpoint !== undefined
2497
2495
  });
2498
2496
  const datasetDictionary = data && data.data && data.data.fields && data.data.fields.length ? data.data.fields : null;
2499
- return /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$Fragment), {
2497
+ return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
2498
+ "data-testid": "dataset-dictionary-tab",
2500
2499
  children: [
2501
2500
  /*#__PURE__*/ (0, $hgUW1$jsx)("h2", {
2502
2501
  className: "ds-text-heading--2xl ds-u-margin-y--3",
@@ -3933,15 +3932,13 @@ const $a35cf16d1488f54e$var$DatasetTable = ({ isModal: isModal = false, closeFul
3933
3932
  className: "ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--end ds-u-md-justify-content--between ds-u-margin-top--2 ds-u-align-items--center",
3934
3933
  children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$Pagination), {
3935
3934
  totalPages: Math.ceil(resource.count ? resource.count / pageSize : 1),
3936
- currentPage: page,
3935
+ currentPage: Number(page),
3937
3936
  onPageChange: (evt, page)=>{
3938
3937
  evt.preventDefault();
3939
3938
  setOffset((page - 1) * limit);
3940
3939
  setPage(page);
3941
3940
  },
3942
- renderHref: (page)=>{
3943
- return "";
3944
- },
3941
+ renderHref: (p)=>`?page=${p}`,
3945
3942
  className: "ds-l-col--12 ds-u-padding-x--0"
3946
3943
  })
3947
3944
  })
@@ -4110,7 +4107,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, additionalPar
4110
4107
  })
4111
4108
  }),
4112
4109
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
4113
- className: "ds-l-md-col--12 ds-u-color--gray ds-u-margin-y--1 ds-u-text-align--right",
4110
+ className: "ds-l-md-col--12 ds-u-margin-y--1 ds-u-text-align--right",
4114
4111
  children: /*#__PURE__*/ (0, $hgUW1$jsxs)("p", {
4115
4112
  className: "ds-u-margin--0",
4116
4113
  children: [
@@ -4189,7 +4186,7 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, additionalPar
4189
4186
  metadataMapping: metadataMapping
4190
4187
  })
4191
4188
  }),
4192
- displayDataDictionaryTab && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
4189
+ /*#__PURE__*/ (0, $hgUW1$jsxs)((0, $hgUW1$TabPanel), {
4193
4190
  id: "data-dictionary",
4194
4191
  tab: /*#__PURE__*/ (0, $hgUW1$jsxs)("span", {
4195
4192
  className: "ds-u-color--primary",
@@ -4201,13 +4198,18 @@ const $a0f13962e513caa1$var$Dataset = ({ id: id, rootUrl: rootUrl, additionalPar
4201
4198
  ]
4202
4199
  }),
4203
4200
  className: borderlessTabs ? "ds-u-border--0 ds-u-padding-x--0" : "",
4204
- children: /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
4205
- datasetSitewideDictionary: datasetSitewideDictionary,
4206
- datasetDictionaryEndpoint: distribution.data.describedBy,
4207
- title: "Data Dictionary",
4208
- additionalParams: additionalParams,
4209
- csvDownload: dataDictionaryCSV
4210
- })
4201
+ children: [
4202
+ displayDataDictionaryTab && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $6012b86ffcaf3f71$export$2e2bcd8739ae039), {
4203
+ datasetSitewideDictionary: datasetSitewideDictionary,
4204
+ datasetDictionaryEndpoint: distribution.data.describedBy,
4205
+ title: "Data Dictionary",
4206
+ additionalParams: additionalParams,
4207
+ csvDownload: dataDictionaryCSV
4208
+ }),
4209
+ !displayDataDictionaryTab && /*#__PURE__*/ (0, $hgUW1$jsx)("p", {
4210
+ children: "There is no Data Dictionary associated with this dataset."
4211
+ })
4212
+ ]
4211
4213
  }),
4212
4214
  distribution && distribution.data && /*#__PURE__*/ (0, $hgUW1$jsx)((0, $hgUW1$TabPanel), {
4213
4215
  id: "api",