diy-template-components 0.2.48 → 0.2.53
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/build/index.es.js +73 -41
- package/build/index.es.js.map +1 -1
- package/build/index.js +73 -41
- package/build/index.js.map +1 -1
- package/package.json +2 -2
- package/build/650233e8e2d7dfee.png +0 -0
- package/build/d15660fcfffcc0c8.png +0 -0
package/build/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
function ___$insertStyle(css) {
|
|
2
|
-
if (!css ||
|
|
3
|
-
return;
|
|
4
|
-
}
|
|
5
|
-
const style = document.createElement('style');
|
|
6
|
-
style.setAttribute('type', 'text/css');
|
|
7
|
-
style.innerHTML = css;
|
|
8
|
-
document.head.appendChild(style);
|
|
9
|
-
return css;
|
|
1
|
+
function ___$insertStyle(css) {
|
|
2
|
+
if (!css || typeof window === 'undefined') {
|
|
3
|
+
return;
|
|
4
|
+
}
|
|
5
|
+
const style = document.createElement('style');
|
|
6
|
+
style.setAttribute('type', 'text/css');
|
|
7
|
+
style.innerHTML = css;
|
|
8
|
+
document.head.appendChild(style);
|
|
9
|
+
return css;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
import React, { createContext, useContext, forwardRef, useRef, useEffect, useState, useMemo, useLayoutEffect, Suspense, memo, lazy, Fragment } from 'react';
|
|
@@ -1141,7 +1141,7 @@ const NextImageRenderer = ({
|
|
|
1141
1141
|
refSetter,
|
|
1142
1142
|
className
|
|
1143
1143
|
} = props;
|
|
1144
|
-
if (isCustomWebsite && typeof Image !==
|
|
1144
|
+
if (isCustomWebsite && typeof Image !== undefined) {
|
|
1145
1145
|
const classes = nextImageRendererStyles();
|
|
1146
1146
|
const imageLoader = ({
|
|
1147
1147
|
src,
|
|
@@ -1156,8 +1156,9 @@ const NextImageRenderer = ({
|
|
|
1156
1156
|
return `${process.env.NEXT_PUBLIC_ENV_ASSET_PREFIX}/_next/image?url=${src}&q=${quality || 75}&w=${dynamicWidth}`;
|
|
1157
1157
|
};
|
|
1158
1158
|
const NextImage = require('next/image').default;
|
|
1159
|
+
console.log('next image succes');
|
|
1159
1160
|
return /*#__PURE__*/React.createElement(NextImage, _extends({
|
|
1160
|
-
priority: sectionIndex
|
|
1161
|
+
priority: sectionIndex === '0' ? true : false,
|
|
1161
1162
|
loader: imageLoader,
|
|
1162
1163
|
src: src,
|
|
1163
1164
|
layout: 'fill',
|
|
@@ -1167,6 +1168,7 @@ const NextImageRenderer = ({
|
|
|
1167
1168
|
alt: "image"
|
|
1168
1169
|
}));
|
|
1169
1170
|
} else {
|
|
1171
|
+
console.log('next image failed image tag');
|
|
1170
1172
|
return /*#__PURE__*/React.createElement("img", {
|
|
1171
1173
|
ref: refSetter,
|
|
1172
1174
|
className: className,
|
|
@@ -1568,7 +1570,12 @@ const useSectionStyles$9 = createUseStyles(theme => ({
|
|
|
1568
1570
|
width: '15%',
|
|
1569
1571
|
height: 'auto',
|
|
1570
1572
|
position: 'relative',
|
|
1571
|
-
paddingBottom:
|
|
1573
|
+
paddingBottom: ({
|
|
1574
|
+
isCustomWebsite
|
|
1575
|
+
}) => isCustomWebsite ? ' 6%' : '0%',
|
|
1576
|
+
paddingTop: ({
|
|
1577
|
+
isCustomWebsite
|
|
1578
|
+
}) => isCustomWebsite ? ' 0%' : '1%',
|
|
1572
1579
|
'& p': {
|
|
1573
1580
|
margin: '0',
|
|
1574
1581
|
paddingRight: '8px',
|
|
@@ -1643,7 +1650,9 @@ const useSectionStyles$9 = createUseStyles(theme => ({
|
|
|
1643
1650
|
poweredDiv: {
|
|
1644
1651
|
// marginTop: '15px'
|
|
1645
1652
|
width: '28%',
|
|
1646
|
-
paddingBottom:
|
|
1653
|
+
paddingBottom: ({
|
|
1654
|
+
isCustomWebsite
|
|
1655
|
+
}) => isCustomWebsite ? "8%" : '0%'
|
|
1647
1656
|
},
|
|
1648
1657
|
socialMediaCta: {
|
|
1649
1658
|
margin: '0 8px 16px 8px'
|
|
@@ -2212,7 +2221,9 @@ const useSectionStyles$8 = createUseStyles(theme => ({
|
|
|
2212
2221
|
},
|
|
2213
2222
|
imageContainer: {
|
|
2214
2223
|
height: 'undefined',
|
|
2215
|
-
paddingBottom:
|
|
2224
|
+
paddingBottom: ({
|
|
2225
|
+
isCustomWebsite
|
|
2226
|
+
}) => isCustomWebsite ? "100%" : "unset"
|
|
2216
2227
|
}
|
|
2217
2228
|
}
|
|
2218
2229
|
}));
|
|
@@ -2438,13 +2449,16 @@ function Section$4({
|
|
|
2438
2449
|
nodeData,
|
|
2439
2450
|
sectionIndex
|
|
2440
2451
|
}) {
|
|
2441
|
-
const classes = useSectionStyles$8();
|
|
2442
2452
|
const {
|
|
2443
2453
|
layout: {
|
|
2444
2454
|
containerWidth
|
|
2445
2455
|
},
|
|
2446
|
-
isMobile
|
|
2456
|
+
isMobile,
|
|
2457
|
+
isCustomWebsite
|
|
2447
2458
|
} = useContext(PageContext);
|
|
2459
|
+
const classes = useSectionStyles$8({
|
|
2460
|
+
isCustomWebsite
|
|
2461
|
+
});
|
|
2448
2462
|
return /*#__PURE__*/React.createElement("div", {
|
|
2449
2463
|
className: classes.centerData
|
|
2450
2464
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -2795,7 +2809,7 @@ const useSectionStyles$6 = createUseStyles(theme => ({
|
|
|
2795
2809
|
width: '100%',
|
|
2796
2810
|
// maxWidth: ({ containerWidth } = {}) => containerWidth,
|
|
2797
2811
|
position: 'absolute',
|
|
2798
|
-
zIndex: '
|
|
2812
|
+
zIndex: '9'
|
|
2799
2813
|
},
|
|
2800
2814
|
absoluteButtons: {
|
|
2801
2815
|
display: 'flex',
|
|
@@ -2823,14 +2837,16 @@ const useSectionStyles$6 = createUseStyles(theme => ({
|
|
|
2823
2837
|
centerBgImageContainer: {
|
|
2824
2838
|
width: '100%',
|
|
2825
2839
|
position: 'relative',
|
|
2826
|
-
paddingBottom: '35rem',
|
|
2827
|
-
|
|
2840
|
+
// paddingBottom: '35rem',
|
|
2841
|
+
paddingBottom: ({
|
|
2842
|
+
isCustomWebsite
|
|
2843
|
+
}) => isCustomWebsite ? '45%' : "unset",
|
|
2828
2844
|
backgroundSize: 'cover',
|
|
2829
2845
|
backgroundPosition: 'center center'
|
|
2830
2846
|
},
|
|
2831
2847
|
centerBgImage: {
|
|
2832
2848
|
objectFit: 'cover',
|
|
2833
|
-
|
|
2849
|
+
width: "100%",
|
|
2834
2850
|
backgroundSize: 'cover',
|
|
2835
2851
|
backgroundPosition: 'center center'
|
|
2836
2852
|
},
|
|
@@ -2887,28 +2903,36 @@ const useSectionStyles$6 = createUseStyles(theme => ({
|
|
|
2887
2903
|
margin: '16px 0'
|
|
2888
2904
|
},
|
|
2889
2905
|
centerBgImageContainer: {
|
|
2890
|
-
width:
|
|
2906
|
+
width: ({
|
|
2907
|
+
isCustomWebsite
|
|
2908
|
+
}) => isCustomWebsite ? "100%" : 'unset',
|
|
2891
2909
|
position: 'relative',
|
|
2892
2910
|
height: '34rem',
|
|
2893
|
-
paddingBottom: '
|
|
2911
|
+
paddingBottom: '0'
|
|
2912
|
+
},
|
|
2913
|
+
centerBgImage: {
|
|
2914
|
+
objectFit: "cover",
|
|
2915
|
+
width: "100%",
|
|
2916
|
+
height: "inherit"
|
|
2894
2917
|
}
|
|
2895
2918
|
}
|
|
2896
2919
|
}));
|
|
2897
2920
|
|
|
2898
2921
|
const Section$3 = ({
|
|
2899
2922
|
nodeData,
|
|
2900
|
-
isCustomWebsite,
|
|
2901
2923
|
sectionIndex
|
|
2902
2924
|
}) => {
|
|
2903
2925
|
const {
|
|
2904
2926
|
layout: {
|
|
2905
2927
|
containerWidth
|
|
2906
2928
|
},
|
|
2907
|
-
isMobile
|
|
2929
|
+
isMobile,
|
|
2930
|
+
isCustomWebsite
|
|
2908
2931
|
} = useContext(PageContext);
|
|
2909
2932
|
const classes = useSectionStyles$6({
|
|
2910
2933
|
imageUrl: nodeData.image.metadata.value,
|
|
2911
|
-
containerWidth
|
|
2934
|
+
containerWidth,
|
|
2935
|
+
isCustomWebsite
|
|
2912
2936
|
});
|
|
2913
2937
|
return /*#__PURE__*/React.createElement("section", {
|
|
2914
2938
|
className: classes.bannerCarouselCenterSection
|
|
@@ -2956,7 +2980,9 @@ function BannerCarouselCenter({
|
|
|
2956
2980
|
isCustomWebsite,
|
|
2957
2981
|
sectionIndex
|
|
2958
2982
|
}) {
|
|
2959
|
-
const classes = useSectionStyles$6(
|
|
2983
|
+
const classes = useSectionStyles$6({
|
|
2984
|
+
isCustomWebsite
|
|
2985
|
+
});
|
|
2960
2986
|
const [{
|
|
2961
2987
|
bannerCarousel
|
|
2962
2988
|
}] = sectionData.components;
|
|
@@ -2969,7 +2995,6 @@ function BannerCarouselCenter({
|
|
|
2969
2995
|
className: classes.bannerCarouselCenterSection
|
|
2970
2996
|
}, /*#__PURE__*/React.createElement(Wrapper, wrapperProps, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React.createElement(Section$3, {
|
|
2971
2997
|
nodeData: node,
|
|
2972
|
-
isCustomWebsite: isCustomWebsite,
|
|
2973
2998
|
key: idx /* or some other unique property */,
|
|
2974
2999
|
sectionIndex: sectionIndex
|
|
2975
3000
|
}))));
|
|
@@ -3072,14 +3097,13 @@ const useSectionStyles$5 = createUseStyles(theme => {
|
|
|
3072
3097
|
width: '100%',
|
|
3073
3098
|
padding: '0'
|
|
3074
3099
|
},
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
// },
|
|
3100
|
+
imageContainer: {
|
|
3101
|
+
height: 'unset !important',
|
|
3102
|
+
'& img': {
|
|
3103
|
+
height: 'unset !important',
|
|
3104
|
+
objectFit: "cover"
|
|
3105
|
+
}
|
|
3106
|
+
},
|
|
3083
3107
|
imageContainerDiv: {
|
|
3084
3108
|
width: '100%'
|
|
3085
3109
|
},
|
|
@@ -3088,7 +3112,7 @@ const useSectionStyles$5 = createUseStyles(theme => {
|
|
|
3088
3112
|
},
|
|
3089
3113
|
sideBannerImage: {
|
|
3090
3114
|
width: '100%',
|
|
3091
|
-
height: '
|
|
3115
|
+
height: 'unset !important'
|
|
3092
3116
|
},
|
|
3093
3117
|
textContainer: {
|
|
3094
3118
|
padding: '20px 20px',
|
|
@@ -3963,10 +3987,10 @@ const useVideoStyles$1 = createUseStyles(theme => {
|
|
|
3963
3987
|
isLoaded
|
|
3964
3988
|
} = {}) => isLoaded ? 'block' : 'none'
|
|
3965
3989
|
},
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3990
|
+
icon: {
|
|
3991
|
+
zIndex: '999',
|
|
3992
|
+
position: "absolute"
|
|
3993
|
+
},
|
|
3970
3994
|
imgContainer: {
|
|
3971
3995
|
position: 'absolute',
|
|
3972
3996
|
width: '100%',
|
|
@@ -3974,6 +3998,7 @@ const useVideoStyles$1 = createUseStyles(theme => {
|
|
|
3974
3998
|
borderRadius: theme.shape.borderRadius.small,
|
|
3975
3999
|
// backgroundImage: ({ imageUrl } = {}) =>
|
|
3976
4000
|
// `linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%), url("${imageUrl}")`,
|
|
4001
|
+
background: "linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%)",
|
|
3977
4002
|
backgroundSize: 'cover',
|
|
3978
4003
|
display: 'flex',
|
|
3979
4004
|
justifyContent: 'center',
|
|
@@ -3982,6 +4007,12 @@ const useVideoStyles$1 = createUseStyles(theme => {
|
|
|
3982
4007
|
cursor: 'pointer'
|
|
3983
4008
|
}
|
|
3984
4009
|
},
|
|
4010
|
+
videoPlayerImage: {
|
|
4011
|
+
height: '100%',
|
|
4012
|
+
width: '100%',
|
|
4013
|
+
objectFit: 'cover',
|
|
4014
|
+
objectPosition: 'top'
|
|
4015
|
+
},
|
|
3985
4016
|
'@media (max-width: 767px)': {
|
|
3986
4017
|
iframe: {
|
|
3987
4018
|
borderRadius: '8px 8px 0 0'
|
|
@@ -4018,7 +4049,8 @@ function VideoPlayer(props) {
|
|
|
4018
4049
|
className: classes.imgContainer
|
|
4019
4050
|
}, /*#__PURE__*/React.createElement(NextImageRenderer, {
|
|
4020
4051
|
src: imageUrl,
|
|
4021
|
-
sectionIndex: props?.sectionIndex
|
|
4052
|
+
sectionIndex: props?.sectionIndex,
|
|
4053
|
+
className: classes.videoPlayerImage
|
|
4022
4054
|
}), isEnabled ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(React.Fragment, null, props.onlyThumbnail ? null : /*#__PURE__*/React.createElement(Icon, {
|
|
4023
4055
|
name: "Video Play",
|
|
4024
4056
|
color: theme.palette.font.invertedDefault,
|