pb-sxp-ui 1.0.73 → 1.0.75
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 +54 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +11 -7
- package/dist/index.js +54 -36
- 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 +54 -36
- 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/index.js +22 -16
- package/es/materials/sxp/popup/CommodityDetail/index.js +10 -4
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +11 -5
- package/es/materials/sxp/template/Commodity/index.js +4 -4
- package/es/materials/sxp/template/CommodityDiro/index.js +4 -4
- package/es/materials/sxp/template/CommodityDiroNew/index.js +4 -4
- package/lib/core/components/SxpPageRender/index.js +22 -16
- package/lib/materials/sxp/popup/CommodityDetail/index.js +9 -3
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +10 -4
- package/lib/materials/sxp/template/Commodity/index.js +4 -4
- package/lib/materials/sxp/template/CommodityDiro/index.js +4 -4
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +4 -4
- package/package.json +1 -1
package/dist/index.css
CHANGED
@@ -1306,13 +1306,20 @@ button.swiper-pagination-bullet {
|
|
1306
1306
|
.clc-sxp-tagbar {
|
1307
1307
|
z-index: 8;
|
1308
1308
|
background-color: #fff;
|
1309
|
-
overflow-x: auto;
|
1310
|
-
padding: 0 12px;
|
1311
1309
|
text-align: center;
|
1312
1310
|
height: 45px;
|
1311
|
+
overflow-x: auto;
|
1312
|
+
position: absolute;
|
1313
|
+
top: 0;
|
1314
|
+
left: 0;
|
1315
|
+
right: 0;
|
1316
|
+
scrollbar-width: none;
|
1313
1317
|
}
|
1314
1318
|
.clc-sxp-tagbar-list {
|
1315
|
-
|
1319
|
+
width: -webkit-fit-content;
|
1320
|
+
width: -moz-fit-content;
|
1321
|
+
width: fit-content;
|
1322
|
+
padding: 0 12px;
|
1316
1323
|
margin: 0;
|
1317
1324
|
display: -webkit-box;
|
1318
1325
|
display: -webkit-flex;
|
@@ -1322,10 +1329,6 @@ button.swiper-pagination-bullet {
|
|
1322
1329
|
-webkit-align-items: center;
|
1323
1330
|
-ms-flex-align: center;
|
1324
1331
|
align-items: center;
|
1325
|
-
-webkit-box-pack: center;
|
1326
|
-
-webkit-justify-content: center;
|
1327
|
-
-ms-flex-pack: center;
|
1328
|
-
justify-content: center;
|
1329
1332
|
-webkit-flex-wrap: nowrap;
|
1330
1333
|
-ms-flex-wrap: nowrap;
|
1331
1334
|
flex-wrap: nowrap;
|
@@ -1336,6 +1339,7 @@ button.swiper-pagination-bullet {
|
|
1336
1339
|
cursor: pointer;
|
1337
1340
|
font-size: 14px;
|
1338
1341
|
text-wrap: nowrap;
|
1342
|
+
white-space: nowrap;
|
1339
1343
|
}
|
1340
1344
|
.clc-sxp-tagbar-list-item-active {
|
1341
1345
|
position: relative;
|
package/dist/index.js
CHANGED
@@ -8529,9 +8529,9 @@ const CommodityDetail$1 = (_a) => {
|
|
8529
8529
|
const renderContent = ({ isPost }) => {
|
8530
8530
|
var _a, _b, _c;
|
8531
8531
|
return (React.createElement("div", null,
|
8532
|
-
React.createElement("div", { className: 'pb-commondity-content-collection', style: 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) === '') }, (_a = product === null || product === void 0 ? void 0 : product.collection) !== null && _a !== void 0 ? _a : 'Tiffany Lock'),
|
8533
|
-
React.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
|
8534
|
-
React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
|
8532
|
+
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) === '') }, (_a = product === null || product === void 0 ? void 0 : product.collection) !== null && _a !== void 0 ? _a : 'Tiffany Lock'),
|
8533
|
+
React.createElement("div", { className: 'pb-commondity-content-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
|
8534
|
+
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) }, priceText),
|
8535
8535
|
React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
8536
8536
|
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: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
|
8537
8537
|
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
@@ -8543,6 +8543,12 @@ const CommodityDetail$1 = (_a) => {
|
|
8543
8543
|
var _a;
|
8544
8544
|
return (React.createElement(React.Fragment, null, (isDefault || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondity-btn', style: buttonStyle }, (_a = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _a !== void 0 ? _a : 'Purchase on Website'))));
|
8545
8545
|
};
|
8546
|
+
const getStyle = useCallback((style) => {
|
8547
|
+
if (style === null || style === void 0 ? void 0 : style.lineClamp) {
|
8548
|
+
return Object.assign(Object.assign({}, style), { overflow: 'hidden', WebkitLineClamp: style === null || style === void 0 ? void 0 : style.lineClamp, textOverflow: 'ellipsis', display: '-webkit-box', webkitBoxOrient: 'vertical' });
|
8549
|
+
}
|
8550
|
+
return style;
|
8551
|
+
}, []);
|
8546
8552
|
return (React.createElement("div", { className: 'pb-commondity' },
|
8547
8553
|
React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
|
8548
8554
|
product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
|
@@ -9073,6 +9079,12 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
9073
9079
|
`Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
|
9074
9080
|
Made in Italy` })));
|
9075
9081
|
};
|
9082
|
+
const getStyle = useCallback((style) => {
|
9083
|
+
if (style === null || style === void 0 ? void 0 : style.lineClamp) {
|
9084
|
+
return Object.assign(Object.assign({}, style), { overflow: 'hidden', WebkitLineClamp: style === null || style === void 0 ? void 0 : style.lineClamp, textOverflow: 'ellipsis', display: '-webkit-box', webkitBoxOrient: 'vertical' });
|
9085
|
+
}
|
9086
|
+
return style;
|
9087
|
+
}, []);
|
9076
9088
|
return (React.createElement("div", { className: 'pb-commondityDiroNew' },
|
9077
9089
|
React.createElement("div", Object.assign({ ref: scrollRef, className: css(Object.assign({}, style)) }, props),
|
9078
9090
|
product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
|
@@ -9115,11 +9127,11 @@ Made in Italy` })));
|
|
9115
9127
|
React.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
9116
9128
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
9117
9129
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
9118
|
-
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_l = product === null || product === void 0 ? void 0 : product.title) !== null && _l !== void 0 ? _l : 'Large Dior Toujours
|
9119
|
-
React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage
|
9130
|
+
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title) }, (_l = product === null || product === void 0 ? void 0 : product.title) !== null && _l !== void 0 ? _l : 'Large Dior Toujours BagLarge'),
|
9131
|
+
React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection) }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge')),
|
9120
9132
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right' },
|
9121
|
-
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
|
9122
|
-
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo }, (_m = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _m !== void 0 ? _m : '税费'))),
|
9133
|
+
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) }, priceText),
|
9134
|
+
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo) }, (_m = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _m !== void 0 ? _m : '税费'))),
|
9123
9135
|
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_o = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _o !== void 0 ? _o : 'Shop now')),
|
9124
9136
|
productInfoText({ isPost }))),
|
9125
9137
|
React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
|
@@ -9510,11 +9522,11 @@ var EventProvider$1 = memo(EventProvider);
|
|
9510
9522
|
var styles$6 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__3bKKx"};
|
9511
9523
|
|
9512
9524
|
const Commodity$1 = (_a) => {
|
9513
|
-
var _b, _c, _d, _e, _f, _g, _h, _j
|
9525
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
9514
9526
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
9515
9527
|
const { sxpParameter } = useSxpDataSource();
|
9516
9528
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
9517
|
-
const src = (
|
9529
|
+
const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
|
9518
9530
|
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
9519
9531
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9520
9532
|
React.createElement(FormatImage$1, { className: css({
|
@@ -9532,8 +9544,8 @@ const Commodity$1 = (_a) => {
|
|
9532
9544
|
width: '100%',
|
9533
9545
|
overflow: 'hidden'
|
9534
9546
|
}) },
|
9535
|
-
React.createElement("div", { className: styles$6['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
9536
|
-
React.createElement("div", { className: css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
9547
|
+
React.createElement("div", { className: styles$6['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_g = product === null || product === void 0 ? void 0 : product.title) !== null && _g !== void 0 ? _g : 'Product Name'),
|
9548
|
+
React.createElement("div", { className: css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_j = (_h = product === null || product === void 0 ? void 0 : product.bindCta) === null || _h === void 0 ? void 0 : _h.enTitle) !== null && _j !== void 0 ? _j : 'Shop Now'))));
|
9537
9549
|
};
|
9538
9550
|
var CommodityComponent = memo(Commodity$1);
|
9539
9551
|
|
@@ -9759,11 +9771,11 @@ var interactionRender$4 = [
|
|
9759
9771
|
var styles$4 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__yyHVb"};
|
9760
9772
|
|
9761
9773
|
const CommodityDiro$1 = (_a) => {
|
9762
|
-
var _b, _c, _d, _e, _f, _g, _h, _j
|
9774
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
9763
9775
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
9764
9776
|
const { sxpParameter } = useSxpDataSource();
|
9765
9777
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
9766
|
-
const src = (
|
9778
|
+
const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
|
9767
9779
|
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
9768
9780
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9769
9781
|
React.createElement(FormatImage$1, { className: css({
|
@@ -9781,8 +9793,8 @@ const CommodityDiro$1 = (_a) => {
|
|
9781
9793
|
width: '100%',
|
9782
9794
|
overflow: 'hidden'
|
9783
9795
|
}) },
|
9784
|
-
React.createElement("div", { className: styles$4['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
9785
|
-
React.createElement("div", { className: css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
9796
|
+
React.createElement("div", { className: styles$4['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_g = product === null || product === void 0 ? void 0 : product.title) !== null && _g !== void 0 ? _g : 'Product Name'),
|
9797
|
+
React.createElement("div", { className: css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_j = (_h = product === null || product === void 0 ? void 0 : product.bindCta) === null || _h === void 0 ? void 0 : _h.enTitle) !== null && _j !== void 0 ? _j : 'Shop Now'))));
|
9786
9798
|
};
|
9787
9799
|
var CommodityDiroComponent = memo(CommodityDiro$1);
|
9788
9800
|
|
@@ -9857,11 +9869,11 @@ var interactionRender$3 = [
|
|
9857
9869
|
var styles$3 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__I-yCC"};
|
9858
9870
|
|
9859
9871
|
const CommodityDiroNew$1 = (_a) => {
|
9860
|
-
var _b, _c, _d, _e, _f, _g, _h, _j
|
9872
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
9861
9873
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
9862
9874
|
const { sxpParameter } = useSxpDataSource();
|
9863
9875
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
9864
|
-
const src = (
|
9876
|
+
const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
|
9865
9877
|
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
9866
9878
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9867
9879
|
React.createElement(FormatImage$1, { className: css({
|
@@ -9879,8 +9891,8 @@ const CommodityDiroNew$1 = (_a) => {
|
|
9879
9891
|
width: '100%',
|
9880
9892
|
overflow: 'hidden'
|
9881
9893
|
}) },
|
9882
|
-
React.createElement("div", { className: styles$3['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
9883
|
-
React.createElement("div", { className: css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
9894
|
+
React.createElement("div", { className: styles$3['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_g = product === null || product === void 0 ? void 0 : product.title) !== null && _g !== void 0 ? _g : 'Product Name'),
|
9895
|
+
React.createElement("div", { className: css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_j = (_h = product === null || product === void 0 ? void 0 : product.bindCta) === null || _h === void 0 ? void 0 : _h.enTitle) !== null && _j !== void 0 ? _j : 'Shop now'))));
|
9884
9896
|
};
|
9885
9897
|
var CommodityDiroNewComponent = memo(CommodityDiroNew$1);
|
9886
9898
|
|
@@ -12932,7 +12944,7 @@ var Tagbar$1 = memo(Tagbar);
|
|
12932
12944
|
* @Author: binruan@chatlabs.com
|
12933
12945
|
* @Date: 2024-01-15 19:03:09
|
12934
12946
|
* @LastEditors: binruan@chatlabs.com
|
12935
|
-
* @LastEditTime: 2024-05-
|
12947
|
+
* @LastEditTime: 2024-05-30 11:35:35
|
12936
12948
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12937
12949
|
*
|
12938
12950
|
*/
|
@@ -13058,7 +13070,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13058
13070
|
useEffect(() => {
|
13059
13071
|
const item = data === null || data === void 0 ? void 0 : data[activeIndex];
|
13060
13072
|
const visibleChange = () => {
|
13061
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
13073
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
13062
13074
|
if (document.visibilityState === 'hidden') {
|
13063
13075
|
// 当用户导航到新页面、切换标签页、关闭标签页、最小化或关闭浏览器、刷新原页面(即离开原页面时),或者在移动设备上从浏览器切换到不同的应用程序时
|
13064
13076
|
// 移动端h5直接杀掉浏览器或宿主app时不会触发,pc端直接杀掉标签页时能触发
|
@@ -13069,16 +13081,16 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13069
13081
|
if (popupDetailData && (((_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
|
13070
13082
|
fromKName = 'pdpPage';
|
13071
13083
|
}
|
13072
|
-
else if (popupDetailData && (tempMap === null || tempMap === void 0 ? void 0 : tempMap[(_f = (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : ''].item.type) === 'Appoint') {
|
13084
|
+
else if (popupDetailData && ((_g = tempMap === null || tempMap === void 0 ? void 0 : tempMap[(_f = (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : ''].item) === null || _g === void 0 ? void 0 : _g.type) === 'Appoint') {
|
13073
13085
|
fromKName = 'formPage';
|
13074
13086
|
}
|
13075
13087
|
else if (isFromHashtag) {
|
13076
13088
|
fromKName = 'hashTagPage';
|
13077
13089
|
}
|
13078
|
-
else if ((
|
13090
|
+
else if ((_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.url) {
|
13079
13091
|
fromKName = 'videoPage';
|
13080
13092
|
}
|
13081
|
-
else if (((
|
13093
|
+
else if (((_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.imgUrls) && ((_l = (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.imgUrls) === null || _l === void 0 ? void 0 : _l.length)) {
|
13082
13094
|
fromKName = 'imagePage';
|
13083
13095
|
}
|
13084
13096
|
else if (item === null || item === void 0 ? void 0 : item.product) {
|
@@ -13089,12 +13101,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13089
13101
|
sessionDuration: Math.floor((new Date() - curTime.current) / 1000) + '',
|
13090
13102
|
eventSubject: 'sessionCompleted',
|
13091
13103
|
eventDescription: 'Session completed',
|
13092
|
-
contentId: (
|
13093
|
-
productId: (
|
13104
|
+
contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
|
13105
|
+
productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
|
13094
13106
|
position: activeIndex + '',
|
13095
13107
|
fromKName,
|
13096
13108
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
13097
|
-
ctatId: (
|
13109
|
+
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 : ''
|
13098
13110
|
}
|
13099
13111
|
});
|
13100
13112
|
}
|
@@ -13110,19 +13122,23 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13110
13122
|
document.removeEventListener('visibilitychange', visibleChange);
|
13111
13123
|
};
|
13112
13124
|
}, [activeIndex, bffEventReport, curTime, data, handleH5EnterLink, popupDetailData, isFromHashtag, tempMap]);
|
13125
|
+
const tagHeight = useMemo(() => {
|
13126
|
+
let h = 0;
|
13127
|
+
if (tagList.length > 0) {
|
13128
|
+
h += 45;
|
13129
|
+
if (waterFallData) {
|
13130
|
+
h -= 45;
|
13131
|
+
}
|
13132
|
+
}
|
13133
|
+
return h;
|
13134
|
+
}, [tagList, waterFallData]);
|
13113
13135
|
const height = useMemo(() => {
|
13114
13136
|
let minusHeight = 0;
|
13115
13137
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
13116
13138
|
minusHeight += 45;
|
13117
13139
|
}
|
13118
|
-
|
13119
|
-
|
13120
|
-
if (waterFallData) {
|
13121
|
-
minusHeight -= 45;
|
13122
|
-
}
|
13123
|
-
}
|
13124
|
-
return containerHeight - minusHeight;
|
13125
|
-
}, [globalConfig, containerHeight, tagList, waterFallData]);
|
13140
|
+
return containerHeight - minusHeight - tagHeight;
|
13141
|
+
}, [globalConfig, containerHeight, tagHeight]);
|
13126
13142
|
const renderLogo = useMemo(() => {
|
13127
13143
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
13128
13144
|
return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
|
@@ -13355,7 +13371,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13355
13371
|
renderLogo,
|
13356
13372
|
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
|
13357
13373
|
isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 + ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` } })) : null,
|
13358
|
-
React.createElement(Swiper, {
|
13374
|
+
React.createElement(Swiper, { style: {
|
13375
|
+
marginTop: tagHeight
|
13376
|
+
}, ref: swiperRef, onSlideChange: () => {
|
13359
13377
|
swiperRef.current.swiper.allowTouchMove = false;
|
13360
13378
|
setTimeout(() => {
|
13361
13379
|
swiperRef.current.swiper.allowTouchMove = true;
|