pb-sxp-ui 1.2.5 → 1.2.6

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.
Files changed (36) hide show
  1. package/dist/index.cjs +65 -37
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +9 -1
  4. package/dist/index.js +65 -37
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -3
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -3
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +65 -37
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageRender/Popup/index.js +7 -5
  15. package/es/core/components/SxpPageRender/index.js +2 -2
  16. package/es/core/context/SxpDataSourceProvider.js +3 -3
  17. package/es/core/hooks/useEventReport.js +4 -4
  18. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  19. package/es/materials/sxp/popup/CommodityDetail/index.js +11 -6
  20. package/es/materials/sxp/popup/CommodityDetail/material.js +6 -0
  21. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +4 -0
  22. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +5 -2
  23. package/es/materials/sxp/popup/CommodityList/index.js +10 -10
  24. package/es/materials/sxp/template/components/CommodityGroup.js +11 -1
  25. package/lib/core/components/SxpPageRender/Popup/index.js +7 -5
  26. package/lib/core/components/SxpPageRender/index.js +2 -2
  27. package/lib/core/context/SxpDataSourceProvider.js +3 -3
  28. package/lib/core/hooks/useEventReport.js +4 -4
  29. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  30. package/lib/materials/sxp/popup/CommodityDetail/index.js +10 -5
  31. package/lib/materials/sxp/popup/CommodityDetail/material.js +6 -0
  32. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +4 -0
  33. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +5 -2
  34. package/lib/materials/sxp/popup/CommodityList/index.js +10 -10
  35. package/lib/materials/sxp/template/components/CommodityGroup.js +11 -1
  36. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -574,7 +574,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
574
574
  const themeTag = React.useRef();
575
575
  const curTime = React.useRef();
576
576
  const [selectTag, setSelectTag] = React.useState(DEFAULT_TAG);
577
- const checkCommodityIndexRef = React.useRef();
577
+ const checkCommodityIndexRef = React.useRef(-1);
578
578
  const popupCurTimeRef = React.useRef(null);
579
579
  const isShowConsent = React.useMemo(() => {
580
580
  var _a, _b, _c, _d;
@@ -743,7 +743,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
743
743
  }
744
744
  }), [bffFetch, utmVal, isShowTag]);
745
745
  const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
746
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
746
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
747
747
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
748
748
  const isProd = ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) || (((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProducts) && ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProducts) === null || _d === void 0 ? void 0 : _d.length) > 0);
749
749
  let fromKName = '';
@@ -757,7 +757,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
757
757
  fromKName = 'imagePage';
758
758
  }
759
759
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
760
- eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName, fromKPage: (_o = location === null || location === void 0 ? void 0 : location.href) !== null && _o !== void 0 ? _o : '' })
760
+ eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_1 = (_y = (_t = (_p = (_o = (_m = rec === null || rec === void 0 ? void 0 : rec.video) === null || _m === void 0 ? void 0 : _m.bindCta) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : (_s = (_r = (_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.bindProduct) === null || _r === void 0 ? void 0 : _r.bindCta) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_x = (_w = (_v = (_u = rec === null || rec === void 0 ? void 0 : rec.video) === null || _u === void 0 ? void 0 : _u.bindProducts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.bindCta) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.product) === null || _z === void 0 ? void 0 : _z.bindCta) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : '', fromKName, fromKPage: (_2 = location === null || location === void 0 ? void 0 : location.href) !== null && _2 !== void 0 ? _2 : '' })
761
761
  });
762
762
  }, [bffEventReport, isFromHashtag]);
