@zengenti/contensis-react-base 4.0.0-beta.53 → 4.0.0-beta.55

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.
@@ -1305,10 +1305,10 @@ var expressions = /*#__PURE__*/Object.freeze({
1305
1305
  termExpressions: termExpressions
1306
1306
  });
1307
1307
 
1308
- const filterQuery = (contentTypeIds, languages, versionStatus, customWhere) => {
1308
+ const filterQuery = (contentTypeIds, languages, versionStatus, customWhere, pageSize = 100) => {
1309
1309
  const query = new Query(...[...contentTypeIdExpression(contentTypeIds), ...languagesExpression(languages), ...defaultExpressions(versionStatus), ...customWhereExpressions(customWhere)]);
1310
1310
  query.orderBy = OrderBy.asc(Fields.entryTitle);
1311
- query.pageSize = 100;
1311
+ query.pageSize = pageSize;
1312
1312
  return query;
1313
1313
  };
1314
1314
  const searchQuery = ({
@@ -5040,7 +5040,7 @@ const facetTemplate = {
5040
5040
  state,
5041
5041
  action
5042
5042
  }) => {
5043
- const aggregations = 'aggregations' in result.payload ? result.payload.aggregations : undefined;
5043
+ const aggregations = result.payload && 'aggregations' in result.payload ? result.payload.aggregations : undefined;
5044
5044
  if (!aggregations) return {};
5045
5045
 
5046
5046
  // Handle aggregations client-side where the filter items have loaded
@@ -5790,6 +5790,7 @@ function* loadFilter(action) {
5790
5790
  const {
5791
5791
  contentTypeId,
5792
5792
  customWhere,
5793
+ pageSize,
5793
5794
  path
5794
5795
  } = filter;
5795
5796
  const createStateFrom = {
@@ -5806,7 +5807,7 @@ function* loadFilter(action) {
5806
5807
  try {
5807
5808
  if (contentTypeId) {
5808
5809
  const versionStatus = yield select(selectVersionStatus);
5809
- const query = filterQuery(Array.isArray(contentTypeId) ? contentTypeId : [contentTypeId], languages, versionStatus, customWhere);
5810
+ const query = filterQuery(Array.isArray(contentTypeId) ? contentTypeId : [contentTypeId], languages, versionStatus, customWhere, pageSize);
5810
5811
  const payload = yield api.search(query, 0, projectId);
5811
5812
  if (!payload) throw new Error('No payload returned by search');
5812
5813
  if (payload.type === 'error') throw payload;
@@ -6066,4 +6067,4 @@ function* triggerSearchSsr(options) {
6066
6067
  }
6067
6068
 
6068
6069
  export { useFacets as $, updateCurrentTab$1 as A, updateCurrentFacet$1 as B, clearFilters$1 as C, selectListing as D, triggerSearch as E, Context as F, getFilters as G, UPDATE_SELECTED_FILTERS as H, UPDATE_SEARCH_TERM as I, UPDATE_PAGE_SIZE as J, UPDATE_PAGE_INDEX as K, SET_SEARCH_ENTRIES as L, SET_ROUTE_FILTERS as M, LOAD_FILTERS_COMPLETE as N, LOAD_FILTERS_ERROR as O, LOAD_FILTERS as P, EXECUTE_SEARCH_ERROR as Q, EXECUTE_SEARCH as R, SET_SEARCH_FILTERS as S, CLEAR_FILTERS as T, UPDATE_SORT_ORDER as U, APPLY_CONFIG as V, actions as W, selectors as X, types as Y, expressions as Z, queries as _, getTabsAndFacets$1 as a, useListing as a0, doSearch as a1, setRouteFilters as a2, searchSagas as a3, triggerListingSsr as a4, triggerMinilistSsr as a5, triggerSearchSsr as a6, defaultExpressions as a7, termExpressions as a8, contentTypeIdExpression as a9, filterExpressions as aa, orderByExpression as ab, customWhereExpressions as ac, cloneDeep as ad, getQueryParameter$2 as b, getSelectedFilters as c, getSearchTotalCount$1 as d, getSearchTerm$2 as e, getResultsInfo as f, getTotalCount$1 as g, getResults as h, getPageIsLoading$2 as i, getPaging as j, getIsLoading$2 as k, getRenderableFilters$2 as l, getFeaturedResults$2 as m, getFacetTitles$1 as n, getFacetsTotalCount$1 as o, getTabFacets$1 as p, getFacet$1 as q, getCurrentTab$1 as r, getPageIndex$2 as s, getCurrentFacet as t, updateSortOrder$1 as u, updateSelectedFilters as v, withMappers as w, updateSearchTerm$1 as x, updatePageSize$1 as y, updatePageIndex$1 as z };
6069
- //# sourceMappingURL=sagas-BZXCxsop.js.map
6070
+ //# sourceMappingURL=sagas-BroWtJz8.js.map