diy-template-components 4.0.4 → 4.0.6

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
@@ -7,6 +7,19 @@ import koreanLocale from 'moment/locale/ko';
7
7
  import ReactDOMServer from 'react-dom/server';
8
8
  import { createTheming, createUseStyles as createUseStyles$1, useTheme as useTheme$1 } from 'react-jss';
9
9
 
10
+ function insertStyle(css) {
11
+ if (!css || typeof window === 'undefined') {
12
+ return;
13
+ }
14
+ const style = document.createElement('style');
15
+ style.setAttribute('type', 'text/css');
16
+ style.innerHTML = css;
17
+ document.head.appendChild(style);
18
+ return css;
19
+ }
20
+
21
+ insertStyle("/* Brush stroke underline - for rich text content (color via --brush-color inline style) */\n.brush-stroke {\n position: relative;\n display: inline-block;\n white-space: pre-wrap;\n}\n\n.brush-stroke::after {\n content: \"\";\n position: absolute;\n top: 90%;\n left: 0;\n height: 0.5em;\n width: 100%;\n z-index: -1;\n border: solid var(--brush-width, 0.15em) var(--brush-color, #FFFFFF);\n border-color: var(--brush-color, #FFFFFF) transparent transparent transparent;\n border-radius: 100%;\n}\n\n/* Font size classes for rich text editor - Desktop (default) */\n.font-size-extra-small {\n font-size: 12px;\n line-height: 16px;\n}\n\n.font-size-small {\n font-size: 16px;\n line-height: 20px;\n}\n\n.font-size-medium {\n font-size: 20px;\n line-height: 24px;\n}\n\n.font-size-large {\n font-size: 24px;\n line-height: 28px;\n}\n\n.font-size-very-large {\n font-size: 32px;\n line-height: 36px;\n}\n\n.font-size-extra-large {\n font-size: 56px;\n line-height: 64px;\n}\n\n.font-size-huge {\n font-size: 72px;\n line-height: 80px;\n}\n\n/* Font size classes - Mobile */\n@media (max-width: 768px) {\n .font-size-extra-small {\n font-size: 10px;\n line-height: 14px;\n }\n .font-size-small {\n font-size: 14px;\n line-height: 18px;\n }\n .font-size-medium {\n font-size: 16px;\n line-height: 20px;\n }\n .font-size-large {\n font-size: 18px;\n line-height: 20px;\n }\n .font-size-very-large {\n font-size: 24px;\n line-height: 36px;\n }\n .font-size-extra-large {\n font-size: 40px;\n line-height: 48px;\n }\n .font-size-huge {\n font-size: 56px;\n line-height: 64px;\n }\n}");
22
+
10
23
  function _extends() {
11
24
  return _extends = Object.assign ? Object.assign.bind() : function (n) {
12
25
  for (var e = 1; e < arguments.length; e++) {
@@ -546,7 +559,7 @@ function useLinkBuilder(data) {
546
559
  basePath,
547
560
  isMasterTemplate
548
561
  } = useContext(PageContext);
549
- if (isEdit || !data.isLink) {
562
+ if (!data || isEdit || !data.isLink) {
550
563
  return null;
551
564
  }
552
565
  if (data?.isExistingLink === false) {
@@ -566,7 +579,7 @@ function useLinkBuilder(data) {
566
579
  }
567
580
  const {
568
581
  pageId
569
- } = navList.find(el => el.slug === data?.link) || {};
582
+ } = navList?.find(el => el.slug === data?.link) || {};
570
583
  return `//${basePath}?templateId=${templateId}&pageId=${pageId}${isMasterTemplate ? '&mld=true' : ''}`;
571
584
  }
572
585
 
@@ -2283,11 +2296,6 @@ function Footer({
2283
2296
  }, "\xA9\uFE0F Leaverage Consultants Private Limited") : null);
2284
2297
  }
2285
2298
 
2286
- const borderRadius = {
2287
- small: 4,
2288
- regular: 8,
2289
- large: 12
2290
- };
2291
2299
  const generateShadows = palette => ({
2292
2300
  primary: `0 2px 8px ${palette.shadow.primary}`,
2293
2301
  secondary: `0 4px 10px ${palette.shadow.secondary}`
@@ -2444,7 +2452,41 @@ const fontWeight = {
2444
2452
  superBold: 900
2445
2453
  };
2446
2454
 
2447
- function getTheme(colorTheme = 'blue', fontFamily = 'Arial', isMobile) {
2455
+ const getBorderRadius = roundness => {
2456
+ const mapping = {
2457
+ sharp: {
2458
+ small: 0,
2459
+ regular: 0,
2460
+ large: 0
2461
+ },
2462
+ soft: {
2463
+ small: 8,
2464
+ regular: 8,
2465
+ large: 8
2466
+ },
2467
+ rounded: {
2468
+ small: 16,
2469
+ regular: 16,
2470
+ large: 16
2471
+ },
2472
+ 'extra-round': {
2473
+ small: 24,
2474
+ regular: 24,
2475
+ large: 24
2476
+ },
2477
+ pill: {
2478
+ small: 9999,
2479
+ regular: 9999,
2480
+ large: 9999
2481
+ }
2482
+ };
2483
+ return mapping[roundness] || {
2484
+ small: 16,
2485
+ regular: 16,
2486
+ large: 16
2487
+ };
2488
+ };
2489
+ function getTheme(colorTheme = 'blue', fontFamily = 'Arial', isMobile, roundness = 'rounded') {
2448
2490
  const palette = palettes[colorTheme] || palettes['blue'];
2449
2491
  const typography = {
2450
2492
  fontFamily: `"${fontFamily}", "Roboto", "Helvetica", "Arial", "sans-serif"`,
@@ -2452,7 +2494,7 @@ function getTheme(colorTheme = 'blue', fontFamily = 'Arial', isMobile) {
2452
2494
  fontWeight
2453
2495
  };
2454
2496
  const shape = {
2455
- borderRadius
2497
+ borderRadius: getBorderRadius(roundness)
2456
2498
  };
2457
2499
  return {
2458
2500
  palette,
@@ -2519,17 +2561,6 @@ function NanumSquare() {
2519
2561
  return null;
2520
2562
  }
2521
2563
 
2522
- function insertStyle(css) {
2523
- if (!css || typeof window === 'undefined') {
2524
- return;
2525
- }
2526
- const style = document.createElement('style');
2527
- style.setAttribute('type', 'text/css');
2528
- style.innerHTML = css;
2529
- document.head.appendChild(style);
2530
- return css;
2531
- }
2532
-
2533
2564
  insertStyle("@charset \"UTF-8\";\n/* Wrapper: no height/min-height – height comes only from section content, not from HOC */\n.sectionBackgroundWrapper {\n position: relative;\n width: 100%;\n overflow: hidden;\n}\n\n/* Section root transparent so background (image/color/gradient/video) shows through */\n.sectionBackgroundWrapper > .sectionBackgroundContent > * {\n background: transparent !important;\n}\n\n/* Video: absolute so it does not affect wrapper height; height follows section */\n.sectionBackgroundVideo {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n z-index: 0;\n pointer-events: none;\n}\n\n/* YouTube embed: cover background, no UI interaction, minimal branding via URL params */\n.sectionBackgroundYoutube {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 100vw;\n min-width: 100%;\n min-height: 100%;\n height: 56.25vw; /* 16:9 */\n min-height: 100vh;\n transform: translate(-50%, -50%);\n border: none;\n z-index: 0;\n pointer-events: none;\n}\n\n@media (min-aspect-ratio: 16/9) {\n .sectionBackgroundYoutube {\n width: 177.78vh;\n height: 100vh;\n min-width: 100%;\n min-height: 100%;\n }\n}\n/* Blur overlay: frosted glass so content stays readable over video/image/gradient */\n.sectionBackgroundBlur {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n pointer-events: none;\n backdrop-filter: blur(2px);\n -webkit-backdrop-filter: blur(2px);\n /* background: rgba(255, 255, 255, 0.08); */\n}\n\n/* Content wrapper: above blur so component items are clear */\n.sectionBackgroundContent {\n position: relative;\n z-index: 2;\n}\n\n/* Background layer: fills wrapper only (absolute), does not affect wrapper height */\n.sectionBackgroundLayer {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 0;\n pointer-events: none;\n}\n\n.sectionBackgroundLayer.sectionBackgroundImage {\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n}");
2534
2565
 
2535
2566
  /**
@@ -2830,7 +2861,8 @@ function SectionRenderer$1({
2830
2861
 
2831
2862
  const defaultTheme = {
2832
2863
  color: 'blue',
2833
- font: 'rubik'
2864
+ font: 'rubik',
2865
+ roundness: 'rounded'
2834
2866
  };
2835
2867
  const defaultLayout = {
2836
2868
  containerWidth: 1440
@@ -2904,7 +2936,7 @@ const allColors = {
2904
2936
  tertiaryskyblue: '#F2FCFF'
2905
2937
  };
2906
2938
 
2907
- const generateTheme = (theme = 'blue', fontFamily = 'Arial', isMobile) => {
2939
+ const generateTheme = (theme = 'blue', fontFamily = 'Arial', isMobile, roundness = 'rounded') => {
2908
2940
  let themeColor = theme.split('-');
2909
2941
  let color, gradient, darkMode;
2910
2942
  if (themeColor.length === 1) {
@@ -3005,7 +3037,7 @@ const generateTheme = (theme = 'blue', fontFamily = 'Arial', isMobile) => {
3005
3037
  margin: isMobile ? mobileMargin : margin
3006
3038
  };
3007
3039
  return {
3008
- ...getTheme(theme),
3040
+ ...getTheme(theme, fontFamily, isMobile, roundness),
3009
3041
  typography,
3010
3042
  spacing,
3011
3043
  colors
@@ -3017,7 +3049,8 @@ function PageRenderer$1({
3017
3049
  metadata: {
3018
3050
  theme: {
3019
3051
  color = defaultTheme.color,
3020
- font = defaultTheme.font
3052
+ font = defaultTheme.font,
3053
+ roundness = defaultTheme.roundness
3021
3054
  } = defaultTheme,
3022
3055
  layout = defaultLayout
3023
3056
  } = defaultMetadata,
@@ -3069,7 +3102,7 @@ function PageRenderer$1({
3069
3102
  countryCode,
3070
3103
  currencySymbol
3071
3104
  }), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol]);
3072
- const theme = useMemo(() => generateTheme(color, font, context.isMobile), [color, font, context.isMobile]);
3105
+ const theme = useMemo(() => generateTheme(color, font, context.isMobile, roundness), [color, font, context.isMobile, roundness]);
3073
3106
  const Wrapper = SectionWrapper || Fragment;
3074
3107
  return /*#__PURE__*/React.createElement(ThemeProvider, {
3075
3108
  theme: theme
@@ -3546,9 +3579,9 @@ function BannerCarouselRight({
3546
3579
  });
3547
3580
  const [{
3548
3581
  bannerCarousel
3549
- }] = sectionData.components;
3550
- const Wrapper = bannerCarousel.components.length > 1 ? Carousel : Fragment;
3551
- const wrapperProps = bannerCarousel.components.length > 1 ? {
3582
+ }] = sectionData?.components;
3583
+ const Wrapper = bannerCarousel?.components?.length > 1 ? Carousel : Fragment;
3584
+ const wrapperProps = bannerCarousel?.components?.length > 1 ? {
3552
3585
  buttonContainerClass: classes.absoluteButtonsBannerRight,
3553
3586
  inverted: false
3554
3587
  } : {};
@@ -3556,7 +3589,7 @@ function BannerCarouselRight({
3556
3589
  className: classes.bannerCarouselRightSection
3557
3590
  }, /*#__PURE__*/React.createElement("div", {
3558
3591
  className: classes.sectionContainer
3559
- }, /*#__PURE__*/React.createElement(Wrapper, wrapperProps, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React.createElement(Section$5, {
3592
+ }, /*#__PURE__*/React.createElement(Wrapper, wrapperProps, bannerCarousel?.components?.map((node, idx) => /*#__PURE__*/React.createElement(Section$5, {
3560
3593
  nodeData: node,
3561
3594
  key: idx /* or some other unique property */,
3562
3595
  sectionIndex: sectionIndex,
@@ -3565,8 +3598,8 @@ function BannerCarouselRight({
3565
3598
  }
3566
3599
 
3567
3600
  var index$t = /*#__PURE__*/Object.freeze({
3568
- __proto__: null,
3569
- 'default': BannerCarouselRight
3601
+ __proto__: null,
3602
+ 'default': BannerCarouselRight
3570
3603
  });
3571
3604
 
3572
3605
  const useSectionStyles$8 = createUseStyles(theme => ({
@@ -3789,8 +3822,8 @@ function List({
3789
3822
  }
3790
3823
 
3791
3824
  var index$s = /*#__PURE__*/Object.freeze({
3792
- __proto__: null,
3793
- 'default': List
3825
+ __proto__: null,
3826
+ 'default': List
3794
3827
  });
3795
3828
 
3796
3829
  const useSectionStyles$7 = createUseStyles(theme => {
@@ -4079,15 +4112,15 @@ function BannerCarouselCenter({
4079
4112
  });
4080
4113
  const [{
4081
4114
  bannerCarousel
4082
- }] = sectionData.components;
4083
- const Wrapper = bannerCarousel.components.length > 1 ? Carousel : Fragment;
4084
- const wrapperProps = bannerCarousel.components.length > 1 ? {
4115
+ }] = sectionData?.components;
4116
+ const Wrapper = bannerCarousel?.components?.length > 1 ? Carousel : Fragment;
4117
+ const wrapperProps = bannerCarousel?.components?.length > 1 ? {
4085
4118
  buttonContainerClass: classes.absoluteButtons,
4086
4119
  inverted: true
4087
4120
  } : {};
4088
4121
  return /*#__PURE__*/React.createElement("section", {
4089
4122
  className: classes.bannerCarouselCenterSection
4090
- }, /*#__PURE__*/React.createElement(Wrapper, wrapperProps, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React.createElement(Section$4, {
4123
+ }, /*#__PURE__*/React.createElement(Wrapper, wrapperProps, bannerCarousel?.components?.map((node, idx) => /*#__PURE__*/React.createElement(Section$4, {
4091
4124
  nodeData: node,
4092
4125
  isCustomWebsite: isCustomWebsite,
4093
4126
  key: idx /* or some other unique property */,
@@ -4097,8 +4130,8 @@ function BannerCarouselCenter({
4097
4130
  }
4098
4131
 
4099
4132
  var index$r = /*#__PURE__*/Object.freeze({
4100
- __proto__: null,
4101
- 'default': BannerCarouselCenter
4133
+ __proto__: null,
4134
+ 'default': BannerCarouselCenter
4102
4135
  });
4103
4136
 
4104
4137
  const useSectionStyles$6 = createUseStyles(theme => {
@@ -4392,8 +4425,8 @@ function BannerCarouselCenterv2({
4392
4425
  }
4393
4426
 
4394
4427
  var index$q = /*#__PURE__*/Object.freeze({
4395
- __proto__: null,
4396
- 'default': BannerCarouselCenterv2
4428
+ __proto__: null,
4429
+ 'default': BannerCarouselCenterv2
4397
4430
  });
4398
4431
 
4399
4432
  const useSectionStyles$5 = createUseStyles(theme => {
@@ -4618,13 +4651,13 @@ function BannerCarouselLeft({
4618
4651
  });
4619
4652
  const [{
4620
4653
  bannerCarousel
4621
- }] = sectionData.components;
4622
- const Wrapper = bannerCarousel.components.length > 1 ? Carousel : Fragment;
4654
+ }] = sectionData?.components;
4655
+ const Wrapper = bannerCarousel?.components?.length > 1 ? Carousel : Fragment;
4623
4656
  return /*#__PURE__*/React.createElement("section", {
4624
4657
  className: classes.section
4625
4658
  }, /*#__PURE__*/React.createElement("div", {
4626
4659
  className: classes.sectionContainer
4627
- }, /*#__PURE__*/React.createElement(Wrapper, null, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React.createElement(Section$2, {
4660
+ }, /*#__PURE__*/React.createElement(Wrapper, null, bannerCarousel?.components?.map((node, idx) => /*#__PURE__*/React.createElement(Section$2, {
4628
4661
  nodeData: node,
4629
4662
  key: idx /* or some other unique property */,
4630
4663
  sectionIndex: sectionIndex,
@@ -4633,8 +4666,8 @@ function BannerCarouselLeft({
4633
4666
  }
4634
4667
 
4635
4668
  var index$p = /*#__PURE__*/Object.freeze({
4636
- __proto__: null,
4637
- 'default': BannerCarouselLeft
4669
+ __proto__: null,
4670
+ 'default': BannerCarouselLeft
4638
4671
  });
4639
4672
 
4640
4673
  const useSectionStyles$4 = createUseStyles(theme => ({
@@ -5029,8 +5062,8 @@ function SubscribeToNewsletter({
5029
5062
  }
5030
5063
 
5031
5064
  var index$o = /*#__PURE__*/Object.freeze({
5032
- __proto__: null,
5033
- 'default': SubscribeToNewsletter
5065
+ __proto__: null,
5066
+ 'default': SubscribeToNewsletter
5034
5067
  });
5035
5068
 
5036
5069
  const useTestimonialStyles = createUseStyles(theme => ({
@@ -5317,8 +5350,8 @@ function Testimonials({
5317
5350
  }
5318
5351
 
5319
5352
  var index$n = /*#__PURE__*/Object.freeze({
5320
- __proto__: null,
5321
- 'default': Testimonials
5353
+ __proto__: null,
5354
+ 'default': Testimonials
5322
5355
  });
5323
5356
 
5324
5357
  const loaderStyle = theme => ({
@@ -5721,8 +5754,8 @@ function VideoTestimonial({
5721
5754
  }
5722
5755
 
5723
5756
  var index$m = /*#__PURE__*/Object.freeze({
5724
- __proto__: null,
5725
- 'default': VideoTestimonial
5757
+ __proto__: null,
5758
+ 'default': VideoTestimonial
5726
5759
  });
5727
5760
 
5728
5761
  const useVideoStyles = createUseStyles(theme => {
@@ -5957,8 +5990,8 @@ function Video({
5957
5990
  }
5958
5991
 
5959
5992
  var index$l = /*#__PURE__*/Object.freeze({
5960
- __proto__: null,
5961
- 'default': Video
5993
+ __proto__: null,
5994
+ 'default': Video
5962
5995
  });
5963
5996
 
5964
5997
  const useSectionStyles$3 = createUseStyles(theme => ({
@@ -6193,8 +6226,8 @@ function Info({
6193
6226
  }
6194
6227
 
6195
6228
  var index$k = /*#__PURE__*/Object.freeze({
6196
- __proto__: null,
6197
- 'default': Info
6229
+ __proto__: null,
6230
+ 'default': Info
6198
6231
  });
6199
6232
 
6200
6233
  const useSectionStyles$2 = createUseStyles(theme => ({
@@ -6312,8 +6345,8 @@ const TextSection = ({
6312
6345
  };
6313
6346
 
6314
6347
  var index$j = /*#__PURE__*/Object.freeze({
6315
- __proto__: null,
6316
- 'default': TextSection
6348
+ __proto__: null,
6349
+ 'default': TextSection
6317
6350
  });
6318
6351
 
6319
6352
  const usePhotoGalleryStyles = createUseStyles(theme => {
@@ -6535,8 +6568,8 @@ function PhotoGallery({
6535
6568
  }
6536
6569
 
6537
6570
  var index$i = /*#__PURE__*/Object.freeze({
6538
- __proto__: null,
6539
- 'default': PhotoGallery
6571
+ __proto__: null,
6572
+ 'default': PhotoGallery
6540
6573
  });
6541
6574
 
6542
6575
  const useFaqListStyles = createUseStyles(theme => ({
@@ -6718,8 +6751,8 @@ const Accordion = ({
6718
6751
  };
6719
6752
 
6720
6753
  var index$h = /*#__PURE__*/Object.freeze({
6721
- __proto__: null,
6722
- 'default': FAQListing
6754
+ __proto__: null,
6755
+ 'default': FAQListing
6723
6756
  });
6724
6757
 
6725
6758
  const useTextGridStyles = createUseStyles(theme => ({
@@ -6889,8 +6922,8 @@ const TextGrid = ({
6889
6922
  };
6890
6923
 
6891
6924
  var index$g = /*#__PURE__*/Object.freeze({
6892
- __proto__: null,
6893
- 'default': TextGrid
6925
+ __proto__: null,
6926
+ 'default': TextGrid
6894
6927
  });
6895
6928
 
6896
6929
  const useCourseStyles = createUseStyles(theme => {
@@ -8173,8 +8206,8 @@ function SimpleCardsContainer({
8173
8206
  }
8174
8207
 
8175
8208
  var index$f = /*#__PURE__*/Object.freeze({
8176
- __proto__: null,
8177
- 'default': courses
8209
+ __proto__: null,
8210
+ 'default': courses
8178
8211
  });
8179
8212
 
8180
8213
  const useTeamStyles = createUseStyles(theme => {
@@ -8491,8 +8524,8 @@ function TeamCard({
8491
8524
  }
8492
8525
 
8493
8526
  var index$e = /*#__PURE__*/Object.freeze({
8494
- __proto__: null,
8495
- 'default': TeamCard
8527
+ __proto__: null,
8528
+ 'default': TeamCard
8496
8529
  });
8497
8530
 
8498
8531
  const useSectionStyles$1 = createUseStyles(theme => ({
@@ -8912,8 +8945,8 @@ function FormEnquiry({
8912
8945
  }
8913
8946
 
8914
8947
  var index$d = /*#__PURE__*/Object.freeze({
8915
- __proto__: null,
8916
- 'default': FormEnquiry
8948
+ __proto__: null,
8949
+ 'default': FormEnquiry
8917
8950
  });
8918
8951
 
8919
8952
  const useSectionStyles = createUseStyles(theme => ({
@@ -9334,8 +9367,8 @@ function Contact({
9334
9367
  }
9335
9368
 
9336
9369
  var index$c = /*#__PURE__*/Object.freeze({
9337
- __proto__: null,
9338
- 'default': Contact
9370
+ __proto__: null,
9371
+ 'default': Contact
9339
9372
  });
9340
9373
 
9341
9374
  const useWebinarPromotionPage = createUseStyles(theme => {
@@ -9811,12 +9844,11 @@ function CoursePromotionPage$1({
9811
9844
  }
9812
9845
 
9813
9846
  var index$b = /*#__PURE__*/Object.freeze({
9814
- __proto__: null,
9815
- 'default': CoursePromotionPage$1
9847
+ __proto__: null,
9848
+ 'default': CoursePromotionPage$1
9816
9849
  });
9817
9850
 
9818
9851
  const useCoursePromotionPage$1 = createUseStyles(theme => {
9819
- console.log(theme, 'themere');
9820
9852
  return {
9821
9853
  courseSuperContainer: {
9822
9854
  display: 'flex',
@@ -10398,8 +10430,8 @@ function CoursePromotionPage({
10398
10430
  }
10399
10431
 
10400
10432
  var index$a = /*#__PURE__*/Object.freeze({
10401
- __proto__: null,
10402
- 'default': CoursePromotionPage
10433
+ __proto__: null,
10434
+ 'default': CoursePromotionPage
10403
10435
  });
10404
10436
 
10405
10437
  const useFormPageStyles = createUseStyles(theme => ({
@@ -10761,8 +10793,8 @@ const FormPage = ({
10761
10793
  };
10762
10794
 
10763
10795
  var index$9 = /*#__PURE__*/Object.freeze({
10764
- __proto__: null,
10765
- 'default': FormPage
10796
+ __proto__: null,
10797
+ 'default': FormPage
10766
10798
  });
10767
10799
 
10768
10800
  const useTilesStyles = createUseStyles(theme => {
@@ -10909,8 +10941,8 @@ function Tiles({
10909
10941
  }
10910
10942
 
10911
10943
  var index$8 = /*#__PURE__*/Object.freeze({
10912
- __proto__: null,
10913
- 'default': Tiles
10944
+ __proto__: null,
10945
+ 'default': Tiles
10914
10946
  });
10915
10947
 
10916
10948
  const useEmailStyles = createUseStyles(theme => ({
@@ -11382,8 +11414,8 @@ function EmailDripMarket({
11382
11414
  }
11383
11415
 
11384
11416
  var index$7 = /*#__PURE__*/Object.freeze({
11385
- __proto__: null,
11386
- 'default': EmailDripMarket
11417
+ __proto__: null,
11418
+ 'default': EmailDripMarket
11387
11419
  });
11388
11420
 
11389
11421
  const useAboutInstituteStyles = createUseStyles(theme => ({
@@ -11750,8 +11782,8 @@ function ABOUT_INSTITUTE({
11750
11782
  }
11751
11783
 
11752
11784
  var index$6 = /*#__PURE__*/Object.freeze({
11753
- __proto__: null,
11754
- 'default': ABOUT_INSTITUTE
11785
+ __proto__: null,
11786
+ 'default': ABOUT_INSTITUTE
11755
11787
  });
11756
11788
 
11757
11789
  const useCounterSectionStyles = createUseStyles(theme => {
@@ -11897,8 +11929,8 @@ function CounterSection({
11897
11929
  }
11898
11930
 
11899
11931
  var index$5 = /*#__PURE__*/Object.freeze({
11900
- __proto__: null,
11901
- 'default': CounterSection
11932
+ __proto__: null,
11933
+ 'default': CounterSection
11902
11934
  });
11903
11935
 
11904
11936
  const BREAKPOINTS = {
@@ -12265,9 +12297,9 @@ function StickyCta({
12265
12297
  }
12266
12298
 
12267
12299
  var index$4 = /*#__PURE__*/Object.freeze({
12268
- __proto__: null,
12269
- 'default': StickyCta,
12270
- WhatsAppIcon: WhatsAppIcon
12300
+ __proto__: null,
12301
+ 'default': StickyCta,
12302
+ WhatsAppIcon: WhatsAppIcon
12271
12303
  });
12272
12304
 
12273
12305
  /**
@@ -12428,8 +12460,8 @@ function CustomHtmlRender({
12428
12460
  }
12429
12461
 
12430
12462
  var index$3 = /*#__PURE__*/Object.freeze({
12431
- __proto__: null,
12432
- 'default': CustomHtmlRender
12463
+ __proto__: null,
12464
+ 'default': CustomHtmlRender
12433
12465
  });
12434
12466
 
12435
12467
  const useTimerCallPageStyles = createUseStyles(theme => ({
@@ -12598,208 +12630,10 @@ const TimerAndCall = ({
12598
12630
  };
12599
12631
 
12600
12632
  var index$2 = /*#__PURE__*/Object.freeze({
12601
- __proto__: null,
12602
- 'default': TimerAndCall
12633
+ __proto__: null,
12634
+ 'default': TimerAndCall
12603
12635
  });
12604
12636
 
12605
- const TYPE_TO_COMPONENT_MAP = {
12606
- BANNER_CAROUSEL_RIGHT: BannerCarouselRight,
12607
- GRID_CARD: List,
12608
- BANNER_CAROUSEL_CENTER: BannerCarouselCenter,
12609
- BANNER_CAROUSEL_CENTER_V2: BannerCarouselCenterv2,
12610
- BANNER_CAROUSEL_LEFT: BannerCarouselLeft,
12611
- FORM_SUBSCRIBE: SubscribeToNewsletter,
12612
- TEXT_TESTIMONIAL: Testimonials,
12613
- VIDEO_TESTIMONIAL: VideoTestimonial,
12614
- VIDEO: Video,
12615
- INFO: Info,
12616
- TEXT: TextSection,
12617
- IMAGE_GALLERY: PhotoGallery,
12618
- FAQ_LISTING: FAQListing,
12619
- TEXT_GRID: TextGrid,
12620
- COURSE_CAROUSEL: courses,
12621
- TEAM_CARD: TeamCard,
12622
- CONTACT: FormEnquiry,
12623
- FORM_ENQUIRY: Contact,
12624
- WEBINAR_LANDING_PAGE: CoursePromotionPage$1,
12625
- COURSE_LANDING_PAGE: CoursePromotionPage,
12626
- FORM_LANDING_PAGE: FormPage,
12627
- TILES_SECTION: Tiles,
12628
- EMAIL_DRIP_MARKET: EmailDripMarket,
12629
- ABOUT_INSTITUTE,
12630
- COUNTER_SECTION: CounterSection,
12631
- STICKY_CTA: StickyCta,
12632
- CUSTOM_HTML_SECTION: CustomHtmlRender,
12633
- TIMER_AND_CALL: TimerAndCall
12634
- };
12635
- const getCompToRender = type => TYPE_TO_COMPONENT_MAP[type] || (() => null);
12636
- const MemoisedSection = /*#__PURE__*/memo(({
12637
- sectionData,
12638
- extraProps,
12639
- isCustomWebsite,
12640
- sectionIndex
12641
- }) => {
12642
- console.log('extraProps in section data', extraProps);
12643
- const SectionComp = getCompToRender(sectionData.type);
12644
- return /*#__PURE__*/React.createElement(SectionComp, {
12645
- sectionData: sectionData,
12646
- extraProps: extraProps,
12647
- isCustomWebsite: isCustomWebsite,
12648
- sectionIndex: sectionIndex
12649
- });
12650
- });
12651
- const SectionWithBackground = withSectionBackground(MemoisedSection);
12652
- function SectionRenderer({
12653
- sectionData,
12654
- extraProps,
12655
- isCustomWebsite,
12656
- sectionIndex
12657
- }) {
12658
- let sectionBg = {};
12659
- if (sectionData?.isV2Section) {
12660
- sectionBg = sectionData?.bgSection?.components?.[0]?.sectionBgData || {};
12661
- }
12662
- return /*#__PURE__*/React.createElement(SectionWithBackground, {
12663
- sectionData: sectionData,
12664
- extraProps: extraProps,
12665
- isCustomWebsite: isCustomWebsite,
12666
- sectionIndex: sectionIndex,
12667
- isSkipV2Section: sectionData?.isV2Section,
12668
- componentBg: sectionBg || {}
12669
- });
12670
- }
12671
-
12672
- function PageRenderer({
12673
- pageData: {
12674
- metadata: {
12675
- theme: {
12676
- color = defaultTheme.color,
12677
- font = defaultTheme.font
12678
- } = defaultTheme,
12679
- layout = defaultLayout
12680
- } = defaultMetadata,
12681
- sections,
12682
- header,
12683
- footer,
12684
- validations = {},
12685
- _id,
12686
- isLandingPage = false,
12687
- isCustomWebsite = false
12688
- },
12689
- isMobile = false,
12690
- isLandingPages = false,
12691
- baseURLs = {},
12692
- hashToken,
12693
- SectionWrapper,
12694
- isMasterTemplate,
12695
- basePath,
12696
- countryCode,
12697
- currencySymbol,
12698
- isPreview,
12699
- isEdit,
12700
- sectionPlaceholder,
12701
- templateId,
12702
- isTutorWebsite = false,
12703
- extraProps,
12704
- hideLogin
12705
- }) {
12706
- const navList = header?.navs;
12707
- const context = useMemo(() => ({
12708
- isMobile,
12709
- isLandingPages,
12710
- layout,
12711
- baseURLs,
12712
- hashToken,
12713
- isMasterTemplate,
12714
- basePath,
12715
- isPreview,
12716
- isEdit,
12717
- templateId,
12718
- navList,
12719
- validations,
12720
- isTutorWebsite,
12721
- extraProps,
12722
- hideLogin,
12723
- isCustomWebsite,
12724
- _id,
12725
- countryCode,
12726
- currencySymbol
12727
- }), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol]);
12728
- const theme = useMemo(() => generateTheme(color, font, context.isMobile), [color, font, context.isMobile]);
12729
- const Wrapper = SectionWrapper || Fragment;
12730
- return /*#__PURE__*/React.createElement(ThemeProvider, {
12731
- theme: theme
12732
- }, /*#__PURE__*/React.createElement(PageContext.Provider, {
12733
- value: context
12734
- }, /*#__PURE__*/React.createElement(FontSeeder, {
12735
- fontFamily: font
12736
- }), !!header && /*#__PURE__*/React.createElement(Wrapper, !!SectionWrapper && {
12737
- sectionData: header,
12738
- isHeader: true
12739
- }, /*#__PURE__*/React.createElement(Header, {
12740
- data: header,
12741
- isLandingPage: isLandingPage,
12742
- extraProps: extraProps
12743
- })), sections?.length ? sections?.map((sectionData, sectionIndex) => /*#__PURE__*/React.createElement(Wrapper, _extends({}, !!SectionWrapper && {
12744
- sectionData,
12745
- sectionIndex
12746
- }, {
12747
- key: sectionData.type + (sectionData._id || sectionIndex)
12748
- }), /*#__PURE__*/React.createElement(SectionRenderer, {
12749
- sectionData: sectionData,
12750
- extraProps: extraProps,
12751
- isCustomWebsite: isCustomWebsite,
12752
- sectionIndex: sectionIndex
12753
- }))) : sectionPlaceholder, !!footer && /*#__PURE__*/React.createElement(Wrapper, !!SectionWrapper && {
12754
- sectionData: footer,
12755
- isFooter: true
12756
- }, /*#__PURE__*/React.createElement(Footer, {
12757
- data: footer
12758
- }))));
12759
- }
12760
-
12761
- const componentParser = compObj => {
12762
- if (compObj.type === 'componentCollection') {
12763
- const component = {
12764
- _id: compObj._id,
12765
- metadata: compObj.metadata || {}
12766
- };
12767
- compObj.components.forEach(comp => {
12768
- component[comp.name] = componentParser(comp);
12769
- });
12770
- return component;
12771
- }
12772
- if (Array.isArray(compObj.components)) {
12773
- compObj.components = compObj.components.map(componentParser);
12774
- }
12775
- return compObj;
12776
- };
12777
- const inverseComponentParser = compObj => {
12778
- if (!compObj.type) {
12779
- const {
12780
- metadata,
12781
- _id,
12782
- ...existingComponent
12783
- } = compObj;
12784
- const newComponent = {
12785
- type: 'componentCollection',
12786
- name: '',
12787
- elementType: '',
12788
- label: '',
12789
- metadata: metadata || {},
12790
- components: [],
12791
- _id
12792
- };
12793
- newComponent.components = Object.values(existingComponent).map(inverseComponentParser);
12794
- return newComponent;
12795
- } else {
12796
- if (compObj.components) {
12797
- compObj.components = compObj.components.map(inverseComponentParser);
12798
- }
12799
- return compObj;
12800
- }
12801
- };
12802
-
12803
12637
  const useVideoWorkshopPromotionStyles = createUseStyles(theme => {
12804
12638
  return {
12805
12639
  section: {
@@ -13035,10 +12869,210 @@ function VideoWorkshopPromotion({
13035
12869
  }
13036
12870
 
13037
12871
  var index$1 = /*#__PURE__*/Object.freeze({
13038
- __proto__: null,
13039
- 'default': VideoWorkshopPromotion
12872
+ __proto__: null,
12873
+ 'default': VideoWorkshopPromotion
13040
12874
  });
13041
12875
 
12876
+ const TYPE_TO_COMPONENT_MAP = {
12877
+ BANNER_CAROUSEL_RIGHT: BannerCarouselRight,
12878
+ GRID_CARD: List,
12879
+ BANNER_CAROUSEL_CENTER: BannerCarouselCenter,
12880
+ BANNER_CAROUSEL_CENTER_V2: BannerCarouselCenterv2,
12881
+ BANNER_CAROUSEL_LEFT: BannerCarouselLeft,
12882
+ FORM_SUBSCRIBE: SubscribeToNewsletter,
12883
+ TEXT_TESTIMONIAL: Testimonials,
12884
+ VIDEO_TESTIMONIAL: VideoTestimonial,
12885
+ VIDEO: Video,
12886
+ INFO: Info,
12887
+ TEXT: TextSection,
12888
+ IMAGE_GALLERY: PhotoGallery,
12889
+ FAQ_LISTING: FAQListing,
12890
+ TEXT_GRID: TextGrid,
12891
+ COURSE_CAROUSEL: courses,
12892
+ TEAM_CARD: TeamCard,
12893
+ CONTACT: FormEnquiry,
12894
+ FORM_ENQUIRY: Contact,
12895
+ WEBINAR_LANDING_PAGE: CoursePromotionPage$1,
12896
+ COURSE_LANDING_PAGE: CoursePromotionPage,
12897
+ FORM_LANDING_PAGE: FormPage,
12898
+ TILES_SECTION: Tiles,
12899
+ EMAIL_DRIP_MARKET: EmailDripMarket,
12900
+ ABOUT_INSTITUTE,
12901
+ COUNTER_SECTION: CounterSection,
12902
+ STICKY_CTA: StickyCta,
12903
+ CUSTOM_HTML_SECTION: CustomHtmlRender,
12904
+ TIMER_AND_CALL: TimerAndCall,
12905
+ VIDEO_WORKSHOP_PROMOTION: VideoWorkshopPromotion
12906
+ };
12907
+ const getCompToRender = type => TYPE_TO_COMPONENT_MAP[type] || (() => null);
12908
+ const MemoisedSection = /*#__PURE__*/memo(({
12909
+ sectionData,
12910
+ extraProps,
12911
+ isCustomWebsite,
12912
+ sectionIndex
12913
+ }) => {
12914
+ console.log('extraProps in section data', extraProps);
12915
+ const SectionComp = getCompToRender(sectionData.type);
12916
+ return /*#__PURE__*/React.createElement(SectionComp, {
12917
+ sectionData: sectionData,
12918
+ extraProps: extraProps,
12919
+ isCustomWebsite: isCustomWebsite,
12920
+ sectionIndex: sectionIndex
12921
+ });
12922
+ });
12923
+ const SectionWithBackground = withSectionBackground(MemoisedSection);
12924
+ function SectionRenderer({
12925
+ sectionData,
12926
+ extraProps,
12927
+ isCustomWebsite,
12928
+ sectionIndex
12929
+ }) {
12930
+ let sectionBg = {};
12931
+ if (sectionData?.isV2Section) {
12932
+ sectionBg = sectionData?.bgSection?.components?.[0]?.sectionBgData || {};
12933
+ }
12934
+ return /*#__PURE__*/React.createElement(SectionWithBackground, {
12935
+ sectionData: sectionData,
12936
+ extraProps: extraProps,
12937
+ isCustomWebsite: isCustomWebsite,
12938
+ sectionIndex: sectionIndex,
12939
+ isSkipV2Section: sectionData?.isV2Section,
12940
+ componentBg: sectionBg || {}
12941
+ });
12942
+ }
12943
+
12944
+ function PageRenderer({
12945
+ pageData: {
12946
+ metadata: {
12947
+ theme: {
12948
+ color = defaultTheme.color,
12949
+ font = defaultTheme.font,
12950
+ roundness = defaultTheme.roundness
12951
+ } = defaultTheme,
12952
+ layout = defaultLayout
12953
+ } = defaultMetadata,
12954
+ sections,
12955
+ header,
12956
+ footer,
12957
+ validations = {},
12958
+ _id,
12959
+ isLandingPage = false,
12960
+ isCustomWebsite = false
12961
+ },
12962
+ isMobile = false,
12963
+ isLandingPages = false,
12964
+ baseURLs = {},
12965
+ hashToken,
12966
+ SectionWrapper,
12967
+ isMasterTemplate,
12968
+ basePath,
12969
+ countryCode,
12970
+ currencySymbol,
12971
+ isPreview,
12972
+ isEdit,
12973
+ sectionPlaceholder,
12974
+ templateId,
12975
+ isTutorWebsite = false,
12976
+ extraProps,
12977
+ hideLogin
12978
+ }) {
12979
+ const navList = header?.navs;
12980
+ const context = useMemo(() => ({
12981
+ isMobile,
12982
+ isLandingPages,
12983
+ layout,
12984
+ baseURLs,
12985
+ hashToken,
12986
+ isMasterTemplate,
12987
+ basePath,
12988
+ isPreview,
12989
+ isEdit,
12990
+ templateId,
12991
+ navList,
12992
+ validations,
12993
+ isTutorWebsite,
12994
+ extraProps,
12995
+ hideLogin,
12996
+ isCustomWebsite,
12997
+ _id,
12998
+ countryCode,
12999
+ currencySymbol
13000
+ }), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, countryCode, currencySymbol]);
13001
+ const theme = useMemo(() => generateTheme(color, font, context.isMobile, roundness), [color, font, context.isMobile, roundness]);
13002
+ const Wrapper = SectionWrapper || Fragment;
13003
+ return /*#__PURE__*/React.createElement(ThemeProvider, {
13004
+ theme: theme
13005
+ }, /*#__PURE__*/React.createElement(PageContext.Provider, {
13006
+ value: context
13007
+ }, /*#__PURE__*/React.createElement(FontSeeder, {
13008
+ fontFamily: font
13009
+ }), !!header && /*#__PURE__*/React.createElement(Wrapper, !!SectionWrapper && {
13010
+ sectionData: header,
13011
+ isHeader: true
13012
+ }, /*#__PURE__*/React.createElement(Header, {
13013
+ data: header,
13014
+ isLandingPage: isLandingPage,
13015
+ extraProps: extraProps
13016
+ })), sections?.length ? sections?.map((sectionData, sectionIndex) => /*#__PURE__*/React.createElement(Wrapper, _extends({}, !!SectionWrapper && {
13017
+ sectionData,
13018
+ sectionIndex
13019
+ }, {
13020
+ key: sectionData.type + (sectionData._id || sectionIndex)
13021
+ }), /*#__PURE__*/React.createElement(SectionRenderer, {
13022
+ sectionData: sectionData,
13023
+ extraProps: extraProps,
13024
+ isCustomWebsite: isCustomWebsite,
13025
+ sectionIndex: sectionIndex
13026
+ }))) : sectionPlaceholder, !!footer && /*#__PURE__*/React.createElement(Wrapper, !!SectionWrapper && {
13027
+ sectionData: footer,
13028
+ isFooter: true
13029
+ }, /*#__PURE__*/React.createElement(Footer, {
13030
+ data: footer
13031
+ }))));
13032
+ }
13033
+
13034
+ const componentParser = compObj => {
13035
+ if (compObj.type === 'componentCollection') {
13036
+ const component = {
13037
+ _id: compObj._id,
13038
+ metadata: compObj.metadata || {}
13039
+ };
13040
+ compObj.components.forEach(comp => {
13041
+ component[comp.name] = componentParser(comp);
13042
+ });
13043
+ return component;
13044
+ }
13045
+ if (Array.isArray(compObj.components)) {
13046
+ compObj.components = compObj.components.map(componentParser);
13047
+ }
13048
+ return compObj;
13049
+ };
13050
+ const inverseComponentParser = compObj => {
13051
+ if (!compObj.type) {
13052
+ const {
13053
+ metadata,
13054
+ _id,
13055
+ ...existingComponent
13056
+ } = compObj;
13057
+ const newComponent = {
13058
+ type: 'componentCollection',
13059
+ name: '',
13060
+ elementType: '',
13061
+ label: '',
13062
+ metadata: metadata || {},
13063
+ components: [],
13064
+ _id
13065
+ };
13066
+ newComponent.components = Object.values(existingComponent).map(inverseComponentParser);
13067
+ return newComponent;
13068
+ } else {
13069
+ if (compObj.components) {
13070
+ compObj.components = compObj.components.map(inverseComponentParser);
13071
+ }
13072
+ return compObj;
13073
+ }
13074
+ };
13075
+
13042
13076
  const useCoursePromotionPage = createUseStyles(theme => {
13043
13077
  console.log(theme, 'themere');
13044
13078
  return {
@@ -13668,8 +13702,8 @@ function CoursePromotionPagev2({
13668
13702
  }
13669
13703
 
13670
13704
  var index = /*#__PURE__*/Object.freeze({
13671
- __proto__: null,
13672
- 'default': CoursePromotionPagev2
13705
+ __proto__: null,
13706
+ 'default': CoursePromotionPagev2
13673
13707
  });
13674
13708
 
13675
13709
  export { Icon, PageRenderer$1 as PageRenderer, PageRenderer as PageRendererStatic, componentParser, getTheme, inverseComponentParser };