diy-template-components 0.2.4 → 0.2.5
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 +603 -275
- package/build/index.es.js.map +1 -1
- package/build/index.js +604 -275
- 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 || typeof window === 'undefined') {
|
|
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';
|
|
@@ -14,23 +14,21 @@ import Slider from 'react-slick';
|
|
|
14
14
|
import axios from 'axios';
|
|
15
15
|
import moment from 'moment';
|
|
16
16
|
import Countdown from 'react-countdown';
|
|
17
|
+
import ReactDOMServer from 'react-dom/server';
|
|
17
18
|
import { createTheming, createUseStyles as createUseStyles$1, useTheme as useTheme$1 } from 'react-jss';
|
|
18
19
|
|
|
19
20
|
function _extends() {
|
|
20
|
-
_extends = Object.assign
|
|
21
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
21
22
|
for (var i = 1; i < arguments.length; i++) {
|
|
22
23
|
var source = arguments[i];
|
|
23
|
-
|
|
24
24
|
for (var key in source) {
|
|
25
25
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
26
26
|
target[key] = source[key];
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
|
|
31
30
|
return target;
|
|
32
31
|
};
|
|
33
|
-
|
|
34
32
|
return _extends.apply(this, arguments);
|
|
35
33
|
}
|
|
36
34
|
|
|
@@ -286,21 +284,17 @@ const alpha = {
|
|
|
286
284
|
seventyPercent: 0.7,
|
|
287
285
|
eightyPercent: 0.8
|
|
288
286
|
};
|
|
289
|
-
|
|
290
287
|
const getRGBFromHex = hex => {
|
|
291
288
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
292
289
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
293
290
|
const b = parseInt(hex.slice(5, 7), 16);
|
|
294
291
|
return [r, g, b];
|
|
295
292
|
};
|
|
296
|
-
|
|
297
293
|
const hexToRgbA = (hex, alpha = null) => {
|
|
298
294
|
const values = getRGBFromHex(hex);
|
|
299
|
-
|
|
300
295
|
if (alpha !== null) {
|
|
301
296
|
values.push(alpha);
|
|
302
297
|
}
|
|
303
|
-
|
|
304
298
|
return `rgba(${values.join(',')})`;
|
|
305
299
|
};
|
|
306
300
|
const colorMixer = (hex1, weightage = 1, hex2 = colors.white) => {
|
|
@@ -440,29 +434,24 @@ function useLinkBuilder(data) {
|
|
|
440
434
|
basePath,
|
|
441
435
|
isMasterTemplate
|
|
442
436
|
} = useContext(PageContext);
|
|
443
|
-
|
|
444
437
|
if (isEdit || !data.isLink) {
|
|
445
438
|
return null;
|
|
446
439
|
}
|
|
447
|
-
|
|
448
440
|
if (data?.isExistingLink === false) {
|
|
449
441
|
return data.link;
|
|
450
442
|
}
|
|
451
|
-
|
|
452
443
|
if (data?.isExternal) {
|
|
453
444
|
return data.link;
|
|
454
445
|
}
|
|
455
|
-
|
|
456
446
|
if (!isPreview) {
|
|
457
447
|
const link = data.link === '/' ? '' : '/' + data.link;
|
|
458
448
|
return basePath ? `//${basePath}${link}` : null;
|
|
459
|
-
}
|
|
460
|
-
|
|
449
|
+
}
|
|
461
450
|
|
|
451
|
+
// courses in preview: special case
|
|
462
452
|
if (data.link === 'courses') {
|
|
463
453
|
return `//${basePath}/courses`;
|
|
464
454
|
}
|
|
465
|
-
|
|
466
455
|
const {
|
|
467
456
|
pageId
|
|
468
457
|
} = navList.find(el => el.slug === data?.link) || {};
|
|
@@ -638,14 +627,12 @@ var calendar$1 = "data:image/svg+xml,%3Csvg%20width%3D%2218%22%20height%3D%2218%
|
|
|
638
627
|
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";
|
|
639
628
|
|
|
640
629
|
/** @returns {import('./types').IconData} */
|
|
641
|
-
|
|
642
630
|
const getConfiguredIcon1 = url => ({
|
|
643
631
|
url,
|
|
644
632
|
svgChildrenConfigs: []
|
|
645
633
|
});
|
|
646
|
-
/** @returns {import('./types').IconData} */
|
|
647
|
-
|
|
648
634
|
|
|
635
|
+
/** @returns {import('./types').IconData} */
|
|
649
636
|
const getConfiguredIcon2 = (url, stroke, fill) => ({
|
|
650
637
|
url,
|
|
651
638
|
svgChildrenConfigs: [{
|
|
@@ -654,7 +641,6 @@ const getConfiguredIcon2 = (url, stroke, fill) => ({
|
|
|
654
641
|
fill
|
|
655
642
|
}]
|
|
656
643
|
});
|
|
657
|
-
|
|
658
644
|
const icons = {
|
|
659
645
|
'Live class': getConfiguredIcon2(liveTv, false, true),
|
|
660
646
|
'Recorded videos': getConfiguredIcon2(liveTv2, false, true),
|
|
@@ -687,41 +673,51 @@ const icons = {
|
|
|
687
673
|
'Video Play': getConfiguredIcon2(videoPlay, false, true),
|
|
688
674
|
Quote: getConfiguredIcon2(quote, false, true),
|
|
689
675
|
// Stock
|
|
676
|
+
|
|
690
677
|
'Stock Growth': getConfiguredIcon2(stockGrowth, false, true),
|
|
691
678
|
Money: getConfiguredIcon2(money, false, true),
|
|
692
679
|
Split: getConfiguredIcon2(split, false, true),
|
|
693
680
|
Chart: getConfiguredIcon2(chart, false, true),
|
|
694
681
|
// Personality Development
|
|
682
|
+
|
|
695
683
|
Leaders: getConfiguredIcon2(leaders, false, true),
|
|
696
684
|
Women: getConfiguredIcon2(women, false, true),
|
|
697
685
|
Program: getConfiguredIcon2(program, false, true),
|
|
698
686
|
// Photography
|
|
687
|
+
|
|
699
688
|
'Video Editing': getConfiguredIcon2(videoEditing, false, true),
|
|
700
689
|
Editing: getConfiguredIcon2(editing, false, true),
|
|
701
690
|
Camera: getConfiguredIcon2(camera, false, true),
|
|
702
691
|
Sessions: getConfiguredIcon2(sessions, false, true),
|
|
703
692
|
// Computer
|
|
693
|
+
|
|
704
694
|
'Regular Batches': getConfiguredIcon2(regularBatches, false, true),
|
|
705
695
|
'Alternate Batches': getConfiguredIcon2(alternateBatches, false, true),
|
|
706
696
|
'Weekend Batches': getConfiguredIcon2(weekendBatches, false, true),
|
|
707
697
|
// Life Coach
|
|
698
|
+
|
|
708
699
|
Girl: getConfiguredIcon2(girl, false, true),
|
|
709
700
|
Smile: getConfiguredIcon2(smile, false, true),
|
|
710
701
|
Relationships: getConfiguredIcon2(relationships, false, true),
|
|
711
702
|
// Music
|
|
703
|
+
|
|
712
704
|
Vocal: getConfiguredIcon2(vocal, false, true),
|
|
713
705
|
Instrument: getConfiguredIcon2(instrument, false, true),
|
|
714
706
|
Music: getConfiguredIcon2(music, false, true),
|
|
715
707
|
// Fitness
|
|
708
|
+
|
|
716
709
|
Workout: getConfiguredIcon2(workout, false, true),
|
|
717
710
|
Barbell: getConfiguredIcon2(barbell, false, true),
|
|
718
711
|
Trainer: getConfiguredIcon2(trainer, false, true),
|
|
719
712
|
Report: getConfiguredIcon2(report, false, true),
|
|
720
713
|
// Govt Exam
|
|
714
|
+
|
|
721
715
|
'Govt Exam': getConfiguredIcon2(govtExam, false, true),
|
|
722
716
|
// IIT JEE
|
|
717
|
+
|
|
723
718
|
College: getConfiguredIcon2(college, false, true),
|
|
724
719
|
// Others
|
|
720
|
+
|
|
725
721
|
Teachers: getConfiguredIcon2(teachers, false, true),
|
|
726
722
|
Learning: getConfiguredIcon2(learning, false, true),
|
|
727
723
|
Success: getConfiguredIcon2(success, false, true),
|
|
@@ -733,12 +729,9 @@ const icons = {
|
|
|
733
729
|
Video: getConfiguredIcon2(video, false, true)
|
|
734
730
|
};
|
|
735
731
|
|
|
736
|
-
const someMethod1 = (
|
|
737
|
-
/** @type {import('./types').IconData["svgChildrenConfigs"]} */
|
|
738
|
-
svgChildrenConfigs, color, hoverColor) => {
|
|
732
|
+
const someMethod1 = ( /** @type {import('./types').IconData["svgChildrenConfigs"]} */svgChildrenConfigs, color, hoverColor) => {
|
|
739
733
|
/** @type {{ [k:string]:React.CSSProperties; }} */
|
|
740
734
|
const obj = {};
|
|
741
|
-
|
|
742
735
|
for (const svgChildConfig of svgChildrenConfigs) {
|
|
743
736
|
if (color) obj['& ' + svgChildConfig.selector] = {
|
|
744
737
|
fill: svgChildConfig.fill ? color : undefined,
|
|
@@ -749,10 +742,8 @@ svgChildrenConfigs, color, hoverColor) => {
|
|
|
749
742
|
stroke: svgChildConfig.stroke ? hoverColor : undefined
|
|
750
743
|
};
|
|
751
744
|
}
|
|
752
|
-
|
|
753
745
|
return obj;
|
|
754
746
|
};
|
|
755
|
-
|
|
756
747
|
const useStyles$1 = createUseStyles$1({
|
|
757
748
|
'@keyframes slideRight': {
|
|
758
749
|
to: {
|
|
@@ -796,8 +787,8 @@ const defaultSvgState = {
|
|
|
796
787
|
childrenConfigs: [],
|
|
797
788
|
attributes: defaultAttributes
|
|
798
789
|
};
|
|
799
|
-
/** @type {import('./props.type').IconProps} */
|
|
800
790
|
|
|
791
|
+
/** @type {import('./props.type').IconProps} */
|
|
801
792
|
const iconDefaultProps = {
|
|
802
793
|
name: undefined,
|
|
803
794
|
width: 'auto',
|
|
@@ -807,8 +798,8 @@ const iconDefaultProps = {
|
|
|
807
798
|
opacity: undefined,
|
|
808
799
|
className: undefined
|
|
809
800
|
};
|
|
810
|
-
/** @type {import("react").FC<import('./props.type').IconProps>} */
|
|
811
801
|
|
|
802
|
+
/** @type {import("react").FC<import('./props.type').IconProps>} */
|
|
812
803
|
const Icon = ({
|
|
813
804
|
name,
|
|
814
805
|
width,
|
|
@@ -827,10 +818,8 @@ const Icon = ({
|
|
|
827
818
|
}, []);
|
|
828
819
|
/** */
|
|
829
820
|
|
|
830
|
-
const rootRef = useRef(
|
|
831
|
-
|
|
832
|
-
null); // this ref is used to cancel the fetch promise success callback in case name prop changed
|
|
833
|
-
|
|
821
|
+
const rootRef = useRef( /** @type {HTMLElement} */null);
|
|
822
|
+
// this ref is used to cancel the fetch promise success callback in case name prop changed
|
|
834
823
|
const currentName = useRef(name);
|
|
835
824
|
const [svgState, setSvgState] = useState(defaultSvgState);
|
|
836
825
|
const styles = useStyles$1({
|
|
@@ -841,46 +830,41 @@ const Icon = ({
|
|
|
841
830
|
opacity,
|
|
842
831
|
hoverColor
|
|
843
832
|
});
|
|
844
|
-
|
|
845
833
|
const _className = useMemo(() => `${styles.root} ${className || ''}`, [className]);
|
|
846
|
-
|
|
847
834
|
useEffect(() => {
|
|
848
835
|
// reset
|
|
849
836
|
currentName.current = name;
|
|
850
837
|
setSvgState(defaultSvgState);
|
|
851
838
|
const icon = icons[name];
|
|
852
|
-
|
|
853
839
|
if (icon) {
|
|
854
840
|
/**
|
|
855
841
|
* retrieve from cache
|
|
856
842
|
* @type {Promise<string>}
|
|
857
843
|
*/
|
|
858
844
|
let svgProm = Icon.getCachedSvgPromise(name);
|
|
859
|
-
|
|
860
845
|
if (!svgProm) {
|
|
861
846
|
svgProm = fetch(icon.url).then(r => r.text()).catch(() => {
|
|
862
847
|
// unset in cache
|
|
863
848
|
Icon.setCachedSvgPromise(name, undefined);
|
|
864
849
|
return null;
|
|
865
|
-
});
|
|
866
|
-
|
|
850
|
+
});
|
|
851
|
+
//save in cache
|
|
867
852
|
Icon.setCachedSvgPromise(name, svgProm);
|
|
868
853
|
}
|
|
869
|
-
|
|
870
854
|
svgProm.then(svg => {
|
|
871
855
|
if (svg && isMounted.current && name === currentName.current) {
|
|
872
856
|
const div = document.createElement('div');
|
|
873
|
-
div.innerHTML = svg;
|
|
857
|
+
div.innerHTML = svg;
|
|
874
858
|
|
|
859
|
+
// set the new attributes
|
|
875
860
|
const newAttributes = {};
|
|
876
|
-
|
|
877
861
|
for (const ob of div.firstElementChild.attributes) {
|
|
878
862
|
const camelCased = ob.name.replace(/(-|:)([a-z])/g, g => g[1].toUpperCase());
|
|
879
863
|
newAttributes[camelCased] = ob.value;
|
|
880
|
-
}
|
|
881
|
-
// Set state calls are called immediately inside asynchronous operations, timeouts, and intervals.
|
|
882
|
-
|
|
864
|
+
}
|
|
883
865
|
|
|
866
|
+
// setting the state in last.
|
|
867
|
+
// Set state calls are called immediately inside asynchronous operations, timeouts, and intervals.
|
|
884
868
|
setSvgState({
|
|
885
869
|
innerHtml: div.firstElementChild.innerHTML,
|
|
886
870
|
childrenConfigs: icon.svgChildrenConfigs,
|
|
@@ -900,14 +884,11 @@ const Icon = ({
|
|
|
900
884
|
onClick: onClick
|
|
901
885
|
}));
|
|
902
886
|
};
|
|
903
|
-
|
|
904
887
|
Icon.defaultProps = iconDefaultProps;
|
|
905
|
-
/** static properties for caching */
|
|
906
888
|
|
|
889
|
+
/** static properties for caching */
|
|
907
890
|
Icon.cacheStore = {};
|
|
908
|
-
|
|
909
891
|
Icon.getCachedSvgPromise = name => Icon.cacheStore[name];
|
|
910
|
-
|
|
911
892
|
Icon.setCachedSvgPromise = (name, prom) => Icon.cacheStore[name] = prom;
|
|
912
893
|
|
|
913
894
|
const useDropdownStyles = createUseStyles(theme => ({
|
|
@@ -1019,7 +1000,6 @@ function OptionList({
|
|
|
1019
1000
|
isLandingPages
|
|
1020
1001
|
}) {
|
|
1021
1002
|
useContext(PageContext);
|
|
1022
|
-
|
|
1023
1003
|
const tabsDataModifier = () => {
|
|
1024
1004
|
return optionsData?.map(dt => {
|
|
1025
1005
|
return {
|
|
@@ -1031,7 +1011,6 @@ function OptionList({
|
|
|
1031
1011
|
};
|
|
1032
1012
|
});
|
|
1033
1013
|
};
|
|
1034
|
-
|
|
1035
1014
|
const tabData = tabsDataModifier();
|
|
1036
1015
|
const classes = useSectionStyles$a();
|
|
1037
1016
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -1120,31 +1099,24 @@ function DesktopHeader({
|
|
|
1120
1099
|
const classes = useSectionStyles$a({
|
|
1121
1100
|
isFixed
|
|
1122
1101
|
});
|
|
1123
|
-
|
|
1124
1102
|
const optionDataFn = () => {
|
|
1125
1103
|
let optionsArr = navData;
|
|
1126
1104
|
let optionsData = [];
|
|
1127
|
-
|
|
1128
1105
|
if (optionsArr?.length > 5) {
|
|
1129
1106
|
optionsData = optionsArr?.slice(0, 4);
|
|
1130
1107
|
} else {
|
|
1131
1108
|
optionsData = optionsArr;
|
|
1132
1109
|
}
|
|
1133
|
-
|
|
1134
1110
|
return optionsData;
|
|
1135
1111
|
};
|
|
1136
|
-
|
|
1137
1112
|
const moreContentFn = () => {
|
|
1138
1113
|
let optionsArr = navData;
|
|
1139
1114
|
let moreContent = [];
|
|
1140
|
-
|
|
1141
1115
|
if (optionsArr?.length > 5) {
|
|
1142
1116
|
moreContent = optionsArr?.slice(4);
|
|
1143
1117
|
}
|
|
1144
|
-
|
|
1145
1118
|
return moreContent;
|
|
1146
1119
|
};
|
|
1147
|
-
|
|
1148
1120
|
return /*#__PURE__*/React.createElement("nav", {
|
|
1149
1121
|
className: classes.section
|
|
1150
1122
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1202,7 +1174,6 @@ function MobileHeader({
|
|
|
1202
1174
|
const navEl = useRef(null);
|
|
1203
1175
|
useLayoutEffect(() => {
|
|
1204
1176
|
const body = navEl?.current?.ownerDocument?.body;
|
|
1205
|
-
|
|
1206
1177
|
if (sideMenu) {
|
|
1207
1178
|
body?.setAttribute('style', 'overflow: hidden;');
|
|
1208
1179
|
} else {
|
|
@@ -1212,7 +1183,6 @@ function MobileHeader({
|
|
|
1212
1183
|
let iosUrl = null;
|
|
1213
1184
|
let androidUrl = null;
|
|
1214
1185
|
let downloadLink = null;
|
|
1215
|
-
|
|
1216
1186
|
if (isTutorWebsite) {
|
|
1217
1187
|
if (header?.iosUrl) {
|
|
1218
1188
|
iosUrl = /*#__PURE__*/React.createElement(Button, {
|
|
@@ -1235,7 +1205,6 @@ function MobileHeader({
|
|
|
1235
1205
|
}
|
|
1236
1206
|
});
|
|
1237
1207
|
}
|
|
1238
|
-
|
|
1239
1208
|
if (header?.androidURL) {
|
|
1240
1209
|
androidUrl = /*#__PURE__*/React.createElement(Button, {
|
|
1241
1210
|
data: {
|
|
@@ -1256,7 +1225,6 @@ function MobileHeader({
|
|
|
1256
1225
|
}
|
|
1257
1226
|
});
|
|
1258
1227
|
}
|
|
1259
|
-
|
|
1260
1228
|
if (iosUrl && androidUrl) {
|
|
1261
1229
|
downloadLink = /*#__PURE__*/React.createElement("div", null, iosUrl, androidUrl);
|
|
1262
1230
|
} else if (header?.iosUrl) {
|
|
@@ -1306,7 +1274,6 @@ function MobileHeader({
|
|
|
1306
1274
|
downloadLink = null;
|
|
1307
1275
|
}
|
|
1308
1276
|
}
|
|
1309
|
-
|
|
1310
1277
|
return /*#__PURE__*/React.createElement("nav", {
|
|
1311
1278
|
ref: navEl,
|
|
1312
1279
|
className: classes.section
|
|
@@ -1363,11 +1330,9 @@ function Header({
|
|
|
1363
1330
|
isMobile,
|
|
1364
1331
|
isTutorWebsite
|
|
1365
1332
|
} = useContext(PageContext);
|
|
1366
|
-
|
|
1367
1333
|
const filterHiddenNavs = () => {
|
|
1368
1334
|
return data?.navs?.filter(dt => !dt.isHiddenNav);
|
|
1369
1335
|
};
|
|
1370
|
-
|
|
1371
1336
|
return isMobile ? /*#__PURE__*/React.createElement(MobileHeader, {
|
|
1372
1337
|
navData: filterHiddenNavs(),
|
|
1373
1338
|
header: data,
|
|
@@ -1723,7 +1688,6 @@ const rustTheme = {
|
|
|
1723
1688
|
light: colors.lightRust,
|
|
1724
1689
|
lightest: colors.lightestRust
|
|
1725
1690
|
};
|
|
1726
|
-
|
|
1727
1691
|
const generateThemePalette = themeColors => ({
|
|
1728
1692
|
primary: themeColors,
|
|
1729
1693
|
background: {
|
|
@@ -1746,7 +1710,6 @@ const generateThemePalette = themeColors => ({
|
|
|
1746
1710
|
tertiary: colors.blueGrey
|
|
1747
1711
|
}
|
|
1748
1712
|
});
|
|
1749
|
-
|
|
1750
1713
|
const bluePalette = generateThemePalette(blueTheme);
|
|
1751
1714
|
const redPalette = generateThemePalette(redTheme);
|
|
1752
1715
|
const orangePalette = generateThemePalette(orangeTheme);
|
|
@@ -1787,9 +1750,7 @@ const fontComponents = {
|
|
|
1787
1750
|
'Merriweather Sans': MerriweatherSans,
|
|
1788
1751
|
'Arima Madurai': ArimaMadurai
|
|
1789
1752
|
};
|
|
1790
|
-
|
|
1791
1753
|
const getFontComponent = font => fontComponents[font] || (() => null);
|
|
1792
|
-
|
|
1793
1754
|
function FontSeeder({
|
|
1794
1755
|
fontFamily
|
|
1795
1756
|
}) {
|
|
@@ -1799,37 +1760,30 @@ function FontSeeder({
|
|
|
1799
1760
|
const useRubikFont = createUseStyles$1({
|
|
1800
1761
|
'@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')`
|
|
1801
1762
|
});
|
|
1802
|
-
|
|
1803
1763
|
function Rubik() {
|
|
1804
1764
|
// to import "Rubik" font css
|
|
1805
1765
|
useRubikFont();
|
|
1806
1766
|
return null;
|
|
1807
1767
|
}
|
|
1808
|
-
|
|
1809
1768
|
const useIbmPlexSansFont = createUseStyles$1({
|
|
1810
1769
|
'@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)'
|
|
1811
1770
|
});
|
|
1812
|
-
|
|
1813
1771
|
function IbmPlexSans() {
|
|
1814
1772
|
// to import "Ibm Plex Sans" font css
|
|
1815
1773
|
useIbmPlexSansFont();
|
|
1816
1774
|
return null;
|
|
1817
1775
|
}
|
|
1818
|
-
|
|
1819
1776
|
const useMerriweatherSansFont = createUseStyles$1({
|
|
1820
1777
|
'@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)'
|
|
1821
1778
|
});
|
|
1822
|
-
|
|
1823
1779
|
function MerriweatherSans() {
|
|
1824
1780
|
// to import "Merriweather Sans" font css
|
|
1825
1781
|
useMerriweatherSansFont();
|
|
1826
1782
|
return null;
|
|
1827
1783
|
}
|
|
1828
|
-
|
|
1829
1784
|
const useArimaMaduraiFont = createUseStyles$1({
|
|
1830
1785
|
'@import': 'url(https://fonts.googleapis.com/css2?family=Arima+Madurai:wght@400;500;700&display=swap)'
|
|
1831
1786
|
});
|
|
1832
|
-
|
|
1833
1787
|
function ArimaMadurai() {
|
|
1834
1788
|
// to import "Arima Madurai" font css
|
|
1835
1789
|
useArimaMaduraiFont();
|
|
@@ -1837,35 +1791,35 @@ function ArimaMadurai() {
|
|
|
1837
1791
|
}
|
|
1838
1792
|
|
|
1839
1793
|
const TYPE_TO_COMPONENT_MAP$1 = {
|
|
1840
|
-
BANNER_CAROUSEL_RIGHT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1841
|
-
GRID_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1842
|
-
BANNER_CAROUSEL_CENTER: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1843
|
-
BANNER_CAROUSEL_LEFT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1844
|
-
FORM_SUBSCRIBE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1845
|
-
TEXT_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1846
|
-
VIDEO_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1847
|
-
VIDEO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1848
|
-
INFO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1849
|
-
TEXT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1850
|
-
IMAGE_GALLERY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1851
|
-
FAQ_LISTING: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1852
|
-
COURSE_CAROUSEL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1853
|
-
TEAM_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1854
|
-
TEXT_GRID: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1855
|
-
CONTACT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1856
|
-
FORM_ENQUIRY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1857
|
-
WEBINAR_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1858
|
-
COURSE_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1859
|
-
FORM_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$
|
|
1860
|
-
TILES_SECTION: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index; }))
|
|
1794
|
+
BANNER_CAROUSEL_RIGHT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$l; })),
|
|
1795
|
+
GRID_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$k; })),
|
|
1796
|
+
BANNER_CAROUSEL_CENTER: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$j; })),
|
|
1797
|
+
BANNER_CAROUSEL_LEFT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$i; })),
|
|
1798
|
+
FORM_SUBSCRIBE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$h; })),
|
|
1799
|
+
TEXT_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$g; })),
|
|
1800
|
+
VIDEO_TESTIMONIAL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$f; })),
|
|
1801
|
+
VIDEO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$e; })),
|
|
1802
|
+
INFO: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$d; })),
|
|
1803
|
+
TEXT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$c; })),
|
|
1804
|
+
IMAGE_GALLERY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$b; })),
|
|
1805
|
+
FAQ_LISTING: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$a; })),
|
|
1806
|
+
COURSE_CAROUSEL: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$8; })),
|
|
1807
|
+
TEAM_CARD: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$7; })),
|
|
1808
|
+
TEXT_GRID: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$9; })),
|
|
1809
|
+
CONTACT: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$6; })),
|
|
1810
|
+
FORM_ENQUIRY: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$5; })),
|
|
1811
|
+
WEBINAR_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$4; })),
|
|
1812
|
+
COURSE_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$3; })),
|
|
1813
|
+
FORM_LANDING_PAGE: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$2; })),
|
|
1814
|
+
TILES_SECTION: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index$1; })),
|
|
1815
|
+
EMAIL_DRIP_MARKET: /*#__PURE__*/lazy(() => Promise.resolve().then(function () { return index; }))
|
|
1861
1816
|
};
|
|
1862
|
-
|
|
1863
1817
|
const getCompToRender$1 = type => TYPE_TO_COMPONENT_MAP$1[type] || (() => null);
|
|
1864
|
-
|
|
1865
1818
|
const MemoisedSection$1 = /*#__PURE__*/memo(({
|
|
1866
1819
|
sectionData,
|
|
1867
1820
|
extraProps
|
|
1868
1821
|
}) => {
|
|
1822
|
+
console.log('templatesectiondata', sectionData);
|
|
1869
1823
|
const SectionComp = getCompToRender$1(sectionData.type);
|
|
1870
1824
|
return /*#__PURE__*/React.createElement(SectionComp, {
|
|
1871
1825
|
sectionData: sectionData,
|
|
@@ -1877,9 +1831,7 @@ function SectionRenderer$1({
|
|
|
1877
1831
|
extraProps
|
|
1878
1832
|
}) {
|
|
1879
1833
|
return /*#__PURE__*/React.createElement(Suspense, {
|
|
1880
|
-
fallback: null
|
|
1881
|
-
/*GIF maybe*/
|
|
1882
|
-
|
|
1834
|
+
fallback: null /*GIF maybe*/
|
|
1883
1835
|
}, /*#__PURE__*/React.createElement(MemoisedSection$1, {
|
|
1884
1836
|
sectionData: sectionData,
|
|
1885
1837
|
extraProps: extraProps
|
|
@@ -2163,23 +2115,18 @@ const getArrowRotationAngle = props => {
|
|
|
2163
2115
|
switch (true) {
|
|
2164
2116
|
case props.left:
|
|
2165
2117
|
return 180;
|
|
2166
|
-
|
|
2167
2118
|
case props.up:
|
|
2168
2119
|
return 270;
|
|
2169
|
-
|
|
2170
2120
|
case props.down:
|
|
2171
2121
|
return 90;
|
|
2172
|
-
|
|
2173
2122
|
case props.right:
|
|
2174
2123
|
default:
|
|
2175
2124
|
return 0;
|
|
2176
2125
|
}
|
|
2177
2126
|
};
|
|
2178
|
-
|
|
2179
2127
|
const sizeHandler = ({
|
|
2180
2128
|
size
|
|
2181
2129
|
}) => size === 'small' ? '32px' : '48px';
|
|
2182
|
-
|
|
2183
2130
|
const useArrowButtonStyles = createUseStyles(theme => ({
|
|
2184
2131
|
arrowButtonContainer: {
|
|
2185
2132
|
cursor: 'pointer',
|
|
@@ -2219,7 +2166,6 @@ function dotsToShow(i, n) {
|
|
|
2219
2166
|
const leftToShow = i < elementsToShow / 2;
|
|
2220
2167
|
const rightToShow = n - i - 1 < elementsToShow / 2;
|
|
2221
2168
|
let leftCount, rightCount;
|
|
2222
|
-
|
|
2223
2169
|
if (leftToShow) {
|
|
2224
2170
|
leftCount = i;
|
|
2225
2171
|
rightCount = elementsToShow - i - 1;
|
|
@@ -2230,13 +2176,11 @@ function dotsToShow(i, n) {
|
|
|
2230
2176
|
leftCount = 2;
|
|
2231
2177
|
rightCount = 2;
|
|
2232
2178
|
}
|
|
2233
|
-
|
|
2234
2179
|
return {
|
|
2235
2180
|
leftCount,
|
|
2236
2181
|
rightCount
|
|
2237
2182
|
};
|
|
2238
2183
|
}
|
|
2239
|
-
|
|
2240
2184
|
function Carousel({
|
|
2241
2185
|
settings,
|
|
2242
2186
|
children,
|
|
@@ -2290,15 +2234,12 @@ function Carousel({
|
|
|
2290
2234
|
...settings,
|
|
2291
2235
|
className: settings?.className ? settings?.className + ' ' + classes.sliderClass : classes.sliderClass
|
|
2292
2236
|
};
|
|
2293
|
-
|
|
2294
2237
|
const nextClick = () => {
|
|
2295
2238
|
sliderRef.current.slickNext();
|
|
2296
2239
|
};
|
|
2297
|
-
|
|
2298
2240
|
const previousClick = () => {
|
|
2299
2241
|
sliderRef.current.slickPrev();
|
|
2300
2242
|
};
|
|
2301
|
-
|
|
2302
2243
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Slider, _extends({
|
|
2303
2244
|
ref: sliderRef
|
|
2304
2245
|
}, sliderSettings), children), hideArrow || isMobile ? null : /*#__PURE__*/React.createElement("div", {
|
|
@@ -2314,7 +2255,7 @@ function Carousel({
|
|
|
2314
2255
|
})));
|
|
2315
2256
|
}
|
|
2316
2257
|
|
|
2317
|
-
function Section$
|
|
2258
|
+
function Section$4({
|
|
2318
2259
|
nodeData
|
|
2319
2260
|
}) {
|
|
2320
2261
|
const classes = useSectionStyles$8();
|
|
@@ -2363,7 +2304,6 @@ function Section$3({
|
|
|
2363
2304
|
src: nodeData.image.metadata.value
|
|
2364
2305
|
})));
|
|
2365
2306
|
}
|
|
2366
|
-
|
|
2367
2307
|
function BannerCarouselRight({
|
|
2368
2308
|
sectionData
|
|
2369
2309
|
}) {
|
|
@@ -2387,15 +2327,13 @@ function BannerCarouselRight({
|
|
|
2387
2327
|
className: classes.bannerCarouselRightSection
|
|
2388
2328
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2389
2329
|
className: classes.sectionContainer
|
|
2390
|
-
}, /*#__PURE__*/React.createElement(Wrapper, wrapperProps, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React.createElement(Section$
|
|
2330
|
+
}, /*#__PURE__*/React.createElement(Wrapper, wrapperProps, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React.createElement(Section$4, {
|
|
2391
2331
|
nodeData: node,
|
|
2392
|
-
key: idx
|
|
2393
|
-
/* or some other unique property */
|
|
2394
|
-
|
|
2332
|
+
key: idx /* or some other unique property */
|
|
2395
2333
|
})))));
|
|
2396
2334
|
}
|
|
2397
2335
|
|
|
2398
|
-
var index$
|
|
2336
|
+
var index$l = /*#__PURE__*/Object.freeze({
|
|
2399
2337
|
__proto__: null,
|
|
2400
2338
|
'default': BannerCarouselRight
|
|
2401
2339
|
});
|
|
@@ -2598,11 +2536,9 @@ function List({
|
|
|
2598
2536
|
containerWidth
|
|
2599
2537
|
});
|
|
2600
2538
|
const [nodeData] = sectionData.components;
|
|
2601
|
-
|
|
2602
2539
|
const getNumber = val => {
|
|
2603
2540
|
return val.toString().length == 1 ? '0' + val : val;
|
|
2604
2541
|
};
|
|
2605
|
-
|
|
2606
2542
|
return /*#__PURE__*/React.createElement("section", {
|
|
2607
2543
|
className: classes.section
|
|
2608
2544
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -2647,7 +2583,7 @@ function List({
|
|
|
2647
2583
|
}))));
|
|
2648
2584
|
}
|
|
2649
2585
|
|
|
2650
|
-
var index$
|
|
2586
|
+
var index$k = /*#__PURE__*/Object.freeze({
|
|
2651
2587
|
__proto__: null,
|
|
2652
2588
|
'default': List
|
|
2653
2589
|
});
|
|
@@ -2746,7 +2682,7 @@ const useSectionStyles$6 = createUseStyles(theme => ({
|
|
|
2746
2682
|
}
|
|
2747
2683
|
}));
|
|
2748
2684
|
|
|
2749
|
-
const Section$
|
|
2685
|
+
const Section$3 = ({
|
|
2750
2686
|
nodeData
|
|
2751
2687
|
}) => {
|
|
2752
2688
|
const {
|
|
@@ -2794,7 +2730,6 @@ const Section$2 = ({
|
|
|
2794
2730
|
size: isMobile ? 'small' : 'medium'
|
|
2795
2731
|
})))));
|
|
2796
2732
|
};
|
|
2797
|
-
|
|
2798
2733
|
function BannerCarouselCenter({
|
|
2799
2734
|
sectionData
|
|
2800
2735
|
}) {
|
|
@@ -2809,15 +2744,13 @@ function BannerCarouselCenter({
|
|
|
2809
2744
|
} : {};
|
|
2810
2745
|
return /*#__PURE__*/React.createElement("section", {
|
|
2811
2746
|
className: classes.bannerCarouselCenterSection
|
|
2812
|
-
}, /*#__PURE__*/React.createElement(Wrapper, wrapperProps, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React.createElement(Section$
|
|
2747
|
+
}, /*#__PURE__*/React.createElement(Wrapper, wrapperProps, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React.createElement(Section$3, {
|
|
2813
2748
|
nodeData: node,
|
|
2814
|
-
key: idx
|
|
2815
|
-
/* or some other unique property */
|
|
2816
|
-
|
|
2749
|
+
key: idx /* or some other unique property */
|
|
2817
2750
|
}))));
|
|
2818
2751
|
}
|
|
2819
2752
|
|
|
2820
|
-
var index$
|
|
2753
|
+
var index$j = /*#__PURE__*/Object.freeze({
|
|
2821
2754
|
__proto__: null,
|
|
2822
2755
|
'default': BannerCarouselCenter
|
|
2823
2756
|
});
|
|
@@ -2929,7 +2862,7 @@ const useSectionStyles$5 = createUseStyles(theme => {
|
|
|
2929
2862
|
};
|
|
2930
2863
|
});
|
|
2931
2864
|
|
|
2932
|
-
function Section$
|
|
2865
|
+
function Section$2({
|
|
2933
2866
|
nodeData
|
|
2934
2867
|
}) {
|
|
2935
2868
|
const classes = useSectionStyles$5();
|
|
@@ -2980,7 +2913,6 @@ function Section$1({
|
|
|
2980
2913
|
size: isMobile ? 'small' : 'medium'
|
|
2981
2914
|
})));
|
|
2982
2915
|
}
|
|
2983
|
-
|
|
2984
2916
|
function BannerCarouselLeft({
|
|
2985
2917
|
sectionData
|
|
2986
2918
|
}) {
|
|
@@ -3000,15 +2932,13 @@ function BannerCarouselLeft({
|
|
|
3000
2932
|
className: classes.section
|
|
3001
2933
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3002
2934
|
className: classes.sectionContainer
|
|
3003
|
-
}, /*#__PURE__*/React.createElement(Wrapper, null, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React.createElement(Section$
|
|
2935
|
+
}, /*#__PURE__*/React.createElement(Wrapper, null, bannerCarousel.components.map((node, idx) => /*#__PURE__*/React.createElement(Section$2, {
|
|
3004
2936
|
nodeData: node,
|
|
3005
|
-
key: idx
|
|
3006
|
-
/* or some other unique property */
|
|
3007
|
-
|
|
2937
|
+
key: idx /* or some other unique property */
|
|
3008
2938
|
})))));
|
|
3009
2939
|
}
|
|
3010
2940
|
|
|
3011
|
-
var index$
|
|
2941
|
+
var index$i = /*#__PURE__*/Object.freeze({
|
|
3012
2942
|
__proto__: null,
|
|
3013
2943
|
'default': BannerCarouselLeft
|
|
3014
2944
|
});
|
|
@@ -3159,7 +3089,6 @@ async function postApiCall(baseURLs, data) {
|
|
|
3159
3089
|
},
|
|
3160
3090
|
data
|
|
3161
3091
|
});
|
|
3162
|
-
|
|
3163
3092
|
if (res) {
|
|
3164
3093
|
return res.data;
|
|
3165
3094
|
}
|
|
@@ -3184,7 +3113,6 @@ async function postApiCallForm(baseURLs, data, extraProps) {
|
|
|
3184
3113
|
if (extraProps && extraProps.formSubmitSuccess) {
|
|
3185
3114
|
extraProps.formSubmitSuccess();
|
|
3186
3115
|
}
|
|
3187
|
-
|
|
3188
3116
|
return res.data;
|
|
3189
3117
|
});
|
|
3190
3118
|
} catch (err) {
|
|
@@ -3297,7 +3225,6 @@ function SubscribeToNewsletter({
|
|
|
3297
3225
|
const [inputVal, setInputVal] = useState(formInitialValue);
|
|
3298
3226
|
let [isValid, setIsValid] = useState(true);
|
|
3299
3227
|
let [btnDisabled, setBtnDisabled] = useState(false);
|
|
3300
|
-
|
|
3301
3228
|
const handleSubmit = () => {
|
|
3302
3229
|
let data = {
|
|
3303
3230
|
sectionId: sectionData.sectionId,
|
|
@@ -3313,11 +3240,9 @@ function SubscribeToNewsletter({
|
|
|
3313
3240
|
setBtnDisabled(true);
|
|
3314
3241
|
setInputVal(formInitialValue);
|
|
3315
3242
|
};
|
|
3316
|
-
|
|
3317
3243
|
const checkValidity = () => {
|
|
3318
3244
|
if (validations?.[nodeData?.inputField?.metadata?.validationType]?.length) {
|
|
3319
3245
|
let regex = new RegExp(validations[nodeData?.inputField?.metadata?.validationType]);
|
|
3320
|
-
|
|
3321
3246
|
if (regex?.test(inputVal)) {
|
|
3322
3247
|
setIsValid(true);
|
|
3323
3248
|
} else {
|
|
@@ -3325,7 +3250,6 @@ function SubscribeToNewsletter({
|
|
|
3325
3250
|
}
|
|
3326
3251
|
}
|
|
3327
3252
|
};
|
|
3328
|
-
|
|
3329
3253
|
useEffect(() => {
|
|
3330
3254
|
if (!isValid) {
|
|
3331
3255
|
setBtnDisabled(true);
|
|
@@ -3403,7 +3327,7 @@ function SubscribeToNewsletter({
|
|
|
3403
3327
|
})))))));
|
|
3404
3328
|
}
|
|
3405
3329
|
|
|
3406
|
-
var index$
|
|
3330
|
+
var index$h = /*#__PURE__*/Object.freeze({
|
|
3407
3331
|
__proto__: null,
|
|
3408
3332
|
'default': SubscribeToNewsletter
|
|
3409
3333
|
});
|
|
@@ -3570,7 +3494,7 @@ function QuotesComponent() {
|
|
|
3570
3494
|
}));
|
|
3571
3495
|
}
|
|
3572
3496
|
|
|
3573
|
-
function Section({
|
|
3497
|
+
function Section$1({
|
|
3574
3498
|
nodeData
|
|
3575
3499
|
}) {
|
|
3576
3500
|
const {
|
|
@@ -3653,19 +3577,18 @@ function Section({
|
|
|
3653
3577
|
className: classes.contentRow
|
|
3654
3578
|
}, carouselContent))));
|
|
3655
3579
|
}
|
|
3656
|
-
|
|
3657
3580
|
function Testimonials({
|
|
3658
3581
|
sectionData
|
|
3659
3582
|
}) {
|
|
3660
3583
|
const classes = useTestimonialStyles();
|
|
3661
3584
|
return /*#__PURE__*/React.createElement("div", {
|
|
3662
3585
|
className: classes.testimonialContainer
|
|
3663
|
-
}, /*#__PURE__*/React.createElement(Section, {
|
|
3586
|
+
}, /*#__PURE__*/React.createElement(Section$1, {
|
|
3664
3587
|
nodeData: sectionData.components[0]
|
|
3665
3588
|
}));
|
|
3666
3589
|
}
|
|
3667
3590
|
|
|
3668
|
-
var index$
|
|
3591
|
+
var index$g = /*#__PURE__*/Object.freeze({
|
|
3669
3592
|
__proto__: null,
|
|
3670
3593
|
'default': Testimonials
|
|
3671
3594
|
});
|
|
@@ -3718,7 +3641,6 @@ const loaderStyle = theme => ({
|
|
|
3718
3641
|
});
|
|
3719
3642
|
|
|
3720
3643
|
const useStyles = createUseStyles$1(loaderStyle);
|
|
3721
|
-
|
|
3722
3644
|
function Loader({
|
|
3723
3645
|
texts
|
|
3724
3646
|
}) {
|
|
@@ -3730,13 +3652,11 @@ function Loader({
|
|
|
3730
3652
|
useEffect(() => {
|
|
3731
3653
|
if (texts && texts.length) {
|
|
3732
3654
|
let textID = '';
|
|
3733
|
-
|
|
3734
3655
|
for (let i = 0; i < texts.length; i++) {
|
|
3735
3656
|
textID = setTimeout(() => {
|
|
3736
3657
|
setLoaderText(texts[i]);
|
|
3737
3658
|
}, 2000 * i);
|
|
3738
3659
|
}
|
|
3739
|
-
|
|
3740
3660
|
return () => {
|
|
3741
3661
|
clearTimeout(textID);
|
|
3742
3662
|
};
|
|
@@ -3804,18 +3724,15 @@ function VideoPlayer(props) {
|
|
|
3804
3724
|
imageUrl: imageUrl
|
|
3805
3725
|
});
|
|
3806
3726
|
const theme = useTheme();
|
|
3807
|
-
|
|
3808
3727
|
function getId(url) {
|
|
3809
3728
|
var regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/;
|
|
3810
3729
|
var match = url?.match(regExp);
|
|
3811
|
-
|
|
3812
3730
|
if (match?.[2].length == 11) {
|
|
3813
3731
|
return 'https://www.youtube.com/embed/' + match[2];
|
|
3814
3732
|
} else {
|
|
3815
3733
|
return url;
|
|
3816
3734
|
}
|
|
3817
3735
|
}
|
|
3818
|
-
|
|
3819
3736
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !isLoaded && /*#__PURE__*/React.createElement("div", {
|
|
3820
3737
|
className: classes.imgContainer
|
|
3821
3738
|
}, isEnabled ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(React.Fragment, null, props.onlyThumbnail ? null : /*#__PURE__*/React.createElement(Icon, {
|
|
@@ -4044,7 +3961,7 @@ function VideoTestimonial({
|
|
|
4044
3961
|
}))))));
|
|
4045
3962
|
}
|
|
4046
3963
|
|
|
4047
|
-
var index$
|
|
3964
|
+
var index$f = /*#__PURE__*/Object.freeze({
|
|
4048
3965
|
__proto__: null,
|
|
4049
3966
|
'default': VideoTestimonial
|
|
4050
3967
|
});
|
|
@@ -4272,7 +4189,7 @@ function Video({
|
|
|
4272
4189
|
}, carouselContent))));
|
|
4273
4190
|
}
|
|
4274
4191
|
|
|
4275
|
-
var index$
|
|
4192
|
+
var index$e = /*#__PURE__*/Object.freeze({
|
|
4276
4193
|
__proto__: null,
|
|
4277
4194
|
'default': Video
|
|
4278
4195
|
});
|
|
@@ -4498,7 +4415,7 @@ function Info({
|
|
|
4498
4415
|
}, carouselContent))));
|
|
4499
4416
|
}
|
|
4500
4417
|
|
|
4501
|
-
var index$
|
|
4418
|
+
var index$d = /*#__PURE__*/Object.freeze({
|
|
4502
4419
|
__proto__: null,
|
|
4503
4420
|
'default': Info
|
|
4504
4421
|
});
|
|
@@ -4617,7 +4534,7 @@ const TextSection = ({
|
|
|
4617
4534
|
})))));
|
|
4618
4535
|
};
|
|
4619
4536
|
|
|
4620
|
-
var index$
|
|
4537
|
+
var index$c = /*#__PURE__*/Object.freeze({
|
|
4621
4538
|
__proto__: null,
|
|
4622
4539
|
'default': TextSection
|
|
4623
4540
|
});
|
|
@@ -4658,8 +4575,8 @@ const usePhotoGalleryStyles = createUseStyles(theme => {
|
|
|
4658
4575
|
width: 'calc(100% - 2px)',
|
|
4659
4576
|
position: 'relative',
|
|
4660
4577
|
paddingBottom: '59.83%' // keeping aspect ratio 585x350
|
|
4661
|
-
|
|
4662
4578
|
},
|
|
4579
|
+
|
|
4663
4580
|
contentRow: {
|
|
4664
4581
|
display: 'grid',
|
|
4665
4582
|
gridTemplateColumns: ({
|
|
@@ -4774,7 +4691,7 @@ function PhotoGallery({
|
|
|
4774
4691
|
}, carouselContent))));
|
|
4775
4692
|
}
|
|
4776
4693
|
|
|
4777
|
-
var index$
|
|
4694
|
+
var index$b = /*#__PURE__*/Object.freeze({
|
|
4778
4695
|
__proto__: null,
|
|
4779
4696
|
'default': PhotoGallery
|
|
4780
4697
|
});
|
|
@@ -4918,7 +4835,6 @@ const FAQListing = ({
|
|
|
4918
4835
|
isSelected: selectedIndex === index
|
|
4919
4836
|
})))));
|
|
4920
4837
|
};
|
|
4921
|
-
|
|
4922
4838
|
const Accordion = ({
|
|
4923
4839
|
item,
|
|
4924
4840
|
isSelected,
|
|
@@ -4952,7 +4868,7 @@ const Accordion = ({
|
|
|
4952
4868
|
})));
|
|
4953
4869
|
};
|
|
4954
4870
|
|
|
4955
|
-
var index$
|
|
4871
|
+
var index$a = /*#__PURE__*/Object.freeze({
|
|
4956
4872
|
__proto__: null,
|
|
4957
4873
|
'default': FAQListing
|
|
4958
4874
|
});
|
|
@@ -5117,7 +5033,7 @@ const TextGrid = ({
|
|
|
5117
5033
|
}, carouselContent))));
|
|
5118
5034
|
};
|
|
5119
5035
|
|
|
5120
|
-
var index$
|
|
5036
|
+
var index$9 = /*#__PURE__*/Object.freeze({
|
|
5121
5037
|
__proto__: null,
|
|
5122
5038
|
'default': TextGrid
|
|
5123
5039
|
});
|
|
@@ -5203,9 +5119,10 @@ const useCourseStyles = createUseStyles(theme => {
|
|
|
5203
5119
|
flexGrow: 1,
|
|
5204
5120
|
display: 'flex',
|
|
5205
5121
|
flexDirection: 'column',
|
|
5206
|
-
justifyContent: 'space-between'
|
|
5207
|
-
|
|
5122
|
+
justifyContent: 'space-between'
|
|
5123
|
+
//alignItems: 'center',
|
|
5208
5124
|
},
|
|
5125
|
+
|
|
5209
5126
|
courseCardTags: {
|
|
5210
5127
|
display: 'flex',
|
|
5211
5128
|
justifyContent: 'flex-start',
|
|
@@ -5231,11 +5148,12 @@ const useCourseStyles = createUseStyles(theme => {
|
|
|
5231
5148
|
wordBreak: 'break-word',
|
|
5232
5149
|
padding: '12px 0px',
|
|
5233
5150
|
textAlign: 'left',
|
|
5234
|
-
display: 'inline-block'
|
|
5151
|
+
display: 'inline-block'
|
|
5152
|
+
// overflow: 'hidden',
|
|
5235
5153
|
// whiteSpace: 'nowrap',
|
|
5236
5154
|
// textOverflow: 'ellipsis'
|
|
5237
|
-
|
|
5238
5155
|
},
|
|
5156
|
+
|
|
5239
5157
|
courseCardDiscount: {
|
|
5240
5158
|
display: 'flex',
|
|
5241
5159
|
justifyContent: 'flex-start',
|
|
@@ -5317,7 +5235,8 @@ const useCourseStyles = createUseStyles(theme => {
|
|
|
5317
5235
|
}
|
|
5318
5236
|
},
|
|
5319
5237
|
'@media (max-width: 768px)': {
|
|
5320
|
-
coursesContainer: {
|
|
5238
|
+
coursesContainer: {
|
|
5239
|
+
//background: theme?.palette?.background?.primary
|
|
5321
5240
|
},
|
|
5322
5241
|
coursesCardAndText: {
|
|
5323
5242
|
padding: '70px 30px'
|
|
@@ -5349,7 +5268,6 @@ async function getCourseList(baseURLs, hashToken) {
|
|
|
5349
5268
|
if (!hashToken) {
|
|
5350
5269
|
throw 'Missing hash token';
|
|
5351
5270
|
}
|
|
5352
|
-
|
|
5353
5271
|
const res = await axios({
|
|
5354
5272
|
method: 'get',
|
|
5355
5273
|
baseURL: baseURLs?.API_COURSE_URL,
|
|
@@ -5361,7 +5279,6 @@ async function getCourseList(baseURLs, hashToken) {
|
|
|
5361
5279
|
requiredFilters: '[10]'
|
|
5362
5280
|
}
|
|
5363
5281
|
});
|
|
5364
|
-
|
|
5365
5282
|
if (res) {
|
|
5366
5283
|
return res.data;
|
|
5367
5284
|
}
|
|
@@ -5373,7 +5290,6 @@ function getShortenedSubstring(name, length, allowDots = true) {
|
|
|
5373
5290
|
if (name) {
|
|
5374
5291
|
return name.length < length ? name : `${name.substr(0, length)}${allowDots && '...'}`;
|
|
5375
5292
|
}
|
|
5376
|
-
|
|
5377
5293
|
return '';
|
|
5378
5294
|
}
|
|
5379
5295
|
|
|
@@ -5453,13 +5369,11 @@ function courses({
|
|
|
5453
5369
|
containerWidth
|
|
5454
5370
|
});
|
|
5455
5371
|
const [nodeData] = sectionData?.components;
|
|
5456
|
-
|
|
5457
5372
|
const handleApiCall = () => {
|
|
5458
5373
|
if (baseURLs) {
|
|
5459
5374
|
getCourseList(baseURLs, hashToken).then(response => {
|
|
5460
5375
|
const placeholders = nodeData?.cardCarousel?.metadata?.placeholders;
|
|
5461
5376
|
const coursesData = response?.data?.coursesData;
|
|
5462
|
-
|
|
5463
5377
|
if (coursesData && coursesData.length) {
|
|
5464
5378
|
setCardList(response?.data?.coursesData);
|
|
5465
5379
|
setShowShimmer(false);
|
|
@@ -5470,12 +5384,12 @@ function courses({
|
|
|
5470
5384
|
setShowShimmer(false);
|
|
5471
5385
|
setFallbackImages(placeholders);
|
|
5472
5386
|
}
|
|
5473
|
-
}
|
|
5387
|
+
}
|
|
5388
|
+
// For User Website & Draft Preview: If no data found, hide section.
|
|
5474
5389
|
else setErrored(true);
|
|
5475
5390
|
}
|
|
5476
5391
|
}).catch(err => {
|
|
5477
5392
|
const errMsg = err?.response?.data?.data?.message;
|
|
5478
|
-
|
|
5479
5393
|
if (errMsg === 'NOT_FOUND') {
|
|
5480
5394
|
if (nodeData?.cardCarousel?.metadata?.placeholders?.length && isEdit) {
|
|
5481
5395
|
setShowShimmer(false);
|
|
@@ -5487,16 +5401,16 @@ function courses({
|
|
|
5487
5401
|
});
|
|
5488
5402
|
}
|
|
5489
5403
|
};
|
|
5490
|
-
|
|
5491
5404
|
useEffect(() => {
|
|
5492
|
-
const placeholders = nodeData?.cardCarousel?.metadata?.placeholders;
|
|
5493
|
-
|
|
5405
|
+
const placeholders = nodeData?.cardCarousel?.metadata?.placeholders;
|
|
5406
|
+
// For Master template Preview: Show placeholder images. If placeholder doesn't come from backend, show shimmer.
|
|
5494
5407
|
if (isMasterTemplate) {
|
|
5495
5408
|
if (placeholders && placeholders.length) {
|
|
5496
5409
|
setShowShimmer(false);
|
|
5497
5410
|
setFallbackImages(placeholders);
|
|
5498
5411
|
}
|
|
5499
|
-
}
|
|
5412
|
+
}
|
|
5413
|
+
// other
|
|
5500
5414
|
else {
|
|
5501
5415
|
handleApiCall();
|
|
5502
5416
|
}
|
|
@@ -5561,7 +5475,6 @@ function courses({
|
|
|
5561
5475
|
});
|
|
5562
5476
|
})))));
|
|
5563
5477
|
}
|
|
5564
|
-
|
|
5565
5478
|
function SimpleCardsContainer({
|
|
5566
5479
|
children,
|
|
5567
5480
|
classes
|
|
@@ -5571,7 +5484,7 @@ function SimpleCardsContainer({
|
|
|
5571
5484
|
}, children);
|
|
5572
5485
|
}
|
|
5573
5486
|
|
|
5574
|
-
var index$
|
|
5487
|
+
var index$8 = /*#__PURE__*/Object.freeze({
|
|
5575
5488
|
__proto__: null,
|
|
5576
5489
|
'default': courses
|
|
5577
5490
|
});
|
|
@@ -5794,7 +5707,7 @@ function TeamCard({
|
|
|
5794
5707
|
}, " ", carouselContent)));
|
|
5795
5708
|
}
|
|
5796
5709
|
|
|
5797
|
-
var index$
|
|
5710
|
+
var index$7 = /*#__PURE__*/Object.freeze({
|
|
5798
5711
|
__proto__: null,
|
|
5799
5712
|
'default': TeamCard
|
|
5800
5713
|
});
|
|
@@ -5977,7 +5890,6 @@ function FormEnquiry({
|
|
|
5977
5890
|
setBtnDisabled(true);
|
|
5978
5891
|
}
|
|
5979
5892
|
}, [validData]);
|
|
5980
|
-
|
|
5981
5893
|
const handleSubmit = () => {
|
|
5982
5894
|
let data = {
|
|
5983
5895
|
sectionId: sectionData?._id || null,
|
|
@@ -5988,23 +5900,22 @@ function FormEnquiry({
|
|
|
5988
5900
|
setBtnDisabled(true);
|
|
5989
5901
|
setInputVal(formInitialValue);
|
|
5990
5902
|
};
|
|
5991
|
-
|
|
5992
5903
|
const checkValidity = (regexField, fieldname, fieldValidity) => {
|
|
5993
5904
|
if (validations?.[regexField]?.length) {
|
|
5994
5905
|
let regex = new RegExp(validations[regexField]);
|
|
5995
|
-
|
|
5996
5906
|
if (regex?.test(inputVal[fieldname])) {
|
|
5997
|
-
setValidData({
|
|
5907
|
+
setValidData({
|
|
5908
|
+
...validData,
|
|
5998
5909
|
[fieldValidity]: 1
|
|
5999
5910
|
});
|
|
6000
5911
|
} else {
|
|
6001
|
-
setValidData({
|
|
5912
|
+
setValidData({
|
|
5913
|
+
...validData,
|
|
6002
5914
|
[fieldValidity]: 0
|
|
6003
5915
|
});
|
|
6004
5916
|
}
|
|
6005
5917
|
}
|
|
6006
5918
|
};
|
|
6007
|
-
|
|
6008
5919
|
return /*#__PURE__*/React.createElement("section", {
|
|
6009
5920
|
className: classes.section
|
|
6010
5921
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -6084,7 +5995,8 @@ function FormEnquiry({
|
|
|
6084
5995
|
isValid: validData.nameValid,
|
|
6085
5996
|
inputType: 'input',
|
|
6086
5997
|
onChange: e => {
|
|
6087
|
-
setInputVal({
|
|
5998
|
+
setInputVal({
|
|
5999
|
+
...inputVal,
|
|
6088
6000
|
name: e.target.value
|
|
6089
6001
|
});
|
|
6090
6002
|
},
|
|
@@ -6092,7 +6004,8 @@ function FormEnquiry({
|
|
|
6092
6004
|
checkValidity(nodeData?.nameField?.metadata?.validationType, 'name', 'nameValid');
|
|
6093
6005
|
},
|
|
6094
6006
|
onFocus: () => {
|
|
6095
|
-
setValidData({
|
|
6007
|
+
setValidData({
|
|
6008
|
+
...validData,
|
|
6096
6009
|
nameValid: 1
|
|
6097
6010
|
});
|
|
6098
6011
|
}
|
|
@@ -6104,7 +6017,8 @@ function FormEnquiry({
|
|
|
6104
6017
|
isValid: validData.phoneValid,
|
|
6105
6018
|
inputType: 'input',
|
|
6106
6019
|
onChange: e => {
|
|
6107
|
-
setInputVal({
|
|
6020
|
+
setInputVal({
|
|
6021
|
+
...inputVal,
|
|
6108
6022
|
phone: e.target.value
|
|
6109
6023
|
});
|
|
6110
6024
|
},
|
|
@@ -6112,7 +6026,8 @@ function FormEnquiry({
|
|
|
6112
6026
|
checkValidity(nodeData?.phoneField?.metadata?.validationType, 'phone', 'phoneValid');
|
|
6113
6027
|
},
|
|
6114
6028
|
onFocus: () => {
|
|
6115
|
-
setValidData({
|
|
6029
|
+
setValidData({
|
|
6030
|
+
...validData,
|
|
6116
6031
|
phoneValid: 1
|
|
6117
6032
|
});
|
|
6118
6033
|
}
|
|
@@ -6124,7 +6039,8 @@ function FormEnquiry({
|
|
|
6124
6039
|
isValid: validData.emailValid,
|
|
6125
6040
|
inputType: 'input',
|
|
6126
6041
|
onChange: e => {
|
|
6127
|
-
setInputVal({
|
|
6042
|
+
setInputVal({
|
|
6043
|
+
...inputVal,
|
|
6128
6044
|
email: e.target.value
|
|
6129
6045
|
});
|
|
6130
6046
|
},
|
|
@@ -6132,7 +6048,8 @@ function FormEnquiry({
|
|
|
6132
6048
|
checkValidity(nodeData?.emailField?.metadata?.validationType, 'email', 'emailValid');
|
|
6133
6049
|
},
|
|
6134
6050
|
onFocus: () => {
|
|
6135
|
-
setValidData({
|
|
6051
|
+
setValidData({
|
|
6052
|
+
...validData,
|
|
6136
6053
|
emailValid: 1
|
|
6137
6054
|
});
|
|
6138
6055
|
}
|
|
@@ -6144,7 +6061,8 @@ function FormEnquiry({
|
|
|
6144
6061
|
isValid: validData.messageValid,
|
|
6145
6062
|
inputType: 'textarea',
|
|
6146
6063
|
onChange: e => {
|
|
6147
|
-
setInputVal({
|
|
6064
|
+
setInputVal({
|
|
6065
|
+
...inputVal,
|
|
6148
6066
|
message: e.target.value
|
|
6149
6067
|
});
|
|
6150
6068
|
},
|
|
@@ -6152,7 +6070,8 @@ function FormEnquiry({
|
|
|
6152
6070
|
checkValidity(nodeData?.messageField?.metadata?.validationType, 'message', 'messageValid');
|
|
6153
6071
|
},
|
|
6154
6072
|
onFocus: () => {
|
|
6155
|
-
setValidData({
|
|
6073
|
+
setValidData({
|
|
6074
|
+
...validData,
|
|
6156
6075
|
messageValid: 1
|
|
6157
6076
|
});
|
|
6158
6077
|
}
|
|
@@ -6170,7 +6089,7 @@ function FormEnquiry({
|
|
|
6170
6089
|
}))))));
|
|
6171
6090
|
}
|
|
6172
6091
|
|
|
6173
|
-
var index$
|
|
6092
|
+
var index$6 = /*#__PURE__*/Object.freeze({
|
|
6174
6093
|
__proto__: null,
|
|
6175
6094
|
'default': FormEnquiry
|
|
6176
6095
|
});
|
|
@@ -6383,7 +6302,6 @@ function Contact({
|
|
|
6383
6302
|
phoneValid: 1,
|
|
6384
6303
|
messageValid: 1
|
|
6385
6304
|
});
|
|
6386
|
-
|
|
6387
6305
|
const handleSubmit = () => {
|
|
6388
6306
|
const data = {
|
|
6389
6307
|
sectionId: sectionData?._id || null,
|
|
@@ -6394,7 +6312,6 @@ function Contact({
|
|
|
6394
6312
|
setBtnDisabled(true);
|
|
6395
6313
|
setInputVal(formInitialValue);
|
|
6396
6314
|
};
|
|
6397
|
-
|
|
6398
6315
|
useEffect(() => {
|
|
6399
6316
|
if (validData?.nameValid && validData?.emailValid && validData?.phoneValid && validData?.messageValid) {
|
|
6400
6317
|
setBtnDisabled(false);
|
|
@@ -6402,23 +6319,22 @@ function Contact({
|
|
|
6402
6319
|
setBtnDisabled(true);
|
|
6403
6320
|
}
|
|
6404
6321
|
}, [validData]);
|
|
6405
|
-
|
|
6406
6322
|
const checkValidity = (regexField, fieldname, fieldValidity) => {
|
|
6407
6323
|
if (validations?.[regexField]?.length) {
|
|
6408
6324
|
let regex = new RegExp(validations[regexField]);
|
|
6409
|
-
|
|
6410
6325
|
if (regex?.test(inputVal[fieldname])) {
|
|
6411
|
-
setValidData({
|
|
6326
|
+
setValidData({
|
|
6327
|
+
...validData,
|
|
6412
6328
|
[fieldValidity]: 1
|
|
6413
6329
|
});
|
|
6414
6330
|
} else {
|
|
6415
|
-
setValidData({
|
|
6331
|
+
setValidData({
|
|
6332
|
+
...validData,
|
|
6416
6333
|
[fieldValidity]: 0
|
|
6417
6334
|
});
|
|
6418
6335
|
}
|
|
6419
6336
|
}
|
|
6420
6337
|
};
|
|
6421
|
-
|
|
6422
6338
|
return /*#__PURE__*/React.createElement("section", {
|
|
6423
6339
|
className: classes.section
|
|
6424
6340
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -6460,7 +6376,8 @@ function Contact({
|
|
|
6460
6376
|
isValid: validData.nameValid,
|
|
6461
6377
|
inputType: 'input',
|
|
6462
6378
|
onChange: e => {
|
|
6463
|
-
setInputVal({
|
|
6379
|
+
setInputVal({
|
|
6380
|
+
...inputVal,
|
|
6464
6381
|
name: e.target.value
|
|
6465
6382
|
});
|
|
6466
6383
|
},
|
|
@@ -6468,7 +6385,8 @@ function Contact({
|
|
|
6468
6385
|
checkValidity(nodeData?.nameField?.metadata?.validationType, 'name', 'nameValid');
|
|
6469
6386
|
},
|
|
6470
6387
|
onFocus: () => {
|
|
6471
|
-
setValidData({
|
|
6388
|
+
setValidData({
|
|
6389
|
+
...validData,
|
|
6472
6390
|
nameValid: 1
|
|
6473
6391
|
});
|
|
6474
6392
|
}
|
|
@@ -6480,7 +6398,8 @@ function Contact({
|
|
|
6480
6398
|
isValid: validData.phoneValid,
|
|
6481
6399
|
inputType: 'input',
|
|
6482
6400
|
onChange: e => {
|
|
6483
|
-
setInputVal({
|
|
6401
|
+
setInputVal({
|
|
6402
|
+
...inputVal,
|
|
6484
6403
|
phone: e.target.value
|
|
6485
6404
|
});
|
|
6486
6405
|
},
|
|
@@ -6488,7 +6407,8 @@ function Contact({
|
|
|
6488
6407
|
checkValidity(nodeData?.phoneField?.metadata?.validationType, 'phone', 'phoneValid');
|
|
6489
6408
|
},
|
|
6490
6409
|
onFocus: () => {
|
|
6491
|
-
setValidData({
|
|
6410
|
+
setValidData({
|
|
6411
|
+
...validData,
|
|
6492
6412
|
phoneValid: 1
|
|
6493
6413
|
});
|
|
6494
6414
|
}
|
|
@@ -6500,7 +6420,8 @@ function Contact({
|
|
|
6500
6420
|
isValid: validData.emailValid,
|
|
6501
6421
|
inputType: 'input',
|
|
6502
6422
|
onChange: e => {
|
|
6503
|
-
setInputVal({
|
|
6423
|
+
setInputVal({
|
|
6424
|
+
...inputVal,
|
|
6504
6425
|
email: e.target.value
|
|
6505
6426
|
});
|
|
6506
6427
|
},
|
|
@@ -6508,7 +6429,8 @@ function Contact({
|
|
|
6508
6429
|
checkValidity(nodeData?.emailField?.metadata?.validationType, 'email', 'emailValid');
|
|
6509
6430
|
},
|
|
6510
6431
|
onFocus: () => {
|
|
6511
|
-
setValidData({
|
|
6432
|
+
setValidData({
|
|
6433
|
+
...validData,
|
|
6512
6434
|
emailValid: 1
|
|
6513
6435
|
});
|
|
6514
6436
|
}
|
|
@@ -6520,7 +6442,8 @@ function Contact({
|
|
|
6520
6442
|
isValid: validData.messageValid,
|
|
6521
6443
|
inputType: 'textarea',
|
|
6522
6444
|
onChange: e => {
|
|
6523
|
-
setInputVal({
|
|
6445
|
+
setInputVal({
|
|
6446
|
+
...inputVal,
|
|
6524
6447
|
message: e.target.value
|
|
6525
6448
|
});
|
|
6526
6449
|
},
|
|
@@ -6528,7 +6451,8 @@ function Contact({
|
|
|
6528
6451
|
checkValidity(nodeData?.messageField?.metadata?.validationType, 'message', 'messageValid');
|
|
6529
6452
|
},
|
|
6530
6453
|
onFocus: () => {
|
|
6531
|
-
setValidData({
|
|
6454
|
+
setValidData({
|
|
6455
|
+
...validData,
|
|
6532
6456
|
messageValid: 1
|
|
6533
6457
|
});
|
|
6534
6458
|
}
|
|
@@ -6546,7 +6470,7 @@ function Contact({
|
|
|
6546
6470
|
}))))));
|
|
6547
6471
|
}
|
|
6548
6472
|
|
|
6549
|
-
var index$
|
|
6473
|
+
var index$5 = /*#__PURE__*/Object.freeze({
|
|
6550
6474
|
__proto__: null,
|
|
6551
6475
|
'default': Contact
|
|
6552
6476
|
});
|
|
@@ -6789,7 +6713,8 @@ const useWebinarPromotionPage = createUseStyles(theme => {
|
|
|
6789
6713
|
const SingleVideoSlide$1 = props => {
|
|
6790
6714
|
const [isReadMore, setIsReadMore] = useState(false);
|
|
6791
6715
|
const theme = useTheme();
|
|
6792
|
-
useEffect(() => {
|
|
6716
|
+
useEffect(() => {
|
|
6717
|
+
// remaining days epoch
|
|
6793
6718
|
// current date epoch
|
|
6794
6719
|
// subtract remaining days from current day epoch
|
|
6795
6720
|
// moment the result - and see if there are days
|
|
@@ -6801,7 +6726,6 @@ const SingleVideoSlide$1 = props => {
|
|
|
6801
6726
|
webinarCtaClick,
|
|
6802
6727
|
conversions = 0
|
|
6803
6728
|
} = props;
|
|
6804
|
-
|
|
6805
6729
|
const renderer = ({
|
|
6806
6730
|
days,
|
|
6807
6731
|
hours,
|
|
@@ -6817,9 +6741,7 @@ const SingleVideoSlide$1 = props => {
|
|
|
6817
6741
|
return /*#__PURE__*/React.createElement("span", null, Math.floor(moment.duration(given.diff(current)).asDays()), " day(s)");
|
|
6818
6742
|
}
|
|
6819
6743
|
};
|
|
6820
|
-
|
|
6821
6744
|
const checkIfOfferIsValid = () => moment().diff(moment(props.data.offerPriceEndDate)) < 0;
|
|
6822
|
-
|
|
6823
6745
|
const checkForShowDiscount = () => {
|
|
6824
6746
|
if (props.data.endDate === null || checkIfOfferIsValid()) {
|
|
6825
6747
|
if (data.discount > 0 && data.offerPriceValidFor === 0) {
|
|
@@ -6831,19 +6753,16 @@ const SingleVideoSlide$1 = props => {
|
|
|
6831
6753
|
if (data.offerPriceValidFor <= conversions) {
|
|
6832
6754
|
return false;
|
|
6833
6755
|
}
|
|
6834
|
-
|
|
6835
6756
|
if (data.offerPriceValidFor - conversions < 0) {
|
|
6836
6757
|
return false;
|
|
6837
6758
|
} else {
|
|
6838
6759
|
return true;
|
|
6839
6760
|
}
|
|
6840
6761
|
}
|
|
6841
|
-
|
|
6842
6762
|
if (data.discount > 0) {
|
|
6843
6763
|
return true;
|
|
6844
6764
|
}
|
|
6845
6765
|
};
|
|
6846
|
-
|
|
6847
6766
|
const discount = ({
|
|
6848
6767
|
price,
|
|
6849
6768
|
discount
|
|
@@ -6851,7 +6770,6 @@ const SingleVideoSlide$1 = props => {
|
|
|
6851
6770
|
console.log('discountxx', props.data.price, props.data.discount);
|
|
6852
6771
|
return (discount / price * 100).toFixed(2);
|
|
6853
6772
|
};
|
|
6854
|
-
|
|
6855
6773
|
const classes = useWebinarPromotionPage();
|
|
6856
6774
|
return /*#__PURE__*/React.createElement("div", {
|
|
6857
6775
|
className: classes.videoCarouselContainer
|
|
@@ -6947,9 +6865,10 @@ const SingleVideoSlide$1 = props => {
|
|
|
6947
6865
|
data: {
|
|
6948
6866
|
// link: 'headerData?.loginCtaLink',
|
|
6949
6867
|
// isLink: 1,
|
|
6950
|
-
value: data.isPaid ? 'BUY NOW' : 'REGISTER NOW'
|
|
6951
|
-
|
|
6868
|
+
value: data.isPaid ? 'BUY NOW' : 'REGISTER NOW'
|
|
6869
|
+
// isExternal: 1
|
|
6952
6870
|
},
|
|
6871
|
+
|
|
6953
6872
|
onClick: webinarCtaClick,
|
|
6954
6873
|
type: 'primary',
|
|
6955
6874
|
size: 'medium',
|
|
@@ -6983,7 +6902,7 @@ function CoursePromotionPage$1({
|
|
|
6983
6902
|
}))));
|
|
6984
6903
|
}
|
|
6985
6904
|
|
|
6986
|
-
var index$
|
|
6905
|
+
var index$4 = /*#__PURE__*/Object.freeze({
|
|
6987
6906
|
__proto__: null,
|
|
6988
6907
|
'default': CoursePromotionPage$1
|
|
6989
6908
|
});
|
|
@@ -7283,14 +7202,14 @@ const SingleVideoSlide = props => {
|
|
|
7283
7202
|
isEdit
|
|
7284
7203
|
} = useContext(PageContext);
|
|
7285
7204
|
console.log(isEdit, 'isEdit');
|
|
7286
|
-
useEffect(() => {
|
|
7205
|
+
useEffect(() => {
|
|
7206
|
+
// remaining days epoch
|
|
7287
7207
|
// current date epoch
|
|
7288
7208
|
// subtract remaining days from current day epoch
|
|
7289
7209
|
// moment the result - and see if there are days
|
|
7290
7210
|
// days is present show days
|
|
7291
7211
|
// else start reverse timer
|
|
7292
7212
|
}, []);
|
|
7293
|
-
|
|
7294
7213
|
const renderer = ({
|
|
7295
7214
|
days,
|
|
7296
7215
|
hours,
|
|
@@ -7306,7 +7225,6 @@ const SingleVideoSlide = props => {
|
|
|
7306
7225
|
return /*#__PURE__*/React.createElement("span", null, Math.floor(moment.duration(given.diff(current)).asDays()), " day(s)");
|
|
7307
7226
|
}
|
|
7308
7227
|
};
|
|
7309
|
-
|
|
7310
7228
|
const {
|
|
7311
7229
|
data,
|
|
7312
7230
|
courseBuyNow,
|
|
@@ -7315,9 +7233,7 @@ const SingleVideoSlide = props => {
|
|
|
7315
7233
|
} = props;
|
|
7316
7234
|
const showCourseInstallmentData = data?.courseOverviewData;
|
|
7317
7235
|
const InstalmentData = isEdit ? data?.courseOverviewData?.installments?.formData?.installments[0].installmentAmount : data?.courseOverviewData?.installments?.formData?.installmentInfo?.installments[0].installmentPrice;
|
|
7318
|
-
|
|
7319
7236
|
const checkIfOfferIsValid = () => moment().diff(moment(props?.data?.endDate || 0)) < 0;
|
|
7320
|
-
|
|
7321
7237
|
const checkForShowDiscount = () => {
|
|
7322
7238
|
if (props.data.endDate === null || checkIfOfferIsValid()) {
|
|
7323
7239
|
if (data.discount > 0 && data.offerPriceValidFor === 0) {
|
|
@@ -7329,28 +7245,23 @@ const SingleVideoSlide = props => {
|
|
|
7329
7245
|
if (data.offerPriceValidFor <= conversions) {
|
|
7330
7246
|
return false;
|
|
7331
7247
|
}
|
|
7332
|
-
|
|
7333
7248
|
if (data.offerPriceValidFor - conversions < 0) {
|
|
7334
7249
|
return false;
|
|
7335
7250
|
} else {
|
|
7336
7251
|
return true;
|
|
7337
7252
|
}
|
|
7338
7253
|
}
|
|
7339
|
-
|
|
7340
7254
|
if (data.discount > 0) {
|
|
7341
7255
|
return true;
|
|
7342
7256
|
}
|
|
7343
7257
|
};
|
|
7344
|
-
|
|
7345
7258
|
const classes = useCoursePromotionPage();
|
|
7346
|
-
|
|
7347
7259
|
const discount = ({
|
|
7348
7260
|
price,
|
|
7349
7261
|
discount
|
|
7350
7262
|
}) => {
|
|
7351
7263
|
return (discount / price * 100).toFixed(2);
|
|
7352
7264
|
};
|
|
7353
|
-
|
|
7354
7265
|
return /*#__PURE__*/React.createElement("div", {
|
|
7355
7266
|
className: classes.videoCarouselContainer
|
|
7356
7267
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -7464,15 +7375,16 @@ const SingleVideoSlide = props => {
|
|
|
7464
7375
|
data: {
|
|
7465
7376
|
// link: 'headerData?.loginCtaLink',
|
|
7466
7377
|
// isLink: 1,
|
|
7467
|
-
value: 'BUY NOW'
|
|
7468
|
-
|
|
7378
|
+
value: 'BUY NOW'
|
|
7379
|
+
// isExternal: 1
|
|
7469
7380
|
},
|
|
7381
|
+
|
|
7470
7382
|
onClick: courseBuyNow,
|
|
7471
7383
|
type: 'primary',
|
|
7472
7384
|
size: 'medium',
|
|
7473
7385
|
target: null,
|
|
7474
|
-
rel: null
|
|
7475
|
-
|
|
7386
|
+
rel: null
|
|
7387
|
+
// styling={isMobile ? { margin: '0 40px' } : {}}
|
|
7476
7388
|
})))), showCourseInstallmentData && InstalmentData && /*#__PURE__*/React.createElement("div", {
|
|
7477
7389
|
className: classes.payInstallmentContainer,
|
|
7478
7390
|
onClick: showCourseInstallment
|
|
@@ -7519,7 +7431,7 @@ function CoursePromotionPage({
|
|
|
7519
7431
|
}))));
|
|
7520
7432
|
}
|
|
7521
7433
|
|
|
7522
|
-
var index$
|
|
7434
|
+
var index$3 = /*#__PURE__*/Object.freeze({
|
|
7523
7435
|
__proto__: null,
|
|
7524
7436
|
'default': CoursePromotionPage
|
|
7525
7437
|
});
|
|
@@ -7677,18 +7589,15 @@ const FormPage = ({
|
|
|
7677
7589
|
_id,
|
|
7678
7590
|
baseURLs
|
|
7679
7591
|
} = useContext(PageContext);
|
|
7680
|
-
|
|
7681
7592
|
const handleSubmit = async e => {
|
|
7682
7593
|
e.preventDefault();
|
|
7683
7594
|
let formResponse = [];
|
|
7684
|
-
|
|
7685
7595
|
for (const [key, value] of Object.entries(formData)) {
|
|
7686
7596
|
if (value.questionType === 'MC') {
|
|
7687
7597
|
if (value.solutionArray.length > 1) {
|
|
7688
7598
|
value.solutionArray.shift();
|
|
7689
7599
|
}
|
|
7690
7600
|
}
|
|
7691
|
-
|
|
7692
7601
|
formResponse.push({
|
|
7693
7602
|
questionId: key,
|
|
7694
7603
|
questionName: value.questionName,
|
|
@@ -7696,7 +7605,6 @@ const FormPage = ({
|
|
|
7696
7605
|
solutionArray: value.solutionArray
|
|
7697
7606
|
});
|
|
7698
7607
|
}
|
|
7699
|
-
|
|
7700
7608
|
const data = {
|
|
7701
7609
|
sectionId: sectionData?.components?.[0]?._id || null,
|
|
7702
7610
|
landingPageId: _id || null,
|
|
@@ -7706,7 +7614,6 @@ const FormPage = ({
|
|
|
7706
7614
|
setFormData({});
|
|
7707
7615
|
setformSubmitted(!formSubmitted);
|
|
7708
7616
|
};
|
|
7709
|
-
|
|
7710
7617
|
useEffect(() => {
|
|
7711
7618
|
//add all questions to formData
|
|
7712
7619
|
let formData = {};
|
|
@@ -7719,23 +7626,26 @@ const FormPage = ({
|
|
|
7719
7626
|
});
|
|
7720
7627
|
setFormData(formData);
|
|
7721
7628
|
}, [metadata, formSubmitted]);
|
|
7722
|
-
|
|
7723
7629
|
const handleOnClick = (e, item, option) => {
|
|
7724
7630
|
// if the checkbox is checked
|
|
7725
7631
|
if (!e.target.checked) {
|
|
7726
7632
|
// if the checkbox is checked and the solution array is empty
|
|
7727
7633
|
if (!formData[item._id]?.solutionArray?.length) {
|
|
7728
|
-
setFormData({
|
|
7634
|
+
setFormData({
|
|
7635
|
+
...formData,
|
|
7729
7636
|
[item._id]: {
|
|
7730
7637
|
questionName: item.text,
|
|
7731
7638
|
solutionArray: [option.value],
|
|
7732
7639
|
questionType: 'MC'
|
|
7733
7640
|
}
|
|
7734
7641
|
});
|
|
7735
|
-
}
|
|
7642
|
+
}
|
|
7643
|
+
// if the checkbox is checked and the solution array is not empty and the value is already in the array remove it
|
|
7736
7644
|
else if (formData[item._id]?.solutionArray?.includes(option.value)) {
|
|
7737
7645
|
// if only one value is in the array remove it
|
|
7738
|
-
|
|
7646
|
+
|
|
7647
|
+
setFormData({
|
|
7648
|
+
...formData,
|
|
7739
7649
|
[item._id]: {
|
|
7740
7650
|
questionName: item.text,
|
|
7741
7651
|
solutionArray: formData[item._id]?.solutionArray?.filter(item => item !== option.value),
|
|
@@ -7743,20 +7653,24 @@ const FormPage = ({
|
|
|
7743
7653
|
}
|
|
7744
7654
|
});
|
|
7745
7655
|
}
|
|
7746
|
-
}
|
|
7656
|
+
}
|
|
7657
|
+
// if the checkbox is unchecked
|
|
7747
7658
|
else {
|
|
7748
7659
|
// if the checkbox is unchecked and the solution array is empty
|
|
7749
7660
|
if (typeof formData[item._id]?.solutionArray?.length === 'undefined') {
|
|
7750
|
-
setFormData({
|
|
7661
|
+
setFormData({
|
|
7662
|
+
...formData,
|
|
7751
7663
|
[item._id]: {
|
|
7752
7664
|
questionName: item.text,
|
|
7753
7665
|
solutionArray: [option.value],
|
|
7754
7666
|
questionType: 'MC'
|
|
7755
7667
|
}
|
|
7756
7668
|
});
|
|
7757
|
-
}
|
|
7669
|
+
}
|
|
7670
|
+
// if the checkbox is unchecked and the solution array is not empty and the value is not in the array add it
|
|
7758
7671
|
else if (!formData[item._id]?.solutionArray?.includes(option.value)) {
|
|
7759
|
-
setFormData({
|
|
7672
|
+
setFormData({
|
|
7673
|
+
...formData,
|
|
7760
7674
|
[item._id]: {
|
|
7761
7675
|
questionName: item.text,
|
|
7762
7676
|
solutionArray: [...formData[item._id]?.solutionArray, option.value],
|
|
@@ -7766,7 +7680,6 @@ const FormPage = ({
|
|
|
7766
7680
|
}
|
|
7767
7681
|
}
|
|
7768
7682
|
};
|
|
7769
|
-
|
|
7770
7683
|
return /*#__PURE__*/React.createElement("section", {
|
|
7771
7684
|
className: classes.formPageSection
|
|
7772
7685
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -7793,7 +7706,8 @@ const FormPage = ({
|
|
|
7793
7706
|
placeholder: "Short answer",
|
|
7794
7707
|
name: item._id,
|
|
7795
7708
|
onChange: e => {
|
|
7796
|
-
setFormData({
|
|
7709
|
+
setFormData({
|
|
7710
|
+
...formData,
|
|
7797
7711
|
[item._id]: {
|
|
7798
7712
|
index,
|
|
7799
7713
|
questionName: item.text,
|
|
@@ -7833,11 +7747,13 @@ const FormPage = ({
|
|
|
7833
7747
|
name: "text",
|
|
7834
7748
|
required: item.isRequired,
|
|
7835
7749
|
value: option.value,
|
|
7836
|
-
checked: formData[item._id]?.solutionArray?.[0] === option.value
|
|
7750
|
+
checked: formData[item._id]?.solutionArray?.[0] === option.value
|
|
7751
|
+
// name={option.value}
|
|
7837
7752
|
// id={option.value}
|
|
7838
7753
|
,
|
|
7839
7754
|
onClick: e => {
|
|
7840
|
-
setFormData({
|
|
7755
|
+
setFormData({
|
|
7756
|
+
...formData,
|
|
7841
7757
|
[item._id]: {
|
|
7842
7758
|
questionName: item.text,
|
|
7843
7759
|
solutionArray: [option.value],
|
|
@@ -7853,9 +7769,10 @@ const FormPage = ({
|
|
|
7853
7769
|
data: {
|
|
7854
7770
|
// link: 'headerData?.loginCtaLink',
|
|
7855
7771
|
// isLink: 1,
|
|
7856
|
-
value: 'SUBMIT'
|
|
7857
|
-
|
|
7772
|
+
value: 'SUBMIT'
|
|
7773
|
+
// isExternal: 1
|
|
7858
7774
|
},
|
|
7775
|
+
|
|
7859
7776
|
type: 'primary',
|
|
7860
7777
|
size: 'medium',
|
|
7861
7778
|
target: null,
|
|
@@ -7863,7 +7780,7 @@ const FormPage = ({
|
|
|
7863
7780
|
})))));
|
|
7864
7781
|
};
|
|
7865
7782
|
|
|
7866
|
-
var index$
|
|
7783
|
+
var index$2 = /*#__PURE__*/Object.freeze({
|
|
7867
7784
|
__proto__: null,
|
|
7868
7785
|
'default': FormPage
|
|
7869
7786
|
});
|
|
@@ -7949,7 +7866,6 @@ function Tiles({
|
|
|
7949
7866
|
const nodeData = sectionData.components;
|
|
7950
7867
|
console.log(nodeData);
|
|
7951
7868
|
const tilesList = nodeData[0]?.tilesList.components;
|
|
7952
|
-
|
|
7953
7869
|
const handleClick = value => {
|
|
7954
7870
|
if (!isEdit && value) {
|
|
7955
7871
|
if (value.indexOf('http://') == 0 || value.indexOf('https://') == 0) {
|
|
@@ -7959,7 +7875,6 @@ function Tiles({
|
|
|
7959
7875
|
}
|
|
7960
7876
|
}
|
|
7961
7877
|
};
|
|
7962
|
-
|
|
7963
7878
|
const TileDiv = tilesList?.map((tile, i) => {
|
|
7964
7879
|
return /*#__PURE__*/React.createElement(Fragment, {
|
|
7965
7880
|
key: i
|
|
@@ -7996,11 +7911,427 @@ function Tiles({
|
|
|
7996
7911
|
}, TileDiv)));
|
|
7997
7912
|
}
|
|
7998
7913
|
|
|
7999
|
-
var index = /*#__PURE__*/Object.freeze({
|
|
7914
|
+
var index$1 = /*#__PURE__*/Object.freeze({
|
|
8000
7915
|
__proto__: null,
|
|
8001
7916
|
'default': Tiles
|
|
8002
7917
|
});
|
|
8003
7918
|
|
|
7919
|
+
const useEmailStyles = createUseStyles(theme => ({
|
|
7920
|
+
wrapper: {
|
|
7921
|
+
fontFamily: theme?.typography?.fontFamily,
|
|
7922
|
+
width: '100%',
|
|
7923
|
+
tableLayout: 'fixed',
|
|
7924
|
+
backgroundColor: '#cccccc'
|
|
7925
|
+
},
|
|
7926
|
+
email_description_para: {
|
|
7927
|
+
'& p': {
|
|
7928
|
+
margin: '0 0 0 !important'
|
|
7929
|
+
}
|
|
7930
|
+
},
|
|
7931
|
+
main: {
|
|
7932
|
+
backgroundColor: '#ffffff',
|
|
7933
|
+
width: '100%',
|
|
7934
|
+
maxWidth: '600px',
|
|
7935
|
+
borderSpacing: '0'
|
|
7936
|
+
},
|
|
7937
|
+
logoimg: {
|
|
7938
|
+
width: '28px',
|
|
7939
|
+
height: '28px'
|
|
7940
|
+
/* margin: 18px 0px; */
|
|
7941
|
+
},
|
|
7942
|
+
|
|
7943
|
+
'p-young-guru-title': {
|
|
7944
|
+
fontFamily: theme?.typography?.fontFamily,
|
|
7945
|
+
fontStyle: 'normal',
|
|
7946
|
+
fontWeight: '500',
|
|
7947
|
+
fontSize: '24px',
|
|
7948
|
+
lineHeight: '31px',
|
|
7949
|
+
color: '#ffffff',
|
|
7950
|
+
marginTop: '18px'
|
|
7951
|
+
},
|
|
7952
|
+
'p-young-guru-sub-title': {
|
|
7953
|
+
fontFamily: theme?.typography?.fontFamily,
|
|
7954
|
+
fontStyle: 'normal',
|
|
7955
|
+
fontWeight: '400',
|
|
7956
|
+
fontSize: '16px',
|
|
7957
|
+
lineHeight: '21px',
|
|
7958
|
+
color: '#dbd9d9',
|
|
7959
|
+
marginBottom: '18px'
|
|
7960
|
+
},
|
|
7961
|
+
p: {
|
|
7962
|
+
padding: '0',
|
|
7963
|
+
margin: '0 !important'
|
|
7964
|
+
},
|
|
7965
|
+
'two-columns': {
|
|
7966
|
+
fontSize: '0',
|
|
7967
|
+
textAlign: 'center'
|
|
7968
|
+
/* padding:35px 0 40px */
|
|
7969
|
+
},
|
|
7970
|
+
|
|
7971
|
+
'two-columns .column': {
|
|
7972
|
+
width: '100%',
|
|
7973
|
+
maxWidth: '275px',
|
|
7974
|
+
display: 'inline-block',
|
|
7975
|
+
verticalAlign: 'top'
|
|
7976
|
+
},
|
|
7977
|
+
'title-lead': {
|
|
7978
|
+
fontFamily: theme?.typography?.fontFamily,
|
|
7979
|
+
fontStyle: 'normal',
|
|
7980
|
+
fontWeight: '500',
|
|
7981
|
+
fontSize: '20px',
|
|
7982
|
+
lineHeight: '26px',
|
|
7983
|
+
color: '#030a21',
|
|
7984
|
+
marginBottom: '5px',
|
|
7985
|
+
textAlign: 'left'
|
|
7986
|
+
}
|
|
7987
|
+
|
|
7988
|
+
// @media screen and (max-width: 600px) {
|
|
7989
|
+
// }
|
|
7990
|
+
}));
|
|
7991
|
+
|
|
7992
|
+
function Section({
|
|
7993
|
+
nodeData,
|
|
7994
|
+
emailRef,
|
|
7995
|
+
customHtmlData
|
|
7996
|
+
}) {
|
|
7997
|
+
console.log('customHtmlData', customHtmlData);
|
|
7998
|
+
const header = nodeData?.components[0];
|
|
7999
|
+
const body = nodeData?.components[1];
|
|
8000
|
+
const landing = nodeData?.components[2];
|
|
8001
|
+
const footer = nodeData?.components[3];
|
|
8002
|
+
const classes = useEmailStyles();
|
|
8003
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("center", {
|
|
8004
|
+
className: classes.wrapper,
|
|
8005
|
+
ref: emailRef
|
|
8006
|
+
}, /*#__PURE__*/React.createElement("table", {
|
|
8007
|
+
className: classes.main,
|
|
8008
|
+
style: {
|
|
8009
|
+
width: '100%'
|
|
8010
|
+
}
|
|
8011
|
+
}, /*#__PURE__*/React.createElement("tbody", null, customHtmlData?.isCustomHtml ? /*#__PURE__*/React.createElement("div", {
|
|
8012
|
+
className: classes.email_description_para,
|
|
8013
|
+
dangerouslySetInnerHTML: {
|
|
8014
|
+
__html: `${customHtmlData?.html ? customHtmlData?.html : ''}`
|
|
8015
|
+
// __html: '<div>sdnfksdnflksdnfklsndk</div>'
|
|
8016
|
+
}
|
|
8017
|
+
}) : /*#__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", {
|
|
8018
|
+
style: {
|
|
8019
|
+
textAlign: 'center',
|
|
8020
|
+
background: '#ffffff',
|
|
8021
|
+
paddingTop: '16px',
|
|
8022
|
+
width: '100%'
|
|
8023
|
+
}
|
|
8024
|
+
}, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
|
|
8025
|
+
style: {
|
|
8026
|
+
display: 'inline-block'
|
|
8027
|
+
}
|
|
8028
|
+
}, header?.components[0]?.metadata?.image?.length ? /*#__PURE__*/React.createElement("img", {
|
|
8029
|
+
src: header?.components[0]?.metadata?.image,
|
|
8030
|
+
alt: "",
|
|
8031
|
+
className: classes.logoimg
|
|
8032
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
8033
|
+
style: {
|
|
8034
|
+
display: 'flex',
|
|
8035
|
+
alignItems: 'center',
|
|
8036
|
+
justifyContent: 'center',
|
|
8037
|
+
fontStyle: 'italic',
|
|
8038
|
+
minHeight: '30px'
|
|
8039
|
+
}
|
|
8040
|
+
}, "Your logo")))))), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, header?.components[1]?.metadata?.image?.length ? /*#__PURE__*/React.createElement("img", {
|
|
8041
|
+
src: header?.components[1]?.metadata?.image
|
|
8042
|
+
// width={600}
|
|
8043
|
+
,
|
|
8044
|
+
alt: "",
|
|
8045
|
+
style: {
|
|
8046
|
+
maxWidth: '600px',
|
|
8047
|
+
width: '100%',
|
|
8048
|
+
marginBottom: '-4px'
|
|
8049
|
+
}
|
|
8050
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
8051
|
+
style: {
|
|
8052
|
+
maxWidth: '600px',
|
|
8053
|
+
width: '100%',
|
|
8054
|
+
marginBottom: '-4px',
|
|
8055
|
+
minHeight: '250px',
|
|
8056
|
+
background: '#F4F9FD',
|
|
8057
|
+
display: 'flex',
|
|
8058
|
+
alignItems: 'center',
|
|
8059
|
+
justifyContent: 'center',
|
|
8060
|
+
fontStyle: 'italic'
|
|
8061
|
+
}
|
|
8062
|
+
}, "Cover Image")))) : null, body && body?.isActive ? /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("table", {
|
|
8063
|
+
style: {
|
|
8064
|
+
textAlign: 'center',
|
|
8065
|
+
width: '100%',
|
|
8066
|
+
backgroundColor: '#ffffff'
|
|
8067
|
+
}
|
|
8068
|
+
}, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("p", {
|
|
8069
|
+
style: {
|
|
8070
|
+
// fontFamily: 'Roboto',
|
|
8071
|
+
fontStyle: 'normal',
|
|
8072
|
+
fontWeight: '700',
|
|
8073
|
+
fontSize: '24.2487px',
|
|
8074
|
+
lineHeight: '29px',
|
|
8075
|
+
textAlign: 'center',
|
|
8076
|
+
color: '#00ade7',
|
|
8077
|
+
marginTop: '24px'
|
|
8078
|
+
}
|
|
8079
|
+
}, body?.components[0]?.metadata?.text), /*#__PURE__*/React.createElement("p", {
|
|
8080
|
+
style: {
|
|
8081
|
+
// fontFamily: 'Roboto',
|
|
8082
|
+
fontStyle: 'normal',
|
|
8083
|
+
fontWeight: '500',
|
|
8084
|
+
fontSize: '18.1865px',
|
|
8085
|
+
lineHeight: '22px',
|
|
8086
|
+
textAlign: 'center',
|
|
8087
|
+
color: '#0a1629',
|
|
8088
|
+
marginTop: '8px',
|
|
8089
|
+
marginBottom: '15px'
|
|
8090
|
+
}
|
|
8091
|
+
}, body?.components[1]?.metadata?.text), /*#__PURE__*/React.createElement("p", {
|
|
8092
|
+
style: {
|
|
8093
|
+
maxWidth: '435px',
|
|
8094
|
+
margin: 'auto',
|
|
8095
|
+
// fontFamily: 'Roboto',
|
|
8096
|
+
fontStyle: 'normal',
|
|
8097
|
+
fontWeight: '400',
|
|
8098
|
+
fontSize: '16.1658px',
|
|
8099
|
+
lineHeight: '22px',
|
|
8100
|
+
color: '#3c4852',
|
|
8101
|
+
textAlign: 'left'
|
|
8102
|
+
},
|
|
8103
|
+
dangerouslySetInnerHTML: {
|
|
8104
|
+
__html: body?.components[2]?.metadata?.text
|
|
8105
|
+
},
|
|
8106
|
+
className: classes.email_description_para
|
|
8107
|
+
})))))) : null, landing?.isActive ? /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("table", {
|
|
8108
|
+
style: {
|
|
8109
|
+
width: '100%',
|
|
8110
|
+
padding: '12px'
|
|
8111
|
+
}
|
|
8112
|
+
}, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("table", {
|
|
8113
|
+
style: {
|
|
8114
|
+
width: '100%',
|
|
8115
|
+
background: '#f4f9fd',
|
|
8116
|
+
borderRadius: '16px',
|
|
8117
|
+
padding: '32px',
|
|
8118
|
+
textAlign: 'center'
|
|
8119
|
+
}
|
|
8120
|
+
}, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, landing?.components[0]?.metadata?.image?.length ? /*#__PURE__*/React.createElement("img", {
|
|
8121
|
+
src: landing?.components[0]?.metadata?.image,
|
|
8122
|
+
alt: "",
|
|
8123
|
+
style: {
|
|
8124
|
+
width: '100%'
|
|
8125
|
+
}
|
|
8126
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
8127
|
+
style: {
|
|
8128
|
+
background: '#D9D9D9F0',
|
|
8129
|
+
width: '100%',
|
|
8130
|
+
minHeight: '250px',
|
|
8131
|
+
display: 'flex',
|
|
8132
|
+
alignItems: 'center',
|
|
8133
|
+
justifyContent: 'center',
|
|
8134
|
+
fontStyle: 'italic'
|
|
8135
|
+
}
|
|
8136
|
+
}, "Thumbnail Image"), /*#__PURE__*/React.createElement("p", {
|
|
8137
|
+
style: {
|
|
8138
|
+
// fontFamily: 'Roboto',
|
|
8139
|
+
fontStyle: 'normal',
|
|
8140
|
+
fontWeight: '500',
|
|
8141
|
+
fontSize: '18.1865px',
|
|
8142
|
+
lineHeight: '22px',
|
|
8143
|
+
color: '#0a1629',
|
|
8144
|
+
marginTop: '16px',
|
|
8145
|
+
marginBottom: '16px',
|
|
8146
|
+
textAlign: 'left'
|
|
8147
|
+
}
|
|
8148
|
+
}, landing?.components[1]?.metadata?.text), /*#__PURE__*/React.createElement("a", {
|
|
8149
|
+
href: landing?.components[3]?.metadata?.text,
|
|
8150
|
+
target: "_blank",
|
|
8151
|
+
style: {
|
|
8152
|
+
textDecoration: 'none'
|
|
8153
|
+
}
|
|
8154
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
8155
|
+
style: {
|
|
8156
|
+
background: '#009ae0',
|
|
8157
|
+
borderRadius: '7.18333px',
|
|
8158
|
+
color: 'white',
|
|
8159
|
+
textDecoration: 'none',
|
|
8160
|
+
padding: '12px 0px',
|
|
8161
|
+
// fontFamily: 'Roboto',
|
|
8162
|
+
fontStyle: 'normal',
|
|
8163
|
+
fontWeight: '600',
|
|
8164
|
+
fontSize: '20.55px',
|
|
8165
|
+
lineHeight: '32px',
|
|
8166
|
+
textTransform: 'uppercase',
|
|
8167
|
+
color: '#fafafa'
|
|
8168
|
+
}
|
|
8169
|
+
}, landing?.components[2]?.metadata?.text)))))))))) : null, footer?.isActive ? /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("table", {
|
|
8170
|
+
style: {
|
|
8171
|
+
width: '100%',
|
|
8172
|
+
background: '#e3f0ff',
|
|
8173
|
+
textAlign: 'center'
|
|
8174
|
+
}
|
|
8175
|
+
}, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("p", {
|
|
8176
|
+
style: {
|
|
8177
|
+
// fontFamily: 'Roboto',
|
|
8178
|
+
fontStyle: 'normal',
|
|
8179
|
+
fontWeight: '700',
|
|
8180
|
+
fontSize: '18px',
|
|
8181
|
+
lineHeight: '29px',
|
|
8182
|
+
textAlign: 'center',
|
|
8183
|
+
color: '#0a1629',
|
|
8184
|
+
marginTop: '32px'
|
|
8185
|
+
}
|
|
8186
|
+
}, "Connect with us on:"), /*#__PURE__*/React.createElement("table", {
|
|
8187
|
+
style: {
|
|
8188
|
+
width: '100%',
|
|
8189
|
+
marginTop: '8px',
|
|
8190
|
+
marginBottom: '16px'
|
|
8191
|
+
}
|
|
8192
|
+
}, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", {
|
|
8193
|
+
href: footer?.components[0]?.metadata?.text,
|
|
8194
|
+
target: "_blank",
|
|
8195
|
+
style: {
|
|
8196
|
+
textDecoration: 'none'
|
|
8197
|
+
}
|
|
8198
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
8199
|
+
src: footer?.components[0]?.metadata?.text ? footer?.components[0]?.metadata?.iconUrlColor : footer?.components[0]?.metadata?.iconUrl,
|
|
8200
|
+
alt: "",
|
|
8201
|
+
style: {
|
|
8202
|
+
width: '36px',
|
|
8203
|
+
height: '36px'
|
|
8204
|
+
}
|
|
8205
|
+
})), /*#__PURE__*/React.createElement("a", {
|
|
8206
|
+
href: footer?.components[1]?.metadata?.text,
|
|
8207
|
+
target: "_blank",
|
|
8208
|
+
style: {
|
|
8209
|
+
textDecoration: 'none'
|
|
8210
|
+
}
|
|
8211
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
8212
|
+
src: footer?.components[0]?.metadata?.text ? footer?.components[0]?.metadata?.iconUrlColor : footer?.components[0]?.metadata?.iconUrl,
|
|
8213
|
+
alt: "",
|
|
8214
|
+
style: {
|
|
8215
|
+
width: '36px',
|
|
8216
|
+
height: '36px',
|
|
8217
|
+
margin: '0px 12px'
|
|
8218
|
+
}
|
|
8219
|
+
})), /*#__PURE__*/React.createElement("a", {
|
|
8220
|
+
href: footer?.components[2]?.metadata?.text,
|
|
8221
|
+
target: "_blank",
|
|
8222
|
+
style: {
|
|
8223
|
+
textDecoration: 'none'
|
|
8224
|
+
}
|
|
8225
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
8226
|
+
src: footer?.components[0]?.metadata?.text ? footer?.components[0]?.metadata?.iconUrlColor : footer?.components[0]?.metadata?.iconUrl,
|
|
8227
|
+
alt: "",
|
|
8228
|
+
style: {
|
|
8229
|
+
width: '36px',
|
|
8230
|
+
height: '36px'
|
|
8231
|
+
}
|
|
8232
|
+
})), /*#__PURE__*/React.createElement("a", {
|
|
8233
|
+
href: footer?.components[3]?.metadata?.text,
|
|
8234
|
+
target: "_blank",
|
|
8235
|
+
style: {
|
|
8236
|
+
textDecoration: 'none'
|
|
8237
|
+
}
|
|
8238
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
8239
|
+
src: footer?.components[0]?.metadata?.text ? footer?.components[0]?.metadata?.iconUrlColor : footer?.components[0]?.metadata?.iconUrl,
|
|
8240
|
+
alt: "",
|
|
8241
|
+
style: {
|
|
8242
|
+
width: '36px',
|
|
8243
|
+
height: '36px',
|
|
8244
|
+
margin: '0px 12px'
|
|
8245
|
+
}
|
|
8246
|
+
})), /*#__PURE__*/React.createElement("a", {
|
|
8247
|
+
href: footer?.components[4]?.metadata?.text,
|
|
8248
|
+
target: "_blank",
|
|
8249
|
+
style: {
|
|
8250
|
+
textDecoration: 'none'
|
|
8251
|
+
}
|
|
8252
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
8253
|
+
src: footer?.components[0]?.metadata?.text ? footer?.components[0]?.metadata?.iconUrlColor : footer?.components[0]?.metadata?.iconUrl,
|
|
8254
|
+
alt: "",
|
|
8255
|
+
style: {
|
|
8256
|
+
width: '36px',
|
|
8257
|
+
height: '36px'
|
|
8258
|
+
}
|
|
8259
|
+
})), /*#__PURE__*/React.createElement("table", {
|
|
8260
|
+
style: {
|
|
8261
|
+
width: '100%',
|
|
8262
|
+
marginTop: '13px'
|
|
8263
|
+
}
|
|
8264
|
+
}, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("p", {
|
|
8265
|
+
style: {
|
|
8266
|
+
// fontFamily: 'Roboto',
|
|
8267
|
+
fontStyle: 'normal',
|
|
8268
|
+
fontWeight: '400',
|
|
8269
|
+
fontSize: '14.1451px',
|
|
8270
|
+
lineHeight: '21px',
|
|
8271
|
+
textAlign: 'center',
|
|
8272
|
+
color: '#7d8592'
|
|
8273
|
+
}
|
|
8274
|
+
}, "For any concerns, mail us at", ' ' + footer?.components[5]?.metadata?.text), /*#__PURE__*/React.createElement("p", {
|
|
8275
|
+
style: {
|
|
8276
|
+
// fontFamily: 'Roboto',
|
|
8277
|
+
fontStyle: 'normal',
|
|
8278
|
+
fontWeight: '400',
|
|
8279
|
+
fontSize: '14.1451px',
|
|
8280
|
+
lineHeight: '24px',
|
|
8281
|
+
textAlign: 'center',
|
|
8282
|
+
color: '#7d8592'
|
|
8283
|
+
}
|
|
8284
|
+
}, "Copyright \xA9 2022 |", ' ' + footer?.components[5]?.metadata?.text), /*#__PURE__*/React.createElement("p", {
|
|
8285
|
+
style: {
|
|
8286
|
+
// fontFamily: 'Roboto',
|
|
8287
|
+
fontStyle: 'normal',
|
|
8288
|
+
fontWeight: '400',
|
|
8289
|
+
fontSize: '14.1451px',
|
|
8290
|
+
lineHeight: '24px',
|
|
8291
|
+
textAlign: 'center',
|
|
8292
|
+
color: '#7d8592',
|
|
8293
|
+
marginBottom: '22px'
|
|
8294
|
+
}
|
|
8295
|
+
}, "All rights reserved.")))))))))))))) : null)))));
|
|
8296
|
+
}
|
|
8297
|
+
function EmailDripMarket({
|
|
8298
|
+
sectionData,
|
|
8299
|
+
extraProps = {}
|
|
8300
|
+
}) {
|
|
8301
|
+
console.log('extrapropstemplate', extraProps);
|
|
8302
|
+
const isInitialMount = useRef(true);
|
|
8303
|
+
const convertToHtml = sectionData => {
|
|
8304
|
+
const html = ReactDOMServer.renderToStaticMarkup( /*#__PURE__*/React.createElement(Section, {
|
|
8305
|
+
nodeData: sectionData
|
|
8306
|
+
}));
|
|
8307
|
+
return html;
|
|
8308
|
+
};
|
|
8309
|
+
useEffect(() => {
|
|
8310
|
+
if (isInitialMount.current) {
|
|
8311
|
+
isInitialMount.current = false;
|
|
8312
|
+
} else {
|
|
8313
|
+
extraProps?.callbackHtml(convertToHtml(sectionData));
|
|
8314
|
+
}
|
|
8315
|
+
}, [extraProps?.convertedHtml]);
|
|
8316
|
+
|
|
8317
|
+
// const mockData = sectionData?.sections[0];
|
|
8318
|
+
const emailRef = useRef(null);
|
|
8319
|
+
return /*#__PURE__*/React.createElement("section", {
|
|
8320
|
+
style: {
|
|
8321
|
+
width: '95%'
|
|
8322
|
+
}
|
|
8323
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Section, {
|
|
8324
|
+
sectionRef: emailRef,
|
|
8325
|
+
customHtmlData: extraProps?.customHtmlData,
|
|
8326
|
+
nodeData: sectionData
|
|
8327
|
+
})));
|
|
8328
|
+
}
|
|
8329
|
+
|
|
8330
|
+
var index = /*#__PURE__*/Object.freeze({
|
|
8331
|
+
__proto__: null,
|
|
8332
|
+
'default': EmailDripMarket
|
|
8333
|
+
});
|
|
8334
|
+
|
|
8004
8335
|
const TYPE_TO_COMPONENT_MAP = {
|
|
8005
8336
|
BANNER_CAROUSEL_RIGHT: BannerCarouselRight,
|
|
8006
8337
|
GRID_CARD: List,
|
|
@@ -8022,15 +8353,15 @@ const TYPE_TO_COMPONENT_MAP = {
|
|
|
8022
8353
|
WEBINAR_LANDING_PAGE: CoursePromotionPage$1,
|
|
8023
8354
|
COURSE_LANDING_PAGE: CoursePromotionPage,
|
|
8024
8355
|
FORM_LANDING_PAGE: FormPage,
|
|
8025
|
-
TILES_SECTION: Tiles
|
|
8356
|
+
TILES_SECTION: Tiles,
|
|
8357
|
+
EMAIL_DRIP_MARKET: EmailDripMarket
|
|
8026
8358
|
};
|
|
8027
|
-
|
|
8028
8359
|
const getCompToRender = type => TYPE_TO_COMPONENT_MAP[type] || (() => null);
|
|
8029
|
-
|
|
8030
8360
|
const MemoisedSection = /*#__PURE__*/memo(({
|
|
8031
8361
|
sectionData,
|
|
8032
8362
|
extraProps
|
|
8033
8363
|
}) => {
|
|
8364
|
+
console.log('templatesectiondata', sectionData);
|
|
8034
8365
|
const SectionComp = getCompToRender(sectionData.type);
|
|
8035
8366
|
return /*#__PURE__*/React.createElement(SectionComp, {
|
|
8036
8367
|
sectionData: sectionData,
|
|
@@ -8138,11 +8469,9 @@ const componentParser = compObj => {
|
|
|
8138
8469
|
});
|
|
8139
8470
|
return component;
|
|
8140
8471
|
}
|
|
8141
|
-
|
|
8142
8472
|
if (Array.isArray(compObj.components)) {
|
|
8143
8473
|
compObj.components = compObj.components.map(componentParser);
|
|
8144
8474
|
}
|
|
8145
|
-
|
|
8146
8475
|
return compObj;
|
|
8147
8476
|
};
|
|
8148
8477
|
const inverseComponentParser = compObj => {
|
|
@@ -8167,7 +8496,6 @@ const inverseComponentParser = compObj => {
|
|
|
8167
8496
|
if (compObj.components) {
|
|
8168
8497
|
compObj.components = compObj.components.map(inverseComponentParser);
|
|
8169
8498
|
}
|
|
8170
|
-
|
|
8171
8499
|
return compObj;
|
|
8172
8500
|
}
|
|
8173
8501
|
};
|