pb-sxp-ui 1.2.6 → 1.2.8
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 +119 -107
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -3
- package/dist/index.js +119 -107
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +119 -107
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/FormatImage.d.ts +1 -0
- package/es/core/components/SxpPageRender/FormatImage.js +23 -5
- package/es/core/components/SxpPageRender/Popup/index.js +5 -5
- package/es/core/components/SxpPageRender/VideoWidget/index.js +2 -2
- package/es/core/components/SxpPageRender/index.js +12 -6
- package/es/core/context/SxpDataSourceProvider.js +25 -15
- package/es/core/hooks/useEventReport.js +4 -4
- package/es/materials/sxp/cta/AniLink/index.js +1 -1
- package/es/materials/sxp/cta/AniLink/interactionRender.d.ts +0 -3
- package/es/materials/sxp/cta/AniLink/interactionRender.js +1 -2
- package/es/materials/sxp/cta/AniLink/material.js +9 -1
- package/es/materials/sxp/cta/AniLinkPopup/index.js +2 -2
- package/es/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +0 -10
- package/es/materials/sxp/cta/AniLinkPopup/interactionRender.js +1 -7
- package/es/materials/sxp/cta/AniLinkPopup/material.js +17 -10
- package/es/materials/sxp/popup/CommodityList/index.d.ts +0 -1
- package/es/materials/sxp/popup/CommodityList/index.js +2 -1
- package/es/materials/sxp/template/components/CommodityGroup.d.ts +1 -1
- package/es/materials/sxp/template/components/CommodityGroup.js +2 -1
- package/lib/core/components/SxpPageRender/FormatImage.d.ts +1 -0
- package/lib/core/components/SxpPageRender/FormatImage.js +23 -5
- package/lib/core/components/SxpPageRender/Popup/index.js +5 -5
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +2 -2
- package/lib/core/components/SxpPageRender/index.js +12 -6
- package/lib/core/context/SxpDataSourceProvider.js +25 -15
- package/lib/core/hooks/useEventReport.js +4 -4
- package/lib/materials/sxp/cta/AniLink/index.js +1 -1
- package/lib/materials/sxp/cta/AniLink/interactionRender.d.ts +0 -3
- package/lib/materials/sxp/cta/AniLink/interactionRender.js +1 -2
- package/lib/materials/sxp/cta/AniLink/material.js +9 -1
- package/lib/materials/sxp/cta/AniLinkPopup/index.js +2 -2
- package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +0 -10
- package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.js +1 -7
- package/lib/materials/sxp/cta/AniLinkPopup/material.js +17 -10
- package/lib/materials/sxp/popup/CommodityList/index.d.ts +0 -1
- package/lib/materials/sxp/popup/CommodityList/index.js +2 -1
- package/lib/materials/sxp/template/components/CommodityGroup.d.ts +1 -1
- package/lib/materials/sxp/template/components/CommodityGroup.js +2 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
@@ -1825,7 +1825,7 @@ button.swiper-pagination-bullet {
|
|
1825
1825
|
transform: translate3d(0px, 0px, 0px);
|
1826
1826
|
}
|
1827
1827
|
.clc-sxp-logo-banner {
|
1828
|
-
height:
|
1828
|
+
height: 56px;
|
1829
1829
|
width: 100%;
|
1830
1830
|
overflow: hidden;
|
1831
1831
|
display: -webkit-box;
|
@@ -1838,8 +1838,6 @@ button.swiper-pagination-bullet {
|
|
1838
1838
|
justify-content: center;
|
1839
1839
|
}
|
1840
1840
|
.clc-sxp-logo-banner img {
|
1841
|
-
height: 100%;
|
1842
|
-
width: 50%;
|
1843
1841
|
-o-object-fit: cover;
|
1844
1842
|
object-fit: cover;
|
1845
1843
|
display: block;
|
package/dist/index.js
CHANGED
@@ -558,6 +558,19 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
558
558
|
var _a, _b, _c, _d;
|
559
559
|
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;
|
560
560
|
}, [isAgreePolicy, globalConfig, isOpenConsent, isEditor]);
|
561
|
+
const getFilterRecList = useCallback((data) => {
|
562
|
+
var _a;
|
563
|
+
const recList = data === null || data === void 0 ? void 0 : data.recList;
|
564
|
+
const nList = (_a = recList === null || recList === void 0 ? void 0 : recList.map((item) => {
|
565
|
+
var _a, _b, _c, _d, _e, _f;
|
566
|
+
if (((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) && ((_c = (_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
567
|
+
const bindProducts = (_f = (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindProducts) === null || _e === void 0 ? void 0 : _e.filter((item) => !!(item === null || item === void 0 ? void 0 : item.bindCta))) !== null && _f !== void 0 ? _f : [];
|
568
|
+
return Object.assign(Object.assign({}, item), { video: Object.assign(Object.assign({}, item === null || item === void 0 ? void 0 : item.video), { bindProducts }) });
|
569
|
+
}
|
570
|
+
return item;
|
571
|
+
})) !== null && _a !== void 0 ? _a : [];
|
572
|
+
return nList;
|
573
|
+
}, []);
|
561
574
|
useEffect(() => {
|
562
575
|
const handleChangeThemeTag = (tag) => {
|
563
576
|
themeTag.current = tag;
|
@@ -629,7 +642,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
629
642
|
return result === null || result === void 0 ? void 0 : result.data;
|
630
643
|
}), [bffFetch, utmVal, maxSize, defaultSize]);
|
631
644
|
const loadVideos = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
632
|
-
var _j, _k;
|
633
645
|
if (rtcList.length <= 0) {
|
634
646
|
return;
|
635
647
|
}
|
@@ -639,8 +651,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
639
651
|
'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
|
640
652
|
themeTag: themeTag.current
|
641
653
|
});
|
642
|
-
setRtcList(rtcList.concat((
|
643
|
-
setCacheRtcList(cacheRtcList.concat((
|
654
|
+
setRtcList(rtcList.concat(getFilterRecList(data)));
|
655
|
+
setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
|
644
656
|
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
645
657
|
const bffEventReport = useCallback(({ userInfo, eventInfo }) => {
|
646
658
|
// 关闭 BFF 事件上报
|
@@ -704,24 +716,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
704
716
|
}), [bffFetch]);
|
705
717
|
// 获取 Tag
|
706
718
|
const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
707
|
-
var
|
719
|
+
var _j, _k, _l, _m, _o;
|
708
720
|
if (!utmVal || !isShowTag)
|
709
721
|
return;
|
710
722
|
try {
|
711
|
-
const val = (
|
723
|
+
const val = (_l = (_k = (_j = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _j === void 0 ? void 0 : _j.filter((val) => {
|
712
724
|
var _a, _b;
|
713
725
|
const key = val.split('=')[0];
|
714
726
|
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);
|
715
|
-
})) === null ||
|
727
|
+
})) === null || _k === void 0 ? void 0 : _k.join('&')) !== null && _l !== void 0 ? _l : '';
|
716
728
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
717
|
-
setTagList((
|
729
|
+
setTagList((_o = (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.tags) !== null && _o !== void 0 ? _o : []);
|
718
730
|
}
|
719
731
|
catch (e) {
|
720
732
|
console.log('e', e);
|
721
733
|
}
|
722
734
|
}), [bffFetch, utmVal, isShowTag]);
|
723
735
|
const ctaEvent = useCallback((eventInfo, rec, product, position) => {
|
724
|
-
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;
|
736
|
+
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;
|
725
737
|
const cta = product === null || product === void 0 ? void 0 : product.bindCta;
|
726
738
|
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);
|
727
739
|
let fromKName = '';
|
@@ -735,7 +747,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
735
747
|
fromKName = 'imagePage';
|
736
748
|
}
|
737
749
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
738
|
-
eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (
|
750
|
+
eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_2 = (_z = (_u = (_q = (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : (_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.traceInfo) !== null && _q !== void 0 ? _q : (_t = (_s = (_r = rec === null || rec === void 0 ? void 0 : rec.video) === null || _r === void 0 ? void 0 : _r.bindProduct) === null || _s === void 0 ? void 0 : _s.bindCta) === null || _t === void 0 ? void 0 : _t.traceInfo) !== null && _u !== void 0 ? _u : (_y = (_x = (_w = (_v = rec === null || rec === void 0 ? void 0 : rec.video) === null || _v === void 0 ? void 0 : _v.bindProducts) === null || _w === void 0 ? void 0 : _w[0]) === null || _x === void 0 ? void 0 : _x.bindCta) === null || _y === void 0 ? void 0 : _y.traceInfo) !== null && _z !== void 0 ? _z : (_1 = (_0 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : '', fromKName, fromKPage: (_3 = location === null || location === void 0 ? void 0 : location.href) !== null && _3 !== void 0 ? _3 : '' })
|
739
751
|
});
|
740
752
|
}, [bffEventReport, isFromHashtag]);
|
741
753
|
const h5EnterLink = useCallback(() => {
|
@@ -775,9 +787,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
775
787
|
bffGetTagList();
|
776
788
|
getRecommendVideos()
|
777
789
|
.then((data) => {
|
778
|
-
|
779
|
-
|
780
|
-
setCacheRtcList((_b = data === null || data === void 0 ? void 0 : data.recList) !== null && _b !== void 0 ? _b : []);
|
790
|
+
setRtcList(getFilterRecList(data));
|
791
|
+
setCacheRtcList(getFilterRecList(data));
|
781
792
|
})
|
782
793
|
.finally(() => {
|
783
794
|
bffEventReport({
|
@@ -797,9 +808,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
797
808
|
bffGetTagList();
|
798
809
|
getRecommendVideos()
|
799
810
|
.then((data) => {
|
800
|
-
|
801
|
-
|
802
|
-
setCacheRtcList((_b = data === null || data === void 0 ? void 0 : data.recList) !== null && _b !== void 0 ? _b : []);
|
811
|
+
setRtcList(getFilterRecList(data));
|
812
|
+
setCacheRtcList(getFilterRecList(data));
|
803
813
|
})
|
804
814
|
.finally(() => {
|
805
815
|
setLoading(false);
|
@@ -1267,14 +1277,14 @@ var settingRender$9 = [
|
|
1267
1277
|
* @Author: binruan@chatlabs.com
|
1268
1278
|
* @Date: 2024-03-12 10:59:06
|
1269
1279
|
* @LastEditors: binruan@chatlabs.com
|
1270
|
-
* @LastEditTime: 2024-
|
1280
|
+
* @LastEditTime: 2024-08-01 17:36:34
|
1271
1281
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
1272
1282
|
*
|
1273
1283
|
*/
|
1274
1284
|
function useEventReport() {
|
1275
1285
|
const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
|
1276
1286
|
const jumpToWeb = useCallback((data, product, cta, position) => {
|
1277
|
-
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;
|
1287
|
+
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;
|
1278
1288
|
let fromKName = '';
|
1279
1289
|
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))) {
|
1280
1290
|
fromKName = 'pdpPage';
|
@@ -1305,12 +1315,12 @@ function useEventReport() {
|
|
1305
1315
|
position: position + '',
|
1306
1316
|
contentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
|
1307
1317
|
ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
|
1308
|
-
traceInfo: (
|
1318
|
+
traceInfo: (_1 = (_y = (_w = (_s = (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : (_r = (_q = data === null || data === void 0 ? void 0 : data.video) === null || _q === void 0 ? void 0 : _q.bindProduct) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : (_v = (_u = (_t = data === null || data === void 0 ? void 0 : data.video) === null || _t === void 0 ? void 0 : _t.bindProducts) === null || _u === void 0 ? void 0 : _u[0]) === null || _v === void 0 ? void 0 : _v.traceInfo) !== null && _w !== void 0 ? _w : (_x = data === null || data === void 0 ? void 0 : data.product) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_0 = (_z = data === null || data === void 0 ? void 0 : data.video) === null || _z === void 0 ? void 0 : _z.bindCta) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : ''
|
1309
1319
|
}
|
1310
1320
|
});
|
1311
1321
|
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
1312
1322
|
const productView = useCallback((data, product, cta, viewTime, position) => {
|
1313
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
1323
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
1314
1324
|
let fromKName = '';
|
1315
1325
|
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))) {
|
1316
1326
|
fromKName = 'pdpPage';
|
@@ -1330,7 +1340,7 @@ function useEventReport() {
|
|
1330
1340
|
position: position + '',
|
1331
1341
|
contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
|
1332
1342
|
ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
|
1333
|
-
traceInfo: (
|
1343
|
+
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 : '',
|
1334
1344
|
timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
|
1335
1345
|
eventSubject: 'productView',
|
1336
1346
|
eventDescription: 'User browsed the product'
|
@@ -8780,17 +8790,10 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
8780
8790
|
};
|
8781
8791
|
var ExpandableText$1 = memo(ExpandableText);
|
8782
8792
|
|
8783
|
-
/*
|
8784
|
-
* @Author: binruan@chatlabs.com
|
8785
|
-
* @Date: 2024-03-20 10:27:31
|
8786
|
-
* @LastEditors: binruan@chatlabs.com
|
8787
|
-
* @LastEditTime: 2024-07-31 17:54:50
|
8788
|
-
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
|
8789
|
-
*
|
8790
|
-
*/
|
8791
8793
|
const FormatImage = forwardRef((props, ref) => {
|
8792
|
-
const { src, onLoad, style, className, loading } = props;
|
8794
|
+
const { src, onLoad, style, className, loading, alt = 'image' } = props;
|
8793
8795
|
const [imgSrc, setImgSrc] = useState();
|
8796
|
+
const imgRef = useRef(null);
|
8794
8797
|
useImperativeHandle(ref, () => ({
|
8795
8798
|
setSrc: (v) => {
|
8796
8799
|
setImgSrc(v);
|
@@ -8799,39 +8802,32 @@ const FormatImage = forwardRef((props, ref) => {
|
|
8799
8802
|
useEffect(() => {
|
8800
8803
|
setImgSrc(src);
|
8801
8804
|
}, [src]);
|
8802
|
-
|
8803
|
-
|
8804
|
-
|
8805
|
-
|
8806
|
-
|
8807
|
-
|
8808
|
-
|
8809
|
-
|
8810
|
-
|
8811
|
-
|
8812
|
-
|
8813
|
-
|
8814
|
-
|
8815
|
-
// },
|
8816
|
-
// { threshold: 0.1 } // 触发阈值,可根据需要调整
|
8817
|
-
// );
|
8818
|
-
// observer.observe(current);
|
8819
|
-
// }
|
8820
|
-
// return () => {
|
8821
|
-
// if (observer && current) {
|
8822
|
-
// observer.unobserve(current);
|
8823
|
-
// }
|
8824
|
-
// };
|
8825
|
-
// }, [src]);
|
8805
|
+
useEffect(() => {
|
8806
|
+
const onShow = () => {
|
8807
|
+
var _a, _b;
|
8808
|
+
if (src && ((_b = (_a = imgRef === null || imgRef === void 0 ? void 0 : imgRef.current) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.display) === 'none') {
|
8809
|
+
imgRef.current.src = '';
|
8810
|
+
imgRef.current.src = src;
|
8811
|
+
}
|
8812
|
+
};
|
8813
|
+
SXP_EVENT_BUS.on(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
|
8814
|
+
return () => {
|
8815
|
+
SXP_EVENT_BUS.off(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
|
8816
|
+
};
|
8817
|
+
}, [src]);
|
8826
8818
|
return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
|
8827
8819
|
React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
|
8828
8820
|
React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
|
8829
8821
|
React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
|
8830
|
-
React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
|
8822
|
+
React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign(Object.assign({}, style), { display: 'none' }), loading: loading, onLoad: (e) => {
|
8823
|
+
if (imgRef.current)
|
8824
|
+
imgRef.current.style.display = 'block';
|
8831
8825
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
|
8832
|
-
}, alt:
|
8826
|
+
}, alt: alt }))) : (React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign(Object.assign({}, style), { display: 'none' }), loading: loading, onLoad: (e) => {
|
8827
|
+
if (imgRef.current)
|
8828
|
+
imgRef.current.style.display = 'block';
|
8833
8829
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
|
8834
|
-
}, alt:
|
8830
|
+
}, alt: alt }))));
|
8835
8831
|
});
|
8836
8832
|
var FormatImage$1 = memo(FormatImage);
|
8837
8833
|
|
@@ -8862,7 +8858,8 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
|
|
8862
8858
|
const handleClick = (item, index) => {
|
8863
8859
|
if (check === index)
|
8864
8860
|
return;
|
8865
|
-
|
8861
|
+
const prevItem = products === null || products === void 0 ? void 0 : products[check];
|
8862
|
+
productView(popupDetailData, prevItem, prevItem === null || prevItem === void 0 ? void 0 : prevItem.bindCta, popupCurTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
|
8866
8863
|
onCLick === null || onCLick === void 0 ? void 0 : onCLick(index);
|
8867
8864
|
};
|
8868
8865
|
return (React.createElement(React.Fragment, null, (data === null || data === void 0 ? void 0 : data.open) && ((products && (products === null || products === void 0 ? void 0 : products.length) > 1) || !popupDetailData) && (React.createElement(Scroll$1, { enableSlideActive: true, isPadding: false, style: Object.assign(Object.assign({}, style), data === null || data === void 0 ? void 0 : data.style) }, (_a = (popupDetailData ? products : [0, 1, 2, 3])) === null || _a === void 0 ? void 0 : _a.map((item, index) => {
|
@@ -10183,12 +10180,13 @@ var Img$1 = memo(Img);
|
|
10183
10180
|
|
10184
10181
|
const CommodityList$1 = (_a) => {
|
10185
10182
|
var _b, _c;
|
10186
|
-
var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle,
|
10183
|
+
var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, translateY = 0, commodityPicture, isExternalLink, onClick } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "translateY", "commodityPicture", "isExternalLink", "onClick"]);
|
10187
10184
|
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
|
10188
10185
|
const { jumpToWeb } = useEventReport();
|
10189
10186
|
const { popup } = useEditor();
|
10190
10187
|
const recData = isPost ? rec : popupDetailData;
|
10191
10188
|
const product = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [null, null, null, null];
|
10189
|
+
const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
10192
10190
|
const priceText = useCallback((product) => {
|
10193
10191
|
var _a, _b, _c, _d, _e;
|
10194
10192
|
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
@@ -14042,7 +14040,7 @@ const AniLink$1 = (_a) => {
|
|
14042
14040
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
14043
14041
|
}
|
14044
14042
|
};
|
14045
|
-
const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情
|
14043
|
+
const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情';
|
14046
14044
|
const aniTimStyle = useMemo(() => {
|
14047
14045
|
var _a, _b;
|
14048
14046
|
const ani = event === null || event === void 0 ? void 0 : event.animation;
|
@@ -14089,7 +14087,7 @@ var AniLinkComponent = memo(AniLink$1);
|
|
14089
14087
|
* @Author: binruan@chatlabs.com
|
14090
14088
|
* @Date: 2024-07-05 14:08:41
|
14091
14089
|
* @LastEditors: binruan@chatlabs.com
|
14092
|
-
* @LastEditTime: 2024-
|
14090
|
+
* @LastEditTime: 2024-08-02 16:22:39
|
14093
14091
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
|
14094
14092
|
*
|
14095
14093
|
*/
|
@@ -14117,11 +14115,10 @@ var interactionRender$1 = [
|
|
14117
14115
|
label: '动画',
|
14118
14116
|
options: [
|
14119
14117
|
{
|
14120
|
-
label: '
|
14118
|
+
label: '默认',
|
14121
14119
|
value: 1
|
14122
14120
|
}
|
14123
14121
|
],
|
14124
|
-
initialValue: 1,
|
14125
14122
|
fieldProps: {
|
14126
14123
|
style: {
|
14127
14124
|
width: '100%'
|
@@ -14148,7 +14145,7 @@ var interactionRender$1 = [
|
|
14148
14145
|
* @Author: binruan@chatlabs.com
|
14149
14146
|
* @Date: 2023-07-28 18:29:57
|
14150
14147
|
* @LastEditors: binruan@chatlabs.com
|
14151
|
-
* @LastEditTime: 2024-
|
14148
|
+
* @LastEditTime: 2024-08-02 17:03:34
|
14152
14149
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\material.tsx
|
14153
14150
|
*
|
14154
14151
|
*/
|
@@ -14168,7 +14165,15 @@ const AniLink = createMaterial(AniLinkComponent, {
|
|
14168
14165
|
ctaTitle: {
|
14169
14166
|
fontSize: 15,
|
14170
14167
|
color: '#fff',
|
14171
|
-
textAlign: '
|
14168
|
+
textAlign: 'center'
|
14169
|
+
}
|
14170
|
+
},
|
14171
|
+
event: {
|
14172
|
+
animation: {
|
14173
|
+
backgroundColor: '#F40082',
|
14174
|
+
name: 1,
|
14175
|
+
delay: 1000,
|
14176
|
+
duration: 2000
|
14172
14177
|
}
|
14173
14178
|
}
|
14174
14179
|
},
|
@@ -14475,7 +14480,7 @@ const AniLinkPopup$1 = (_a) => {
|
|
14475
14480
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
14476
14481
|
}
|
14477
14482
|
};
|
14478
|
-
const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情
|
14483
|
+
const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情';
|
14479
14484
|
const aniTimStyle = useMemo(() => {
|
14480
14485
|
const ani = event === null || event === void 0 ? void 0 : event.animation;
|
14481
14486
|
if (ani) {
|
@@ -14507,7 +14512,7 @@ const AniLinkPopup$1 = (_a) => {
|
|
14507
14512
|
React.createElement("div", { onClick: onClose, className: styles['modal-icon-wrapper'], style: { padding: (_s = style === null || style === void 0 ? void 0 : style['padding']) !== null && _s !== void 0 ? _s : 0 } },
|
14508
14513
|
React.createElement("img", { src: (_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _t !== void 0 ? _t : closeIcon, alt: 'close', className: styles['modal-icon-wrapper-img'] })),
|
14509
14514
|
React.createElement(Img$1, { src: src, rec: recData, item: (_y = (_w = (_v = (_u = recData === null || recData === void 0 ? void 0 : recData.video) === null || _u === void 0 ? void 0 : _u.bindProducts) === null || _v === void 0 ? void 0 : _v[0]) !== null && _w !== void 0 ? _w : (_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.bindProduct) !== null && _y !== void 0 ? _y : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
|
14510
|
-
(!recData || (product === null || product === void 0 ? void 0 : product.title)) && (React.createElement("div", { className: styles['
|
14515
|
+
(!recData || (product === null || product === void 0 ? void 0 : product.title)) && (React.createElement("div", { className: styles['one-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
14511
14516
|
__html: setFontForText((_z = product === null || product === void 0 ? void 0 : product.title) !== null && _z !== void 0 ? _z : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
|
14512
14517
|
} })),
|
14513
14518
|
React.createElement("div", { className: styles['one-line-ellipsis'], style: Object.assign(Object.assign({}, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: ((_0 = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _0 === void 0 ? void 0 : _0.height) + 'px' }), dangerouslySetInnerHTML: {
|
@@ -14516,14 +14521,6 @@ const AniLinkPopup$1 = (_a) => {
|
|
14516
14521
|
};
|
14517
14522
|
var AniLinkPopupComponent = memo(AniLinkPopup$1);
|
14518
14523
|
|
14519
|
-
/*
|
14520
|
-
* @Author: binruan@chatlabs.com
|
14521
|
-
* @Date: 2024-07-04 15:28:39
|
14522
|
-
* @LastEditors: binruan@chatlabs.com
|
14523
|
-
* @LastEditTime: 2024-07-05 17:46:42
|
14524
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
|
14525
|
-
*
|
14526
|
-
*/
|
14527
14524
|
var interactionRender = [
|
14528
14525
|
{
|
14529
14526
|
title: '点击事件',
|
@@ -14537,22 +14534,16 @@ var interactionRender = [
|
|
14537
14534
|
{
|
14538
14535
|
title: '动画效果',
|
14539
14536
|
child: [
|
14540
|
-
{
|
14541
|
-
type: 'Color',
|
14542
|
-
name: ['animation', 'backgroundColor'],
|
14543
|
-
label: '动画颜色'
|
14544
|
-
},
|
14545
14537
|
{
|
14546
14538
|
type: 'Select',
|
14547
14539
|
name: ['animation', 'name'],
|
14548
14540
|
label: '动画',
|
14549
14541
|
options: [
|
14550
14542
|
{
|
14551
|
-
label: '
|
14543
|
+
label: '默认',
|
14552
14544
|
value: 1
|
14553
14545
|
}
|
14554
14546
|
],
|
14555
|
-
initialValue: 1,
|
14556
14547
|
fieldProps: {
|
14557
14548
|
style: {
|
14558
14549
|
width: '100%'
|
@@ -14575,11 +14566,19 @@ var interactionRender = [
|
|
14575
14566
|
}
|
14576
14567
|
];
|
14577
14568
|
|
14569
|
+
/*
|
14570
|
+
* @Author: binruan@chatlabs.com
|
14571
|
+
* @Date: 2024-07-24 14:58:40
|
14572
|
+
* @LastEditors: binruan@chatlabs.com
|
14573
|
+
* @LastEditTime: 2024-08-02 17:09:37
|
14574
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\material.tsx
|
14575
|
+
*
|
14576
|
+
*/
|
14578
14577
|
/*
|
14579
14578
|
* @Author: binruan@chatlabs.com
|
14580
14579
|
* @Date: 2023-07-28 18:29:57
|
14581
14580
|
* @LastEditors: binruan@chatlabs.com
|
14582
|
-
* @LastEditTime: 2024-
|
14581
|
+
* @LastEditTime: 2024-08-02 17:09:14
|
14583
14582
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\material.tsx
|
14584
14583
|
*
|
14585
14584
|
*/
|
@@ -14598,32 +14597,39 @@ const AniLinkPopup = createMaterial(AniLinkPopupComponent, {
|
|
14598
14597
|
ctaTempStyles: {
|
14599
14598
|
img: {
|
14600
14599
|
borderRadius: 3,
|
14601
|
-
width:
|
14602
|
-
height:
|
14603
|
-
marginBottom:
|
14600
|
+
width: 108,
|
14601
|
+
height: 108,
|
14602
|
+
marginBottom: 0
|
14604
14603
|
},
|
14605
14604
|
title: {
|
14606
|
-
fontSize:
|
14605
|
+
fontSize: 14,
|
14607
14606
|
color: '#000',
|
14608
14607
|
textAlign: 'left'
|
14609
14608
|
},
|
14610
14609
|
ctaTitle: {
|
14611
|
-
|
14610
|
+
width: 108,
|
14611
|
+
height: 22,
|
14612
|
+
fontSize: 12,
|
14612
14613
|
color: '#fff',
|
14613
14614
|
textAlign: 'center',
|
14614
|
-
width: 76,
|
14615
|
-
height: 20,
|
14616
14615
|
backgroundColor: 'rgba(0,0,0,1)'
|
14617
14616
|
}
|
14617
|
+
},
|
14618
|
+
event: {
|
14619
|
+
animation: {
|
14620
|
+
name: 1,
|
14621
|
+
delay: 1000,
|
14622
|
+
duration: 2000
|
14623
|
+
}
|
14618
14624
|
}
|
14619
14625
|
},
|
14620
14626
|
style: {
|
14621
|
-
width:
|
14622
|
-
height:
|
14627
|
+
width: 120,
|
14628
|
+
height: 185,
|
14623
14629
|
borderRadius: 3,
|
14624
14630
|
backgroundColor: 'rgba(255,255,255,1)',
|
14625
14631
|
padding: 7,
|
14626
|
-
margin:
|
14632
|
+
margin: 15
|
14627
14633
|
}
|
14628
14634
|
},
|
14629
14635
|
w: 100,
|
@@ -15097,7 +15103,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
15097
15103
|
} },
|
15098
15104
|
React.createElement("div", { style: { position: 'relative', width: '100%', height: '100%' } },
|
15099
15105
|
React.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
|
15100
|
-
React.createElement(
|
15106
|
+
isPauseVideo && (React.createElement(FormatImage$1, { className: 'clc-pb-video-pause', src: videoPlayIcon !== null && videoPlayIcon !== void 0 ? videoPlayIcon : PAUSE_ICON, alt: 'pause' })))),
|
15101
15107
|
renderPoster,
|
15102
15108
|
renderLoading)) : (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, style: {
|
15103
15109
|
position: 'relative',
|
@@ -15108,7 +15114,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
15108
15114
|
React.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
|
15109
15115
|
renderPoster,
|
15110
15116
|
renderLoading,
|
15111
|
-
React.createElement(
|
15117
|
+
isPauseVideo && React.createElement(FormatImage$1, { className: 'clc-pb-video-pause', src: videoPlayIcon !== null && videoPlayIcon !== void 0 ? videoPlayIcon : PAUSE_ICON, alt: 'pause' })))));
|
15112
15118
|
};
|
15113
15119
|
var VideoWidget$3 = memo(VideoWidget$2);
|
15114
15120
|
|
@@ -15506,7 +15512,7 @@ var Tagbar$1 = memo(Tagbar);
|
|
15506
15512
|
* @Author: binruan@chatlabs.com
|
15507
15513
|
* @Date: 2024-01-15 19:03:09
|
15508
15514
|
* @LastEditors: binruan@chatlabs.com
|
15509
|
-
* @LastEditTime: 2024-
|
15515
|
+
* @LastEditTime: 2024-08-02 10:50:56
|
15510
15516
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
15511
15517
|
*
|
15512
15518
|
*/
|
@@ -15519,6 +15525,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15519
15525
|
const viewTime = useRef();
|
15520
15526
|
const [isLoadMore, setIsLoadMore] = useState(false);
|
15521
15527
|
const [isShowMore, setIsShowMore] = useState(false);
|
15528
|
+
const [isReload, setIsReload] = useState(false);
|
15529
|
+
const skipLinkRef = useRef(false);
|
15522
15530
|
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
|
15523
15531
|
const { backMainFeed } = useEventReport();
|
15524
15532
|
const { productView } = useEventReport();
|
@@ -15567,7 +15575,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15567
15575
|
useEffect(() => {
|
15568
15576
|
const item = data === null || data === void 0 ? void 0 : data[activeIndex];
|
15569
15577
|
const visibleChange = () => {
|
15570
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
15578
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
15571
15579
|
const repCond = !openHashtag && !isShowConsent;
|
15572
15580
|
if (document.visibilityState === 'hidden') {
|
15573
15581
|
// 当用户导航到新页面、切换标签页、关闭标签页、最小化或关闭浏览器、刷新原页面(即离开原页面时),或者在移动设备上从浏览器切换到不同的应用程序时
|
@@ -15607,11 +15615,14 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15607
15615
|
fromKName,
|
15608
15616
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
15609
15617
|
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 : '',
|
15610
|
-
traceInfo: (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : ''
|
15618
|
+
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 : ''
|
15611
15619
|
}
|
15612
15620
|
});
|
15613
15621
|
}
|
15614
15622
|
else if (document.visibilityState === 'visible') {
|
15623
|
+
if (skipLinkRef.current === true) {
|
15624
|
+
setIsReload(true);
|
15625
|
+
}
|
15615
15626
|
// 页面可见时触发,注意页面初始化时不会触发
|
15616
15627
|
handleH5EnterLink();
|
15617
15628
|
if (repCond) {
|
@@ -15652,7 +15663,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15652
15663
|
const minusHeight = useMemo(() => {
|
15653
15664
|
let minusHeight = 0;
|
15654
15665
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
15655
|
-
minusHeight +=
|
15666
|
+
minusHeight += 56;
|
15656
15667
|
}
|
15657
15668
|
return minusHeight;
|
15658
15669
|
}, []);
|
@@ -15778,7 +15789,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15778
15789
|
}
|
15779
15790
|
};
|
15780
15791
|
const handleSlideSkip = (item, position) => {
|
15781
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
15792
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
15782
15793
|
if (isPreview || waterFallData)
|
15783
15794
|
return;
|
15784
15795
|
const t = new Date() - curTime.current;
|
@@ -15797,10 +15808,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15797
15808
|
contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
|
15798
15809
|
position: position + '',
|
15799
15810
|
contentId: (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
|
15800
|
-
traceInfo: (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : ''
|
15811
|
+
traceInfo: (_u = (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : (_t = item === null || item === void 0 ? void 0 : item.product) === null || _t === void 0 ? void 0 : _t.traceInfo) !== null && _u !== void 0 ? _u : ''
|
15801
15812
|
}
|
15802
15813
|
});
|
15803
15814
|
setSlideSkipState();
|
15815
|
+
skipLinkRef.current = true;
|
15804
15816
|
window.location.href = window.getJointUtmLink(link);
|
15805
15817
|
}
|
15806
15818
|
}
|
@@ -15917,7 +15929,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15917
15929
|
renderBottom(rec, index),
|
15918
15930
|
renderLikeButton(rec, index)))))));
|
15919
15931
|
});
|
15920
|
-
}, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage]);
|
15932
|
+
}, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage, isReload]);
|
15921
15933
|
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
|
15922
15934
|
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
|
15923
15935
|
return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
|
@@ -16328,7 +16340,7 @@ var index$1 = memo(DiyPortalPreview);
|
|
16328
16340
|
* @Author: binruan@chatlabs.com
|
16329
16341
|
* @Date: 2023-10-31 10:56:01
|
16330
16342
|
* @LastEditors: binruan@chatlabs.com
|
16331
|
-
* @LastEditTime: 2024-
|
16343
|
+
* @LastEditTime: 2024-08-01 15:23:51
|
16332
16344
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
|
16333
16345
|
*
|
16334
16346
|
*/
|
@@ -16354,7 +16366,7 @@ const Popup = () => {
|
|
16354
16366
|
}
|
16355
16367
|
}, [popup]);
|
16356
16368
|
const handleClose = () => {
|
16357
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
16369
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
16358
16370
|
if (!popup ||
|
16359
16371
|
(popup === null || popup === void 0 ? void 0 : popup.id) === '' ||
|
16360
16372
|
!visible ||
|
@@ -16365,10 +16377,10 @@ const Popup = () => {
|
|
16365
16377
|
const value = (_d = (_c = (_b = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _b === void 0 ? void 0 : _b.globalConfig) === null || _c === void 0 ? void 0 : _c.popupList) === null || _d === void 0 ? void 0 : _d.find((item) => (item === null || item === void 0 ? void 0 : item.id) === (popup === null || popup === void 0 ? void 0 : popup.id));
|
16366
16378
|
if (((_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.type) === 'CommodityDetail' || ((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.type) === 'CommodityDetailDiroNew') {
|
16367
16379
|
const data = popupDetailData;
|
16368
|
-
let product = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct;
|
16369
|
-
let cta = (
|
16380
|
+
let product = (_h = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : (_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];
|
16381
|
+
let cta = (_o = (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.bindProduct) === null || _m === void 0 ? void 0 : _m.bindCta) !== null && _o !== void 0 ? _o : (_r = (_q = (_p = data === null || data === void 0 ? void 0 : data.video) === null || _p === void 0 ? void 0 : _p.bindProducts) === null || _q === void 0 ? void 0 : _q[0]) === null || _r === void 0 ? void 0 : _r.bindCta;
|
16370
16382
|
if ((checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current) >= 0) {
|
16371
|
-
const p = (
|
16383
|
+
const p = (_t = (_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.bindProducts) === null || _t === void 0 ? void 0 : _t[checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current];
|
16372
16384
|
if (p) {
|
16373
16385
|
product = p;
|
16374
16386
|
cta = p === null || p === void 0 ? void 0 : p.bindCta;
|
@@ -16394,7 +16406,7 @@ const Popup = () => {
|
|
16394
16406
|
const isExternalLink = ((_d = (_c = (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.event) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
|
16395
16407
|
const isPopup = ((_g = (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.event) === null || _f === void 0 ? void 0 : _f.onClick) === null || _g === void 0 ? void 0 : _g.linkType) === 'popup';
|
16396
16408
|
const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
|
16397
|
-
return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw', height: '100%' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose
|
16409
|
+
return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw', height: '100%' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
|
16398
16410
|
}
|
16399
16411
|
else {
|
16400
16412
|
return React.createElement(React.Fragment, null);
|