diy-template-components 2.0.65 → 2.0.67
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 +109 -14
- package/build/index.es.js.map +1 -1
- package/build/index.js +109 -14
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -2452,8 +2452,7 @@ function PageRenderer$1({
|
|
|
2452
2452
|
hideLogin,
|
|
2453
2453
|
isCustomWebsite,
|
|
2454
2454
|
countryCode,
|
|
2455
|
-
currencySymbol
|
|
2456
|
-
pageData: fullPageData = {}
|
|
2455
|
+
currencySymbol
|
|
2457
2456
|
}) {
|
|
2458
2457
|
const navList = header?.navs;
|
|
2459
2458
|
const context = React.useMemo(() => ({
|
|
@@ -2475,9 +2474,8 @@ function PageRenderer$1({
|
|
|
2475
2474
|
isCustomWebsite,
|
|
2476
2475
|
_id,
|
|
2477
2476
|
countryCode,
|
|
2478
|
-
currencySymbol
|
|
2479
|
-
|
|
2480
|
-
}), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol, fullPageData]);
|
|
2477
|
+
currencySymbol
|
|
2478
|
+
}), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol]);
|
|
2481
2479
|
const theme = React.useMemo(() => generateTheme(color, font, context.isMobile), [color, font, context.isMobile]);
|
|
2482
2480
|
const Wrapper = SectionWrapper || React.Fragment;
|
|
2483
2481
|
return /*#__PURE__*/React__default["default"].createElement(ThemeProvider, {
|
|
@@ -10120,14 +10118,50 @@ const useTimerCallPageStyles = createUseStyles(theme => ({
|
|
|
10120
10118
|
},
|
|
10121
10119
|
timerAndCallContainer: {
|
|
10122
10120
|
padding: '72px',
|
|
10123
|
-
background:
|
|
10121
|
+
background: '#F4F9FF',
|
|
10124
10122
|
borderRadius: '8px',
|
|
10125
10123
|
boxShadow: '0px 4px 10px rgba(0, 0, 0, 0.16)'
|
|
10126
10124
|
},
|
|
10127
10125
|
timerAndCallBox: {
|
|
10128
10126
|
display: 'flex',
|
|
10129
10127
|
flexDirection: 'column',
|
|
10130
|
-
gap: '42px'
|
|
10128
|
+
gap: '42px',
|
|
10129
|
+
justifyContent: 'center',
|
|
10130
|
+
alignItems: 'center'
|
|
10131
|
+
},
|
|
10132
|
+
title: {
|
|
10133
|
+
fontWeight: '700',
|
|
10134
|
+
fontSize: '40px',
|
|
10135
|
+
textAlign: 'center',
|
|
10136
|
+
lineHeight: '45px'
|
|
10137
|
+
},
|
|
10138
|
+
offerWrapper: {
|
|
10139
|
+
display: 'flex',
|
|
10140
|
+
flexDirection: 'column',
|
|
10141
|
+
gap: '24px',
|
|
10142
|
+
justifyContent: 'center',
|
|
10143
|
+
alignItems: 'center'
|
|
10144
|
+
},
|
|
10145
|
+
offerEndsTitle: {
|
|
10146
|
+
fontWeight: '700',
|
|
10147
|
+
fontSize: '16px'
|
|
10148
|
+
},
|
|
10149
|
+
countdown: {
|
|
10150
|
+
display: 'flex',
|
|
10151
|
+
gap: '10px'
|
|
10152
|
+
},
|
|
10153
|
+
counterBox: {
|
|
10154
|
+
display: 'flex',
|
|
10155
|
+
flexDirection: 'column',
|
|
10156
|
+
justifyContent: 'center',
|
|
10157
|
+
alignItems: 'center',
|
|
10158
|
+
border: '0.56px solid #2C88FF',
|
|
10159
|
+
borderRadius: '8px',
|
|
10160
|
+
background: '#FFFFFF',
|
|
10161
|
+
color: '#2C88FF',
|
|
10162
|
+
padding: '12px 16px 12px 16px',
|
|
10163
|
+
fontWeight: '600',
|
|
10164
|
+
fontSize: '14px'
|
|
10131
10165
|
},
|
|
10132
10166
|
// SMALL SCREEN
|
|
10133
10167
|
'@media screen and (max-width: 767px)': {
|
|
@@ -10139,6 +10173,12 @@ const useTimerCallPageStyles = createUseStyles(theme => ({
|
|
|
10139
10173
|
},
|
|
10140
10174
|
timerAndCallBox: {
|
|
10141
10175
|
gap: '32px'
|
|
10176
|
+
},
|
|
10177
|
+
title: {
|
|
10178
|
+
fontSize: '24px'
|
|
10179
|
+
},
|
|
10180
|
+
offerWrapper: {
|
|
10181
|
+
gap: '16px'
|
|
10142
10182
|
}
|
|
10143
10183
|
}
|
|
10144
10184
|
}));
|
|
@@ -10147,6 +10187,7 @@ const TimerAndCall = ({
|
|
|
10147
10187
|
sectionData,
|
|
10148
10188
|
extraProps = {}
|
|
10149
10189
|
}) => {
|
|
10190
|
+
console.log('extraProps in timer', extraProps);
|
|
10150
10191
|
const {
|
|
10151
10192
|
isMobile,
|
|
10152
10193
|
fullPageData
|
|
@@ -10156,18 +10197,73 @@ const TimerAndCall = ({
|
|
|
10156
10197
|
const classes = useTimerCallPageStyles({
|
|
10157
10198
|
isMobile
|
|
10158
10199
|
});
|
|
10200
|
+
const CounterBox = ({
|
|
10201
|
+
value,
|
|
10202
|
+
text
|
|
10203
|
+
}) => {
|
|
10204
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
10205
|
+
className: classes.counterBox
|
|
10206
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", null, value), /*#__PURE__*/React__default["default"].createElement("div", null, text));
|
|
10207
|
+
};
|
|
10208
|
+
const renderer = ({
|
|
10209
|
+
formatted,
|
|
10210
|
+
completed
|
|
10211
|
+
}) => {
|
|
10212
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
10213
|
+
className: classes.countdown
|
|
10214
|
+
}, /*#__PURE__*/React__default["default"].createElement(CounterBox, {
|
|
10215
|
+
value: formatted?.hours,
|
|
10216
|
+
text: "Hours"
|
|
10217
|
+
}), /*#__PURE__*/React__default["default"].createElement(CounterBox, {
|
|
10218
|
+
value: formatted?.minutes,
|
|
10219
|
+
text: "Mins"
|
|
10220
|
+
}), /*#__PURE__*/React__default["default"].createElement(CounterBox, {
|
|
10221
|
+
value: formatted?.seconds,
|
|
10222
|
+
text: "Secs"
|
|
10223
|
+
}));
|
|
10224
|
+
};
|
|
10159
10225
|
return /*#__PURE__*/React__default["default"].createElement("section", {
|
|
10160
10226
|
className: classes.timerAndCallSection
|
|
10161
10227
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
10162
10228
|
className: classes.timerAndCallContainer
|
|
10163
10229
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
10164
10230
|
className: classes.timerAndCallBox
|
|
10165
|
-
}, nodeData?.showOffer?.metadata?.value
|
|
10231
|
+
}, nodeData?.showOffer?.metadata?.value && nodeData.offerCounter?.metadata?.isOfferActive ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
10232
|
+
className: classes.offerWrapper
|
|
10233
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
10234
|
+
className: classes.offerEndsTitle
|
|
10235
|
+
}, "Offer ends in"), /*#__PURE__*/React__default["default"].createElement(Countdown__default["default"], {
|
|
10236
|
+
renderer: renderer,
|
|
10237
|
+
date: nodeData.offerCounter?.metadata?.endDate,
|
|
10238
|
+
daysInHours: true
|
|
10239
|
+
})) : null, nodeData?.title?.metadata?.value ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
10240
|
+
className: classes.title
|
|
10241
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
10166
10242
|
ref: nodeData?.heading?.refSetter,
|
|
10167
10243
|
dangerouslySetInnerHTML: {
|
|
10168
10244
|
__html: nodeData?.title?.metadata?.value
|
|
10169
10245
|
}
|
|
10170
|
-
})) : null
|
|
10246
|
+
})) : null, nodeData?.timerButton?.metadata?.value ? /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
10247
|
+
style: {
|
|
10248
|
+
width: '100%',
|
|
10249
|
+
fontWeight: '700',
|
|
10250
|
+
fontSize: '14px'
|
|
10251
|
+
},
|
|
10252
|
+
data: {
|
|
10253
|
+
// link: 'headerData?.loginCtaLink',
|
|
10254
|
+
// isLink: 1,
|
|
10255
|
+
value: nodeData.timerButton.metadata.value
|
|
10256
|
+
// isExternal: 1
|
|
10257
|
+
},
|
|
10258
|
+
|
|
10259
|
+
onClick: extraProps?.courseBuyNow,
|
|
10260
|
+
type: 'primary',
|
|
10261
|
+
size: 'medium',
|
|
10262
|
+
target: null,
|
|
10263
|
+
name: "button",
|
|
10264
|
+
rel: null
|
|
10265
|
+
// styling={isMobile ? { margin: '0 40px' } : {}}
|
|
10266
|
+
}) : null)));
|
|
10171
10267
|
};
|
|
10172
10268
|
|
|
10173
10269
|
var index = /*#__PURE__*/Object.freeze({
|
|
@@ -10208,6 +10304,7 @@ const MemoisedSection = /*#__PURE__*/React.memo(({
|
|
|
10208
10304
|
isCustomWebsite,
|
|
10209
10305
|
sectionIndex
|
|
10210
10306
|
}) => {
|
|
10307
|
+
console.log('extraProps in section data', extraProps);
|
|
10211
10308
|
const SectionComp = getCompToRender(sectionData.type);
|
|
10212
10309
|
return /*#__PURE__*/React__default["default"].createElement(SectionComp, {
|
|
10213
10310
|
sectionData: sectionData,
|
|
@@ -10262,8 +10359,7 @@ function PageRenderer({
|
|
|
10262
10359
|
templateId,
|
|
10263
10360
|
isTutorWebsite = false,
|
|
10264
10361
|
extraProps,
|
|
10265
|
-
hideLogin
|
|
10266
|
-
pageData: fullPageData = {}
|
|
10362
|
+
hideLogin
|
|
10267
10363
|
}) {
|
|
10268
10364
|
const navList = header?.navs;
|
|
10269
10365
|
const context = React.useMemo(() => ({
|
|
@@ -10285,9 +10381,8 @@ function PageRenderer({
|
|
|
10285
10381
|
isCustomWebsite,
|
|
10286
10382
|
_id,
|
|
10287
10383
|
countryCode,
|
|
10288
|
-
currencySymbol
|
|
10289
|
-
|
|
10290
|
-
}), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol, fullPageData]);
|
|
10384
|
+
currencySymbol
|
|
10385
|
+
}), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol]);
|
|
10291
10386
|
const theme = React.useMemo(() => generateTheme(color, font, context.isMobile), [color, font, context.isMobile]);
|
|
10292
10387
|
const Wrapper = SectionWrapper || React.Fragment;
|
|
10293
10388
|
return /*#__PURE__*/React__default["default"].createElement(ThemeProvider, {
|