@treely/strapi-slices 5.14.0 → 5.15.1

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.
@@ -9,6 +9,7 @@ declare const messagesDe: {
9
9
  'features.projectInfo.properties.verificationStandard.label': string;
10
10
  'features.projectInfo.properties.verificationStandard.value.SilvaconsultFCSISO14': string;
11
11
  'features.projectInfo.properties.verificationStandard.value.MfKWCH': string;
12
+ 'features.projectInfo.properties.forecastedAmountYear.toolTip': string;
12
13
  'features.projectInfo.properties.forecastedAmountYear.label': string;
13
14
  'features.projectInfo.properties.riskBuffer': string;
14
15
  'features.projectInfo.properties.year': string;
@@ -10,6 +10,7 @@ declare const messagesEn: {
10
10
  'features.projectInfo.properties.verificationStandard.value.SilvaconsultFCSISO14': string;
11
11
  'features.projectInfo.properties.verificationStandard.value.MfKWCH': string;
12
12
  'features.projectInfo.properties.forecastedAmountYear.label': string;
13
+ 'features.projectInfo.properties.forecastedAmountYear.toolTip': string;
13
14
  'features.projectInfo.properties.riskBuffer': string;
14
15
  'features.projectInfo.properties.year': string;
15
16
  };
@@ -55,6 +55,7 @@ declare const rootMessagesDe: {
55
55
  'features.projectInfo.properties.verificationStandard.label': string;
56
56
  'features.projectInfo.properties.verificationStandard.value.SilvaconsultFCSISO14': string;
57
57
  'features.projectInfo.properties.verificationStandard.value.MfKWCH': string;
58
+ 'features.projectInfo.properties.forecastedAmountYear.toolTip': string;
58
59
  'features.projectInfo.properties.forecastedAmountYear.label': string;
59
60
  'features.projectInfo.properties.riskBuffer': string;
60
61
  'features.projectInfo.properties.year': string;
@@ -56,6 +56,7 @@ declare const rootMessagesEn: {
56
56
  'features.projectInfo.properties.verificationStandard.value.SilvaconsultFCSISO14': string;
57
57
  'features.projectInfo.properties.verificationStandard.value.MfKWCH': string;
58
58
  'features.projectInfo.properties.forecastedAmountYear.label': string;
59
+ 'features.projectInfo.properties.forecastedAmountYear.toolTip': string;
59
60
  'features.projectInfo.properties.riskBuffer': string;
60
61
  'features.projectInfo.properties.year': string;
61
62
  'components.portfolioProjectCard.text.yes': string;
@@ -410,7 +410,9 @@ var strapiClient = /*#__PURE__*/axiosCacheInterceptor.setupCache( /*#__PURE__*/a
410
410
  });
411
411
  },
412
412
  timeout: 60000
413
- }));
413
+ }), {
414
+ ttl: /*#__PURE__*/STRAPI_URI.includes('127.0.0.1') || /*#__PURE__*/STRAPI_URI.includes('localhost') ? 0 : 10 * 60 * 1000 // 10 minutes
415
+ });
414
416
 
415
417
  var getAllSlugsFromStrapi = /*#__PURE__*/function () {
416
418
  var _ref = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(path, locales, _temp) {
@@ -475,12 +477,14 @@ var fpmClient = /*#__PURE__*/axiosCacheInterceptor.setupCache( /*#__PURE__*/axio
475
477
  });
476
478
  },
477
479
  timeout: 5000
478
- }));
480
+ }), {
481
+ ttl: /*#__PURE__*/FPM_API_URI.includes('127.0.0.1') || /*#__PURE__*/FPM_API_URI.includes('localhost') ? 0 : 10 * 60 * 1000 // 10 minutes
482
+ });
479
483
 
480
484
  var FALLBACK_LOCALE = 'en';
