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.js
CHANGED
|
@@ -1068,7 +1068,8 @@ function OptionList({
|
|
|
1068
1068
|
moreContent,
|
|
1069
1069
|
navDataCount,
|
|
1070
1070
|
isTutorWebsite,
|
|
1071
|
-
isLandingPages
|
|
1071
|
+
isLandingPages,
|
|
1072
|
+
onDownloadAppTriggered
|
|
1072
1073
|
}) {
|
|
1073
1074
|
const {
|
|
1074
1075
|
isPreview,
|
|
@@ -1087,7 +1088,9 @@ function OptionList({
|
|
|
1087
1088
|
};
|
|
1088
1089
|
const tabData = tabsDataModifier();
|
|
1089
1090
|
const classes = useSectionStyles$a();
|
|
1090
|
-
|
|
1091
|
+
|
|
1092
|
+
// console.log(headerData, 'sakshat header options');
|
|
1093
|
+
|
|
1091
1094
|
const isAndroidDelisted = headerData?.isAndroidDelisted;
|
|
1092
1095
|
const apkURL = headerData?.apkURL;
|
|
1093
1096
|
const downloadApkURL = isAndroidDelisted && apkURL ? apkURL : null;
|
|
@@ -1097,7 +1100,12 @@ function OptionList({
|
|
|
1097
1100
|
download: true,
|
|
1098
1101
|
href: headerData?.apkURL,
|
|
1099
1102
|
target: "_blank",
|
|
1100
|
-
className: classes.socialBtnItems
|
|
1103
|
+
className: classes.socialBtnItems,
|
|
1104
|
+
onClick: () => {
|
|
1105
|
+
if (typeof onDownloadAppTriggered == "function") {
|
|
1106
|
+
onDownloadAppTriggered(isAndroidDelisted, headerData?.apkURL);
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1101
1109
|
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
1102
1110
|
style: {
|
|
1103
1111
|
width: '139px',
|
|
@@ -1135,7 +1143,10 @@ function OptionList({
|
|
|
1135
1143
|
};
|
|
1136
1144
|
const iosLink = isTutorWebsite ? headerData?.iosDownloadLink : headerData?.iosUrl;
|
|
1137
1145
|
const androidLink = isTutorWebsite ? headerData?.androidDownloadLink : headerData?.appLink;
|
|
1138
|
-
|
|
1146
|
+
|
|
1147
|
+
// console.log(iosLink, 'sakshat ios link');
|
|
1148
|
+
// console.log(androidLink, 'sakshat android link');
|
|
1149
|
+
|
|
1139
1150
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1140
1151
|
className: classes.listSection
|
|
1141
1152
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -1285,7 +1296,8 @@ function DesktopHeader({
|
|
|
1285
1296
|
header,
|
|
1286
1297
|
navData,
|
|
1287
1298
|
isTutorWebsite,
|
|
1288
|
-
isLandingPage = false
|
|
1299
|
+
isLandingPage = false,
|
|
1300
|
+
onDownloadAppTriggered
|
|
1289
1301
|
}) {
|
|
1290
1302
|
const {
|
|
1291
1303
|
isFixed = true
|
|
@@ -1319,7 +1331,9 @@ function DesktopHeader({
|
|
|
1319
1331
|
}
|
|
1320
1332
|
return moreContent;
|
|
1321
1333
|
};
|
|
1322
|
-
|
|
1334
|
+
|
|
1335
|
+
// console.log(header, 'sakshat header desktop');
|
|
1336
|
+
|
|
1323
1337
|
return /*#__PURE__*/React__default["default"].createElement("nav", {
|
|
1324
1338
|
className: classes.section
|
|
1325
1339
|
}, !(header?.websiteLogo === DEFAULT_HEADER_IMAGE_LP && isCustomWebsite) ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -1352,7 +1366,8 @@ function DesktopHeader({
|
|
|
1352
1366
|
isMobile: false,
|
|
1353
1367
|
isLandingPages: isLandingPage,
|
|
1354
1368
|
moreContent: moreContentFn(),
|
|
1355
|
-
isTutorWebsite: isTutorWebsite
|
|
1369
|
+
isTutorWebsite: isTutorWebsite,
|
|
1370
|
+
onDownloadAppTriggered: onDownloadAppTriggered
|
|
1356
1371
|
}))) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1357
1372
|
style: {
|
|
1358
1373
|
paddingTop: '30px'
|
|
@@ -1364,7 +1379,8 @@ function MobileHeader({
|
|
|
1364
1379
|
header,
|
|
1365
1380
|
navData,
|
|
1366
1381
|
isTutorWebsite,
|
|
1367
|
-
isLandingPage = false
|
|
1382
|
+
isLandingPage = false,
|
|
1383
|
+
onDownloadAppTriggered
|
|
1368
1384
|
}) {
|
|
1369
1385
|
const {
|
|
1370
1386
|
isCustomWebsite,
|
|
@@ -1396,22 +1412,29 @@ function MobileHeader({
|
|
|
1396
1412
|
const downloadAppText = countryCode === 'KR' ? '앱다운로드' : 'Download App';
|
|
1397
1413
|
const apkURL = header?.apkURL;
|
|
1398
1414
|
const isAndroidDelisted = header?.isAndroidDelisted;
|
|
1399
|
-
const iosDownloadLink = header?.iosDownloadLink;
|
|
1415
|
+
const iosDownloadLink = header?.iosDownloadLink || header?.iosUrl;
|
|
1400
1416
|
const androidDownloadLink = header?.androidDownloadLink;
|
|
1401
|
-
|
|
1417
|
+
|
|
1418
|
+
// console.log(header, 'sakshat header mobile');
|
|
1419
|
+
|
|
1402
1420
|
if (isTutorWebsite) {
|
|
1403
1421
|
if (isAndroidDelisted && apkURL) {
|
|
1404
1422
|
downloadLink = /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
1405
1423
|
data: {
|
|
1406
|
-
link: getAppDownloadLink(apkURL, iosDownloadLink),
|
|
1407
|
-
isLink: 1,
|
|
1408
1424
|
value: downloadAppText,
|
|
1409
1425
|
isExternal: 1
|
|
1410
1426
|
},
|
|
1411
1427
|
type: 'primary',
|
|
1412
1428
|
size: 'small',
|
|
1413
1429
|
target: 'blank',
|
|
1414
|
-
rel: null
|
|
1430
|
+
rel: null,
|
|
1431
|
+
onClick: () => {
|
|
1432
|
+
let url = getAppDownloadLink(apkURL, iosDownloadLink);
|
|
1433
|
+
window.open(url, "_blank");
|
|
1434
|
+
if (!header?.iosUrl && typeof onDownloadAppTriggered == "function") {
|
|
1435
|
+
onDownloadAppTriggered(header?.isAndroidDelisted, header?.apkURL);
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1415
1438
|
});
|
|
1416
1439
|
} else if (androidDownloadLink?.length || iosDownloadLink?.length) {
|
|
1417
1440
|
downloadLink = /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
@@ -1433,15 +1456,20 @@ function MobileHeader({
|
|
|
1433
1456
|
if (isAndroidDelisted && apkURL) {
|
|
1434
1457
|
downloadLink = /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
1435
1458
|
data: {
|
|
1436
|
-
link: getAppDownloadLink(header?.apkURL, header?.iosUrl),
|
|
1437
|
-
isLink: 1,
|
|
1438
1459
|
value: downloadAppText,
|
|
1439
1460
|
isExternal: 1
|
|
1440
1461
|
},
|
|
1441
1462
|
type: 'primary',
|
|
1442
1463
|
size: 'small',
|
|
1443
1464
|
target: 'blank',
|
|
1444
|
-
rel: null
|
|
1465
|
+
rel: null,
|
|
1466
|
+
onClick: () => {
|
|
1467
|
+
let url = getAppDownloadLink(apkURL, iosDownloadLink);
|
|
1468
|
+
window.open(url, "_blank");
|
|
1469
|
+
if (!header?.iosUrl && typeof onDownloadAppTriggered == "function") {
|
|
1470
|
+
onDownloadAppTriggered(header?.isAndroidDelisted, header?.apkURL);
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1445
1473
|
});
|
|
1446
1474
|
} else if (header?.appLink || header?.iosUrl) {
|
|
1447
1475
|
console.log('inside custom website');
|
|
@@ -1519,7 +1547,8 @@ function MobileHeader({
|
|
|
1519
1547
|
|
|
1520
1548
|
function Header({
|
|
1521
1549
|
data,
|
|
1522
|
-
isLandingPage
|
|
1550
|
+
isLandingPage,
|
|
1551
|
+
extraProps
|
|
1523
1552
|
}) {
|
|
1524
1553
|
const {
|
|
1525
1554
|
isMobile,
|
|
@@ -1532,12 +1561,14 @@ function Header({
|
|
|
1532
1561
|
navData: filterHiddenNavs(),
|
|
1533
1562
|
header: data,
|
|
1534
1563
|
isTutorWebsite: isTutorWebsite,
|
|
1535
|
-
isLandingPage: isLandingPage
|
|
1564
|
+
isLandingPage: isLandingPage,
|
|
1565
|
+
onDownloadAppTriggered: extraProps.DownloadAppButtonTriggered
|
|
1536
1566
|
}) : /*#__PURE__*/React__default["default"].createElement(DesktopHeader, {
|
|
1537
1567
|
navData: filterHiddenNavs(),
|
|
1538
1568
|
header: data,
|
|
1539
1569
|
isTutorWebsite: isTutorWebsite,
|
|
1540
|
-
isLandingPage: isLandingPage
|
|
1570
|
+
isLandingPage: isLandingPage,
|
|
1571
|
+
onDownloadAppTriggered: extraProps.DownloadAppButtonTriggered
|
|
1541
1572
|
});
|
|
1542
1573
|
}
|
|
1543
1574
|
|
|
@@ -9706,7 +9737,8 @@ function PageRenderer({
|
|
|
9706
9737
|
isHeader: true
|
|
9707
9738
|
}, /*#__PURE__*/React__default["default"].createElement(Header, {
|
|
9708
9739
|
data: header,
|
|
9709
|
-
isLandingPage: isLandingPage
|
|
9740
|
+
isLandingPage: isLandingPage,
|
|
9741
|
+
extraProps: extraProps
|
|
9710
9742
|
})), sections?.length ? sections?.map((sectionData, sectionIndex) => /*#__PURE__*/React__default["default"].createElement(Wrapper, _extends({}, !!SectionWrapper && {
|
|
9711
9743
|
sectionData,
|
|
9712
9744
|
sectionIndex
|