pb-sxp-ui 1.20.20 → 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.
@@ -189,8 +189,18 @@ const CommodityDetail = (_a) => {
189
189
  };
190
190
  const renderBtn = () => {
191
191
  var _a, _b;
192
+ const handleBtnClick = (e) => {
193
+ console.log('[CommodityDetail] Shop Now 按钮被点击', {
194
+ product,
195
+ cta,
196
+ enableAddToCart,
197
+ addToCartPopupId,
198
+ productLink: product === null || product === void 0 ? void 0 : product.link
199
+ });
200
+ handleLink(e);
201
+ };
192
202
  return (React.createElement(React.Fragment, null,
193
- 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 },
203
+ 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' }) },
194
204
  React.createElement("span", { dangerouslySetInnerHTML: {
195
205
  __html: setFontForText((_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website', buttonStyle)
196
206
  } }))));
@@ -240,7 +250,7 @@ const CommodityDetail = (_a) => {
240
250
  }, []);
241
251
  const isAlly = useMemo(() => getScreenReader(), []);
242
252
  return (React.createElement(React.Fragment, null,
243
- React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
253
+ React.createElement("div", Object.assign({ className: css(Object.assign(Object.assign({}, style), { position: 'relative' })) }, props),
244
254
  React.createElement("div", { style: { position: 'relative' }, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave },
245
255
  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: {
246
256
  clickable: true,
@@ -306,8 +316,8 @@ const CommodityDetail = (_a) => {
306
316
  }, onClick: () => setShow3DModal(true) },
307
317
  React.createElement("img", { src: iframeIcon, alt: '3d', width: '72px' })))),
308
318
  renderCommodityGroup(),
309
- React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
310
- renderBtn(),
319
+ React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost })),
320
+ renderBtn()),
311
321
  React.createElement(Modal, { visible: showModal, onClose: () => setShowModal(false) },
312
322
  React.createElement("div", { style: { paddingTop: '34px', paddingBottom: '80px' } }, renderContent({ isPost: false })),
313
323
  renderBtn()),
@@ -191,8 +191,18 @@ const CommodityDetail = (_a) => {
191
191
  };
192
192
  const renderBtn = () => {
193
193
  var _a, _b;
194
+ const handleBtnClick = (e) => {
195
+ console.log('[CommodityDetail] Shop Now 按钮被点击', {
196
+ product,
197
+ cta,
198
+ enableAddToCart,
199
+ addToCartPopupId,
200
+ productLink: product === null || product === void 0 ? void 0 : product.link
201
+ });
202
+ handleLink(e);
203
+ };
194
204
  return (react_1.default.createElement(react_1.default.Fragment, null,
195
- react_1.default.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 },
205
+ react_1.default.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' }) },
196
206
  react_1.default.createElement("span", { dangerouslySetInnerHTML: {
197
207
  __html: (0, tool_1.setFontForText)((_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website', buttonStyle)
198
208
  } }))));
@@ -242,7 +252,7 @@ const CommodityDetail = (_a) => {
242
252
  }, []);
243
253
  const isAlly = (0, react_1.useMemo)(() => (0, tool_1.getScreenReader)(), []);
244
254
  return (react_1.default.createElement(react_1.default.Fragment, null,
245
- react_1.default.createElement("div", Object.assign({ className: (0, css_1.css)(Object.assign({}, style)) }, props),
255
+ react_1.default.createElement("div", Object.assign({ className: (0, css_1.css)(Object.assign(Object.assign({}, style), { position: 'relative' })) }, props),
246
256
  react_1.default.createElement("div", { style: { position: 'relative' }, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave },
247
257
  product && ((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) > 0 && (react_1.default.createElement(react_2.Swiper, Object.assign({ height: height, modules: [modules_1.Pagination, modules_1.Autoplay, ...(isAlly ? [modules_1.Navigation, modules_1.A11y, modules_1.Mousewheel, modules_1.Keyboard] : [])], pagination: {
248
258
  clickable: true,
@@ -308,8 +318,8 @@ const CommodityDetail = (_a) => {
308
318
  }, onClick: () => setShow3DModal(true) },
309
319
  react_1.default.createElement("img", { src: iframeIcon, alt: '3d', width: '72px' })))),
310
320
  renderCommodityGroup(),
311
- react_1.default.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
312
- renderBtn(),
321
+ react_1.default.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost })),
322
+ renderBtn()),
313
323
  react_1.default.createElement(Modal_1.default, { visible: showModal, onClose: () => setShowModal(false) },
314
324
  react_1.default.createElement("div", { style: { paddingTop: '34px', paddingBottom: '80px' } }, renderContent({ isPost: false })),
315
325
  renderBtn()),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.20.20",
3
+ "version": "1.20.22",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",