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.es.js CHANGED
@@ -2436,8 +2436,7 @@ function PageRenderer$1({
2436
2436
  hideLogin,
2437
2437
  isCustomWebsite,
2438
2438
  countryCode,
2439
- currencySymbol,
2440
- pageData = {}
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
- pageData
2464
- }), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol, pageData]);
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,30 +10170,83 @@ const TimerAndCall = ({
10131
10170
  sectionData,
10132
10171
  extraProps = {}
10133
10172
  }) => {
10173
+ console.log('extraProps in timer', extraProps);
10134
10174
  const {
10135
- _id,
10136
- baseURLs,
10137
10175
  isMobile,
10138
- countryCode,
10139
- pageData
10176
+ fullPageData
10140
10177
  } = useContext(PageContext);
10141
10178
  const [nodeData] = sectionData?.components;
10142
- console.log('sid sectionData1', sectionData, extraProps, pageData);
10179
+ console.log('sid sectionData8', sectionData, nodeData, fullPageData);
10143
10180
  const classes = useTimerCallPageStyles({
10144
10181
  isMobile
10145
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
+ };
10146
10208
  return /*#__PURE__*/React.createElement("section", {
10147
10209
  className: classes.timerAndCallSection
10148
10210
  }, /*#__PURE__*/React.createElement("div", {
10149
10211
  className: classes.timerAndCallContainer
10150
10212
  }, /*#__PURE__*/React.createElement("div", {
10151
10213
  className: classes.timerAndCallBox
10152
- }, 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", {
10153
10225
  ref: nodeData?.heading?.refSetter,
10154
10226
  dangerouslySetInnerHTML: {
10155
10227
  __html: nodeData?.title?.metadata?.value
10156
10228
  }
10157
- })) : 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
+ }))));
10158
10250
  };
10159
10251
 
10160
10252
  var index = /*#__PURE__*/Object.freeze({
@@ -10195,6 +10287,7 @@ const MemoisedSection = /*#__PURE__*/memo(({
10195
10287
  isCustomWebsite,
10196
10288
  sectionIndex
10197
10289
  }) => {
10290
+ console.log('extraProps in section data', extraProps);
10198
10291
  const SectionComp = getCompToRender(sectionData.type);
10199
10292
  return /*#__PURE__*/React.createElement(SectionComp, {
10200
10293
  sectionData: sectionData,
@@ -10249,8 +10342,7 @@ function PageRenderer({
10249
10342
  templateId,
10250
10343
  isTutorWebsite = false,
10251
10344
  extraProps,
10252
- hideLogin,
10253
- pageData = {}
10345
+ hideLogin
10254
10346
  }) {
10255
10347
  const navList = header?.navs;
10256
10348
  const context = useMemo(() => ({
@@ -10272,9 +10364,8 @@ function PageRenderer({
10272
10364
  isCustomWebsite,
10273
10365
  _id,
10274
10366
  countryCode,
10275
- currencySymbol,
10276
- pageData
10277
- }), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol, pageData]);
10367
+ currencySymbol
10368
+ }), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol]);
10278
10369
  const theme = useMemo(() => generateTheme(color, font, context.isMobile), [color, font, context.isMobile]);
10279
10370
  const Wrapper = SectionWrapper || Fragment;
10280
10371
  return /*#__PURE__*/React.createElement(ThemeProvider, {