763
763
  const h5EnterLink = React.useCallback(() => {
@@ -1289,14 +1289,14 @@ var settingRender$9 = [
1289
1289
  * @Author: binruan@chatlabs.com
1290
1290
  * @Date: 2024-03-12 10:59:06
1291
1291
  * @LastEditors: binruan@chatlabs.com
1292
- * @LastEditTime: 2024-06-20 13:39:07
1292
+ * @LastEditTime: 2024-07-31 11:41:47
1293
1293
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1294
1294
  *
1295
1295
  */
1296
1296
  function useEventReport() {
1297
1297
  const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
1298
1298
  const jumpToWeb = React.useCallback((data, product, cta, position) => {
1299
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1299
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
1300
1300
  let fromKName = '';
1301
1301
  if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
1302
1302
  fromKName = 'pdpPage';
@@ -1327,12 +1327,12 @@ function useEventReport() {
1327
1327
  position: position + '',
1328
1328
  contentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
1329
1329
  ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
1330
- traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
1330
+ traceInfo: (_0 = (_x = (_v = (_r = (_q = (_p = data === null || data === void 0 ? void 0 : data.video) === null || _p === void 0 ? void 0 : _p.bindProduct) === null || _q === void 0 ? void 0 : _q.traceInfo) !== null && _r !== void 0 ? _r : (_u = (_t = (_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.bindProducts) === null || _t === void 0 ? void 0 : _t[0]) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : (_w = data === null || data === void 0 ? void 0 : data.product) === null || _w === void 0 ? void 0 : _w.traceInfo) !== null && _x !== void 0 ? _x : (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindCta) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : ''
1331
1331
  }
1332
1332
  });
1333
1333
  }, [bffEventReport, popupDetailData, isFromHashtag]);
1334
1334
  const productView = React.useCallback((data, product, cta, viewTime, position) => {
1335
- var _a, _b, _c, _d;
1335
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
1336
1336
  let fromKName = '';
1337
1337
  if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
1338
1338
  fromKName = 'pdpPage';
@@ -1352,7 +1352,7 @@ function useEventReport() {
1352
1352
  position: position + '',
1353
1353
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
1354
1354
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
1355
- traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
1355
+ traceInfo: (_o = (_l = (_g = (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.traceInfo) !== null && _g !== void 0 ? _g : (_k = (_j = (_h = data === null || data === void 0 ? void 0 : data.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) === null || _k === void 0 ? void 0 : _k.traceInfo) !== null && _l !== void 0 ? _l : (_m = data === null || data === void 0 ? void 0 : data.product) === null || _m === void 0 ? void 0 : _m.traceInfo) !== null && _o !== void 0 ? _o : '',
1356
1356
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
1357
1357
  eventSubject: 'productView',
1358
1358
  eventDescription: 'User browsed the product'
@@ -1628,6 +1628,10 @@ var settingRender$8 = [
1628
1628
  {
1629
1629
  label: '商品描述',
1630
1630
  value: 'info'
1631
+ },
1632
+ {
1633
+ label: '税费说明',
1634
+ value: 'taxInfo'
1631
1635
  }
1632
1636
  ],
1633
1637
  name: ['props', 'commodityStyles', 'field'],
@@ -8802,7 +8806,7 @@ var ExpandableText$1 = React.memo(ExpandableText);
8802
8806
  * @Author: binruan@chatlabs.com
8803
8807
  * @Date: 2024-03-20 10:27:31
8804
8808
  * @LastEditors: binruan@chatlabs.com
8805
- * @LastEditTime: 2024-06-20 18:56:52
8809
+ * @LastEditTime: 2024-07-31 17:54:50
8806
8810
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
8807
8811
  *
8808
8812
  */
@@ -8875,6 +8879,14 @@ var Scroll$1 = React.memo(Scroll);
8875
8879
 
8876
8880
  const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailData, check }) => {
8877
8881
  var _a;
8882
+ const { productView } = useEventReport();
8883
+ const { popupCurTimeRef } = useSxpDataSource();
8884
+ const handleClick = (item, index) => {
8885
+ if (check === index)
8886
+ return;
8887
+ productView(popupDetailData, item, item === null || item === void 0 ? void 0 : item.bindCta, popupCurTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
8888
+ onCLick === null || onCLick === void 0 ? void 0 : onCLick(index);
8889
+ };
8878
8890
  return (React.createElement(React.Fragment, null, (data === null || data === void 0 ? void 0 : data.open) && ((products && (products === null || products === void 0 ? void 0 : products.length) > 1) || !popupDetailData) && (React.createElement(Scroll$1, { enableSlideActive: true, isPadding: false, style: Object.assign(Object.assign({}, style), data === null || data === void 0 ? void 0 : data.style) }, (_a = (popupDetailData ? products : [0, 1, 2, 3])) === null || _a === void 0 ? void 0 : _a.map((item, index) => {
8879
8891
  var _a, _b, _c;
8880
8892
  return (React.createElement(React.Fragment, null, (item === null || item === void 0 ? void 0 : item.bindCta) ? (React.createElement(SwiperSlide, { className: css.css({
@@ -8882,7 +8894,7 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
8882
8894
  height: '50px',
8883
8895
  marginRight: '10px'
8884
8896
  }), onClick: () => {
8885
- onCLick === null || onCLick === void 0 ? void 0 : onCLick(index);
8897
+ handleClick(item, index);
8886
8898
  }, key: index },
8887
8899
  React.createElement(FormatImage$1, { style: {
8888
8900
  height: '100%',
@@ -8900,8 +8912,7 @@ var CommodityGroup$1 = React.memo(CommodityGroup);
8900
8912
  const CommodityDetail$1 = (_a) => {
8901
8913
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
8902
8914
  var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup"]);
8903
- const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef } = useSxpDataSource();
8904
- useEditor();
8915
+ const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
8905
8916
  const { jumpToWeb, productView } = useEventReport();
8906
8917
  const curTimeRef = React.useRef(null);
8907
8918
  const [showModal, setShowModal] = React.useState(false);
@@ -8914,6 +8925,7 @@ const CommodityDetail$1 = (_a) => {
8914
8925
  : (_k = (_j = (_h = data === null || data === void 0 ? void 0 : data.video) === null || _h === void 0 ? void 0 : _h.bindProduct) === null || _j === void 0 ? void 0 : _j.bindCta) !== null && _k !== void 0 ? _k : (_o = (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.bindProducts) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.bindCta;
8915
8926
  const position = isPost ? index : popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
8916
8927
  if (!isPost && (commodityGroup === null || commodityGroup === void 0 ? void 0 : commodityGroup.open) && ((_p = data === null || data === void 0 ? void 0 : data.video) === null || _p === void 0 ? void 0 : _p.bindProducts) && ((_r = (_q = data === null || data === void 0 ? void 0 : data.video) === null || _q === void 0 ? void 0 : _q.bindProducts) === null || _r === void 0 ? void 0 : _r.length) > 0) {
8928
+ checkCommodityIndexRef.current = checkCommodityIndex;
8917
8929
  const p = (_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.bindProducts[checkCommodityIndex];
8918
8930
  product = p;
8919
8931
  cta = p === null || p === void 0 ? void 0 : p.bindCta;
@@ -8957,7 +8969,7 @@ const CommodityDetail$1 = (_a) => {
8957
8969
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8958
8970
  const width = isPreview ? 375 : (_t = style === null || style === void 0 ? void 0 : style.width) !== null && _t !== void 0 ? _t : window.innerWidth;
8959
8971
  const renderContent = ({ isPost }) => {
8960
- var _a, _b, _c;
8972
+ var _a, _b, _c, _d;
8961
8973
  return (React.createElement("div", null,
8962
8974
  React.createElement("div", { className: 'pb-commondity-content-collection', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection), hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), dangerouslySetInnerHTML: {
8963
8975
  __html: setFontForText((_a = product === null || product === void 0 ? void 0 : product.collection) !== null && _a !== void 0 ? _a : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
@@ -8968,8 +8980,11 @@ const CommodityDetail$1 = (_a) => {
8968
8980
  React.createElement("div", { className: 'pb-commondity-content-price', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price), hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), dangerouslySetInnerHTML: {
8969
8981
  __html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
8970
8982
  } }),
8983
+ React.createElement("div", { hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo), dangerouslySetInnerHTML: {
8984
+ __html: setFontForText((_c = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _c !== void 0 ? _c : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
8985
+ } }),
8971
8986
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8972
- React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8987
+ React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_d = product === null || product === void 0 ? void 0 : product.info) !== null && _d !== void 0 ? _d : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8973
8988
  bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8974
8989
  collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8975
8990
  necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
@@ -8991,6 +9006,7 @@ const CommodityDetail$1 = (_a) => {
8991
9006
  const handleClick = React.useCallback((index) => {
8992
9007
  popupCurTimeRef.current = new Date();
8993
9008
  setCheckCommodityIndex(index);
9009
+ checkCommodityIndexRef.current = index;
8994
9010
  }, []);
8995
9011
  const renderCommodityGroup = React.useCallback(() => {
8996
9012
  var _a, _b, _c;
@@ -9011,6 +9027,7 @@ const CommodityDetail$1 = (_a) => {
9011
9027
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9012
9028
  } },
9013
9029
  React.createElement(React.Fragment, null, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9030
+ var _a;
9014
9031
  return (React.createElement(SwiperSlide, { key: src },
9015
9032
  React.createElement("div", { style: {
9016
9033
  overflow: 'hidden',
@@ -9023,7 +9040,7 @@ const CommodityDetail$1 = (_a) => {
9023
9040
  objectFit: 'cover',
9024
9041
  display: 'block',
9025
9042
  objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9026
- }, src: src }))));
9043
+ }, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
9027
9044
  }))))),
9028
9045
  !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css.css({
9029
9046
  position: 'relative',
@@ -9087,7 +9104,7 @@ var interactionRender$c = [
9087
9104
  * @Author: binruan@chatlabs.com
9088
9105
  * @Date: 2023-07-28 18:29:57
9089
9106
  * @LastEditors: binruan@chatlabs.com
9090
- * @LastEditTime: 2024-07-12 17:40:06
9107
+ * @LastEditTime: 2024-07-31 13:58:45
9091
9108
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\material.tsx
9092
9109
  *
9093
9110
  */
@@ -9125,6 +9142,12 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
9125
9142
  info: {
9126
9143
  color: 'gray',
9127
9144
  fontSize: 12
9145
+ },
9146
+ taxInfo: {
9147
+ color: '#000',
9148
+ fontSize: 13,
9149
+ textAlign: 'left',
9150
+ marginBottom: '10px'
9128
9151
  }
9129
9152
  },
9130
9153
  buttonStyle: {
@@ -9610,7 +9633,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
9610
9633
  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, _1;
9611
9634
  var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup"]);
9612
9635
  React.useState(true);
9613
- const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport } = useSxpDataSource();
9636
+ const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
9614
9637
  const { jumpToWeb, productView } = useEventReport();
9615
9638
  React.useState(false);
9616
9639
  React.useState(false);
@@ -9625,6 +9648,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
9625
9648
  : (_k = (_j = (_h = data === null || data === void 0 ? void 0 : data.video) === null || _h === void 0 ? void 0 : _h.bindProduct) === null || _j === void 0 ? void 0 : _j.bindCta) !== null && _k !== void 0 ? _k : (_o = (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.bindProducts) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.bindCta;
9626
9649
  const position = isPost ? index : popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
9627
9650
  if (!isPost && (commodityGroup === null || commodityGroup === void 0 ? void 0 : commodityGroup.open) && ((_p = data === null || data === void 0 ? void 0 : data.video) === null || _p === void 0 ? void 0 : _p.bindProducts) && ((_r = (_q = data === null || data === void 0 ? void 0 : data.video) === null || _q === void 0 ? void 0 : _q.bindProducts) === null || _r === void 0 ? void 0 : _r.length) > 0) {
9651
+ checkCommodityIndexRef.current = checkCommodityIndex;
9628
9652
  const p = (_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.bindProducts[checkCommodityIndex];
9629
9653
  product = p;
9630
9654
  cta = p === null || p === void 0 ? void 0 : p.bindCta;
@@ -9732,6 +9756,7 @@ Made in Italy` })));
9732
9756
  const handleClick = React.useCallback((index) => {
9733
9757
  popupCurTimeRef.current = new Date();
9734
9758
  setCheckCommodityIndex(index);
9759
+ checkCommodityIndexRef.current = index;
9735
9760
  }, []);
9736
9761
  const renderCommodityGroup = React.useCallback(() => {
9737
9762
  var _a, _b, _c;
@@ -9750,6 +9775,7 @@ Made in Italy` })));
9750
9775
  }, loop: true, autoplay: {
9751
9776
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9752
9777
  } }, (_v = product === null || product === void 0 ? void 0 : product.homePage) === null || _v === void 0 ? void 0 : _v.map((src) => {
9778
+ var _a;
9753
9779
  return (React.createElement(SwiperSlide, { key: src },
9754
9780
  React.createElement("div", { style: {
9755
9781
  overflow: 'hidden',
@@ -9762,7 +9788,7 @@ Made in Italy` })));
9762
9788
  objectFit: 'cover',
9763
9789
  display: 'block',
9764
9790
  objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9765
- }, src: src }))));
9791
+ }, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
9766
9792
  }))),
9767
9793
  !((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) && (React.createElement("div", { className: css.css({
9768
9794
  position: 'relative',
@@ -10212,25 +10238,24 @@ const CommodityList$1 = (_a) => {
10212
10238
  onClick === null || onClick === void 0 ? void 0 : onClick();
10213
10239
  }
10214
10240
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
10215
- return (React.createElement("div", { className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
10216
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
10241
+ return (React.createElement("div", { className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px', boxSizing: 'border-box' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
10242
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
10217
10243
  return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement("div", Object.assign({ key: index }, props, { className: css.css({
10218
10244
  display: 'flex'
10219
10245
  }), onClick: () => handleClick(item, index) }),
10220
10246
  React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: commodityPicture, enableEventReport: false }),
10221
10247
  React.createElement("div", { style: {
10222
- flex: 1,
10223
- width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.marginRight) !== null && _f !== void 0 ? _f : 0}px - ${(_g = style === null || style === void 0 ? void 0 : style.padding) !== null && _g !== void 0 ? _g : 0}px)`,
10248
+ width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.marginRight) !== null && _f !== void 0 ? _f : 0}px)`,
10224
10249
  display: 'flex',
10225
10250
  flexDirection: 'column',
10226
10251
  justifyContent: 'space-between'
10227
10252
  } },
10228
10253
  React.createElement("div", null,
10229
10254
  React.createElement("div", { className: 'one-line-ellipsis', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.title), dangerouslySetInnerHTML: {
10230
- __html: setFontForText((_h = item === null || item === void 0 ? void 0 : item.title) !== null && _h !== void 0 ? _h : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
10255
+ __html: setFontForText((_g = item === null || item === void 0 ? void 0 : item.title) !== null && _g !== void 0 ? _g : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
10231
10256
  } }),
10232
10257
  React.createElement("div", { className: 'two-line-ellipsis', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection, hidden: !!item && (!(item === null || item === void 0 ? void 0 : item.collection) || (item === null || item === void 0 ? void 0 : item.collection) === ''), dangerouslySetInnerHTML: {
10233
- __html: setFontForText((_j = item === null || item === void 0 ? void 0 : item.collection) !== null && _j !== void 0 ? _j : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
10258
+ __html: setFontForText((_h = item === null || item === void 0 ? void 0 : item.collection) !== null && _h !== void 0 ? _h : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
10234
10259
  } })),
10235
10260
  React.createElement("div", { className: css.css({
10236
10261
  display: 'flex',
@@ -10239,11 +10264,12 @@ const CommodityList$1 = (_a) => {
10239
10264
  width: '100%',
10240
10265
  overflow: 'hidden'
10241
10266
  }) },
10242
- React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.price), dangerouslySetInnerHTML: {
10243
- __html: setFontForText(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
10244
- } }),
10267
+ React.createElement("div", null,
10268
+ React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.price), dangerouslySetInnerHTML: {
10269
+ __html: setFontForText(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
10270
+ } })),
10245
10271
  React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px' }), dangerouslySetInnerHTML: {
10246
- __html: setFontForText((_l = (_k = item === null || item === void 0 ? void 0 : item.bindCta) === null || _k === void 0 ? void 0 : _k.enTitle) !== null && _l !== void 0 ? _l : 'Shop Now', buttonStyle)
10272
+ __html: setFontForText((_k = (_j = item === null || item === void 0 ? void 0 : item.bindCta) === null || _j === void 0 ? void 0 : _j.enTitle) !== null && _k !== void 0 ? _k : 'Shop Now', buttonStyle)
10247
10273
  } })))))));
10248
10274
  })));
10249
10275
  };
@@ -15502,7 +15528,7 @@ var Tagbar$1 = React.memo(Tagbar);
15502
15528
  * @Author: binruan@chatlabs.com
15503
15529
  * @Date: 2024-01-15 19:03:09
15504
15530
  * @LastEditors: binruan@chatlabs.com
15505
- * @LastEditTime: 2024-07-29 10:02:52
15531
+ * @LastEditTime: 2024-07-31 11:33:42
15506
15532
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
15507
15533
  *
15508
15534
  */
@@ -15774,7 +15800,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15774
15800
  }
15775
15801
  };
15776
15802
  const handleSlideSkip = (item, position) => {
15777
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
15803
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
15778
15804
  if (isPreview || waterFallData)
15779
15805
  return;
15780
15806
  const t = new Date() - curTime.current;
@@ -15793,7 +15819,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15793
15819
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
15794
15820
  position: position + '',
15795
15821
  contentId: (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
15796
- traceInfo: (_r = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _r !== void 0 ? _r : ''
15822
+ traceInfo: (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : ''
15797
15823
  }
15798
15824
  });
15799
15825
  setSlideSkipState();
@@ -16324,7 +16350,7 @@ var index$1 = React.memo(DiyPortalPreview);
16324
16350
  * @Author: binruan@chatlabs.com
16325
16351
  * @Date: 2023-10-31 10:56:01
16326
16352
  * @LastEditors: binruan@chatlabs.com
16327
- * @LastEditTime: 2024-07-29 18:06:11
16353
+ * @LastEditTime: 2024-07-31 18:54:49
16328
16354
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
16329
16355
  *
16330
16356
  */
@@ -16350,7 +16376,7 @@ const Popup = () => {
16350
16376
  }
16351
16377
  }, [popup]);
16352
16378
  const handleClose = () => {
16353
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
16379
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
16354
16380
  if (!popup ||
16355
16381
  (popup === null || popup === void 0 ? void 0 : popup.id) === '' ||
16356
16382
  !visible ||
@@ -16364,9 +16390,11 @@ const Popup = () => {
16364
16390
  let product = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct;
16365
16391
  let cta = (_j = (_h = data === null || data === void 0 ? void 0 : data.video) === null || _h === void 0 ? void 0 : _h.bindProduct) === null || _j === void 0 ? void 0 : _j.bindCta;
16366
16392
  if ((checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current) >= 0) {
16367
- const p = (_k = data === null || data === void 0 ? void 0 : data.video) === null || _k === void 0 ? void 0 : _k.bindProducts[checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current];
16368
- product = p;
16369
- cta = p === null || p === void 0 ? void 0 : p.bindCta;
16393
+ const p = (_l = (_k = data === null || data === void 0 ? void 0 : data.video) === null || _k === void 0 ? void 0 : _k.bindProducts) === null || _l === void 0 ? void 0 : _l[checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current];
16394
+ if (p) {
16395
+ product = p;
16396
+ cta = p === null || p === void 0 ? void 0 : p.bindCta;
16397
+ }
16370
16398
  }
16371
16399
  if (product && cta) {
16372
16400
  productView(data, product, cta, popupCurTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
@@ -16388,7 +16416,7 @@ const Popup = () => {
16388
16416
  const isExternalLink = ((_d = (_c = (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.event) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
16389
16417
  const isPopup = ((_g = (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.event) === null || _f === void 0 ? void 0 : _f.onClick) === null || _g === void 0 ? void 0 : _g.linkType) === 'popup';
16390
16418
  const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
16391
- return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw', height: '100%' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
16419
+ return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw', height: '100%' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose, index: index })));
16392
16420
  }
16393
16421
  else {
16394
16422
  return React.createElement(React.Fragment, null);