diy-template-components 2.0.10 → 2.0.12
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 +52 -20
- package/build/index.es.js.map +1 -1
- package/build/index.js +52 -20
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -1052,7 +1052,8 @@ function OptionList({
|
|
|
1052
1052
|
moreContent,
|
|
1053
1053
|
navDataCount,
|
|
1054
1054
|
isTutorWebsite,
|
|
1055
|
-
isLandingPages
|
|
1055
|
+
isLandingPages,
|
|
1056
|
+
onDownloadAppTriggered
|
|
1056
1057
|
}) {
|
|
1057
1058
|
const {
|
|
1058
1059
|
isPreview,
|
|
@@ -1071,7 +1072,9 @@ function OptionList({
|
|
|
1071
1072
|
};
|
|
1072
1073
|
const tabData = tabsDataModifier();
|
|
1073
1074
|
const classes = useSectionStyles$a();
|
|
1074
|
-
|
|
1075
|
+
|
|
1076
|
+
// console.log(headerData, 'sakshat header options');
|
|
1077
|
+
|
|
1075
1078
|
const isAndroidDelisted = headerData?.isAndroidDelisted;
|
|
1076
1079
|
const apkURL = headerData?.apkURL;
|
|
1077
1080
|
const downloadApkURL = isAndroidDelisted && apkURL ? apkURL : null;
|
|
@@ -1081,7 +1084,12 @@ function OptionList({
|
|
|
1081
1084
|
download: true,
|
|
1082
1085
|
href: headerData?.apkURL,
|
|
1083
1086
|
target: "_blank",
|
|
1084
|
-
className: classes.socialBtnItems
|
|
1087
|
+
className: classes.socialBtnItems,
|
|
1088
|
+
onClick: () => {
|
|
1089
|
+
if (typeof onDownloadAppTriggered == "function") {
|
|
1090
|
+
onDownloadAppTriggered(isAndroidDelisted, headerData?.apkURL);
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1085
1093
|
}, /*#__PURE__*/React.createElement("img", {
|
|
1086
1094
|
style: {
|
|
1087
1095
|
width: '139px',
|
|
@@ -1119,7 +1127,10 @@ function OptionList({
|
|
|
1119
1127
|
};
|
|
1120
1128
|
const iosLink = isTutorWebsite ? headerData?.iosDownloadLink : headerData?.iosUrl;
|
|
1121
1129
|
const androidLink = isTutorWebsite ? headerData?.androidDownloadLink : headerData?.appLink;
|
|
1122
|
-
|
|
1130
|
+
|
|
1131
|
+
// console.log(iosLink, 'sakshat ios link');
|
|
1132
|
+
// console.log(androidLink, 'sakshat android link');
|
|
1133
|
+
|
|
1123
1134
|
return /*#__PURE__*/React.createElement("div", {
|
|
1124
1135
|
className: classes.listSection
|
|
1125
1136
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1269,7 +1280,8 @@ function DesktopHeader({
|
|
|
1269
1280
|
header,
|
|
1270
1281
|
navData,
|
|
1271
1282
|
isTutorWebsite,
|
|
1272
|
-
isLandingPage = false
|
|
1283
|
+
isLandingPage = false,
|
|
1284
|
+
onDownloadAppTriggered
|
|
1273
1285
|
}) {
|
|
1274
1286
|
const {
|
|
1275
1287
|
isFixed = true
|
|
@@ -1303,7 +1315,9 @@ function DesktopHeader({
|
|
|
1303
1315
|
}
|
|
1304
1316
|
return moreContent;
|
|
1305
1317
|
};
|
|
1306
|
-
|
|
1318
|
+
|
|
1319
|
+
// console.log(header, 'sakshat header desktop');
|
|
1320
|
+
|
|
1307
1321
|
return /*#__PURE__*/React.createElement("nav", {
|
|
1308
1322
|
className: classes.section
|
|
1309
1323
|
}, !(header?.websiteLogo === DEFAULT_HEADER_IMAGE_LP && isCustomWebsite) ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -1336,7 +1350,8 @@ function DesktopHeader({
|
|
|
1336
1350
|
isMobile: false,
|
|
1337
1351
|
isLandingPages: isLandingPage,
|
|
1338
1352
|
moreContent: moreContentFn(),
|
|
1339
|
-
isTutorWebsite: isTutorWebsite
|
|
1353
|
+
isTutorWebsite: isTutorWebsite,
|
|
1354
|
+
onDownloadAppTriggered: onDownloadAppTriggered
|
|
1340
1355
|
}))) : /*#__PURE__*/React.createElement("div", {
|
|
1341
1356
|
style: {
|
|
1342
1357
|
paddingTop: '30px'
|
|
@@ -1348,7 +1363,8 @@ function MobileHeader({
|
|
|
1348
1363
|
header,
|
|
1349
1364
|
navData,
|
|
1350
1365
|
isTutorWebsite,
|
|
1351
|
-
isLandingPage = false
|
|
1366
|
+
isLandingPage = false,
|
|
1367
|
+
onDownloadAppTriggered
|
|
1352
1368
|
}) {
|
|
1353
1369
|
const {
|
|
1354
1370
|
isCustomWebsite,
|
|
@@ -1380,22 +1396,29 @@ function MobileHeader({
|
|
|
1380
1396
|
const downloadAppText = countryCode === 'KR' ? '앱다운로드' : 'Download App';
|
|
1381
1397
|
const apkURL = header?.apkURL;
|
|
1382
1398
|
const isAndroidDelisted = header?.isAndroidDelisted;
|
|
1383
|
-
const iosDownloadLink = header?.iosDownloadLink;
|
|
1399
|
+
const iosDownloadLink = header?.iosDownloadLink || header?.iosUrl;
|
|
1384
1400
|
const androidDownloadLink = header?.androidDownloadLink;
|
|
1385
|
-
|
|
1401
|
+
|
|
1402
|
+
// console.log(header, 'sakshat header mobile');
|
|
1403
|
+
|
|
1386
1404
|
if (isTutorWebsite) {
|
|
1387
1405
|
if (isAndroidDelisted && apkURL) {
|
|
1388
1406
|
downloadLink = /*#__PURE__*/React.createElement(Button, {
|
|
1389
1407
|
data: {
|
|
1390
|
-
link: getAppDownloadLink(apkURL, iosDownloadLink),
|
|
1391
|
-
isLink: 1,
|
|
1392
1408
|
value: downloadAppText,
|
|
1393
1409
|
isExternal: 1
|
|
1394
1410
|
},
|
|
1395
1411
|
type: 'primary',
|
|
1396
1412
|
size: 'small',
|
|
1397
1413
|
target: 'blank',
|
|
1398
|
-
rel: null
|
|
1414
|
+
rel: null,
|
|
1415
|
+
onClick: () => {
|
|
1416
|
+
let url = getAppDownloadLink(apkURL, iosDownloadLink);
|
|
1417
|
+
window.open(url, "_blank");
|
|
1418
|
+
if (!header?.iosUrl && typeof onDownloadAppTriggered == "function") {
|
|
1419
|
+
onDownloadAppTriggered(header?.isAndroidDelisted, header?.apkURL);
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1399
1422
|
});
|
|
1400
1423
|
} else if (androidDownloadLink?.length || iosDownloadLink?.length) {
|
|
1401
1424
|
downloadLink = /*#__PURE__*/React.createElement(Button, {
|
|
@@ -1417,15 +1440,20 @@ function MobileHeader({
|
|
|
1417
1440
|
if (isAndroidDelisted && apkURL) {
|
|
1418
1441
|
downloadLink = /*#__PURE__*/React.createElement(Button, {
|
|
1419
1442
|
data: {
|
|
1420
|
-
link: getAppDownloadLink(header?.apkURL, header?.iosUrl),
|
|
1421
|
-
isLink: 1,
|
|
1422
1443
|
value: downloadAppText,
|
|
1423
1444
|
isExternal: 1
|
|
1424
1445
|
},
|
|
1425
1446
|
type: 'primary',
|
|
1426
1447
|
size: 'small',
|
|
1427
1448
|
target: 'blank',
|
|
1428
|
-
rel: null
|
|
1449
|
+
rel: null,
|
|
1450
|
+
onClick: () => {
|
|
1451
|
+
let url = getAppDownloadLink(apkURL, iosDownloadLink);
|
|
1452
|
+
window.open(url, "_blank");
|
|
1453
|
+
if (!header?.iosUrl && typeof onDownloadAppTriggered == "function") {
|
|
1454
|
+
onDownloadAppTriggered(header?.isAndroidDelisted, header?.apkURL);
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1429
1457
|
});
|
|
1430
1458
|
} else if (header?.appLink || header?.iosUrl) {
|
|
1431
1459
|
console.log('inside custom website');
|
|
@@ -1503,7 +1531,8 @@ function MobileHeader({
|
|
|
1503
1531
|
|
|
1504
1532
|
function Header({
|
|
1505
1533
|
data,
|
|
1506
|
-
isLandingPage
|
|
1534
|
+
isLandingPage,
|
|
1535
|
+
extraProps
|
|
1507
1536
|
}) {
|
|
1508
1537
|
const {
|
|
1509
1538
|
isMobile,
|
|
@@ -1516,12 +1545,14 @@ function Header({
|
|
|
1516
1545
|
navData: filterHiddenNavs(),
|
|
1517
1546
|
header: data,
|
|
1518
1547
|
isTutorWebsite: isTutorWebsite,
|
|
1519
|
-
isLandingPage: isLandingPage
|
|
1548
|
+
isLandingPage: isLandingPage,
|
|
1549
|
+
onDownloadAppTriggered: extraProps.DownloadAppButtonTriggered
|
|
1520
1550
|
}) : /*#__PURE__*/React.createElement(DesktopHeader, {
|
|
1521
1551
|
navData: filterHiddenNavs(),
|
|
1522
1552
|
header: data,
|
|
1523
1553
|
isTutorWebsite: isTutorWebsite,
|
|
1524
|
-
isLandingPage: isLandingPage
|
|
1554
|
+
isLandingPage: isLandingPage,
|
|
1555
|
+
onDownloadAppTriggered: extraProps.DownloadAppButtonTriggered
|
|
1525
1556
|
});
|
|
1526
1557
|
}
|
|
1527
1558
|
|
|
@@ -9690,7 +9721,8 @@ function PageRenderer({
|
|
|
9690
9721
|
isHeader: true
|
|
9691
9722
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
9692
9723
|
data: header,
|
|
9693
|
-
isLandingPage: isLandingPage
|
|
9724
|
+
isLandingPage: isLandingPage,
|
|
9725
|
+
extraProps: extraProps
|
|
9694
9726
|
})), sections?.length ? sections?.map((sectionData, sectionIndex) => /*#__PURE__*/React.createElement(Wrapper, _extends({}, !!SectionWrapper && {
|
|
9695
9727
|
sectionData,
|
|
9696
9728
|
sectionIndex
|