pb-sxp-ui 1.0.7 → 1.0.9
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 +72 -69
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +72 -69
- 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 +72 -69
- 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/LikeButton/index.d.ts +1 -0
- package/es/core/components/SxpPageRender/LikeButton/index.js +3 -3
- package/es/core/components/SxpPageRender/Popup/index.js +1 -1
- package/es/core/components/SxpPageRender/RenderCard.js +1 -1
- package/es/core/components/SxpPageRender/VideoWidget/index.js +3 -3
- package/es/core/components/SxpPageRender/WaterFall/List.js +1 -1
- package/es/core/components/SxpPageRender/WaterFall/index.js +3 -3
- package/es/core/components/SxpPageRender/index.js +8 -8
- package/es/core/context/SxpDataSourceProvider.d.ts +4 -2
- package/es/core/context/SxpDataSourceProvider.js +2 -2
- package/es/core/hooks/useEventReport.d.ts +2 -2
- package/es/core/hooks/useEventReport.js +4 -4
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
- package/es/materials/sxp/popup/CommodityDetail/index.js +4 -3
- package/es/materials/sxp/popup/CommodityDetailDiro/index.d.ts +1 -0
- package/es/materials/sxp/popup/CommodityDetailDiro/index.js +4 -3
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +4 -3
- package/es/materials/sxp/template/Appoint/index.d.ts +1 -0
- package/es/materials/sxp/template/Commodity/index.d.ts +1 -0
- package/es/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
- package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
- package/es/materials/sxp/template/Link/index.d.ts +1 -0
- package/es/materials/sxp/template/Link/index.js +3 -3
- package/es/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodity/index.js +6 -6
- package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +6 -6
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +6 -6
- package/es/materials/sxp/template/components/EventProvider.d.ts +1 -0
- package/es/materials/sxp/template/components/EventProvider.js +8 -7
- package/es/materials/sxp/template/components/Img.d.ts +1 -0
- package/es/materials/sxp/template/components/Img.js +3 -3
- package/lib/core/components/SxpPageRender/LikeButton/index.d.ts +1 -0
- package/lib/core/components/SxpPageRender/LikeButton/index.js +3 -3
- package/lib/core/components/SxpPageRender/Popup/index.js +1 -1
- package/lib/core/components/SxpPageRender/RenderCard.js +1 -1
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +3 -3
- package/lib/core/components/SxpPageRender/WaterFall/List.js +1 -1
- package/lib/core/components/SxpPageRender/WaterFall/index.js +3 -3
- package/lib/core/components/SxpPageRender/index.js +8 -8
- package/lib/core/context/SxpDataSourceProvider.d.ts +4 -2
- package/lib/core/context/SxpDataSourceProvider.js +2 -2
- package/lib/core/hooks/useEventReport.d.ts +2 -2
- package/lib/core/hooks/useEventReport.js +4 -4
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.js +4 -3
- package/lib/materials/sxp/popup/CommodityDetailDiro/index.d.ts +1 -0
- package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +4 -3
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +4 -3
- package/lib/materials/sxp/template/Appoint/index.d.ts +1 -0
- package/lib/materials/sxp/template/Commodity/index.d.ts +1 -0
- package/lib/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
- package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
- package/lib/materials/sxp/template/Link/index.d.ts +1 -0
- package/lib/materials/sxp/template/Link/index.js +3 -3
- package/lib/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodity/index.js +6 -6
- package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +6 -6
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +6 -6
- package/lib/materials/sxp/template/components/EventProvider.d.ts +1 -0
- package/lib/materials/sxp/template/components/EventProvider.js +8 -7
- package/lib/materials/sxp/template/components/Img.d.ts +1 -0
- package/lib/materials/sxp/template/components/Img.js +3 -3
- package/package.json +1 -1
package/dist/pb-ui.js
CHANGED
@@ -546,7 +546,7 @@
|
|
546
546
|
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/customform', { method: 'POST', body }));
|
547
547
|
return res === null || res === void 0 ? void 0 : res.success;
|
548
548
|
}), [bffFetch]);
|
549
|
-
const ctaEvent = React.useCallback((eventInfo, rec, product) => {
|
549
|
+
const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
|
550
550
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
551
551
|
const cta = product === null || product === void 0 ? void 0 : product.bindCta;
|
552
552
|
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);
|
@@ -561,7 +561,7 @@
|
|
561
561
|
fromKName = 'imagePage';
|
562
562
|
}
|
563
563
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
564
|
-
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:
|
564
|
+
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 + '', relatedContentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', relatedProductId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
|
565
565
|
});
|
566
566
|
}, [bffEventReport, isFromHashtag]);
|
567
567
|
React.useEffect(() => {
|
@@ -8098,13 +8098,13 @@
|
|
8098
8098
|
* @Author: binruan@chatlabs.com
|
8099
8099
|
* @Date: 2024-03-12 10:59:06
|
8100
8100
|
* @LastEditors: binruan@chatlabs.com
|
8101
|
-
* @LastEditTime: 2024-04-
|
8101
|
+
* @LastEditTime: 2024-04-15 09:47:08
|
8102
8102
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
8103
8103
|
*
|
8104
8104
|
*/
|
8105
8105
|
function useEventReport() {
|
8106
8106
|
const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
|
8107
|
-
const jumpToWeb = React.useCallback((data, product, cta) => {
|
8107
|
+
const jumpToWeb = React.useCallback((data, product, cta, position) => {
|
8108
8108
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
8109
8109
|
let fromKName = '';
|
8110
8110
|
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))) {
|
@@ -8133,14 +8133,14 @@
|
|
8133
8133
|
fromKName,
|
8134
8134
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
8135
8135
|
contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
|
8136
|
-
position:
|
8136
|
+
position: position + '',
|
8137
8137
|
relatedContentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
|
8138
8138
|
relatedCtatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
|
8139
8139
|
traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
|
8140
8140
|
}
|
8141
8141
|
});
|
8142
8142
|
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
8143
|
-
const productView = React.useCallback((data, product, cta, viewTime) => {
|
8143
|
+
const productView = React.useCallback((data, product, cta, viewTime, position) => {
|
8144
8144
|
var _a, _b, _c, _d;
|
8145
8145
|
let fromKName = '';
|
8146
8146
|
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))) {
|
@@ -8158,7 +8158,7 @@
|
|
8158
8158
|
fromKName,
|
8159
8159
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
8160
8160
|
contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
|
8161
|
-
position:
|
8161
|
+
position: position + '',
|
8162
8162
|
relatedContentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
|
8163
8163
|
relatedCtatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
|
8164
8164
|
traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
|
@@ -8301,7 +8301,7 @@
|
|
8301
8301
|
|
8302
8302
|
const CommodityDetail$1 = (_a) => {
|
8303
8303
|
var _b, _c, _d, _e, _f, _g, _h, _j;
|
8304
|
-
var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle"]);
|
8304
|
+
var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index"]);
|
8305
8305
|
const { sxpParameter } = useSxpDataSource();
|
8306
8306
|
const { popupDetailData, bffEventReport, isPreview, waterFallData } = useSxpDataSource();
|
8307
8307
|
const { jumpToWeb, productView } = useEventReport();
|
@@ -8310,11 +8310,12 @@
|
|
8310
8310
|
const data = isPost ? rec : popupDetailData;
|
8311
8311
|
const product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
8312
8312
|
const cta = isPost ? (_c = data === null || data === void 0 ? void 0 : data.product) === null || _c === void 0 ? void 0 : _c.bindCta : (_e = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.bindCta;
|
8313
|
+
const position = isPost ? index : popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
8313
8314
|
const handleLink = () => {
|
8314
8315
|
if (product === null || product === void 0 ? void 0 : product.link) {
|
8315
|
-
jumpToWeb(popupDetailData, product, cta);
|
8316
|
+
jumpToWeb(popupDetailData, product, cta, position);
|
8316
8317
|
if (!isPost) {
|
8317
|
-
productView(data, product, cta, viewTime || curTimeRef.current);
|
8318
|
+
productView(data, product, cta, viewTime || curTimeRef.current, position);
|
8318
8319
|
}
|
8319
8320
|
window.location.href = window.getJointUtmLink(product.link);
|
8320
8321
|
}
|
@@ -8751,7 +8752,7 @@
|
|
8751
8752
|
|
8752
8753
|
const CommodityDetailDiroNew$1 = (_a) => {
|
8753
8754
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
8754
|
-
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle"]);
|
8755
|
+
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index"]);
|
8755
8756
|
React.useState(true);
|
8756
8757
|
const { sxpParameter } = useSxpDataSource();
|
8757
8758
|
const { popupDetailData, bffEventReport, isPreview, swiperRef, waterFallData } = useSxpDataSource();
|
@@ -8767,11 +8768,12 @@
|
|
8767
8768
|
const data = isPost ? rec : popupDetailData;
|
8768
8769
|
const product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
8769
8770
|
const cta = isPost ? (_c = data === null || data === void 0 ? void 0 : data.product) === null || _c === void 0 ? void 0 : _c.bindCta : (_e = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.bindCta;
|
8771
|
+
const position = isPost ? index : popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
8770
8772
|
const handleLink = () => {
|
8771
8773
|
if (product === null || product === void 0 ? void 0 : product.link) {
|
8772
|
-
jumpToWeb(data, product, cta);
|
8774
|
+
jumpToWeb(data, product, cta, position);
|
8773
8775
|
if (!isPost) {
|
8774
|
-
productView(data, product, cta, viewTime || curTimeRef.current);
|
8776
|
+
productView(data, product, cta, viewTime || curTimeRef.current, position);
|
8775
8777
|
}
|
8776
8778
|
window.location.href = window.getJointUtmLink(product.link);
|
8777
8779
|
}
|
@@ -9184,7 +9186,7 @@ Made in Italy` })));
|
|
9184
9186
|
}
|
9185
9187
|
|
9186
9188
|
const EventProvider = (_a) => {
|
9187
|
-
var { rec, children, className, onClick, style, isExternalLink = false } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink"]);
|
9189
|
+
var { rec, children, className, onClick, style, isExternalLink = false, index } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index"]);
|
9188
9190
|
const ref = React.useRef(null);
|
9189
9191
|
const isOnScreen = useOnScreen(ref);
|
9190
9192
|
const { popup } = useEditor();
|
@@ -9197,23 +9199,24 @@ Made in Italy` })));
|
|
9197
9199
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
9198
9200
|
eventSubject: 'ctaExposure',
|
9199
9201
|
eventDescription: 'The cta was shown to the user'
|
9200
|
-
}, rec, item);
|
9202
|
+
}, rec, item, index);
|
9201
9203
|
}
|
9202
|
-
}, [isOnScreen, ref, rec, ctaEvent]);
|
9204
|
+
}, [isOnScreen, ref, rec, ctaEvent, index]);
|
9203
9205
|
const handleClick = lodash.throttle(() => {
|
9204
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
9206
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
9205
9207
|
const item = (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video;
|
9206
9208
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
9207
9209
|
eventSubject: 'clickCta',
|
9208
9210
|
eventDescription: 'User clicked the CTA'
|
9209
|
-
}, rec, item);
|
9210
|
-
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(rec);
|
9211
|
+
}, rec, item, index);
|
9212
|
+
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, rec), { index }));
|
9211
9213
|
if (isExternalLink) {
|
9212
9214
|
if ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.link) {
|
9213
9215
|
const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
|
9214
9216
|
const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
|
9215
|
-
jumpToWeb(rec, product, cta);
|
9217
|
+
jumpToWeb(rec, product, cta, index);
|
9216
9218
|
window.location.href = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.link;
|
9219
|
+
window.location.href = window.getJointUtmLink((_k = (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProduct) === null || _k === void 0 ? void 0 : _k.link);
|
9217
9220
|
}
|
9218
9221
|
}
|
9219
9222
|
else {
|
@@ -9382,18 +9385,18 @@ Made in Italy` })));
|
|
9382
9385
|
|
9383
9386
|
const Link$1 = (_a) => {
|
9384
9387
|
var _b, _c, _d, _e, _f;
|
9385
|
-
var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
|
9388
|
+
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index"]);
|
9386
9389
|
const { sxpParameter, bffEventReport } = useSxpDataSource();
|
9387
9390
|
const { jumpToWeb } = useEventReport();
|
9388
9391
|
const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
|
9389
9392
|
const product = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
|
9390
9393
|
const handleTo = () => {
|
9391
9394
|
if (cta === null || cta === void 0 ? void 0 : cta.link) {
|
9392
|
-
jumpToWeb(recData, product, cta);
|
9395
|
+
jumpToWeb(recData, product, cta, index);
|
9393
9396
|
window.location.href = window.getJointUtmLink(cta.link);
|
9394
9397
|
}
|
9395
9398
|
};
|
9396
|
-
return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { onClick: handleTo }),
|
9399
|
+
return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { onClick: handleTo }),
|
9397
9400
|
React.createElement("div", { className: css.css(Object.assign({ backgroundColor: '#f2f2f2', overflow: 'hidden', flexShrink: 0 }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9398
9401
|
React.createElement("img", { className: css.css({ width: '100%', objectFit: 'cover', height: '100%' }), src: (_e = (_d = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image, alt: '' })),
|
9399
9402
|
React.createElement("div", { className: css.css({
|
@@ -9661,11 +9664,11 @@ Made in Italy` })));
|
|
9661
9664
|
* @Author: binruan@chatlabs.com
|
9662
9665
|
* @Date: 2024-01-16 14:50:13
|
9663
9666
|
* @LastEditors: binruan@chatlabs.com
|
9664
|
-
* @LastEditTime: 2024-
|
9667
|
+
* @LastEditTime: 2024-04-11 18:24:15
|
9665
9668
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
|
9666
9669
|
*
|
9667
9670
|
*/
|
9668
|
-
const Img = ({ src, rec, item }) => {
|
9671
|
+
const Img = ({ src, rec, item, index }) => {
|
9669
9672
|
const ref = React.useRef(null);
|
9670
9673
|
const isOnScreen = useOnScreen(ref);
|
9671
9674
|
const { ctaEvent } = useSxpDataSource();
|
@@ -9674,9 +9677,9 @@ Made in Italy` })));
|
|
9674
9677
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
9675
9678
|
eventSubject: 'ctaExposure',
|
9676
9679
|
eventDescription: 'The cta was shown to the user'
|
9677
|
-
}, rec, item);
|
9680
|
+
}, rec, item, index);
|
9678
9681
|
}
|
9679
|
-
}, [isOnScreen, src, ref, rec, ctaEvent, item]);
|
9682
|
+
}, [isOnScreen, src, ref, rec, ctaEvent, item, index]);
|
9680
9683
|
return (React.createElement("img", { ref: ref, hidden: !src, className: css.css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, alt: '' }));
|
9681
9684
|
};
|
9682
9685
|
var Img$1 = React.memo(Img);
|
@@ -9685,7 +9688,7 @@ Made in Italy` })));
|
|
9685
9688
|
|
9686
9689
|
const MultiCommodityDiro$1 = (_a) => {
|
9687
9690
|
var _b, _c;
|
9688
|
-
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
|
9691
|
+
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
|
9689
9692
|
const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
|
9690
9693
|
const { popup } = useEditor();
|
9691
9694
|
const { jumpToWeb } = useEventReport();
|
@@ -9694,12 +9697,12 @@ Made in Italy` })));
|
|
9694
9697
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
9695
9698
|
eventSubject: 'clickCta',
|
9696
9699
|
eventDescription: 'User clicked the CTA'
|
9697
|
-
}, recData, item);
|
9698
|
-
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
|
9700
|
+
}, recData, item, index);
|
9701
|
+
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }), index }));
|
9699
9702
|
if (isExternalLink) {
|
9700
9703
|
if (item === null || item === void 0 ? void 0 : item.link) {
|
9701
|
-
jumpToWeb(recData, item, item.bindCta);
|
9702
|
-
window.location.href = item.link;
|
9704
|
+
jumpToWeb(recData, item, item.bindCta, index);
|
9705
|
+
window.location.href = window.getJointUtmLink(item.link);
|
9703
9706
|
}
|
9704
9707
|
}
|
9705
9708
|
else {
|
@@ -9710,7 +9713,7 @@ Made in Italy` })));
|
|
9710
9713
|
var _a, _b, _c, _d, _e, _f;
|
9711
9714
|
return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
9712
9715
|
React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9713
|
-
React.createElement(Img$1, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item })),
|
9716
|
+
React.createElement(Img$1, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index })),
|
9714
9717
|
React.createElement("div", { className: css.css({
|
9715
9718
|
color: '#000',
|
9716
9719
|
display: 'flex',
|
@@ -9797,7 +9800,7 @@ Made in Italy` })));
|
|
9797
9800
|
|
9798
9801
|
const MultiCommodity$1 = (_a) => {
|
9799
9802
|
var _b, _c;
|
9800
|
-
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
|
9803
|
+
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
|
9801
9804
|
const { sxpParameter } = useSxpDataSource();
|
9802
9805
|
const { ctaEvent, setPopupDetailData } = useSxpDataSource();
|
9803
9806
|
const { popup } = useEditor();
|
@@ -9807,12 +9810,12 @@ Made in Italy` })));
|
|
9807
9810
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
9808
9811
|
eventSubject: 'clickCta',
|
9809
9812
|
eventDescription: 'User clicked the CTA'
|
9810
|
-
}, recData, item);
|
9811
|
-
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
|
9813
|
+
}, recData, item, index);
|
9814
|
+
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }), index }));
|
9812
9815
|
if (isExternalLink) {
|
9813
9816
|
if (item === null || item === void 0 ? void 0 : item.link) {
|
9814
|
-
jumpToWeb(recData, item, item.bindCta);
|
9815
|
-
window.location.href = item.link;
|
9817
|
+
jumpToWeb(recData, item, item.bindCta, index);
|
9818
|
+
window.location.href = window.getJointUtmLink(item.link);
|
9816
9819
|
}
|
9817
9820
|
}
|
9818
9821
|
else {
|
@@ -9823,7 +9826,7 @@ Made in Italy` })));
|
|
9823
9826
|
var _a, _b, _c, _d, _e, _f;
|
9824
9827
|
return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
9825
9828
|
React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9826
|
-
React.createElement(Img$1, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item })),
|
9829
|
+
React.createElement(Img$1, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index })),
|
9827
9830
|
React.createElement("div", { className: css.css({
|
9828
9831
|
color: '#fff',
|
9829
9832
|
display: 'flex',
|
@@ -9910,7 +9913,7 @@ Made in Italy` })));
|
|
9910
9913
|
|
9911
9914
|
const MultiCommodityDiroNew$1 = (_a) => {
|
9912
9915
|
var _b, _c;
|
9913
|
-
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
|
9916
|
+
var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
|
9914
9917
|
const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
|
9915
9918
|
const { popup } = useEditor();
|
9916
9919
|
const { jumpToWeb } = useEventReport();
|
@@ -9919,12 +9922,12 @@ Made in Italy` })));
|
|
9919
9922
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
9920
9923
|
eventSubject: 'clickCta',
|
9921
9924
|
eventDescription: 'User clicked the CTA'
|
9922
|
-
}, recData, item);
|
9923
|
-
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
|
9925
|
+
}, recData, item, index);
|
9926
|
+
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }), index }));
|
9924
9927
|
if (isExternalLink) {
|
9925
9928
|
if (item === null || item === void 0 ? void 0 : item.link) {
|
9926
|
-
jumpToWeb(recData, item, item.bindCta);
|
9927
|
-
window.location.href = item.link;
|
9929
|
+
jumpToWeb(recData, item, item.bindCta, index);
|
9930
|
+
window.location.href = window.getJointUtmLink(item.link);
|
9928
9931
|
}
|
9929
9932
|
}
|
9930
9933
|
else {
|
@@ -9935,7 +9938,7 @@ Made in Italy` })));
|
|
9935
9938
|
var _a, _b, _c, _d, _e, _f;
|
9936
9939
|
return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
9937
9940
|
React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9938
|
-
React.createElement(Img$1, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item })),
|
9941
|
+
React.createElement(Img$1, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index })),
|
9939
9942
|
React.createElement("div", { className: css.css({
|
9940
9943
|
color: '#fff',
|
9941
9944
|
display: 'flex',
|
@@ -11581,7 +11584,7 @@ Made in Italy` })));
|
|
11581
11584
|
};
|
11582
11585
|
}, [src, showVideo]);
|
11583
11586
|
const handleClickToDetail = () => {
|
11584
|
-
reportTagsView();
|
11587
|
+
reportTagsView(index);
|
11585
11588
|
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(list);
|
11586
11589
|
setTimeout(() => {
|
11587
11590
|
var _a;
|
@@ -11689,7 +11692,7 @@ Made in Italy` })));
|
|
11689
11692
|
* @Author: binruan@chatlabs.com
|
11690
11693
|
* @Date: 2024-01-10 10:58:24
|
11691
11694
|
* @LastEditors: binruan@chatlabs.com
|
11692
|
-
* @LastEditTime: 2024-04-
|
11695
|
+
* @LastEditTime: 2024-04-15 09:58:50
|
11693
11696
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
|
11694
11697
|
*
|
11695
11698
|
*/
|
@@ -11716,7 +11719,7 @@ Made in Italy` })));
|
|
11716
11719
|
if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
|
11717
11720
|
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
|
11718
11721
|
}
|
11719
|
-
reportTagsView();
|
11722
|
+
reportTagsView(0);
|
11720
11723
|
setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
|
11721
11724
|
setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
|
11722
11725
|
setTimeout(() => {
|
@@ -11733,7 +11736,7 @@ Made in Italy` })));
|
|
11733
11736
|
setRecData(waterFallData);
|
11734
11737
|
}
|
11735
11738
|
}, [waterFallData]);
|
11736
|
-
const reportTagsView = React.useCallback(() => {
|
11739
|
+
const reportTagsView = React.useCallback((index) => {
|
11737
11740
|
var _a, _b, _c, _d, _e, _f;
|
11738
11741
|
const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
|
11739
11742
|
if (!rec)
|
@@ -11751,7 +11754,7 @@ Made in Italy` })));
|
|
11751
11754
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
11752
11755
|
eventInfo: {
|
11753
11756
|
relatedContentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
|
11754
|
-
position:
|
11757
|
+
position: index + '',
|
11755
11758
|
contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
|
11756
11759
|
traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
|
11757
11760
|
hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
|
@@ -11886,7 +11889,7 @@ Made in Italy` })));
|
|
11886
11889
|
const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
|
11887
11890
|
const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
|
11888
11891
|
const LikeButton = (_a) => {
|
11889
|
-
var { active, activeIcon, unActicveIcon, recData } = _a, props = __rest(_a, ["active", "activeIcon", "unActicveIcon", "recData"]);
|
11892
|
+
var { active, activeIcon, unActicveIcon, recData, position } = _a, props = __rest(_a, ["active", "activeIcon", "unActicveIcon", "recData", "position"]);
|
11890
11893
|
const { mutateLike, mutateUnlike, bffEventReport } = useSxpDataSource();
|
11891
11894
|
const [state, setState] = React.useState(active);
|
11892
11895
|
const likeIcon = useIconLink(defaultLikeIconPath);
|
@@ -11904,7 +11907,7 @@ Made in Italy` })));
|
|
11904
11907
|
contentId: (_f = (_e = recData.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
|
11905
11908
|
contentName: (_h = (_g = recData.video) === null || _g === void 0 ? void 0 : _g.title) !== null && _h !== void 0 ? _h : '',
|
11906
11909
|
contentTags: JSON.stringify((_k = (_j = recData.video) === null || _j === void 0 ? void 0 : _j.tags) !== null && _k !== void 0 ? _k : []),
|
11907
|
-
position:
|
11910
|
+
position: position + '',
|
11908
11911
|
contentFormat: ((_l = recData.video) === null || _l === void 0 ? void 0 : _l.url) ? 'video' : 'image',
|
11909
11912
|
traceInfo: (_m = recData.video) === null || _m === void 0 ? void 0 : _m.traceInfo
|
11910
11913
|
}
|
@@ -11924,7 +11927,7 @@ Made in Italy` })));
|
|
11924
11927
|
contentId: (_q = (_p = recData.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
|
11925
11928
|
contentName: (_s = (_r = recData.video) === null || _r === void 0 ? void 0 : _r.title) !== null && _s !== void 0 ? _s : '',
|
11926
11929
|
contentTags: JSON.stringify((_u = (_t = recData.video) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []),
|
11927
|
-
position:
|
11930
|
+
position: position + '',
|
11928
11931
|
contentFormat: ((_v = recData.video) === null || _v === void 0 ? void 0 : _v.url) ? 'video' : 'image',
|
11929
11932
|
traceInfo: (_w = recData.video) === null || _w === void 0 ? void 0 : _w.traceInfo
|
11930
11933
|
}
|
@@ -11982,7 +11985,7 @@ Made in Italy` })));
|
|
11982
11985
|
startTime: videoCurrentTime,
|
11983
11986
|
videoDuration,
|
11984
11987
|
contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
|
11985
|
-
position:
|
11988
|
+
position: index + '',
|
11986
11989
|
contentFormat: 'video',
|
11987
11990
|
traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
|
11988
11991
|
}
|
@@ -12010,7 +12013,7 @@ Made in Italy` })));
|
|
12010
12013
|
startTime: videoCurrentTime,
|
12011
12014
|
videoDuration,
|
12012
12015
|
contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
|
12013
|
-
position:
|
12016
|
+
position: index + '',
|
12014
12017
|
contentFormat: 'video',
|
12015
12018
|
traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
|
12016
12019
|
}
|
@@ -12070,7 +12073,7 @@ Made in Italy` })));
|
|
12070
12073
|
videoDuration,
|
12071
12074
|
playDuration,
|
12072
12075
|
contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
|
12073
|
-
position:
|
12076
|
+
position: index + '',
|
12074
12077
|
contentFormat: 'video',
|
12075
12078
|
traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
|
12076
12079
|
}
|
@@ -12418,7 +12421,7 @@ Made in Italy` })));
|
|
12418
12421
|
* @Author: binruan@chatlabs.com
|
12419
12422
|
* @Date: 2023-12-26 16:11:34
|
12420
12423
|
* @LastEditors: binruan@chatlabs.com
|
12421
|
-
* @LastEditTime: 2024-04-
|
12424
|
+
* @LastEditTime: 2024-04-11 18:14:05
|
12422
12425
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
|
12423
12426
|
*
|
12424
12427
|
*/
|
@@ -12452,7 +12455,7 @@ Made in Italy` })));
|
|
12452
12455
|
const Component = withBindDataSource(t);
|
12453
12456
|
const defaulSetting = (_x = t === null || t === void 0 ? void 0 : t.extend) === null || _x === void 0 ? void 0 : _x.defaulSetting;
|
12454
12457
|
const isExternalLink = ((_0 = (_z = (_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.event) === null || _z === void 0 ? void 0 : _z.onClick) === null || _0 === void 0 ? void 0 : _0.linkType) === 'externalLink';
|
12455
|
-
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_1 = value === null || value === void 0 ? void 0 : value.item) === null || _1 === void 0 ? void 0 : _1.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.textStyle), bindDatas: (_4 = (_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.bindDatas) !== null && _4 !== void 0 ? _4 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_5 = value === null || value === void 0 ? void 0 : value.item) === null || _5 === void 0 ? void 0 : _5.props, { event: ((_6 = value === null || value === void 0 ? void 0 : value.item) === null || _6 === void 0 ? void 0 : _6.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 })));
|
12458
|
+
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_1 = value === null || value === void 0 ? void 0 : value.item) === null || _1 === void 0 ? void 0 : _1.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.textStyle), bindDatas: (_4 = (_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.bindDatas) !== null && _4 !== void 0 ? _4 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_5 = value === null || value === void 0 ? void 0 : value.item) === null || _5 === void 0 ? void 0 : _5.props, { event: ((_6 = value === null || value === void 0 ? void 0 : value.item) === null || _6 === void 0 ? void 0 : _6.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 })));
|
12456
12459
|
}
|
12457
12460
|
else {
|
12458
12461
|
return null;
|
@@ -12478,7 +12481,7 @@ Made in Italy` })));
|
|
12478
12481
|
* @Author: binruan@chatlabs.com
|
12479
12482
|
* @Date: 2024-01-15 19:03:09
|
12480
12483
|
* @LastEditors: binruan@chatlabs.com
|
12481
|
-
* @LastEditTime: 2024-04-
|
12484
|
+
* @LastEditTime: 2024-04-11 18:45:44
|
12482
12485
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12483
12486
|
*
|
12484
12487
|
*/
|
@@ -12606,7 +12609,7 @@ Made in Italy` })));
|
|
12606
12609
|
eventDescription: 'Session completed',
|
12607
12610
|
relatedContentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
|
12608
12611
|
relatedProductId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
|
12609
|
-
position:
|
12612
|
+
position: activeIndex,
|
12610
12613
|
fromKName,
|
12611
12614
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
12612
12615
|
relatedCtatId: (_q = (_p = (_o = item.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : ''
|
@@ -12649,7 +12652,7 @@ Made in Italy` })));
|
|
12649
12652
|
const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
|
12650
12653
|
const Component = withBindDataSource(t);
|
12651
12654
|
const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
|
12652
|
-
return (React.createElement(Component, Object.assign({ key: index, textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.textStyle), bindDatas: (_e = (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.bindDatas) !== null && _e !== void 0 ? _e : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.props, { event: ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.style), { height: '100%', overflow: 'auto' }) })));
|
12655
|
+
return (React.createElement(Component, Object.assign({ key: index, textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.textStyle), bindDatas: (_e = (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.bindDatas) !== null && _e !== void 0 ? _e : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.props, { event: ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.style), { height: '100%', overflow: 'auto' }), index: index })));
|
12653
12656
|
});
|
12654
12657
|
}
|
12655
12658
|
return null;
|
@@ -12668,7 +12671,7 @@ Made in Italy` })));
|
|
12668
12671
|
}
|
12669
12672
|
return null;
|
12670
12673
|
}, [descStyle, activeIndex, tempMap, resolver, tipText, nudge, hashTagStyle]);
|
12671
|
-
const renderLikeButton = React.useCallback((rec) => {
|
12674
|
+
const renderLikeButton = React.useCallback((rec, index) => {
|
12672
12675
|
var _a, _b;
|
12673
12676
|
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
|
12674
12677
|
return;
|
@@ -12680,7 +12683,7 @@ Made in Italy` })));
|
|
12680
12683
|
return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon, unActicveIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
|
12681
12684
|
top,
|
12682
12685
|
right: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _b !== void 0 ? _b : 0
|
12683
|
-
} }));
|
12686
|
+
}, position: index }));
|
12684
12687
|
}
|
12685
12688
|
return null;
|
12686
12689
|
}, [globalConfig, waterFallData]);
|
@@ -12698,7 +12701,7 @@ Made in Italy` })));
|
|
12698
12701
|
imageEndTime: `${endTime}`,
|
12699
12702
|
playDuration: `${duration}`,
|
12700
12703
|
contentTags: JSON.stringify((_f = item.video.tags) !== null && _f !== void 0 ? _f : []),
|
12701
|
-
position:
|
12704
|
+
position: activeIndex,
|
12702
12705
|
contentFormat: 'image',
|
12703
12706
|
traceInfo: item.video.traceInfo
|
12704
12707
|
}
|
@@ -12743,7 +12746,7 @@ Made in Italy` })));
|
|
12743
12746
|
const handleReportProductView = (item) => {
|
12744
12747
|
var _a, _b, _c;
|
12745
12748
|
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) && (item === null || item === void 0 ? void 0 : item.product)) {
|
12746
|
-
productView(item, item.product, (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.bindCta, viewTime.current);
|
12749
|
+
productView(item, item.product, (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.bindCta, viewTime.current, activeIndex);
|
12747
12750
|
}
|
12748
12751
|
};
|
12749
12752
|
React.useEffect(() => {
|
@@ -12766,7 +12769,7 @@ Made in Italy` })));
|
|
12766
12769
|
contentName: (_e = item.video.title) !== null && _e !== void 0 ? _e : '',
|
12767
12770
|
imageStartTime: `${startTime}`,
|
12768
12771
|
contentTags: JSON.stringify((_f = item.video.tags) !== null && _f !== void 0 ? _f : []),
|
12769
|
-
position:
|
12772
|
+
position: activeIndex,
|
12770
12773
|
contentFormat: 'image',
|
12771
12774
|
traceInfo: item.video.traceInfo
|
12772
12775
|
}
|
@@ -12800,7 +12803,7 @@ Made in Italy` })));
|
|
12800
12803
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
|
12801
12804
|
renderContent(rec, index),
|
12802
12805
|
renderBottom(rec, index),
|
12803
|
-
renderLikeButton(rec)))))));
|
12806
|
+
renderLikeButton(rec, index)))))));
|
12804
12807
|
});
|
12805
12808
|
}, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage]);
|
12806
12809
|
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
|
@@ -12857,7 +12860,7 @@ Made in Italy` })));
|
|
12857
12860
|
* @Author: binruan@chatlabs.com
|
12858
12861
|
* @Date: 2023-10-31 10:56:01
|
12859
12862
|
* @LastEditors: binruan@chatlabs.com
|
12860
|
-
* @LastEditTime: 2024-04-
|
12863
|
+
* @LastEditTime: 2024-04-15 09:39:17
|
12861
12864
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
|
12862
12865
|
*
|
12863
12866
|
*/
|
@@ -12893,7 +12896,7 @@ Made in Italy` })));
|
|
12893
12896
|
const product = (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
12894
12897
|
const cta = (_d = (_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.bindCta;
|
12895
12898
|
if (product && cta) {
|
12896
|
-
productView(data, product, cta, curTimeRef.current);
|
12899
|
+
productView(data, product, cta, curTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
|
12897
12900
|
}
|
12898
12901
|
setTimeout(() => {
|
12899
12902
|
window === null || window === void 0 ? void 0 : window.sxpPopup('');
|