pb-sxp-ui 1.2.5 → 1.2.6
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 +65 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +9 -1
- package/dist/index.js +65 -37
- 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 +65 -37
- 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/Popup/index.js +7 -5
- package/es/core/components/SxpPageRender/index.js +2 -2
- package/es/core/context/SxpDataSourceProvider.js +3 -3
- 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 +11 -6
- package/es/materials/sxp/popup/CommodityDetail/material.js +6 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +4 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +5 -2
- package/es/materials/sxp/popup/CommodityList/index.js +10 -10
- package/es/materials/sxp/template/components/CommodityGroup.js +11 -1
- package/lib/core/components/SxpPageRender/Popup/index.js +7 -5
- package/lib/core/components/SxpPageRender/index.js +2 -2
- package/lib/core/context/SxpDataSourceProvider.js +3 -3
- 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 +10 -5
- package/lib/materials/sxp/popup/CommodityDetail/material.js +6 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +4 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +5 -2
- package/lib/materials/sxp/popup/CommodityList/index.js +10 -10
- package/lib/materials/sxp/template/components/CommodityGroup.js +11 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
@@ -1828,13 +1828,21 @@ button.swiper-pagination-bullet {
|
|
1828
1828
|
height: 45px;
|
1829
1829
|
width: 100%;
|
1830
1830
|
overflow: hidden;
|
1831
|
-
|
1831
|
+
display: -webkit-box;
|
1832
|
+
display: -webkit-flex;
|
1833
|
+
display: -ms-flexbox;
|
1834
|
+
display: flex;
|
1835
|
+
-webkit-box-pack: center;
|
1836
|
+
-webkit-justify-content: center;
|
1837
|
+
-ms-flex-pack: center;
|
1838
|
+
justify-content: center;
|
1832
1839
|
}
|
1833
1840
|
.clc-sxp-logo-banner img {
|
1834
1841
|
height: 100%;
|
1835
1842
|
width: 50%;
|
1836
1843
|
-o-object-fit: cover;
|
1837
1844
|
object-fit: cover;
|
1845
|
+
display: block;
|
1838
1846
|
}
|
1839
1847
|
.clc-sxp-bottom {
|
1840
1848
|
z-index: 10;
|
package/dist/index.js
CHANGED
@@ -552,7 +552,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
552
552
|
const themeTag = useRef();
|
553
553
|
const curTime = useRef();
|
554
554
|
const [selectTag, setSelectTag] = useState(DEFAULT_TAG);
|
555
|
-
const checkCommodityIndexRef = useRef();
|
555
|
+
const checkCommodityIndexRef = useRef(-1);
|
556
556
|
const popupCurTimeRef = useRef(null);
|
557
557
|
const isShowConsent = useMemo(() => {
|
558
558
|
var _a, _b, _c, _d;
|
@@ -721,7 +721,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
721
721
|
}
|
722
722
|
}), [bffFetch, utmVal, isShowTag]);
|
723
723
|
const ctaEvent = useCallback((eventInfo, rec, product, position) => {
|
724
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
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;
|
725
725
|
const cta = product === null || product === void 0 ? void 0 : product.bindCta;
|
726
726
|
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
727
|
let fromKName = '';
|
@@ -735,7 +735,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
735
735
|
fromKName = 'imagePage';
|
736
736
|
}
|
737
737
|
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: (_m =
|
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: (_1 = (_y = (_t = (_p = (_o = (_m = rec === null || rec === void 0 ? void 0 : rec.video) === null || _m === void 0 ? void 0 : _m.bindCta) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : (_s = (_r = (_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.bindProduct) === null || _r === void 0 ? void 0 : _r.bindCta) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_x = (_w = (_v = (_u = rec === null || rec === void 0 ? void 0 : rec.video) === null || _u === void 0 ? void 0 : _u.bindProducts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.bindCta) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.product) === null || _z === void 0 ? void 0 : _z.bindCta) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : '', fromKName, fromKPage: (_2 = location === null || location === void 0 ? void 0 : location.href) !== null && _2 !== void 0 ? _2 : '' })
|
739
739
|
});
|
740
740
|
}, [bffEventReport, isFromHashtag]);
|
741
741
|
const h5EnterLink = useCallback(() => {
|
@@ -1267,14 +1267,14 @@ var settingRender$9 = [
|
|
1267
1267
|
* @Author: binruan@chatlabs.com
|
1268
1268
|
* @Date: 2024-03-12 10:59:06
|
1269
1269
|
* @LastEditors: binruan@chatlabs.com
|
1270
|
-
* @LastEditTime: 2024-
|
1270
|
+
* @LastEditTime: 2024-07-31 11:41:47
|
1271
1271
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
1272
1272
|
*
|
1273
1273
|
*/
|
1274
1274
|
function useEventReport() {
|
1275
1275
|
const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
|
1276
1276
|
const jumpToWeb = useCallback((data, product, cta, position) => {
|
1277
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
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;
|
1278
1278
|
let fromKName = '';
|
1279
1279
|
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
1280
|
fromKName = 'pdpPage';
|
@@ -1305,12 +1305,12 @@ function useEventReport() {
|
|
1305
1305
|
position: position + '',
|
1306
1306
|
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
1307
|
ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
|
1308
|
-
traceInfo: (_p =
|
1308
|
+
traceInfo: (_0 = (_x = (_v = (_r = (_q = (_p = data === null || data === void 0 ? void 0 : data.video) === null || _p === void 0 ? void 0 : _p.bindProduct) === null || _q === void 0 ? void 0 : _q.traceInfo) !== null && _r !== void 0 ? _r : (_u = (_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[0]) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : (_w = data === null || data === void 0 ? void 0 : data.product) === null || _w === void 0 ? void 0 : _w.traceInfo) !== null && _x !== void 0 ? _x : (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindCta) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : ''
|
1309
1309
|
}
|
1310
1310
|
});
|
1311
1311
|
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
1312
1312
|
const productView = useCallback((data, product, cta, viewTime, position) => {
|
1313
|
-
var _a, _b, _c, _d;
|
1313
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
1314
1314
|
let fromKName = '';
|
1315
1315
|
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
1316
|
fromKName = 'pdpPage';
|
@@ -1330,7 +1330,7 @@ function useEventReport() {
|
|
1330
1330
|
position: position + '',
|
1331
1331
|
contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
|
1332
1332
|
ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
|
1333
|
-
traceInfo:
|
1333
|
+
traceInfo: (_o = (_l = (_g = (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.traceInfo) !== null && _g !== void 0 ? _g : (_k = (_j = (_h = data === null || data === void 0 ? void 0 : data.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) === null || _k === void 0 ? void 0 : _k.traceInfo) !== null && _l !== void 0 ? _l : (_m = data === null || data === void 0 ? void 0 : data.product) === null || _m === void 0 ? void 0 : _m.traceInfo) !== null && _o !== void 0 ? _o : '',
|
1334
1334
|
timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
|
1335
1335
|
eventSubject: 'productView',
|
1336
1336
|
eventDescription: 'User browsed the product'
|
@@ -1606,6 +1606,10 @@ var settingRender$8 = [
|
|
1606
1606
|
{
|
1607
1607
|
label: '商品描述',
|
1608
1608
|
value: 'info'
|
1609
|
+
},
|
1610
|
+
{
|
1611
|
+
label: '税费说明',
|
1612
|
+
value: 'taxInfo'
|
1609
1613
|
}
|
1610
1614
|
],
|
1611
1615
|
name: ['props', 'commodityStyles', 'field'],
|
@@ -8780,7 +8784,7 @@ var ExpandableText$1 = memo(ExpandableText);
|
|
8780
8784
|
* @Author: binruan@chatlabs.com
|
8781
8785
|
* @Date: 2024-03-20 10:27:31
|
8782
8786
|
* @LastEditors: binruan@chatlabs.com
|
8783
|
-
* @LastEditTime: 2024-
|
8787
|
+
* @LastEditTime: 2024-07-31 17:54:50
|
8784
8788
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
|
8785
8789
|
*
|
8786
8790
|
*/
|
@@ -8853,6 +8857,14 @@ var Scroll$1 = memo(Scroll);
|
|
8853
8857
|
|
8854
8858
|
const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailData, check }) => {
|
8855
8859
|
var _a;
|
8860
|
+
const { productView } = useEventReport();
|
8861
|
+
const { popupCurTimeRef } = useSxpDataSource();
|
8862
|
+
const handleClick = (item, index) => {
|
8863
|
+
if (check === index)
|
8864
|
+
return;
|
8865
|
+
productView(popupDetailData, item, item === null || item === void 0 ? void 0 : item.bindCta, popupCurTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
|
8866
|
+
onCLick === null || onCLick === void 0 ? void 0 : onCLick(index);
|
8867
|
+
};
|
8856
8868
|
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) => {
|
8857
8869
|
var _a, _b, _c;
|
8858
8870
|
return (React.createElement(React.Fragment, null, (item === null || item === void 0 ? void 0 : item.bindCta) ? (React.createElement(SwiperSlide, { className: css({
|
@@ -8860,7 +8872,7 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
|
|
8860
8872
|
height: '50px',
|
8861
8873
|
marginRight: '10px'
|
8862
8874
|
}), onClick: () => {
|
8863
|
-
|
8875
|
+
handleClick(item, index);
|
8864
8876
|
}, key: index },
|
8865
8877
|
React.createElement(FormatImage$1, { style: {
|
8866
8878
|
height: '100%',
|
@@ -8878,8 +8890,7 @@ var CommodityGroup$1 = memo(CommodityGroup);
|
|
8878
8890
|
const CommodityDetail$1 = (_a) => {
|
8879
8891
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
8880
8892
|
var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup"]);
|
8881
|
-
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef } = useSxpDataSource();
|
8882
|
-
useEditor();
|
8893
|
+
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
|
8883
8894
|
const { jumpToWeb, productView } = useEventReport();
|
8884
8895
|
const curTimeRef = useRef(null);
|
8885
8896
|
const [showModal, setShowModal] = useState(false);
|
@@ -8892,6 +8903,7 @@ const CommodityDetail$1 = (_a) => {
|
|
8892
8903
|
: (_k = (_j = (_h = data === null || data === void 0 ? void 0 : data.video) === null || _h === void 0 ? void 0 : _h.bindProduct) === null || _j === void 0 ? void 0 : _j.bindCta) !== null && _k !== void 0 ? _k : (_o = (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.bindProducts) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.bindCta;
|
8893
8904
|
const position = isPost ? index : popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
8894
8905
|
if (!isPost && (commodityGroup === null || commodityGroup === void 0 ? void 0 : commodityGroup.open) && ((_p = data === null || data === void 0 ? void 0 : data.video) === null || _p === void 0 ? void 0 : _p.bindProducts) && ((_r = (_q = data === null || data === void 0 ? void 0 : data.video) === null || _q === void 0 ? void 0 : _q.bindProducts) === null || _r === void 0 ? void 0 : _r.length) > 0) {
|
8906
|
+
checkCommodityIndexRef.current = checkCommodityIndex;
|
8895
8907
|
const p = (_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.bindProducts[checkCommodityIndex];
|
8896
8908
|
product = p;
|
8897
8909
|
cta = p === null || p === void 0 ? void 0 : p.bindCta;
|
@@ -8935,7 +8947,7 @@ const CommodityDetail$1 = (_a) => {
|
|
8935
8947
|
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
|
8936
8948
|
const width = isPreview ? 375 : (_t = style === null || style === void 0 ? void 0 : style.width) !== null && _t !== void 0 ? _t : window.innerWidth;
|
8937
8949
|
const renderContent = ({ isPost }) => {
|
8938
|
-
var _a, _b, _c;
|
8950
|
+
var _a, _b, _c, _d;
|
8939
8951
|
return (React.createElement("div", null,
|
8940
8952
|
React.createElement("div", { className: 'pb-commondity-content-collection', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection), hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), dangerouslySetInnerHTML: {
|
8941
8953
|
__html: setFontForText((_a = product === null || product === void 0 ? void 0 : product.collection) !== null && _a !== void 0 ? _a : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
@@ -8946,8 +8958,11 @@ const CommodityDetail$1 = (_a) => {
|
|
8946
8958
|
React.createElement("div", { className: 'pb-commondity-content-price', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price), hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), dangerouslySetInnerHTML: {
|
8947
8959
|
__html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
8948
8960
|
} }),
|
8961
|
+
React.createElement("div", { hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo), dangerouslySetInnerHTML: {
|
8962
|
+
__html: setFontForText((_c = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _c !== void 0 ? _c : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
|
8963
|
+
} }),
|
8949
8964
|
React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
8950
|
-
React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (
|
8965
|
+
React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_d = product === null || product === void 0 ? void 0 : product.info) !== null && _d !== void 0 ? _d : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
|
8951
8966
|
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
8952
8967
|
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
8953
8968
|
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
@@ -8969,6 +8984,7 @@ const CommodityDetail$1 = (_a) => {
|
|
8969
8984
|
const handleClick = useCallback((index) => {
|
8970
8985
|
popupCurTimeRef.current = new Date();
|
8971
8986
|
setCheckCommodityIndex(index);
|
8987
|
+
checkCommodityIndexRef.current = index;
|
8972
8988
|
}, []);
|
8973
8989
|
const renderCommodityGroup = useCallback(() => {
|
8974
8990
|
var _a, _b, _c;
|
@@ -8989,6 +9005,7 @@ const CommodityDetail$1 = (_a) => {
|
|
8989
9005
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
8990
9006
|
} },
|
8991
9007
|
React.createElement(React.Fragment, null, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
|
9008
|
+
var _a;
|
8992
9009
|
return (React.createElement(SwiperSlide, { key: src },
|
8993
9010
|
React.createElement("div", { style: {
|
8994
9011
|
overflow: 'hidden',
|
@@ -9001,7 +9018,7 @@ const CommodityDetail$1 = (_a) => {
|
|
9001
9018
|
objectFit: 'cover',
|
9002
9019
|
display: 'block',
|
9003
9020
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
9004
|
-
}, src: src }))));
|
9021
|
+
}, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
|
9005
9022
|
}))))),
|
9006
9023
|
!((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css({
|
9007
9024
|
position: 'relative',
|
@@ -9065,7 +9082,7 @@ var interactionRender$c = [
|
|
9065
9082
|
* @Author: binruan@chatlabs.com
|
9066
9083
|
* @Date: 2023-07-28 18:29:57
|
9067
9084
|
* @LastEditors: binruan@chatlabs.com
|
9068
|
-
* @LastEditTime: 2024-07-
|
9085
|
+
* @LastEditTime: 2024-07-31 13:58:45
|
9069
9086
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
|
9070
9087
|
*
|
9071
9088
|
*/
|
@@ -9103,6 +9120,12 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
|
|
9103
9120
|
info: {
|
9104
9121
|
color: 'gray',
|
9105
9122
|
fontSize: 12
|
9123
|
+
},
|
9124
|
+
taxInfo: {
|
9125
|
+
color: '#000',
|
9126
|
+
fontSize: 13,
|
9127
|
+
textAlign: 'left',
|
9128
|
+
marginBottom: '10px'
|
9106
9129
|
}
|
9107
9130
|
},
|
9108
9131
|
buttonStyle: {
|
@@ -9588,7 +9611,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
9588
9611
|
var _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;
|
9589
9612
|
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup"]);
|
9590
9613
|
useState(true);
|
9591
|
-
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport } = useSxpDataSource();
|
9614
|
+
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
|
9592
9615
|
const { jumpToWeb, productView } = useEventReport();
|
9593
9616
|
useState(false);
|
9594
9617
|
useState(false);
|
@@ -9603,6 +9626,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
9603
9626
|
: (_k = (_j = (_h = data === null || data === void 0 ? void 0 : data.video) === null || _h === void 0 ? void 0 : _h.bindProduct) === null || _j === void 0 ? void 0 : _j.bindCta) !== null && _k !== void 0 ? _k : (_o = (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.bindProducts) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.bindCta;
|
9604
9627
|
const position = isPost ? index : popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
9605
9628
|
if (!isPost && (commodityGroup === null || commodityGroup === void 0 ? void 0 : commodityGroup.open) && ((_p = data === null || data === void 0 ? void 0 : data.video) === null || _p === void 0 ? void 0 : _p.bindProducts) && ((_r = (_q = data === null || data === void 0 ? void 0 : data.video) === null || _q === void 0 ? void 0 : _q.bindProducts) === null || _r === void 0 ? void 0 : _r.length) > 0) {
|
9629
|
+
checkCommodityIndexRef.current = checkCommodityIndex;
|
9606
9630
|
const p = (_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.bindProducts[checkCommodityIndex];
|
9607
9631
|
product = p;
|
9608
9632
|
cta = p === null || p === void 0 ? void 0 : p.bindCta;
|
@@ -9710,6 +9734,7 @@ Made in Italy` })));
|
|
9710
9734
|
const handleClick = useCallback((index) => {
|
9711
9735
|
popupCurTimeRef.current = new Date();
|
9712
9736
|
setCheckCommodityIndex(index);
|
9737
|
+
checkCommodityIndexRef.current = index;
|
9713
9738
|
}, []);
|
9714
9739
|
const renderCommodityGroup = useCallback(() => {
|
9715
9740
|
var _a, _b, _c;
|
@@ -9728,6 +9753,7 @@ Made in Italy` })));
|
|
9728
9753
|
}, loop: true, autoplay: {
|
9729
9754
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
9730
9755
|
} }, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
|
9756
|
+
var _a;
|
9731
9757
|
return (React.createElement(SwiperSlide, { key: src },
|
9732
9758
|
React.createElement("div", { style: {
|
9733
9759
|
overflow: 'hidden',
|
@@ -9740,7 +9766,7 @@ Made in Italy` })));
|
|
9740
9766
|
objectFit: 'cover',
|
9741
9767
|
display: 'block',
|
9742
9768
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
9743
|
-
}, src: src }))));
|
9769
|
+
}, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
|
9744
9770
|
}))),
|
9745
9771
|
!((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css({
|
9746
9772
|
position: 'relative',
|
@@ -10190,25 +10216,24 @@ const CommodityList$1 = (_a) => {
|
|
10190
10216
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
10191
10217
|
}
|
10192
10218
|
}, popup === null || popup === void 0 ? void 0 : popup.duration);
|
10193
|
-
return (React.createElement("div", { className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
|
10194
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
10219
|
+
return (React.createElement("div", { className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px', boxSizing: 'border-box' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
|
10220
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
10195
10221
|
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement("div", Object.assign({ key: index }, props, { className: css({
|
10196
10222
|
display: 'flex'
|
10197
10223
|
}), onClick: () => handleClick(item, index) }),
|
10198
10224
|
React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: commodityPicture, enableEventReport: false }),
|
10199
10225
|
React.createElement("div", { style: {
|
10200
|
-
|
10201
|
-
width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.marginRight) !== null && _f !== void 0 ? _f : 0}px - ${(_g = style === null || style === void 0 ? void 0 : style.padding) !== null && _g !== void 0 ? _g : 0}px)`,
|
10226
|
+
width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.marginRight) !== null && _f !== void 0 ? _f : 0}px)`,
|
10202
10227
|
display: 'flex',
|
10203
10228
|
flexDirection: 'column',
|
10204
10229
|
justifyContent: 'space-between'
|
10205
10230
|
} },
|
10206
10231
|
React.createElement("div", null,
|
10207
10232
|
React.createElement("div", { className: 'one-line-ellipsis', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.title), dangerouslySetInnerHTML: {
|
10208
|
-
__html: setFontForText((
|
10233
|
+
__html: setFontForText((_g = item === null || item === void 0 ? void 0 : item.title) !== null && _g !== void 0 ? _g : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
|
10209
10234
|
} }),
|
10210
10235
|
React.createElement("div", { className: 'two-line-ellipsis', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection, hidden: !!item && (!(item === null || item === void 0 ? void 0 : item.collection) || (item === null || item === void 0 ? void 0 : item.collection) === ''), dangerouslySetInnerHTML: {
|
10211
|
-
__html: setFontForText((
|
10236
|
+
__html: setFontForText((_h = item === null || item === void 0 ? void 0 : item.collection) !== null && _h !== void 0 ? _h : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
10212
10237
|
} })),
|
10213
10238
|
React.createElement("div", { className: css({
|
10214
10239
|
display: 'flex',
|
@@ -10217,11 +10242,12 @@ const CommodityList$1 = (_a) => {
|
|
10217
10242
|
width: '100%',
|
10218
10243
|
overflow: 'hidden'
|
10219
10244
|
}) },
|
10220
|
-
React.createElement("div",
|
10221
|
-
|
10222
|
-
|
10245
|
+
React.createElement("div", null,
|
10246
|
+
React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.price), dangerouslySetInnerHTML: {
|
10247
|
+
__html: setFontForText(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
10248
|
+
} })),
|
10223
10249
|
React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px' }), dangerouslySetInnerHTML: {
|
10224
|
-
__html: setFontForText((
|
10250
|
+
__html: setFontForText((_k = (_j = item === null || item === void 0 ? void 0 : item.bindCta) === null || _j === void 0 ? void 0 : _j.enTitle) !== null && _k !== void 0 ? _k : 'Shop Now', buttonStyle)
|
10225
10251
|
} })))))));
|
10226
10252
|
})));
|
10227
10253
|
};
|
@@ -15480,7 +15506,7 @@ var Tagbar$1 = memo(Tagbar);
|
|
15480
15506
|
* @Author: binruan@chatlabs.com
|
15481
15507
|
* @Date: 2024-01-15 19:03:09
|
15482
15508
|
* @LastEditors: binruan@chatlabs.com
|
15483
|
-
* @LastEditTime: 2024-07-
|
15509
|
+
* @LastEditTime: 2024-07-31 11:33:42
|
15484
15510
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
15485
15511
|
*
|
15486
15512
|
*/
|
@@ -15752,7 +15778,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15752
15778
|
}
|
15753
15779
|
};
|
15754
15780
|
const handleSlideSkip = (item, position) => {
|
15755
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
15781
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
15756
15782
|
if (isPreview || waterFallData)
|
15757
15783
|
return;
|
15758
15784
|
const t = new Date() - curTime.current;
|
@@ -15771,7 +15797,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15771
15797
|
contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
|
15772
15798
|
position: position + '',
|
15773
15799
|
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 : '',
|
15774
|
-
traceInfo: (_r =
|
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 : ''
|
15775
15801
|
}
|
15776
15802
|
});
|
15777
15803
|
setSlideSkipState();
|
@@ -16302,7 +16328,7 @@ var index$1 = memo(DiyPortalPreview);
|
|
16302
16328
|
* @Author: binruan@chatlabs.com
|
16303
16329
|
* @Date: 2023-10-31 10:56:01
|
16304
16330
|
* @LastEditors: binruan@chatlabs.com
|
16305
|
-
* @LastEditTime: 2024-07-
|
16331
|
+
* @LastEditTime: 2024-07-31 18:54:49
|
16306
16332
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
|
16307
16333
|
*
|
16308
16334
|
*/
|
@@ -16328,7 +16354,7 @@ const Popup = () => {
|
|
16328
16354
|
}
|
16329
16355
|
}, [popup]);
|
16330
16356
|
const handleClose = () => {
|
16331
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
16357
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
16332
16358
|
if (!popup ||
|
16333
16359
|
(popup === null || popup === void 0 ? void 0 : popup.id) === '' ||
|
16334
16360
|
!visible ||
|
@@ -16342,9 +16368,11 @@ const Popup = () => {
|
|
16342
16368
|
let product = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct;
|
16343
16369
|
let cta = (_j = (_h = data === null || data === void 0 ? void 0 : data.video) === null || _h === void 0 ? void 0 : _h.bindProduct) === null || _j === void 0 ? void 0 : _j.bindCta;
|
16344
16370
|
if ((checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current) >= 0) {
|
16345
|
-
const p = (_k = data === null || data === void 0 ? void 0 : data.video) === null || _k === void 0 ? void 0 : _k.bindProducts[checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current];
|
16346
|
-
|
16347
|
-
|
16371
|
+
const p = (_l = (_k = data === null || data === void 0 ? void 0 : data.video) === null || _k === void 0 ? void 0 : _k.bindProducts) === null || _l === void 0 ? void 0 : _l[checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current];
|
16372
|
+
if (p) {
|
16373
|
+
product = p;
|
16374
|
+
cta = p === null || p === void 0 ? void 0 : p.bindCta;
|
16375
|
+
}
|
16348
16376
|
}
|
16349
16377
|
if (product && cta) {
|
16350
16378
|
productView(data, product, cta, popupCurTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
|
@@ -16366,7 +16394,7 @@ const Popup = () => {
|
|
16366
16394
|
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';
|
16367
16395
|
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';
|
16368
16396
|
const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
|
16369
|
-
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 })));
|
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, index: index })));
|
16370
16398
|
}
|
16371
16399
|
else {
|
16372
16400
|
return React.createElement(React.Fragment, null);
|