diy-template-components 0.1.35 → 0.1.36

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
@@ -1833,26 +1833,27 @@ function ArimaMadurai() {
1833
1833
  }
1834
1834
 
1835
1835
  const TYPE_TO_COMPONENT_MAP$1 = {
1836
- BANNER_CAROUSEL_RIGHT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$j; })),
1837
- GRID_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$i; })),
1838
- BANNER_CAROUSEL_CENTER: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$h; })),
1839
- BANNER_CAROUSEL_LEFT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$g; })),
1840
- FORM_SUBSCRIBE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$f; })),
1841
- TEXT_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$e; })),
1842
- VIDEO_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$d; })),
1843
- VIDEO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$c; })),
1844
- INFO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$b; })),
1845
- TEXT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$a; })),
1846
- IMAGE_GALLERY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$9; })),
1847
- FAQ_LISTING: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$8; })),
1848
- COURSE_CAROUSEL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$6; })),
1849
- TEAM_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$5; })),
1850
- TEXT_GRID: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$7; })),
1851
- CONTACT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$4; })),
1852
- FORM_ENQUIRY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$3; })),
1853
- WEBINAR_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$2; })),
1854
- COURSE_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$1; })),
1855
- FORM_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index; }))
1836
+ BANNER_CAROUSEL_RIGHT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$k; })),
1837
+ GRID_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$j; })),
1838
+ BANNER_CAROUSEL_CENTER: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$i; })),
1839
+ BANNER_CAROUSEL_LEFT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$h; })),
1840
+ FORM_SUBSCRIBE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$g; })),
1841
+ TEXT_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$f; })),
1842
+ VIDEO_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$e; })),
1843
+ VIDEO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$d; })),
1844
+ INFO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$c; })),
1845
+ TEXT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$b; })),
1846
+ IMAGE_GALLERY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$a; })),
1847
+ FAQ_LISTING: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$9; })),
1848
+ COURSE_CAROUSEL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$7; })),
1849
+ TEAM_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$6; })),
1850
+ TEXT_GRID: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$8; })),
1851
+ CONTACT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$5; })),
1852
+ FORM_ENQUIRY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$4; })),
1853
+ WEBINAR_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$3; })),
1854
+ COURSE_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$2; })),
1855
+ FORM_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$1; })),
1856
+ TILES_SECTION: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index; }))
1856
1857
  };
1857
1858
 
1858
1859
  const getCompToRender$1 = type => TYPE_TO_COMPONENT_MAP$1[type] || (() => null);
@@ -2390,7 +2391,7 @@ function BannerCarouselRight({
2390
2391
  })))));
2391
2392
  }
2392
2393
 
2393
- var index$j = /*#__PURE__*/Object.freeze({
2394
+ var index$k = /*#__PURE__*/Object.freeze({
2394
2395
  __proto__: null,
2395
2396
  'default': BannerCarouselRight
2396
2397
  });
@@ -2642,7 +2643,7 @@ function List({
2642
2643
  }))));
2643
2644
  }
2644
2645
 
2645
- var index$i = /*#__PURE__*/Object.freeze({
2646
+ var index$j = /*#__PURE__*/Object.freeze({
2646
2647
  __proto__: null,
2647
2648
  'default': List
2648
2649
  });
@@ -2811,7 +2812,7 @@ function BannerCarouselCenter({
2811
2812
  }))));
2812
2813
  }
2813
2814
 
2814
- var index$h = /*#__PURE__*/Object.freeze({
2815
+ var index$i = /*#__PURE__*/Object.freeze({
2815
2816
  __proto__: null,
2816
2817
  'default': BannerCarouselCenter
2817
2818
  });
@@ -3002,7 +3003,7 @@ function BannerCarouselLeft({
3002
3003
  })))));
3003
3004
  }
3004
3005
 
