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.js CHANGED
@@ -11839,8 +11839,18 @@ const CommodityDetail$1 = (_a) => {
11839
11839
  };
11840
11840
  const renderBtn = () => {
11841
11841
  var _a, _b;
11842
+ const handleBtnClick = (e) => {
11843
+ console.log('[CommodityDetail] Shop Now 按钮被点击', {
11844
+ product,
11845
+ cta,
11846
+ enableAddToCart,
11847
+ addToCartPopupId,
11848
+ productLink: product === null || product === void 0 ? void 0 : product.link
11849
+ });
11850
+ handleLink(e);
11851
+ };
11842
11852
  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: handleLink, className: 'pb-commondity-btn', style: buttonStyle },
11853
+ 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' }) },
11844
11854
  React.createElement("span", { dangerouslySetInnerHTML: {
11845
11855
  __html: setFontForText((_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website', buttonStyle)
11846
11856
  } }))));
@@ -11890,7 +11900,7 @@ const CommodityDetail$1 = (_a) => {
11890
11900
  }, []);
11891
11901
  const isAlly = useMemo(() => getScreenReader(), []);
11892
11902
  return (React.createElement(React.Fragment, null,
11893
- React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
11903
+ React.createElement("div", Object.assign({ className: css(Object.assign(Object.assign({}, style), { position: 'relative' })) }, props),
11894
11904
  React.createElement("div", { style: { position: 'relative' }, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave },
11895
11905
  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
11906
  clickable: true,
@@ -11956,8 +11966,8 @@ const CommodityDetail$1 = (_a) => {
11956
11966
  }, onClick: () => setShow3DModal(true) },
11957
11967
  React.createElement("img", { src: iframeIcon, alt: '3d', width: '72px' })))),
11958
11968
  renderCommodityGroup(),
11959
- React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
11960
- renderBtn(),
11969
+ React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost })),
11970
+ renderBtn()),
11961
11971
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
11962
11972
  React.createElement("div", { style: { paddingTop: '34px', paddingBottom: '80px' } }, renderContent({ isPost: false })),
11963
11973
  renderBtn()),