diy-template-components 2.0.56 → 2.0.58

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
@@ -9,7 +9,7 @@ function ___$insertStyle(css) {
9
9
  return css;
10
10
  }
11
11
 
12
- import React, { createContext, useContext, forwardRef, useRef, useEffect, useState, useMemo, useLayoutEffect, Suspense, memo, lazy, Fragment } from 'react';
12
+ import React, { createContext, useContext as useContext$1, forwardRef, useRef, useEffect, useState, useMemo, useLayoutEffect, Suspense, memo, lazy, Fragment } from 'react';
13
13
  import Slider from 'react-slick';
14
14
  import axios from 'axios';
15
15
  import moment from 'moment';
@@ -469,7 +469,7 @@ function useLinkBuilder(data) {
469
469
  isEdit,
470
470
  basePath,
471
471
  isMasterTemplate
472
- } = useContext(PageContext);
472
+ } = useContext$1(PageContext);
473
473
  if (isEdit || !data.isLink) {
474
474
  return null;
475
475
  }
@@ -507,7 +507,7 @@ const Button = /*#__PURE__*/forwardRef(function Button({
507
507
  }, ref) {
508
508
  const {
509
509
  isEdit
510
- } = useContext(PageContext);
510
+ } = useContext$1(PageContext);
511
511
  const link = useLinkBuilder(data);
512
512
  const classes = buttonStyles({
513
513
  fluid,
@@ -1072,7 +1072,7 @@ function OptionList({
1072
1072
  const {
1073
1073
  isPreview,
1074
1074
  countryCode
1075
- } = useContext(PageContext);
1075
+ } = useContext$1(PageContext);
1076
1076
  function checkIsActiveTab(slug = '') {
1077
1077
  if (typeof window !== 'undefined') {
1078
1078
  const pathname = window.location.pathname;
@@ -1236,7 +1236,7 @@ const NextImageRenderer = ({
1236
1236
  isCustomWebsite,
1237
1237
  pageData,
1238
1238
  isMobile
1239
- } = useContext(PageContext);
1239
+ } = useContext$1(PageContext);
1240
1240
 
1241
1241
  // return empty div if src is empty string or empty object or null
1242
1242
  if (!src || typeof src === 'object' && Object.keys(src).length === 0) {
@@ -1312,7 +1312,7 @@ function DesktopHeader({
1312
1312
  } = header;
1313
1313
  const {
1314
1314
  isCustomWebsite
1315
- } = useContext(PageContext);
1315
+ } = useContext$1(PageContext);
1316
1316
  const logoUrl = useLinkBuilder({
1317
1317
  isLink: true,
1318
1318
  link: '/'
@@ -1393,7 +1393,7 @@ function MobileHeader({
1393
1393
  const {
1394
1394
  isCustomWebsite,
1395
1395
  countryCode
1396
- } = useContext(PageContext);
1396
+ } = useContext$1(PageContext);
1397
1397
  const {
1398
1398
  isFixed = true
1399
1399
  } = header;
@@ -1561,7 +1561,7 @@ function Header({
1561
1561
  const {
1562
1562
  isMobile,
1563
1563
  isTutorWebsite
1564
- } = useContext(PageContext);
1564
+ } = useContext$1(PageContext);
1565
1565
  const filterHiddenNavs = () => {
1566
1566
  return data?.navs?.filter(dt => !dt.isHiddenNav);
1567
1567
  };
@@ -1795,7 +1795,7 @@ function Footer({
1795
1795
  const theme = useTheme();
1796
1796
  const {
1797
1797
  isCustomWebsite
1798
- } = useContext(PageContext);
1798
+ } = useContext$1(PageContext);
1799
1799
  const classes = useSectionStyles$9({
1800
1800
  isCustomWebsite
1801
1801
  });
@@ -2783,7 +2783,7 @@ function Carousel({
2783
2783
  const sliderRef = useRef();
2784
2784
  const {
2785
2785
  isMobile
2786
- } = useContext(PageContext);
2786
+ } = useContext$1(PageContext);
2787
2787
  const classes = useCarouselStyles({
2788
2788
  isMobile,
2789
2789
  buttonContainerClass,
@@ -2861,7 +2861,7 @@ function Section$4({
2861
2861
  isMobile,
2862
2862
  isCustomWebsite,
2863
2863
  countryCode
2864
- } = useContext(PageContext);
2864
+ } = useContext$1(PageContext);
2865
2865
  const classes = useSectionStyles$8({
2866
2866
  isCustomWebsite,
2867
2867
  isMobile,
@@ -2918,7 +2918,7 @@ function BannerCarouselRight({
2918
2918
  layout: {
2919
2919
  containerWidth
2920
2920
  }
2921
- } = useContext(PageContext);
2921
+ } = useContext$1(PageContext);
2922
2922
  const classes = useSectionStyles$8({
2923
2923
  containerWidth,
2924
2924
  isMobile
@@ -3115,7 +3115,7 @@ function List({
3115
3115
  containerWidth
3116
3116
  },
3117
3117
  isMobile
3118
- } = useContext(PageContext);
3118
+ } = useContext$1(PageContext);
3119
3119
  const classes = useSectionStyles$7({
3120
3120
  containerWidth,
3121
3121
  isMobile
@@ -3380,7 +3380,7 @@ const Section$3 = ({
3380
3380
  isMobile,
3381
3381
  isCustomWebsite,
3382
3382
  countryCode
3383
- } = useContext(PageContext);
3383
+ } = useContext$1(PageContext);
3384
3384
  const hasContent = Boolean(nodeData.cardHeading.metadata.value || nodeData.title.metadata.valu || nodeData.description.metadata.value);
3385
3385
  const mobileImageSrc = isMobile && nodeData?.mobileImage?.metadata?.value;
3386
3386
  const desktopImageSrc = nodeData?.image?.metadata?.value;
@@ -3619,7 +3619,7 @@ function Section$2({
3619
3619
  isMobile,
3620
3620
  isCustomWebsite,
3621
3621
  countryCode
3622
- } = useContext(PageContext);
3622
+ } = useContext$1(PageContext);
3623
3623
  const classes = useSectionStyles$5({
3624
3624
  isCustomWebsite,
3625
3625
  isMobile,
@@ -3676,7 +3676,7 @@ function BannerCarouselLeft({
3676
3676
  layout: {
3677
3677
  containerWidth
3678
3678
  }
3679
- } = useContext(PageContext);
3679
+ } = useContext$1(PageContext);
3680
3680
  const classes = useSectionStyles$5({
3681
3681
  containerWidth
3682
3682
  });
@@ -3975,7 +3975,7 @@ function SubscribeToNewsletter({
3975
3975
  isEdit,
3976
3976
  isLandingPages,
3977
3977
  extraProps
3978
- } = useContext(PageContext);
3978
+ } = useContext$1(PageContext);
3979
3979
  const [nodeData] = sectionData.components;
3980
3980
  const classes = useSectionStyles$4({
3981
3981
  containerWidth,
@@ -4279,7 +4279,7 @@ function Section$1({
4279
4279
  layout: {
4280
4280
  containerWidth
4281
4281
  }
4282
- } = useContext(PageContext);
4282
+ } = useContext$1(PageContext);
4283
4283
  const carouselList = nodeData?.cardCarousel?.components;
4284
4284
  const cardsCount = carouselList?.length;
4285
4285
  const slidesToShow = isMobile ? 1 : 2;
@@ -4749,7 +4749,7 @@ function VideoTestimonial({
4749
4749
  countryCode,
4750
4750
  currencySymbol,
4751
4751
  isMobile
4752
- } = useContext(PageContext);
4752
+ } = useContext$1(PageContext);
4753
4753
  const classes = useVideoTestimonialStyles({
4754
4754
  containerWidth,
4755
4755
  isMobile
@@ -4973,7 +4973,7 @@ function Video({
4973
4973
  layout: {
4974
4974
  containerWidth
4975
4975
  }
4976
- } = useContext(PageContext);
4976
+ } = useContext$1(PageContext);
4977
4977
  const [videoData] = sectionData.components;
4978
4978
  const cardsCount = videoData?.videoCarousel?.components?.length;
4979
4979
  const slidesToShow = isMobile ? 1 : 2;
@@ -5179,7 +5179,7 @@ function Info({
5179
5179
  layout: {
5180
5180
  containerWidth
5181
5181
  }
5182
- } = useContext(PageContext);
5182
+ } = useContext$1(PageContext);
5183
5183
  const theme = useTheme();
5184
5184
  const slidesToShow = isMobile ? 1 : 4;
5185
5185
  const [nodeData] = sectionData.components;
@@ -5336,7 +5336,7 @@ const TextSection = ({
5336
5336
  containerWidth
5337
5337
  },
5338
5338
  isMobile
5339
- } = useContext(PageContext);
5339
+ } = useContext$1(PageContext);
5340
5340
  const classes = useSectionStyles$2({
5341
5341
  containerWidth,
5342
5342
  isMobile
@@ -5519,7 +5519,7 @@ function PhotoGallery({
5519
5519
  layout: {
5520
5520
  containerWidth
5521
5521
  }
5522
- } = useContext(PageContext);
5522
+ } = useContext$1(PageContext);
5523
5523
  const [nodeData] = sectionData.components;
5524
5524
  const carouselList = nodeData?.cardCarousel?.components;
5525
5525
  const cardsCount = carouselList?.length;
@@ -5713,7 +5713,7 @@ const FAQListing = ({
5713
5713
  containerWidth
5714
5714
  },
5715
5715
  isMobile
5716
- } = useContext(PageContext);
5716
+ } = useContext$1(PageContext);
5717
5717
  const classes = useFaqListStyles({
5718
5718
  selectedIndex,
5719
5719
  containerWidth,
@@ -5896,7 +5896,7 @@ const TextGrid = ({
5896
5896
  layout: {
5897
5897
  containerWidth
5898
5898
  }
5899
- } = useContext(PageContext);
5899
+ } = useContext$1(PageContext);
5900
5900
  const [nodeData] = sectionData.components;
5901
5901
  const cardsCount = nodeData?.contentList?.components?.length;
5902
5902
  const slidesToShow = isMobile ? 1 : 2;
@@ -6289,7 +6289,7 @@ function CourseCard({
6289
6289
  const classes = useCourseStyles();
6290
6290
  const {
6291
6291
  isEdit
6292
- } = useContext(PageContext);
6292
+ } = useContext$1(PageContext);
6293
6293
  const discount = parseInt((card?.price - card?.finalPrice) / card?.price * 100).toFixed(2);
6294
6294
  const defaultCardImg = 'https://cp-assets-public.s3.ap-south-1.amazonaws.com/cams/cards-icon/default_course.png';
6295
6295
  const price = formatCurrency(countryCode, card?.price, currencySymbol);
@@ -6354,7 +6354,7 @@ function courses({
6354
6354
  isEdit,
6355
6355
  countryCode,
6356
6356
  currencySymbol
6357
- } = useContext(PageContext);
6357
+ } = useContext$1(PageContext);
6358
6358
  const [cardList, setCardList] = useState(null);
6359
6359
  const [errored, setErrored] = useState(false);
6360
6360
  const [fallBackImages, setFallbackImages] = useState([]);
@@ -6754,7 +6754,7 @@ function TeamCard({
6754
6754
  layout: {
6755
6755
  containerWidth
6756
6756
  }
6757
- } = useContext(PageContext);
6757
+ } = useContext$1(PageContext);
6758
6758
  const [teamData] = sectionData.components;
6759
6759
  const cardsCount = teamData?.teamCarousel?.components?.length;
6760
6760
  const slidesToShow = isMobile ? 1 : 4;
@@ -6993,7 +6993,7 @@ function FormEnquiry({
6993
6993
  isEdit,
6994
6994
  isLandingPages,
6995
6995
  extraProps
6996
- } = useContext(PageContext);
6996
+ } = useContext$1(PageContext);
6997
6997
  const classes = useSectionStyles$1({
6998
6998
  containerWidth,
6999
6999
  isMobile
@@ -7454,7 +7454,7 @@ function Contact({
7454
7454
  isEdit,
7455
7455
  isLandingPages,
7456
7456
  extraProps
7457
- } = useContext(PageContext);
7457
+ } = useContext$1(PageContext);
7458
7458
  let [btnDisabled, setBtnDisabled] = useState(false);
7459
7459
  const [isSubmitted, setIsSubmitted] = useState(false);
7460
7460
  const [nodeData] = sectionData.components;
@@ -8113,7 +8113,7 @@ function CoursePromotionPage$1({
8113
8113
  countryCode,
8114
8114
  currencySymbol,
8115
8115
  isMobile
8116
- } = useContext(PageContext);
8116
+ } = useContext$1(PageContext);
8117
8117
  const classes = useWebinarPromotionPage({
8118
8118
  containerWidth,
8119
8119
  isMobile,
@@ -8448,7 +8448,7 @@ const SingleVideoSlide = props => {
8448
8448
  },
8449
8449
  isMobile,
8450
8450
  isEdit
8451
- } = useContext(PageContext);
8451
+ } = useContext$1(PageContext);
8452
8452
  const renderer = ({
8453
8453
  days,
8454
8454
  hours,
@@ -8705,7 +8705,7 @@ function CoursePromotionPage({
8705
8705
  countryCode,
8706
8706
  currencySymbol,
8707
8707
  isMobile
8708
- } = useContext(PageContext);
8708
+ } = useContext$1(PageContext);
8709
8709
  const classes = useCoursePromotionPage({
8710
8710
  containerWidth,
8711
8711
  isMobile
@@ -8732,7 +8732,7 @@ var index$5 = /*#__PURE__*/Object.freeze({
8732
8732
  'default': CoursePromotionPage
8733
8733
  });
8734
8734
 
8735
- const useFormPageStyles$1 = createUseStyles(theme => ({
8735
+ const useFormPageStyles = createUseStyles(theme => ({
8736
8736
  formPageSection: {
8737
8737
  padding: ({
8738
8738
  isMobile
@@ -8897,8 +8897,8 @@ const FormPage = ({
8897
8897
  baseURLs,
8898
8898
  isMobile,
8899
8899
  countryCode
8900
- } = useContext(PageContext);
8901
- const classes = useFormPageStyles$1({
8900
+ } = useContext$1(PageContext);
8901
+ const classes = useFormPageStyles({
8902
8902
  isMobile
8903
8903
  });
8904
8904
  const handleSubmit = async e => {
@@ -9188,7 +9188,7 @@ function Tiles({
9188
9188
  },
9189
9189
  isPreview,
9190
9190
  isEdit
9191
- } = useContext(PageContext);
9191
+ } = useContext$1(PageContext);
9192
9192
  const classes = useTilesStyles({
9193
9193
  isMobile
9194
9194
  });
@@ -9937,7 +9937,7 @@ function ABOUT_INSTITUTE({
9937
9937
  containerWidth
9938
9938
  },
9939
9939
  isMobile
9940
- } = useContext(PageContext);
9940
+ } = useContext$1(PageContext);
9941
9941
  const classes = useAboutInstituteStyles({
9942
9942
  containerWidth,
9943
9943
  isMobile
@@ -10089,13 +10089,56 @@ var index$1 = /*#__PURE__*/Object.freeze({
10089
10089
  'default': ABOUT_INSTITUTE
10090
10090
  });
10091
10091
 
10092
+ const useTimerCallPageStyles = createUseStyles(theme => ({
10093
+ timerAndCallSection: {
10094
+ padding: ({
10095
+ isMobile
10096
+ } = {}) => isMobile ? '24px' : '80px 120px',
10097
+ background: theme?.colors?.white,
10098
+ '&, & *, & *:before, & *:after': {
10099
+ fontFamily: theme?.typography?.fontFamily,
10100
+ boxSizing: 'border-box'
10101
+ }
10102
+ },
10103
+ timerAndCallContainer: {
10104
+ padding: '72px',
10105
+ background: theme?.colors?.background3,
10106
+ borderRadius: '8px',
10107
+ boxShadow: '0px 4px 10px rgba(0, 0, 0, 0.16)'
10108
+ },
10109
+ timerAndCallBox: {
10110
+ display: 'flex',
10111
+ flexDirection: 'column',
10112
+ gap: '42px'
10113
+ },
10114
+ // SMALL SCREEN
10115
+ '@media screen and (max-width: 767px)': {
10116
+ timerAndCallSection: {
10117
+ padding: '24px'
10118
+ },
10119
+ timerAndCallContainer: {
10120
+ padding: '16px'
10121
+ },
10122
+ timerAndCallBox: {
10123
+ gap: '32px'
10124
+ }
10125
+ }
10126
+ }));
10127
+
10092
10128
  const TimerAndCall = ({
10093
10129
  sectionData,
10094
10130
  extraProps = {}
10095
10131
  }) => {
10096
- console.log('sid sectionData', sectionData, extraProps);
10132
+ const {
10133
+ _id,
10134
+ baseURLs,
10135
+ isMobile,
10136
+ countryCode,
10137
+ pageData
10138
+ } = useContext(PageContext);
10097
10139
  const [nodeData] = sectionData?.components;
10098
- const classes = useFormPageStyles({
10140
+ console.log('sid sectionData', sectionData, extraProps, pageData, PageContext);
10141
+ const classes = useTimerCallPageStyles({
10099
10142
  isMobile
10100
10143
  });
10101
10144
  return /*#__PURE__*/React.createElement("section", {