diy-template-components 2.0.65 → 2.0.66

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