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 CHANGED
@@ -2436,8 +2436,7 @@ function PageRenderer$1({
2436
2436
  hideLogin,
2437
2437
  isCustomWebsite,
2438
2438
  countryCode,
2439
- currencySymbol,
2440
- pageData: fullPageData = {}
2439
+ currencySymbol
2441
2440
  }) {
2442
2441
  const navList = header?.navs;
2443
2442
  const context = useMemo(() => ({
@@ -2459,9 +2458,8 @@ function PageRenderer$1({
2459
2458
  isCustomWebsite,
2460
2459
  _id,
2461
2460
  countryCode,
2462
- currencySymbol,
2463
- fullPageData
2464
- }), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol, fullPageData]);
2461
+ currencySymbol
2462
+ }), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol]);
2465
2463
  const theme = useMemo(() => generateTheme(color, font, context.isMobile), [color, font, context.isMobile]);
2466
2464
  const Wrapper = SectionWrapper || Fragment;
2467
2465
  return /*#__PURE__*/React.createElement(ThemeProvider, {
@@ -10104,14 +10102,50 @@ const useTimerCallPageStyles = createUseStyles(theme => ({
10104
10102
  },
10105
10103
  timerAndCallContainer: {
10106
10104
  padding: '72px',
10107
- background: theme?.colors?.background3,
10105
+ background: '#F4F9FF',
10108
10106
  borderRadius: '8px',
10109
10107
  boxShadow: '0px 4px 10px rgba(0, 0, 0, 0.16)'
10110
10108
  },
10111
10109
  timerAndCallBox: {
10112
10110
  display: 'flex',
10113
10111
  flexDirection: 'column',
10114
- gap: '42px'
10112
+ gap: '42px',
10113
+ justifyContent: 'center',
10114
+ alignItems: 'center'
10115
+ },
10116
+ title: {
10117
+ fontWeight: '700',
10118
+ fontSize: '40px',
10119
+ textAlign: 'center',
10120
+ lineHeight: '45px'
10121
+ },
10122
+ offerWrapper: {
10123
+ display: 'flex',
10124
+ flexDirection: 'column',
10125
+ gap: '24px',
10126
+ justifyContent: 'center',
10127
+ alignItems: 'center'
10128
+ },
10129
+ offerEndsTitle: {
10130
+ fontWeight: '700',
10131
+ fontSize: '16px'
10132
+ },
10133
+ countdown: {
10134
+ display: 'flex',
10135
+ gap: '10px'
10136
+ },
10137
+ counterBox: {
10138
+ display: 'flex',
10139
+ flexDirection: 'column',
10140
+ justifyContent: 'center',
10141
+ alignItems: 'center',
10142
+ border: '0.56px solid #2C88FF',
10143
+ borderRadius: '8px',
10144
+ background: '#FFFFFF',
10145
+ color: '#2C88FF',
10146
+ padding: '12px 16px 12px 16px',
10147
+ fontWeight: '600',
10148
+ fontSize: '14px'
10115
10149
  },
10116
10150
  // SMALL SCREEN
10117
10151
  '@media screen and (max-width: 767px)': {
@@ -10123,6 +10157,12 @@ const useTimerCallPageStyles = createUseStyles(theme => ({
10123
10157
  },
10124
10158
  timerAndCallBox: {
10125
10159
  gap: '32px'
10160
+ },
10161
+ title: {
10162
+ fontSize: '24px'
10163
+ },
10164
+ offerWrapper: {
10165
+ gap: '16px'
10126
10166
  }
10127
10167
  }
10128
10168
  }));
@@ -10131,6 +10171,7 @@ const TimerAndCall = ({
10131
10171
  sectionData,
10132
10172
  extraProps = {}
10133
10173
  }) => {
10174
+ console.log('extraProps in timer', extraProps);
10134
10175
  const {
10135
10176
  isMobile,
10136
10177
  fullPageData
@@ -10140,18 +10181,73 @@ const TimerAndCall = ({
10140
10181
  const classes = useTimerCallPageStyles({
10141
10182
  isMobile
10142
10183
  });
10184
+ const CounterBox = ({
10185
+ value,
10186
+ text
10187
+ }) => {
10188
+ return /*#__PURE__*/React.createElement("div", {
10189
+ className: classes.counterBox
10190
+ }, /*#__PURE__*/React.createElement("div", null, value), /*#__PURE__*/React.createElement("div", null, text));
10191
+ };
10192
+ const renderer = ({
10193
+ formatted,
10194
+ completed
10195
+ }) => {
10196
+ return /*#__PURE__*/React.createElement("div", {
10197
+ className: classes.countdown
10198
+ }, /*#__PURE__*/React.createElement(CounterBox, {
10199
+ value: formatted?.hours,
10200
+ text: "Hours"
10201
+ }), /*#__PURE__*/React.createElement(CounterBox, {
10202
+ value: formatted?.minutes,
10203
+ text: "Mins"
10204
+ }), /*#__PURE__*/React.createElement(CounterBox, {
10205
+ value: formatted?.seconds,
10206
+ text: "Secs"
10207
+ }));
10208
+ };
10143
10209
  return /*#__PURE__*/React.createElement("section", {
10144
10210
  className: classes.timerAndCallSection
10145
10211
  }, /*#__PURE__*/React.createElement("div", {
10146
10212
  className: classes.timerAndCallContainer
10147
10213
  }, /*#__PURE__*/React.createElement("div", {
10148
10214
  className: classes.timerAndCallBox
10149
- }, nodeData?.showOffer?.metadata?.value ? /*#__PURE__*/React.createElement(React.Fragment, null) : null, nodeData?.title?.metadata?.value ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
10215
+ }, nodeData?.showOffer?.metadata?.value && nodeData.offerCounter?.metadata?.isOfferActive ? /*#__PURE__*/React.createElement("div", {
10216
+ className: classes.offerWrapper
10217
+ }, /*#__PURE__*/React.createElement("div", {
10218
+ className: classes.offerEndsTitle
10219
+ }, "Offer ends in"), /*#__PURE__*/React.createElement(Countdown, {
10220
+ renderer: renderer,
10221
+ date: nodeData.offerCounter?.metadata?.endDate,
10222
+ daysInHours: true
10223
+ })) : null, nodeData?.title?.metadata?.value ? /*#__PURE__*/React.createElement("div", {
10224
+ className: classes.title
10225
+ }, /*#__PURE__*/React.createElement("span", {
10150
10226
  ref: nodeData?.heading?.refSetter,
10151
10227
  dangerouslySetInnerHTML: {
10152
10228
  __html: nodeData?.title?.metadata?.value
10153
10229
  }
10154
- })) : null)));
10230
+ })) : null, nodeData?.timerButton?.metadata?.value ? /*#__PURE__*/React.createElement(Button, {
10231
+ style: {
10232
+ width: '100%',
10233
+ fontWeight: '700',
10234
+ fontSize: '14px'
10235
+ },
10236
+ data: {
10237
+ // link: 'headerData?.loginCtaLink',
10238
+ // isLink: 1,
10239
+ value: nodeData.timerButton.metadata.value
10240
+ // isExternal: 1
10241
+ },
10242
+
10243
+ onClick: extraProps?.courseBuyNow,
10244
+ type: 'primary',
10245
+ size: 'medium',
10246
+ target: null,
10247
+ name: "button",
10248
+ rel: null
10249
+ // styling={isMobile ? { margin: '0 40px' } : {}}
10250
+ }) : null)));
10155
10251
  };