3005
- var index$g = /*#__PURE__*/Object.freeze({
3006
+ var index$h = /*#__PURE__*/Object.freeze({
3006
3007
  __proto__: null,
3007
3008
  'default': BannerCarouselLeft
3008
3009
  });
@@ -3395,7 +3396,7 @@ function SubscribeToNewsletter({
3395
3396
  })))))));
3396
3397
  }
3397
3398
 
3398
- var index$f = /*#__PURE__*/Object.freeze({
3399
+ var index$g = /*#__PURE__*/Object.freeze({
3399
3400
  __proto__: null,
3400
3401
  'default': SubscribeToNewsletter
3401
3402
  });
@@ -3657,7 +3658,7 @@ function Testimonials({
3657
3658
  }));
3658
3659
  }
3659
3660
 
3660
- var index$e = /*#__PURE__*/Object.freeze({
3661
+ var index$f = /*#__PURE__*/Object.freeze({
3661
3662
  __proto__: null,
3662
3663
  'default': Testimonials
3663
3664
  });
@@ -4036,7 +4037,7 @@ function VideoTestimonial({
4036
4037
  }))))));
4037
4038
  }
4038
4039
 
4039
- var index$d = /*#__PURE__*/Object.freeze({
4040
+ var index$e = /*#__PURE__*/Object.freeze({
4040
4041
  __proto__: null,
4041
4042
  'default': VideoTestimonial
4042
4043
  });
@@ -4264,7 +4265,7 @@ function Video({
4264
4265
  }, carouselContent))));
4265
4266
  }
4266
4267
 
4267
- var index$c = /*#__PURE__*/Object.freeze({
4268
+ var index$d = /*#__PURE__*/Object.freeze({
4268
4269
  __proto__: null,
4269
4270
  'default': Video
4270
4271
  });
@@ -4490,7 +4491,7 @@ function Info({
4490
4491
  }, carouselContent))));
4491
4492
  }
4492
4493
 
4493
- var index$b = /*#__PURE__*/Object.freeze({
4494
+ var index$c = /*#__PURE__*/Object.freeze({
4494
4495
  __proto__: null,
4495
4496
  'default': Info
4496
4497
  });
@@ -4609,7 +4610,7 @@ const TextSection = ({
4609
4610
  })))));
4610
4611
  };
4611
4612
 
4612
- var index$a = /*#__PURE__*/Object.freeze({
4613
+ var index$b = /*#__PURE__*/Object.freeze({
4613
4614
  __proto__: null,
4614
4615
  'default': TextSection
4615
4616
  });
@@ -4766,7 +4767,7 @@ function PhotoGallery({
4766
4767
  }, carouselContent))));
4767
4768
  }
4768
4769
 
4769
- var index$9 = /*#__PURE__*/Object.freeze({
4770
+ var index$a = /*#__PURE__*/Object.freeze({
4770
4771
  __proto__: null,
4771
4772
  'default': PhotoGallery
4772
4773
  });
@@ -4944,7 +4945,7 @@ const Accordion = ({
4944
4945
  })));
4945
4946
  };
4946
4947
 
4947
- var index$8 = /*#__PURE__*/Object.freeze({
4948
+ var index$9 = /*#__PURE__*/Object.freeze({
4948
4949
  __proto__: null,
4949
4950
  'default': FAQListing
4950
4951
  });
@@ -5109,7 +5110,7 @@ const TextGrid = ({
5109
5110
  }, carouselContent))));
5110
5111
  };
5111
5112
 
5112
- var index$7 = /*#__PURE__*/Object.freeze({
5113
+ var index$8 = /*#__PURE__*/Object.freeze({
5113
5114
  __proto__: null,
5114
5115
  'default': TextGrid
5115
5116
  });
@@ -5563,7 +5564,7 @@ function SimpleCardsContainer({
5563
5564
  }, children);
5564
5565
  }
5565
5566
 
5566
- var index$6 = /*#__PURE__*/Object.freeze({
5567
+ var index$7 = /*#__PURE__*/Object.freeze({
5567
5568
  __proto__: null,
5568
5569
  'default': courses
5569
5570
  });
@@ -5786,7 +5787,7 @@ function TeamCard({
5786
5787
  }, " ", carouselContent)));
5787
5788
  }
