@civicactions/cmsds-open-data-components 3.7.0-alpha.4 → 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 +4 -7
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
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,
|
|
@@ -6628,6 +6625,7 @@ var $f61ecf9f84951a61$export$2e2bcd8739ae039 = (0, $61ff88fb3f6ee2c8$export$2e2b
|
|
|
6628
6625
|
|
|
6629
6626
|
|
|
6630
6627
|
const $efc410f5f7ac5ef3$var$useSearchAPI = (rootUrl, initialSearchParams = {})=>{
|
|
6628
|
+
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
6631
6629
|
const defaultSort = "";
|
|
6632
6630
|
const defaultFulltext = "";
|
|
6633
6631
|
const defaultSelectedFacets = {};
|
|
@@ -6652,7 +6650,7 @@ const $efc410f5f7ac5ef3$var$useSearchAPI = (rootUrl, initialSearchParams = {})=>
|
|
|
6652
6650
|
const [sortOrder, setSortOrder] = (0, $hgUW1$useState)(initialSearchParams.sortOrder ? initialSearchParams.sortOrder : defaultSortOrder);
|
|
6653
6651
|
const [page, setPage] = (0, $hgUW1$useState)(initialSearchParams.page ? initialSearchParams.page : defaultPage);
|
|
6654
6652
|
const [pageSize, setPageSize] = (0, $hgUW1$useState)(initialSearchParams.pageSize ? initialSearchParams.pageSize : defaultPageSize);
|
|
6655
|
-
async function search() {
|
|
6653
|
+
async function search(ACA) {
|
|
6656
6654
|
const options = {
|
|
6657
6655
|
fulltext: fulltext,
|
|
6658
6656
|
selectedFacets: selectedFacets,
|
|
@@ -6661,7 +6659,6 @@ const $efc410f5f7ac5ef3$var$useSearchAPI = (rootUrl, initialSearchParams = {})=>
|
|
|
6661
6659
|
page: Number(page),
|
|
6662
6660
|
pageSize: pageSize
|
|
6663
6661
|
};
|
|
6664
|
-
const { ACA: ACA } = (0, $hgUW1$useContext)((0, $844981eac9b63865$export$eccc29c8d0ff408));
|
|
6665
6662
|
const results = await (0, $eff7d34c30f5a0fc$export$2d2256cb46e92ff7)(rootUrl, options, ACA);
|
|
6666
6663
|
const itemKeys = Object.keys(results.data.results);
|
|
6667
6664
|
const itemsArray = itemKeys.map((key)=>{
|
|
@@ -6687,7 +6684,7 @@ const $efc410f5f7ac5ef3$var$useSearchAPI = (rootUrl, initialSearchParams = {})=>
|
|
|
6687
6684
|
(0, $hgUW1$useEffect)(()=>{
|
|
6688
6685
|
const timer = setTimeout(()=>{
|
|
6689
6686
|
setLoading(true);
|
|
6690
|
-
search();
|
|
6687
|
+
search(ACA);
|
|
6691
6688
|
}, 1000);
|
|
6692
6689
|
return ()=>clearTimeout(timer);
|
|
6693
6690
|
}, [
|