@treely/strapi-slices 7.5.4 → 7.5.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.
@@ -372,6 +372,7 @@ function _taggedTemplateLiteralLoose(e, t) {
372
372
 
373
373
  var STRAPI_URI = process.env.NEXT_PUBLIC_STRAPI_URI || 'http://127.0.0.1:1337';
374
374
  var STRAPI_DEFAULT_PAGE_SIZE = '100';
375
+ var STRAPI_DEFAULT_POPULATE_DEPTH = '4';
375
376
  var STRAPI_FALLBACK_LOCALE = 'en';
376
377
 
377
378
  var strapiClient = /*#__PURE__*/setupCache(/*#__PURE__*/axios.create({
@@ -483,7 +484,7 @@ var getPortfolioProjects = /*#__PURE__*/function () {
483
484
  }
484
485
  cache = preview ? false : undefined;
485
486
  params = {
486
- pLevel: '6',
487
+ pLevel: STRAPI_DEFAULT_POPULATE_DEPTH,
487
488
  locale: locale,
488
489
  'pagination[pageSize]': STRAPI_DEFAULT_PAGE_SIZE,
489
490
  status: preview ? 'draft' : 'published'
@@ -547,7 +548,7 @@ var getStrapiCollectionType = /*#__PURE__*/function () {
547
548
  _ref$locale = _ref.locale, locale = _ref$locale === void 0 ? 'en' : _ref$locale, _ref$preview = _ref.preview, preview = _ref$preview === void 0 ? false : _ref$preview, _ref$filters = _ref.filters, filters = _ref$filters === void 0 ? {} : _ref$filters;
548
549
  cache = preview ? false : undefined;
549
550
  sharedParams = {
550
- pLevel: '6',
551
+ pLevel: STRAPI_DEFAULT_POPULATE_DEPTH,
551
552
  'pagination[pageSize]': STRAPI_DEFAULT_PAGE_SIZE,
552
553
  filters: filters,
553
554
  status: preview ? 'draft' : 'published'
@@ -617,7 +618,7 @@ var getStrapiSingleType = /*#__PURE__*/function () {
617
618
  _ref$locale = _ref.locale, locale = _ref$locale === void 0 ? 'en' : _ref$locale, _ref$preview = _ref.preview, preview = _ref$preview === void 0 ? false : _ref$preview, _ref$filters = _ref.filters, filters = _ref$filters === void 0 ? {} : _ref$filters;
618
619
  cache = preview ? false : undefined;
619
620
  params = {
620
- pLevel: '6',
621
+ pLevel: STRAPI_DEFAULT_POPULATE_DEPTH,
621
622
  locale: locale,
622
623
  'pagination[pageSize]': STRAPI_DEFAULT_PAGE_SIZE,
623
624
  filters: filters,
@@ -6165,7 +6166,7 @@ var Events = function Events(_ref) {
6165
6166
  url.searchParams.append('pagination[limit]', batchSize.toString());
6166
6167
  url.searchParams.append(startFilter, now);
6167
6168
  url.searchParams.append('locale', locale);
6168
- url.searchParams.append('pLevel', '6');
6169
+ url.searchParams.append('pLevel', STRAPI_DEFAULT_POPULATE_DEPTH);
6169
6170
  if (sort[0] === Sort.OLDEST_FIRST) {
6170
6171
  url.searchParams.append('sort', 'start:asc');
6171
6172
  } else {
@@ -6232,7 +6233,7 @@ var Events = function Events(_ref) {
6232
6233
  case 0:
6233
6234
  url = new URL("/treely-events", STRAPI_URI);
6234
6235
  url.searchParams.append('locale', locale);
6235
- url.searchParams.append('pLevel', '6');
6236
+ url.searchParams.append('pLevel', STRAPI_DEFAULT_POPULATE_DEPTH);
6236
6237
  _context.next = 5;
6237
6238
  return fetch(STRAPI_URI + "/api/treely-events" + url.search, {
6238
6239
  headers: {