@civicactions/cmsds-open-data-components 4.2.1-alpha.0 → 4.2.1-alpha.1

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
@@ -393,13 +393,11 @@ const $fea9297ba4dd394c$var$HeaderSearch = (props)=>{
393
393
  function searchForDataset(e) {
394
394
  e.preventDefault();
395
395
  if (window) {
396
- if (window.location.pathname !== '/datasets') {
397
- navigate(`/datasets?fulltext=${modalSearchTerm}`);
398
- setModalSearch(false);
399
- } else {
400
- window.location.search = `fulltext=${modalSearchTerm}`;
401
- setModalSearch(false);
402
- }
396
+ const params = new URLSearchParams({
397
+ fulltext: modalSearchTerm
398
+ });
399
+ navigate(`/datasets?${params.toString()}`);
400
+ setModalSearch(false);
403
401
  }
404
402
  }
405
403
  return /*#__PURE__*/ (0, $hgUW1$jsxs)("div", {
@@ -747,7 +745,10 @@ const $59a079354baa335c$var$Hero = ({ title: title, description: description, se
747
745
  const [searchValue, setSearchValue] = (0, $hgUW1$useState)('');
748
746
  function submitHero(e) {
749
747
  e.preventDefault();
750
- navigate(`/${searchUrl}?${searchKey}=${searchValue}`);
748
+ const params = new URLSearchParams({
749
+ [searchKey]: searchValue
750
+ });
751
+ navigate(`/${searchUrl}?${params.toString()}`);
751
752
  }
752
753
  return /*#__PURE__*/ (0, $hgUW1$jsx)("section", {
753
754
  className: `dc-c-hero ds-base ds-u-padding--2`,
@@ -3668,7 +3669,7 @@ const $10bc3aae21fc1572$var$DatasetListSubmenu = ({ rootUrl: rootUrl, enablePagi
3668
3669
  queryFn: ()=>{
3669
3670
  return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
3670
3671
  arrayFormat: 'comma',
3671
- encode: false
3672
+ encode: true
3672
3673
  })}`);
3673
3674
  }
3674
3675
  });
@@ -5208,7 +5209,7 @@ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA)
5208
5209
  };
5209
5210
  return await (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
5210
5211
  arrayFormat: 'comma',
5211
- encode: false
5212
+ encode: true
5212
5213
  })}`);
5213
5214
  }
5214
5215
 
@@ -5355,7 +5356,7 @@ const $e873081a6e8f024e$var$DatasetSearch = (props)=>{
5355
5356
  queryFn: ()=>{
5356
5357
  return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
5357
5358
  arrayFormat: 'comma',
5358
- encode: false
5359
+ encode: true
5359
5360
  })}`);
5360
5361
  }
5361
5362
  });
@@ -5734,7 +5735,7 @@ const $550bcc185f420ff5$var$DatasetList = ({ rootUrl: rootUrl, enableSort: enabl
5734
5735
  queryFn: ()=>{
5735
5736
  return (0, $hgUW1$axios).get(`${rootUrl}/search/?${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA), {
5736
5737
  arrayFormat: 'comma',
5737
- encode: false
5738
+ encode: true
5738
5739
  })}`);
5739
5740
  }
5740
5741
  });