@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.
@@ -1,3 +1,4 @@
1
1
  export declare const STRAPI_URI: string;
2
2
  export declare const STRAPI_DEFAULT_PAGE_SIZE = "100";
3
+ export declare const STRAPI_DEFAULT_POPULATE_DEPTH = "4";
3
4
  export declare const STRAPI_FALLBACK_LOCALE = "en";
@@ -390,6 +390,7 @@ function _taggedTemplateLiteralLoose(e, t) {
390
390
 
391
391
  var STRAPI_URI = process.env.NEXT_PUBLIC_STRAPI_URI || 'http://127.0.0.1:1337';
392
392
  var STRAPI_DEFAULT_PAGE_SIZE = '100';
393
+ var STRAPI_DEFAULT_POPULATE_DEPTH = '4';
393
394
  var STRAPI_FALLBACK_LOCALE = 'en';
394
395
 
395
396
  var strapiClient = /*#__PURE__*/axiosCacheInterceptor.setupCache(/*#__PURE__*/axios__default.default.create({
@@ -501,7 +502,7 @@ var getPortfolioProjects = /*#__PURE__*/function () {
501
502
  }
502
503
  cache = preview ? false : undefined;
503
504
  params = {
504
- pLevel: '6',
505
+ pLevel: STRAPI_DEFAULT_POPULATE_DEPTH,
505
506
  locale: locale,
506
507
  'pagination[pageSize]': STRAPI_DEFAULT_PAGE_SIZE,
507
508
  status: preview ? 'draft' : 'published'
@@ -565,7 +566,7 @@ var getStrapiCollectionType = /*#__PURE__*/function () {
565
566
  _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;
566
567
  cache = preview ? false : undefined;
567
568
  sharedParams = {
568
- pLevel: '6',
569
+ pLevel: STRAPI_DEFAULT_POPULATE_DEPTH,
569
570
  'pagination[pageSize]': STRAPI_DEFAULT_PAGE_SIZE,
570
571
  filters: filters,
571
572
  status: preview ? 'draft' : 'published'
@@ -635,7 +636,7 @@ var getStrapiSingleType = /*#__PURE__*/function () {
635
636
  _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;
636
637
  cache = preview ? false : undefined;
637
638
  params = {
638
- pLevel: '6',
639
+ pLevel: STRAPI_DEFAULT_POPULATE_DEPTH,
639
640
  locale: locale,
640
641
  'pagination[pageSize]': STRAPI_DEFAULT_PAGE_SIZE,
641
642
  filters: filters,
@@ -6183,7 +6184,7 @@ var Events = function Events(_ref) {
6183
6184
  url.searchParams.append('pagination[limit]', batchSize.toString());
6184
6185
  url.searchParams.append(startFilter, now);
6185
6186
  url.searchParams.append('locale', locale);
6186
- url.searchParams.append('pLevel', '6');
6187
+ url.searchParams.append('pLevel', STRAPI_DEFAULT_POPULATE_DEPTH);
6187
6188
  if (sort[0] === Sort.OLDEST_FIRST) {
6188
6189
  url.searchParams.append('sort', 'start:asc');
6189
6190
  } else {
@@ -6250,7 +6251,7 @@ var Events = function Events(_ref) {
6250
6251
  case 0:
6251
6252
  url = new URL("/treely-events", STRAPI_URI);
6252
6253
  url.searchParams.append('locale', locale);
6253
- url.searchParams.append('pLevel', '6');
6254
+ url.searchParams.append('pLevel', STRAPI_DEFAULT_POPULATE_DEPTH);
6254
6255
  _context.next = 5;
6255
6256
  return fetch(STRAPI_URI + "/api/treely-events" + url.search, {
6256
6257
  headers: {