@civicactions/cmsds-open-data-components 3.7.0-alpha.4 → 3.7.0-alpha.6

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
@@ -3438,8 +3438,6 @@ var $5723016a5461c1ca$export$2e2bcd8739ae039 = $5723016a5461c1ca$var$PageHeader;
3438
3438
 
3439
3439
 
3440
3440
 
3441
-
3442
-
3443
3441
  function $eff7d34c30f5a0fc$export$959638e8dca60ce6(facets) {
3444
3442
  let facetObj = {};
3445
3443
  if (facets) {
@@ -3476,8 +3474,7 @@ function $eff7d34c30f5a0fc$export$60ec7cc1d341a524(searchParams, defaultSortOpti
3476
3474
  }
3477
3475
  };
3478
3476
  }
3479
- async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options) {
3480
- const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
3477
+ async function $eff7d34c30f5a0fc$export$2d2256cb46e92ff7(rootUrl, options, ACA) {
3481
3478
  const { fulltext: fulltext, selectedFacets: selectedFacets, sort: sort, sortOrder: sortOrder, page: page, pageSize: pageSize } = options;
3482
3479
  let params = {
3483
3480
  fulltext: fulltext ? fulltext : undefined,
@@ -3906,7 +3903,7 @@ const $b4aa9c66f2e86959$var$useMetastoreDataset = (datasetId, rootAPIUrl)=>{
3906
3903
  "metastore" + id
3907
3904
  ],
3908
3905
  queryFn: ()=>{
3909
- return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids&${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`).then((res)=>res.data).catch((error)=>{
3906
+ return (0, $hgUW1$axios).get(`${rootUrl}/metastore/schemas/dataset/items/${id}?show-reference-ids${ACA ? "&" : ""}${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)({}, ACA))}`).then((res)=>res.data).catch((error)=>{
3910
3907
  return {
3911
3908
  title: dataset.title,
3912
3909
  distribution: dataset.distribution,
@@ -3971,7 +3968,8 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
3971
3968
  groupings: groupings,
3972
3969
  ...additionalParams
3973
3970
  };
3974
- const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA))}` : "";
3971
+ params = (0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA);
3972
+ const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify(params)}` : "";
3975
3973
  let enabled = false;
3976
3974
  if (id) {
3977
3975
  if (!requireConditions) enabled = true;
@@ -6628,6 +6626,7 @@ var $f61ecf9f84951a61$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
6628
6626
 
6629
6627
 
6630
6628
  const $efc410f5f7ac5ef3$var$useSearchAPI = (rootUrl, initialSearchParams = {})=>{
6629
+ const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
6631
6630
  const defaultSort = "";
6632
6631
  const defaultFulltext = "";
6633
6632
  const defaultSelectedFacets = {};
@@ -6652,7 +6651,7 @@ const $efc410f5f7ac5ef3$var$useSearchAPI = (rootUrl, initialSearchParams = {})=>
6652
6651
  const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(initialSearchParams.sortOrder ? initialSearchParams.sortOrder : defaultSortOrder);
6653
6652
  const [page, setPage] = (0, $hgUW1$useState)(initialSearchParams.page ? initialSearchParams.page : defaultPage);
6654
6653
  const [pageSize, setPageSize] = (0, $hgUW1$useState)(initialSearchParams.pageSize ? initialSearchParams.pageSize : defaultPageSize);
6655
- async function search() {
6654
+ async function search(ACA) {
6656
6655
  const options = {
6657
6656
  fulltext: fulltext,
6658
6657
  selectedFacets: selectedFacets,
@@ -6661,7 +6660,6 @@ const $efc410f5f7ac5ef3$var$useSearchAPI = (rootUrl, initialSearchParams = {})=>
6661
6660
  page: Number(page),
6662
6661
  pageSize: pageSize
6663
6662
  };
6664
- const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
6665
6663
  const results = await (0, $eff7d34c30f5a0fc$export$2d2256cb46e92ff7)(rootUrl, options, ACA);
6666
6664
  const itemKeys = Object.keys(results.data.results);
6667
6665
  const itemsArray = itemKeys.map((key)=>{
@@ -6687,7 +6685,7 @@ const $efc410f5f7ac5ef3$var$useSearchAPI = (rootUrl, initialSearchParams = {})=>
6687
6685
  (0, $hgUW1$useEffect)(()=>{
6688
6686
  const timer = setTimeout(()=>{
6689
6687
  setLoading(true);
6690
- search();
6688
+ search(ACA);
6691
6689
  }, 1000);
6692
6690
  return ()=>clearTimeout(timer);
6693
6691
  }, [