pb-sxp-ui 1.0.4 → 1.0.5

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
@@ -8182,7 +8182,7 @@ function useEventReport() {
8182
8182
  * @Author: binruan@chatlabs.com
8183
8183
  * @Date: 2023-11-02 18:34:34
8184
8184
  * @LastEditors: binruan@chatlabs.com
8185
- * @LastEditTime: 2024-04-10 11:11:50
8185
+ * @LastEditTime: 2024-04-10 18:40:21
8186
8186
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8187
8187
  *
8188
8188
  */
@@ -9206,11 +9206,11 @@ const EventProvider = (_a) => {
9206
9206
  }, rec, item);
9207
9207
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(rec);
9208
9208
  if (isExternalLink) {
9209
- if ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta) === null || _d === void 0 ? void 0 : _d.link) {
9209
+ if ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.link) {
9210
9210
  const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
9211
9211
  const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
9212
9212
  jumpToWeb(rec, product, cta);
9213
- window.location.href = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindCta) === null || _h === void 0 ? void 0 : _h.link;
9213
+ window.location.href = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.link;
9214
9214
  }
9215
9215
  }
9216
9216
  else {
@@ -9688,16 +9688,15 @@ const MultiCommodityDiro$1 = (_a) => {
9688
9688
  const { jumpToWeb } = useEventReport();
9689
9689
  const [products, setProducts] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
9690
9690
  const handleClick = lodash.throttle((item) => {
9691
- var _a;
9692
9691
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9693
9692
  eventSubject: 'clickCta',
9694
9693
  eventDescription: 'User clicked the CTA'
9695
9694
  }, recData, item);
9696
9695
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
9697
9696
  if (isExternalLink) {
9698
- if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
9697
+ if (item === null || item === void 0 ? void 0 : item.link) {
9699
9698
  jumpToWeb(recData, item, item.bindCta);
9700
- window.location.href = item.bindCta.link;
9699
+ window.location.href = item.link;
9701
9700
  }
9702
9701
  }
9703
9702
  else {
@@ -9802,16 +9801,15 @@ const MultiCommodity$1 = (_a) => {
9802
9801
  const [products, setProducts] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
9803
9802
  const { jumpToWeb } = useEventReport();
9804
9803
  const handleClick = lodash.throttle((item) => {
9805
- var _a;
9806
9804
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9807
9805
  eventSubject: 'clickCta',
9808
9806
  eventDescription: 'User clicked the CTA'
9809
9807
  }, recData, item);
9810
9808
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
9811
9809
  if (isExternalLink) {
9812
- if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
9810
+ if (item === null || item === void 0 ? void 0 : item.link) {
9813
9811
  jumpToWeb(recData, item, item.bindCta);
9814
- window.location.href = item.bindCta.link;
9812
+ window.location.href = item.link;
9815
9813
  }
9816
9814
  }
9817
9815
  else {
@@ -9915,16 +9913,15 @@ const MultiCommodityDiroNew$1 = (_a) => {
9915
9913
  const { jumpToWeb } = useEventReport();
9916
9914
  const [products, setProducts] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
9917
9915
  const handleClick = lodash.throttle((item) => {
9918
- var _a;
9919
9916
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9920
9917
  eventSubject: 'clickCta',
9921
9918
  eventDescription: 'User clicked the CTA'
9922
9919
  }, recData, item);
9923
9920
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }) }));
9924
9921
  if (isExternalLink) {
9925
- if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
9922
+ if (item === null || item === void 0 ? void 0 : item.link) {
9926
9923
  jumpToWeb(recData, item, item.bindCta);
9927
- window.location.href = item.bindCta.link;
9924
+ window.location.href = item.link;
9928
9925
  }
9929
9926
  }
9930
9927
  else {