pb-sxp-ui 1.18.0 → 1.18.2
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 +322 -394
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +15 -7
- package/dist/index.js +322 -394
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +6 -6
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +6 -6
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +322 -394
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +6 -6
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/DiyPortalPreview/VideoWidget.js +8 -10
- package/es/core/components/DiyPortalPreview/index.js +5 -3
- package/es/core/components/DiyStoryPreview/index.js +7 -18
- package/es/core/components/SxpPageRender/LikeButton/index.js +16 -18
- package/es/core/components/SxpPageRender/PictureGroup/index.d.ts +0 -5
- package/es/core/components/SxpPageRender/PictureGroup/index.js +13 -39
- package/es/core/components/SxpPageRender/RenderCard.d.ts +0 -1
- package/es/core/components/SxpPageRender/RenderCard.js +14 -2
- package/es/core/components/SxpPageRender/VideoWidget/index.js +45 -32
- package/es/core/components/SxpPageRender/WaterFall/index.js +3 -4
- package/es/core/components/SxpPageRender/index.js +41 -57
- package/es/core/context/SxpDataSourceProvider.d.ts +12 -5
- package/es/core/context/SxpDataSourceProvider.js +35 -62
- package/es/core/hooks/useEventReport.js +5 -6
- package/es/materials/sxp/consentPopup/Display/index.js +1 -1
- package/es/materials/sxp/cta/AniLinkPopup/material.js +2 -3
- package/es/materials/sxp/popup/CommodityDetail/material.js +1 -2
- package/es/materials/sxp/popup/CommodityList/index.js +4 -5
- package/es/materials/sxp/popup/CommodityList/material.js +1 -1
- package/es/materials/sxp/popup/CommodityList/settingRender.js +1 -1
- package/es/materials/sxp/template/Appoint/material.js +1 -2
- package/es/materials/sxp/template/Commodity/material.js +2 -3
- package/es/materials/sxp/template/CommodityDiro/material.js +2 -3
- package/es/materials/sxp/template/CommodityDiroNew/material.js +2 -4
- package/es/materials/sxp/template/Link/material.js +2 -4
- package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodity/material.js +1 -2
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodityDiro/material.js +2 -3
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +2 -4
- package/es/materials/sxp/template/NineCommodity/material.js +2 -3
- package/es/materials/sxp/template/components/CommodityGroup.js +1 -1
- package/es/materials/sxp/template/components/settingRender.js +1 -1
- package/lib/core/components/DiyPortalPreview/VideoWidget.js +8 -10
- package/lib/core/components/DiyPortalPreview/index.js +5 -3
- package/lib/core/components/DiyStoryPreview/index.js +7 -18
- package/lib/core/components/SxpPageRender/LikeButton/index.js +16 -18
- package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +0 -5
- package/lib/core/components/SxpPageRender/PictureGroup/index.js +12 -38
- package/lib/core/components/SxpPageRender/RenderCard.d.ts +0 -1
- package/lib/core/components/SxpPageRender/RenderCard.js +14 -2
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +45 -32
- package/lib/core/components/SxpPageRender/WaterFall/index.js +3 -4
- package/lib/core/components/SxpPageRender/index.js +41 -57
- package/lib/core/context/SxpDataSourceProvider.d.ts +12 -5
- package/lib/core/context/SxpDataSourceProvider.js +35 -62
- package/lib/core/hooks/useEventReport.js +5 -6
- package/lib/materials/sxp/consentPopup/Display/index.js +1 -1
- package/lib/materials/sxp/cta/AniLinkPopup/material.js +1 -2
- package/lib/materials/sxp/popup/CommodityDetail/material.js +1 -2
- package/lib/materials/sxp/popup/CommodityList/index.js +4 -5
- package/lib/materials/sxp/popup/CommodityList/material.js +1 -1
- package/lib/materials/sxp/popup/CommodityList/settingRender.js +1 -1
- package/lib/materials/sxp/template/Appoint/material.js +1 -2
- package/lib/materials/sxp/template/Commodity/material.js +2 -3
- package/lib/materials/sxp/template/CommodityDiro/material.js +2 -3
- package/lib/materials/sxp/template/CommodityDiroNew/material.js +2 -4
- package/lib/materials/sxp/template/Link/material.js +2 -4
- package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodity/material.js +1 -2
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodityDiro/material.js +2 -3
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +2 -4
- package/lib/materials/sxp/template/NineCommodity/material.js +2 -3
- package/lib/materials/sxp/template/components/CommodityGroup.js +1 -1
- package/lib/materials/sxp/template/components/settingRender.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -644,7 +644,6 @@ const DEFAULT_TAG = 'FOR U';
|
|
644
644
|
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isOpenConsent = false, isEditor = false, utmParameter, channelQueryList, data, dataList, isDiyH5, onUpdateSchema, onUpdateChannel }) => {
|
645
645
|
var _a, _b, _c, _d, _e;
|
646
646
|
const [rtcList, setRtcList] = React.useState([]);
|
647
|
-
const [firstRtcList, setFirstRtcList] = React.useState([]);
|
648
647
|
const [tagList, setTagList] = React.useState([]);
|
649
648
|
const [loading, setLoading] = React.useState(true);
|
650
649
|
const [curReqInfo, setCurReqInfo] = React.useState({ rtc: '', requestId: '' });
|
@@ -676,10 +675,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
676
675
|
const [chatlabsId, setChatlabsId] = React.useState();
|
677
676
|
const finalPageData = React.useMemo(() => pageData !== null && pageData !== void 0 ? pageData : data, [pageData, data]);
|
678
677
|
const pixelPvStatusRef = React.useRef(false);
|
679
|
-
const isDiyPage = React.useMemo(() => {
|
680
|
-
var _a, _b, _c;
|
681
|
-
return isDiyH5 && !((_c = (_b = (_a = finalPageData === null || finalPageData === void 0 ? void 0 : finalPageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf) === null || _b === void 0 ? void 0 : _b.globalConfig) === null || _c === void 0 ? void 0 : _c.enablePreview);
|
682
|
-
}, [isDiyH5, finalPageData]);
|
683
678
|
const isShowConsent = React.useMemo(() => {
|
684
679
|
var _a, _b, _c, _d;
|
685
680
|
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) &&
|
@@ -742,7 +737,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
742
737
|
}, [bffDataSource]);
|
743
738
|
// bff API 请求方法
|
744
739
|
const bffFetch = React.useCallback((path, options, isBota = true) => {
|
745
|
-
var _a
|
740
|
+
var _a;
|
746
741
|
if (!bffDataSource)
|
747
742
|
return;
|
748
743
|
const url = bffDataSource.url;
|
@@ -755,9 +750,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
755
750
|
val.split('=')[0];
|
756
751
|
val.split('=')[1];
|
757
752
|
});
|
758
|
-
options.body = Object.assign(Object.assign({}, options.body), { productUserId: fakeUserId });
|
759
753
|
return window
|
760
|
-
.fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId
|
754
|
+
.fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
|
761
755
|
? JSON.stringify({
|
762
756
|
body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
|
763
757
|
})
|
@@ -997,8 +991,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
997
991
|
}, [bffDataSource]);
|
998
992
|
// 获取推荐视频数据
|
999
993
|
const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
|
1000
|
-
var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u
|
1001
|
-
query = Object.assign(Object.assign({ maxSize: (_f = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _f !== void 0 ? _f : maxSize, defaultSize: (_g = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _g !== void 0 ? _g : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag, pageNum: query === null || query === void 0 ? void 0 : query.pageNum, contentFilter: query === null || query === void 0 ? void 0 : query.contentFilter, productFilter: query === null || query === void 0 ? void 0 : query.productFilter }, (chatlabsId && { chatlabsId })), (
|
994
|
+
var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
995
|
+
query = Object.assign(Object.assign({ maxSize: (_f = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _f !== void 0 ? _f : maxSize, defaultSize: (_g = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _g !== void 0 ? _g : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag, pageNum: query === null || query === void 0 ? void 0 : query.pageNum, contentFilter: query === null || query === void 0 ? void 0 : query.contentFilter, productFilter: query === null || query === void 0 ? void 0 : query.productFilter }, (chatlabsId && { chatlabsId })), (isDiyH5 && { type: 'story' }));
|
1002
996
|
if (channel) {
|
1003
997
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(channel) });
|
1004
998
|
}
|
@@ -1011,10 +1005,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1011
1005
|
if (val)
|
1012
1006
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
1013
1007
|
}
|
1014
|
-
const isDiy = isDiyH5 && ((_o = (_m = (_l = finalPageData === null || finalPageData === void 0 ? void 0 : finalPageData.data) === null || _l === void 0 ? void 0 : _l.sxpPageConf) === null || _m === void 0 ? void 0 : _m.globalConfig) === null || _o === void 0 ? void 0 : _o.enablePreview);
|
1015
1008
|
if (isEditor) {
|
1016
1009
|
let pageNum = 1;
|
1017
|
-
query = Object.assign(Object.assign(Object.assign(
|
1010
|
+
query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1 }), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] }));
|
1018
1011
|
if (!(query === null || query === void 0 ? void 0 : query.channel) || isInit.current) {
|
1019
1012
|
return undefined;
|
1020
1013
|
}
|
@@ -1022,22 +1015,19 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1022
1015
|
let list = [];
|
1023
1016
|
let result = null;
|
1024
1017
|
const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
|
1025
|
-
var
|
1018
|
+
var _v, _w, _x, _y, _z, _0;
|
1026
1019
|
query.pageNum = pageNum;
|
1027
|
-
result =
|
1020
|
+
result = yield (bffFetchAdmin === null || bffFetchAdmin === void 0 ? void 0 : bffFetchAdmin('recommend/direct_page', { method: 'POST', body: query }));
|
1028
1021
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
1029
1022
|
return undefined;
|
1030
1023
|
}
|
1031
1024
|
setLoading(false);
|
1032
|
-
list = list.concat((
|
1025
|
+
list = list.concat((_y = (_x = (_w = (_v = result === null || result === void 0 ? void 0 : result.data) === null || _v === void 0 ? void 0 : _v.recList) === null || _w === void 0 ? void 0 : _w.filter) === null || _x === void 0 ? void 0 : _x.call(_w, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _y !== void 0 ? _y : []);
|
1033
1026
|
if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
|
1034
1027
|
setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
|
1035
1028
|
setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
|
1036
|
-
if (isDiyPage) {
|
1037
|
-
setFirstRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
|
1038
|
-
}
|
1039
1029
|
}
|
1040
|
-
const isNotNullList = (
|
1030
|
+
const isNotNullList = (_0 = (_z = result === null || result === void 0 ? void 0 : result.data) === null || _z === void 0 ? void 0 : _z.recList) === null || _0 === void 0 ? void 0 : _0.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
1041
1031
|
if (isNotNullList) {
|
1042
1032
|
pageNum = pageNum + 1;
|
1043
1033
|
yield recurveRecList(query);
|
@@ -1045,13 +1035,13 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1045
1035
|
});
|
1046
1036
|
yield recurveRecList(query);
|
1047
1037
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
|
1048
|
-
setCurReqInfo({ rtc: (
|
1038
|
+
setCurReqInfo({ rtc: (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.rtc, requestId: (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.requestId });
|
1049
1039
|
return Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list });
|
1050
1040
|
}
|
1051
1041
|
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
1052
|
-
query = Object.assign(Object.assign(
|
1042
|
+
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_o = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _o !== void 0 ? _o : 1 });
|
1053
1043
|
}
|
1054
|
-
const result =
|
1044
|
+
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', {
|
1055
1045
|
method: 'POST',
|
1056
1046
|
body: query
|
1057
1047
|
}));
|
@@ -1061,31 +1051,26 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1061
1051
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag))
|
1062
1052
|
setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
|
1063
1053
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
|
1064
|
-
const isNotNullList = (
|
1054
|
+
const isNotNullList = (_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.recList) === null || _q === void 0 ? void 0 : _q.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
1065
1055
|
if (!isNotNullList) {
|
1066
1056
|
setIsNoMoreData(true);
|
1067
1057
|
}
|
1068
1058
|
}
|
1069
1059
|
let list = [];
|
1070
|
-
list = list.concat((
|
1060
|
+
list = list.concat((_u = (_t = (_s = (_r = result === null || result === void 0 ? void 0 : result.data) === null || _r === void 0 ? void 0 : _r.recList) === null || _s === void 0 ? void 0 : _s.filter) === null || _t === void 0 ? void 0 : _t.call(_s, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _u !== void 0 ? _u : []);
|
1071
1061
|
return Object.assign(Object.assign({}, result.data), { recList: list });
|
1072
|
-
}), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId, bffFetchAdmin
|
1062
|
+
}), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId, bffFetchAdmin]);
|
1073
1063
|
const loadVideos = React.useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
|
1074
|
-
var
|
1064
|
+
var _1, _2, _3, _4;
|
1075
1065
|
if (rtcList.length <= 0) {
|
1076
1066
|
return;
|
1077
1067
|
}
|
1078
|
-
if (isDiyPage && (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) > 0) {
|
1079
|
-
setRtcList(rtcList.concat(firstRtcList));
|
1080
|
-
setCacheRtcList(cacheRtcList.concat(firstRtcList));
|
1081
|
-
return;
|
1082
|
-
}
|
1083
1068
|
const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
|
1084
|
-
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((
|
1069
|
+
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_1 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _1 === void 0 ? void 0 : _1.itemId) && { productFilter: [(_2 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _2 === void 0 ? void 0 : _2.itemId] })), (((_3 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _3 === void 0 ? void 0 : _3.itemId) && { contentFilter: [(_4 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _4 === void 0 ? void 0 : _4.itemId] })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
|
1085
1070
|
setRtcList(rtcList.concat(getFilterRecList(data)));
|
1086
1071
|
setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
|
1087
1072
|
return data;
|
1088
|
-
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList
|
1073
|
+
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
1089
1074
|
const refreshFeSession = React.useCallback((enableReSid, event) => {
|
1090
1075
|
var _a, _b, _c, _d, _e;
|
1091
1076
|
let expire = false;
|
@@ -1116,8 +1101,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1116
1101
|
// 用户信息都是公共的
|
1117
1102
|
if (!userInfo) {
|
1118
1103
|
userInfo = {
|
1119
|
-
|
1120
|
-
|
1104
|
+
// productUserId: fakeUserId, // 后端逻辑会从请求头获取,所以不需要传
|
1105
|
+
// tpChannelId: 'H5' // 后端处理
|
1121
1106
|
};
|
1122
1107
|
}
|
1123
1108
|
const sessionID = storeAndLoadFeSessionId();
|
@@ -1151,8 +1136,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1151
1136
|
layoutVariantId,
|
1152
1137
|
globalConfig,
|
1153
1138
|
playbookType,
|
1154
|
-
bffDataSource
|
1155
|
-
fakeUserId
|
1139
|
+
bffDataSource
|
1156
1140
|
]);
|
1157
1141
|
const getEventParamsByJson = React.useCallback((json, product) => {
|
1158
1142
|
var _a, _b, _c;
|
@@ -1285,40 +1269,38 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1285
1269
|
}
|
1286
1270
|
}, [bffFetch, enableReportEvent, enabledMetaConversionApi, globalConfig, bffDataSource, getEventParamsByJson]);
|
1287
1271
|
const bffMutateLike = React.useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
|
1288
|
-
body = Object.assign(Object.assign({}, body), { productUserId: fakeUserId });
|
1289
1272
|
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/like', { method: 'POST', body }));
|
1290
1273
|
return res === null || res === void 0 ? void 0 : res.success;
|
1291
|
-
}), [bffFetch
|
1274
|
+
}), [bffFetch]);
|
1292
1275
|
const bffMutateUnlike = React.useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
|
1293
|
-
body = Object.assign(Object.assign({}, body), { productUserId: fakeUserId });
|
1294
1276
|
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/unlike', { method: 'POST', body }));
|
1295
1277
|
return res === null || res === void 0 ? void 0 : res.success;
|
1296
|
-
}), [bffFetch
|
1278
|
+
}), [bffFetch]);
|
1297
1279
|
const bffSubmitForm = React.useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
|
1298
1280
|
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/customform', { method: 'POST', body }));
|
1299
1281
|
return res === null || res === void 0 ? void 0 : res.success;
|
1300
1282
|
}), [bffFetch]);
|
1301
1283
|
// 获取 Tag
|
1302
1284
|
const bffGetTagList = React.useCallback((data) => __awaiter(void 0, void 0, void 0, function* () {
|
1303
|
-
var
|
1304
|
-
const isShowTag = !!((
|
1285
|
+
var _5, _6, _7, _8, _9, _10, _11, _12;
|
1286
|
+
const isShowTag = !!((_7 = (_6 = (_5 = data === null || data === void 0 ? void 0 : data.data) === null || _5 === void 0 ? void 0 : _5.sxpPageConf) === null || _6 === void 0 ? void 0 : _6.globalConfig) === null || _7 === void 0 ? void 0 : _7.isShowTag);
|
1305
1287
|
if (!utmVal || !isShowTag)
|
1306
1288
|
return;
|
1307
1289
|
try {
|
1308
|
-
const val = (
|
1290
|
+
const val = (_10 = (_9 = (_8 = splitUrlParams(utmVal)) === null || _8 === void 0 ? void 0 : _8.filter((val) => {
|
1309
1291
|
var _a, _b;
|
1310
1292
|
const key = val.split('=')[0];
|
1311
1293
|
return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
1312
|
-
})) === null ||
|
1294
|
+
})) === null || _9 === void 0 ? void 0 : _9.join('&')) !== null && _10 !== void 0 ? _10 : '';
|
1313
1295
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
1314
|
-
setTagList((
|
1296
|
+
setTagList((_12 = (_11 = result === null || result === void 0 ? void 0 : result.data) === null || _11 === void 0 ? void 0 : _11.tags) !== null && _12 !== void 0 ? _12 : []);
|
1315
1297
|
}
|
1316
1298
|
catch (e) {
|
1317
1299
|
console.log('e', e);
|
1318
1300
|
}
|
1319
1301
|
}), [bffFetch, utmVal]);
|
1320
1302
|
const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
|
1321
|
-
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
|
1303
|
+
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;
|
1322
1304
|
const cta = product === null || product === void 0 ? void 0 : product.bindCta;
|
1323
1305
|
const isProd = ((_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.bindProducts) && ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProducts) === null || _d === void 0 ? void 0 : _d.length) > 0);
|
1324
1306
|
let fromKName = '';
|
@@ -1336,7 +1318,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1336
1318
|
}
|
1337
1319
|
const contentTags = (_p = (_m = (_h = product === null || product === void 0 ? void 0 : product.tags) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : (_q = rec === null || rec === void 0 ? void 0 : rec.product) === null || _q === void 0 ? void 0 : _q.tags;
|
1338
1320
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
1339
|
-
eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '',
|
1321
|
+
eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_10 = (_7 = (_2 = (_y = (_v = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _v !== void 0 ? _v : (_x = (_w = rec === null || rec === void 0 ? void 0 : rec.video) === null || _w === void 0 ? void 0 : _w.bindCta) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_1 = (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindProduct) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : (_6 = (_5 = (_4 = (_3 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _3 === void 0 ? void 0 : _3.bindProducts) === null || _4 === void 0 ? void 0 : _4[0]) === null || _5 === void 0 ? void 0 : _5.bindCta) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_9 = (_8 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : '', fromKName, fromKPage: (_11 = location === null || location === void 0 ? void 0 : location.href) !== null && _11 !== void 0 ? _11 : '', contentFormat })
|
1340
1322
|
});
|
1341
1323
|
}, [bffEventReport, isFromHashtag]);
|
1342
1324
|
const h5EnterLink = React.useCallback(() => {
|
@@ -1371,10 +1353,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1371
1353
|
});
|
1372
1354
|
}, [bffEventReport]);
|
1373
1355
|
const getAccount = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
1374
|
-
var
|
1356
|
+
var _13, _14;
|
1375
1357
|
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account', { method: 'GET' }));
|
1376
|
-
setChatlabsId((
|
1377
|
-
return ((
|
1358
|
+
setChatlabsId((_13 = res === null || res === void 0 ? void 0 : res.data) === null || _13 === void 0 ? void 0 : _13.chatLabsId);
|
1359
|
+
return ((_14 = res === null || res === void 0 ? void 0 : res.data) === null || _14 === void 0 ? void 0 : _14.consentResult) === 'true';
|
1378
1360
|
}), [bffFetch]);
|
1379
1361
|
const accountSonsent = React.useCallback((consentResult) => __awaiter(void 0, void 0, void 0, function* () {
|
1380
1362
|
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account/consent', {
|
@@ -1438,9 +1420,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1438
1420
|
}
|
1439
1421
|
setRtcList(list);
|
1440
1422
|
setCacheRtcList(list);
|
1441
|
-
if (isDiyPage) {
|
1442
|
-
setFirstRtcList(list);
|
1443
|
-
}
|
1444
1423
|
bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
|
1445
1424
|
if (channel) {
|
1446
1425
|
const item = list === null || list === void 0 ? void 0 : list[0];
|
@@ -1460,7 +1439,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1460
1439
|
});
|
1461
1440
|
setLoading(false);
|
1462
1441
|
});
|
1463
|
-
}, [isShowConsent, channel
|
1442
|
+
}, [isShowConsent, channel]);
|
1464
1443
|
// cms预览
|
1465
1444
|
React.useEffect(() => {
|
1466
1445
|
if (!isPreview)
|
@@ -1476,15 +1455,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1476
1455
|
}
|
1477
1456
|
setRtcList(list);
|
1478
1457
|
setCacheRtcList(list);
|
1479
|
-
if (isDiyPage) {
|
1480
|
-
setFirstRtcList(list);
|
1481
|
-
}
|
1482
1458
|
}
|
1483
1459
|
})
|
1484
1460
|
.finally(() => {
|
1485
1461
|
setLoading(false);
|
1486
1462
|
});
|
1487
|
-
}, [getRecommendVideos, bffGetTagList, channel
|
1463
|
+
}, [getRecommendVideos, bffGetTagList, channel]);
|
1488
1464
|
const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
|
1489
1465
|
return (React.createElement(SxpDataSourceContext.Provider, { value: {
|
1490
1466
|
rtcList,
|
@@ -1542,8 +1518,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1542
1518
|
refreshFeSession,
|
1543
1519
|
getAccount,
|
1544
1520
|
accountSonsent,
|
1545
|
-
isDiyH5
|
1546
|
-
firstRtcList
|
1521
|
+
isDiyH5
|
1547
1522
|
} }, 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({
|
1548
1523
|
rtcList,
|
1549
1524
|
mutateLike: bffMutateLike,
|
@@ -2004,14 +1979,14 @@ var settingRender$f = [
|
|
2004
1979
|
* @Author: binruan@chatlabs.com
|
2005
1980
|
* @Date: 2024-03-12 10:59:06
|
2006
1981
|
* @LastEditors: binruan@chatlabs.com
|
2007
|
-
* @LastEditTime:
|
1982
|
+
* @LastEditTime: 2024-11-28 11:17:16
|
2008
1983
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
2009
1984
|
*
|
2010
1985
|
*/
|
2011
1986
|
function useEventReport() {
|
2012
1987
|
const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
|
2013
1988
|
const jumpToWeb = React.useCallback((e, data, product, cta, position, traceInfo) => {
|
2014
|
-
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
|
1989
|
+
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;
|
2015
1990
|
const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
|
2016
1991
|
if (i !== -1) {
|
2017
1992
|
return;
|
@@ -2044,11 +2019,11 @@ function useEventReport() {
|
|
2044
2019
|
contentFormat = 'image';
|
2045
2020
|
}
|
2046
2021
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
2047
|
-
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 : '',
|
2022
|
+
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 }))
|
2048
2023
|
});
|
2049
2024
|
}, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
|
2050
2025
|
const productView = React.useCallback((data, product, cta, viewTime, position) => {
|
2051
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p
|
2026
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
2052
2027
|
let fromKName = '';
|
2053
2028
|
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))) {
|
2054
2029
|
fromKName = 'pdpPage';
|
@@ -2067,9 +2042,8 @@ function useEventReport() {
|
|
2067
2042
|
contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
|
2068
2043
|
position: position + '',
|
2069
2044
|
contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
|
2070
|
-
sceneId: (_g = (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
|
2071
2045
|
ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
|
2072
|
-
traceInfo: (
|
2046
|
+
traceInfo: (_p = (_m = (_h = (_e = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _e !== void 0 ? _e : (_g = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct) === null || _g === void 0 ? void 0 : _g.traceInfo) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : (_o = data === null || data === void 0 ? void 0 : data.product) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : '',
|
2073
2047
|
timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
|
2074
2048
|
eventSubject: 'productView',
|
2075
2049
|
eventDescription: 'User browsed the product'
|
@@ -2665,6 +2639,35 @@ var settingRender$e = [
|
|
2665
2639
|
}
|
2666
2640
|
];
|
2667
2641
|
|
2642
|
+
/*
|
2643
|
+
* @Author: binruan@chatlabs.com
|
2644
|
+
* @Date: 2024-07-09 14:35:10
|
2645
|
+
* @LastEditors: binruan@chatlabs.com
|
2646
|
+
* @LastEditTime: 2024-07-12 17:53:02
|
2647
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\interactionRender.tsx
|
2648
|
+
*
|
2649
|
+
*/
|
2650
|
+
/*
|
2651
|
+
* @Author: binruan@chatlabs.com
|
2652
|
+
* @Date: 2024-07-05 14:08:41
|
2653
|
+
* @LastEditors: binruan@chatlabs.com
|
2654
|
+
* @LastEditTime: 2024-07-09 14:34:49
|
2655
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
|
2656
|
+
*
|
2657
|
+
*/
|
2658
|
+
var interactionRender$g = [
|
2659
|
+
{
|
2660
|
+
title: '滑动事件',
|
2661
|
+
child: [
|
2662
|
+
{
|
2663
|
+
type: 'Switch',
|
2664
|
+
label: '滑动铺满全屏',
|
2665
|
+
name: ['isScrollFullScreen']
|
2666
|
+
}
|
2667
|
+
]
|
2668
|
+
}
|
2669
|
+
];
|
2670
|
+
|
2668
2671
|
/**
|
2669
2672
|
* SSR Window 4.0.2
|
2670
2673
|
* Better handling for window object in SSR environment
|
@@ -10243,7 +10246,7 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
|
|
10243
10246
|
return (React.createElement(React.Fragment, null, (item === null || item === void 0 ? void 0 : item.bindCta) ? (React.createElement(SwiperSlide, { className: css.css({
|
10244
10247
|
width: '50px',
|
10245
10248
|
height: '50px',
|
10246
|
-
|
10249
|
+
marginInlineEnd: '10px'
|
10247
10250
|
}), onClick: () => {
|
10248
10251
|
handleClick(item, index);
|
10249
10252
|
}, key: index },
|
@@ -10842,35 +10845,6 @@ const CommodityDetail$1 = (_a) => {
|
|
10842
10845
|
};
|
10843
10846
|
var CommodityDetailComponent = React.memo(CommodityDetail$1);
|
10844
10847
|
|
10845
|
-
/*
|
10846
|
-
* @Author: binruan@chatlabs.com
|
10847
|
-
* @Date: 2024-07-09 14:35:10
|
10848
|
-
* @LastEditors: binruan@chatlabs.com
|
10849
|
-
* @LastEditTime: 2024-07-12 17:53:02
|
10850
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\interactionRender.tsx
|
10851
|
-
*
|
10852
|
-
*/
|
10853
|
-
/*
|
10854
|
-
* @Author: binruan@chatlabs.com
|
10855
|
-
* @Date: 2024-07-05 14:08:41
|
10856
|
-
* @LastEditors: binruan@chatlabs.com
|
10857
|
-
* @LastEditTime: 2024-07-09 14:34:49
|
10858
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
|
10859
|
-
*
|
10860
|
-
*/
|
10861
|
-
var interactionRender$g = [
|
10862
|
-
{
|
10863
|
-
title: '滑动事件',
|
10864
|
-
child: [
|
10865
|
-
{
|
10866
|
-
type: 'Switch',
|
10867
|
-
label: '滑动铺满全屏',
|
10868
|
-
name: ['isScrollFullScreen']
|
10869
|
-
}
|
10870
|
-
]
|
10871
|
-
}
|
10872
|
-
];
|
10873
|
-
|
10874
10848
|
/*
|
10875
10849
|
* @Author: binruan@chatlabs.com
|
10876
10850
|
* @Date: 2023-07-28 18:29:57
|
@@ -10917,7 +10891,6 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
|
|
10917
10891
|
taxInfo: {
|
10918
10892
|
color: '#000',
|
10919
10893
|
fontSize: 13,
|
10920
|
-
textAlign: 'left',
|
10921
10894
|
marginBottom: '10px'
|
10922
10895
|
}
|
10923
10896
|
},
|
@@ -12009,7 +11982,7 @@ var settingRender$b = [
|
|
12009
11982
|
type: 'Number',
|
12010
11983
|
label: '与右侧边距',
|
12011
11984
|
addonAfter: 'px',
|
12012
|
-
name: ['props', 'commodityPicture', '
|
11985
|
+
name: ['props', 'commodityPicture', 'marginInlineEnd']
|
12013
11986
|
},
|
12014
11987
|
{
|
12015
11988
|
label: '居中垂直偏移',
|
@@ -12295,12 +12268,11 @@ const CommodityList$1 = (_a) => {
|
|
12295
12268
|
React.createElement("button", Object.assign({ role: 'button', "aria-label": item === null || item === void 0 ? void 0 : item.title, tabIndex: 0, className: css.css({
|
12296
12269
|
display: 'flex',
|
12297
12270
|
alignItems: 'normal',
|
12298
|
-
width: '100%'
|
12299
|
-
textAlign: 'left'
|
12271
|
+
width: '100%'
|
12300
12272
|
}) }, props),
|
12301
12273
|
React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: commodityPicture, enableEventReport: false }),
|
12302
12274
|
React.createElement("div", { style: {
|
12303
|
-
width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.
|
12275
|
+
width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.marginInlineEnd) !== null && _f !== void 0 ? _f : 0}px)`,
|
12304
12276
|
display: 'flex',
|
12305
12277
|
flexDirection: 'column',
|
12306
12278
|
justifyContent: 'space-between'
|
@@ -12381,7 +12353,7 @@ const CommodityList = createMaterial(CommodityListComponent, {
|
|
12381
12353
|
commodityPicture: {
|
12382
12354
|
width: 100,
|
12383
12355
|
height: 100,
|
12384
|
-
|
12356
|
+
marginInlineEnd: 10
|
12385
12357
|
},
|
12386
12358
|
commodityStyles: {
|
12387
12359
|
price: {
|
@@ -12627,7 +12599,7 @@ var settingRender$8 = [
|
|
12627
12599
|
type: 'Number',
|
12628
12600
|
label: '与右侧边距',
|
12629
12601
|
addonAfter: 'px',
|
12630
|
-
name: ['props', 'ctaTempStyles', 'img', '
|
12602
|
+
name: ['props', 'ctaTempStyles', 'img', 'marginInlineEnd']
|
12631
12603
|
},
|
12632
12604
|
{
|
12633
12605
|
label: '居中垂直偏移',
|
@@ -12888,12 +12860,11 @@ const Commodity = createMaterial(CommodityComponent, {
|
|
12888
12860
|
borderRadius: 3,
|
12889
12861
|
width: 60,
|
12890
12862
|
height: 60,
|
12891
|
-
|
12863
|
+
marginInlineEnd: 8
|
12892
12864
|
},
|
12893
12865
|
title: {
|
12894
12866
|
fontSize: 12,
|
12895
|
-
color: '#fff'
|
12896
|
-
textAlign: 'left'
|
12867
|
+
color: '#fff'
|
12897
12868
|
},
|
12898
12869
|
ctaTitle: {
|
12899
12870
|
fontSize: 10,
|
@@ -12971,12 +12942,11 @@ const Appoint = createMaterial(AppointComponent, {
|
|
12971
12942
|
borderRadius: 3,
|
12972
12943
|
width: 30,
|
12973
12944
|
height: 30,
|
12974
|
-
|
12945
|
+
marginInlineEnd: 8
|
12975
12946
|
},
|
12976
12947
|
ctaTitle: {
|
12977
12948
|
fontSize: 12,
|
12978
12949
|
color: '#fff',
|
12979
|
-
textAlign: 'left',
|
12980
12950
|
width: 130,
|
12981
12951
|
height: 20
|
12982
12952
|
}
|
@@ -13112,6 +13082,27 @@ var linkSettingRender = [
|
|
13112
13082
|
}
|
13113
13083
|
];
|
13114
13084
|
|
13085
|
+
/*
|
13086
|
+
* @Author: binruan@chatlabs.com
|
13087
|
+
* @Date: 2024-08-09 16:59:38
|
13088
|
+
* @LastEditors: binruan@chatlabs.com
|
13089
|
+
* @LastEditTime: 2024-09-09 13:59:50
|
13090
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
|
13091
|
+
*
|
13092
|
+
*/
|
13093
|
+
var interactionRender$a = [
|
13094
|
+
{
|
13095
|
+
title: '点击事件',
|
13096
|
+
child: [
|
13097
|
+
{
|
13098
|
+
type: 'link',
|
13099
|
+
name: 'onClick',
|
13100
|
+
hiddenUrl: true
|
13101
|
+
}
|
13102
|
+
]
|
13103
|
+
}
|
13104
|
+
];
|
13105
|
+
|
13115
13106
|
var styles$8 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one-line-ellipsis":"index-module_one-line-ellipsis__buFw1"};
|
13116
13107
|
|
13117
13108
|
const Link$1 = (_a) => {
|
@@ -13139,27 +13130,6 @@ const Link$1 = (_a) => {
|
|
13139
13130
|
};
|
13140
13131
|
var LinkComponent = React.memo(Link$1);
|
13141
13132
|
|
13142
|
-
/*
|
13143
|
-
* @Author: binruan@chatlabs.com
|
13144
|
-
* @Date: 2024-08-09 16:59:38
|
13145
|
-
* @LastEditors: binruan@chatlabs.com
|
13146
|
-
* @LastEditTime: 2024-09-09 13:59:50
|
13147
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
|
13148
|
-
*
|
13149
|
-
*/
|
13150
|
-
var interactionRender$a = [
|
13151
|
-
{
|
13152
|
-
title: '点击事件',
|
13153
|
-
child: [
|
13154
|
-
{
|
13155
|
-
type: 'link',
|
13156
|
-
name: 'onClick',
|
13157
|
-
hiddenUrl: true
|
13158
|
-
}
|
13159
|
-
]
|
13160
|
-
}
|
13161
|
-
];
|
13162
|
-
|
13163
13133
|
var _a;
|
13164
13134
|
const Link = createMaterial(LinkComponent, {
|
13165
13135
|
displayName: '普通CTA',
|
@@ -13178,19 +13148,17 @@ const Link = createMaterial(LinkComponent, {
|
|
13178
13148
|
borderRadius: 3,
|
13179
13149
|
width: 60,
|
13180
13150
|
height: 60,
|
13181
|
-
|
13151
|
+
marginInlineEnd: 8
|
13182
13152
|
},
|
13183
13153
|
ctaTitle: {
|
13184
13154
|
fontSize: 12,
|
13185
13155
|
color: '#fff',
|
13186
|
-
textAlign: 'left',
|
13187
13156
|
width: 130,
|
13188
13157
|
height: 20
|
13189
13158
|
}
|
13190
13159
|
},
|
13191
13160
|
customTitle: {
|
13192
13161
|
style: {
|
13193
|
-
textAlign: 'left',
|
13194
13162
|
textDecoration: 'underline',
|
13195
13163
|
fontWeight: 'bold',
|
13196
13164
|
width: 130,
|
@@ -13280,12 +13248,11 @@ const CommodityDiro = createMaterial(CommodityDiroComponent, {
|
|
13280
13248
|
borderRadius: 3,
|
13281
13249
|
width: 60,
|
13282
13250
|
height: 60,
|
13283
|
-
|
13251
|
+
marginInlineEnd: 8
|
13284
13252
|
},
|
13285
13253
|
title: {
|
13286
13254
|
fontSize: 12,
|
13287
|
-
color: '#000'
|
13288
|
-
textAlign: 'left'
|
13255
|
+
color: '#000'
|
13289
13256
|
},
|
13290
13257
|
ctaTitle: {
|
13291
13258
|
fontSize: 10,
|
@@ -13376,19 +13343,17 @@ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
|
|
13376
13343
|
borderRadius: 8,
|
13377
13344
|
width: 78,
|
13378
13345
|
height: 78,
|
13379
|
-
|
13346
|
+
marginInlineEnd: 16
|
13380
13347
|
},
|
13381
13348
|
title: {
|
13382
13349
|
fontSize: 13,
|
13383
|
-
color: '#000'
|
13384
|
-
textAlign: 'left'
|
13350
|
+
color: '#000'
|
13385
13351
|
},
|
13386
13352
|
ctaTitle: {
|
13387
13353
|
textDecoration: 'underline',
|
13388
13354
|
fontSize: 14,
|
13389
13355
|
fontWeight: 'bold',
|
13390
13356
|
color: '#000',
|
13391
|
-
textAlign: 'left',
|
13392
13357
|
width: 150,
|
13393
13358
|
height: 20
|
13394
13359
|
}
|
@@ -13430,7 +13395,7 @@ const MultiCommodityDiro$1 = (_a) => {
|
|
13430
13395
|
const [products] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
13431
13396
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
13432
13397
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
13433
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0,
|
13398
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginInlineStart: 0, marginInlineEnd: '8px' })), tag: 'li', role: 'listitem' },
|
13434
13399
|
React.createElement(EventProvider$1, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
|
13435
13400
|
React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
13436
13401
|
React.createElement("div", { className: css.css({
|
@@ -13476,12 +13441,11 @@ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
|
|
13476
13441
|
borderRadius: 3,
|
13477
13442
|
width: 60,
|
13478
13443
|
height: 60,
|
13479
|
-
|
13444
|
+
marginInlineEnd: 8
|
13480
13445
|
},
|
13481
13446
|
title: {
|
13482
13447
|
fontSize: 12,
|
13483
|
-
color: '#000'
|
13484
|
-
textAlign: 'left'
|
13448
|
+
color: '#000'
|
13485
13449
|
},
|
13486
13450
|
ctaTitle: {
|
13487
13451
|
fontSize: 10,
|
@@ -13529,7 +13493,7 @@ const MultiCommodity$1 = (_a) => {
|
|
13529
13493
|
const [products] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
13530
13494
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
13531
13495
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
13532
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0,
|
13496
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginInlineStart: 0, marginInlineEnd: '8px' })), tag: 'li', role: 'listitem' },
|
13533
13497
|
React.createElement(EventProvider$1, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
|
13534
13498
|
React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
13535
13499
|
React.createElement("div", { className: css.css({
|
@@ -13575,12 +13539,11 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
|
|
13575
13539
|
borderRadius: 3,
|
13576
13540
|
width: 60,
|
13577
13541
|
height: 60,
|
13578
|
-
|
13542
|
+
marginInlineEnd: 8
|
13579
13543
|
},
|
13580
13544
|
title: {
|
13581
13545
|
fontSize: 12,
|
13582
13546
|
color: '#fff',
|
13583
|
-
textAlign: 'left'
|
13584
13547
|
},
|
13585
13548
|
ctaTitle: {
|
13586
13549
|
fontSize: 10,
|
@@ -13636,7 +13599,7 @@ const MultiCommodityDiroNew$1 = (_a) => {
|
|
13636
13599
|
const [products] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
13637
13600
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
13638
13601
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13639
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0,
|
13602
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginInlineStart: 0, marginInlineEnd: '8px' })), tag: 'li', role: 'listitem' },
|
13640
13603
|
React.createElement(EventProvider$1, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
|
13641
13604
|
React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
13642
13605
|
React.createElement("div", { className: css.css({
|
@@ -13683,19 +13646,17 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
|
|
13683
13646
|
borderRadius: 8,
|
13684
13647
|
width: 78,
|
13685
13648
|
height: 78,
|
13686
|
-
|
13649
|
+
marginInlineEnd: 16
|
13687
13650
|
},
|
13688
13651
|
title: {
|
13689
13652
|
fontSize: 12,
|
13690
|
-
color: '#000'
|
13691
|
-
textAlign: 'left'
|
13653
|
+
color: '#000'
|
13692
13654
|
},
|
13693
13655
|
ctaTitle: {
|
13694
13656
|
textDecoration: 'underline',
|
13695
13657
|
fontSize: 12,
|
13696
13658
|
fontWeight: 'bold',
|
13697
13659
|
color: '#000',
|
13698
|
-
textAlign: 'left',
|
13699
13660
|
width: 150,
|
13700
13661
|
height: 20
|
13701
13662
|
}
|
@@ -13790,12 +13751,11 @@ const NineCommodity = createMaterial(NineCommodityComponent, {
|
|
13790
13751
|
borderRadius: 3,
|
13791
13752
|
width: 60,
|
13792
13753
|
height: 60,
|
13793
|
-
|
13754
|
+
marginInlineEnd: 8
|
13794
13755
|
},
|
13795
13756
|
title: {
|
13796
13757
|
fontSize: 12,
|
13797
|
-
color: '#fff'
|
13798
|
-
textAlign: 'left'
|
13758
|
+
color: '#fff'
|
13799
13759
|
},
|
13800
13760
|
ctaTitle: {
|
13801
13761
|
fontSize: 10,
|
@@ -15884,7 +15844,7 @@ function WaterfallList(_a) {
|
|
15884
15844
|
* @Author: binruan@chatlabs.com
|
15885
15845
|
* @Date: 2024-01-10 10:58:24
|
15886
15846
|
* @LastEditors: binruan@chatlabs.com
|
15887
|
-
* @LastEditTime: 2025-
|
15847
|
+
* @LastEditTime: 2025-02-28 10:00:31
|
15888
15848
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
|
15889
15849
|
*
|
15890
15850
|
*/
|
@@ -15922,7 +15882,7 @@ const WaterFall = (props) => {
|
|
15922
15882
|
}
|
15923
15883
|
}, [waterFallData]);
|
15924
15884
|
const reportTagsView = React.useCallback(() => {
|
15925
|
-
var _a, _b, _c, _d, _e, _f
|
15885
|
+
var _a, _b, _c, _d, _e, _f;
|
15926
15886
|
const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
|
15927
15887
|
if (!rec)
|
15928
15888
|
return;
|
@@ -15942,10 +15902,9 @@ const WaterFall = (props) => {
|
|
15942
15902
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
15943
15903
|
eventInfo: {
|
15944
15904
|
contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
|
15945
|
-
sceneId: (_g = (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
|
15946
15905
|
position: cacheActiveIndex + '',
|
15947
|
-
contentTags: JSON.stringify((
|
15948
|
-
traceInfo: (
|
15906
|
+
contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
|
15907
|
+
traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
|
15949
15908
|
hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
|
15950
15909
|
fromKName,
|
15951
15910
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
@@ -16716,6 +16675,60 @@ var settingRender$4 = [
|
|
16716
16675
|
}
|
16717
16676
|
];
|
16718
16677
|
|
16678
|
+
/*
|
16679
|
+
* @Author: binruan@chatlabs.com
|
16680
|
+
* @Date: 2024-07-24 14:58:40
|
16681
|
+
* @LastEditors: binruan@chatlabs.com
|
16682
|
+
* @LastEditTime: 2024-09-09 13:54:35
|
16683
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
|
16684
|
+
*
|
16685
|
+
*/
|
16686
|
+
var interactionRender$2 = [
|
16687
|
+
{
|
16688
|
+
title: '点击事件',
|
16689
|
+
child: [
|
16690
|
+
{
|
16691
|
+
type: 'link',
|
16692
|
+
name: 'onClick',
|
16693
|
+
hiddenUrl: true
|
16694
|
+
}
|
16695
|
+
]
|
16696
|
+
},
|
16697
|
+
{
|
16698
|
+
title: '动画效果',
|
16699
|
+
child: [
|
16700
|
+
{
|
16701
|
+
type: 'Select',
|
16702
|
+
name: ['animation', 'name'],
|
16703
|
+
label: '动画',
|
16704
|
+
options: [
|
16705
|
+
{
|
16706
|
+
label: '默认',
|
16707
|
+
value: 1
|
16708
|
+
}
|
16709
|
+
],
|
16710
|
+
fieldProps: {
|
16711
|
+
style: {
|
16712
|
+
width: '100%'
|
16713
|
+
}
|
16714
|
+
}
|
16715
|
+
},
|
16716
|
+
{
|
16717
|
+
type: 'Number',
|
16718
|
+
label: '动画启动时间',
|
16719
|
+
name: ['animation', 'delay'],
|
16720
|
+
addonAfter: 'ms'
|
16721
|
+
},
|
16722
|
+
{
|
16723
|
+
type: 'Number',
|
16724
|
+
label: '动画持续时间',
|
16725
|
+
name: ['animation', 'duration'],
|
16726
|
+
addonAfter: 'ms'
|
16727
|
+
}
|
16728
|
+
]
|
16729
|
+
}
|
16730
|
+
];
|
16731
|
+
|
16719
16732
|
var styles = {"aniLinkPopup":"index-module_aniLinkPopup__YT7kj","animated-fadeIn":"index-module_animated-fadeIn__8ZCbq","fadeIn":"index-module_fadeIn__2E-dk","animated-fadeOut":"index-module_animated-fadeOut__iK4oc","fadeOut":"index-module_fadeOut__MgevT","one-line-ellipsis":"index-module_one-line-ellipsis__NRiVV","two-line-ellipsis":"index-module_two-line-ellipsis__k-YGB","modal-icon-wrapper":"index-module_modal-icon-wrapper__tu3BY","modal-icon-wrapper-img":"index-module_modal-icon-wrapper-img__4b7qZ"};
|
16720
16733
|
|
16721
16734
|
const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
@@ -16788,60 +16801,6 @@ const AniLinkPopup$1 = (_a) => {
|
|
16788
16801
|
};
|
16789
16802
|
var AniLinkPopupComponent = React.memo(AniLinkPopup$1);
|
16790
16803
|
|
16791
|
-
/*
|
16792
|
-
* @Author: binruan@chatlabs.com
|
16793
|
-
* @Date: 2024-07-24 14:58:40
|
16794
|
-
* @LastEditors: binruan@chatlabs.com
|
16795
|
-
* @LastEditTime: 2024-09-09 13:54:35
|
16796
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
|
16797
|
-
*
|
16798
|
-
*/
|
16799
|
-
var interactionRender$2 = [
|
16800
|
-
{
|
16801
|
-
title: '点击事件',
|
16802
|
-
child: [
|
16803
|
-
{
|
16804
|
-
type: 'link',
|
16805
|
-
name: 'onClick',
|
16806
|
-
hiddenUrl: true
|
16807
|
-
}
|
16808
|
-
]
|
16809
|
-
},
|
16810
|
-
{
|
16811
|
-
title: '动画效果',
|
16812
|
-
child: [
|
16813
|
-
{
|
16814
|
-
type: 'Select',
|
16815
|
-
name: ['animation', 'name'],
|
16816
|
-
label: '动画',
|
16817
|
-
options: [
|
16818
|
-
{
|
16819
|
-
label: '默认',
|
16820
|
-
value: 1
|
16821
|
-
}
|
16822
|
-
],
|
16823
|
-
fieldProps: {
|
16824
|
-
style: {
|
16825
|
-
width: '100%'
|
16826
|
-
}
|
16827
|
-
}
|
16828
|
-
},
|
16829
|
-
{
|
16830
|
-
type: 'Number',
|
16831
|
-
label: '动画启动时间',
|
16832
|
-
name: ['animation', 'delay'],
|
16833
|
-
addonAfter: 'ms'
|
16834
|
-
},
|
16835
|
-
{
|
16836
|
-
type: 'Number',
|
16837
|
-
label: '动画持续时间',
|
16838
|
-
name: ['animation', 'duration'],
|
16839
|
-
addonAfter: 'ms'
|
16840
|
-
}
|
16841
|
-
]
|
16842
|
-
}
|
16843
|
-
];
|
16844
|
-
|
16845
16804
|
/*
|
16846
16805
|
* @Author: binruan@chatlabs.com
|
16847
16806
|
* @Date: 2024-07-24 14:58:40
|
@@ -16880,7 +16839,6 @@ const AniLinkPopup = createMaterial(AniLinkPopupComponent, {
|
|
16880
16839
|
title: {
|
16881
16840
|
fontSize: 14,
|
16882
16841
|
color: '#000',
|
16883
|
-
textAlign: 'left',
|
16884
16842
|
lineHeight: 2.6
|
16885
16843
|
},
|
16886
16844
|
ctaTitle: {
|
@@ -17109,7 +17067,7 @@ const Display$1 = (_a) => {
|
|
17109
17067
|
React.createElement("span", { style: content === null || content === void 0 ? void 0 : content.style, dangerouslySetInnerHTML: {
|
17110
17068
|
__html: setFontForText((_b = content === null || content === void 0 ? void 0 : content.text) === null || _b === void 0 ? void 0 : _b.replace(/\n/g, '</br>'), content === null || content === void 0 ? void 0 : content.style)
|
17111
17069
|
} }),
|
17112
|
-
React.createElement("span", { style: Object.assign(Object.assign({}, interaction === null || interaction === void 0 ? void 0 : interaction.style), {
|
17070
|
+
React.createElement("span", { style: Object.assign(Object.assign({}, interaction === null || interaction === void 0 ? void 0 : interaction.style), { marginInlineStart: '5px' }), dangerouslySetInnerHTML: {
|
17113
17071
|
__html: setFontForText((_c = interaction === null || interaction === void 0 ? void 0 : interaction.text) === null || _c === void 0 ? void 0 : _c.replace(/\n/g, '</br>'), interaction === null || interaction === void 0 ? void 0 : interaction.style)
|
17114
17072
|
}, onClick: handleClick })),
|
17115
17073
|
isShowClose && (React.createElement("button", { "aria-label": 'close', className: 'consentPopupDisplay-close', onClick: handleClickClose },
|
@@ -18027,22 +17985,21 @@ const LikeButton = (_a) => {
|
|
18027
17985
|
const likeIcon = useIconLink(defaultLikeIconPath$2);
|
18028
17986
|
const unlikeIcon = useIconLink(defaultUnLikeIconPath$2);
|
18029
17987
|
const handleClick = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
|
18030
|
-
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z
|
17988
|
+
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
18031
17989
|
if (state) {
|
18032
17990
|
// 先设置状态
|
18033
17991
|
setState(false);
|
18034
|
-
const result = (_e = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({
|
17992
|
+
const result = (_e = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ videoItemId: (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '' })))) !== null && _e !== void 0 ? _e : false;
|
18035
17993
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
18036
17994
|
eventInfo: {
|
18037
17995
|
eventSubject: 'favoriteContentCanceled',
|
18038
17996
|
eventDescription: 'This content was unfavorite by the user',
|
18039
17997
|
contentId: (_g = (_f = recData === null || recData === void 0 ? void 0 : recData.video) === null || _f === void 0 ? void 0 : _f.itemId) !== null && _g !== void 0 ? _g : '',
|
18040
|
-
|
18041
|
-
|
18042
|
-
contentTags: JSON.stringify((_p = (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : []),
|
17998
|
+
contentName: (_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.title) !== null && _j !== void 0 ? _j : '',
|
17999
|
+
contentTags: JSON.stringify((_l = (_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.tags) !== null && _l !== void 0 ? _l : []),
|
18043
18000
|
position: position + '',
|
18044
|
-
contentFormat: ((
|
18045
|
-
traceInfo: (
|
18001
|
+
contentFormat: ((_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.url) ? 'video' : 'image',
|
18002
|
+
traceInfo: (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.traceInfo
|
18046
18003
|
}
|
18047
18004
|
});
|
18048
18005
|
// 如果接口调用失败,则回滚状态
|
@@ -18050,41 +18007,40 @@ const LikeButton = (_a) => {
|
|
18050
18007
|
setState(true);
|
18051
18008
|
}
|
18052
18009
|
else {
|
18053
|
-
const nRtcList = (
|
18010
|
+
const nRtcList = (_p = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
|
18054
18011
|
if (index === position) {
|
18055
18012
|
item.isCollected = false;
|
18056
18013
|
}
|
18057
18014
|
return item;
|
18058
|
-
})) !== null &&
|
18015
|
+
})) !== null && _p !== void 0 ? _p : [];
|
18059
18016
|
setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
|
18060
18017
|
}
|
18061
18018
|
}
|
18062
18019
|
else {
|
18063
18020
|
setState(true);
|
18064
|
-
const result = (
|
18021
|
+
const result = (_q = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData) })))) !== null && _q !== void 0 ? _q : false;
|
18065
18022
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
18066
18023
|
eventInfo: {
|
18067
18024
|
eventSubject: 'favoriteContent',
|
18068
18025
|
eventDescription: 'This content was favorite by the user',
|
18069
|
-
contentId: (
|
18070
|
-
|
18071
|
-
|
18072
|
-
contentTags: JSON.stringify((_4 = (_3 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _3 === void 0 ? void 0 : _3.tags) !== null && _4 !== void 0 ? _4 : []),
|
18026
|
+
contentId: (_s = (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.itemId) !== null && _s !== void 0 ? _s : '',
|
18027
|
+
contentName: (_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.title) !== null && _u !== void 0 ? _u : '',
|
18028
|
+
contentTags: JSON.stringify((_w = (_v = recData === null || recData === void 0 ? void 0 : recData.video) === null || _v === void 0 ? void 0 : _v.tags) !== null && _w !== void 0 ? _w : []),
|
18073
18029
|
position: position + '',
|
18074
|
-
contentFormat: ((
|
18075
|
-
traceInfo: (
|
18030
|
+
contentFormat: ((_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.url) ? 'video' : 'image',
|
18031
|
+
traceInfo: (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.traceInfo
|
18076
18032
|
}
|
18077
18033
|
});
|
18078
18034
|
if (!result) {
|
18079
18035
|
setState(false);
|
18080
18036
|
}
|
18081
18037
|
else {
|
18082
|
-
const nRtcList = (
|
18038
|
+
const nRtcList = (_z = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
|
18083
18039
|
if (index === position) {
|
18084
18040
|
item.isCollected = true;
|
18085
18041
|
}
|
18086
18042
|
return item;
|
18087
|
-
})) !== null &&
|
18043
|
+
})) !== null && _z !== void 0 ? _z : [];
|
18088
18044
|
setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
|
18089
18045
|
}
|
18090
18046
|
}
|
@@ -18121,7 +18077,7 @@ const mountVideoPlayerAtNode = (() => {
|
|
18121
18077
|
const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef }, ref) => {
|
18122
18078
|
var _a, _b;
|
18123
18079
|
const [isPauseVideo, setIsPauseVideo] = React.useState(false);
|
18124
|
-
const { bffEventReport, sxpParameter,
|
18080
|
+
const { bffEventReport, sxpParameter, waterFallData, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
|
18125
18081
|
const videoStartTime = React.useRef(0);
|
18126
18082
|
const [isLoadFinish, setIsLoadFinish] = React.useState(false);
|
18127
18083
|
const { isActive } = useSwiperSlide();
|
@@ -18187,23 +18143,6 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
|
|
18187
18143
|
return;
|
18188
18144
|
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
18189
18145
|
}, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
|
18190
|
-
const handleEnd = () => {
|
18191
|
-
var _a, _b, _c, _d, _e, _f;
|
18192
|
-
if (!videoRef.current)
|
18193
|
-
return;
|
18194
|
-
if (isDiyH5) {
|
18195
|
-
(_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
|
18196
|
-
if (!loopPlayRef.current)
|
18197
|
-
return;
|
18198
|
-
if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
|
18199
|
-
const i = (_c = (_b = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _b === void 0 ? void 0 : _b.swiper) === null || _c === void 0 ? void 0 : _c.activeIndex;
|
18200
|
-
(_e = (_d = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _d === void 0 ? void 0 : _d.swiper) === null || _e === void 0 ? void 0 : _e.slideTo(i + 1);
|
18201
|
-
}
|
18202
|
-
}
|
18203
|
-
else {
|
18204
|
-
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
|
18205
|
-
}
|
18206
|
-
};
|
18207
18146
|
const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
|
18208
18147
|
const handlePlaying = React.useCallback(() => {
|
18209
18148
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
|
@@ -18212,7 +18151,7 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
|
|
18212
18151
|
setIsLoadFinish(true);
|
18213
18152
|
}, []);
|
18214
18153
|
const handleStartPlay = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
18215
|
-
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q
|
18154
|
+
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
18216
18155
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
|
18217
18156
|
return;
|
18218
18157
|
setIsPauseVideo(false);
|
@@ -18223,11 +18162,16 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
|
|
18223
18162
|
const videoCurrentTime = ((_h = (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.currentTime) !== null && _h !== void 0 ? _h : 0).toFixed(2);
|
18224
18163
|
const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
|
18225
18164
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
18226
|
-
eventInfo: Object.assign({ eventSubject: 'playVideo', eventDescription: 'User played the video', contentId: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '',
|
18165
|
+
eventInfo: Object.assign({ eventSubject: 'playVideo', eventDescription: 'User played the video', contentId: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '', contentName: (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.title) !== null && _m !== void 0 ? _m : '', playType, startTime: videoCurrentTime, videoDuration, contentTags: JSON.stringify((_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : []), position: index + '', contentFormat: 'video', traceInfo: (_q = item === null || item === void 0 ? void 0 : item.video) === null || _q === void 0 ? void 0 : _q.traceInfo }, ((isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) && { loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + '' }))
|
18227
18166
|
});
|
18228
18167
|
isFirstPlayRef.current = false;
|
18229
18168
|
}
|
18230
18169
|
}), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
|
18170
|
+
const setCurrentTimeByStartTime = React.useCallback(() => {
|
18171
|
+
if (isDiyH5) {
|
18172
|
+
videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
|
18173
|
+
}
|
18174
|
+
}, []);
|
18231
18175
|
const handLoadeddata = React.useCallback(() => {
|
18232
18176
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
|
18233
18177
|
return;
|
@@ -18252,12 +18196,13 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
|
|
18252
18196
|
const handleLoadedmetadata = React.useCallback(() => {
|
18253
18197
|
if (!videoRef.current)
|
18254
18198
|
return;
|
18199
|
+
setCurrentTimeByStartTime();
|
18255
18200
|
loadedTimeRef.current = new Date();
|
18256
18201
|
handleStartPlay();
|
18257
18202
|
handLoadeddata();
|
18258
18203
|
}, [videoRef.current, handLoadeddata, handleStartPlay]);
|
18259
18204
|
const handleClickVideo = React.useCallback((type) => () => {
|
18260
|
-
var _a, _b, _c, _d, _e;
|
18205
|
+
var _a, _b, _c, _d, _e, _f;
|
18261
18206
|
if (!videoRef.current)
|
18262
18207
|
return;
|
18263
18208
|
if (!isLoadFinish)
|
@@ -18278,17 +18223,20 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
|
|
18278
18223
|
break;
|
18279
18224
|
default:
|
18280
18225
|
if (isPause) {
|
18281
|
-
(_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.
|
18226
|
+
if (isDiyH5 && Math.round((_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.currentTime) >= (scene === null || scene === void 0 ? void 0 : scene.endTime)) {
|
18227
|
+
videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
|
18228
|
+
}
|
18229
|
+
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
|
18282
18230
|
}
|
18283
18231
|
else {
|
18284
|
-
(
|
18232
|
+
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
|
18285
18233
|
}
|
18286
18234
|
setIsPauseVideo(!isPause);
|
18287
18235
|
break;
|
18288
18236
|
}
|
18289
18237
|
}, [isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
|
18290
18238
|
const handlePause = React.useCallback(() => {
|
18291
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o
|
18239
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
18292
18240
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
|
18293
18241
|
return;
|
18294
18242
|
if (activeIndex !== index)
|
@@ -18304,15 +18252,14 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
|
|
18304
18252
|
eventSubject: 'playOverVideo',
|
18305
18253
|
eventDescription: 'User finished playing the video',
|
18306
18254
|
contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
|
18307
|
-
|
18308
|
-
contentName: (_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.title) !== null && _o !== void 0 ? _o : '',
|
18255
|
+
contentName: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
|
18309
18256
|
endTime: videoCurrentTime,
|
18310
18257
|
videoDuration,
|
18311
18258
|
playDuration,
|
18312
|
-
contentTags: JSON.stringify((
|
18259
|
+
contentTags: JSON.stringify((_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
|
18313
18260
|
position: index + '',
|
18314
18261
|
contentFormat: 'video',
|
18315
|
-
traceInfo: (
|
18262
|
+
traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
|
18316
18263
|
}
|
18317
18264
|
});
|
18318
18265
|
}
|
@@ -18320,8 +18267,27 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
|
|
18320
18267
|
const handleWaiting = React.useCallback(() => {
|
18321
18268
|
setWaiting(true);
|
18322
18269
|
}, []);
|
18270
|
+
const handleTimeUpload = () => {
|
18271
|
+
if (!videoRef.current || !isDiyH5)
|
18272
|
+
return;
|
18273
|
+
setTimeout(() => {
|
18274
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
18275
|
+
if (Math.round((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.currentTime) >= ((_b = scene === null || scene === void 0 ? void 0 : scene.endTime) !== null && _b !== void 0 ? _b : 0)) {
|
18276
|
+
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
|
18277
|
+
if (!loopPlayRef.current)
|
18278
|
+
return;
|
18279
|
+
if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
|
18280
|
+
(_e = (_d = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _d === void 0 ? void 0 : _d.swiper) === null || _e === void 0 ? void 0 : _e.slideTo(0);
|
18281
|
+
}
|
18282
|
+
else {
|
18283
|
+
const i = (_g = (_f = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _f === void 0 ? void 0 : _f.swiper) === null || _g === void 0 ? void 0 : _g.activeIndex;
|
18284
|
+
(_j = (_h = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _h === void 0 ? void 0 : _h.swiper) === null || _j === void 0 ? void 0 : _j.slideTo(i + 1);
|
18285
|
+
}
|
18286
|
+
}
|
18287
|
+
});
|
18288
|
+
};
|
18323
18289
|
React.useEffect(() => {
|
18324
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
18290
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
18325
18291
|
if (!isActive)
|
18326
18292
|
return;
|
18327
18293
|
const videoSrc = videoUrl;
|
@@ -18342,6 +18308,7 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
|
|
18342
18308
|
hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
|
18343
18309
|
hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
|
18344
18310
|
var _a;
|
18311
|
+
setCurrentTimeByStartTime();
|
18345
18312
|
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
18346
18313
|
});
|
18347
18314
|
}
|
@@ -18355,11 +18322,12 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
|
|
18355
18322
|
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
|
18356
18323
|
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
|
18357
18324
|
(_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
|
18358
|
-
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended',
|
18325
|
+
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handlePlay);
|
18359
18326
|
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
|
18360
18327
|
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
|
18328
|
+
(_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
|
18361
18329
|
return () => {
|
18362
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
18330
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
18363
18331
|
const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
|
18364
18332
|
if (!isPause)
|
18365
18333
|
handlePause();
|
@@ -18371,9 +18339,10 @@ const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activ
|
|
18371
18339
|
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
|
18372
18340
|
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
|
18373
18341
|
(_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
|
18374
|
-
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended',
|
18342
|
+
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
|
18375
18343
|
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
|
18376
18344
|
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
|
18345
|
+
(_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
|
18377
18346
|
};
|
18378
18347
|
}, [isActive]);
|
18379
18348
|
React.useEffect(() => {
|
@@ -18584,45 +18553,19 @@ const Picture = (props) => {
|
|
18584
18553
|
}, onLoad: onShowFirstImage }))));
|
18585
18554
|
};
|
18586
18555
|
|
18587
|
-
const PictureGroup$4 =
|
18556
|
+
const PictureGroup$4 = ({ imgUrls, width, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig }) => {
|
18588
18557
|
var _a, _b;
|
18589
18558
|
const { isActive } = useSwiperSlide();
|
18590
|
-
const {
|
18559
|
+
const { sxpParameter, openHashtag } = useSxpDataSource();
|
18591
18560
|
const [isLoad, setIsLoad] = React.useState(false);
|
18592
18561
|
const [imgInfo, setImgInfo] = React.useState();
|
18593
18562
|
const [swiperActiveIndex, setSwiperActiveIndex] = React.useState(0);
|
18594
|
-
const
|
18563
|
+
const swiperRef = React.useRef();
|
18595
18564
|
const isFirstPlayRef = React.useRef(true);
|
18596
|
-
const loopPlayRef = React.useRef(true);
|
18597
18565
|
const initTime = new Date();
|
18598
|
-
React.useImperativeHandle(ref, () => {
|
18599
|
-
return {
|
18600
|
-
setLoopPlay(v) {
|
18601
|
-
loopPlayRef.current = v;
|
18602
|
-
}
|
18603
|
-
};
|
18604
|
-
});
|
18605
|
-
React.useEffect(() => {
|
18606
|
-
let timerId;
|
18607
|
-
if (isLoad && isActive && isDiyH5) {
|
18608
|
-
timerId = setTimeout(() => {
|
18609
|
-
var _a, _b, _c, _d;
|
18610
|
-
if (!loopPlayRef.current)
|
18611
|
-
return;
|
18612
|
-
if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
|
18613
|
-
const i = (_b = (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.activeIndex;
|
18614
|
-
(_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slideTo(i + 1);
|
18615
|
-
}
|
18616
|
-
}, 3000);
|
18617
|
-
}
|
18618
|
-
return () => {
|
18619
|
-
if (timerId)
|
18620
|
-
clearTimeout(timerId);
|
18621
|
-
};
|
18622
|
-
}, [isLoad, isActive, isDiyH5, index, swiperRef, firstRtcList]);
|
18623
18566
|
React.useEffect(() => {
|
18624
18567
|
if (isLoad && isActive) {
|
18625
|
-
(
|
18568
|
+
(swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.start();
|
18626
18569
|
if (openHashtag) {
|
18627
18570
|
onViewImageEndEvent(rec);
|
18628
18571
|
}
|
@@ -18632,7 +18575,7 @@ const PictureGroup$4 = React.forwardRef(({ imgUrls, data, height, rec, index, on
|
|
18632
18575
|
}
|
18633
18576
|
}
|
18634
18577
|
else {
|
18635
|
-
(
|
18578
|
+
(swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) && swiperRef.current.swiper.autoplay.stop();
|
18636
18579
|
}
|
18637
18580
|
}, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
|
18638
18581
|
const showFirstImageFn = React.useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
|
@@ -18659,13 +18602,13 @@ const PictureGroup$4 = React.forwardRef(({ imgUrls, data, height, rec, index, on
|
|
18659
18602
|
};
|
18660
18603
|
}, [isActive, imgInfo]);
|
18661
18604
|
const handleMouseEnter = React.useCallback(() => {
|
18662
|
-
if (
|
18663
|
-
|
18605
|
+
if (swiperRef.current && swiperRef.current.swiper && isAlly) {
|
18606
|
+
swiperRef.current.swiper.autoplay.stop();
|
18664
18607
|
}
|
18665
18608
|
}, []);
|
18666
18609
|
const handleMouseLeave = React.useCallback(() => {
|
18667
|
-
if (
|
18668
|
-
|
18610
|
+
if (swiperRef.current && swiperRef.current.swiper && isAlly) {
|
18611
|
+
swiperRef.current.swiper.autoplay.start();
|
18669
18612
|
}
|
18670
18613
|
}, []);
|
18671
18614
|
const handleSlideChange = React.useCallback((swiper) => {
|
@@ -18686,7 +18629,7 @@ const PictureGroup$4 = React.forwardRef(({ imgUrls, data, height, rec, index, on
|
|
18686
18629
|
enabled: true
|
18687
18630
|
}
|
18688
18631
|
}
|
18689
|
-
: {}), { loop: true, ref:
|
18632
|
+
: {}), { loop: true, ref: swiperRef, onSlideChange: handleSlideChange, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
|
18690
18633
|
bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
|
18691
18634
|
fontSize: '14px'
|
18692
18635
|
} }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
|
@@ -18703,7 +18646,7 @@ const PictureGroup$4 = React.forwardRef(({ imgUrls, data, height, rec, index, on
|
|
18703
18646
|
return (React.createElement(SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
|
18704
18647
|
React.createElement(Picture, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
|
18705
18648
|
}))));
|
18706
|
-
}
|
18649
|
+
};
|
18707
18650
|
var PictureGroup$5 = React.memo(PictureGroup$4);
|
18708
18651
|
|
18709
18652
|
/*
|
@@ -18824,10 +18767,22 @@ function withBindDataSource(Component) {
|
|
18824
18767
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
|
18825
18768
|
*
|
18826
18769
|
*/
|
18827
|
-
const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive,
|
18770
|
+
const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive, isNineProduct }) => {
|
18771
|
+
var _a, _b, _c, _d, _e;
|
18828
18772
|
const { schema } = useEditor();
|
18829
18773
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
18830
18774
|
return null;
|
18775
|
+
let cta = null;
|
18776
|
+
if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
|
18777
|
+
cta = '多商品CTA';
|
18778
|
+
}
|
18779
|
+
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
18780
|
+
cta = '商品CTA';
|
18781
|
+
}
|
18782
|
+
else {
|
18783
|
+
cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
|
18784
|
+
}
|
18785
|
+
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
18831
18786
|
const renderComp = React.useMemo(() => {
|
18832
18787
|
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;
|
18833
18788
|
// 如果includesCtaType有值,则只渲染includesCtaType包含的cta类型组件,用于在页面某处只显示某一组件
|
@@ -18855,7 +18810,7 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive,
|
|
18855
18810
|
const sbf = style.backdropFilter;
|
18856
18811
|
style.backdropFilter = `blur(${sbf !== null && sbf !== void 0 ? sbf : 0}px)`;
|
18857
18812
|
}
|
18858
|
-
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), style), { zIndex: 50,
|
18813
|
+
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), style), { zIndex: 50, marginInlineStart: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.textStyle), bindDatas: (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.bindDatas) !== null && _1 !== void 0 ? _1 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.props, { event: ((_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index, isActive: isActive })));
|
18859
18814
|
}
|
18860
18815
|
else {
|
18861
18816
|
return null;
|
@@ -18983,7 +18938,7 @@ var NavBack$1 = React.memo(NavBack);
|
|
18983
18938
|
* @Author: binruan@chatlabs.com
|
18984
18939
|
* @Date: 2024-03-20 10:27:31
|
18985
18940
|
* @LastEditors: binruan@chatlabs.com
|
18986
|
-
* @LastEditTime: 2025-05-
|
18941
|
+
* @LastEditTime: 2025-05-09 15:51:40
|
18987
18942
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
18988
18943
|
*
|
18989
18944
|
*/
|
@@ -19003,7 +18958,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19003
18958
|
const skipLinkRef = React.useRef(false);
|
19004
18959
|
const [pageNum, setPageNum] = React.useState(2);
|
19005
18960
|
const videoWidgetRef = React.useRef(null);
|
19006
|
-
const pictureGroupRef = React.useRef(null);
|
19007
18961
|
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, isNoMoreData, channel, refreshFeSession, isDiyH5 } = useSxpDataSource();
|
19008
18962
|
const { backMainFeed, productView, jumpToWeb } = useEventReport();
|
19009
18963
|
const isShowFingerTip = React.useMemo(() => {
|
@@ -19051,7 +19005,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19051
19005
|
(_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
|
19052
19006
|
}, [data, ctaType, swiperRef]);
|
19053
19007
|
const handleSessionCompleted = React.useCallback((fk) => {
|
19054
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v
|
19008
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
19055
19009
|
const item = data === null || data === void 0 ? void 0 : data[activeIndex];
|
19056
19010
|
let fromKName = '';
|
19057
19011
|
if (popupDetailData && (((_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
|
@@ -19078,13 +19032,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19078
19032
|
eventSubject: 'sessionCompleted',
|
19079
19033
|
eventDescription: 'Session completed',
|
19080
19034
|
contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
|
19081
|
-
|
19082
|
-
productId: (_r = item === null || item === void 0 ? void 0 : item.product) === null || _r === void 0 ? void 0 : _r.itemId,
|
19035
|
+
productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
|
19083
19036
|
position: activeIndex + '',
|
19084
19037
|
fromKName: fk || fromKName,
|
19085
19038
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
19086
|
-
ctatId: (
|
19087
|
-
traceInfo: (
|
19039
|
+
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 : '',
|
19040
|
+
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 : ''
|
19088
19041
|
}
|
19089
19042
|
});
|
19090
19043
|
}, [data, bffEventReport, activeIndex, popupDetailData, tempMap, isFromHashtag, curTime]);
|
@@ -19143,9 +19096,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19143
19096
|
refreshFeSession
|
19144
19097
|
]);
|
19145
19098
|
const handleSessionExpire = React.useCallback(lodash.debounce(() => {
|
19146
|
-
var _a
|
19099
|
+
var _a;
|
19147
19100
|
(_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
|
19148
|
-
(_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
|
19149
19101
|
refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
|
19150
19102
|
}, 1000), [handleSessionCompleted, refreshFeSession]);
|
19151
19103
|
React.useEffect(() => {
|
@@ -19215,18 +19167,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19215
19167
|
return null;
|
19216
19168
|
}, [globalConfig, activeIndex, visList]);
|
19217
19169
|
const renderContent = React.useCallback((rec, index) => {
|
19218
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
19170
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
19219
19171
|
if (rec === 'organic menu') {
|
19220
19172
|
return (React.createElement(MultiPosts$2, Object.assign({ recData: data === null || data === void 0 ? void 0 : data[1] }, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props, (_f = (_e = (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.item) === null || _f === void 0 ? void 0 : _f.event)));
|
19221
19173
|
}
|
19222
|
-
if ((
|
19174
|
+
if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.url) {
|
19223
19175
|
return (React.createElement(VideoWidget$5, Object.assign({ key: isReload }, (activeIndex === index && { ref: videoWidgetRef }), { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoPlayIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPlayIcon, loopPlay: true, swiperRef: swiperRef })));
|
19224
19176
|
}
|
19225
|
-
if ((
|
19226
|
-
return (React.createElement(PictureGroup$5,
|
19177
|
+
if ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.imgUrls) {
|
19178
|
+
return (React.createElement(PictureGroup$5, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onViewImageEndEvent: handleViewImageStartEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
|
19227
19179
|
}
|
19228
|
-
if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((
|
19229
|
-
return (
|
19180
|
+
if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _j === void 0 ? void 0 : _j.length) > 0) {
|
19181
|
+
return (_k = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _k === void 0 ? void 0 : _k.map((value, idx) => {
|
19230
19182
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
19231
19183
|
const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
|
19232
19184
|
const Component = withBindDataSource(t);
|
@@ -19264,7 +19216,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19264
19216
|
};
|
19265
19217
|
}, [isShowMore]);
|
19266
19218
|
const renderBottom = React.useCallback((rec, index) => {
|
19267
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q
|
19219
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
19268
19220
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
19269
19221
|
let cta = null;
|
19270
19222
|
if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
|
@@ -19273,28 +19225,25 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19273
19225
|
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
19274
19226
|
cta = '商品CTA';
|
19275
19227
|
}
|
19276
|
-
else if (tempMap && ((_d = Object.keys(tempMap)) === null || _d === void 0 ? void 0 : _d.includes('服务CTA')) && ((_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta) === null || _f === void 0 ? void 0 : _f.itemId)) {
|
19277
|
-
cta = '服务CTA';
|
19278
|
-
}
|
19279
19228
|
else {
|
19280
|
-
cta = (
|
19229
|
+
cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
|
19281
19230
|
}
|
19282
19231
|
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
19283
19232
|
const isNineProduct = (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nineProductEnable) &&
|
19284
19233
|
index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 2 : 1) &&
|
19285
|
-
((
|
19234
|
+
((_f = ['MultiCommodity', 'MultiCommodityDiro', 'MultiCommodityDiroNew']) === null || _f === void 0 ? void 0 : _f.includes((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.type));
|
19286
19235
|
return (React.createElement(React.Fragment, null,
|
19287
|
-
isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex,
|
19288
|
-
((
|
19289
|
-
React.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(
|
19236
|
+
isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, isNineProduct: isNineProduct })),
|
19237
|
+
((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
|
19238
|
+
React.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _j !== void 0 ? _j : 40}px` } },
|
19290
19239
|
React.createElement(Nudge, { nudge: nudge }),
|
19291
19240
|
((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) && !isNineProduct ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
19292
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex
|
19241
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex }))) : null,
|
19293
19242
|
React.createElement("div", null,
|
19294
|
-
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (
|
19295
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex
|
19296
|
-
React.createElement(Hashtag$1, { index: activeIndex, tags: (
|
19297
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex
|
19243
|
+
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.title) !== null && _l !== void 0 ? _l : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
|
19244
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex }),
|
19245
|
+
React.createElement(Hashtag$1, { index: activeIndex, tags: (_o = (_m = rec === null || rec === void 0 ? void 0 : rec.video) === null || _m === void 0 ? void 0 : _m.hashTags) !== null && _o !== void 0 ? _o : [], itemId: (_p = rec === null || rec === void 0 ? void 0 : rec.video) === null || _p === void 0 ? void 0 : _p.itemId, itemType: ((_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle, hashTagRightMargin: containerWidth - (hashTagRightMargin !== null && hashTagRightMargin !== void 0 ? hashTagRightMargin : 0) }))),
|
19246
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
19298
19247
|
}
|
19299
19248
|
return null;
|
19300
19249
|
}, [
|
@@ -19332,7 +19281,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19332
19281
|
return null;
|
19333
19282
|
}, [globalConfig, waterFallData]);
|
19334
19283
|
const handleViewImageStartEnd = (item) => {
|
19335
|
-
var _a, _b, _c, _d, _e, _f
|
19284
|
+
var _a, _b, _c, _d, _e, _f;
|
19336
19285
|
if (!((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) && ((_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls)) {
|
19337
19286
|
const endTime = Date.now();
|
19338
19287
|
const duration = viewImageStartTime.current === 0 ? 0 : (endTime - viewImageStartTime.current) / 1000;
|
@@ -19341,11 +19290,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19341
19290
|
eventSubject: 'viewImageCarouselEnd',
|
19342
19291
|
eventDescription: 'User end view the image carousel',
|
19343
19292
|
contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
|
19344
|
-
|
19345
|
-
contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
|
19293
|
+
contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
|
19346
19294
|
imageEndTime: `${endTime}`,
|
19347
19295
|
playDuration: `${duration}`,
|
19348
|
-
contentTags: JSON.stringify((
|
19296
|
+
contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
|
19349
19297
|
position: activeIndex + '',
|
19350
19298
|
contentFormat: 'image',
|
19351
19299
|
traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
|
@@ -19354,7 +19302,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19354
19302
|
}
|
19355
19303
|
};
|
19356
19304
|
const handleSlideSkip = (item, position) => {
|
19357
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x
|
19305
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
19358
19306
|
if (isPreview || waterFallData)
|
19359
19307
|
return;
|
19360
19308
|
const t = new Date() - curTime.current;
|
@@ -19380,8 +19328,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19380
19328
|
contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
|
19381
19329
|
position: position + '',
|
19382
19330
|
contentId: (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.itemId) !== null && _t !== void 0 ? _t : '',
|
19383
|
-
|
19384
|
-
traceInfo: (_0 = (_y = (_x = item === null || item === void 0 ? void 0 : item.video) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_z = item === null || item === void 0 ? void 0 : item.product) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : '',
|
19331
|
+
traceInfo: (_x = (_v = (_u = item === null || item === void 0 ? void 0 : item.video) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : (_w = item === null || item === void 0 ? void 0 : item.product) === null || _w === void 0 ? void 0 : _w.traceInfo) !== null && _x !== void 0 ? _x : '',
|
19385
19332
|
contentFormat
|
19386
19333
|
}
|
19387
19334
|
});
|
@@ -19391,7 +19338,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19391
19338
|
}
|
19392
19339
|
};
|
19393
19340
|
const handleScrollEvent = (swiper) => {
|
19394
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w
|
19341
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
19395
19342
|
const item = data[swiper.previousIndex];
|
19396
19343
|
if (!item)
|
19397
19344
|
return;
|
@@ -19408,12 +19355,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19408
19355
|
eventSubject: 'scrollDown',
|
19409
19356
|
eventDescription: 'User scroll down',
|
19410
19357
|
contentId: (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.itemId) !== null && _e !== void 0 ? _e : '',
|
19411
|
-
|
19412
|
-
productId: (_k = (_j = item === null || item === void 0 ? void 0 : item.product) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '',
|
19358
|
+
productId: (_g = (_f = item === null || item === void 0 ? void 0 : item.product) === null || _f === void 0 ? void 0 : _f.itemId) !== null && _g !== void 0 ? _g : '',
|
19413
19359
|
requestId: null,
|
19414
|
-
traceInfo: (
|
19360
|
+
traceInfo: (_l = (_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.traceInfo) !== null && _j !== void 0 ? _j : (_k = item === null || item === void 0 ? void 0 : item.product) === null || _k === void 0 ? void 0 : _k.traceInfo) !== null && _l !== void 0 ? _l : '',
|
19415
19361
|
contentFormat,
|
19416
|
-
position: ((
|
19362
|
+
position: ((_m = swiper.previousIndex) !== null && _m !== void 0 ? _m : 0) + ''
|
19417
19363
|
}
|
19418
19364
|
});
|
19419
19365
|
// 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
|
@@ -19425,13 +19371,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19425
19371
|
eventInfo: {
|
19426
19372
|
eventSubject: 'scrollUp',
|
19427
19373
|
eventDescription: 'User scroll up',
|
19428
|
-
contentId: (
|
19429
|
-
|
19430
|
-
productId: (_x = (_w = item.product) === null || _w === void 0 ? void 0 : _w.itemId) !== null && _x !== void 0 ? _x : '',
|
19374
|
+
contentId: (_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.itemId) !== null && _p !== void 0 ? _p : '',
|
19375
|
+
productId: (_r = (_q = item.product) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
|
19431
19376
|
requestId: null,
|
19432
|
-
traceInfo: (
|
19377
|
+
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 : '',
|
19433
19378
|
contentFormat,
|
19434
|
-
position: ((
|
19379
|
+
position: ((_w = swiper.previousIndex) !== null && _w !== void 0 ? _w : 0) + ''
|
19435
19380
|
}
|
19436
19381
|
});
|
19437
19382
|
// 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
|
@@ -19457,7 +19402,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19457
19402
|
}
|
19458
19403
|
}, [openHashtag, data, activeIndex]);
|
19459
19404
|
const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
|
19460
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
19405
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
19461
19406
|
const item = data[activeIndex];
|
19462
19407
|
// 如果是图片集则上报事件
|
19463
19408
|
if (!((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) && ((_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls)) {
|
@@ -19468,10 +19413,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19468
19413
|
eventSubject: 'viewImageCarouselStart',
|
19469
19414
|
eventDescription: 'User start view the image carousel',
|
19470
19415
|
contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
|
19471
|
-
|
19472
|
-
contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
|
19416
|
+
contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
|
19473
19417
|
imageStartTime: `${startTime}`,
|
19474
|
-
contentTags: JSON.stringify((
|
19418
|
+
contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
|
19475
19419
|
position: activeIndex + '',
|
19476
19420
|
contentFormat: 'image',
|
19477
19421
|
traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
|
@@ -19481,11 +19425,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19481
19425
|
if (enableCapi) {
|
19482
19426
|
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
19483
19427
|
eventName: 'ViewContent',
|
19484
|
-
product: (
|
19428
|
+
product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProduct
|
19485
19429
|
});
|
19486
19430
|
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
19487
19431
|
eventName: 'PageView',
|
19488
|
-
product: (
|
19432
|
+
product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct
|
19489
19433
|
});
|
19490
19434
|
}
|
19491
19435
|
}
|
@@ -19577,20 +19521,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19577
19521
|
swiperRef.current.swiper.allowTouchMove = true;
|
19578
19522
|
}, 500);
|
19579
19523
|
}, onActiveIndexChange: (swiper) => {
|
19580
|
-
var _a, _b;
|
19581
19524
|
setActiveIndex(swiper.activeIndex);
|
19582
19525
|
if (openHashtag)
|
19583
19526
|
return;
|
19584
19527
|
// 处理上滑下滑事件
|
19585
19528
|
handleScrollEvent(swiper);
|
19586
|
-
if (waterFallData || isEditor)
|
19529
|
+
if (waterFallData || isEditor || isDiyH5)
|
19587
19530
|
return;
|
19588
19531
|
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
|
19589
19532
|
if (!isLoadMore) {
|
19590
|
-
if (isDiyH5) {
|
19591
|
-
(_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
|
19592
|
-
(_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
|
19593
|
-
}
|
19594
19533
|
setIsLoadMore(true);
|
19595
19534
|
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
|
19596
19535
|
var _a;
|
@@ -19643,7 +19582,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
19643
19582
|
}, []);
|
19644
19583
|
const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
|
19645
19584
|
const handlePlaying = React.useCallback(() => {
|
19646
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o
|
19585
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
19647
19586
|
setIsPauseVideo(false);
|
19648
19587
|
const item = data[index];
|
19649
19588
|
if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
|
@@ -19656,15 +19595,14 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
19656
19595
|
eventSubject: 'playVideo',
|
19657
19596
|
eventDescription: 'User played the video',
|
19658
19597
|
contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
|
19659
|
-
|
19660
|
-
contentName: (_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.title) !== null && _o !== void 0 ? _o : '',
|
19598
|
+
contentName: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
|
19661
19599
|
playType,
|
19662
19600
|
startTime: videoCurrentTime,
|
19663
19601
|
videoDuration,
|
19664
|
-
contentTags: JSON.stringify((
|
19602
|
+
contentTags: JSON.stringify((_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
|
19665
19603
|
position: index + '',
|
19666
19604
|
contentFormat: 'video',
|
19667
|
-
traceInfo: (
|
19605
|
+
traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
|
19668
19606
|
}
|
19669
19607
|
});
|
19670
19608
|
setIsFirstPlay(false);
|
@@ -19703,7 +19641,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
19703
19641
|
}
|
19704
19642
|
}, [isLoadFinish]);
|
19705
19643
|
const onPause = React.useCallback(() => {
|
19706
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o
|
19644
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
19707
19645
|
const item = data[index];
|
19708
19646
|
const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
|
19709
19647
|
const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
|
@@ -19714,15 +19652,14 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
19714
19652
|
eventSubject: 'playOverVideo',
|
19715
19653
|
eventDescription: 'User finished playing the video',
|
19716
19654
|
contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
|
19717
|
-
|
19718
|
-
contentName: (_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.title) !== null && _o !== void 0 ? _o : '',
|
19655
|
+
contentName: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
|
19719
19656
|
endTime: videoCurrentTime,
|
19720
19657
|
videoDuration,
|
19721
19658
|
playDuration,
|
19722
|
-
contentTags: JSON.stringify((
|
19659
|
+
contentTags: JSON.stringify((_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
|
19723
19660
|
position: index + '',
|
19724
19661
|
contentFormat: 'video',
|
19725
|
-
traceInfo: (
|
19662
|
+
traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
|
19726
19663
|
}
|
19727
19664
|
});
|
19728
19665
|
}
|
@@ -19908,7 +19845,7 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
|
|
19908
19845
|
const CTA = (rec, index) => {
|
19909
19846
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
|
19910
19847
|
return (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
19911
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2 })));
|
19848
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2, isActive: true })));
|
19912
19849
|
}
|
19913
19850
|
return null;
|
19914
19851
|
};
|
@@ -19921,8 +19858,10 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
|
|
19921
19858
|
React.createElement(Nudge, { nudge: nudge }),
|
19922
19859
|
CTA(rec, index),
|
19923
19860
|
React.createElement("div", null,
|
19924
|
-
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) })
|
19925
|
-
|
19861
|
+
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) }),
|
19862
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2, includesCtaType: ['AniLink'], isActive: true })),
|
19863
|
+
React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })),
|
19864
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2, includesCtaType: ['AniLinkPopup'], isActive: true })));
|
19926
19865
|
}
|
19927
19866
|
return null;
|
19928
19867
|
};
|
@@ -20312,21 +20251,10 @@ const DiyStoryPreview = React.forwardRef(({ data = [], globalConfig, tipText, nu
|
|
20312
20251
|
return null;
|
20313
20252
|
}, [globalConfig]);
|
20314
20253
|
const renderBottom = (rec, index) => {
|
20315
|
-
var _a, _b, _c, _d
|
20254
|
+
var _a, _b, _c, _d;
|
20316
20255
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
20317
|
-
let cta = null;
|
20318
|
-
if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
|
20319
|
-
cta = '多商品CTA';
|
20320
|
-
}
|
20321
|
-
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
20322
|
-
cta = '商品CTA';
|
20323
|
-
}
|
20324
|
-
else {
|
20325
|
-
cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
|
20326
|
-
}
|
20327
|
-
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
20328
20256
|
return (React.createElement(React.Fragment, null,
|
20329
|
-
((
|
20257
|
+
((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && (React.createElement("div", { style: {
|
20330
20258
|
background: 'repeating-linear-gradient(0deg, rgba(26, 26, 25, 0.7), hsla(0, 0%, 100%, 0))',
|
20331
20259
|
height: '130px',
|
20332
20260
|
position: 'absolute',
|
@@ -20337,7 +20265,7 @@ const DiyStoryPreview = React.forwardRef(({ data = [], globalConfig, tipText, nu
|
|
20337
20265
|
pointerEvents
|
20338
20266
|
} })),
|
20339
20267
|
React.createElement("div", { style: {
|
20340
|
-
marginBottom: `${(
|
20268
|
+
marginBottom: `${(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _b !== void 0 ? _b : 40}px`,
|
20341
20269
|
zIndex: 999,
|
20342
20270
|
position: 'absolute',
|
20343
20271
|
bottom: 0,
|
@@ -20346,15 +20274,15 @@ const DiyStoryPreview = React.forwardRef(({ data = [], globalConfig, tipText, nu
|
|
20346
20274
|
paddingTop: '20px'
|
20347
20275
|
} },
|
20348
20276
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { style: {} },
|
20349
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, isActive: index === activeIndex
|
20277
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, isActive: index === activeIndex }))) : null,
|
20350
20278
|
React.createElement("div", null,
|
20351
20279
|
React.createElement(ExpandableText$1
|
20352
20280
|
// className='clc-sxp-bottom-text'
|
20353
20281
|
, {
|
20354
20282
|
// className='clc-sxp-bottom-text'
|
20355
|
-
isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (
|
20356
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLink'], isActive: index === activeIndex
|
20357
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex
|
20283
|
+
isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.title) !== null && _d !== void 0 ? _d : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none', padding: '0 20px', fontSize: '12px' }) }),
|
20284
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLink'], isActive: index === activeIndex }))),
|
20285
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
20358
20286
|
}
|
20359
20287
|
return null;
|
20360
20288
|
};
|