@civicactions/cmsds-open-data-components 3.7.0-alpha.3 → 3.7.0-alpha.5

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,
@@ -3940,7 +3937,7 @@ var $b4aa9c66f2e86959$export$2e2bcd8739ae039 = $b4aa9c66f2e86959$var$useMetastor
3940
3937
 
3941
3938
 
3942
3939
 
3943
- const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options)=>{
3940
+ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, additionalParams = {})=>{
3944
3941
  const keys = options.keys ? options.keys : true;
3945
3942
  const { prepareColumns: prepareColumns } = options;
3946
3943
  const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
@@ -3968,7 +3965,8 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options)=>{
3968
3965
  conditions: conditions,
3969
3966
  sorts: sort,
3970
3967
  properties: properties,
3971
- groupings: groupings
3968
+ groupings: groupings,
3969
+ ...additionalParams
3972
3970
  };
3973
3971
  const paramsString = Object.keys(params).length ? `${(0, $hgUW1$qs).stringify((0, $6d5c0212e738499b$export$34e95918366a058e)(params, ACA))}` : "";
3974
3972
  let enabled = false;
@@ -6627,6 +6625,7 @@ var $f61ecf9f84951a61$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
6627
6625
 
6628
6626
 
6629
6627
  const $efc410f5f7ac5ef3$var$useSearchAPI = (rootUrl, initialSearchParams = {})=>{
6628
+ const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
6630
6629
  const defaultSort = "";
6631
6630
  const defaultFulltext = "";
6632
6631
  const defaultSelectedFacets = {};
@@ -6651,7 +6650,7 @@ const $efc410f5f7ac5ef3$var$useSearchAPI = (rootUrl, initialSearchParams = {})=>
6651
6650
  const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(initialSearchParams.sortOrder ? initialSearchParams.sortOrder : defaultSortOrder);
6652
6651
  const [page, setPage] = (0, $hgUW1$useState)(initialSearchParams.page ? initialSearchParams.page : defaultPage);
6653
6652
  const [pageSize, setPageSize] = (0, $hgUW1$useState)(initialSearchParams.pageSize ? initialSearchParams.pageSize : defaultPageSize);
6654
- async function search() {
6653
+ async function search(ACA) {
6655
6654
  const options = {
6656
6655
  fulltext: fulltext,
6657
6656
  selectedFacets: selectedFacets,
@@ -6660,7 +6659,6 @@ const $efc410f5f7ac5ef3$var$useSearchAPI = (rootUrl, initialSearchParams = {})=>
6660
6659
  page: Number(page),
6661
6660
  pageSize: pageSize
6662
6661
  };
6663
- const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
6664
6662
  const results = await (0, $eff7d34c30f5a0fc$export$2d2256cb46e92ff7)(rootUrl, options, ACA);
6665
6663
  const itemKeys = Object.keys(results.data.results);
6666
6664
  const itemsArray = itemKeys.map((key)=>{
@@ -6686,7 +6684,7 @@ const $efc410f5f7ac5ef3$var$useSearchAPI = (rootUrl, initialSearchParams = {})=>
6686
6684
  (0, $hgUW1$useEffect)(()=>{
6687
6685
  const timer = setTimeout(()=>{
6688
6686
  setLoading(true);
6689
- search();
6687
+ search(ACA);
6690
6688
  }, 1000);
6691
6689
  return ()=>clearTimeout(timer);
6692
6690
  }, [