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.cjs
CHANGED
@@ -8552,9 +8552,9 @@ const CommodityDetail$1 = (_a) => {
|
|
8552
8552
|
const renderContent = ({ isPost }) => {
|
8553
8553
|
var _a, _b, _c;
|
8554
8554
|
return (React.createElement("div", null,
|
8555
|
-
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'),
|
8556
|
-
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'),
|
8557
|
-
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),
|
8555
|
+
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'),
|
8556
|
+
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'),
|
8557
|
+
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),
|
8558
8558
|
React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
8559
8559
|
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
|
8560
8560
|
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
@@ -8566,6 +8566,12 @@ const CommodityDetail$1 = (_a) => {
|
|
8566
8566
|
var _a;
|
8567
8567
|
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'))));
|
8568
8568
|
};
|
8569
|
+
const getStyle = React.useCallback((style) => {
|
8570
|
+
if (style === null || style === void 0 ? void 0 : style.lineClamp) {
|
8571
|
+
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' });
|
8572
|
+
}
|
8573
|
+
return style;
|
8574
|
+
}, []);
|
8569
8575
|
return (React.createElement("div", { className: 'pb-commondity' },
|
8570
8576
|
React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
|
8571
8577
|
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: {
|
@@ -9096,6 +9102,12 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
9096
9102
|
`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
|
9097
9103
|
Made in Italy` })));
|
9098
9104
|
};
|
9105
|
+
const getStyle = React.useCallback((style) => {
|
9106
|
+
if (style === null || style === void 0 ? void 0 : style.lineClamp) {
|
9107
|
+
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' });
|
9108
|
+
}
|
9109
|
+
return style;
|
9110
|
+
}, []);
|
9099
9111
|
return (React.createElement("div", { className: 'pb-commondityDiroNew' },
|
9100
9112
|
React.createElement("div", Object.assign({ ref: scrollRef, className: css.css(Object.assign({}, style)) }, props),
|
9101
9113
|
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: {
|
@@ -9138,11 +9150,11 @@ Made in Italy` })));
|
|
9138
9150
|
React.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
9139
9151
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
9140
9152
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
9141
|
-
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
|
9142
|
-
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
|
9153
|
+
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'),
|
9154
|
+
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')),
|
9143
9155
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right' },
|
9144
|
-
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),
|
9145
|
-
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 : '税费'))),
|
9156
|
+
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),
|
9157
|
+
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 : '税费'))),
|
9146
9158
|
(!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')),
|
9147
9159
|
productInfoText({ isPost }))),
|
9148
9160
|
React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
|
@@ -9533,11 +9545,11 @@ var EventProvider$1 = React.memo(EventProvider);
|
|
9533
9545
|
var styles$6 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__3bKKx"};
|
9534
9546
|
|
9535
9547
|
const Commodity$1 = (_a) => {
|
9536
|
-
var _b, _c, _d, _e, _f, _g, _h, _j
|
9548
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
9537
9549
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
9538
9550
|
const { sxpParameter } = useSxpDataSource();
|
9539
9551
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
9540
|
-
const src = (
|
9552
|
+
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;
|
9541
9553
|
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
9542
9554
|
React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9543
9555
|
React.createElement(FormatImage$1, { className: css.css({
|
@@ -9555,8 +9567,8 @@ const Commodity$1 = (_a) => {
|
|
9555
9567
|
width: '100%',
|
9556
9568
|
overflow: 'hidden'
|
9557
9569
|
}) },
|
9558
|
-
React.createElement("div", { className: styles$6['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
9559
|
-
React.createElement("div", { className: css.css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
9570
|
+
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'),
|
9571
|
+
React.createElement("div", { className: css.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'))));
|
9560
9572
|
};
|
9561
9573
|
var CommodityComponent = React.memo(Commodity$1);
|
9562
9574
|
|
@@ -9782,11 +9794,11 @@ var interactionRender$4 = [
|
|
9782
9794
|
var styles$4 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__yyHVb"};
|
9783
9795
|
|
9784
9796
|
const CommodityDiro$1 = (_a) => {
|
9785
|
-
var _b, _c, _d, _e, _f, _g, _h, _j
|
9797
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
9786
9798
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
9787
9799
|
const { sxpParameter } = useSxpDataSource();
|
9788
9800
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
9789
|
-
const src = (
|
9801
|
+
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;
|
9790
9802
|
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
9791
9803
|
React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9792
9804
|
React.createElement(FormatImage$1, { className: css.css({
|
@@ -9804,8 +9816,8 @@ const CommodityDiro$1 = (_a) => {
|
|
9804
9816
|
width: '100%',
|
9805
9817
|
overflow: 'hidden'
|
9806
9818
|
}) },
|
9807
|
-
React.createElement("div", { className: styles$4['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
9808
|
-
React.createElement("div", { className: css.css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
9819
|
+
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'),
|
9820
|
+
React.createElement("div", { className: css.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'))));
|
9809
9821
|
};
|
9810
9822
|
var CommodityDiroComponent = React.memo(CommodityDiro$1);
|
9811
9823
|
|
@@ -9880,11 +9892,11 @@ var interactionRender$3 = [
|
|
9880
9892
|
var styles$3 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__I-yCC"};
|
9881
9893
|
|
9882
9894
|
const CommodityDiroNew$1 = (_a) => {
|
9883
|
-
var _b, _c, _d, _e, _f, _g, _h, _j
|
9895
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
9884
9896
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
9885
9897
|
const { sxpParameter } = useSxpDataSource();
|
9886
9898
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
9887
|
-
const src = (
|
9899
|
+
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;
|
9888
9900
|
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css.css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
9889
9901
|
React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
9890
9902
|
React.createElement(FormatImage$1, { className: css.css({
|
@@ -9902,8 +9914,8 @@ const CommodityDiroNew$1 = (_a) => {
|
|
9902
9914
|
width: '100%',
|
9903
9915
|
overflow: 'hidden'
|
9904
9916
|
}) },
|
9905
|
-
React.createElement("div", { className: styles$3['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
9906
|
-
React.createElement("div", { className: css.css(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
9917
|
+
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'),
|
9918
|
+
React.createElement("div", { className: css.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'))));
|
9907
9919
|
};
|
9908
9920
|
var CommodityDiroNewComponent = React.memo(CommodityDiroNew$1);
|
9909
9921
|
|
@@ -12955,7 +12967,7 @@ var Tagbar$1 = React.memo(Tagbar);
|
|
12955
12967
|
* @Author: binruan@chatlabs.com
|
12956
12968
|
* @Date: 2024-01-15 19:03:09
|
12957
12969
|
* @LastEditors: binruan@chatlabs.com
|
12958
|
-
* @LastEditTime: 2024-05-
|
12970
|
+
* @LastEditTime: 2024-05-30 11:35:35
|
12959
12971
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12960
12972
|
*
|
12961
12973
|
*/
|
@@ -13081,7 +13093,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13081
13093
|
React.useEffect(() => {
|
13082
13094
|
const item = data === null || data === void 0 ? void 0 : data[activeIndex];
|
13083
13095
|
const visibleChange = () => {
|
13084
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
13096
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
13085
13097
|
if (document.visibilityState === 'hidden') {
|
13086
13098
|
// 当用户导航到新页面、切换标签页、关闭标签页、最小化或关闭浏览器、刷新原页面(即离开原页面时),或者在移动设备上从浏览器切换到不同的应用程序时
|
13087
13099
|
// 移动端h5直接杀掉浏览器或宿主app时不会触发,pc端直接杀掉标签页时能触发
|
@@ -13092,16 +13104,16 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13092
13104
|
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))) {
|
13093
13105
|
fromKName = 'pdpPage';
|
13094
13106
|
}
|
13095
|
-
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') {
|
13107
|
+
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') {
|
13096
13108
|
fromKName = 'formPage';
|
13097
13109
|
}
|
13098
13110
|
else if (isFromHashtag) {
|
13099
13111
|
fromKName = 'hashTagPage';
|
13100
13112
|
}
|
13101
|
-
else if ((
|
13113
|
+
else if ((_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.url) {
|
13102
13114
|
fromKName = 'videoPage';
|
13103
13115
|
}
|
13104
|
-
else if (((
|
13116
|
+
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)) {
|
13105
13117
|
fromKName = 'imagePage';
|
13106
13118
|
}
|
13107
13119
|
else if (item === null || item === void 0 ? void 0 : item.product) {
|
@@ -13112,12 +13124,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13112
13124
|
sessionDuration: Math.floor((new Date() - curTime.current) / 1000) + '',
|
13113
13125
|
eventSubject: 'sessionCompleted',
|
13114
13126
|
eventDescription: 'Session completed',
|
13115
|
-
contentId: (
|
13116
|
-
productId: (
|
13127
|
+
contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
|
13128
|
+
productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
|
13117
13129
|
position: activeIndex + '',
|
13118
13130
|
fromKName,
|
13119
13131
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
13120
|
-
ctatId: (
|
13132
|
+
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 : ''
|
13121
13133
|
}
|
13122
13134
|
});
|
13123
13135
|
}
|
@@ -13133,19 +13145,23 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13133
13145
|
document.removeEventListener('visibilitychange', visibleChange);
|
13134
13146
|
};
|
13135
13147
|
}, [activeIndex, bffEventReport, curTime, data, handleH5EnterLink, popupDetailData, isFromHashtag, tempMap]);
|
13148
|
+
const tagHeight = React.useMemo(() => {
|
13149
|
+
let h = 0;
|
13150
|
+
if (tagList.length > 0) {
|
13151
|
+
h += 45;
|
13152
|
+
if (waterFallData) {
|
13153
|
+
h -= 45;
|
13154
|
+
}
|
13155
|
+
}
|
13156
|
+
return h;
|
13157
|
+
}, [tagList, waterFallData]);
|
13136
13158
|
const height = React.useMemo(() => {
|
13137
13159
|
let minusHeight = 0;
|
13138
13160
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
13139
13161
|
minusHeight += 45;
|
13140
13162
|
}
|
13141
|
-
|
13142
|
-
|
13143
|
-
if (waterFallData) {
|
13144
|
-
minusHeight -= 45;
|
13145
|
-
}
|
13146
|
-
}
|
13147
|
-
return containerHeight - minusHeight;
|
13148
|
-
}, [globalConfig, containerHeight, tagList, waterFallData]);
|
13163
|
+
return containerHeight - minusHeight - tagHeight;
|
13164
|
+
}, [globalConfig, containerHeight, tagHeight]);
|
13149
13165
|
const renderLogo = React.useMemo(() => {
|
13150
13166
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
13151
13167
|
return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
|
@@ -13378,7 +13394,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
13378
13394
|
renderLogo,
|
13379
13395
|
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
|
13380
13396
|
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,
|
13381
|
-
React.createElement(Swiper, {
|
13397
|
+
React.createElement(Swiper, { style: {
|
13398
|
+
marginTop: tagHeight
|
13399
|
+
}, ref: swiperRef, onSlideChange: () => {
|
13382
13400
|
swiperRef.current.swiper.allowTouchMove = false;
|
13383
13401
|
setTimeout(() => {
|
13384
13402
|
swiperRef.current.swiper.allowTouchMove = true;
|