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