pb-sxp-ui 1.20.21 → 1.20.22

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 CHANGED
@@ -11861,8 +11861,18 @@ const CommodityDetail$1 = (_a) => {
11861
11861
  };
11862
11862
  const renderBtn = () => {
11863
11863
  var _a, _b;
11864
+ const handleBtnClick = (e) => {
11865
+ console.log('[CommodityDetail] Shop Now 按钮被点击', {
11866
+ product,
11867
+ cta,
11868
+ enableAddToCart,
11869
+ addToCartPopupId,
11870
+ productLink: product === null || product === void 0 ? void 0 : product.link
11871
+ });
11872
+ handleLink(e);
11873
+ };
11864
11874
  return (React.createElement(React.Fragment, null,
11865
- 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: handleLink, className: 'pb-commondity-btn', style: buttonStyle },
11875
+ 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) => console.log('[CommodityDetail] mousedown 事件', e), onPointerDown: (e) => console.log('[CommodityDetail] pointerdown 事件', e), className: 'pb-commondity-btn', style: Object.assign(Object.assign({}, buttonStyle), { pointerEvents: 'auto' }) },
11866
11876
  React.createElement("span", { dangerouslySetInnerHTML: {
11867
11877
  __html: setFontForText((_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website', buttonStyle)
11868
11878
  } }))));
@@ -11912,7 +11922,7 @@ const CommodityDetail$1 = (_a) => {
11912
11922
  }, []);
11913
11923
  const isAlly = React.useMemo(() => getScreenReader(), []);
11914
11924
  return (React.createElement(React.Fragment, null,
11915
- React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
11925
+ React.createElement("div", Object.assign({ className: css.css(Object.assign(Object.assign({}, style), { position: 'relative' })) }, props),
11916
11926
  React.createElement("div", { style: { position: 'relative' }, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave },
11917
11927
  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: {
11918
11928
  clickable: true,
@@ -11978,8 +11988,8 @@ const CommodityDetail$1 = (_a) => {
11978
11988
  }, onClick: () => setShow3DModal(true) },
11979
11989
  React.createElement("img", { src: iframeIcon, alt: '3d', width: '72px' })))),
11980
11990
  renderCommodityGroup(),
11981
- React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
11982
- renderBtn(),
11991
+ React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost })),
11992
+ renderBtn()),
11983
11993
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
11984
11994
  React.createElement("div", { style: { paddingTop: '34px', paddingBottom: '80px' } }, renderContent({ isPost: false })),
11985
11995
  renderBtn()),