@treely/strapi-slices 2.2.1 → 2.3.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/index.d.ts +3 -1
- package/dist/strapi-slices.cjs.development.js +13 -11
- 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 +12 -12
- package/dist/strapi-slices.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +4 -0
package/dist/index.d.ts
CHANGED
|
@@ -45,8 +45,10 @@ import mergeGlobalAndStrapiBlogPostData from './utils/mergeGlobalAndStrapiBlogPo
|
|
|
45
45
|
import mergeGlobalAndStrapiCustomerStoryData from './utils/mergeGlobalAndStrapiCustomerStoryData';
|
|
46
46
|
import mergeGlobalAndStrapiPageData from './utils/mergeGlobalAndStrapiPageData';
|
|
47
47
|
import mergeGlobalAndStrapiProjectData from './utils/mergeGlobalAndStrapiProjectData';
|
|
48
|
+
import strapiLinkUrl from './utils/strapiLinkUrl';
|
|
49
|
+
import strapiMediaUrl from './utils/strapiMediaUrl';
|
|
48
50
|
import { SECTIONS_WITH_BLOG_POSTS, SECTIONS_WITH_CUSTOMER_STORIES, SECTIONS_WITH_PROJECTS } from './constants/sectionsConfig';
|
|
49
51
|
export * from './components/SEOTags';
|
|
50
52
|
export * from './components/SliceRenderer';
|
|
51
|
-
export { mergeGlobalAndStrapiBlogPostData, mergeGlobalAndStrapiCustomerStoryData, mergeGlobalAndStrapiPageData, mergeGlobalAndStrapiProjectData, SECTIONS_WITH_BLOG_POSTS, SECTIONS_WITH_CUSTOMER_STORIES, SECTIONS_WITH_PROJECTS, };
|
|
53
|
+
export { mergeGlobalAndStrapiBlogPostData, mergeGlobalAndStrapiCustomerStoryData, mergeGlobalAndStrapiPageData, mergeGlobalAndStrapiProjectData, strapiLinkUrl, strapiMediaUrl, SECTIONS_WITH_BLOG_POSTS, SECTIONS_WITH_CUSTOMER_STORIES, SECTIONS_WITH_PROJECTS, };
|
|
52
54
|
export type { IStrapi, IStrapiData, IStrapiResponse, StrapiAuthor, StrapiAvatarWithName, StrapiBanner, StrapiBlogPost, StrapiBlogPostProps, StrapiButtonWithVariant, StrapiCategory, StrapiContactArea, StrapiCustomerStory, StrapiCustomerStoryProps, StrapiDefaultHeader, StrapiGlobal, StrapiGlossaryItem, StrapiHeroCard, StrapiImage, StrapiImageFormat, StrapiImageWithLink, StrapiLink, StrapiLinkList, StrapiLinkPage, StrapiLinkWithIcon, StrapiLocalization, StrapiMedia, StrapiMetadata, StrapiNavMenu, StrapiPage, StrapiPageProps, StrapiPortfolio, StrapiPortfolioCard, StrapiProject, StrapiProjectProps, StrapiProjectCard, StrapiQuoteCard, StrapiShapesCard, StrapiTextCardWithIcons, StrapiTopBanner, HeaderType, Image, PageMetadata, PageProps, };
|
|
@@ -563,6 +563,17 @@ var mergeGlobalAndStrapiProject = function mergeGlobalAndStrapiProject(context,
|
|
|
563
563
|
});
|
|
564
564
|
};
|
|
565
565
|
|
|
566
|
+
var strapiLinkUrl = function strapiLinkUrl(strapiLink) {
|
|
567
|
+
var _strapiLink, _strapiLink2;
|
|
568
|
+
if (strapiLink === void 0) {
|
|
569
|
+
strapiLink = undefined;
|
|
570
|
+
}
|
|
571
|
+
if ((_strapiLink = strapiLink) != null && (_strapiLink = _strapiLink.page) != null && _strapiLink.data) {
|
|
572
|
+
return "/" + strapiLink.page.data.attributes.slug;
|
|
573
|
+
}
|
|
574
|
+
return ((_strapiLink2 = strapiLink) == null ? void 0 : _strapiLink2.url) || '/';
|
|
575
|
+
};
|
|
576
|
+
|
|
566
577
|
var SEOTags = function SEOTags(_ref) {
|
|
567
578
|
var _shareImage$url, _shareImage$alt;
|
|
568
579
|
var title = _ref.title,
|
|
@@ -853,17 +864,6 @@ var FullWidthImage = function FullWidthImage(_ref) {
|
|
|
853
864
|
}))));
|
|
854
865
|
};
|
|
855
866
|
|
|
856
|
-
var strapiLinkUrl = function strapiLinkUrl(strapiLink) {
|
|
857
|
-
var _strapiLink, _strapiLink2;
|
|
858
|
-
if (strapiLink === void 0) {
|
|
859
|
-
strapiLink = undefined;
|
|
860
|
-
}
|
|
861
|
-
if ((_strapiLink = strapiLink) != null && (_strapiLink = _strapiLink.page) != null && _strapiLink.data) {
|
|
862
|
-
return "/" + strapiLink.page.data.attributes.slug;
|
|
863
|
-
}
|
|
864
|
-
return ((_strapiLink2 = strapiLink) == null ? void 0 : _strapiLink2.url) || '/';
|
|
865
|
-
};
|
|
866
|
-
|
|
867
867
|
var openHubSpotChat = function openHubSpotChat() {
|
|
868
868
|
var w = window;
|
|
869
869
|
if (w.HubSpotConversations) {
|
|
@@ -4871,4 +4871,6 @@ exports.mergeGlobalAndStrapiBlogPostData = mergeGlobalAndStrapiBlogPostData;
|
|
|
4871
4871
|
exports.mergeGlobalAndStrapiCustomerStoryData = mergeGlobalAndStrapiCustomerStoryData;
|
|
4872
4872
|
exports.mergeGlobalAndStrapiPageData = mergeGlobalAndStrapiPageData;
|
|
4873
4873
|
exports.mergeGlobalAndStrapiProjectData = mergeGlobalAndStrapiProject;
|
|
4874
|
+
exports.strapiLinkUrl = strapiLinkUrl;
|
|
4875
|
+
exports.strapiMediaUrl = strapiMediaUrl;
|
|
4874
4876
|
//# sourceMappingURL=strapi-slices.cjs.development.js.map
|