pb-sxp-ui 1.20.22 → 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.
@@ -16,6 +16,7 @@ import SXP_EVENT_BUS, { SXP_EVENT_TYPE } from '../../../../core/utils/event';
16
16
  const CommodityDetail = (_a) => {
17
17
  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;
18
18
  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"]);
19
+ console.log('[CommodityDetail] 组件已加载 - 版本 v1.20.23', { enableAddToCart, addToCartPopupId, isPost });
19
20
  const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef, globalConfig, ctaEvent, setPopupDetailData } = useSxpDataSource();
20
21
  const { jumpToWeb, productView } = useEventReport();
21
22
  const curTimeRef = useRef(null);
@@ -190,7 +191,7 @@ const CommodityDetail = (_a) => {
190
191
  const renderBtn = () => {
191
192
  var _a, _b;
192
193
  const handleBtnClick = (e) => {
193
- console.log('[CommodityDetail] Shop Now 按钮被点击', {
194
+ console.log('[CommodityDetail] Shop Now 按钮被点击!!!!', {
194
195
  product,
195
196
  cta,
196
197
  enableAddToCart,
@@ -199,9 +200,20 @@ const CommodityDetail = (_a) => {
199
200
  });
200
201
  handleLink(e);
201
202
  };
203
+ console.log('[CommodityDetail] renderBtn 被调用', {
204
+ ctaTitle: cta === null || cta === void 0 ? void 0 : cta.enTitle,
205
+ buttonStyle
206
+ });
202
207
  return (React.createElement(React.Fragment, null,
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' }) },
204
- React.createElement("span", { dangerouslySetInnerHTML: {
208
+ 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) => {
209
+ console.log('[CommodityDetail] mousedown 事件触发!!!', e);
210
+ e.stopPropagation();
211
+ }, onPointerDown: (e) => {
212
+ console.log('[CommodityDetail] pointerdown 事件触发!!!', e);
213
+ }, onTouchStart: (e) => {
214
+ console.log('[CommodityDetail] touchstart 事件触发!!!', e);
215
+ }, className: 'pb-commondity-btn', style: Object.assign(Object.assign({}, buttonStyle), { pointerEvents: 'auto', touchAction: 'manipulation' }) },
216
+ React.createElement("span", { style: { pointerEvents: 'none' }, dangerouslySetInnerHTML: {
205
217
  __html: setFontForText((_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website', buttonStyle)
206
218
  } }))));
207
219
  };
@@ -18,6 +18,7 @@ const event_1 = tslib_1.__importStar(require("../../../../core/utils/event"));
18
18
  const CommodityDetail = (_a) => {
19
19
  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;
20
20
  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 = tslib_1.__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"]);
21
+ console.log('[CommodityDetail] 组件已加载 - 版本 v1.20.23', { enableAddToCart, addToCartPopupId, isPost });
21
22
  const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef, globalConfig, ctaEvent, setPopupDetailData } = (0, hooks_1.useSxpDataSource)();
22
23
  const { jumpToWeb, productView } = (0, useEventReport_1.useEventReport)();
23
24
  const curTimeRef = (0, react_1.useRef)(null);
@@ -192,7 +193,7 @@ const CommodityDetail = (_a) => {
192
193
  const renderBtn = () => {
193
194
  var _a, _b;
194
195
  const handleBtnClick = (e) => {
195
- console.log('[CommodityDetail] Shop Now 按钮被点击', {
196
+ console.log('[CommodityDetail] Shop Now 按钮被点击!!!!', {
196
197
  product,
197
198
  cta,
198
199
  enableAddToCart,
@@ -201,9 +202,20 @@ const CommodityDetail = (_a) => {
201
202
  });
202
203
  handleLink(e);
203
204
  };
205
+ console.log('[CommodityDetail] renderBtn 被调用', {
206
+ ctaTitle: cta === null || cta === void 0 ? void 0 : cta.enTitle,
207
+ buttonStyle
208
+ });
204
209
  return (react_1.default.createElement(react_1.default.Fragment, null,
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' }) },
206
- react_1.default.createElement("span", { dangerouslySetInnerHTML: {
210
+ 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) => {
211
+ console.log('[CommodityDetail] mousedown 事件触发!!!', e);
212
+ e.stopPropagation();
213
+ }, onPointerDown: (e) => {
214
+ console.log('[CommodityDetail] pointerdown 事件触发!!!', e);
215
+ }, onTouchStart: (e) => {
216
+ console.log('[CommodityDetail] touchstart 事件触发!!!', e);
217
+ }, className: 'pb-commondity-btn', style: Object.assign(Object.assign({}, buttonStyle), { pointerEvents: 'auto', touchAction: 'manipulation' }) },
218
+ react_1.default.createElement("span", { style: { pointerEvents: 'none' }, dangerouslySetInnerHTML: {
207
219
  __html: (0, tool_1.setFontForText)((_b = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _b !== void 0 ? _b : 'Purchase on Website', buttonStyle)
208
220
  } }))));
209
221
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.20.22",
3
+ "version": "1.20.24",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",