10156
10252
 
10157
10253
  var index = /*#__PURE__*/Object.freeze({
@@ -10192,6 +10288,7 @@ const MemoisedSection = /*#__PURE__*/memo(({
10192
10288
  isCustomWebsite,
10193
10289
  sectionIndex
10194
10290
  }) => {
10291
+ console.log('extraProps in section data', extraProps);
10195
10292
  const SectionComp = getCompToRender(sectionData.type);
10196
10293
  return /*#__PURE__*/React.createElement(SectionComp, {
10197
10294
  sectionData: sectionData,
@@ -10246,8 +10343,7 @@ function PageRenderer({
10246
10343
  templateId,
10247
10344
  isTutorWebsite = false,
10248
10345
  extraProps,
10249
- hideLogin,
10250
- pageData: fullPageData = {}
10346
+ hideLogin
10251
10347
  }) {
10252
10348
  const navList = header?.navs;
10253
10349
  const context = useMemo(() => ({
@@ -10269,9 +10365,8 @@ function PageRenderer({
10269
10365
  isCustomWebsite,
10270
10366
  _id,
10271
10367
  countryCode,
10272
- currencySymbol,
10273
- fullPageData
10274
- }), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol, fullPageData]);
10368
+ currencySymbol
10369
+ }), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol]);
10275
10370
  const theme = useMemo(() => generateTheme(color, font, context.isMobile), [color, font, context.isMobile]);
10276
10371
  const Wrapper = SectionWrapper || Fragment;
10277
10372
  return /*#__PURE__*/React.createElement(ThemeProvider, {