@treely/strapi-slices 5.11.3 → 5.13.0
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/components/ContextProvider/ContextProvider.d.ts +1 -2
- package/dist/constants/strapi.d.ts +1 -0
- package/dist/index.d.ts +6 -3
- package/dist/integrations/strapi/getAllSlugsFromStrapi.d.ts +10 -0
- package/dist/integrations/strapi/getStaticPathsFromStrapi.d.ts +1 -0
- package/dist/integrations/strapi/getStaticPropsFromStrapi.d.ts +1 -0
- package/dist/integrations/strapi/getStrapiCollectionType.d.ts +10 -0
- package/dist/integrations/strapi/getStrapiSingleType.d.ts +8 -0
- package/dist/models/Locale.d.ts +3 -1
- package/dist/models/LocalizedEntity.d.ts +7 -0
- package/dist/models/PageProps.d.ts +1 -0
- package/dist/models/strapi/StrapiGlobal.d.ts +2 -0
- package/dist/strapi-slices.cjs.development.js +205 -31
- package/dist/strapi-slices.cjs.development.js.map +1 -1
- package/dist/strapi-slices.cjs.production.min.js +1 -1
- package/dist/strapi-slices.cjs.production.min.js.map +1 -1
- package/dist/strapi-slices.esm.js +205 -34
- package/dist/strapi-slices.esm.js.map +1 -1
- package/dist/utils/getMessages.d.ts +142 -0
- package/package.json +1 -1
- package/src/components/ContextProvider/ContextProvider.tsx +3 -5
- package/src/components/MinimalProviders/MinimalProviders.tsx +2 -8
- package/src/constants/strapi.ts +2 -0
- package/src/index.tsx +8 -2
- package/src/integrations/strapi/getAllSlugsFromStrapi.test.ts +33 -0
- package/src/integrations/strapi/getAllSlugsFromStrapi.ts +50 -0
- package/src/integrations/strapi/getPortfolioProjects.test.ts +24 -0
- package/src/integrations/strapi/getPortfolioProjects.ts +25 -5
- package/src/integrations/strapi/getStaticPathsFromStrapi.ts +1 -0
- package/src/integrations/strapi/getStaticPropsFromStrapi.ts +1 -0
- package/src/integrations/strapi/getStrapiCollectionType.test.ts +65 -0
- package/src/integrations/strapi/getStrapiCollectionType.ts +61 -0
- package/src/integrations/strapi/getStrapiSingleType.test.ts +53 -0
- package/src/integrations/strapi/getStrapiSingleType.ts +50 -0
- package/src/models/Locale.ts +3 -1
- package/src/models/LocalizedEntity.ts +9 -0
- package/src/models/PageProps.ts +1 -0
- package/src/models/strapi/StrapiGlobal.ts +2 -0
- package/src/test/strapiMocks/minimalGlobalData.ts +1 -0
- package/src/utils/getMessages.ts +18 -0
- package/src/utils/mergeGlobalAndStrapiBlogPostData.test.ts +25 -4
- package/src/utils/mergeGlobalAndStrapiBlogPostData.ts +1 -0
- package/src/utils/mergeGlobalAndStrapiCustomerStoryData.test.ts +24 -4
- package/src/utils/mergeGlobalAndStrapiCustomerStoryData.ts +1 -0
- package/src/utils/mergeGlobalAndStrapiPageData.test.ts +22 -0
- package/src/utils/mergeGlobalAndStrapiPageData.ts +1 -0
- package/src/utils/mergeGlobalAndStrapiProjectData.test.ts +25 -4
- package/src/utils/mergeGlobalAndStrapiProjectData.ts +1 -0
|
@@ -14,7 +14,7 @@ import styled from '@emotion/styled';
|
|
|
14
14
|
import { css, Global } from '@emotion/react';
|
|
15
15
|
import { motion, AnimatePresence } from 'framer-motion';
|
|
16
16
|
import { createIntl, createIntlCache, IntlProvider, IntlContext as IntlContext$1, FormattedMessage } from 'react-intl';
|
|
17
|
-
import mapboxgl, { Map, Marker } from 'mapbox-gl';
|
|
17
|
+
import mapboxgl, { Map as Map$1, Marker } from 'mapbox-gl';
|
|
18
18
|
import { createRoot } from 'react-dom/client';
|
|
19
19
|
import { Formik, Form, Field } from 'formik';
|
|
20
20
|
|
|
@@ -385,34 +385,87 @@ function _taggedTemplateLiteralLoose(strings, raw) {
|
|
|
385
385
|
|
|
386
386
|
var STRAPI_URI = process.env.NEXT_PUBLIC_STRAPI_URI || 'http://127.0.0.1:1337';
|
|
387
387
|
var STRAPI_DEFAULT_PAGE_SIZE = '100';
|
|
388
|
+
var STRAPI_FALLBACK_LOCALE = 'en';
|
|
388
389
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
var CDN_URI = 'https://cdn.tree.ly';
|
|
392
|
-
|
|
393
|
-
var fpmClient = /*#__PURE__*/setupCache( /*#__PURE__*/axios.create({
|
|
394
|
-
baseURL: FPM_API_URI + "/v1",
|
|
390
|
+
var strapiClient = /*#__PURE__*/setupCache( /*#__PURE__*/axios.create({
|
|
391
|
+
baseURL: STRAPI_URI + "/api",
|
|
395
392
|
paramsSerializer: function paramsSerializer(p) {
|
|
396
393
|
return qs.stringify(p, {
|
|
397
394
|
encodeValuesOnly: true
|
|
398
395
|
});
|
|
399
396
|
},
|
|
400
|
-
timeout:
|
|
397
|
+
timeout: 60000
|
|
401
398
|
}));
|
|
402
399
|
|
|
403
|
-
var
|
|
404
|
-
|
|
400
|
+
var getAllSlugsFromStrapi = /*#__PURE__*/function () {
|
|
401
|
+
var _ref = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(path, locales, _temp) {
|
|
402
|
+
var _ref2, _ref2$filters, filters, params, _yield$strapiClient$g, data, slugs, fallBackSlugs, nonFallbackSlugs;
|
|
403
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
404
|
+
while (1) switch (_context.prev = _context.next) {
|
|
405
|
+
case 0:
|
|
406
|
+
_ref2 = _temp === void 0 ? {
|
|
407
|
+
filters: {}
|
|
408
|
+
} : _temp, _ref2$filters = _ref2.filters, filters = _ref2$filters === void 0 ? {} : _ref2$filters;
|
|
409
|
+
params = {
|
|
410
|
+
locale: 'all',
|
|
411
|
+
'pagination[pageSize]': STRAPI_DEFAULT_PAGE_SIZE,
|
|
412
|
+
filters: filters
|
|
413
|
+
};
|
|
414
|
+
_context.next = 4;
|
|
415
|
+
return strapiClient.get(path, {
|
|
416
|
+
params: params
|
|
417
|
+
});
|
|
418
|
+
case 4:
|
|
419
|
+
_yield$strapiClient$g = _context.sent;
|
|
420
|
+
data = _yield$strapiClient$g.data;
|
|
421
|
+
slugs = data.data.map(function (page) {
|
|
422
|
+
return {
|
|
423
|
+
slug: page.attributes.slug,
|
|
424
|
+
locale: page.attributes.locale
|
|
425
|
+
};
|
|
426
|
+
});
|
|
427
|
+
fallBackSlugs = locales.flatMap(function (locale) {
|
|
428
|
+
return slugs.filter(function (slug) {
|
|
429
|
+
return slug.locale === STRAPI_FALLBACK_LOCALE;
|
|
430
|
+
}).map(function (slug) {
|
|
431
|
+
return _extends({}, slug, {
|
|
432
|
+
locale: locale
|
|
433
|
+
});
|
|
434
|
+
});
|
|
435
|
+
});
|
|
436
|
+
nonFallbackSlugs = slugs.filter(function (p) {
|
|
437
|
+
return p.locale !== STRAPI_FALLBACK_LOCALE;
|
|
438
|
+
});
|
|
439
|
+
return _context.abrupt("return", [].concat(fallBackSlugs, nonFallbackSlugs));
|
|
440
|
+
case 10:
|
|
441
|
+
case "end":
|
|
442
|
+
return _context.stop();
|
|
443
|
+
}
|
|
444
|
+
}, _callee);
|
|
445
|
+
}));
|
|
446
|
+
return function getAllSlugsFromStrapi(_x, _x2, _x3) {
|
|
447
|
+
return _ref.apply(this, arguments);
|
|
448
|
+
};
|
|
449
|
+
}();
|
|
450
|
+
|
|
451
|
+
process.env.NEXT_PUBLIC_API_URI || 'http://localhost:4001';
|
|
452
|
+
var FPM_API_URI = process.env.NEXT_PUBLIC_FPM_API_URI || 'https://api.fpm.t-staging.com';
|
|
453
|
+
var CDN_URI = 'https://cdn.tree.ly';
|
|
454
|
+
|
|
455
|
+
var fpmClient = /*#__PURE__*/setupCache( /*#__PURE__*/axios.create({
|
|
456
|
+
baseURL: FPM_API_URI + "/v1",
|
|
405
457
|
paramsSerializer: function paramsSerializer(p) {
|
|
406
458
|
return qs.stringify(p, {
|
|
407
459
|
encodeValuesOnly: true
|
|
408
460
|
});
|
|
409
461
|
},
|
|
410
|
-
timeout:
|
|
462
|
+
timeout: 5000
|
|
411
463
|
}));
|
|
412
464
|
|
|
465
|
+
var FALLBACK_LOCALE = 'en';
|
|
413
466
|
var getPortfolioProjects = /*#__PURE__*/function () {
|
|
414
467
|
var _ref = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(locale, preview) {
|
|
415
|
-
var params, _yield$Promise$all, fpmProjects, strapiProjects;
|
|
468
|
+
var params, _yield$Promise$all, fpmProjects, strapiProjectsLocalized, strapiProjectsEnglish, strapiProjects, _i, _arr, project;
|
|
416
469
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
417
470
|
while (1) switch (_context.prev = _context.next) {
|
|
418
471
|
case 0:
|
|
@@ -433,16 +486,26 @@ var getPortfolioProjects = /*#__PURE__*/function () {
|
|
|
433
486
|
_context.next = 6;
|
|
434
487
|
return Promise.all([fpmClient.get('/public/projects'), strapiClient.get('/projects', {
|
|
435
488
|
params: params
|
|
489
|
+
}), strapiClient.get('/projects', {
|
|
490
|
+
params: _extends({}, params, {
|
|
491
|
+
locale: FALLBACK_LOCALE
|
|
492
|
+
})
|
|
436
493
|
})]);
|
|
437
494
|
case 6:
|
|
438
495
|
_yield$Promise$all = _context.sent;
|
|
439
496
|
fpmProjects = _yield$Promise$all[0].data;
|
|
440
|
-
|
|
497
|
+
strapiProjectsLocalized = _yield$Promise$all[1].data;
|
|
498
|
+
strapiProjectsEnglish = _yield$Promise$all[2].data;
|
|
499
|
+
strapiProjects = new Map();
|
|
500
|
+
for (_i = 0, _arr = [].concat(strapiProjectsEnglish.data, strapiProjectsLocalized.data); _i < _arr.length; _i++) {
|
|
501
|
+
project = _arr[_i];
|
|
502
|
+
if (project.attributes.fpmProjectId) {
|
|
503
|
+
strapiProjects.set(project.attributes.fpmProjectId, project);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
441
506
|
return _context.abrupt("return", fpmProjects.map(function (fpmProject) {
|
|
442
507
|
var _strapiProject$attrib;
|
|
443
|
-
var strapiProject = strapiProjects.
|
|
444
|
-
return sp.attributes.fpmProjectId === fpmProject.id;
|
|
445
|
-
});
|
|
508
|
+
var strapiProject = strapiProjects.get(fpmProject.id);
|
|
446
509
|
var toReturn = fpmProject;
|
|
447
510
|
if (strapiProject != null && strapiProject.attributes.slug) {
|
|
448
511
|
toReturn.slug = strapiProject.attributes.slug;
|
|
@@ -461,7 +524,7 @@ var getPortfolioProjects = /*#__PURE__*/function () {
|
|
|
461
524
|
}
|
|
462
525
|
return toReturn;
|
|
463
526
|
}));
|
|
464
|
-
case
|
|
527
|
+
case 13:
|
|
465
528
|
case "end":
|
|
466
529
|
return _context.stop();
|
|
467
530
|
}
|
|
@@ -472,6 +535,7 @@ var getPortfolioProjects = /*#__PURE__*/function () {
|
|
|
472
535
|
};
|
|
473
536
|
}();
|
|
474
537
|
|
|
538
|
+
/** @deprecated Migrate to getAllSlugsFromStrapi */
|
|
475
539
|
var getStaticPathsFromStrapi = /*#__PURE__*/function () {
|
|
476
540
|
var _ref = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(path, _temp) {
|
|
477
541
|
var _ref2, _ref2$filters, filters, params;
|
|
@@ -500,6 +564,7 @@ var getStaticPathsFromStrapi = /*#__PURE__*/function () {
|
|
|
500
564
|
};
|
|
501
565
|
}();
|
|
502
566
|
|
|
567
|
+
/** @deprecated Migrate to getStrapiSingleType or getStrapiCollectionType */
|
|
503
568
|
var getStaticPropsFromStrapi = /*#__PURE__*/function () {
|
|
504
569
|
var _ref2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(path, _ref) {
|
|
505
570
|
var _ref$locale, locale, slug, _ref$preview, preview, _ref$filters, filters, enrichedFilters, params;
|
|
@@ -534,6 +599,106 @@ var getStaticPropsFromStrapi = /*#__PURE__*/function () {
|
|
|
534
599
|
};
|
|
535
600
|
}();
|
|
536
601
|
|
|
602
|
+
var getStrapiCollectionType = /*#__PURE__*/function () {
|
|
603
|
+
var _ref2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(path, key, _ref) {
|
|
604
|
+
var _ref$locale, locale, _ref$preview, preview, _ref$filters, filters, params, _yield$strapiClient$g, data, localizedResponses, fallbackResponses, responses;
|
|
605
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
606
|
+
while (1) switch (_context.prev = _context.next) {
|
|
607
|
+
case 0:
|
|
608
|
+
_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;
|
|
609
|
+
params = {
|
|
610
|
+
populate: 'deep,6',
|
|
611
|
+
locale: 'all',
|
|
612
|
+
'pagination[pageSize]': STRAPI_DEFAULT_PAGE_SIZE,
|
|
613
|
+
filters: filters
|
|
614
|
+
};
|
|
615
|
+
if (preview) {
|
|
616
|
+
params.publicationState = 'preview';
|
|
617
|
+
}
|
|
618
|
+
_context.next = 5;
|
|
619
|
+
return strapiClient.get(path, {
|
|
620
|
+
params: params
|
|
621
|
+
});
|
|
622
|
+
case 5:
|
|
623
|
+
_yield$strapiClient$g = _context.sent;
|
|
624
|
+
data = _yield$strapiClient$g.data;
|
|
625
|
+
localizedResponses = data.data.filter(function (d) {
|
|
626
|
+
return d.attributes.locale === locale;
|
|
627
|
+
});
|
|
628
|
+
fallbackResponses = data.data.filter(function (d) {
|
|
629
|
+
return d.attributes.locale === STRAPI_FALLBACK_LOCALE;
|
|
630
|
+
});
|
|
631
|
+
responses = fallbackResponses.map(function (fallbackResponse) {
|
|
632
|
+
var localizedResponse = localizedResponses.find(function (localized) {
|
|
633
|
+
return localized.attributes[key] === fallbackResponse.attributes[key];
|
|
634
|
+
});
|
|
635
|
+
return localizedResponse || fallbackResponse;
|
|
636
|
+
});
|
|
637
|
+
return _context.abrupt("return", responses);
|
|
638
|
+
case 11:
|
|
639
|
+
case "end":
|
|
640
|
+
return _context.stop();
|
|
641
|
+
}
|
|
642
|
+
}, _callee);
|
|
643
|
+
}));
|
|
644
|
+
return function getStrapiCollectionType(_x, _x2, _x3) {
|
|
645
|
+
return _ref2.apply(this, arguments);
|
|
646
|
+
};
|
|
647
|
+
}();
|
|
648
|
+
|
|
649
|
+
var getStrapiSingleType = /*#__PURE__*/function () {
|
|
650
|
+
var _ref2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(path, _ref) {
|
|
651
|
+
var _ref$locale, locale, _ref$preview, preview, _ref$filters, filters, params, response, _error$response;
|
|
652
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
653
|
+
while (1) switch (_context.prev = _context.next) {
|
|
654
|
+
case 0:
|
|
655
|
+
_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;
|
|
656
|
+
params = {
|
|
657
|
+
populate: 'deep,6',
|
|
658
|
+
locale: locale,
|
|
659
|
+
'pagination[pageSize]': STRAPI_DEFAULT_PAGE_SIZE,
|
|
660
|
+
filters: filters
|
|
661
|
+
};
|
|
662
|
+
if (preview) {
|
|
663
|
+
params.publicationState = 'preview';
|
|
664
|
+
}
|
|
665
|
+
_context.prev = 3;
|
|
666
|
+
_context.next = 6;
|
|
667
|
+
return strapiClient.get(path, {
|
|
668
|
+
params: params
|
|
669
|
+
});
|
|
670
|
+
case 6:
|
|
671
|
+
response = _context.sent;
|
|
672
|
+
return _context.abrupt("return", response.data.data);
|
|
673
|
+
case 10:
|
|
674
|
+
_context.prev = 10;
|
|
675
|
+
_context.t0 = _context["catch"](3);
|
|
676
|
+
if (!(_context.t0.isAxiosError && ((_error$response = _context.t0.response) == null ? void 0 : _error$response.status) === 404)) {
|
|
677
|
+
_context.next = 17;
|
|
678
|
+
break;
|
|
679
|
+
}
|
|
680
|
+
_context.next = 15;
|
|
681
|
+
return strapiClient.get(path, {
|
|
682
|
+
params: _extends({}, params, {
|
|
683
|
+
locale: STRAPI_FALLBACK_LOCALE
|
|
684
|
+
})
|
|
685
|
+
});
|
|
686
|
+
case 15:
|
|
687
|
+
response = _context.sent;
|
|
688
|
+
return _context.abrupt("return", response.data.data);
|
|
689
|
+
case 17:
|
|
690
|
+
throw _context.t0;
|
|
691
|
+
case 18:
|
|
692
|
+
case "end":
|
|
693
|
+
return _context.stop();
|
|
694
|
+
}
|
|
695
|
+
}, _callee, null, [[3, 10]]);
|
|
696
|
+
}));
|
|
697
|
+
return function getStrapiSingleType(_x, _x2) {
|
|
698
|
+
return _ref2.apply(this, arguments);
|
|
699
|
+
};
|
|
700
|
+
}();
|
|
701
|
+
|
|
537
702
|
var strapiMediaUrl = function strapiMediaUrl(media, preferredSize) {
|
|
538
703
|
if (preferredSize === void 0) {
|
|
539
704
|
preferredSize = 'native';
|
|
@@ -598,7 +763,8 @@ var mergeGlobalAndStrapiBlogPostData = function mergeGlobalAndStrapiBlogPostData
|
|
|
598
763
|
banner: global.attributes.banner,
|
|
599
764
|
topBanner: (post == null ? void 0 : post.attributes.topBanner) || global.attributes.topBanner,
|
|
600
765
|
customerStories: [],
|
|
601
|
-
preview: !!context.preview
|
|
766
|
+
preview: !!context.preview,
|
|
767
|
+
isFallbackLocale: context.locale !== post.attributes.locale
|
|
602
768
|
});
|
|
603
769
|
};
|
|
604
770
|
|
|
@@ -637,7 +803,8 @@ var mergeGlobalAndStrapiCustomerStoryData = function mergeGlobalAndStrapiCustome
|
|
|
637
803
|
banner: global.attributes.banner,
|
|
638
804
|
topBanner: (customerStory == null ? void 0 : customerStory.attributes.topBanner) || global.attributes.topBanner,
|
|
639
805
|
blogPosts: [],
|
|
640
|
-
preview: !!context.preview
|
|
806
|
+
preview: !!context.preview,
|
|
807
|
+
isFallbackLocale: context.locale !== customerStory.attributes.locale
|
|
641
808
|
});
|
|
642
809
|
};
|
|
643
810
|
|
|
@@ -683,7 +850,8 @@ var mergeGlobalAndStrapiPageData = function mergeGlobalAndStrapiPageData(context
|
|
|
683
850
|
banner: global.attributes.banner,
|
|
684
851
|
topBanner: (page == null ? void 0 : page.attributes.topBanner) || global.attributes.topBanner,
|
|
685
852
|
customerStories: returnCustomerStories ? customerStories : [],
|
|
686
|
-
preview: !!context.preview
|
|
853
|
+
preview: !!context.preview,
|
|
854
|
+
isFallbackLocale: context.locale !== page.attributes.locale
|
|
687
855
|
});
|
|
688
856
|
};
|
|
689
857
|
|
|
@@ -726,7 +894,8 @@ var mergeGlobalAndStrapiProject = function mergeGlobalAndStrapiProject(context,
|
|
|
726
894
|
banner: global.attributes.banner,
|
|
727
895
|
topBanner: (project == null ? void 0 : project.attributes.topBanner) || global.attributes.topBanner,
|
|
728
896
|
customerStories: [],
|
|
729
|
-
preview: !!context.preview
|
|
897
|
+
preview: !!context.preview,
|
|
898
|
+
isFallbackLocale: context.locale !== project.attributes.locale
|
|
730
899
|
});
|
|
731
900
|
};
|
|
732
901
|
|
|
@@ -2153,6 +2322,9 @@ var CarouselInnerContainer = /*#__PURE__*/styled(motion.div)(_templateObject2$2
|
|
|
2153
2322
|
});
|
|
2154
2323
|
var CardContainer = /*#__PURE__*/styled(Box)(_templateObject3$1 || (_templateObject3$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: var(--boemly-sizes-sm);\n\n @media screen and (max-width: ", ") {\n width: var(--boemly-sizes-2xs);\n\n margin-right: var(--boemly-space-4);\n\n &:first-of-type {\n margin-left: var(--boemly-space-6);\n }\n }\n"])), BREAKPOINT_MD);
|
|
2155
2324
|
|
|
2325
|
+
var _templateObject$4;
|
|
2326
|
+
var GLOBAL_STYLE = /*#__PURE__*/css(_templateObject$4 || (_templateObject$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n :root {\n --default-hero-height: calc(100vh - var(--boemly-space-24));\n }\n\n a {\n text-decoration: none;\n }\n"])));
|
|
2327
|
+
|
|
2156
2328
|
var messagesDe$f = {
|
|
2157
2329
|
'sections.comparison.backgroundShapes': 'Hintergrundformen'
|
|
2158
2330
|
};
|
|
@@ -2391,17 +2563,20 @@ var unitMessagesEn = {
|
|
|
2391
2563
|
|
|
2392
2564
|
var rootMessagesEn = /*#__PURE__*/_extends({}, messagesEn$c, messagesEn$7, messagesEn$3, messagesEn$4, messagesEn$2, messagesEn$d, messagesEn$b, messagesEn$a, messagesEn$9, messagesEn$8, messagesEn$6, messagesEn$5, messagesEn$1, messagesDe, messagesEn, unitMessagesEn);
|
|
2393
2565
|
|
|
2394
|
-
var
|
|
2395
|
-
|
|
2566
|
+
var messages = {
|
|
2567
|
+
en: rootMessagesEn,
|
|
2568
|
+
de: rootMessagesDe
|
|
2569
|
+
};
|
|
2570
|
+
var getMessages = function getMessages(locale) {
|
|
2571
|
+
var messagesLocale = Object.keys(messages).includes("" + locale) ? locale : STRAPI_FALLBACK_LOCALE;
|
|
2572
|
+
return messages[messagesLocale];
|
|
2573
|
+
};
|
|
2396
2574
|
|
|
2397
2575
|
var cache = /*#__PURE__*/createIntlCache();
|
|
2398
2576
|
var intlFactory = function intlFactory(locale) {
|
|
2399
2577
|
return createIntl({
|
|
2400
2578
|
locale: locale,
|
|
2401
|
-
messages:
|
|
2402
|
-
de: rootMessagesDe,
|
|
2403
|
-
en: rootMessagesEn
|
|
2404
|
-
}[locale]
|
|
2579
|
+
messages: getMessages(locale)
|
|
2405
2580
|
}, cache);
|
|
2406
2581
|
};
|
|
2407
2582
|
var IntlContext = /*#__PURE__*/createContext( /*#__PURE__*/intlFactory('en'));
|
|
@@ -3088,15 +3263,11 @@ var FONT_CUSTOMIZATIONS = {
|
|
|
3088
3263
|
mono: 'SpaceMono'
|
|
3089
3264
|
};
|
|
3090
3265
|
|
|
3091
|
-
var messages = {
|
|
3092
|
-
en: rootMessagesEn,
|
|
3093
|
-
de: rootMessagesDe
|
|
3094
|
-
};
|
|
3095
3266
|
var MinimalProviders = function MinimalProviders(_ref) {
|
|
3096
3267
|
var children = _ref.children,
|
|
3097
3268
|
locale = _ref.locale;
|
|
3098
3269
|
return React.createElement(IntlProvider, {
|
|
3099
|
-
messages:
|
|
3270
|
+
messages: getMessages(locale),
|
|
3100
3271
|
locale: locale
|
|
3101
3272
|
}, React.createElement(BoemlyThemeProvider, {
|
|
3102
3273
|
fonts: FONT_CUSTOMIZATIONS
|
|
@@ -3223,7 +3394,7 @@ var ProjectsMap = function ProjectsMap(_ref) {
|
|
|
3223
3394
|
}));
|
|
3224
3395
|
var mapContainer = useRef(null);
|
|
3225
3396
|
useEffect(function () {
|
|
3226
|
-
var map = new Map({
|
|
3397
|
+
var map = new Map$1({
|
|
3227
3398
|
container: mapContainer.current || '',
|
|
3228
3399
|
style: MapBoxStyle.CaliTerrain,
|
|
3229
3400
|
center: center,
|
|
@@ -5622,5 +5793,5 @@ var SliceRenderer = function SliceRenderer(_ref) {
|
|
|
5622
5793
|
}));
|
|
5623
5794
|
};
|
|
5624
5795
|
|
|
5625
|
-
export { PreviewAlert, SEOTags, SliceRenderer, getPortfolioProjects, getStaticPathsFromStrapi, getStaticPropsFromStrapi, mergeGlobalAndStrapiBlogPostData, mergeGlobalAndStrapiCustomerStoryData, mergeGlobalAndStrapiPageData, mergeGlobalAndStrapiProject as mergeGlobalAndStrapiProjectData, strapiLinkUrl, strapiMediaUrl };
|
|
5796
|
+
export { PreviewAlert, SEOTags, SliceRenderer, getAllSlugsFromStrapi, getPortfolioProjects, getStaticPathsFromStrapi, getStaticPropsFromStrapi, getStrapiCollectionType, getStrapiSingleType, mergeGlobalAndStrapiBlogPostData, mergeGlobalAndStrapiCustomerStoryData, mergeGlobalAndStrapiPageData, mergeGlobalAndStrapiProject as mergeGlobalAndStrapiProjectData, strapiLinkUrl, strapiMediaUrl };
|
|
5626
5797
|
//# sourceMappingURL=strapi-slices.esm.js.map
|