diy-template-components 0.2.31 → 0.2.32
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/650233e8e2d7dfee.png +0 -0
- package/build/d15660fcfffcc0c8.png +0 -0
- package/build/index.es.js +439 -224
- package/build/index.es.js.map +1 -1
- package/build/index.js +439 -224
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
function ___$insertStyle(css) {
|
|
2
|
-
if (!css ||
|
|
3
|
-
return;
|
|
4
|
-
}
|
|
5
|
-
const style = document.createElement('style');
|
|
6
|
-
style.setAttribute('type', 'text/css');
|
|
7
|
-
style.innerHTML = css;
|
|
8
|
-
document.head.appendChild(style);
|
|
9
|
-
return css;
|
|
1
|
+
function ___$insertStyle(css) {
|
|
2
|
+
if (!css || !window) {
|
|
3
|
+
return;
|
|
4
|
+
}
|
|
5
|
+
const style = document.createElement('style');
|
|
6
|
+
style.setAttribute('type', 'text/css');
|
|
7
|
+
style.innerHTML = css;
|
|
8
|
+
document.head.appendChild(style);
|
|
9
|
+
return css;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
import React, { createContext, useContext, forwardRef, useRef, useEffect, useState, useMemo, useLayoutEffect, Suspense, memo, lazy, Fragment } from 'react';
|
|
@@ -18,17 +18,20 @@ import ReactDOMServer from 'react-dom/server';
|
|
|
18
18
|
import { createTheming, createUseStyles as createUseStyles$1, useTheme as useTheme$1 } from 'react-jss';
|
|
19
19
|
|
|
20
20
|
function _extends() {
|
|
21
|
-
_extends = Object.assign
|
|
21
|
+
_extends = Object.assign || function (target) {
|
|
22
22
|
for (var i = 1; i < arguments.length; i++) {
|
|
23
23
|
var source = arguments[i];
|
|
24
|
+
|
|
24
25
|
for (var key in source) {
|
|
25
26
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
26
27
|
target[key] = source[key];
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
}
|
|
31
|
+
|
|
30
32
|
return target;
|
|
31
33
|
};
|
|
34
|
+
|
|
32
35
|
return _extends.apply(this, arguments);
|
|
33
36
|
}
|
|
34
37
|
|
|
@@ -284,17 +287,21 @@ const alpha = {
|
|
|
284
287
|
seventyPercent: 0.7,
|
|
285
288
|
eightyPercent: 0.8
|
|
286
289
|
};
|
|
290
|
+
|
|
287
291
|
const getRGBFromHex = hex => {
|
|
288
292
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
289
293
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
290
294
|
const b = parseInt(hex.slice(5, 7), 16);
|
|
291
295
|
return [r, g, b];
|
|
292
296
|
};
|
|
297
|
+
|
|
293
298
|
const hexToRgbA = (hex, alpha = null) => {
|
|
294
299
|
const values = getRGBFromHex(hex);
|
|
300
|
+
|
|
295
301
|
if (alpha !== null) {
|
|
296
302
|
values.push(alpha);
|
|
297
303
|
}
|
|
304
|
+
|
|
298
305
|
return `rgba(${values.join(',')})`;
|
|
299
306
|
};
|
|
300
307
|
const colorMixer = (hex1, weightage = 1, hex2 = colors.white) => {
|
|
@@ -434,24 +441,29 @@ function useLinkBuilder(data) {
|
|
|
434
441
|
basePath,
|
|
435
442
|
isMasterTemplate
|
|
436
443
|
} = useContext(PageContext);
|
|
444
|
+
|
|
437
445
|
if (isEdit || !data.isLink) {
|
|
438
446
|
return null;
|
|
439
447
|
}
|
|
448
|
+
|
|
440
449
|
if (data?.isExistingLink === false) {
|
|
441
450
|
return data.link;
|
|
442
451
|
}
|
|
452
|
+
|
|
443
453
|
if (data?.isExternal) {
|
|
444
454
|
return data.link;
|
|
445
455
|
}
|
|
456
|
+
|
|
446
457
|
if (!isPreview) {
|
|
447
458
|
const link = data.link === '/' ? '' : '/' + data.link;
|
|
448
459
|
return basePath ? `//${basePath}${link}` : null;
|
|
449
|
-
}
|
|
460
|
+
} // courses in preview: special case
|
|
461
|
+
|
|
450
462
|
|
|
451
|
-
// courses in preview: special case
|
|
452
463
|
if (data.link === 'courses') {
|
|
453
464
|
return `//${basePath}/courses`;
|
|
454
465
|
}
|
|
466
|
+
|
|
455
467
|
const {
|
|
456
468
|
pageId
|
|
457
469
|
} = navList.find(el => el.slug === data?.link) || {};
|
|
@@ -627,12 +639,14 @@ var calendar$1 = "data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%
|
|
|
627
639
|
var video = "data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2219%22%20viewBox%3D%220%200%2018%2019%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M15.8625%205.1275C15.555%204.9625%2014.91%204.79%2014.0325%205.405L12.93%206.185C12.8475%203.8525%2011.835%202.9375%209.375%202.9375H4.875C2.31%202.9375%201.3125%203.935%201.3125%206.5V12.5C1.3125%2014.225%202.25%2016.0625%204.875%2016.0625H9.375C11.835%2016.0625%2012.8475%2015.1475%2012.93%2012.815L14.0325%2013.595C14.4975%2013.925%2014.9025%2014.03%2015.225%2014.03C15.5025%2014.03%2015.72%2013.9475%2015.8625%2013.8725C16.17%2013.715%2016.6875%2013.2875%2016.6875%2012.215V6.785C16.6875%205.7125%2016.17%205.285%2015.8625%205.1275ZM8.25%209.035C7.4775%209.035%206.84%208.405%206.84%207.625C6.84%206.845%207.4775%206.215%208.25%206.215C9.0225%206.215%209.66%206.845%209.66%207.625C9.66%208.405%209.0225%209.035%208.25%209.035Z%22%20fill%3D%22%23589DF5%22%2F%3E%3C%2Fsvg%3E";
|
|
628
640
|
|
|
629
641
|
/** @returns {import('./types').IconData} */
|
|
642
|
+
|
|
630
643
|
const getConfiguredIcon1 = url => ({
|
|
631
644
|
url,
|
|
632
645
|
svgChildrenConfigs: []
|
|
633
646
|
});
|
|
634
|
-
|
|
635
647
|
/** @returns {import('./types').IconData} */
|
|
648
|
+
|
|
649
|
+
|
|
636
650
|
const getConfiguredIcon2 = (url, stroke, fill) => ({
|
|
637
651
|
url,
|
|
638
652
|
svgChildrenConfigs: [{
|
|
@@ -641,6 +655,7 @@ const getConfiguredIcon2 = (url, stroke, fill) => ({
|
|
|
641
655
|
fill
|
|
642
656
|
}]
|
|
643
657
|
});
|
|
658
|
+
|
|
644
659
|
const icons = {
|
|
645
660
|
'Live class': getConfiguredIcon2(liveTv, false, true),
|
|
646
661
|
'Recorded videos': getConfiguredIcon2(liveTv2, false, true),
|
|
@@ -673,51 +688,41 @@ const icons = {
|
|
|
673
688
|
'Video Play': getConfiguredIcon2(videoPlay, false, true),
|
|
674
689
|
Quote: getConfiguredIcon2(quote, false, true),
|
|
675
690
|
// Stock
|
|
676
|
-
|
|
677
691
|
'Stock Growth': getConfiguredIcon2(stockGrowth, false, true),
|
|
678
692
|
Money: getConfiguredIcon2(money, false, true),
|
|
679
693
|
Split: getConfiguredIcon2(split, false, true),
|
|
680
694
|
Chart: getConfiguredIcon2(chart, false, true),
|
|
681
695
|
// Personality Development
|
|
682
|
-
|
|
683
696
|
Leaders: getConfiguredIcon2(leaders, false, true),
|
|
684
697
|
Women: getConfiguredIcon2(women, false, true),
|
|
685
698
|
Program: getConfiguredIcon2(program, false, true),
|
|
686
699
|
// Photography
|
|
687
|
-
|
|
688
700
|
'Video Editing': getConfiguredIcon2(videoEditing, false, true),
|
|
689
701
|
Editing: getConfiguredIcon2(editing, false, true),
|
|
690
702
|
Camera: getConfiguredIcon2(camera, false, true),
|
|
691
703
|
Sessions: getConfiguredIcon2(sessions, false, true),
|
|
692
704
|
// Computer
|
|
693
|
-
|
|
694
705
|
'Regular Batches': getConfiguredIcon2(regularBatches, false, true),
|
|
695
706
|
'Alternate Batches': getConfiguredIcon2(alternateBatches, false, true),
|
|
696
707
|
'Weekend Batches': getConfiguredIcon2(weekendBatches, false, true),
|
|
697
708
|
// Life Coach
|
|
698
|
-
|
|
699
709
|
Girl: getConfiguredIcon2(girl, false, true),
|
|
700
710
|
Smile: getConfiguredIcon2(smile, false, true),
|
|
701
711
|
Relationships: getConfiguredIcon2(relationships, false, true),
|
|
702
712
|
// Music
|
|
703
|
-
|
|
704
713
|
Vocal: getConfiguredIcon2(vocal, false, true),
|
|
705
714
|
Instrument: getConfiguredIcon2(instrument, false, true),
|
|
706
715
|
Music: getConfiguredIcon2(music, false, true),
|
|
707
716
|
// Fitness
|
|
708
|
-
|
|
709
717
|
Workout: getConfiguredIcon2(workout, false, true),
|
|
710
718
|
Barbell: getConfiguredIcon2(barbell, false, true),
|
|
711
719
|
Trainer: getConfiguredIcon2(trainer, false, true),
|
|
712
720
|
Report: getConfiguredIcon2(report, false, true),
|
|
713
721
|
// Govt Exam
|
|
714
|
-
|
|
715
722
|
'Govt Exam': getConfiguredIcon2(govtExam, false, true),
|
|
716
723
|
// IIT JEE
|
|
717
|
-
|
|
718
724
|
College: getConfiguredIcon2(college, false, true),
|
|
719
725
|
// Others
|
|
720
|
-
|
|
721
726
|
Teachers: getConfiguredIcon2(teachers, false, true),
|
|
722
727
|
Learning: getConfiguredIcon2(learning, false, true),
|
|
723
728
|
Success: getConfiguredIcon2(success, false, true),
|
|
@@ -729,9 +734,12 @@ const icons = {
|
|
|
729
734
|
Video: getConfiguredIcon2(video, false, true)
|
|
730
735
|
};
|
|
731
736
|
|
|
732
|
-
const someMethod1 = (
|
|
737
|
+
const someMethod1 = (
|
|
738
|
+
/** @type {import('./types').IconData["svgChildrenConfigs"]} */
|
|
739
|
+
svgChildrenConfigs, color, hoverColor) => {
|
|
733
740
|
/** @type {{ [k:string]:React.CSSProperties; }} */
|
|
734
741
|
const obj = {};
|
|
742
|
+
|
|
735
743
|
for (const svgChildConfig of svgChildrenConfigs) {
|
|
736
744
|
if (color) obj['& ' + svgChildConfig.selector] = {
|
|
737
745
|
fill: svgChildConfig.fill ? color : undefined,
|
|
@@ -742,8 +750,10 @@ const someMethod1 = ( /** @type {import('./types').IconData["svgChildrenConfigs"
|
|
|
742
750
|
stroke: svgChildConfig.stroke ? hoverColor : undefined
|
|
743
751
|
};
|
|
744
752
|
}
|
|
753
|
+
|
|
745
754
|
return obj;
|
|
746
755
|
};
|
|
756
|
+
|
|
747
757
|
const useStyles$1 = createUseStyles$1({
|
|
748
758
|
'@keyframes slideRight': {
|
|
749
759
|
to: {
|
|
@@ -787,8 +797,8 @@ const defaultSvgState = {
|
|
|
787
797
|
childrenConfigs: [],
|
|
788
798
|
attributes: defaultAttributes
|
|
789
799
|
};
|
|
790
|
-
|
|
791
800
|
/** @type {import('./props.type').IconProps} */
|
|
801
|
+
|
|
792
802
|
const iconDefaultProps = {
|
|
793
803
|
name: undefined,
|
|
794
804
|
width: 'auto',
|
|
@@ -798,8 +808,8 @@ const iconDefaultProps = {
|
|
|
798
808
|
opacity: undefined,
|
|
799
809
|
className: undefined
|
|
800
810
|
};
|
|
801
|
-
|
|
802
811
|
/** @type {import("react").FC<import('./props.type').IconProps>} */
|
|
812
|
+
|
|
803
813
|
const Icon = ({
|
|
804
814
|
name,
|
|
805
815
|
width,
|
|
@@ -818,8 +828,10 @@ const Icon = ({
|
|
|
818
828
|
}, []);
|
|
819
829
|
/** */
|
|
820
830
|
|
|
821
|
-
const rootRef = useRef(
|
|
822
|
-
|
|
831
|
+
const rootRef = useRef(
|
|
832
|
+
/** @type {HTMLElement} */
|
|
833
|
+
null); // this ref is used to cancel the fetch promise success callback in case name prop changed
|
|
834
|
+
|
|
823
835
|
const currentName = useRef(name);
|
|
824
836
|
const [svgState, setSvgState] = useState(defaultSvgState);
|
|
825
837
|
const styles = useStyles$1({
|
|
@@ -830,41 +842,46 @@ const Icon = ({
|
|
|
830
842
|
opacity,
|
|
831
843
|
hoverColor
|
|
832
844
|
});
|
|
845
|
+
|
|
833
846
|
const _className = useMemo(() => `${styles.root} ${className || ''}`, [className]);
|
|
847
|
+
|
|
834
848
|
useEffect(() => {
|
|
835
849
|
// reset
|
|
836
850
|
currentName.current = name;
|
|
837
851
|
setSvgState(defaultSvgState);
|
|
838
852
|
const icon = icons[name];
|
|
853
|
+
|
|
839
854
|
if (icon) {
|
|
840
855
|
/**
|
|
841
856
|
* retrieve from cache
|
|
842
857
|
* @type {Promise<string>}
|
|
843
858
|
*/
|
|
844
859
|
let svgProm = Icon.getCachedSvgPromise(name);
|
|
860
|
+
|
|
845
861
|
if (!svgProm) {
|
|
846
862
|
svgProm = fetch(icon.url).then(r => r.text()).catch(() => {
|
|
847
863
|
// unset in cache
|
|
848
864
|
Icon.setCachedSvgPromise(name, undefined);
|
|
849
865
|
return null;
|
|
850
|
-
});
|
|
851
|
-
|
|
866
|
+
}); //save in cache
|
|
867
|
+
|
|
852
868
|
Icon.setCachedSvgPromise(name, svgProm);
|
|
853
869
|
}
|
|
870
|
+
|
|
854
871
|
svgProm.then(svg => {
|
|
855
872
|
if (svg && isMounted.current && name === currentName.current) {
|
|
856
873
|
const div = document.createElement('div');
|
|
857
|
-
div.innerHTML = svg;
|
|
874
|
+
div.innerHTML = svg; // set the new attributes
|
|
858
875
|
|
|
859
|
-
// set the new attributes
|
|
860
876
|
const newAttributes = {};
|
|
877
|
+
|
|
861
878
|
for (const ob of div.firstElementChild.attributes) {
|
|
862
879
|
const camelCased = ob.name.replace(/(-|:)([a-z])/g, g => g[1].toUpperCase());
|
|
863
880
|
newAttributes[camelCased] = ob.value;
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
// setting the state in last.
|
|
881
|
+
} // setting the state in last.
|
|
867
882
|
// Set state calls are called immediately inside asynchronous operations, timeouts, and intervals.
|
|
883
|
+
|
|
884
|
+
|
|
868
885
|
setSvgState({
|
|
869
886
|
innerHtml: div.firstElementChild.innerHTML,
|
|
870
887
|
childrenConfigs: icon.svgChildrenConfigs,
|
|
@@ -884,11 +901,14 @@ const Icon = ({
|
|
|
884
901
|
onClick: onClick
|
|
885
902
|
}));
|
|
886
903
|
};
|
|
887
|
-
Icon.defaultProps = iconDefaultProps;
|
|
888
904
|
|
|
905
|
+
Icon.defaultProps = iconDefaultProps;
|
|
889
906
|
/** static properties for caching */
|
|
907
|
+
|
|
890
908
|
Icon.cacheStore = {};
|
|
909
|
+
|
|
891
910
|
Icon.getCachedSvgPromise = name => Icon.cacheStore[name];
|
|
911
|
+
|
|
892
912
|
Icon.setCachedSvgPromise = (name, prom) => Icon.cacheStore[name] = prom;
|
|
893
913
|
|
|
894
914
|
const useDropdownStyles = createUseStyles(theme => ({
|
|
@@ -1000,6 +1020,7 @@ function OptionList({
|
|
|
1000
1020
|
isLandingPages
|
|
1001
1021
|
}) {
|
|
1002
1022
|
useContext(PageContext);
|
|
1023
|
+
|
|
1003
1024
|
const tabsDataModifier = () => {
|
|
1004
1025
|
return optionsData?.map(dt => {
|
|
1005
1026
|
return {
|
|
@@ -1011,6 +1032,7 @@ function OptionList({
|
|
|
1011
1032
|
};
|
|
1012
1033
|
});
|
|
1013
1034
|
};
|
|
1035
|
+
|
|
1014
1036
|
const tabData = tabsDataModifier();
|
|
1015
1037
|
const classes = useSectionStyles$a();
|
|
1016
1038
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -1099,24 +1121,31 @@ function DesktopHeader({
|
|
|
1099
1121
|
const classes = useSectionStyles$a({
|
|
1100
1122
|
isFixed
|
|
1101
1123
|
});
|
|
1124
|
+
|
|
1102
1125
|
const optionDataFn = () => {
|
|
1103
1126
|
let optionsArr = navData;
|
|
1104
1127
|
let optionsData = [];
|
|
1128
|
+
|
|
1105
1129
|
if (optionsArr?.length > 5) {
|
|
1106
1130
|
optionsData = optionsArr?.slice(0, 4);
|
|
1107
1131
|
} else {
|
|
1108
1132
|
optionsData = optionsArr;
|
|
1109
1133
|
}
|
|
1134
|
+
|
|
1110
1135
|
return optionsData;
|
|
1111
1136
|
};
|
|
1137
|
+
|
|
1112
1138
|
const moreContentFn = () => {
|
|
1113
1139
|
let optionsArr = navData;
|
|
1114
1140
|
let moreContent = [];
|
|
1141
|
+
|
|
1115
1142
|
if (optionsArr?.length > 5) {
|
|
1116
1143
|
moreContent = optionsArr?.slice(4);
|
|
1117
1144
|
}
|
|
1145
|
+
|
|
1118
1146
|
return moreContent;
|
|
1119
1147
|
};
|
|
1148
|
+
|
|
1120
1149
|
return /*#__PURE__*/React.createElement("nav", {
|
|
1121
1150
|
className: classes.section
|
|
1122
1151
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1174,6 +1203,7 @@ function MobileHeader({
|
|
|
1174
1203
|
const navEl = useRef(null);
|
|
1175
1204
|
useLayoutEffect(() => {
|
|
1176
1205
|
const body = navEl?.current?.ownerDocument?.body;
|
|
1206
|
+
|
|
1177
1207
|
if (sideMenu) {
|
|
1178
1208
|
body?.setAttribute('style', 'overflow: hidden;');
|
|
1179
1209
|
} else {
|
|
@@ -1183,6 +1213,7 @@ function MobileHeader({
|
|
|
1183
1213
|
let iosUrl = null;
|
|
1184
1214
|
let androidUrl = null;
|
|
1185
1215
|
let downloadLink = null;
|
|
1216
|
+
|
|
1186
1217
|
if (isTutorWebsite) {
|
|
1187
1218
|
if (header?.iosUrl) {
|
|
1188
1219
|
iosUrl = /*#__PURE__*/React.createElement(Button, {
|
|
@@ -1205,6 +1236,7 @@ function MobileHeader({
|
|
|
1205
1236
|
}
|
|
1206
1237
|
});
|
|
1207
1238
|
}
|
|
1239
|
+
|
|
1208
1240
|
if (header?.androidURL) {
|
|
1209
1241
|
androidUrl = /*#__PURE__*/React.createElement(Button, {
|
|
1210
1242
|
data: {
|
|
@@ -1225,6 +1257,7 @@ function MobileHeader({
|
|
|
1225
1257
|
}
|
|
1226
1258
|
});
|
|
1227
1259
|
}
|
|
1260
|
+
|
|
1228
1261
|
if (iosUrl && androidUrl) {
|
|
1229
1262
|
downloadLink = /*#__PURE__*/React.createElement("div", null, iosUrl, androidUrl);
|
|
1230
1263
|
} else if (header?.iosUrl) {
|
|
@@ -1274,6 +1307,7 @@ function MobileHeader({
|
|
|
1274
1307
|
downloadLink = null;
|
|
1275
1308
|
}
|
|
1276
1309
|
}
|
|
1310
|
+
|
|
1277
1311
|
return /*#__PURE__*/React.createElement("nav", {
|
|
1278
1312
|
ref: navEl,
|
|
1279
1313
|
className: classes.section
|
|
@@ -1330,9 +1364,11 @@ function Header({
|
|
|
1330
1364
|
isMobile,
|
|
1331
1365
|
isTutorWebsite
|
|
1332
1366
|
} = useContext(PageContext);
|
|
1367
|
+
|
|
1333
1368
|
const filterHiddenNavs = () => {
|
|
1334
1369
|
return data?.navs?.filter(dt => !dt.isHiddenNav);
|
|
1335
1370
|
};
|
|
1371
|
+
|
|
1336
1372
|
return isMobile ? /*#__PURE__*/React.createElement(MobileHeader, {
|
|
1337
1373
|
navData: filterHiddenNavs(),
|
|
1338
1374
|
header: data,
|
|
@@ -1360,9 +1396,6 @@ const useSectionStyles$9 = createUseStyles(theme => ({
|
|
|
1360
1396
|
boxSizing: 'border-box'
|
|
1361
1397
|
}
|
|
1362
1398
|
},
|
|
1363
|
-
sectionNoBranding: {
|
|
1364
|
-
paddingBottom: '0px'
|
|
1365
|
-
},
|
|
1366
1399
|
upperContainer: {
|
|
1367
1400
|
display: 'flex',
|
|
1368
1401
|
justifyContent: 'space-between',
|
|
@@ -1371,9 +1404,6 @@ const useSectionStyles$9 = createUseStyles(theme => ({
|
|
|
1371
1404
|
borderBottom: '1px solid #E1EAF6',
|
|
1372
1405
|
alignItems: 'flex-start'
|
|
1373
1406
|
},
|
|
1374
|
-
upperContainerNoBranding: {
|
|
1375
|
-
borderBottom: '0px'
|
|
1376
|
-
},
|
|
1377
1407
|
upperContainerItem1: {
|
|
1378
1408
|
width: '33%',
|
|
1379
1409
|
display: 'flex',
|
|
@@ -1521,9 +1551,9 @@ function Footer({
|
|
|
1521
1551
|
const classes = useSectionStyles$9();
|
|
1522
1552
|
console.log(data, 'this is data');
|
|
1523
1553
|
return /*#__PURE__*/React.createElement("footer", {
|
|
1524
|
-
className:
|
|
1554
|
+
className: classes.section
|
|
1525
1555
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1526
|
-
className:
|
|
1556
|
+
className: classes.upperContainer
|
|
1527
1557
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1528
1558
|
className: classes.upperContainerItem1
|
|
1529
1559
|
}, /*#__PURE__*/React.createElement("img", {
|
|
@@ -1694,6 +1724,7 @@ const rustTheme = {
|
|
|
1694
1724
|
light: colors.lightRust,
|
|
1695
1725
|
lightest: colors.lightestRust
|
|
1696
1726
|
};
|
|
1727
|
+
|
|
1697
1728
|
const generateThemePalette = themeColors => ({
|
|
1698
1729
|
primary: themeColors,
|
|
1699
1730
|
background: {
|
|
@@ -1716,6 +1747,7 @@ const generateThemePalette = themeColors => ({
|
|
|
1716
1747
|
tertiary: colors.blueGrey
|
|
1717
1748
|
}
|
|
1718
1749
|
});
|
|
1750
|
+
|
|
1719
1751
|
const bluePalette = generateThemePalette(blueTheme);
|
|
1720
1752
|
const redPalette = generateThemePalette(redTheme);
|
|
1721
1753
|
const orangePalette = generateThemePalette(orangeTheme);
|
|
@@ -1756,7 +1788,9 @@ const fontComponents = {
|
|
|
1756
1788
|
'Merriweather Sans': MerriweatherSans,
|
|
1757
1789
|
'Arima Madurai': ArimaMadurai
|
|
1758
1790
|
};
|
|
1791
|
+
|
|
1759
1792
|
const getFontComponent = font => fontComponents[font] || (() => null);
|
|
1793
|
+
|
|
1760
1794
|
function FontSeeder({
|
|
1761
1795
|
fontFamily
|
|
1762
1796
|
}) {
|
|
@@ -1766,30 +1800,37 @@ function FontSeeder({
|
|
|
1766
1800
|
const useRubikFont = createUseStyles$1({
|
|
1767
1801
|
'@import': `url('https://fonts.googleapis.com/css2?family=Lato&family=Rubik:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap')`
|
|
1768
1802
|
});
|
|
1803
|
+
|
|
1769
1804
|
function Rubik() {
|
|
1770
1805
|
// to import "Rubik" font css
|
|
1771
1806
|
useRubikFont();
|
|
1772
1807
|
return null;
|
|
1773
1808
|
}
|
|
1809
|
+
|
|
1774
1810
|
const useIbmPlexSansFont = createUseStyles$1({
|
|
1775
1811
|
'@import': 'url(https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap)'
|
|
1776
1812
|
});
|
|
1813
|
+
|
|
1777
1814
|
function IbmPlexSans() {
|
|
1778
1815
|
// to import "Ibm Plex Sans" font css
|
|
1779
1816
|
useIbmPlexSansFont();
|
|
1780
1817
|
return null;
|
|
1781
1818
|
}
|
|
1819
|
+
|
|
1782
1820
|
const useMerriweatherSansFont = createUseStyles$1({
|
|
1783
1821
|
'@import': 'url(https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap)'
|
|
1784
1822
|
});
|
|
1823
|
+
|
|
1785
1824
|
function MerriweatherSans() {
|
|
1786
1825
|
// to import "Merriweather Sans" font css
|
|
1787
1826
|
useMerriweatherSansFont();
|
|
1788
1827
|
return null;
|
|
1789
1828
|
}
|
|
1829
|
+
|
|
1790
1830
|
const useArimaMaduraiFont = createUseStyles$1({
|
|
1791
1831
|
'@import': 'url(https://fonts.googleapis.com/css2?family=Arima+Madurai:wght@400;500;700&display=swap)'
|
|
1792
1832
|
});
|
|
1833
|
+
|
|
1793
1834
|
function ArimaMadurai() {
|
|
1794
1835
|
// to import "Arima Madurai" font css
|
|
1795
1836
|
useArimaMaduraiFont();
|
|
@@ -1820,7 +1861,9 @@ const TYPE_TO_COMPONENT_MAP$1 = {
|
|
|
1820
1861
|
TILES_SECTION: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$1; })),
|
|
1821
1862
|
EMAIL_DRIP_MARKET: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index; }))
|
|
1822
1863
|
};
|
|
1864
|
+
|
|
1823
1865
|
const getCompToRender$1 = type => TYPE_TO_COMPONENT_MAP$1[type] || (() => null);
|
|
1866
|
+
|
|
1824
1867
|
const MemoisedSection$1 = /*#__PURE__*/memo(({
|
|
1825
1868
|
sectionData,
|
|
1826
1869
|
extraProps
|
|
@@ -1837,7 +1880,9 @@ function SectionRenderer$1({
|
|
|
1837
1880
|
extraProps
|
|
1838
1881
|
}) {
|
|
1839
1882
|
return /*#__PURE__*/React.createElement(Suspense, {
|
|
1840
|
-
fallback: null
|
|
1883
|
+
fallback: null
|
|
1884
|
+
/*GIF maybe*/
|
|
1885
|
+
|
|
1841
1886
|
}, /*#__PURE__*/React.createElement(MemoisedSection$1, {
|
|
1842
1887
|
sectionData: sectionData,
|
|
1843
1888
|
extraProps: extraProps
|
|
@@ -1885,7 +1930,8 @@ function PageRenderer$1({
|
|
|
1885
1930
|
templateId,
|
|
1886
1931
|
isTutorWebsite = false,
|
|
1887
1932
|
extraProps,
|
|
1888
|
-
hideLogin
|
|
1933
|
+
hideLogin,
|
|
1934
|
+
isCustomWebsite
|
|
1889
1935
|
}) {
|
|
1890
1936
|
const theme = useMemo(() => getTheme(color, font), [color, font]);
|
|
1891
1937
|
const navList = header?.navs;
|
|
@@ -1905,9 +1951,11 @@ function PageRenderer$1({
|
|
|
1905
1951
|
isTutorWebsite,
|
|
1906
1952
|
extraProps,
|
|
1907
1953
|
hideLogin,
|
|
1954
|
+
isCustomWebsite,
|
|
1908
1955
|
_id
|
|
1909
1956
|
}), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id]);
|
|
1910
|
-
const Wrapper = SectionWrapper || Fragment;
|
|
1957
|
+
const Wrapper = SectionWrapper || Fragment; // console.log("CONTEXT______", context)
|
|
1958
|
+
|
|
1911
1959
|
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
1912
1960
|
theme: theme
|
|
1913
1961
|
}, /*#__PURE__*/React.createElement(PageContext.Provider, {
|
|
@@ -1984,6 +2032,11 @@ const useSectionStyles$8 = createUseStyles(theme => ({
|
|
|
1984
2032
|
margin: '0 auto',
|
|
1985
2033
|
maxWidth: '100%'
|
|
1986
2034
|
},
|
|
2035
|
+
imageContainer: {
|
|
2036
|
+
width: '100%',
|
|
2037
|
+
position: 'relative',
|
|
2038
|
+
height: '90%'
|
|
2039
|
+
},
|
|
1987
2040
|
subTitleHeading: {
|
|
1988
2041
|
marginBottom: '8px',
|
|
1989
2042
|
fontSize: '16px',
|
|
@@ -2040,6 +2093,10 @@ const useSectionStyles$8 = createUseStyles(theme => ({
|
|
|
2040
2093
|
},
|
|
2041
2094
|
linkButton: {
|
|
2042
2095
|
padding: '12px 16px'
|
|
2096
|
+
},
|
|
2097
|
+
imageContainer: {
|
|
2098
|
+
height: 'undefined',
|
|
2099
|
+
paddingBottom: '80%'
|
|
2043
2100
|
}
|
|
2044
2101
|
}
|
|
2045
2102
|
}));
|
|
@@ -2121,18 +2178,23 @@ const getArrowRotationAngle = props => {
|
|
|
2121
2178
|
switch (true) {
|
|
2122
2179
|
case props.left:
|
|
2123
2180
|
return 180;
|
|
2181
|
+
|
|
2124
2182
|
case props.up:
|
|
2125
2183
|
return 270;
|
|
2184
|
+
|
|
2126
2185
|
case props.down:
|
|
2127
2186
|
return 90;
|
|
2187
|
+
|
|
2128
2188
|
case props.right:
|
|
2129
2189
|
default:
|
|
2130
2190
|
return 0;
|
|
2131
2191
|
}
|
|
2132
2192
|
};
|
|
2193
|
+
|
|
2133
2194
|
const sizeHandler = ({
|
|
2134
2195
|
size
|
|
2135
2196
|
}) => size === 'small' ? '32px' : '48px';
|
|
2197
|
+
|
|
2136
2198
|
const useArrowButtonStyles = createUseStyles(theme => ({
|
|
2137
2199
|
arrowButtonContainer: {
|
|
2138
2200
|
cursor: 'pointer',
|
|
@@ -2172,6 +2234,7 @@ function dotsToShow(i, n) {
|
|
|
2172
2234
|
const leftToShow = i < elementsToShow / 2;
|
|
2173
2235
|
const rightToShow = n - i - 1 < elementsToShow / 2;
|
|
2174
2236
|
let leftCount, rightCount;
|
|
2237
|
+
|
|
2175
2238
|
if (leftToShow) {
|
|
2176
2239
|
leftCount = i;
|
|
2177
2240
|
rightCount = elementsToShow - i - 1;
|
|
@@ -2182,11 +2245,13 @@ function dotsToShow(i, n) {
|
|
|
2182
2245
|
leftCount = 2;
|
|
2183
2246
|
rightCount = 2;
|
|
2184
2247
|
}
|
|
2248
|
+
|
|
2185
2249
|
return {
|
|
2186
2250
|
leftCount,
|
|
2187
2251
|
rightCount
|
|
2188
2252
|
};
|
|
2189
2253
|
}
|
|
2254
|
+
|
|
2190
2255
|
function Carousel({
|
|
2191
2256
|
settings,
|
|
2192
2257
|
children,
|
|
@@ -2240,12 +2305,15 @@ function Carousel({
|
|
|
2240
2305
|
...settings,
|
|
2241
2306
|
className: settings?.className ? settings?.className + ' ' + classes.sliderClass : classes.sliderClass
|
|
2242
2307
|
};
|
|
2308
|
+
|
|
2243
2309
|
const nextClick = () => {
|
|
2244
2310
|
sliderRef.current.slickNext();
|
|
2245
2311
|
};
|
|
2312
|
+
|
|
2246
2313
|
const previousClick = () => {
|
|
2247
2314
|
sliderRef.current.slickPrev();
|
|
2248
2315
|
};
|
|
2316
|
+
|
|
2249
2317
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Slider, _extends({
|
|
2250
2318
|
ref: sliderRef
|
|
2251
2319
|
}, sliderSettings), children), hideArrow || isMobile ? null : /*#__PURE__*/React.createElement("div", {
|
|
@@ -2261,6 +2329,41 @@ function Carousel({
|
|
|
2261
2329
|
})));
|
|
2262
2330
|
}
|
|
2263
2331
|
|
|
2332
|
+
const NextImageRenderer = ({
|
|
2333
|
+
src,
|
|
2334
|
+
...props
|
|
2335
|
+
}) => {
|
|
2336
|
+
const {
|
|
2337
|
+
isCustomWebsite
|
|
2338
|
+
} = useContext(PageContext);
|
|
2339
|
+
let {
|
|
2340
|
+
refSetter,
|
|
2341
|
+
className
|
|
2342
|
+
} = props;
|
|
2343
|
+
|
|
2344
|
+
if (isCustomWebsite) {
|
|
2345
|
+
return /*#__PURE__*/React.createElement(require.resolve('next/image').default, {
|
|
2346
|
+
src: src,
|
|
2347
|
+
// height: "640",
|
|
2348
|
+
// width: "959",
|
|
2349
|
+
layout: 'fill',
|
|
2350
|
+
ref: {
|
|
2351
|
+
refSetter
|
|
2352
|
+
},
|
|
2353
|
+
className: {
|
|
2354
|
+
className
|
|
2355
|
+
},
|
|
2356
|
+
...props
|
|
2357
|
+
});
|
|
2358
|
+
} else {
|
|
2359
|
+
return /*#__PURE__*/React.createElement("img", {
|
|
2360
|
+
ref: refSetter,
|
|
2361
|
+
className: className,
|
|
2362
|
+
src: src
|
|
2363
|
+
});
|
|
2364
|
+
}
|
|
2365
|
+
};
|
|
2366
|
+
|
|
2264
2367
|
function Section$4({
|
|
2265
2368
|
nodeData
|
|
2266
2369
|
}) {
|
|
@@ -2299,17 +2402,20 @@ function Section$4({
|
|
|
2299
2402
|
dangerouslySetInnerHTML: {
|
|
2300
2403
|
__html: nodeData.description.metadata.value
|
|
2301
2404
|
}
|
|
2302
|
-
}),
|
|
2405
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
2303
2406
|
ref: nodeData?.cta?.refSetter,
|
|
2304
2407
|
data: nodeData.cta.metadata,
|
|
2305
2408
|
type: nodeData?.cta?.metadata?.type,
|
|
2306
2409
|
size: isMobile ? 'small' : 'medium'
|
|
2307
|
-
})), /*#__PURE__*/React.createElement("
|
|
2410
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
2411
|
+
className: classes?.imageContainer
|
|
2412
|
+
}, /*#__PURE__*/React.createElement(NextImageRenderer, {
|
|
2308
2413
|
ref: nodeData?.image?.refSetter,
|
|
2309
2414
|
className: classes.sideBannerImage,
|
|
2310
2415
|
src: nodeData.image.metadata.value
|
|
2311
|
-
})));
|
|
2416
|
+
}))));
|
|
2312
2417
|
}
|
|
2418
|
+
|
|
2313
2419
|
function BannerCarouselRight({
|
|
2314
2420
|
sectionData
|
|
2315
2421
|
}) {
|
|
@@ -2335,7 +2441,9 @@ function BannerCarouselRight({
|
|
|
2335
2441
|
className: classes.sectionContainer
|
|
2336
2442
|
}, /*#__PURE__*/React.createElement(Wrapper, wrapperProps, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React.createElement(Section$4, {
|
|
2337
2443
|
nodeData: node,
|
|
2338
|
-
key: idx
|
|
2444
|
+
key: idx
|
|
2445
|
+
/* or some other unique property */
|
|
2446
|
+
|
|
2339
2447
|
})))));
|
|
2340
2448
|
}
|
|
2341
2449
|
|
|
@@ -2542,9 +2650,11 @@ function List({
|
|
|
2542
2650
|
containerWidth
|
|
2543
2651
|
});
|
|
2544
2652
|
const [nodeData] = sectionData.components;
|
|
2653
|
+
|
|
2545
2654
|
const getNumber = val => {
|
|
2546
2655
|
return val.toString().length == 1 ? '0' + val : val;
|
|
2547
2656
|
};
|
|
2657
|
+
|
|
2548
2658
|
return /*#__PURE__*/React.createElement("section", {
|
|
2549
2659
|
className: classes.section
|
|
2550
2660
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -2614,9 +2724,9 @@ const useSectionStyles$6 = createUseStyles(theme => ({
|
|
|
2614
2724
|
sectionContainer: {
|
|
2615
2725
|
margin: '0 auto',
|
|
2616
2726
|
width: '100%',
|
|
2617
|
-
maxWidth: ({
|
|
2618
|
-
|
|
2619
|
-
|
|
2727
|
+
// maxWidth: ({ containerWidth } = {}) => containerWidth,
|
|
2728
|
+
position: 'absolute',
|
|
2729
|
+
zIndex: '99'
|
|
2620
2730
|
},
|
|
2621
2731
|
absoluteButtons: {
|
|
2622
2732
|
display: 'flex',
|
|
@@ -2630,19 +2740,33 @@ const useSectionStyles$6 = createUseStyles(theme => ({
|
|
|
2630
2740
|
padding: '100px 0',
|
|
2631
2741
|
height: '100%',
|
|
2632
2742
|
display: 'flex',
|
|
2633
|
-
alignItems: 'center'
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2743
|
+
alignItems: 'center' // backgroundImage: ({ imageUrl } = {}) =>
|
|
2744
|
+
// `linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%), url("${imageUrl}")`,
|
|
2745
|
+
// backgroundPosition: 'center',
|
|
2746
|
+
// backgroundSize: 'cover'
|
|
2747
|
+
|
|
2748
|
+
},
|
|
2749
|
+
centerBgImageContainer: {
|
|
2750
|
+
width: '100%',
|
|
2751
|
+
position: 'relative',
|
|
2752
|
+
paddingBottom: '35rem',
|
|
2753
|
+
backgroundImage: 'linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%)',
|
|
2754
|
+
backgroundSize: 'cover',
|
|
2755
|
+
backgroundPosition: 'center center'
|
|
2756
|
+
},
|
|
2757
|
+
centerBgImage: {
|
|
2758
|
+
objectFit: 'cover',
|
|
2759
|
+
backgroundImage: 'linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%)',
|
|
2760
|
+
backgroundSize: 'cover',
|
|
2761
|
+
backgroundPosition: 'center center'
|
|
2639
2762
|
},
|
|
2640
2763
|
partialBackground: {
|
|
2641
2764
|
height: '100%'
|
|
2642
2765
|
},
|
|
2643
2766
|
textContainer: {
|
|
2644
2767
|
padding: '0 18%',
|
|
2645
|
-
margin: '0 auto'
|
|
2768
|
+
margin: '0 auto',
|
|
2769
|
+
width: '80%'
|
|
2646
2770
|
},
|
|
2647
2771
|
subTitleHeading: {
|
|
2648
2772
|
color: theme?.palette?.font?.invertedDefault,
|
|
@@ -2652,7 +2776,7 @@ const useSectionStyles$6 = createUseStyles(theme => ({
|
|
|
2652
2776
|
},
|
|
2653
2777
|
heading: {
|
|
2654
2778
|
margin: '0',
|
|
2655
|
-
fontSize: '
|
|
2779
|
+
fontSize: '62px',
|
|
2656
2780
|
color: theme?.palette?.font?.invertedDefault,
|
|
2657
2781
|
wordBreak: 'break-word'
|
|
2658
2782
|
},
|
|
@@ -2674,7 +2798,9 @@ const useSectionStyles$6 = createUseStyles(theme => ({
|
|
|
2674
2798
|
},
|
|
2675
2799
|
contentContainer: {
|
|
2676
2800
|
display: 'flex',
|
|
2677
|
-
flexFlow: 'column-reverse'
|
|
2801
|
+
flexFlow: 'column-reverse',
|
|
2802
|
+
justifyContent: 'center',
|
|
2803
|
+
padding: '0px'
|
|
2678
2804
|
},
|
|
2679
2805
|
textContainer: {
|
|
2680
2806
|
padding: '20px'
|
|
@@ -2684,12 +2810,19 @@ const useSectionStyles$6 = createUseStyles(theme => ({
|
|
|
2684
2810
|
},
|
|
2685
2811
|
description: {
|
|
2686
2812
|
margin: '16px 0'
|
|
2813
|
+
},
|
|
2814
|
+
centerBgImageContainer: {
|
|
2815
|
+
width: '100%',
|
|
2816
|
+
position: 'relative',
|
|
2817
|
+
height: '34rem',
|
|
2818
|
+
paddingBottom: '100%'
|
|
2687
2819
|
}
|
|
2688
2820
|
}
|
|
2689
2821
|
}));
|
|
2690
2822
|
|
|
2691
2823
|
const Section$3 = ({
|
|
2692
|
-
nodeData
|
|
2824
|
+
nodeData,
|
|
2825
|
+
isCustomWebsite
|
|
2693
2826
|
}) => {
|
|
2694
2827
|
const {
|
|
2695
2828
|
layout: {
|
|
@@ -2701,6 +2834,7 @@ const Section$3 = ({
|
|
|
2701
2834
|
imageUrl: nodeData.image.metadata.value,
|
|
2702
2835
|
containerWidth
|
|
2703
2836
|
});
|
|
2837
|
+
console.log('isCustomWebsite______', isCustomWebsite);
|
|
2704
2838
|
return /*#__PURE__*/React.createElement("section", {
|
|
2705
2839
|
className: classes.bannerCarouselCenterSection
|
|
2706
2840
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -2729,16 +2863,24 @@ const Section$3 = ({
|
|
|
2729
2863
|
dangerouslySetInnerHTML: {
|
|
2730
2864
|
__html: nodeData.description.metadata.value
|
|
2731
2865
|
}
|
|
2732
|
-
}),
|
|
2866
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
2733
2867
|
ref: nodeData?.cta?.refSetter,
|
|
2734
2868
|
data: nodeData.cta.metadata,
|
|
2735
2869
|
type: nodeData?.cta?.metadata?.type,
|
|
2736
2870
|
size: isMobile ? 'small' : 'medium'
|
|
2737
|
-
})))
|
|
2871
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
2872
|
+
className: classes?.centerBgImageContainer
|
|
2873
|
+
}, /*#__PURE__*/React.createElement(NextImageRenderer, {
|
|
2874
|
+
src: nodeData.image.metadata.value,
|
|
2875
|
+
className: classes?.centerBgImage
|
|
2876
|
+
}))));
|
|
2738
2877
|
};
|
|
2878
|
+
|
|
2739
2879
|
function BannerCarouselCenter({
|
|
2740
|
-
sectionData
|
|
2880
|
+
sectionData,
|
|
2881
|
+
isCustomWebsite
|
|
2741
2882
|
}) {
|
|
2883
|
+
console.log('isCustomWebsite______', isCustomWebsite);
|
|
2742
2884
|
const classes = useSectionStyles$6();
|
|
2743
2885
|
const [{
|
|
2744
2886
|
bannerCarousel
|
|
@@ -2752,7 +2894,10 @@ function BannerCarouselCenter({
|
|
|
2752
2894
|
className: classes.bannerCarouselCenterSection
|
|
2753
2895
|
}, /*#__PURE__*/React.createElement(Wrapper, wrapperProps, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React.createElement(Section$3, {
|
|
2754
2896
|
nodeData: node,
|
|
2755
|
-
|
|
2897
|
+
isCustomWebsite: isCustomWebsite,
|
|
2898
|
+
key: idx
|
|
2899
|
+
/* or some other unique property */
|
|
2900
|
+
|
|
2756
2901
|
}))));
|
|
2757
2902
|
}
|
|
2758
2903
|
|
|
@@ -2793,7 +2938,10 @@ const useSectionStyles$5 = createUseStyles(theme => {
|
|
|
2793
2938
|
position: 'relative'
|
|
2794
2939
|
},
|
|
2795
2940
|
imageContainer: {
|
|
2796
|
-
position: 'relative'
|
|
2941
|
+
position: 'relative',
|
|
2942
|
+
width: '100%',
|
|
2943
|
+
// height: "650px"
|
|
2944
|
+
paddingBottom: '82%'
|
|
2797
2945
|
},
|
|
2798
2946
|
imageBorder: {
|
|
2799
2947
|
border: `2px solid ${theme?.palette?.primary?.light}`,
|
|
@@ -2884,10 +3032,10 @@ function Section$2({
|
|
|
2884
3032
|
className: classes.imageContainerDiv
|
|
2885
3033
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2886
3034
|
className: classes.imageContainer
|
|
2887
|
-
}, /*#__PURE__*/React.createElement(
|
|
3035
|
+
}, /*#__PURE__*/React.createElement(NextImageRenderer, {
|
|
3036
|
+
src: nodeData.image.metadata.value,
|
|
2888
3037
|
ref: nodeData?.image?.refSetter,
|
|
2889
|
-
className: classes.sideBannerImage
|
|
2890
|
-
src: nodeData.image.metadata.value
|
|
3038
|
+
className: classes.sideBannerImage
|
|
2891
3039
|
}), /*#__PURE__*/React.createElement("div", {
|
|
2892
3040
|
className: classes.imageBorder
|
|
2893
3041
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
@@ -2912,16 +3060,19 @@ function Section$2({
|
|
|
2912
3060
|
dangerouslySetInnerHTML: {
|
|
2913
3061
|
__html: nodeData.description.metadata.value
|
|
2914
3062
|
}
|
|
2915
|
-
}),
|
|
3063
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
2916
3064
|
ref: nodeData?.cta?.refSetter,
|
|
2917
3065
|
data: nodeData.cta.metadata,
|
|
2918
3066
|
type: nodeData?.cta?.metadata?.type,
|
|
2919
3067
|
size: isMobile ? 'small' : 'medium'
|
|
2920
3068
|
})));
|
|
2921
3069
|
}
|
|
3070
|
+
|
|
2922
3071
|
function BannerCarouselLeft({
|
|
2923
|
-
sectionData
|
|
3072
|
+
sectionData,
|
|
3073
|
+
isCustomWebsite
|
|
2924
3074
|
}) {
|
|
3075
|
+
console.log('isCustomWebsite______', isCustomWebsite);
|
|
2925
3076
|
const {
|
|
2926
3077
|
layout: {
|
|
2927
3078
|
containerWidth
|
|
@@ -2940,7 +3091,9 @@ function BannerCarouselLeft({
|
|
|
2940
3091
|
className: classes.sectionContainer
|
|
2941
3092
|
}, /*#__PURE__*/React.createElement(Wrapper, null, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React.createElement(Section$2, {
|
|
2942
3093
|
nodeData: node,
|
|
2943
|
-
key: idx
|
|
3094
|
+
key: idx
|
|
3095
|
+
/* or some other unique property */
|
|
3096
|
+
|
|
2944
3097
|
})))));
|
|
2945
3098
|
}
|
|
2946
3099
|
|
|
@@ -3095,6 +3248,7 @@ async function postApiCall(baseURLs, data) {
|
|
|
3095
3248
|
},
|
|
3096
3249
|
data
|
|
3097
3250
|
});
|
|
3251
|
+
|
|
3098
3252
|
if (res) {
|
|
3099
3253
|
return res.data;
|
|
3100
3254
|
}
|
|
@@ -3119,6 +3273,7 @@ async function postApiCallForm(baseURLs, data, extraProps) {
|
|
|
3119
3273
|
if (extraProps && extraProps.formSubmitSuccess) {
|
|
3120
3274
|
extraProps.formSubmitSuccess();
|
|
3121
3275
|
}
|
|
3276
|
+
|
|
3122
3277
|
return res.data;
|
|
3123
3278
|
});
|
|
3124
3279
|
} catch (err) {
|
|
@@ -3231,6 +3386,7 @@ function SubscribeToNewsletter({
|
|
|
3231
3386
|
const [inputVal, setInputVal] = useState(formInitialValue);
|
|
3232
3387
|
let [isValid, setIsValid] = useState(true);
|
|
3233
3388
|
let [btnDisabled, setBtnDisabled] = useState(false);
|
|
3389
|
+
|
|
3234
3390
|
const handleSubmit = () => {
|
|
3235
3391
|
let data = {
|
|
3236
3392
|
sectionId: sectionData.sectionId,
|
|
@@ -3246,9 +3402,11 @@ function SubscribeToNewsletter({
|
|
|
3246
3402
|
setBtnDisabled(true);
|
|
3247
3403
|
setInputVal(formInitialValue);
|
|
3248
3404
|
};
|
|
3405
|
+
|
|
3249
3406
|
const checkValidity = () => {
|
|
3250
3407
|
if (validations?.[nodeData?.inputField?.metadata?.validationType]?.length) {
|
|
3251
3408
|
let regex = new RegExp(validations[nodeData?.inputField?.metadata?.validationType]);
|
|
3409
|
+
|
|
3252
3410
|
if (regex?.test(inputVal)) {
|
|
3253
3411
|
setIsValid(true);
|
|
3254
3412
|
} else {
|
|
@@ -3256,6 +3414,7 @@ function SubscribeToNewsletter({
|
|
|
3256
3414
|
}
|
|
3257
3415
|
}
|
|
3258
3416
|
};
|
|
3417
|
+
|
|
3259
3418
|
useEffect(() => {
|
|
3260
3419
|
if (!isValid) {
|
|
3261
3420
|
setBtnDisabled(true);
|
|
@@ -3309,7 +3468,7 @@ function SubscribeToNewsletter({
|
|
|
3309
3468
|
onFocus: () => {
|
|
3310
3469
|
setIsValid(true);
|
|
3311
3470
|
}
|
|
3312
|
-
})),
|
|
3471
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
3313
3472
|
className: classes.btnContainer
|
|
3314
3473
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
3315
3474
|
ref: nodeData?.cta?.refSetter,
|
|
@@ -3375,8 +3534,7 @@ const useTestimonialStyles = createUseStyles(theme => {
|
|
|
3375
3534
|
color: theme?.palette?.font?.default,
|
|
3376
3535
|
margin: '10px 0 40px 10px',
|
|
3377
3536
|
overflow: 'hidden',
|
|
3378
|
-
|
|
3379
|
-
// whiteSpace: 'nowrap',
|
|
3537
|
+
whiteSpace: 'nowrap',
|
|
3380
3538
|
textOverflow: 'ellipsis'
|
|
3381
3539
|
},
|
|
3382
3540
|
sliderContainer: {
|
|
@@ -3416,8 +3574,16 @@ const useTestimonialStyles = createUseStyles(theme => {
|
|
|
3416
3574
|
},
|
|
3417
3575
|
userContainer: {
|
|
3418
3576
|
display: 'flex',
|
|
3577
|
+
gap: '15px',
|
|
3419
3578
|
padding: '0 0 29px 48px'
|
|
3420
3579
|
},
|
|
3580
|
+
userImageContainer: {
|
|
3581
|
+
width: '64px',
|
|
3582
|
+
height: '64px',
|
|
3583
|
+
position: 'relative',
|
|
3584
|
+
// paddingBottom: '55px',
|
|
3585
|
+
objectFit: 'cover'
|
|
3586
|
+
},
|
|
3421
3587
|
userImageDummy: {
|
|
3422
3588
|
width: '64px',
|
|
3423
3589
|
height: '64px',
|
|
@@ -3459,8 +3625,7 @@ const useTestimonialStyles = createUseStyles(theme => {
|
|
|
3459
3625
|
color: theme?.palette?.font?.default,
|
|
3460
3626
|
margin: '4px 0 12px 0',
|
|
3461
3627
|
overflow: 'hidden',
|
|
3462
|
-
|
|
3463
|
-
wordBreak: 'break-word',
|
|
3628
|
+
whiteSpace: 'nowrap',
|
|
3464
3629
|
textOverflow: 'ellipsis'
|
|
3465
3630
|
},
|
|
3466
3631
|
userImageDummy: {
|
|
@@ -3487,6 +3652,10 @@ const useTestimonialStyles = createUseStyles(theme => {
|
|
|
3487
3652
|
overflow: 'hidden',
|
|
3488
3653
|
whiteSpace: 'nowrap',
|
|
3489
3654
|
textOverflow: 'ellipsis'
|
|
3655
|
+
},
|
|
3656
|
+
userImageContainer: {
|
|
3657
|
+
width: '48px',
|
|
3658
|
+
height: '48px'
|
|
3490
3659
|
}
|
|
3491
3660
|
}
|
|
3492
3661
|
};
|
|
@@ -3545,12 +3714,22 @@ function Section$1({
|
|
|
3545
3714
|
}
|
|
3546
3715
|
}), /*#__PURE__*/React.createElement("div", {
|
|
3547
3716
|
className: classes.userContainer
|
|
3548
|
-
}, el?.cardUserImage?.metadata?.value ?
|
|
3717
|
+
}, el?.cardUserImage?.metadata?.value ?
|
|
3718
|
+
/*#__PURE__*/
|
|
3719
|
+
// <img
|
|
3720
|
+
// ref={el?.cardUserImage?.refSetter}
|
|
3721
|
+
// className={classes.userImage}
|
|
3722
|
+
// src={el?.cardUserImage?.metadata?.value}
|
|
3723
|
+
// alt="userImg"
|
|
3724
|
+
// />
|
|
3725
|
+
React.createElement("div", {
|
|
3726
|
+
className: classes.userImageContainer
|
|
3727
|
+
}, /*#__PURE__*/React.createElement(NextImageRenderer, {
|
|
3549
3728
|
ref: el?.cardUserImage?.refSetter,
|
|
3550
3729
|
className: classes.userImage,
|
|
3551
3730
|
src: el?.cardUserImage?.metadata?.value,
|
|
3552
3731
|
alt: "userImg"
|
|
3553
|
-
}) : /*#__PURE__*/React.createElement("div", {
|
|
3732
|
+
})) : /*#__PURE__*/React.createElement("div", {
|
|
3554
3733
|
ref: el?.cardUserImage?.refSetter,
|
|
3555
3734
|
className: classes.userImageDummy
|
|
3556
3735
|
}), /*#__PURE__*/React.createElement("h3", {
|
|
@@ -3585,6 +3764,7 @@ function Section$1({
|
|
|
3585
3764
|
className: classes.contentRow
|
|
3586
3765
|
}, carouselContent))));
|
|
3587
3766
|
}
|
|
3767
|
+
|
|
3588
3768
|
function Testimonials({
|
|
3589
3769
|
sectionData
|
|
3590
3770
|
}) {
|
|
@@ -3649,6 +3829,7 @@ const loaderStyle = theme => ({
|
|
|
3649
3829
|
});
|
|
3650
3830
|
|
|
3651
3831
|
const useStyles = createUseStyles$1(loaderStyle);
|
|
3832
|
+
|
|
3652
3833
|
function Loader({
|
|
3653
3834
|
texts
|
|
3654
3835
|
}) {
|
|
@@ -3660,11 +3841,13 @@ function Loader({
|
|
|
3660
3841
|
useEffect(() => {
|
|
3661
3842
|
if (texts && texts.length) {
|
|
3662
3843
|
let textID = '';
|
|
3844
|
+
|
|
3663
3845
|
for (let i = 0; i < texts.length; i++) {
|
|
3664
3846
|
textID = setTimeout(() => {
|
|
3665
3847
|
setLoaderText(texts[i]);
|
|
3666
3848
|
}, 2000 * i);
|
|
3667
3849
|
}
|
|
3850
|
+
|
|
3668
3851
|
return () => {
|
|
3669
3852
|
clearTimeout(textID);
|
|
3670
3853
|
};
|
|
@@ -3693,14 +3876,16 @@ const useVideoStyles$1 = createUseStyles(theme => {
|
|
|
3693
3876
|
isLoaded
|
|
3694
3877
|
} = {}) => isLoaded ? 'block' : 'none'
|
|
3695
3878
|
},
|
|
3879
|
+
icon: {
|
|
3880
|
+
zIndex: '999'
|
|
3881
|
+
},
|
|
3696
3882
|
imgContainer: {
|
|
3697
3883
|
position: 'absolute',
|
|
3698
3884
|
width: '100%',
|
|
3699
3885
|
height: '100%',
|
|
3700
3886
|
borderRadius: theme.shape.borderRadius.small,
|
|
3701
|
-
backgroundImage: ({
|
|
3702
|
-
|
|
3703
|
-
} = {}) => `linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%), url("${imageUrl}")`,
|
|
3887
|
+
// backgroundImage: ({ imageUrl } = {}) =>
|
|
3888
|
+
// `linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%), url("${imageUrl}")`,
|
|
3704
3889
|
backgroundSize: 'cover',
|
|
3705
3890
|
display: 'flex',
|
|
3706
3891
|
justifyContent: 'center',
|
|
@@ -3732,20 +3917,26 @@ function VideoPlayer(props) {
|
|
|
3732
3917
|
imageUrl: imageUrl
|
|
3733
3918
|
});
|
|
3734
3919
|
const theme = useTheme();
|
|
3920
|
+
|
|
3735
3921
|
function getId(url) {
|
|
3736
3922
|
var regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/;
|
|
3737
3923
|
var match = url?.match(regExp);
|
|
3924
|
+
|
|
3738
3925
|
if (match?.[2].length == 11) {
|
|
3739
3926
|
return 'https://www.youtube.com/embed/' + match[2];
|
|
3740
3927
|
} else {
|
|
3741
3928
|
return url;
|
|
3742
3929
|
}
|
|
3743
3930
|
}
|
|
3931
|
+
|
|
3744
3932
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !isLoaded && /*#__PURE__*/React.createElement("div", {
|
|
3745
3933
|
className: classes.imgContainer
|
|
3746
|
-
},
|
|
3934
|
+
}, /*#__PURE__*/React.createElement(NextImageRenderer, {
|
|
3935
|
+
src: imageUrl
|
|
3936
|
+
}), isEnabled ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(React.Fragment, null, props.onlyThumbnail ? null : /*#__PURE__*/React.createElement(Icon, {
|
|
3747
3937
|
name: "Video Play",
|
|
3748
3938
|
color: theme.palette.font.invertedDefault,
|
|
3939
|
+
className: classes?.icon,
|
|
3749
3940
|
onClick: () => {
|
|
3750
3941
|
setIsEnableed(true);
|
|
3751
3942
|
}
|
|
@@ -4583,8 +4774,8 @@ const usePhotoGalleryStyles = createUseStyles(theme => {
|
|
|
4583
4774
|
width: 'calc(100% - 2px)',
|
|
4584
4775
|
position: 'relative',
|
|
4585
4776
|
paddingBottom: '59.83%' // keeping aspect ratio 585x350
|
|
4586
|
-
},
|
|
4587
4777
|
|
|
4778
|
+
},
|
|
4588
4779
|
contentRow: {
|
|
4589
4780
|
display: 'grid',
|
|
4590
4781
|
gridTemplateColumns: ({
|
|
@@ -4666,11 +4857,10 @@ function PhotoGallery({
|
|
|
4666
4857
|
key: idx
|
|
4667
4858
|
}, /*#__PURE__*/React.createElement("div", {
|
|
4668
4859
|
className: classes.singleCard
|
|
4669
|
-
}, /*#__PURE__*/React.createElement(
|
|
4670
|
-
ref: el?.cardImage?.refSetter,
|
|
4671
|
-
className: classes?.carouselImage,
|
|
4860
|
+
}, /*#__PURE__*/React.createElement(NextImageRenderer, {
|
|
4672
4861
|
src: el?.cardImage?.metadata?.value,
|
|
4673
|
-
|
|
4862
|
+
ref: el?.cardImage?.refSetter,
|
|
4863
|
+
className: classes?.carouselImage
|
|
4674
4864
|
})));
|
|
4675
4865
|
});
|
|
4676
4866
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -4843,6 +5033,7 @@ const FAQListing = ({
|
|
|
4843
5033
|
isSelected: selectedIndex === index
|
|
4844
5034
|
})))));
|
|
4845
5035
|
};
|
|
5036
|
+
|
|
4846
5037
|
const Accordion = ({
|
|
4847
5038
|
item,
|
|
4848
5039
|
isSelected,
|
|
@@ -5116,9 +5307,11 @@ const useCourseStyles = createUseStyles(theme => {
|
|
|
5116
5307
|
courseCardImg: {
|
|
5117
5308
|
width: '100%',
|
|
5118
5309
|
height: '200px',
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5310
|
+
position: 'relative',
|
|
5311
|
+
borderTopLeftRadius: theme?.shape?.borderRadius?.regular,
|
|
5312
|
+
borderTopRightRadius: theme?.shape?.borderRadius?.regular
|
|
5313
|
+
},
|
|
5314
|
+
courseCardImgThumbnail: {
|
|
5122
5315
|
borderTopLeftRadius: theme?.shape?.borderRadius?.regular,
|
|
5123
5316
|
borderTopRightRadius: theme?.shape?.borderRadius?.regular
|
|
5124
5317
|
},
|
|
@@ -5127,10 +5320,9 @@ const useCourseStyles = createUseStyles(theme => {
|
|
|
5127
5320
|
flexGrow: 1,
|
|
5128
5321
|
display: 'flex',
|
|
5129
5322
|
flexDirection: 'column',
|
|
5130
|
-
justifyContent: 'space-between'
|
|
5131
|
-
//alignItems: 'center',
|
|
5132
|
-
},
|
|
5323
|
+
justifyContent: 'space-between' //alignItems: 'center',
|
|
5133
5324
|
|
|
5325
|
+
},
|
|
5134
5326
|
courseCardTags: {
|
|
5135
5327
|
display: 'flex',
|
|
5136
5328
|
justifyContent: 'flex-start',
|
|
@@ -5156,12 +5348,11 @@ const useCourseStyles = createUseStyles(theme => {
|
|
|
5156
5348
|
wordBreak: 'break-word',
|
|
5157
5349
|
padding: '12px 0px',
|
|
5158
5350
|
textAlign: 'left',
|
|
5159
|
-
display: 'inline-block'
|
|
5160
|
-
// overflow: 'hidden',
|
|
5351
|
+
display: 'inline-block' // overflow: 'hidden',
|
|
5161
5352
|
// whiteSpace: 'nowrap',
|
|
5162
5353
|
// textOverflow: 'ellipsis'
|
|
5163
|
-
},
|
|
5164
5354
|
|
|
5355
|
+
},
|
|
5165
5356
|
courseCardDiscount: {
|
|
5166
5357
|
display: 'flex',
|
|
5167
5358
|
justifyContent: 'flex-start',
|
|
@@ -5243,8 +5434,7 @@ const useCourseStyles = createUseStyles(theme => {
|
|
|
5243
5434
|
}
|
|
5244
5435
|
},
|
|
5245
5436
|
'@media (max-width: 768px)': {
|
|
5246
|
-
coursesContainer: {
|
|
5247
|
-
//background: theme?.palette?.background?.primary
|
|
5437
|
+
coursesContainer: {//background: theme?.palette?.background?.primary
|
|
5248
5438
|
},
|
|
5249
5439
|
coursesCardAndText: {
|
|
5250
5440
|
padding: '70px 30px'
|
|
@@ -5276,6 +5466,7 @@ async function getCourseList(baseURLs, hashToken) {
|
|
|
5276
5466
|
if (!hashToken) {
|
|
5277
5467
|
throw 'Missing hash token';
|
|
5278
5468
|
}
|
|
5469
|
+
|
|
5279
5470
|
const res = await axios({
|
|
5280
5471
|
method: 'get',
|
|
5281
5472
|
baseURL: baseURLs?.API_COURSE_URL,
|
|
@@ -5287,6 +5478,7 @@ async function getCourseList(baseURLs, hashToken) {
|
|
|
5287
5478
|
requiredFilters: '[10]'
|
|
5288
5479
|
}
|
|
5289
5480
|
});
|
|
5481
|
+
|
|
5290
5482
|
if (res) {
|
|
5291
5483
|
return res.data;
|
|
5292
5484
|
}
|
|
@@ -5298,6 +5490,7 @@ function getShortenedSubstring(name, length, allowDots = true) {
|
|
|
5298
5490
|
if (name) {
|
|
5299
5491
|
return name.length < length ? name : `${name.substr(0, length)}${allowDots && '...'}`;
|
|
5300
5492
|
}
|
|
5493
|
+
|
|
5301
5494
|
return '';
|
|
5302
5495
|
}
|
|
5303
5496
|
|
|
@@ -5313,13 +5506,11 @@ function CourseCard({
|
|
|
5313
5506
|
return /*#__PURE__*/React.createElement("div", {
|
|
5314
5507
|
className: classes.singleCard
|
|
5315
5508
|
}, /*#__PURE__*/React.createElement("div", {
|
|
5316
|
-
style: card?.imageUrl ? {
|
|
5317
|
-
backgroundImage: `url("${card?.imageUrl}")`
|
|
5318
|
-
} : {
|
|
5319
|
-
backgroundImage: `url("${defaultCardImg}")`
|
|
5320
|
-
},
|
|
5321
5509
|
className: classes.courseCardImg
|
|
5322
|
-
}
|
|
5510
|
+
}, /*#__PURE__*/React.createElement(NextImageRenderer, {
|
|
5511
|
+
src: card?.imageUrl ? card?.imageUrl : defaultCardImg,
|
|
5512
|
+
className: classes.courseCardImgThumbnail
|
|
5513
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
5323
5514
|
className: classes.courseCardData
|
|
5324
5515
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
5325
5516
|
className: classes.courseCardTags
|
|
@@ -5346,9 +5537,9 @@ function CourseCard({
|
|
|
5346
5537
|
className: classes.courseCardPriceContainer
|
|
5347
5538
|
}, /*#__PURE__*/React.createElement("div", {
|
|
5348
5539
|
className: classes.courseCardPrice
|
|
5349
|
-
}, '₹', card?.finalPrice),
|
|
5540
|
+
}, '₹', card?.finalPrice), /*#__PURE__*/React.createElement("div", {
|
|
5350
5541
|
className: classes.courseCardStrikePrice
|
|
5351
|
-
}, /*#__PURE__*/React.createElement("span", null, '₹', card?.price), ' ', discount > 0 && discount + '% OFF')
|
|
5542
|
+
}, /*#__PURE__*/React.createElement("span", null, '₹', card?.price), ' ', discount > 0 && discount + '% OFF')), /*#__PURE__*/React.createElement("a", {
|
|
5352
5543
|
className: classes.coursesAnchorTag,
|
|
5353
5544
|
href: isEdit ? null : card?.shareableLink
|
|
5354
5545
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -5377,11 +5568,13 @@ function courses({
|
|
|
5377
5568
|
containerWidth
|
|
5378
5569
|
});
|
|
5379
5570
|
const [nodeData] = sectionData?.components;
|
|
5571
|
+
|
|
5380
5572
|
const handleApiCall = () => {
|
|
5381
5573
|
if (baseURLs) {
|
|
5382
5574
|
getCourseList(baseURLs, hashToken).then(response => {
|
|
5383
5575
|
const placeholders = nodeData?.cardCarousel?.metadata?.placeholders;
|
|
5384
5576
|
const coursesData = response?.data?.coursesData;
|
|
5577
|
+
|
|
5385
5578
|
if (coursesData && coursesData.length) {
|
|
5386
5579
|
setCardList(response?.data?.coursesData);
|
|
5387
5580
|
setShowShimmer(false);
|
|
@@ -5392,12 +5585,12 @@ function courses({
|
|
|
5392
5585
|
setShowShimmer(false);
|
|
5393
5586
|
setFallbackImages(placeholders);
|
|
5394
5587
|
}
|
|
5395
|
-
}
|
|
5396
|
-
// For User Website & Draft Preview: If no data found, hide section.
|
|
5588
|
+
} // For User Website & Draft Preview: If no data found, hide section.
|
|
5397
5589
|
else setErrored(true);
|
|
5398
5590
|
}
|
|
5399
5591
|
}).catch(err => {
|
|
5400
5592
|
const errMsg = err?.response?.data?.data?.message;
|
|
5593
|
+
|
|
5401
5594
|
if (errMsg === 'NOT_FOUND') {
|
|
5402
5595
|
if (nodeData?.cardCarousel?.metadata?.placeholders?.length && isEdit) {
|
|
5403
5596
|
setShowShimmer(false);
|
|
@@ -5409,16 +5602,16 @@ function courses({
|
|
|
5409
5602
|
});
|
|
5410
5603
|
}
|
|
5411
5604
|
};
|
|
5605
|
+
|
|
5412
5606
|
useEffect(() => {
|
|
5413
|
-
const placeholders = nodeData?.cardCarousel?.metadata?.placeholders;
|
|
5414
|
-
|
|
5607
|
+
const placeholders = nodeData?.cardCarousel?.metadata?.placeholders; // For Master template Preview: Show placeholder images. If placeholder doesn't come from backend, show shimmer.
|
|
5608
|
+
|
|
5415
5609
|
if (isMasterTemplate) {
|
|
5416
5610
|
if (placeholders && placeholders.length) {
|
|
5417
5611
|
setShowShimmer(false);
|
|
5418
5612
|
setFallbackImages(placeholders);
|
|
5419
5613
|
}
|
|
5420
|
-
}
|
|
5421
|
-
// other
|
|
5614
|
+
} // other
|
|
5422
5615
|
else {
|
|
5423
5616
|
handleApiCall();
|
|
5424
5617
|
}
|
|
@@ -5483,6 +5676,7 @@ function courses({
|
|
|
5483
5676
|
});
|
|
5484
5677
|
})))));
|
|
5485
5678
|
}
|
|
5679
|
+
|
|
5486
5680
|
function SimpleCardsContainer({
|
|
5487
5681
|
children,
|
|
5488
5682
|
classes
|
|
@@ -5636,7 +5830,7 @@ const SingleSlide = ({
|
|
|
5636
5830
|
className: classes.singleSlideContainer
|
|
5637
5831
|
}, /*#__PURE__*/React.createElement("div", {
|
|
5638
5832
|
className: classes.imageContainer
|
|
5639
|
-
}, /*#__PURE__*/React.createElement(
|
|
5833
|
+
}, /*#__PURE__*/React.createElement(NextImageRenderer, {
|
|
5640
5834
|
ref: data?.image?.refSetter,
|
|
5641
5835
|
className: classes.image,
|
|
5642
5836
|
alt: "Hero Image",
|
|
@@ -5778,7 +5972,7 @@ const useSectionStyles$1 = createUseStyles(theme => ({
|
|
|
5778
5972
|
marginTop: '32px'
|
|
5779
5973
|
},
|
|
5780
5974
|
leftContainer: {
|
|
5781
|
-
width: '
|
|
5975
|
+
width: '50%'
|
|
5782
5976
|
},
|
|
5783
5977
|
subtitle: {
|
|
5784
5978
|
margin: '0 0 40px 0',
|
|
@@ -5898,6 +6092,7 @@ function FormEnquiry({
|
|
|
5898
6092
|
setBtnDisabled(true);
|
|
5899
6093
|
}
|
|
5900
6094
|
}, [validData]);
|
|
6095
|
+
|
|
5901
6096
|
const handleSubmit = () => {
|
|
5902
6097
|
let data = {
|
|
5903
6098
|
sectionId: sectionData?._id || null,
|
|
@@ -5908,22 +6103,23 @@ function FormEnquiry({
|
|
|
5908
6103
|
setBtnDisabled(true);
|
|
5909
6104
|
setInputVal(formInitialValue);
|
|
5910
6105
|
};
|
|
6106
|
+
|
|
5911
6107
|
const checkValidity = (regexField, fieldname, fieldValidity) => {
|
|
5912
6108
|
if (validations?.[regexField]?.length) {
|
|
5913
6109
|
let regex = new RegExp(validations[regexField]);
|
|
6110
|
+
|
|
5914
6111
|
if (regex?.test(inputVal[fieldname])) {
|
|
5915
|
-
setValidData({
|
|
5916
|
-
...validData,
|
|
6112
|
+
setValidData({ ...validData,
|
|
5917
6113
|
[fieldValidity]: 1
|
|
5918
6114
|
});
|
|
5919
6115
|
} else {
|
|
5920
|
-
setValidData({
|
|
5921
|
-
...validData,
|
|
6116
|
+
setValidData({ ...validData,
|
|
5922
6117
|
[fieldValidity]: 0
|
|
5923
6118
|
});
|
|
5924
6119
|
}
|
|
5925
6120
|
}
|
|
5926
6121
|
};
|
|
6122
|
+
|
|
5927
6123
|
return /*#__PURE__*/React.createElement("section", {
|
|
5928
6124
|
className: classes.section
|
|
5929
6125
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -6003,8 +6199,7 @@ function FormEnquiry({
|
|
|
6003
6199
|
isValid: validData.nameValid,
|
|
6004
6200
|
inputType: 'input',
|
|
6005
6201
|
onChange: e => {
|
|
6006
|
-
setInputVal({
|
|
6007
|
-
...inputVal,
|
|
6202
|
+
setInputVal({ ...inputVal,
|
|
6008
6203
|
name: e.target.value
|
|
6009
6204
|
});
|
|
6010
6205
|
},
|
|
@@ -6012,8 +6207,7 @@ function FormEnquiry({
|
|
|
6012
6207
|
checkValidity(nodeData?.nameField?.metadata?.validationType, 'name', 'nameValid');
|
|
6013
6208
|
},
|
|
6014
6209
|
onFocus: () => {
|
|
6015
|
-
setValidData({
|
|
6016
|
-
...validData,
|
|
6210
|
+
setValidData({ ...validData,
|
|
6017
6211
|
nameValid: 1
|
|
6018
6212
|
});
|
|
6019
6213
|
}
|
|
@@ -6025,8 +6219,7 @@ function FormEnquiry({
|
|
|
6025
6219
|
isValid: validData.phoneValid,
|
|
6026
6220
|
inputType: 'input',
|
|
6027
6221
|
onChange: e => {
|
|
6028
|
-
setInputVal({
|
|
6029
|
-
...inputVal,
|
|
6222
|
+
setInputVal({ ...inputVal,
|
|
6030
6223
|
phone: e.target.value
|
|
6031
6224
|
});
|
|
6032
6225
|
},
|
|
@@ -6034,8 +6227,7 @@ function FormEnquiry({
|
|
|
6034
6227
|
checkValidity(nodeData?.phoneField?.metadata?.validationType, 'phone', 'phoneValid');
|
|
6035
6228
|
},
|
|
6036
6229
|
onFocus: () => {
|
|
6037
|
-
setValidData({
|
|
6038
|
-
...validData,
|
|
6230
|
+
setValidData({ ...validData,
|
|
6039
6231
|
phoneValid: 1
|
|
6040
6232
|
});
|
|
6041
6233
|
}
|
|
@@ -6047,8 +6239,7 @@ function FormEnquiry({
|
|
|
6047
6239
|
isValid: validData.emailValid,
|
|
6048
6240
|
inputType: 'input',
|
|
6049
6241
|
onChange: e => {
|
|
6050
|
-
setInputVal({
|
|
6051
|
-
...inputVal,
|
|
6242
|
+
setInputVal({ ...inputVal,
|
|
6052
6243
|
email: e.target.value
|
|
6053
6244
|
});
|
|
6054
6245
|
},
|
|
@@ -6056,8 +6247,7 @@ function FormEnquiry({
|
|
|
6056
6247
|
checkValidity(nodeData?.emailField?.metadata?.validationType, 'email', 'emailValid');
|
|
6057
6248
|
},
|
|
6058
6249
|
onFocus: () => {
|
|
6059
|
-
setValidData({
|
|
6060
|
-
...validData,
|
|
6250
|
+
setValidData({ ...validData,
|
|
6061
6251
|
emailValid: 1
|
|
6062
6252
|
});
|
|
6063
6253
|
}
|
|
@@ -6069,8 +6259,7 @@ function FormEnquiry({
|
|
|
6069
6259
|
isValid: validData.messageValid,
|
|
6070
6260
|
inputType: 'textarea',
|
|
6071
6261
|
onChange: e => {
|
|
6072
|
-
setInputVal({
|
|
6073
|
-
...inputVal,
|
|
6262
|
+
setInputVal({ ...inputVal,
|
|
6074
6263
|
message: e.target.value
|
|
6075
6264
|
});
|
|
6076
6265
|
},
|
|
@@ -6078,12 +6267,11 @@ function FormEnquiry({
|
|
|
6078
6267
|
checkValidity(nodeData?.messageField?.metadata?.validationType, 'message', 'messageValid');
|
|
6079
6268
|
},
|
|
6080
6269
|
onFocus: () => {
|
|
6081
|
-
setValidData({
|
|
6082
|
-
...validData,
|
|
6270
|
+
setValidData({ ...validData,
|
|
6083
6271
|
messageValid: 1
|
|
6084
6272
|
});
|
|
6085
6273
|
}
|
|
6086
|
-
})),
|
|
6274
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
6087
6275
|
ref: nodeData?.cta?.refSetter,
|
|
6088
6276
|
data: btnDisabled && validData?.messageValid && validData?.emailValid && validData?.nameValid && validData?.phoneValid ? {
|
|
6089
6277
|
value: 'Submitted'
|
|
@@ -6123,6 +6311,7 @@ const useSectionStyles = createUseStyles(theme => ({
|
|
|
6123
6311
|
}
|
|
6124
6312
|
},
|
|
6125
6313
|
contactContainer: {
|
|
6314
|
+
width: '80%',
|
|
6126
6315
|
margin: '0 auto',
|
|
6127
6316
|
maxWidth: ({
|
|
6128
6317
|
containerWidth
|
|
@@ -6173,10 +6362,15 @@ const useSectionStyles = createUseStyles(theme => ({
|
|
|
6173
6362
|
display: 'flex',
|
|
6174
6363
|
alignItems: 'flex-start',
|
|
6175
6364
|
flexDirection: 'column',
|
|
6176
|
-
width: '
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6365
|
+
width: '85%',
|
|
6366
|
+
position: 'relative',
|
|
6367
|
+
paddingBottom: '55%' // '& img': {
|
|
6368
|
+
// width: '80%'
|
|
6369
|
+
// }
|
|
6370
|
+
|
|
6371
|
+
},
|
|
6372
|
+
telephoneImage: {
|
|
6373
|
+
width: '80%'
|
|
6180
6374
|
},
|
|
6181
6375
|
rightContainer: {
|
|
6182
6376
|
width: '50%',
|
|
@@ -6275,6 +6469,9 @@ const useSectionStyles = createUseStyles(theme => ({
|
|
|
6275
6469
|
},
|
|
6276
6470
|
error: {
|
|
6277
6471
|
bottom: '-2px'
|
|
6472
|
+
},
|
|
6473
|
+
contactContainer: {
|
|
6474
|
+
width: '97%'
|
|
6278
6475
|
}
|
|
6279
6476
|
}
|
|
6280
6477
|
}));
|
|
@@ -6310,6 +6507,7 @@ function Contact({
|
|
|
6310
6507
|
phoneValid: 1,
|
|
6311
6508
|
messageValid: 1
|
|
6312
6509
|
});
|
|
6510
|
+
|
|
6313
6511
|
const handleSubmit = () => {
|
|
6314
6512
|
const data = {
|
|
6315
6513
|
sectionId: sectionData?._id || null,
|
|
@@ -6320,6 +6518,7 @@ function Contact({
|
|
|
6320
6518
|
setBtnDisabled(true);
|
|
6321
6519
|
setInputVal(formInitialValue);
|
|
6322
6520
|
};
|
|
6521
|
+
|
|
6323
6522
|
useEffect(() => {
|
|
6324
6523
|
if (validData?.nameValid && validData?.emailValid && validData?.phoneValid && validData?.messageValid) {
|
|
6325
6524
|
setBtnDisabled(false);
|
|
@@ -6327,22 +6526,23 @@ function Contact({
|
|
|
6327
6526
|
setBtnDisabled(true);
|
|
6328
6527
|
}
|
|
6329
6528
|
}, [validData]);
|
|
6529
|
+
|
|
6330
6530
|
const checkValidity = (regexField, fieldname, fieldValidity) => {
|
|
6331
6531
|
if (validations?.[regexField]?.length) {
|
|
6332
6532
|
let regex = new RegExp(validations[regexField]);
|
|
6533
|
+
|
|
6333
6534
|
if (regex?.test(inputVal[fieldname])) {
|
|
6334
|
-
setValidData({
|
|
6335
|
-
...validData,
|
|
6535
|
+
setValidData({ ...validData,
|
|
6336
6536
|
[fieldValidity]: 1
|
|
6337
6537
|
});
|
|
6338
6538
|
} else {
|
|
6339
|
-
setValidData({
|
|
6340
|
-
...validData,
|
|
6539
|
+
setValidData({ ...validData,
|
|
6341
6540
|
[fieldValidity]: 0
|
|
6342
6541
|
});
|
|
6343
6542
|
}
|
|
6344
6543
|
}
|
|
6345
6544
|
};
|
|
6545
|
+
|
|
6346
6546
|
return /*#__PURE__*/React.createElement("section", {
|
|
6347
6547
|
className: classes.section
|
|
6348
6548
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -6370,10 +6570,10 @@ function Contact({
|
|
|
6370
6570
|
}
|
|
6371
6571
|
}), /*#__PURE__*/React.createElement("div", {
|
|
6372
6572
|
className: classes.addressContainer
|
|
6373
|
-
}, /*#__PURE__*/React.createElement(
|
|
6573
|
+
}, /*#__PURE__*/React.createElement(NextImageRenderer, {
|
|
6574
|
+
className: classes?.telephoneImage,
|
|
6374
6575
|
ref: nodeData?.image?.refSetter,
|
|
6375
|
-
src: nodeData?.image?.metadata?.value
|
|
6376
|
-
alt: ""
|
|
6576
|
+
src: nodeData?.image?.metadata?.value
|
|
6377
6577
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
6378
6578
|
className: classes.rightContainer
|
|
6379
6579
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -6384,8 +6584,7 @@ function Contact({
|
|
|
6384
6584
|
isValid: validData.nameValid,
|
|
6385
6585
|
inputType: 'input',
|
|
6386
6586
|
onChange: e => {
|
|
6387
|
-
setInputVal({
|
|
6388
|
-
...inputVal,
|
|
6587
|
+
setInputVal({ ...inputVal,
|
|
6389
6588
|
name: e.target.value
|
|
6390
6589
|
});
|
|
6391
6590
|
},
|
|
@@ -6393,8 +6592,7 @@ function Contact({
|
|
|
6393
6592
|
checkValidity(nodeData?.nameField?.metadata?.validationType, 'name', 'nameValid');
|
|
6394
6593
|
},
|
|
6395
6594
|
onFocus: () => {
|
|
6396
|
-
setValidData({
|
|
6397
|
-
...validData,
|
|
6595
|
+
setValidData({ ...validData,
|
|
6398
6596
|
nameValid: 1
|
|
6399
6597
|
});
|
|
6400
6598
|
}
|
|
@@ -6406,8 +6604,7 @@ function Contact({
|
|
|
6406
6604
|
isValid: validData.phoneValid,
|
|
6407
6605
|
inputType: 'input',
|
|
6408
6606
|
onChange: e => {
|
|
6409
|
-
setInputVal({
|
|
6410
|
-
...inputVal,
|
|
6607
|
+
setInputVal({ ...inputVal,
|
|
6411
6608
|
phone: e.target.value
|
|
6412
6609
|
});
|
|
6413
6610
|
},
|
|
@@ -6415,8 +6612,7 @@ function Contact({
|
|
|
6415
6612
|
checkValidity(nodeData?.phoneField?.metadata?.validationType, 'phone', 'phoneValid');
|
|
6416
6613
|
},
|
|
6417
6614
|
onFocus: () => {
|
|
6418
|
-
setValidData({
|
|
6419
|
-
...validData,
|
|
6615
|
+
setValidData({ ...validData,
|
|
6420
6616
|
phoneValid: 1
|
|
6421
6617
|
});
|
|
6422
6618
|
}
|
|
@@ -6428,8 +6624,7 @@ function Contact({
|
|
|
6428
6624
|
isValid: validData.emailValid,
|
|
6429
6625
|
inputType: 'input',
|
|
6430
6626
|
onChange: e => {
|
|
6431
|
-
setInputVal({
|
|
6432
|
-
...inputVal,
|
|
6627
|
+
setInputVal({ ...inputVal,
|
|
6433
6628
|
email: e.target.value
|
|
6434
6629
|
});
|
|
6435
6630
|
},
|
|
@@ -6437,8 +6632,7 @@ function Contact({
|
|
|
6437
6632
|
checkValidity(nodeData?.emailField?.metadata?.validationType, 'email', 'emailValid');
|
|
6438
6633
|
},
|
|
6439
6634
|
onFocus: () => {
|
|
6440
|
-
setValidData({
|
|
6441
|
-
...validData,
|
|
6635
|
+
setValidData({ ...validData,
|
|
6442
6636
|
emailValid: 1
|
|
6443
6637
|
});
|
|
6444
6638
|
}
|
|
@@ -6450,8 +6644,7 @@ function Contact({
|
|
|
6450
6644
|
isValid: validData.messageValid,
|
|
6451
6645
|
inputType: 'textarea',
|
|
6452
6646
|
onChange: e => {
|
|
6453
|
-
setInputVal({
|
|
6454
|
-
...inputVal,
|
|
6647
|
+
setInputVal({ ...inputVal,
|
|
6455
6648
|
message: e.target.value
|
|
6456
6649
|
});
|
|
6457
6650
|
},
|
|
@@ -6459,12 +6652,11 @@ function Contact({
|
|
|
6459
6652
|
checkValidity(nodeData?.messageField?.metadata?.validationType, 'message', 'messageValid');
|
|
6460
6653
|
},
|
|
6461
6654
|
onFocus: () => {
|
|
6462
|
-
setValidData({
|
|
6463
|
-
...validData,
|
|
6655
|
+
setValidData({ ...validData,
|
|
6464
6656
|
messageValid: 1
|
|
6465
6657
|
});
|
|
6466
6658
|
}
|
|
6467
|
-
})),
|
|
6659
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
6468
6660
|
ref: nodeData?.cta?.refSetter,
|
|
6469
6661
|
data: btnDisabled && validData?.messageValid && validData?.emailValid && validData?.nameValid && validData?.phoneValid ? {
|
|
6470
6662
|
value: 'Submitted'
|
|
@@ -6604,11 +6796,10 @@ const useWebinarPromotionPage = createUseStyles(theme => {
|
|
|
6604
6796
|
},
|
|
6605
6797
|
courseViewContainer: {
|
|
6606
6798
|
width: '645px',
|
|
6607
|
-
height: 'fit-content',
|
|
6608
6799
|
backgroundColor: '#f4f9ff',
|
|
6609
6800
|
display: 'flex',
|
|
6610
6801
|
flexDirection: 'column',
|
|
6611
|
-
justifyContent: '
|
|
6802
|
+
justifyContent: 'center',
|
|
6612
6803
|
paddingTop: '20px',
|
|
6613
6804
|
borderRadius: '10px'
|
|
6614
6805
|
},
|
|
@@ -6656,10 +6847,10 @@ const useWebinarPromotionPage = createUseStyles(theme => {
|
|
|
6656
6847
|
courseDetailContent: {
|
|
6657
6848
|
marginTop: '16px',
|
|
6658
6849
|
fontSize: '16px',
|
|
6850
|
+
lineHeight: '24px',
|
|
6659
6851
|
wordBreak: 'break-word',
|
|
6660
6852
|
color: theme.palette.font.primary,
|
|
6661
|
-
margin: '10px 0 20px'
|
|
6662
|
-
whiteSpace: 'pre-wrap'
|
|
6853
|
+
margin: '10px 0 20px'
|
|
6663
6854
|
},
|
|
6664
6855
|
courseDetailViewFullDetails: {
|
|
6665
6856
|
cursor: 'pointer',
|
|
@@ -6722,8 +6913,7 @@ const useWebinarPromotionPage = createUseStyles(theme => {
|
|
|
6722
6913
|
const SingleVideoSlide$1 = props => {
|
|
6723
6914
|
const [isReadMore, setIsReadMore] = useState(false);
|
|
6724
6915
|
const theme = useTheme();
|
|
6725
|
-
useEffect(() => {
|
|
6726
|
-
// remaining days epoch
|
|
6916
|
+
useEffect(() => {// remaining days epoch
|
|
6727
6917
|
// current date epoch
|
|
6728
6918
|
// subtract remaining days from current day epoch
|
|
6729
6919
|
// moment the result - and see if there are days
|
|
@@ -6735,6 +6925,7 @@ const SingleVideoSlide$1 = props => {
|
|
|
6735
6925
|
webinarCtaClick,
|
|
6736
6926
|
conversions = 0
|
|
6737
6927
|
} = props;
|
|
6928
|
+
|
|
6738
6929
|
const renderer = ({
|
|
6739
6930
|
days,
|
|
6740
6931
|
hours,
|
|
@@ -6750,7 +6941,9 @@ const SingleVideoSlide$1 = props => {
|
|
|
6750
6941
|
return /*#__PURE__*/React.createElement("span", null, Math.floor(moment.duration(given.diff(current)).asDays()), " day(s)");
|
|
6751
6942
|
}
|
|
6752
6943
|
};
|
|
6944
|
+
|
|
6753
6945
|
const checkIfOfferIsValid = () => moment().diff(moment(props.data.offerPriceEndDate)) < 0;
|
|
6946
|
+
|
|
6754
6947
|
const checkForShowDiscount = () => {
|
|
6755
6948
|
if (props.data.endDate === null || checkIfOfferIsValid()) {
|
|
6756
6949
|
if (data.discount > 0 && data.offerPriceValidFor === 0) {
|
|
@@ -6762,16 +6955,19 @@ const SingleVideoSlide$1 = props => {
|
|
|
6762
6955
|
if (data.offerPriceValidFor <= conversions) {
|
|
6763
6956
|
return false;
|
|
6764
6957
|
}
|
|
6958
|
+
|
|
6765
6959
|
if (data.offerPriceValidFor - conversions < 0) {
|
|
6766
6960
|
return false;
|
|
6767
6961
|
} else {
|
|
6768
6962
|
return true;
|
|
6769
6963
|
}
|
|
6770
6964
|
}
|
|
6965
|
+
|
|
6771
6966
|
if (data.discount > 0) {
|
|
6772
6967
|
return true;
|
|
6773
6968
|
}
|
|
6774
6969
|
};
|
|
6970
|
+
|
|
6775
6971
|
const discount = ({
|
|
6776
6972
|
price,
|
|
6777
6973
|
discount
|
|
@@ -6779,6 +6975,7 @@ const SingleVideoSlide$1 = props => {
|
|
|
6779
6975
|
console.log('discountxx', props.data.price, props.data.discount);
|
|
6780
6976
|
return (discount / price * 100).toFixed(2);
|
|
6781
6977
|
};
|
|
6978
|
+
|
|
6782
6979
|
const classes = useWebinarPromotionPage();
|
|
6783
6980
|
return /*#__PURE__*/React.createElement("div", {
|
|
6784
6981
|
className: classes.videoCarouselContainer
|
|
@@ -6874,10 +7071,9 @@ const SingleVideoSlide$1 = props => {
|
|
|
6874
7071
|
data: {
|
|
6875
7072
|
// link: 'headerData?.loginCtaLink',
|
|
6876
7073
|
// isLink: 1,
|
|
6877
|
-
value: data.isPaid ? 'BUY NOW' : 'REGISTER NOW'
|
|
6878
|
-
// isExternal: 1
|
|
6879
|
-
},
|
|
7074
|
+
value: data.isPaid ? 'BUY NOW' : 'REGISTER NOW' // isExternal: 1
|
|
6880
7075
|
|
|
7076
|
+
},
|
|
6881
7077
|
onClick: webinarCtaClick,
|
|
6882
7078
|
type: 'primary',
|
|
6883
7079
|
size: 'medium',
|
|
@@ -7211,14 +7407,14 @@ const SingleVideoSlide = props => {
|
|
|
7211
7407
|
isEdit
|
|
7212
7408
|
} = useContext(PageContext);
|
|
7213
7409
|
console.log(isEdit, 'isEdit');
|
|
7214
|
-
useEffect(() => {
|
|
7215
|
-
// remaining days epoch
|
|
7410
|
+
useEffect(() => {// remaining days epoch
|
|
7216
7411
|
// current date epoch
|
|
7217
7412
|
// subtract remaining days from current day epoch
|
|
7218
7413
|
// moment the result - and see if there are days
|
|
7219
7414
|
// days is present show days
|
|
7220
7415
|
// else start reverse timer
|
|
7221
7416
|
}, []);
|
|
7417
|
+
|
|
7222
7418
|
const renderer = ({
|
|
7223
7419
|
days,
|
|
7224
7420
|
hours,
|
|
@@ -7234,6 +7430,7 @@ const SingleVideoSlide = props => {
|
|
|
7234
7430
|
return /*#__PURE__*/React.createElement("span", null, Math.floor(moment.duration(given.diff(current)).asDays()), " day(s)");
|
|
7235
7431
|
}
|
|
7236
7432
|
};
|
|
7433
|
+
|
|
7237
7434
|
const {
|
|
7238
7435
|
data,
|
|
7239
7436
|
courseBuyNow,
|
|
@@ -7242,7 +7439,9 @@ const SingleVideoSlide = props => {
|
|
|
7242
7439
|
} = props;
|
|
7243
7440
|
const showCourseInstallmentData = data?.courseOverviewData;
|
|
7244
7441
|
const InstalmentData = isEdit ? data?.courseOverviewData?.installments?.formData?.installments[0].installmentAmount : data?.courseOverviewData?.installments?.formData?.installmentInfo?.installments[0].installmentPrice;
|
|
7442
|
+
|
|
7245
7443
|
const checkIfOfferIsValid = () => moment().diff(moment(props?.data?.endDate || 0)) < 0;
|
|
7444
|
+
|
|
7246
7445
|
const checkForShowDiscount = () => {
|
|
7247
7446
|
if (props.data.endDate === null || checkIfOfferIsValid()) {
|
|
7248
7447
|
if (data.discount > 0 && data.offerPriceValidFor === 0) {
|
|
@@ -7254,23 +7453,28 @@ const SingleVideoSlide = props => {
|
|
|
7254
7453
|
if (data.offerPriceValidFor <= conversions) {
|
|
7255
7454
|
return false;
|
|
7256
7455
|
}
|
|
7456
|
+
|
|
7257
7457
|
if (data.offerPriceValidFor - conversions < 0) {
|
|
7258
7458
|
return false;
|
|
7259
7459
|
} else {
|
|
7260
7460
|
return true;
|
|
7261
7461
|
}
|
|
7262
7462
|
}
|
|
7463
|
+
|
|
7263
7464
|
if (data.discount > 0) {
|
|
7264
7465
|
return true;
|
|
7265
7466
|
}
|
|
7266
7467
|
};
|
|
7468
|
+
|
|
7267
7469
|
const classes = useCoursePromotionPage();
|
|
7470
|
+
|
|
7268
7471
|
const discount = ({
|
|
7269
7472
|
price,
|
|
7270
7473
|
discount
|
|
7271
7474
|
}) => {
|
|
7272
7475
|
return (discount / price * 100).toFixed(2);
|
|
7273
7476
|
};
|
|
7477
|
+
|
|
7274
7478
|
return /*#__PURE__*/React.createElement("div", {
|
|
7275
7479
|
className: classes.videoCarouselContainer
|
|
7276
7480
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -7384,16 +7588,15 @@ const SingleVideoSlide = props => {
|
|
|
7384
7588
|
data: {
|
|
7385
7589
|
// link: 'headerData?.loginCtaLink',
|
|
7386
7590
|
// isLink: 1,
|
|
7387
|
-
value: 'BUY NOW'
|
|
7388
|
-
// isExternal: 1
|
|
7389
|
-
},
|
|
7591
|
+
value: 'BUY NOW' // isExternal: 1
|
|
7390
7592
|
|
|
7593
|
+
},
|
|
7391
7594
|
onClick: courseBuyNow,
|
|
7392
7595
|
type: 'primary',
|
|
7393
7596
|
size: 'medium',
|
|
7394
7597
|
target: null,
|
|
7395
|
-
rel: null
|
|
7396
|
-
|
|
7598
|
+
rel: null // styling={isMobile ? { margin: '0 40px' } : {}}
|
|
7599
|
+
|
|
7397
7600
|
})))), showCourseInstallmentData && InstalmentData && /*#__PURE__*/React.createElement("div", {
|
|
7398
7601
|
className: classes.payInstallmentContainer,
|
|
7399
7602
|
onClick: showCourseInstallment
|
|
@@ -7598,15 +7801,18 @@ const FormPage = ({
|
|
|
7598
7801
|
_id,
|
|
7599
7802
|
baseURLs
|
|
7600
7803
|
} = useContext(PageContext);
|
|
7804
|
+
|
|
7601
7805
|
const handleSubmit = async e => {
|
|
7602
7806
|
e.preventDefault();
|
|
7603
7807
|
let formResponse = [];
|
|
7808
|
+
|
|
7604
7809
|
for (const [key, value] of Object.entries(formData)) {
|
|
7605
7810
|
if (value.questionType === 'MC') {
|
|
7606
7811
|
if (value.solutionArray.length > 1) {
|
|
7607
7812
|
value.solutionArray.shift();
|
|
7608
7813
|
}
|
|
7609
7814
|
}
|
|
7815
|
+
|
|
7610
7816
|
formResponse.push({
|
|
7611
7817
|
questionId: key,
|
|
7612
7818
|
questionName: value.questionName,
|
|
@@ -7614,6 +7820,7 @@ const FormPage = ({
|
|
|
7614
7820
|
solutionArray: value.solutionArray
|
|
7615
7821
|
});
|
|
7616
7822
|
}
|
|
7823
|
+
|
|
7617
7824
|
const data = {
|
|
7618
7825
|
sectionId: sectionData?.components?.[0]?._id || null,
|
|
7619
7826
|
landingPageId: _id || null,
|
|
@@ -7623,6 +7830,7 @@ const FormPage = ({
|
|
|
7623
7830
|
setFormData({});
|
|
7624
7831
|
setformSubmitted(!formSubmitted);
|
|
7625
7832
|
};
|
|
7833
|
+
|
|
7626
7834
|
useEffect(() => {
|
|
7627
7835
|
//add all questions to formData
|
|
7628
7836
|
let formData = {};
|
|
@@ -7635,26 +7843,23 @@ const FormPage = ({
|
|
|
7635
7843
|
});
|
|
7636
7844
|
setFormData(formData);
|
|
7637
7845
|
}, [metadata, formSubmitted]);
|
|
7846
|
+
|
|
7638
7847
|
const handleOnClick = (e, item, option) => {
|
|
7639
7848
|
// if the checkbox is checked
|
|
7640
7849
|
if (!e.target.checked) {
|
|
7641
7850
|
// if the checkbox is checked and the solution array is empty
|
|
7642
7851
|
if (!formData[item._id]?.solutionArray?.length) {
|
|
7643
|
-
setFormData({
|
|
7644
|
-
...formData,
|
|
7852
|
+
setFormData({ ...formData,
|
|
7645
7853
|
[item._id]: {
|
|
7646
7854
|
questionName: item.text,
|
|
7647
7855
|
solutionArray: [option.value],
|
|
7648
7856
|
questionType: 'MC'
|
|
7649
7857
|
}
|
|
7650
7858
|
});
|
|
7651
|
-
}
|
|
7652
|
-
// if the checkbox is checked and the solution array is not empty and the value is already in the array remove it
|
|
7859
|
+
} // if the checkbox is checked and the solution array is not empty and the value is already in the array remove it
|
|
7653
7860
|
else if (formData[item._id]?.solutionArray?.includes(option.value)) {
|
|
7654
7861
|
// if only one value is in the array remove it
|
|
7655
|
-
|
|
7656
|
-
setFormData({
|
|
7657
|
-
...formData,
|
|
7862
|
+
setFormData({ ...formData,
|
|
7658
7863
|
[item._id]: {
|
|
7659
7864
|
questionName: item.text,
|
|
7660
7865
|
solutionArray: formData[item._id]?.solutionArray?.filter(item => item !== option.value),
|
|
@@ -7662,24 +7867,20 @@ const FormPage = ({
|
|
|
7662
7867
|
}
|
|
7663
7868
|
});
|
|
7664
7869
|
}
|
|
7665
|
-
}
|
|
7666
|
-
// if the checkbox is unchecked
|
|
7870
|
+
} // if the checkbox is unchecked
|
|
7667
7871
|
else {
|
|
7668
7872
|
// if the checkbox is unchecked and the solution array is empty
|
|
7669
7873
|
if (typeof formData[item._id]?.solutionArray?.length === 'undefined') {
|
|
7670
|
-
setFormData({
|
|
7671
|
-
...formData,
|
|
7874
|
+
setFormData({ ...formData,
|
|
7672
7875
|
[item._id]: {
|
|
7673
7876
|
questionName: item.text,
|
|
7674
7877
|
solutionArray: [option.value],
|
|
7675
7878
|
questionType: 'MC'
|
|
7676
7879
|
}
|
|
7677
7880
|
});
|
|
7678
|
-
}
|
|
7679
|
-
// if the checkbox is unchecked and the solution array is not empty and the value is not in the array add it
|
|
7881
|
+
} // if the checkbox is unchecked and the solution array is not empty and the value is not in the array add it
|
|
7680
7882
|
else if (!formData[item._id]?.solutionArray?.includes(option.value)) {
|
|
7681
|
-
setFormData({
|
|
7682
|
-
...formData,
|
|
7883
|
+
setFormData({ ...formData,
|
|
7683
7884
|
[item._id]: {
|
|
7684
7885
|
questionName: item.text,
|
|
7685
7886
|
solutionArray: [...formData[item._id]?.solutionArray, option.value],
|
|
@@ -7689,6 +7890,7 @@ const FormPage = ({
|
|
|
7689
7890
|
}
|
|
7690
7891
|
}
|
|
7691
7892
|
};
|
|
7893
|
+
|
|
7692
7894
|
return /*#__PURE__*/React.createElement("section", {
|
|
7693
7895
|
className: classes.formPageSection
|
|
7694
7896
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -7715,8 +7917,7 @@ const FormPage = ({
|
|
|
7715
7917
|
placeholder: "Short answer",
|
|
7716
7918
|
name: item._id,
|
|
7717
7919
|
onChange: e => {
|
|
7718
|
-
setFormData({
|
|
7719
|
-
...formData,
|
|
7920
|
+
setFormData({ ...formData,
|
|
7720
7921
|
[item._id]: {
|
|
7721
7922
|
index,
|
|
7722
7923
|
questionName: item.text,
|
|
@@ -7756,13 +7957,11 @@ const FormPage = ({
|
|
|
7756
7957
|
name: "text",
|
|
7757
7958
|
required: item.isRequired,
|
|
7758
7959
|
value: option.value,
|
|
7759
|
-
checked: formData[item._id]?.solutionArray?.[0] === option.value
|
|
7760
|
-
// name={option.value}
|
|
7960
|
+
checked: formData[item._id]?.solutionArray?.[0] === option.value // name={option.value}
|
|
7761
7961
|
// id={option.value}
|
|
7762
7962
|
,
|
|
7763
7963
|
onClick: e => {
|
|
7764
|
-
setFormData({
|
|
7765
|
-
...formData,
|
|
7964
|
+
setFormData({ ...formData,
|
|
7766
7965
|
[item._id]: {
|
|
7767
7966
|
questionName: item.text,
|
|
7768
7967
|
solutionArray: [option.value],
|
|
@@ -7778,10 +7977,9 @@ const FormPage = ({
|
|
|
7778
7977
|
data: {
|
|
7779
7978
|
// link: 'headerData?.loginCtaLink',
|
|
7780
7979
|
// isLink: 1,
|
|
7781
|
-
value: 'SUBMIT'
|
|
7782
|
-
// isExternal: 1
|
|
7783
|
-
},
|
|
7980
|
+
value: 'SUBMIT' // isExternal: 1
|
|
7784
7981
|
|
|
7982
|
+
},
|
|
7785
7983
|
type: 'primary',
|
|
7786
7984
|
size: 'medium',
|
|
7787
7985
|
target: null,
|
|
@@ -7875,6 +8073,7 @@ function Tiles({
|
|
|
7875
8073
|
const nodeData = sectionData.components;
|
|
7876
8074
|
console.log(nodeData);
|
|
7877
8075
|
const tilesList = nodeData[0]?.tilesList.components;
|
|
8076
|
+
|
|
7878
8077
|
const handleClick = value => {
|
|
7879
8078
|
if (!isEdit && value) {
|
|
7880
8079
|
if (value.indexOf('http://') == 0 || value.indexOf('https://') == 0) {
|
|
@@ -7884,6 +8083,7 @@ function Tiles({
|
|
|
7884
8083
|
}
|
|
7885
8084
|
}
|
|
7886
8085
|
};
|
|
8086
|
+
|
|
7887
8087
|
const TileDiv = tilesList?.map((tile, i) => {
|
|
7888
8088
|
return /*#__PURE__*/React.createElement(Fragment, {
|
|
7889
8089
|
key: i
|
|
@@ -7946,8 +8146,8 @@ const useEmailStyles = createUseStyles(theme => ({
|
|
|
7946
8146
|
width: 'auto',
|
|
7947
8147
|
height: '48px'
|
|
7948
8148
|
/* margin: 18px 0px; */
|
|
7949
|
-
},
|
|
7950
8149
|
|
|
8150
|
+
},
|
|
7951
8151
|
'p-young-guru-title': {
|
|
7952
8152
|
fontFamily: theme?.typography?.fontFamily,
|
|
7953
8153
|
fontStyle: 'normal',
|
|
@@ -7974,8 +8174,8 @@ const useEmailStyles = createUseStyles(theme => ({
|
|
|
7974
8174
|
fontSize: '0',
|
|
7975
8175
|
textAlign: 'center'
|
|
7976
8176
|
/* padding:35px 0 40px */
|
|
7977
|
-
},
|
|
7978
8177
|
|
|
8178
|
+
},
|
|
7979
8179
|
'two-columns .column': {
|
|
7980
8180
|
width: '100%',
|
|
7981
8181
|
maxWidth: '275px',
|
|
@@ -7991,10 +8191,9 @@ const useEmailStyles = createUseStyles(theme => ({
|
|
|
7991
8191
|
color: '#030a21',
|
|
7992
8192
|
marginBottom: '5px',
|
|
7993
8193
|
textAlign: 'left'
|
|
7994
|
-
}
|
|
7995
|
-
|
|
7996
|
-
// @media screen and (max-width: 600px) {
|
|
8194
|
+
} // @media screen and (max-width: 600px) {
|
|
7997
8195
|
// }
|
|
8196
|
+
|
|
7998
8197
|
}));
|
|
7999
8198
|
|
|
8000
8199
|
function Section({
|
|
@@ -8023,8 +8222,8 @@ function Section({
|
|
|
8023
8222
|
}, /*#__PURE__*/React.createElement("tbody", null, customHtmlData?.isCustomHtml ? /*#__PURE__*/React.createElement("div", {
|
|
8024
8223
|
className: classes.email_description_para,
|
|
8025
8224
|
dangerouslySetInnerHTML: {
|
|
8026
|
-
__html: `${customHtmlData?.html ? customHtmlData?.html : ''}`
|
|
8027
|
-
|
|
8225
|
+
__html: `${customHtmlData?.html ? customHtmlData?.html : ''}` // __html: '<div>sdnfksdnflksdnfklsndk</div>'
|
|
8226
|
+
|
|
8028
8227
|
}
|
|
8029
8228
|
}) : /*#__PURE__*/React.createElement(React.Fragment, null, header?.isActive ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("table", {
|
|
8030
8229
|
style: {
|
|
@@ -8057,8 +8256,7 @@ function Section({
|
|
|
8057
8256
|
textAlign: 'center'
|
|
8058
8257
|
}
|
|
8059
8258
|
}, header?.components[1]?.metadata?.image?.length ? /*#__PURE__*/React.createElement("img", {
|
|
8060
|
-
src: header?.components[1]?.metadata?.image
|
|
8061
|
-
// width={600}
|
|
8259
|
+
src: header?.components[1]?.metadata?.image // width={600}
|
|
8062
8260
|
,
|
|
8063
8261
|
alt: "",
|
|
8064
8262
|
style: {
|
|
@@ -8344,12 +8542,14 @@ function Section({
|
|
|
8344
8542
|
}
|
|
8345
8543
|
}, "All rights reserved.")))))))))))))) : null)))));
|
|
8346
8544
|
}
|
|
8545
|
+
|
|
8347
8546
|
function EmailDripMarket({
|
|
8348
8547
|
sectionData,
|
|
8349
8548
|
extraProps = {}
|
|
8350
8549
|
}) {
|
|
8351
8550
|
console.log('extrapropstemplate', extraProps);
|
|
8352
8551
|
const isInitialMount = useRef(true);
|
|
8552
|
+
|
|
8353
8553
|
const convertToHtml = sectionData => {
|
|
8354
8554
|
const html = ReactDOMServer.renderToStaticMarkup( /*#__PURE__*/React.createElement(Section, {
|
|
8355
8555
|
nodeData: sectionData,
|
|
@@ -8359,15 +8559,15 @@ function EmailDripMarket({
|
|
|
8359
8559
|
}));
|
|
8360
8560
|
return html;
|
|
8361
8561
|
};
|
|
8562
|
+
|
|
8362
8563
|
useEffect(() => {
|
|
8363
8564
|
if (isInitialMount.current) {
|
|
8364
8565
|
isInitialMount.current = false;
|
|
8365
8566
|
} else {
|
|
8366
8567
|
extraProps?.callbackHtml(convertToHtml(sectionData));
|
|
8367
8568
|
}
|
|
8368
|
-
}, [extraProps?.convertedHtml]);
|
|
8569
|
+
}, [extraProps?.convertedHtml]); // const mockData = sectionData?.sections[0];
|
|
8369
8570
|
|
|
8370
|
-
// const mockData = sectionData?.sections[0];
|
|
8371
8571
|
const emailRef = useRef(null);
|
|
8372
8572
|
return /*#__PURE__*/React.createElement("section", {
|
|
8373
8573
|
style: {
|
|
@@ -8377,6 +8577,7 @@ function EmailDripMarket({
|
|
|
8377
8577
|
}, /*#__PURE__*/React.createElement("div", {
|
|
8378
8578
|
onClick: e => {
|
|
8379
8579
|
e.stopPropagation(); // prevent the click from event Capturing, in email onClick events do not work
|
|
8580
|
+
|
|
8380
8581
|
e.preventDefault();
|
|
8381
8582
|
}
|
|
8382
8583
|
}, /*#__PURE__*/React.createElement(Section, {
|
|
@@ -8415,25 +8616,33 @@ const TYPE_TO_COMPONENT_MAP = {
|
|
|
8415
8616
|
TILES_SECTION: Tiles,
|
|
8416
8617
|
EMAIL_DRIP_MARKET: EmailDripMarket
|
|
8417
8618
|
};
|
|
8619
|
+
|
|
8418
8620
|
const getCompToRender = type => TYPE_TO_COMPONENT_MAP[type] || (() => null);
|
|
8621
|
+
|
|
8419
8622
|
const MemoisedSection = /*#__PURE__*/memo(({
|
|
8420
8623
|
sectionData,
|
|
8421
|
-
extraProps
|
|
8624
|
+
extraProps,
|
|
8625
|
+
isCustomWebsite
|
|
8422
8626
|
}) => {
|
|
8627
|
+
// console.log("isCustomWebsite______", isCustomWebsite)
|
|
8423
8628
|
console.log('templatesectiondata', sectionData);
|
|
8424
8629
|
const SectionComp = getCompToRender(sectionData.type);
|
|
8425
8630
|
return /*#__PURE__*/React.createElement(SectionComp, {
|
|
8426
8631
|
sectionData: sectionData,
|
|
8427
|
-
extraProps: extraProps
|
|
8632
|
+
extraProps: extraProps,
|
|
8633
|
+
isCustomWebsite: isCustomWebsite
|
|
8428
8634
|
});
|
|
8429
8635
|
});
|
|
8430
8636
|
function SectionRenderer({
|
|
8431
8637
|
sectionData,
|
|
8432
|
-
extraProps
|
|
8638
|
+
extraProps,
|
|
8639
|
+
isCustomWebsite
|
|
8433
8640
|
}) {
|
|
8641
|
+
// console.log("isCustomWebsite______", isCustomWebsite)
|
|
8434
8642
|
return /*#__PURE__*/React.createElement(MemoisedSection, {
|
|
8435
8643
|
sectionData: sectionData,
|
|
8436
|
-
extraProps: extraProps
|
|
8644
|
+
extraProps: extraProps,
|
|
8645
|
+
isCustomWebsite: isCustomWebsite
|
|
8437
8646
|
});
|
|
8438
8647
|
}
|
|
8439
8648
|
|
|
@@ -8451,7 +8660,8 @@ function PageRenderer({
|
|
|
8451
8660
|
footer,
|
|
8452
8661
|
validations = {},
|
|
8453
8662
|
_id,
|
|
8454
|
-
isLandingPage = false
|
|
8663
|
+
isLandingPage = false,
|
|
8664
|
+
isCustomWebsite = false
|
|
8455
8665
|
},
|
|
8456
8666
|
isMobile = false,
|
|
8457
8667
|
isLandingPages = false,
|
|
@@ -8486,6 +8696,7 @@ function PageRenderer({
|
|
|
8486
8696
|
isTutorWebsite,
|
|
8487
8697
|
extraProps,
|
|
8488
8698
|
hideLogin,
|
|
8699
|
+
isCustomWebsite,
|
|
8489
8700
|
_id
|
|
8490
8701
|
}), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id]);
|
|
8491
8702
|
const Wrapper = SectionWrapper || Fragment;
|
|
@@ -8508,7 +8719,8 @@ function PageRenderer({
|
|
|
8508
8719
|
key: sectionData.type + (sectionData._id || sectionIndex)
|
|
8509
8720
|
}), /*#__PURE__*/React.createElement(SectionRenderer, {
|
|
8510
8721
|
sectionData: sectionData,
|
|
8511
|
-
extraProps: extraProps
|
|
8722
|
+
extraProps: extraProps,
|
|
8723
|
+
isCustomWebsite: isCustomWebsite
|
|
8512
8724
|
}))) : sectionPlaceholder, !!footer && /*#__PURE__*/React.createElement(Wrapper, !!SectionWrapper && {
|
|
8513
8725
|
sectionData: footer,
|
|
8514
8726
|
isFooter: true
|
|
@@ -8528,9 +8740,11 @@ const componentParser = compObj => {
|
|
|
8528
8740
|
});
|
|
8529
8741
|
return component;
|
|
8530
8742
|
}
|
|
8743
|
+
|
|
8531
8744
|
if (Array.isArray(compObj.components)) {
|
|
8532
8745
|
compObj.components = compObj.components.map(componentParser);
|
|
8533
8746
|
}
|
|
8747
|
+
|
|
8534
8748
|
return compObj;
|
|
8535
8749
|
};
|
|
8536
8750
|
const inverseComponentParser = compObj => {
|
|
@@ -8555,6 +8769,7 @@ const inverseComponentParser = compObj => {
|
|
|
8555
8769
|
if (compObj.components) {
|
|
8556
8770
|
compObj.components = compObj.components.map(inverseComponentParser);
|
|
8557
8771
|
}
|
|
8772
|
+
|
|
8558
8773
|
return compObj;
|
|
8559
8774
|
}
|
|
8560
8775
|
};
|