pb-sxp-ui 1.10.2 → 1.10.4
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/dist/index.cjs +133 -75
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +133 -75
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +4 -4
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +133 -75
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +4 -4
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/WaterFall/List.js +2 -2
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +2 -2
- package/es/core/components/SxpPageRender/index.js +26 -18
- package/es/core/context/SxpDataSourceProvider.d.ts +6 -0
- package/es/core/context/SxpDataSourceProvider.js +62 -16
- package/es/core/hooks/useEventReport.d.ts +1 -1
- package/es/core/hooks/useEventReport.js +10 -3
- package/es/materials/sxp/MultiPosts/index.js +6 -12
- package/es/materials/sxp/cta/AniLink/index.js +2 -2
- package/es/materials/sxp/cta/AniLinkPopup/index.js +2 -2
- package/es/materials/sxp/popup/AppointForm/index.js +2 -2
- package/es/materials/sxp/popup/CommodityDetail/index.js +2 -2
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -2
- package/es/materials/sxp/popup/CommodityList/index.js +3 -3
- package/es/materials/sxp/popup/Prompt/index.js +2 -2
- package/es/materials/sxp/template/Link/index.js +1 -3
- package/es/materials/sxp/template/components/EventProvider.js +3 -3
- package/lib/core/components/SxpPageRender/WaterFall/List.js +2 -2
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +2 -2
- package/lib/core/components/SxpPageRender/index.js +26 -18
- package/lib/core/context/SxpDataSourceProvider.d.ts +6 -0
- package/lib/core/context/SxpDataSourceProvider.js +62 -16
- package/lib/core/hooks/useEventReport.d.ts +1 -1
- package/lib/core/hooks/useEventReport.js +10 -3
- package/lib/materials/sxp/MultiPosts/index.js +6 -12
- package/lib/materials/sxp/cta/AniLink/index.js +2 -2
- package/lib/materials/sxp/cta/AniLinkPopup/index.js +2 -2
- package/lib/materials/sxp/popup/AppointForm/index.js +2 -2
- package/lib/materials/sxp/popup/CommodityDetail/index.js +2 -2
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -2
- package/lib/materials/sxp/popup/CommodityList/index.js +3 -3
- package/lib/materials/sxp/popup/Prompt/index.js +2 -2
- package/lib/materials/sxp/template/Link/index.js +1 -3
- package/lib/materials/sxp/template/components/EventProvider.js +3 -3
- package/package.json +1 -1
package/dist/pb-ui.js
CHANGED
@@ -670,10 +670,13 @@
|
|
670
670
|
const popupCurTimeRef = React.useRef(null);
|
671
671
|
const [isNoMoreData, setIsNoMoreData] = React.useState(false);
|
672
672
|
const [globalConfig, setGlobalConfig] = React.useState((_b = (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf) === null || _b === void 0 ? void 0 : _b.globalConfig);
|
673
|
-
const [pageData, setPageData] = React.useState(
|
673
|
+
const [pageData, setPageData] = React.useState();
|
674
674
|
const [showConsent, setShowConsent] = React.useState(false);
|
675
675
|
const [layoutVariantId, setLayoutVariantId] = React.useState();
|
676
676
|
const [channel, setChannel] = React.useState();
|
677
|
+
const [eventTimeList, setEventTimeList] = React.useState([]);
|
678
|
+
const [playbookType, setPlaybookType] = React.useState();
|
679
|
+
const finalPageData = React.useMemo(() => pageData !== null && pageData !== void 0 ? pageData : data, [pageData, data]);
|
677
680
|
const isShowConsent = React.useMemo(() => {
|
678
681
|
var _a, _b, _c, _d;
|
679
682
|
return (((((_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.privacy_necessity) && !isAgreePolicy && !isEditor) || isOpenConsent) &&
|
@@ -696,6 +699,24 @@
|
|
696
699
|
})) !== null && _a !== void 0 ? _a : [];
|
697
700
|
return nList;
|
698
701
|
}, []);
|
702
|
+
React.useEffect(() => {
|
703
|
+
let intervalId;
|
704
|
+
if (eventTimeList.length > 0) {
|
705
|
+
// 定期检查数组中的时间
|
706
|
+
const checkTimes = () => {
|
707
|
+
const now = new Date(); // 获取当前时间
|
708
|
+
const threshold = 15 * 1000; // 15秒的毫秒数
|
709
|
+
// 过滤掉超过15秒的时间
|
710
|
+
setEventTimeList((prevArray) => prevArray.filter((item) => now - item.time <= threshold));
|
711
|
+
};
|
712
|
+
// 每秒检查一次
|
713
|
+
intervalId = setInterval(checkTimes, 1000);
|
714
|
+
}
|
715
|
+
// 清理函数
|
716
|
+
return () => {
|
717
|
+
clearInterval(intervalId);
|
718
|
+
};
|
719
|
+
}, [eventTimeList]); // 依赖于 timeArray
|
699
720
|
React.useEffect(() => {
|
700
721
|
const handleChangeThemeTag = (tag) => {
|
701
722
|
themeTag.current = tag;
|
@@ -842,7 +863,7 @@
|
|
842
863
|
};
|
843
864
|
}
|
844
865
|
const sessionID = storeAndLoadFeSessionId();
|
845
|
-
const ef = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), (getDevice$1() && { sxpDevice: getDevice$1() })), (getSystem() && { sxpSystem: getSystem() })), (getBrowserInfo() && { sxpBrowser: getBrowserInfo() })), {
|
866
|
+
const ef = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, { playbookType }), eventInfo), (getDevice$1() && { sxpDevice: getDevice$1() })), (getSystem() && { sxpSystem: getSystem() })), (getBrowserInfo() && { sxpBrowser: getBrowserInfo() })), (layoutVariantId && reportLayId && { layoutVariantId })), ((eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.position) && channel && { position: Number(eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.position) + 1 + '' }));
|
846
867
|
const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
|
847
868
|
const realEventInfo = Object.entries(ef)
|
848
869
|
.map(([k, v]) => v && { name: k, value: v })
|
@@ -856,7 +877,7 @@
|
|
856
877
|
body: { userInfo: realUserInfo, eventInfo: realEventInfo },
|
857
878
|
type: 'beacon'
|
858
879
|
});
|
859
|
-
}, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview, layoutVariantId]);
|
880
|
+
}, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview, layoutVariantId, globalConfig, playbookType]);
|
860
881
|
const bffFbReport = React.useCallback(({ eventName, product }) => {
|
861
882
|
var _a, _b, _c, _d, _e;
|
862
883
|
if (!enableReportEvent ||
|
@@ -1017,17 +1038,14 @@
|
|
1017
1038
|
return;
|
1018
1039
|
setLoading(true);
|
1019
1040
|
let layId;
|
1041
|
+
let pbType;
|
1020
1042
|
getRecommendVideos()
|
1021
1043
|
.then((data) => {
|
1022
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
1044
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
1023
1045
|
if (data) {
|
1024
1046
|
const list = getFilterRecList(data);
|
1025
|
-
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.playbook) === 'organic menu' && !channel) {
|
1026
|
-
list.unshift('organic menu');
|
1027
|
-
}
|
1028
|
-
setRtcList(list);
|
1029
|
-
setCacheRtcList(list);
|
1030
1047
|
let curData;
|
1048
|
+
let gldata;
|
1031
1049
|
if (data === null || data === void 0 ? void 0 : data.layoutVariantId) {
|
1032
1050
|
const id = (_b = (_a = data === null || data === void 0 ? void 0 : data.layoutVariantId) === null || _a === void 0 ? void 0 : _a.split('-')) === null || _b === void 0 ? void 0 : _b[1];
|
1033
1051
|
if (id) {
|
@@ -1037,19 +1055,49 @@
|
|
1037
1055
|
if (curData) {
|
1038
1056
|
setPageData(curData);
|
1039
1057
|
document.title = (_c = curData === null || curData === void 0 ? void 0 : curData.name) !== null && _c !== void 0 ? _c : 'home';
|
1040
|
-
|
1058
|
+
gldata = (_e = (_d = curData === null || curData === void 0 ? void 0 : curData.data) === null || _d === void 0 ? void 0 : _d.sxpPageConf) === null || _e === void 0 ? void 0 : _e.globalConfig;
|
1059
|
+
setGlobalConfig(gldata);
|
1041
1060
|
onUpdateSchema === null || onUpdateSchema === void 0 ? void 0 : onUpdateSchema(curData === null || curData === void 0 ? void 0 : curData.data);
|
1042
|
-
if ((
|
1061
|
+
if ((_j = (_h = (_g = (_f = gldata === null || gldata === void 0 ? void 0 : gldata.consent) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.item) === null || _h === void 0 ? void 0 : _h.props) === null || _j === void 0 ? void 0 : _j.privacy_necessity)
|
1043
1062
|
setShowConsent(true);
|
1044
1063
|
}
|
1064
|
+
else {
|
1065
|
+
setShowConsent(true);
|
1066
|
+
}
|
1067
|
+
}
|
1068
|
+
}
|
1069
|
+
else {
|
1070
|
+
setShowConsent(true);
|
1071
|
+
}
|
1072
|
+
if (!channel) {
|
1073
|
+
if ((gldata === null || gldata === void 0 ? void 0 : gldata.playbook) === 'organic menu' || (!gldata && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.playbook) === 'organic menu')) {
|
1074
|
+
setPlaybookType('organicMenu');
|
1075
|
+
list.unshift('organic menu');
|
1076
|
+
pbType = 'organicMenu';
|
1045
1077
|
}
|
1078
|
+
else {
|
1079
|
+
setPlaybookType('paidMedia');
|
1080
|
+
pbType = 'paidMedia';
|
1081
|
+
}
|
1082
|
+
}
|
1083
|
+
setRtcList(list);
|
1084
|
+
setCacheRtcList(list);
|
1085
|
+
bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
|
1086
|
+
if (channel) {
|
1087
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
1088
|
+
eventInfo: {
|
1089
|
+
eventSubject: 'multiPostClick',
|
1090
|
+
eventDescription: 'multiPostClick',
|
1091
|
+
traceInfo: (_m = (_l = (_k = list === null || list === void 0 ? void 0 : list[0]) === null || _k === void 0 ? void 0 : _k.video) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : '',
|
1092
|
+
branchfeed: channel
|
1093
|
+
}
|
1094
|
+
});
|
1046
1095
|
}
|
1047
|
-
bffGetTagList(curData !== null && curData !== void 0 ? curData : pageData);
|
1048
1096
|
}
|
1049
1097
|
})
|
1050
1098
|
.finally(() => {
|
1051
1099
|
bffEventReport({
|
1052
|
-
eventInfo: Object.assign({ eventSubject: 'apiRequest', eventDescription: 'api request succeed' }, (layId && { layoutVariantId: layId }))
|
1100
|
+
eventInfo: Object.assign(Object.assign({ eventSubject: 'apiRequest', eventDescription: 'api request succeed' }, (layId && { layoutVariantId: layId })), (pbType && { playbookType: pbType }))
|
1053
1101
|
});
|
1054
1102
|
setLoading(false);
|
1055
1103
|
});
|
@@ -1059,7 +1107,7 @@
|
|
1059
1107
|
if (!isPreview)
|
1060
1108
|
return;
|
1061
1109
|
setLoading(true);
|
1062
|
-
bffGetTagList(
|
1110
|
+
bffGetTagList(data);
|
1063
1111
|
getRecommendVideos()
|
1064
1112
|
.then((data) => {
|
1065
1113
|
if (data) {
|
@@ -1125,14 +1173,16 @@
|
|
1125
1173
|
isEditor,
|
1126
1174
|
isNoMoreData,
|
1127
1175
|
updateChannel,
|
1128
|
-
channel
|
1176
|
+
channel,
|
1177
|
+
eventTimeList,
|
1178
|
+
setEventTimeList
|
1129
1179
|
} }, isShowConsent ? (React.createElement(Consent$4, Object.assign({}, (_e = (_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.props))) : (render({
|
1130
1180
|
rtcList,
|
1131
1181
|
mutateLike: bffMutateLike,
|
1132
1182
|
mutateUnlike: bffMutateUnlike,
|
1133
1183
|
submitForm: bffSubmitForm,
|
1134
1184
|
tagList,
|
1135
|
-
pageData
|
1185
|
+
pageData: finalPageData
|
1136
1186
|
}))));
|
1137
1187
|
};
|
1138
1188
|
var SxpDataSourceProvider$1 = React.memo(SxpDataSourceProvider);
|
@@ -1586,14 +1636,21 @@
|
|
1586
1636
|
* @Author: binruan@chatlabs.com
|
1587
1637
|
* @Date: 2024-03-12 10:59:06
|
1588
1638
|
* @LastEditors: binruan@chatlabs.com
|
1589
|
-
* @LastEditTime: 2024-
|
1639
|
+
* @LastEditTime: 2024-11-28 11:17:16
|
1590
1640
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
1591
1641
|
*
|
1592
1642
|
*/
|
1593
1643
|
function useEventReport() {
|
1594
|
-
const { bffEventReport, popupDetailData,
|
1595
|
-
const jumpToWeb = React.useCallback((data, product, cta, position, traceInfo) => {
|
1644
|
+
const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
|
1645
|
+
const jumpToWeb = React.useCallback((e, data, product, cta, position, traceInfo) => {
|
1596
1646
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
|
1647
|
+
const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
|
1648
|
+
if (i !== -1) {
|
1649
|
+
return;
|
1650
|
+
}
|
1651
|
+
else if (e) {
|
1652
|
+
setEventTimeList === null || setEventTimeList === void 0 ? void 0 : setEventTimeList((prev) => [...prev, { target: e === null || e === void 0 ? void 0 : e.target, time: new Date() }]);
|
1653
|
+
}
|
1597
1654
|
let fromKName = '';
|
1598
1655
|
if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
|
1599
1656
|
fromKName = 'pdpPage';
|
@@ -1621,7 +1678,7 @@
|
|
1621
1678
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
1622
1679
|
eventInfo: Object.assign({ eventSubject: 'jumpToWeb', eventDescription: 'User jumped to website', productId: (_v = product === null || product === void 0 ? void 0 : product.itemId) !== null && _v !== void 0 ? _v : '', productName: (_w = product === null || product === void 0 ? void 0 : product.title) !== null && _w !== void 0 ? _w : '', price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0', productCollection: (_x = product === null || product === void 0 ? void 0 : product.collection) !== null && _x !== void 0 ? _x : '', fromKName, fromKPage: location === null || location === void 0 ? void 0 : location.href, contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.itemId) !== null && _z !== void 0 ? _z : '', ctatId: (_0 = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _0 !== void 0 ? _0 : '', traceInfo: (_13 = (_10 = (_8 = (_4 = (_1 = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _1 !== void 0 ? _1 : (_3 = (_2 = data === null || data === void 0 ? void 0 : data.video) === null || _2 === void 0 ? void 0 : _2.bindProduct) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_7 = (_6 = (_5 = data === null || data === void 0 ? void 0 : data.video) === null || _5 === void 0 ? void 0 : _5.bindProducts) === null || _6 === void 0 ? void 0 : _6[0]) === null || _7 === void 0 ? void 0 : _7.traceInfo) !== null && _8 !== void 0 ? _8 : (_9 = data === null || data === void 0 ? void 0 : data.product) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : (_12 = (_11 = data === null || data === void 0 ? void 0 : data.video) === null || _11 === void 0 ? void 0 : _11.bindCta) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : '' }, (contentFormat && { contentFormat }))
|
1623
1680
|
});
|
1624
|
-
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
1681
|
+
}, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
|
1625
1682
|
const productView = React.useCallback((data, product, cta, viewTime, position) => {
|
1626
1683
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
1627
1684
|
let fromKName = '';
|
@@ -1727,7 +1784,7 @@
|
|
1727
1784
|
const { name, value } = e.target;
|
1728
1785
|
setFormData(Object.assign(Object.assign({}, formData), { [name]: value }));
|
1729
1786
|
}, [formData]);
|
1730
|
-
const handleSubmit = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
|
1787
|
+
const handleSubmit = lodash.debounce((e) => __awaiter(void 0, void 0, void 0, function* () {
|
1731
1788
|
var _d, _e, _f, _g, _h;
|
1732
1789
|
const vals = formData;
|
1733
1790
|
if (!vals)
|
@@ -1750,7 +1807,7 @@
|
|
1750
1807
|
const product = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
|
1751
1808
|
const cta = (_h = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.bindCta;
|
1752
1809
|
const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
1753
|
-
jumpToWeb(data, product, cta, position);
|
1810
|
+
jumpToWeb(e, data, product, cta, position);
|
1754
1811
|
}
|
1755
1812
|
if (!isPopup) {
|
1756
1813
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
@@ -10197,9 +10254,9 @@
|
|
10197
10254
|
product = p;
|
10198
10255
|
cta = p === null || p === void 0 ? void 0 : p.bindCta;
|
10199
10256
|
}
|
10200
|
-
const handleLink = () => {
|
10257
|
+
const handleLink = (e) => {
|
10201
10258
|
if (product === null || product === void 0 ? void 0 : product.link) {
|
10202
|
-
jumpToWeb(data, product, cta, position);
|
10259
|
+
jumpToWeb(e, data, product, cta, position);
|
10203
10260
|
if (!isPost) {
|
10204
10261
|
productView(data, product, cta, viewTime || curTimeRef.current, position);
|
10205
10262
|
}
|
@@ -10659,14 +10716,14 @@
|
|
10659
10716
|
const { popupDetailData } = useSxpDataSource();
|
10660
10717
|
const { jumpToWeb } = useEventReport();
|
10661
10718
|
const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
|
10662
|
-
const handleOk = () => {
|
10719
|
+
const handleOk = (e) => {
|
10663
10720
|
var _a, _b, _c;
|
10664
10721
|
if (isExternalLink) {
|
10665
10722
|
const data = popupDetailData;
|
10666
10723
|
const product = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProduct;
|
10667
10724
|
const cta = (_c = (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct) === null || _c === void 0 ? void 0 : _c.bindCta;
|
10668
10725
|
const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
10669
|
-
jumpToWeb(data, product, cta, position);
|
10726
|
+
jumpToWeb(e, data, product, cta, position);
|
10670
10727
|
}
|
10671
10728
|
if (!isPopup) {
|
10672
10729
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
@@ -11108,9 +11165,9 @@
|
|
11108
11165
|
product = p;
|
11109
11166
|
cta = p === null || p === void 0 ? void 0 : p.bindCta;
|
11110
11167
|
}
|
11111
|
-
const handleLink = () => {
|
11168
|
+
const handleLink = (e) => {
|
11112
11169
|
if (product === null || product === void 0 ? void 0 : product.link) {
|
11113
|
-
jumpToWeb(data, product, cta, position);
|
11170
|
+
jumpToWeb(e, data, product, cta, position);
|
11114
11171
|
if (!isPost) {
|
11115
11172
|
productView(data, product, cta, viewTime || curTimeRef.current, position);
|
11116
11173
|
}
|
@@ -11791,7 +11848,7 @@ Made in Italy` })));
|
|
11791
11848
|
style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price
|
11792
11849
|
});
|
11793
11850
|
}, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice, globalConfig]);
|
11794
|
-
const handleClick = lodash.throttle((item, multiCheckIndex) => {
|
11851
|
+
const handleClick = lodash.throttle((item, multiCheckIndex, e) => {
|
11795
11852
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
11796
11853
|
eventSubject: 'clickCta',
|
11797
11854
|
eventDescription: 'User clicked the CTA'
|
@@ -11799,7 +11856,7 @@ Made in Italy` })));
|
|
11799
11856
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }), index, multiCheckIndex }));
|
11800
11857
|
if (isExternalLink) {
|
11801
11858
|
if (item === null || item === void 0 ? void 0 : item.link) {
|
11802
|
-
jumpToWeb(recData, item, item.bindCta, index);
|
11859
|
+
jumpToWeb(e, recData, item, item.bindCta, index);
|
11803
11860
|
window.location.href = window.getJointUtmLink(item.link);
|
11804
11861
|
}
|
11805
11862
|
}
|
@@ -11814,7 +11871,7 @@ Made in Italy` })));
|
|
11814
11871
|
}, []);
|
11815
11872
|
return (React.createElement("ul", { role: 'list', className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px', boxSizing: 'border-box' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
|
11816
11873
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
11817
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement("li", { role: 'listitem', key: index, onClick: () => handleClick(item, index) },
|
11874
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement("li", { role: 'listitem', key: index, onClick: (e) => handleClick(item, index, e) },
|
11818
11875
|
React.createElement("button", Object.assign({ role: 'button', "aria-label": item === null || item === void 0 ? void 0 : item.title, tabIndex: 0, className: css.css({
|
11819
11876
|
display: 'flex',
|
11820
11877
|
alignItems: 'normal',
|
@@ -12324,9 +12381,9 @@ Made in Italy` })));
|
|
12324
12381
|
const { setPopupDetailData, ctaEvent } = useSxpDataSource();
|
12325
12382
|
const { jumpToWeb } = useEventReport();
|
12326
12383
|
const [element, setElement] = React.useState(null);
|
12327
|
-
const handleClick = lodash.throttle((
|
12384
|
+
const handleClick = lodash.throttle((e) => {
|
12328
12385
|
var _a, _b, _c, _d, _e, _f;
|
12329
|
-
|
12386
|
+
e.preventDefault();
|
12330
12387
|
const item = multItem ? multItem : (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video;
|
12331
12388
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
12332
12389
|
eventSubject: 'clickCta',
|
@@ -12340,7 +12397,7 @@ Made in Italy` })));
|
|
12340
12397
|
if (jumpLink || link) {
|
12341
12398
|
const cta = ((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta) || (multItem === null || multItem === void 0 ? void 0 : multItem.bindCta);
|
12342
12399
|
const product = ((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct) || multItem;
|
12343
|
-
jumpToWeb(rec, product, cta, index);
|
12400
|
+
jumpToWeb(e, rec, product, cta, index);
|
12344
12401
|
window.location.href = window.getJointUtmLink(jumpLink || link || '');
|
12345
12402
|
}
|
12346
12403
|
}
|
@@ -12639,8 +12696,7 @@ Made in Italy` })));
|
|
12639
12696
|
const Link$1 = (_a) => {
|
12640
12697
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
12641
12698
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle, isActive } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle", "isActive"]);
|
12642
|
-
const { sxpParameter
|
12643
|
-
useEventReport();
|
12699
|
+
const { sxpParameter } = useSxpDataSource();
|
12644
12700
|
const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
|
12645
12701
|
(_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
|
12646
12702
|
const src = (_e = (_d = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
|
@@ -15074,12 +15130,12 @@ Made in Italy` })));
|
|
15074
15130
|
(_a = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('scroll', onScroll);
|
15075
15131
|
};
|
15076
15132
|
}, [onScroll, scrollParent]);
|
15077
|
-
const handleClickLink = () => {
|
15133
|
+
const handleClickLink = (e) => {
|
15078
15134
|
var _a, _b, _c, _d, _e;
|
15079
15135
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
15080
15136
|
reportTagsView();
|
15081
15137
|
const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
|
15082
|
-
jumpToWeb(rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
|
15138
|
+
jumpToWeb(e, rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
|
15083
15139
|
window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
|
15084
15140
|
}
|
15085
15141
|
};
|
@@ -15305,12 +15361,12 @@ Made in Italy` })));
|
|
15305
15361
|
// container?.removeEventListener('scroll', handleScroll); // 在组件卸载时移除事件监听器
|
15306
15362
|
// };
|
15307
15363
|
// }, [isLoadingData, containerRef, loadMoreData]);
|
15308
|
-
const handleClickLink = () => {
|
15364
|
+
const handleClickLink = (e) => {
|
15309
15365
|
var _a, _b, _c, _d, _e;
|
15310
15366
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
15311
15367
|
reportTagsView();
|
15312
15368
|
const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
|
15313
|
-
jumpToWeb(rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
|
15369
|
+
jumpToWeb(e, rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
|
15314
15370
|
window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
|
15315
15371
|
}
|
15316
15372
|
};
|
@@ -15750,7 +15806,7 @@ Made in Italy` })));
|
|
15750
15806
|
const isOnScreen = useOnScreen(ref);
|
15751
15807
|
const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
|
15752
15808
|
const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
|
15753
|
-
const handleTo = () => {
|
15809
|
+
const handleTo = (e) => {
|
15754
15810
|
var _a, _b, _c, _d;
|
15755
15811
|
const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
|
15756
15812
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
@@ -15761,7 +15817,7 @@ Made in Italy` })));
|
|
15761
15817
|
if (isExternalLink) {
|
15762
15818
|
const link = (product === null || product === void 0 ? void 0 : product.link) || ((_d = item === null || item === void 0 ? void 0 : item.bindCta) === null || _d === void 0 ? void 0 : _d.link);
|
15763
15819
|
if (link) {
|
15764
|
-
jumpToWeb(recData, product, cta, index);
|
15820
|
+
jumpToWeb(e, recData, product, cta, index);
|
15765
15821
|
window.location.href = window.getJointUtmLink(link);
|
15766
15822
|
}
|
15767
15823
|
}
|
@@ -16197,7 +16253,7 @@ Made in Italy` })));
|
|
16197
16253
|
const [visible, setVisible] = React.useState(true);
|
16198
16254
|
const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
|
16199
16255
|
const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
|
16200
|
-
const handleTo = () => {
|
16256
|
+
const handleTo = (e) => {
|
16201
16257
|
var _a, _b, _c, _d;
|
16202
16258
|
const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
|
16203
16259
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
@@ -16208,7 +16264,7 @@ Made in Italy` })));
|
|
16208
16264
|
if (isExternalLink) {
|
16209
16265
|
const link = (product === null || product === void 0 ? void 0 : product.link) || ((_d = item === null || item === void 0 ? void 0 : item.bindCta) === null || _d === void 0 ? void 0 : _d.link);
|
16210
16266
|
if (link) {
|
16211
|
-
jumpToWeb(recData, product, cta, index);
|
16267
|
+
jumpToWeb(e, recData, product, cta, index);
|
16212
16268
|
window.location.href = window.getJointUtmLink(link);
|
16213
16269
|
}
|
16214
16270
|
}
|
@@ -16816,7 +16872,7 @@ Made in Italy` })));
|
|
16816
16872
|
const { isActive } = useSwiperSlide() || {};
|
16817
16873
|
const initRef = React.useRef(false);
|
16818
16874
|
const viewTime = React.useRef();
|
16819
|
-
const
|
16875
|
+
const traceInfo = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.traceInfo) !== null && _c !== void 0 ? _c : '';
|
16820
16876
|
const getPropsVal = React.useCallback((index, str) => {
|
16821
16877
|
try {
|
16822
16878
|
return new Function('props', 'str', `if (str) {
|
@@ -16832,14 +16888,6 @@ Made in Italy` })));
|
|
16832
16888
|
const value = v === null || v === void 0 ? void 0 : v.value;
|
16833
16889
|
if (!value)
|
16834
16890
|
return;
|
16835
|
-
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
16836
|
-
eventInfo: {
|
16837
|
-
eventSubject: 'multiPostClick',
|
16838
|
-
eventDescription: 'multiPostClick',
|
16839
|
-
traceinfo,
|
16840
|
-
branchfeed: (v === null || v === void 0 ? void 0 : v.linkType) === 'recommendFlow' && value ? value : ''
|
16841
|
-
}
|
16842
|
-
});
|
16843
16891
|
if ((v === null || v === void 0 ? void 0 : v.linkType) === 'recommendFlow') {
|
16844
16892
|
endMultiPost('multipostClick');
|
16845
16893
|
updateChannel === null || updateChannel === void 0 ? void 0 : updateChannel(value);
|
@@ -16857,7 +16905,7 @@ Made in Italy` })));
|
|
16857
16905
|
eventDescription: 'startMultiPost',
|
16858
16906
|
contentFormat: 'IMAGE',
|
16859
16907
|
position: '0',
|
16860
|
-
|
16908
|
+
traceInfo
|
16861
16909
|
}
|
16862
16910
|
});
|
16863
16911
|
}, []);
|
@@ -16868,7 +16916,7 @@ Made in Italy` })));
|
|
16868
16916
|
eventDescription: 'endMultiPost',
|
16869
16917
|
contentFormat: 'IMAGE',
|
16870
16918
|
position: '0',
|
16871
|
-
|
16919
|
+
traceInfo,
|
16872
16920
|
nextStep: nextStep || 'others',
|
16873
16921
|
timeOnSite: Math.floor((new Date() - (viewTime === null || viewTime === void 0 ? void 0 : viewTime.current)) / 1000) + ''
|
16874
16922
|
}
|
@@ -16884,6 +16932,8 @@ Made in Italy` })));
|
|
16884
16932
|
}
|
16885
16933
|
}, [isActive]);
|
16886
16934
|
React.useEffect(() => {
|
16935
|
+
if (!isActive)
|
16936
|
+
return;
|
16887
16937
|
const onShow = () => startMultiPost();
|
16888
16938
|
const onHide = () => endMultiPost();
|
16889
16939
|
SXP_EVENT_BUS.on(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
|
@@ -16894,7 +16944,7 @@ Made in Italy` })));
|
|
16894
16944
|
};
|
16895
16945
|
}, [isActive]);
|
16896
16946
|
return (React.createElement("div", { className: 'multiposts', style: Object.assign(Object.assign({}, style), getBgStyle(bgImgUrl)) }, Array.from({ length: 4 }, (_, index) => {
|
16897
|
-
return (React.createElement("button", { className: 'multiposts-btn', role: 'button', "aria-label": `multiposts-${index + 1}`, onClick: () => handleClick(index) },
|
16947
|
+
return (React.createElement("button", { hidden: !getPropsVal(index, 'Url'), className: 'multiposts-btn', role: 'button', "aria-label": `multiposts-${index + 1}`, onClick: () => handleClick(index) },
|
16898
16948
|
React.createElement("img", { className: 'multiposts-btn-img', src: getPropsVal(index, 'Url'), alt: `multiposts-img-${index + 1}` })));
|
16899
16949
|
})));
|
16900
16950
|
};
|
@@ -17928,7 +17978,7 @@ Made in Italy` })));
|
|
17928
17978
|
* @Author: binruan@chatlabs.com
|
17929
17979
|
* @Date: 2024-03-20 10:27:31
|
17930
17980
|
* @LastEditors: binruan@chatlabs.com
|
17931
|
-
* @LastEditTime: 2024-
|
17981
|
+
* @LastEditTime: 2024-12-03 14:41:51
|
17932
17982
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
17933
17983
|
*
|
17934
17984
|
*/
|
@@ -18020,20 +18070,22 @@ Made in Italy` })));
|
|
18020
18070
|
else if (item === null || item === void 0 ? void 0 : item.product) {
|
18021
18071
|
fromKName = 'productPage';
|
18022
18072
|
}
|
18023
|
-
|
18024
|
-
|
18025
|
-
|
18026
|
-
|
18027
|
-
|
18028
|
-
|
18029
|
-
|
18030
|
-
|
18031
|
-
|
18032
|
-
|
18033
|
-
|
18034
|
-
|
18035
|
-
|
18036
|
-
|
18073
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.playbook) !== 'organic menu' || activeIndex !== 0) {
|
18074
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
18075
|
+
eventInfo: {
|
18076
|
+
sessionDuration: Math.floor((new Date() - curTime.current) / 1000) + '',
|
18077
|
+
eventSubject: 'sessionCompleted',
|
18078
|
+
eventDescription: 'Session completed',
|
18079
|
+
contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
|
18080
|
+
productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
|
18081
|
+
position: activeIndex + '',
|
18082
|
+
fromKName,
|
18083
|
+
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
18084
|
+
ctatId: (_r = (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.bindCta) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
|
18085
|
+
traceInfo: (_v = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_u = item === null || item === void 0 ? void 0 : item.product) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : ''
|
18086
|
+
}
|
18087
|
+
});
|
18088
|
+
}
|
18037
18089
|
}
|
18038
18090
|
else if (document.visibilityState === 'visible') {
|
18039
18091
|
if (skipLinkRef.current === true) {
|
@@ -18109,10 +18161,10 @@ Made in Italy` })));
|
|
18109
18161
|
const isExternalLink = ((_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoBar) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
|
18110
18162
|
const rec = visList[activeIndex];
|
18111
18163
|
return (React.createElement("div", Object.assign({ className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } }, (link && {
|
18112
|
-
onClick: () => {
|
18164
|
+
onClick: (e) => {
|
18113
18165
|
var _a, _b, _c, _d;
|
18114
18166
|
if (isExternalLink) {
|
18115
|
-
jumpToWeb(rec, (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindCta, activeIndex, ((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.traceInfo) || ((_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo));
|
18167
|
+
jumpToWeb(e, rec, (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindCta, activeIndex, ((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.traceInfo) || ((_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo));
|
18116
18168
|
}
|
18117
18169
|
new Function(link)();
|
18118
18170
|
}
|
@@ -18215,9 +18267,12 @@ Made in Italy` })));
|
|
18215
18267
|
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike) || !visible)
|
18216
18268
|
return;
|
18217
18269
|
let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
|
18218
|
-
if (waterFallData && top < 40 && globalConfig.likeIconYPosit === 'top') {
|
18270
|
+
if (waterFallData && top < 40 && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconYPosit) === 'top') {
|
18219
18271
|
top += 40;
|
18220
18272
|
}
|
18273
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconYPosit) === 'top') {
|
18274
|
+
top += minusHeight;
|
18275
|
+
}
|
18221
18276
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
18222
18277
|
return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon, unActicveIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
|
18223
18278
|
position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed) ? 'fixed' : 'absolute',
|
@@ -18389,6 +18444,9 @@ Made in Italy` })));
|
|
18389
18444
|
if (waterFallData && top < 40 && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) === 'top') {
|
18390
18445
|
top += 40;
|
18391
18446
|
}
|
18447
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) === 'top') {
|
18448
|
+
top += minusHeight;
|
18449
|
+
}
|
18392
18450
|
return (((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (React.createElement(ToggleButton$1, { style: {
|
18393
18451
|
position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
|
18394
18452
|
visibility: ((_c = (_b = visList === null || visList === void 0 ? void 0 : visList[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
|
@@ -18448,7 +18506,7 @@ Made in Italy` })));
|
|
18448
18506
|
eventInfo: {
|
18449
18507
|
eventSubject: 'backMultiPostClick',
|
18450
18508
|
eventDescription: 'backMultiPostClick',
|
18451
|
-
|
18509
|
+
traceInfo: (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data[0]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.traceInfo) !== null && _c !== void 0 ? _c : ''
|
18452
18510
|
}
|
18453
18511
|
});
|
18454
18512
|
location === null || location === void 0 ? void 0 : location.reload();
|