diy-template-components 5.15.0 → 5.17.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/build/index.es.js +32 -15
- package/build/index.es.js.map +1 -1
- package/build/index.js +32 -15
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -349,7 +349,7 @@ const useSectionStyles$b = createUseStyles(theme => ({
|
|
|
349
349
|
bottom: 0,
|
|
350
350
|
left: 0,
|
|
351
351
|
width: '100%',
|
|
352
|
-
zIndex: '
|
|
352
|
+
zIndex: '100'
|
|
353
353
|
}
|
|
354
354
|
},
|
|
355
355
|
mobileAppNameClass: {
|
|
@@ -3212,22 +3212,30 @@ const sectionBackgroundStyles = () => ({
|
|
|
3212
3212
|
position: 'absolute',
|
|
3213
3213
|
top: '50%',
|
|
3214
3214
|
left: '50%',
|
|
3215
|
-
width: '100vw',
|
|
3216
|
-
minWidth: '100%',
|
|
3217
|
-
minHeight: '100vh',
|
|
3218
|
-
height: '56.25vw' /* 16:9 */,
|
|
3219
3215
|
transform: 'translate(-50%, -50%)',
|
|
3220
3216
|
border: 'none',
|
|
3221
3217
|
zIndex: 0,
|
|
3222
3218
|
pointerEvents: 'none',
|
|
3219
|
+
/* Desktop/wide: fill by width, video may extend above/below (centered) */
|
|
3220
|
+
width: '100vw',
|
|
3221
|
+
minWidth: '100%',
|
|
3222
|
+
height: '56.25vw' /* 16:9 */,
|
|
3223
|
+
minHeight: '100%',
|
|
3223
3224
|
'@media (min-aspect-ratio: 16/9)': {
|
|
3224
3225
|
width: '177.78vh',
|
|
3225
3226
|
height: '100vh',
|
|
3226
3227
|
minWidth: '100%',
|
|
3227
3228
|
minHeight: '100%'
|
|
3229
|
+
},
|
|
3230
|
+
/* Mobile/tall viewport: fill by height so no black bars top/bottom; crop sides */
|
|
3231
|
+
'@media (max-aspect-ratio: 16/9)': {
|
|
3232
|
+
width: '177.78vh',
|
|
3233
|
+
minWidth: '100%',
|
|
3234
|
+
height: '100vh',
|
|
3235
|
+
minHeight: '100%'
|
|
3228
3236
|
}
|
|
3229
3237
|
},
|
|
3230
|
-
/* Blur overlay: frosted glass so content stays readable */
|
|
3238
|
+
/* Blur overlay: frosted glass so content stays readable; stronger blur on mobile */
|
|
3231
3239
|
sectionBackgroundBlur: {
|
|
3232
3240
|
position: 'absolute',
|
|
3233
3241
|
top: 0,
|
|
@@ -3235,7 +3243,12 @@ const sectionBackgroundStyles = () => ({
|
|
|
3235
3243
|
width: '100%',
|
|
3236
3244
|
height: '100%',
|
|
3237
3245
|
zIndex: 1,
|
|
3238
|
-
pointerEvents: 'none'
|
|
3246
|
+
pointerEvents: 'none',
|
|
3247
|
+
'@media (max-width: 768px)': {
|
|
3248
|
+
backdropFilter: 'blur(8px)',
|
|
3249
|
+
WebkitBackdropFilter: 'blur(8px)',
|
|
3250
|
+
backgroundColor: 'rgba(0, 0, 0, 0.15)'
|
|
3251
|
+
}
|
|
3239
3252
|
},
|
|
3240
3253
|
/* Background layer: fills wrapper only (absolute), does not affect wrapper height */
|
|
3241
3254
|
sectionBackgroundLayer: {
|
|
@@ -3327,7 +3340,8 @@ function withSectionBackground(WrappedSectionRenderer) {
|
|
|
3327
3340
|
...restProps
|
|
3328
3341
|
} = props;
|
|
3329
3342
|
const {
|
|
3330
|
-
isMobile
|
|
3343
|
+
isMobile,
|
|
3344
|
+
isThumbnailEnable
|
|
3331
3345
|
} = useContext(PageContext);
|
|
3332
3346
|
const classes = useStyles$1();
|
|
3333
3347
|
|
|
@@ -3360,7 +3374,6 @@ function withSectionBackground(WrappedSectionRenderer) {
|
|
|
3360
3374
|
} = componentBg;
|
|
3361
3375
|
const value = metadata?.value;
|
|
3362
3376
|
const isYoutubeBg = Boolean(isYoutube ?? isYoutubeVideo);
|
|
3363
|
-
console.log('amit22222', type, value);
|
|
3364
3377
|
if (!value) {
|
|
3365
3378
|
return /*#__PURE__*/React.createElement(WrappedSectionRenderer, _extends({
|
|
3366
3379
|
sectionData: sectionData,
|
|
@@ -3415,9 +3428,8 @@ function withSectionBackground(WrappedSectionRenderer) {
|
|
|
3415
3428
|
sectionIndex: sectionIndex
|
|
3416
3429
|
}, restProps))));
|
|
3417
3430
|
}
|
|
3418
|
-
// When
|
|
3419
|
-
|
|
3420
|
-
if (isMobile) {
|
|
3431
|
+
// When isThumbnailEnable and isMobile, show YouTube thumbnail only (no video) for type "video".
|
|
3432
|
+
if (isThumbnailEnable && isMobile) {
|
|
3421
3433
|
const thumbUrl = getYoutubeThumbnailUrl(videoId);
|
|
3422
3434
|
return /*#__PURE__*/React.createElement("div", {
|
|
3423
3435
|
className: classes.sectionBackgroundWrapper
|
|
@@ -3438,6 +3450,7 @@ function withSectionBackground(WrappedSectionRenderer) {
|
|
|
3438
3450
|
sectionIndex: sectionIndex
|
|
3439
3451
|
}, restProps))));
|
|
3440
3452
|
}
|
|
3453
|
+
// Use YouTube iframe for desktop, or mobile when isThumbnailEnable is not true.
|
|
3441
3454
|
const embedUrl = getYoutubeEmbedUrl(videoId);
|
|
3442
3455
|
return /*#__PURE__*/React.createElement("div", {
|
|
3443
3456
|
className: classes.sectionBackgroundWrapper
|
|
@@ -3795,6 +3808,7 @@ function PageRenderer$1({
|
|
|
3795
3808
|
isLandingPage = false
|
|
3796
3809
|
},
|
|
3797
3810
|
isMobile = false,
|
|
3811
|
+
isThumbnailEnable = false,
|
|
3798
3812
|
isLandingPages = false,
|
|
3799
3813
|
baseURLs = {},
|
|
3800
3814
|
hashToken,
|
|
@@ -3815,6 +3829,7 @@ function PageRenderer$1({
|
|
|
3815
3829
|
const navList = header?.navs;
|
|
3816
3830
|
const context = useMemo(() => ({
|
|
3817
3831
|
isMobile,
|
|
3832
|
+
isThumbnailEnable,
|
|
3818
3833
|
isLandingPages,
|
|
3819
3834
|
layout,
|
|
3820
3835
|
baseURLs,
|
|
@@ -3833,7 +3848,7 @@ function PageRenderer$1({
|
|
|
3833
3848
|
_id,
|
|
3834
3849
|
countryCode,
|
|
3835
3850
|
currencySymbol
|
|
3836
|
-
}), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol]);
|
|
3851
|
+
}), [isMobile, isThumbnailEnable, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol]);
|
|
3837
3852
|
const theme = useMemo(() => generateTheme(color, font, context.isMobile, roundness), [color, font, context.isMobile, roundness]);
|
|
3838
3853
|
const Wrapper = SectionWrapper || Fragment;
|
|
3839
3854
|
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
@@ -10914,7 +10929,7 @@ const SingleVideoSlide$1 = props => {
|
|
|
10914
10929
|
currencySymbol
|
|
10915
10930
|
} = props;
|
|
10916
10931
|
const showCourseInstallmentData = data?.courseOverviewData;
|
|
10917
|
-
const InstalmentData = isEdit ? data?.courseOverviewData?.installments?.formData?.installments[0].installmentAmount : data?.courseOverviewData?.installments?.formData?.installmentInfo?.installments
|
|
10932
|
+
const InstalmentData = isEdit ? data?.courseOverviewData?.installments?.formData?.installments[0].installmentAmount : data?.courseOverviewData?.installments?.formData?.installmentInfo?.installments[0].installmentPrice;
|
|
10918
10933
|
const checkIfOfferIsValid = () => moment().diff(moment(props?.data?.endDate || 0)) < 0;
|
|
10919
10934
|
const checkForShowDiscount = () => {
|
|
10920
10935
|
if (props.data.endDate === null || checkIfOfferIsValid()) {
|
|
@@ -13928,6 +13943,7 @@ function PageRenderer({
|
|
|
13928
13943
|
isCustomWebsite = false
|
|
13929
13944
|
},
|
|
13930
13945
|
isMobile = false,
|
|
13946
|
+
isThumbnailEnable = false,
|
|
13931
13947
|
isLandingPages = false,
|
|
13932
13948
|
baseURLs = {},
|
|
13933
13949
|
hashToken,
|
|
@@ -13947,6 +13963,7 @@ function PageRenderer({
|
|
|
13947
13963
|
const navList = header?.navs;
|
|
13948
13964
|
const context = useMemo(() => ({
|
|
13949
13965
|
isMobile,
|
|
13966
|
+
isThumbnailEnable,
|
|
13950
13967
|
isLandingPages,
|
|
13951
13968
|
layout,
|
|
13952
13969
|
baseURLs,
|
|
@@ -13965,7 +13982,7 @@ function PageRenderer({
|
|
|
13965
13982
|
_id,
|
|
13966
13983
|
countryCode,
|
|
13967
13984
|
currencySymbol
|
|
13968
|
-
}), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol]);
|
|
13985
|
+
}), [isMobile, isThumbnailEnable, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol]);
|
|
13969
13986
|
const theme = useMemo(() => generateTheme(color, font, context.isMobile, roundness), [color, font, context.isMobile, roundness]);
|
|
13970
13987
|
const Wrapper = SectionWrapper || Fragment;
|
|
13971
13988
|
return /*#__PURE__*/React.createElement(ThemeProvider, {
|