481
485
  var getPortfolioProjects = /*#__PURE__*/function () {
482
486
  var _ref = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(locale, preview) {
483
- var params, _yield$Promise$all, fpmProjects, strapiProjectsLocalized, strapiProjectsEnglish, strapiProjects, _i, _arr, project;
487
+ var cache, params, _yield$Promise$all, fpmProjects, strapiProjectsLocalized, strapiProjectsEnglish, strapiProjects, _i, _arr, project;
484
488
  return _regeneratorRuntime().wrap(function _callee$(_context) {
485
489
  while (1) switch (_context.prev = _context.next) {
486
490
  case 0:
@@ -490,6 +494,7 @@ var getPortfolioProjects = /*#__PURE__*/function () {
490
494
  if (preview === void 0) {
491
495
  preview = false;
492
496
  }
497
+ cache = preview ? false : undefined;
493
498
  params = {
494
499
  populate: 'deep,6',
495
500
  locale: locale,
@@ -498,15 +503,19 @@ var getPortfolioProjects = /*#__PURE__*/function () {
498
503
  if (preview) {
499
504
  params.publicationState = 'preview';
500
505
  }
501
- _context.next = 6;
502
- return Promise.all([fpmClient.get('/public/projects'), strapiClient.get('/projects', {
503
- params: params
506
+ _context.next = 7;
507
+ return Promise.all([fpmClient.get('/public/projects', {
508
+ cache: cache
509
+ }), strapiClient.get('/projects', {
510
+ params: params,
511
+ cache: cache
504
512
  }), strapiClient.get('/projects', {
505
513
  params: _extends({}, params, {
506
514
  locale: FALLBACK_LOCALE
507
- })
515
+ }),
516
+ cache: cache
508
517
  })]);
509
- case 6:
518
+ case 7:
510
519
  _yield$Promise$all = _context.sent;
511
520
  fpmProjects = _yield$Promise$all[0].data;
512
521
  strapiProjectsLocalized = _yield$Promise$all[1].data;
@@ -539,7 +548,7 @@ var getPortfolioProjects = /*#__PURE__*/function () {
539
548
  }
540
549
  return toReturn;
541
550
  }));
542
- case 13:
551
+ case 14:
543
552
  case "end":
544
553
  return _context.stop();
545
554
  }
@@ -582,11 +591,12 @@ var getStaticPathsFromStrapi = /*#__PURE__*/function () {
582
591
  /** @deprecated Migrate to getStrapiSingleType or getStrapiCollectionType */
583
592
  var getStaticPropsFromStrapi = /*#__PURE__*/function () {
584
593
  var _ref2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(path, _ref) {
585
- var _ref$locale, locale, slug, _ref$preview, preview, _ref$filters, filters, enrichedFilters, params;
594
+ var _ref$locale, locale, slug, _ref$preview, preview, _ref$filters, filters, cache, enrichedFilters, params;
586
595
  return _regeneratorRuntime().wrap(function _callee$(_context) {
587
596
  while (1) switch (_context.prev = _context.next) {
588
597
  case 0:
589
598
  _ref$locale = _ref.locale, locale = _ref$locale === void 0 ? 'en' : _ref$locale, slug = _ref.slug, _ref$preview = _ref.preview, preview = _ref$preview === void 0 ? false : _ref$preview, _ref$filters = _ref.filters, filters = _ref$filters === void 0 ? {} : _ref$filters;
599
+ cache = preview ? false : undefined;
590
600
  enrichedFilters = filters;
591
601
  if (slug) {
592
602
  enrichedFilters.slug = slug;
@@ -601,9 +611,10 @@ var getStaticPropsFromStrapi = /*#__PURE__*/function () {
601
611
  params.publicationState = 'preview';
602
612
  }
603
613
  return _context.abrupt("return", strapiClient.get(path, {
604
- params: params
614
+ params: params,
615
+ cache: cache
605
616
  }));
606
- case 6:
617
+ case 7:
607
618
  case "end":
608
619
  return _context.stop();
609
620
  }
@@ -616,11 +627,12 @@ var getStaticPropsFromStrapi = /*#__PURE__*/function () {
616
627
 
617
628
  var getStrapiCollectionType = /*#__PURE__*/function () {
618
629
  var _ref2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(path, key, _ref) {
619
- var _ref$locale, locale, _ref$preview, preview, _ref$filters, filters, params, _yield$strapiClient$g, data, localizedResponses, fallbackResponses, responses;
630
+ var _ref$locale, locale, _ref$preview, preview, _ref$filters, filters, cache, params, _yield$strapiClient$g, data, localizedResponses, fallbackResponses, responses;
620
631
  return _regeneratorRuntime().wrap(function _callee$(_context) {
621
632
  while (1) switch (_context.prev = _context.next) {
622
633
  case 0:
623
634
  _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;
635
+ cache = preview ? false : undefined;
624
636
  params = {
625
637
  populate: 'deep,6',
626
638
  locale: 'all',
@@ -630,11 +642,12 @@ var getStrapiCollectionType = /*#__PURE__*/function () {
630
642
  if (preview) {
631
643
  params.publicationState = 'preview';
632
644
  }
633
- _context.next = 5;
645
+ _context.next = 6;
634
646
  return strapiClient.get(path, {
635
- params: params
647
+ params: params,
648
+ cache: cache
636
649
  });
637
- case 5:
650
+ case 6:
638
651
  _yield$strapiClient$g = _context.sent;
639
652
  data = _yield$strapiClient$g.data;
640
653
  localizedResponses = data.data.filter(function (d) {
@@ -650,7 +663,7 @@ var getStrapiCollectionType = /*#__PURE__*/function () {
650
663
  return localizedResponse || fallbackResponse;
651
664
  });
652
665
  return _context.abrupt("return", responses);
653
- case 11:
666
+ case 12:
654
667
  case "end":
655
668
  return _context.stop();
656
669
  }
@@ -663,11 +676,12 @@ var getStrapiCollectionType = /*#__PURE__*/function () {
663
676
 
664
677
  var getStrapiSingleType = /*#__PURE__*/function () {
665
678
  var _ref2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(path, _ref) {
666
- var _ref$locale, locale, _ref$preview, preview, _ref$filters, filters, params, response, _error$response;
679
+ var _ref$locale, locale, _ref$preview, preview, _ref$filters, filters, cache, params, response, _error$response;
667
680
  return _regeneratorRuntime().wrap(function _callee$(_context) {
668
681
  while (1) switch (_context.prev = _context.next) {
669
682
  case 0:
670
683
  _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;
684
+ cache = preview ? false : undefined;
671
685
  params = {
672
686
  populate: 'deep,6',
673
687
  locale: locale,
@@ -677,37 +691,39 @@ var getStrapiSingleType = /*#__PURE__*/function () {
677
691
  if (preview) {
678
692
  params.publicationState = 'preview';
679
693
  }
680
- _context.prev = 3;
681
- _context.next = 6;
694
+ _context.prev = 4;
695
+ _context.next = 7;
682
696
  return strapiClient.get(path, {
683
- params: params
697
+ params: params,
698
+ cache: cache
684
699
  });
685
- case 6:
700
+ case 7:
686
701
  response = _context.sent;
687
702
  return _context.abrupt("return", response.data.data);
688
- case 10:
689
- _context.prev = 10;
690
- _context.t0 = _context["catch"](3);
703
+ case 11:
704
+ _context.prev = 11;
705
+ _context.t0 = _context["catch"](4);
691
706
  if (!(_context.t0.isAxiosError && ((_error$response = _context.t0.response) == null ? void 0 : _error$response.status) === 404)) {
692
- _context.next = 17;
707
+ _context.next = 18;
693
708
  break;
694
709
  }
695
- _context.next = 15;
710
+ _context.next = 16;
696
711
  return strapiClient.get(path, {
697
712
  params: _extends({}, params, {
698
713
  locale: STRAPI_FALLBACK_LOCALE
699
- })
714
+ }),
715
+ cache: cache
700
716
  });
701
- case 15:
717
+ case 16:
702
718
  response = _context.sent;
703
719
  return _context.abrupt("return", response.data.data);
704
- case 17:
705
- throw _context.t0;
706
720
  case 18:
721
+ throw _context.t0;
722
+ case 19:
707
723
  case "end":
708
724
  return _context.stop();
709
725
  }
710
- }, _callee, null, [[3, 10]]);
726
+ }, _callee, null, [[4, 11]]);
711
727
  }));
712
728
  return function getStrapiSingleType(_x, _x2) {
713
729
  return _ref2.apply(this, arguments);
@@ -2395,6 +2411,7 @@ var messagesDe$6 = {
2395
2411
  'features.projectInfo.properties.verificationStandard.label': 'Verifizierungsstandard',
2396
2412
  'features.projectInfo.properties.verificationStandard.value.SilvaconsultFCSISO14': 'SILVACONSULT® Forest Carbon Standard, ISO 14064-2',
2397
2413
  'features.projectInfo.properties.verificationStandard.value.MfKWCH': 'Methodik für Klimaschutzprojekte im Wald für die Schweiz',
2414
+ 'features.projectInfo.properties.forecastedAmountYear.toolTip': 'Dies ist das jährliche Projekt-Senkenvolumen gemäß dem TÜV-geprüften PDD, dieser Wert stellt nicht die aktuellen Verfügbarkeiten dar.',
2398
2415
  'features.projectInfo.properties.forecastedAmountYear.label': 'Projektvolumen',
2399
2416
  'features.projectInfo.properties.riskBuffer': 'Anteil Risikopuffer',
2400
2417
  'features.projectInfo.properties.year': '{years} {years, plural, one {Jahr} other {Jahre} }'
@@ -2515,6 +2532,7 @@ var messagesEn$4 = {
2515
2532
  'features.projectInfo.properties.verificationStandard.value.SilvaconsultFCSISO14': 'SILVACONSULT® Forest Carbon Standard, ISO 14064-2',
2516
2533
  'features.projectInfo.properties.verificationStandard.value.MfKWCH': 'Methodik für Klimaschutzprojekte im Wald für die Schweiz',
2517
2534
  'features.projectInfo.properties.forecastedAmountYear.label': 'Project Volume',
2535
+ 'features.projectInfo.properties.forecastedAmountYear.toolTip': "This is the yearly project sink volume according to the TÜV-verified PDD, this value doesn't represent current availabilities.",
2518
2536
  'features.projectInfo.properties.riskBuffer': 'Risk Buffer Share',
2519
2537
  'features.projectInfo.properties.year': '{years} {years, plural, one {year} other {years} }'
2520
2538
  };
@@ -4879,6 +4897,10 @@ var ProjectInfo = function ProjectInfo(_ref) {
4879
4897
  columns: [1, null, null, 2],
4880
4898
  spacingX: "10",
4881
4899
  spacingY: "8"
4900
+ }, React__default.default.createElement(boemly.Tooltip, {
4901
+ label: formatMessage({
4902
+ id: 'features.projectInfo.properties.forecastedAmountYear.toolTip'
4903
+ })
4882
4904
  }, React__default.default.createElement(boemly.Box, null, React__default.default.createElement(boemly.LabelTextPair, {
4883
4905
  label: formatMessage({
4884
4906
  id: 'features.projectInfo.properties.forecastedAmountYear.label'
@@ -4891,7 +4913,7 @@ var ProjectInfo = function ProjectInfo(_ref) {
4891
4913
  })
4892
4914
  }),
4893
4915
  caption: subtitles.forecastedAmountSubtitle
4894
- })), React__default.default.createElement(boemly.Box, null, React__default.default.createElement(boemly.LabelTextPair, {
4916
+ }))), React__default.default.createElement(boemly.Box, null, React__default.default.createElement(boemly.LabelTextPair, {
4895
4917
  label: formatMessage({
4896
4918
  id: 'features.projectInfo.properties.riskBuffer'
4897
4919
  }),