@treely/strapi-slices 4.4.0 → 4.4.2
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/models/strapi/StrapiBlogPost.d.ts +2 -2
- package/dist/models/strapi/StrapiHeroCard.d.ts +2 -5
- package/dist/models/strapi/StrapiLink.d.ts +1 -1
- package/dist/models/strapi/StrapiProject.d.ts +1 -1
- package/dist/slices/BlogCards/BlogCards.d.ts +1 -1
- package/dist/strapi-slices.cjs.development.js +21 -15
- 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 +21 -15
- package/dist/strapi-slices.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/portfolio/SmallCheckout/SmallCheckout.tsx +1 -2
- package/src/models/strapi/StrapiBlogPost.ts +2 -2
- package/src/models/strapi/StrapiHeroCard.ts +2 -5
- package/src/models/strapi/StrapiLink.ts +1 -1
- package/src/models/strapi/StrapiProject.ts +1 -1
- package/src/slices/Blog/Blog.tsx +2 -2
- package/src/slices/BlogCards/BlogCards.test.tsx +1 -0
- package/src/slices/BlogCards/BlogCards.tsx +4 -4
- package/src/slices/Cta/Cta.tsx +5 -0
- package/src/slices/MapHero/MapHero.tsx +1 -1
|
@@ -12,8 +12,8 @@ interface StrapiBlogPost {
|
|
|
12
12
|
slug: string;
|
|
13
13
|
teaser: string | null;
|
|
14
14
|
img: StrapiImage;
|
|
15
|
-
author
|
|
16
|
-
category
|
|
15
|
+
author: IStrapi<IStrapiData<StrapiAuthor> | null>;
|
|
16
|
+
category: IStrapi<IStrapiData<StrapiCategory> | null>;
|
|
17
17
|
locale: Locale;
|
|
18
18
|
createdAt: string;
|
|
19
19
|
updatedAt: string;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import StrapiImage from './StrapiImage';
|
|
2
|
+
import StrapiLink from './StrapiLink';
|
|
2
3
|
interface StrapiHeroCard {
|
|
3
4
|
id: number;
|
|
4
5
|
title: string;
|
|
5
6
|
subTitle: string;
|
|
6
|
-
button?:
|
|
7
|
-
id: number;
|
|
8
|
-
url: string;
|
|
9
|
-
text: string;
|
|
10
|
-
};
|
|
7
|
+
button?: StrapiLink;
|
|
11
8
|
image?: StrapiImage;
|
|
12
9
|
}
|
|
13
10
|
export default StrapiHeroCard;
|
|
@@ -19,7 +19,7 @@ interface StrapiProject {
|
|
|
19
19
|
thumbnail: StrapiImage | null;
|
|
20
20
|
slices: any[];
|
|
21
21
|
localizations: StrapiLocalization[];
|
|
22
|
-
portfolio: IStrapi<IStrapiData<StrapiPortfolio
|
|
22
|
+
portfolio: IStrapi<IStrapiData<StrapiPortfolio> | null>;
|
|
23
23
|
topBanner?: StrapiTopBanner;
|
|
24
24
|
}
|
|
25
25
|
export default StrapiProject;
|
|
@@ -11,7 +11,7 @@ export interface BlogCardsProps {
|
|
|
11
11
|
subTitle: string;
|
|
12
12
|
button?: StrapiLink;
|
|
13
13
|
variant: 'white' | 'gray';
|
|
14
|
-
blogPostCategory
|
|
14
|
+
blogPostCategory: IStrapi<IStrapiData<StrapiCategory> | null>;
|
|
15
15
|
};
|
|
16
16
|
blogPosts: IStrapiData<StrapiBlogPost>[];
|
|
17
17
|
}
|
|
@@ -1419,7 +1419,9 @@ var MapHero = function MapHero(_ref) {
|
|
|
1419
1419
|
var slice = _ref.slice;
|
|
1420
1420
|
var _useMediaQuery = boemly.useMediaQuery(BREAKPOINT_LG_QUERY),
|
|
1421
1421
|
belowBreakpoint = _useMediaQuery[0];
|
|
1422
|
-
return React__default.default.createElement(MapHeroContainer,
|
|
1422
|
+
return React__default.default.createElement(MapHeroContainer, {
|
|
1423
|
+
maxWidth: "full"
|
|
1424
|
+
}, slice.shape && React__default.default.createElement(ShapeContainer, null, React__default.default.createElement(Image__default.default, {
|
|
1423
1425
|
src: strapiMediaUrl(slice.shape.img, 'medium'),
|
|
1424
1426
|
alt: slice.shape.alt,
|
|
1425
1427
|
fill: true,
|
|
@@ -2693,7 +2695,7 @@ var Blog = function Blog(_ref) {
|
|
|
2693
2695
|
})), React__default.default.createElement(boemly.Box, {
|
|
2694
2696
|
px: "2",
|
|
2695
2697
|
py: "8"
|
|
2696
|
-
}, blogPost.attributes.category && React__default.default.createElement(boemly.Text, {
|
|
2698
|
+
}, blogPost.attributes.category.data && React__default.default.createElement(boemly.Text, {
|
|
2697
2699
|
size: "smMonoUppercase",
|
|
2698
2700
|
color: "primary.800",
|
|
2699
2701
|
mb: "2"
|
|
@@ -2706,7 +2708,7 @@ var Blog = function Blog(_ref) {
|
|
|
2706
2708
|
height: "4"
|
|
2707
2709
|
}), React__default.default.createElement(boemly.DatePersonPair, {
|
|
2708
2710
|
date: formatDate(blogPost.attributes.createdAt),
|
|
2709
|
-
person: blogPost.attributes.author ? {
|
|
2711
|
+
person: blogPost.attributes.author.data ? {
|
|
2710
2712
|
name: blogPost.attributes.author.data.attributes.name,
|
|
2711
2713
|
image: React__default.default.createElement(Image__default.default, {
|
|
2712
2714
|
src: strapiMediaUrl(blogPost.attributes.author.data.attributes.img.img, 'thumbnail'),
|
|
@@ -3245,7 +3247,8 @@ var STATES = {
|
|
|
3245
3247
|
paddingTitle: '0',
|
|
3246
3248
|
justifyContent: 'space-between',
|
|
3247
3249
|
buttonJustifyContent: 'start',
|
|
3248
|
-
textMarginLeft: ['0', null, null, null, '14']
|
|
3250
|
+
textMarginLeft: ['0', null, null, null, '14'],
|
|
3251
|
+
textMarginRight: '0'
|
|
3249
3252
|
},
|
|
3250
3253
|
centerWithoutImage: {
|
|
3251
3254
|
textAlign: 'center',
|
|
@@ -3253,7 +3256,8 @@ var STATES = {
|
|
|
3253
3256
|
paddingTitle: '20',
|
|
3254
3257
|
justifyContent: 'center',
|
|
3255
3258
|
buttonJustifyContent: 'center',
|
|
3256
|
-
textMarginLeft: '0'
|
|
3259
|
+
textMarginLeft: '0',
|
|
3260
|
+
textMarginRight: '0'
|
|
3257
3261
|
},
|
|
3258
3262
|
centerWithImage: {
|
|
3259
3263
|
textAlign: 'center',
|
|
@@ -3261,7 +3265,8 @@ var STATES = {
|
|
|
3261
3265
|
paddingTitle: '20',
|
|
3262
3266
|
justifyContent: 'center',
|
|
3263
3267
|
buttonJustifyContent: 'center',
|
|
3264
|
-
textMarginLeft: '0'
|
|
3268
|
+
textMarginLeft: '0',
|
|
3269
|
+
textMarginRight: '0'
|
|
3265
3270
|
},
|
|
3266
3271
|
right: {
|
|
3267
3272
|
textAlign: 'left',
|
|
@@ -3269,7 +3274,8 @@ var STATES = {
|
|
|
3269
3274
|
paddingTitle: '0',
|
|
3270
3275
|
justifyContent: 'start',
|
|
3271
3276
|
buttonJustifyContent: 'start',
|
|
3272
|
-
textMarginLeft: '0'
|
|
3277
|
+
textMarginLeft: '0',
|
|
3278
|
+
textMarginRight: ['0', null, null, null, '10']
|
|
3273
3279
|
}
|
|
3274
3280
|
};
|
|
3275
3281
|
var VARIANTS$3 = {
|
|
@@ -3457,6 +3463,7 @@ var Cta = function Cta(_ref) {
|
|
|
3457
3463
|
})) : React__default.default.createElement(React__default.default.Fragment, null), React__default.default.createElement(boemly.Box, {
|
|
3458
3464
|
zIndex: "base",
|
|
3459
3465
|
marginLeft: STATES[ctaCardType].textMarginLeft,
|
|
3466
|
+
marginRight: STATES[ctaCardType].textMarginRight,
|
|
3460
3467
|
maxWidth: "3xl"
|
|
3461
3468
|
}, React__default.default.createElement(boemly.Spacer, {
|
|
3462
3469
|
height: ['0', null, null, null, '20']
|
|
@@ -3911,7 +3918,7 @@ var BlogCards = function BlogCards(_ref) {
|
|
|
3911
3918
|
var _slice$blogPostCatego;
|
|
3912
3919
|
return (_slice$blogPostCatego = slice.blogPostCategory) != null && (_slice$blogPostCatego = _slice$blogPostCatego.data) != null && _slice$blogPostCatego.attributes.name ? sortedBlogPosts.filter(function (blogPost) {
|
|
3913
3920
|
var _blogPost$attributes$, _slice$blogPostCatego2;
|
|
3914
|
-
return ((_blogPost$attributes$ = blogPost.attributes.category) == null ? void 0 : _blogPost$attributes$.
|
|
3921
|
+
return ((_blogPost$attributes$ = blogPost.attributes.category.data) == null ? void 0 : _blogPost$attributes$.attributes.name) === ((_slice$blogPostCatego2 = slice.blogPostCategory) == null || (_slice$blogPostCatego2 = _slice$blogPostCatego2.data) == null ? void 0 : _slice$blogPostCatego2.attributes.name);
|
|
3915
3922
|
}).slice(0, 3) : sortedBlogPosts.slice(0, 3);
|
|
3916
3923
|
}, [sortedBlogPosts, slice]);
|
|
3917
3924
|
return React__default.default.createElement(boemly.DefaultSectionContainer, {
|
|
@@ -3952,6 +3959,7 @@ var BlogCards = function BlogCards(_ref) {
|
|
|
3952
3959
|
spacingY: 24,
|
|
3953
3960
|
flexShrink: "0"
|
|
3954
3961
|
}, blogPostsToDisplay.map(function (blogPost) {
|
|
3962
|
+
var _blogPost$attributes$2;
|
|
3955
3963
|
return React__default.default.createElement(BlogItemContainer, {
|
|
3956
3964
|
as: Link__default.default,
|
|
3957
3965
|
href: "/blog/" + blogPost.attributes.slug,
|
|
@@ -3971,7 +3979,7 @@ var BlogCards = function BlogCards(_ref) {
|
|
|
3971
3979
|
size: "smMonoUppercase",
|
|
3972
3980
|
color: "primary.800",
|
|
3973
3981
|
mb: "2"
|
|
3974
|
-
}, blogPost.attributes.category.data.attributes.name), React__default.default.createElement(boemly.Heading, {
|
|
3982
|
+
}, (_blogPost$attributes$2 = blogPost.attributes.category.data) == null ? void 0 : _blogPost$attributes$2.attributes.name), React__default.default.createElement(boemly.Heading, {
|
|
3975
3983
|
size: "lg"
|
|
3976
3984
|
}, blogPost.attributes.title), blogPost.attributes.teaser && React__default.default.createElement(boemly.Text, {
|
|
3977
3985
|
size: "mdRegularNormal",
|
|
@@ -3980,7 +3988,7 @@ var BlogCards = function BlogCards(_ref) {
|
|
|
3980
3988
|
height: "4"
|
|
3981
3989
|
}), React__default.default.createElement(boemly.DatePersonPair, {
|
|
3982
3990
|
date: formatDate(blogPost.attributes.createdAt),
|
|
3983
|
-
person: blogPost.attributes.author ? {
|
|
3991
|
+
person: blogPost.attributes.author.data ? {
|
|
3984
3992
|
name: blogPost.attributes.author.data.attributes.name,
|
|
3985
3993
|
image: React__default.default.createElement(Image__default.default, {
|
|
3986
3994
|
src: strapiMediaUrl(blogPost.attributes.author.data.attributes.img.img, 'thumbnail'),
|
|
@@ -4195,11 +4203,9 @@ var SmallCheckout = function SmallCheckout(_ref) {
|
|
|
4195
4203
|
textAlign: "center",
|
|
4196
4204
|
mb: "3"
|
|
4197
4205
|
}, subtitle), button && React__default.default.createElement(StrapiLinkButton, {
|
|
4198
|
-
link: {
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
text: button.text
|
|
4202
|
-
},
|
|
4206
|
+
link: _extends({
|
|
4207
|
+
intercomLauncher: true
|
|
4208
|
+
}, button),
|
|
4203
4209
|
variant: "outline"
|
|
4204
4210
|
})));
|
|
4205
4211
|
};
|