diy-template-components 5.13.0 → 5.15.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 +47 -4
- package/build/index.es.js.map +1 -1
- package/build/index.js +47 -4
- 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: '10000'
|
|
353
353
|
}
|
|
354
354
|
},
|
|
355
355
|
mobileAppNameClass: {
|
|
@@ -10914,7 +10914,7 @@ const SingleVideoSlide$1 = props => {
|
|
|
10914
10914
|
currencySymbol
|
|
10915
10915
|
} = props;
|
|
10916
10916
|
const showCourseInstallmentData = data?.courseOverviewData;
|
|
10917
|
-
const InstalmentData = isEdit ? data?.courseOverviewData?.installments?.formData?.installments[0].installmentAmount : data?.courseOverviewData?.installments?.formData?.installmentInfo?.installments[0]
|
|
10917
|
+
const InstalmentData = isEdit ? data?.courseOverviewData?.installments?.formData?.installments[0].installmentAmount : data?.courseOverviewData?.installments?.formData?.installmentInfo?.installments?.[0]?.installmentPrice;
|
|
10918
10918
|
const checkIfOfferIsValid = () => moment().diff(moment(props?.data?.endDate || 0)) < 0;
|
|
10919
10919
|
const checkForShowDiscount = () => {
|
|
10920
10920
|
if (props.data.endDate === null || checkIfOfferIsValid()) {
|
|
@@ -13020,6 +13020,17 @@ const whatsAppIconSvgSize = {
|
|
|
13020
13020
|
};
|
|
13021
13021
|
const getWhatsAppIconSize = breakpoint => whatsAppIconSvgSize[breakpoint] ?? whatsAppIconSvgSize.mobile;
|
|
13022
13022
|
|
|
13023
|
+
/**
|
|
13024
|
+
* Height of the sticky bar (full-width CTA) by breakpoint for page padding.
|
|
13025
|
+
* Used to prevent content overlap when the sticky bar is fixed at the bottom.
|
|
13026
|
+
* Values match the sticky bar's padding + content height per breakpoint.
|
|
13027
|
+
*/
|
|
13028
|
+
const STICKY_BAR_HEIGHT_BY_BREAKPOINT = {
|
|
13029
|
+
mobile: 0,
|
|
13030
|
+
tablet: 78,
|
|
13031
|
+
desktop: 82
|
|
13032
|
+
};
|
|
13033
|
+
|
|
13023
13034
|
const DEFAULT_WHATSAPP_ICON_COLOR = '#25D366';
|
|
13024
13035
|
|
|
13025
13036
|
/** Build WhatsApp wa.me URL from phone number (digits only, optional + prefix). */
|
|
@@ -13143,6 +13154,13 @@ function StickyCta({
|
|
|
13143
13154
|
window.addEventListener('resize', onResize);
|
|
13144
13155
|
return () => window.removeEventListener('resize', onResize);
|
|
13145
13156
|
}, []);
|
|
13157
|
+
|
|
13158
|
+
// Must run on every path so hook count is stable (Rules of Hooks)
|
|
13159
|
+
useEffect(() => {
|
|
13160
|
+
if (p.type !== 'sticky') return;
|
|
13161
|
+
document.body.classList.add('has-sticky-cta');
|
|
13162
|
+
return () => document.body.classList.remove('has-sticky-cta');
|
|
13163
|
+
}, [p.type]);
|
|
13146
13164
|
const editHintBlock = showEditHint ? /*#__PURE__*/React.createElement("div", {
|
|
13147
13165
|
"data-section": "sticky-cta-edit-hint",
|
|
13148
13166
|
style: {
|
|
@@ -13201,7 +13219,26 @@ function StickyCta({
|
|
|
13201
13219
|
// type === 'sticky' – use primary Button (same as other sections) linking to WhatsApp
|
|
13202
13220
|
const barStyle = getStickyBarStyle(breakpoint, theme);
|
|
13203
13221
|
const textStyle = getStickyTextStyle(breakpoint, theme);
|
|
13204
|
-
|
|
13222
|
+
const stickyBarPaddingStyles = `
|
|
13223
|
+
body.has-sticky-cta {
|
|
13224
|
+
padding-bottom: ${STICKY_BAR_HEIGHT_BY_BREAKPOINT.mobile}px;
|
|
13225
|
+
}
|
|
13226
|
+
@media (min-width: ${BREAKPOINTS.tablet}px) {
|
|
13227
|
+
body.has-sticky-cta {
|
|
13228
|
+
padding-bottom: ${STICKY_BAR_HEIGHT_BY_BREAKPOINT.tablet}px;
|
|
13229
|
+
}
|
|
13230
|
+
}
|
|
13231
|
+
@media (min-width: ${BREAKPOINTS.desktop}px) {
|
|
13232
|
+
body.has-sticky-cta {
|
|
13233
|
+
padding-bottom: ${STICKY_BAR_HEIGHT_BY_BREAKPOINT.desktop}px;
|
|
13234
|
+
}
|
|
13235
|
+
}
|
|
13236
|
+
`;
|
|
13237
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("style", {
|
|
13238
|
+
dangerouslySetInnerHTML: {
|
|
13239
|
+
__html: stickyBarPaddingStyles
|
|
13240
|
+
}
|
|
13241
|
+
}), isMobile ? null : editHintBlock, /*#__PURE__*/React.createElement("div", {
|
|
13205
13242
|
style: barStyle,
|
|
13206
13243
|
role: "banner",
|
|
13207
13244
|
"access-cta-sticky": "DIY"
|
|
@@ -13778,7 +13815,13 @@ function VideoWorkshopPromotion({
|
|
|
13778
13815
|
ref: videoData?.videoTextContent?.metadata?.refSetter,
|
|
13779
13816
|
data: videoData?.videoTextContent?.metadata,
|
|
13780
13817
|
type: 'primary',
|
|
13781
|
-
size: isMobile ? 'small' : 'medium'
|
|
13818
|
+
size: isMobile ? 'small' : 'medium',
|
|
13819
|
+
onClick: () => {
|
|
13820
|
+
const url = videoData?.videoTextHeading?.metadata?.value;
|
|
13821
|
+
if (url) {
|
|
13822
|
+
window.open(url, '_blank', 'noopener,noreferrer');
|
|
13823
|
+
}
|
|
13824
|
+
}
|
|
13782
13825
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
13783
13826
|
className: classes.videoBlock
|
|
13784
13827
|
}, /*#__PURE__*/React.createElement("div", {
|