pb-sxp-ui 1.20.21 → 1.20.24
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 +27 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +27 -5
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +6 -6
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +6 -6
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +27 -5
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +6 -6
- package/dist/pb-ui.min.js.map +1 -1
- package/es/materials/sxp/popup/CommodityDetail/index.js +27 -5
- package/lib/materials/sxp/popup/CommodityDetail/index.js +27 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11660,6 +11660,7 @@ const getPriceText = ({ product, enableFormattedPrice, globalConfig, isHiddenDef
|
|
|
11660
11660
|
const CommodityDetail$1 = (_a) => {
|
|
11661
11661
|
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;
|
|
11662
11662
|
var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio, isTel, iframeBgColor, isActive = true, enableAddToCart = false, addToCartPopupId = '' } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio", "isTel", "iframeBgColor", "isActive", "enableAddToCart", "addToCartPopupId"]);
|
|
11663
|
+
console.log('[CommodityDetail] 组件已加载 - 版本 v1.20.23', { enableAddToCart, addToCartPopupId, isPost });
|
|
11663
11664
|
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef, globalConfig, ctaEvent, setPopupDetailData } = useSxpDataSource();
|
|
11664
11665
|
const { jumpToWeb, productView } = useEventReport();
|
|
11665
11666
|
const curTimeRef = useRef(null);
|
|
@@ -11839,9 +11840,30 @@ const CommodityDetail$1 = (_a) => {
|
|
|
11839
11840
|
};
|
|
11840
11841
|
const renderBtn = () => {
|
|
11841
11842
|
var _a, _b;
|
|
11843
|
+
const handleBtnClick = (e) => {
|
|
11844
|
+
console.log('[CommodityDetail] Shop Now 按钮被点击!!!!', {
|
|
11845
|
+
product,
|
|
11846
|
+
cta,
|
|
11847
|
+
enableAddToCart,
|
|
11848
|
+
addToCartPopupId,
|
|
11849
|
+
productLink: product === null || product === void 0 ? void 0 : product.link
|
|
11850
|
+
});
|
|
11851
|
+
handleLink(e);
|
|
11852
|
+
};
|
|
11853
|
+
console.log('[CommodityDetail] renderBtn 被调用', {
|
|
11854
|
+
ctaTitle: cta === null || cta === void 0 ? void 0 : cta.enTitle,
|
|
11855
|
+
buttonStyle
|
|
11856
|
+
});
|
|
11842
11857
|
return (React.createElement(React.Fragment, null,
|
|
11843
|
-
React.createElement("a", { "aria-label": (_a = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _a !== void 0 ? _a : 'Purchase on Website', role: 'button', tabIndex: 0, onClick:
|
|
11844
|
-
|
|
11858
|
+
React.createElement("a", { "aria-label": (_a = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _a !== void 0 ? _a : 'Purchase on Website', role: 'button', tabIndex: 0, onClick: handleBtnClick, onMouseDown: (e) => {
|
|
11859
|
+
console.log('[CommodityDetail] mousedown 事件触发!!!', e);
|
|
11860
|
+
e.stopPropagation();
|
|
11861
|
+
}, onPointerDown: (e) => {
|
|
11862
|
+
console.log('[CommodityDetail] pointerdown 事件触发!!!', e);
|
|
11863
|
+
}, onTouchStart: (e) => {
|
|
11864
|
+
console.log('[CommodityDetail] touchstart 事件触发!!!', e);
|
|
11865
|
+
}, className: 'pb-commondity-btn', style: Object.assign(Object.assign({}, buttonStyle), { pointerEvents: 'auto', touchAction: 'manipulation' }) },
|
|
11866
|
+
React.createElement("span", { style: { pointerEvents: 'none' }, dangerouslySetInnerHTML: {
|
|
11845
11867
|
__html: setFontForText((_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website', buttonStyle)
|
|
11846
11868
|
} }))));
|
|
11847
11869
|
};
|
|
@@ -11890,7 +11912,7 @@ const CommodityDetail$1 = (_a) => {
|
|
|
11890
11912
|
}, []);
|
|
11891
11913
|
const isAlly = useMemo(() => getScreenReader(), []);
|
|
11892
11914
|
return (React.createElement(React.Fragment, null,
|
|
11893
|
-
React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
|
|
11915
|
+
React.createElement("div", Object.assign({ className: css(Object.assign(Object.assign({}, style), { position: 'relative' })) }, props),
|
|
11894
11916
|
React.createElement("div", { style: { position: 'relative' }, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave },
|
|
11895
11917
|
product && ((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) > 0 && (React.createElement(Swiper, Object.assign({ height: height, modules: [Pagination, Autoplay, ...(isAlly ? [Navigation, A11y, Mousewheel, Keyboard] : [])], pagination: {
|
|
11896
11918
|
clickable: true,
|
|
@@ -11956,8 +11978,8 @@ const CommodityDetail$1 = (_a) => {
|
|
|
11956
11978
|
}, onClick: () => setShow3DModal(true) },
|
|
11957
11979
|
React.createElement("img", { src: iframeIcon, alt: '3d', width: '72px' })))),
|
|
11958
11980
|
renderCommodityGroup(),
|
|
11959
|
-
React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))
|
|
11960
|
-
|
|
11981
|
+
React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost })),
|
|
11982
|
+
renderBtn()),
|
|
11961
11983
|
React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
|
|
11962
11984
|
React.createElement("div", { style: { paddingTop: '34px', paddingBottom: '80px' } }, renderContent({ isPost: false })),
|
|
11963
11985
|
renderBtn()),
|