5788
5789
 
5789
- var index$5 = /*#__PURE__*/Object.freeze({
5790
+ var index$6 = /*#__PURE__*/Object.freeze({
5790
5791
  __proto__: null,
5791
5792
  'default': TeamCard
5792
5793
  });
@@ -6160,7 +6161,7 @@ function FormEnquiry({
6160
6161
  }))))));
6161
6162
  }
6162
6163
 
6163
- var index$4 = /*#__PURE__*/Object.freeze({
6164
+ var index$5 = /*#__PURE__*/Object.freeze({
6164
6165
  __proto__: null,
6165
6166
  'default': FormEnquiry
6166
6167
  });
@@ -6534,7 +6535,7 @@ function Contact({
6534
6535
  }))))));
6535
6536
  }
6536
6537
 
6537
- var index$3 = /*#__PURE__*/Object.freeze({
6538
+ var index$4 = /*#__PURE__*/Object.freeze({
6538
6539
  __proto__: null,
6539
6540
  'default': Contact
6540
6541
  });
@@ -6971,7 +6972,7 @@ function CoursePromotionPage$1({
6971
6972
  }))));
6972
6973
  }
6973
6974
 
6974
- var index$2 = /*#__PURE__*/Object.freeze({
6975
+ var index$3 = /*#__PURE__*/Object.freeze({
6975
6976
  __proto__: null,
6976
6977
  'default': CoursePromotionPage$1
6977
6978
  });
@@ -7441,7 +7442,7 @@ function CoursePromotionPage({
7441
7442
  }))));
7442
7443
  }
7443
7444
 
7444
- var index$1 = /*#__PURE__*/Object.freeze({
7445
+ var index$2 = /*#__PURE__*/Object.freeze({
7445
7446
  __proto__: null,
7446
7447
  'default': CoursePromotionPage
7447
7448
  });
@@ -7785,11 +7786,139 @@ const FormPage = ({
7785
7786
  })))));
7786
7787
  };
7787
7788
 
