diy-template-components 0.2.49 → 0.2.54
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 +70 -40
- package/build/index.es.js.map +1 -1
- package/build/index.js +70 -40
- 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) {
|
|
1144
|
+
if (isCustomWebsite && typeof Image !== 'undefined') {
|
|
1145
1145
|
const classes = nextImageRendererStyles();
|
|
1146
1146
|
const imageLoader = ({
|
|
1147
1147
|
src,
|
|
@@ -1568,7 +1568,12 @@ const useSectionStyles$9 = createUseStyles(theme => ({
|
|
|
1568
1568
|
width: '15%',
|
|
1569
1569
|
height: 'auto',
|
|
1570
1570
|
position: 'relative',
|
|
1571
|
-
paddingBottom:
|
|
1571
|
+
paddingBottom: ({
|
|
1572
|
+
isCustomWebsite
|
|
1573
|
+
}) => isCustomWebsite ? ' 6%' : '0%',
|
|
1574
|
+
paddingTop: ({
|
|
1575
|
+
isCustomWebsite
|
|
1576
|
+
}) => isCustomWebsite ? ' 0%' : '1%',
|
|
1572
1577
|
'& p': {
|
|
1573
1578
|
margin: '0',
|
|
1574
1579
|
paddingRight: '8px',
|
|
@@ -1643,7 +1648,9 @@ const useSectionStyles$9 = createUseStyles(theme => ({
|
|
|
1643
1648
|
poweredDiv: {
|
|
1644
1649
|
// marginTop: '15px'
|
|
1645
1650
|
width: '28%',
|
|
1646
|
-
paddingBottom:
|
|
1651
|
+
paddingBottom: ({
|
|
1652
|
+
isCustomWebsite
|
|
1653
|
+
}) => isCustomWebsite ? '8%' : '0%'
|
|
1647
1654
|
},
|
|
1648
1655
|
socialMediaCta: {
|
|
1649
1656
|
margin: '0 8px 16px 8px'
|
|
@@ -2212,7 +2219,9 @@ const useSectionStyles$8 = createUseStyles(theme => ({
|
|
|
2212
2219
|
},
|
|
2213
2220
|
imageContainer: {
|
|
2214
2221
|
height: 'undefined',
|
|
2215
|
-
paddingBottom:
|
|
2222
|
+
paddingBottom: ({
|
|
2223
|
+
isCustomWebsite
|
|
2224
|
+
}) => isCustomWebsite ? '100%' : 'unset'
|
|
2216
2225
|
}
|
|
2217
2226
|
}
|
|
2218
2227
|
}));
|
|
@@ -2438,13 +2447,16 @@ function Section$4({
|
|
|
2438
2447
|
nodeData,
|
|
2439
2448
|
sectionIndex
|
|
2440
2449
|
}) {
|
|
2441
|
-
const classes = useSectionStyles$8();
|
|
2442
2450
|
const {
|
|
2443
2451
|
layout: {
|
|
2444
2452
|
containerWidth
|
|
2445
2453
|
},
|
|
2446
|
-
isMobile
|
|
2454
|
+
isMobile,
|
|
2455
|
+
isCustomWebsite
|
|
2447
2456
|
} = useContext(PageContext);
|
|
2457
|
+
const classes = useSectionStyles$8({
|
|
2458
|
+
isCustomWebsite
|
|
2459
|
+
});
|
|
2448
2460
|
return /*#__PURE__*/React.createElement("div", {
|
|
2449
2461
|
className: classes.centerData
|
|
2450
2462
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -2795,7 +2807,7 @@ const useSectionStyles$6 = createUseStyles(theme => ({
|
|
|
2795
2807
|
width: '100%',
|
|
2796
2808
|
// maxWidth: ({ containerWidth } = {}) => containerWidth,
|
|
2797
2809
|
position: 'absolute',
|
|
2798
|
-
zIndex: '
|
|
2810
|
+
zIndex: '9'
|
|
2799
2811
|
},
|
|
2800
2812
|
absoluteButtons: {
|
|
2801
2813
|
display: 'flex',
|
|
@@ -2823,14 +2835,16 @@ const useSectionStyles$6 = createUseStyles(theme => ({
|
|
|
2823
2835
|
centerBgImageContainer: {
|
|
2824
2836
|
width: '100%',
|
|
2825
2837
|
position: 'relative',
|
|
2826
|
-
paddingBottom: '35rem',
|
|
2827
|
-
|
|
2838
|
+
// paddingBottom: '35rem',
|
|
2839
|
+
paddingBottom: ({
|
|
2840
|
+
isCustomWebsite
|
|
2841
|
+
}) => isCustomWebsite ? '45%' : 'unset',
|
|
2828
2842
|
backgroundSize: 'cover',
|
|
2829
2843
|
backgroundPosition: 'center center'
|
|
2830
2844
|
},
|
|
2831
2845
|
centerBgImage: {
|
|
2832
2846
|
objectFit: 'cover',
|
|
2833
|
-
|
|
2847
|
+
width: '100%',
|
|
2834
2848
|
backgroundSize: 'cover',
|
|
2835
2849
|
backgroundPosition: 'center center'
|
|
2836
2850
|
},
|
|
@@ -2887,28 +2901,36 @@ const useSectionStyles$6 = createUseStyles(theme => ({
|
|
|
2887
2901
|
margin: '16px 0'
|
|
2888
2902
|
},
|
|
2889
2903
|
centerBgImageContainer: {
|
|
2890
|
-
width:
|
|
2904
|
+
width: ({
|
|
2905
|
+
isCustomWebsite
|
|
2906
|
+
}) => isCustomWebsite ? '100%' : 'unset',
|
|
2891
2907
|
position: 'relative',
|
|
2892
2908
|
height: '34rem',
|
|
2893
|
-
paddingBottom: '
|
|
2909
|
+
paddingBottom: '0'
|
|
2910
|
+
},
|
|
2911
|
+
centerBgImage: {
|
|
2912
|
+
objectFit: 'cover',
|
|
2913
|
+
width: '100%',
|
|
2914
|
+
height: 'inherit'
|
|
2894
2915
|
}
|
|
2895
2916
|
}
|
|
2896
2917
|
}));
|
|
2897
2918
|
|
|
2898
2919
|
const Section$3 = ({
|
|
2899
2920
|
nodeData,
|
|
2900
|
-
isCustomWebsite,
|
|
2901
2921
|
sectionIndex
|
|
2902
2922
|
}) => {
|
|
2903
2923
|
const {
|
|
2904
2924
|
layout: {
|
|
2905
2925
|
containerWidth
|
|
2906
2926
|
},
|
|
2907
|
-
isMobile
|
|
2927
|
+
isMobile,
|
|
2928
|
+
isCustomWebsite
|
|
2908
2929
|
} = useContext(PageContext);
|
|
2909
2930
|
const classes = useSectionStyles$6({
|
|
2910
2931
|
imageUrl: nodeData.image.metadata.value,
|
|
2911
|
-
containerWidth
|
|
2932
|
+
containerWidth,
|
|
2933
|
+
isCustomWebsite
|
|
2912
2934
|
});
|
|
2913
2935
|
return /*#__PURE__*/React.createElement("section", {
|
|
2914
2936
|
className: classes.bannerCarouselCenterSection
|
|
@@ -2956,7 +2978,9 @@ function BannerCarouselCenter({
|
|
|
2956
2978
|
isCustomWebsite,
|
|
2957
2979
|
sectionIndex
|
|
2958
2980
|
}) {
|
|
2959
|
-
const classes = useSectionStyles$6(
|
|
2981
|
+
const classes = useSectionStyles$6({
|
|
2982
|
+
isCustomWebsite
|
|
2983
|
+
});
|
|
2960
2984
|
const [{
|
|
2961
2985
|
bannerCarousel
|
|
2962
2986
|
}] = sectionData.components;
|
|
@@ -2969,7 +2993,6 @@ function BannerCarouselCenter({
|
|
|
2969
2993
|
className: classes.bannerCarouselCenterSection
|
|
2970
2994
|
}, /*#__PURE__*/React.createElement(Wrapper, wrapperProps, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React.createElement(Section$3, {
|
|
2971
2995
|
nodeData: node,
|
|
2972
|
-
isCustomWebsite: isCustomWebsite,
|
|
2973
2996
|
key: idx /* or some other unique property */,
|
|
2974
2997
|
sectionIndex: sectionIndex
|
|
2975
2998
|
}))));
|
|
@@ -3072,14 +3095,13 @@ const useSectionStyles$5 = createUseStyles(theme => {
|
|
|
3072
3095
|
width: '100%',
|
|
3073
3096
|
padding: '0'
|
|
3074
3097
|
},
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
// },
|
|
3098
|
+
imageContainer: {
|
|
3099
|
+
height: 'unset !important',
|
|
3100
|
+
'& img': {
|
|
3101
|
+
height: 'unset !important',
|
|
3102
|
+
objectFit: 'cover'
|
|
3103
|
+
}
|
|
3104
|
+
},
|
|
3083
3105
|
imageContainerDiv: {
|
|
3084
3106
|
width: '100%'
|
|
3085
3107
|
},
|
|
@@ -3088,7 +3110,7 @@ const useSectionStyles$5 = createUseStyles(theme => {
|
|
|
3088
3110
|
},
|
|
3089
3111
|
sideBannerImage: {
|
|
3090
3112
|
width: '100%',
|
|
3091
|
-
height: '
|
|
3113
|
+
height: 'unset !important'
|
|
3092
3114
|
},
|
|
3093
3115
|
textContainer: {
|
|
3094
3116
|
padding: '20px 20px',
|
|
@@ -3963,10 +3985,10 @@ const useVideoStyles$1 = createUseStyles(theme => {
|
|
|
3963
3985
|
isLoaded
|
|
3964
3986
|
} = {}) => isLoaded ? 'block' : 'none'
|
|
3965
3987
|
},
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3988
|
+
icon: {
|
|
3989
|
+
zIndex: '999',
|
|
3990
|
+
position: 'absolute'
|
|
3991
|
+
},
|
|
3970
3992
|
imgContainer: {
|
|
3971
3993
|
position: 'absolute',
|
|
3972
3994
|
width: '100%',
|
|
@@ -3974,6 +3996,7 @@ const useVideoStyles$1 = createUseStyles(theme => {
|
|
|
3974
3996
|
borderRadius: theme.shape.borderRadius.small,
|
|
3975
3997
|
// backgroundImage: ({ imageUrl } = {}) =>
|
|
3976
3998
|
// `linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%), url("${imageUrl}")`,
|
|
3999
|
+
background: 'linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%)',
|
|
3977
4000
|
backgroundSize: 'cover',
|
|
3978
4001
|
display: 'flex',
|
|
3979
4002
|
justifyContent: 'center',
|
|
@@ -3982,6 +4005,12 @@ const useVideoStyles$1 = createUseStyles(theme => {
|
|
|
3982
4005
|
cursor: 'pointer'
|
|
3983
4006
|
}
|
|
3984
4007
|
},
|
|
4008
|
+
videoPlayerImage: {
|
|
4009
|
+
height: '100%',
|
|
4010
|
+
width: '100%',
|
|
4011
|
+
objectFit: 'cover',
|
|
4012
|
+
objectPosition: 'top'
|
|
4013
|
+
},
|
|
3985
4014
|
'@media (max-width: 767px)': {
|
|
3986
4015
|
iframe: {
|
|
3987
4016
|
borderRadius: '8px 8px 0 0'
|
|
@@ -4018,7 +4047,8 @@ function VideoPlayer(props) {
|
|
|
4018
4047
|
className: classes.imgContainer
|
|
4019
4048
|
}, /*#__PURE__*/React.createElement(NextImageRenderer, {
|
|
4020
4049
|
src: imageUrl,
|
|
4021
|
-
sectionIndex: props?.sectionIndex
|
|
4050
|
+
sectionIndex: props?.sectionIndex,
|
|
4051
|
+
className: classes.videoPlayerImage
|
|
4022
4052
|
}), isEnabled ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(React.Fragment, null, props.onlyThumbnail ? null : /*#__PURE__*/React.createElement(Icon, {
|
|
4023
4053
|
name: "Video Play",
|
|
4024
4054
|
color: theme.palette.font.invertedDefault,
|