7788
- var index = /*#__PURE__*/Object.freeze({
7789
+ var index$1 = /*#__PURE__*/Object.freeze({
7789
7790
  __proto__: null,
7790
7791
  'default': FormPage
7791
7792
  });
7792
7793
 
7794
+ const useTilesStyles = createUseStyles(theme => {
7795
+ return {
7796
+ tileParentDiv: {
7797
+ alignItems: 'center',
7798
+ display: 'flex',
7799
+ flexDirection: 'column',
7800
+ fontFamily: theme?.typography?.fontFamily,
7801
+ alignItems: 'center',
7802
+ display: 'flex',
7803
+ flexDirection: 'column',
7804
+ marginTop: '20px'
7805
+ },
7806
+ tileDiv: {
7807
+ width: '236px',
7808
+ height: '160px',
7809
+ position: 'relative',
7810
+ borderRadius: '16px',
7811
+ overflow: 'hidden',
7812
+ cursor: 'pointer',
7813
+ margin: '1rem'
7814
+ },
7815
+ tileImg: {
7816
+ objectFit: 'cover',
7817
+ position: 'absolute',
7818
+ left: 0,
7819
+ top: 0,
7820
+ width: '100%',
7821
+ height: '100%'
7822
+ },
7823
+ title: {
7824
+ position: 'absolute',
7825
+ top: '12%',
7826
+ left: '7%',
7827
+ color: 'white',
7828
+ fontWeight: '600',
7829
+ fontSize: '28px',
7830
+ width: '150px'
7831
+ },
7832
+ row: {
7833
+ display: 'flex',
7834
+ flexDirection: 'row',
7835
+ justifyContent: 'center',
7836
+ flexWrap: 'wrap',
7837
+ width: '85%',
7838
+ marginBottom: '3rem'
7839
+ },
7840
+ header: {
7841
+ fontWeight: '700',
7842
+ fontSize: '46px',
7843
+ lineHeight: '46px',
7844
+ marginBottom: '1rem',
7845
+ textAlign: 'center',
7846
+ marginTop: '3rem'
7847
+ },
7848
+ headerTitle: {
7849
+ fontWeight: '400',
7850
+ fontSize: '24px',
7851
+ lineHeight: '46px',
7852
+ color: '#7D8592',
7853
+ marginBottom: '3rem',
7854
+ textAlign: 'center'
7855
+ }
7856
+ };
7857
+ });
7858
+
7859
+ function Tiles({
7860
+ sectionData
7861
+ }) {
7862
+ const classes = useTilesStyles({});
7863
+ const {
7864
+ isMobile,
7865
+ layout: {
7866
+ containerWidth
7867
+ },
7868
+ isPreview,
7869
+ isEdit
7870
+ } = useContext(PageContext);
7871
+ const nodeData = sectionData.components;
7872
+ console.log(nodeData);
7873
+ const tilesList = nodeData[0]?.tilesList.components;
7874
+
7875
+ const handleClick = value => {
7876
+ if (!(isEdit || isPreview)) {
7877
+ window.open(value);
7878
+ }
7879
+ };
7880
+
7881
+ const TileDiv = tilesList?.map((tile, i) => {
7882
+ return /*#__PURE__*/React.createElement(Fragment, {
7883
+ key: i
7884
+ }, /*#__PURE__*/React.createElement("div", {
7885
+ className: classes.tileDiv,
7886
+ onClick: () => handleClick(tile.cta?.metadata?.value)
7887
+ }, /*#__PURE__*/React.createElement("img", {
7888
+ className: classes.tileImg,
7889
+ src: tile?.tileImage?.metadata?.value
7890
+ }), /*#__PURE__*/React.createElement("div", {
7891
+ className: classes.title,
7892
+ ref: tile.tileName?.refSetter,
7893
+ dangerouslySetInnerHTML: {
7894
+ __html: tile?.tileName?.metadata?.value
7895
+ }
7896
+ })));
7897
+ });
7898
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
7899
+ className: classes.tileParentDiv
7900
+ }, /*#__PURE__*/React.createElement("div", {
7901
+ className: classes.header,
7902
+ ref: nodeData[0].sectionHeader?.refSetter,
7903
+ dangerouslySetInnerHTML: {
7904
+ __html: nodeData[0].sectionHeader?.metadata?.value
7905
+ }
7906
+ }), /*#__PURE__*/React.createElement("div", {
7907
+ className: classes.headerTitle,
7908
+ ref: nodeData[0].sectionTitle?.refSetter,
7909
+ dangerouslySetInnerHTML: {
7910
+ __html: nodeData[0].sectionTitle?.metadata?.value
7911
+ }
7912
+ }), /*#__PURE__*/React.createElement("div", {
7913
+ className: classes.row
7914
+ }, TileDiv)));
7915
+ }
7916
+
7917
+ var index = /*#__PURE__*/Object.freeze({
7918
+ __proto__: null,
7919
+ 'default': Tiles
7920
+ });
7921
+
7793
7922
  const TYPE_TO_COMPONENT_MAP = {
7794
7923
  BANNER_CAROUSEL_RIGHT: BannerCarouselRight,
7795
7924
  GRID_CARD: List,
@@ -7810,7 +7939,8 @@ const TYPE_TO_COMPONENT_MAP = {
7810
7939
  FORM_ENQUIRY: Contact,
7811
7940
  WEBINAR_LANDING_PAGE: CoursePromotionPage$1,
7812
7941
  COURSE_LANDING_PAGE: CoursePromotionPage,
7813
- FORM_LANDING_PAGE: FormPage
7942
+ FORM_LANDING_PAGE: FormPage,
7943
+ TILES_SECTION: Tiles
7814
7944
  };
7815
7945
 
7816
7946
  const getCompToRender = type => TYPE_TO_COMPONENT_MAP[type] || (() => null);