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.js CHANGED
@@ -8159,7 +8159,7 @@ function useEventReport() {
8159
8159
  * @Author: binruan@chatlabs.com
8160
8160
  * @Date: 2023-11-02 18:34:34
8161
8161
  * @LastEditors: binruan@chatlabs.com
8162
- * @LastEditTime: 2024-04-10 11:11:50
8162
+ * @LastEditTime: 2024-04-10 18:40:21
8163
8163
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8164
8164
  *
8165
8165
  */
@@ -9183,11 +9183,11 @@ const EventProvider = (_a) => {
9183
9183
  }, rec, item);
9184
9184
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(rec);
9185
9185
  if (isExternalLink) {
9186
- 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) {
9186
+ 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) {
9187
9187
  const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
9188
9188
  const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
9189
9189
  jumpToWeb(rec, product, cta);
9190
- 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;
9190
+ 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;
9191
9191
  }
9192
9192
  }
9193
9193
  else {
@@ -9665,16 +9665,15 @@ const MultiCommodityDiro$1 = (_a) => {
9665
9665
  const { jumpToWeb } = useEventReport();
9666
9666
  const [products, setProducts] = 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]);
9667
9667
  const handleClick = throttle((item) => {
9668
- var _a;
9669
9668
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9670
9669
  eventSubject: 'clickCta',
9671
9670
  eventDescription: 'User clicked the CTA'
9672
9671
  }, recData, item);
9673
9672
  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 }) }));
9674
9673
  if (isExternalLink) {
9675
- if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
9674
+ if (item === null || item === void 0 ? void 0 : item.link) {
9676
9675
  jumpToWeb(recData, item, item.bindCta);
9677
- window.location.href = item.bindCta.link;
9676
+ window.location.href = item.link;
9678
9677
  }
9679
9678
  }
9680
9679
  else {
@@ -9779,16 +9778,15 @@ const MultiCommodity$1 = (_a) => {
9779
9778
  const [products, setProducts] = 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]);
9780
9779
  const { jumpToWeb } = useEventReport();
9781
9780
  const handleClick = throttle((item) => {
9782
- var _a;
9783
9781
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9784
9782
  eventSubject: 'clickCta',
9785
9783
  eventDescription: 'User clicked the CTA'
9786
9784
  }, recData, item);
9787
9785
  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 }) }));
9788
9786
  if (isExternalLink) {
9789
- if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
9787
+ if (item === null || item === void 0 ? void 0 : item.link) {
9790
9788
  jumpToWeb(recData, item, item.bindCta);
9791
- window.location.href = item.bindCta.link;
9789
+ window.location.href = item.link;
9792
9790
  }
9793
9791
  }
9794
9792
  else {
@@ -9892,16 +9890,15 @@ const MultiCommodityDiroNew$1 = (_a) => {
9892
9890
  const { jumpToWeb } = useEventReport();
9893
9891
  const [products, setProducts] = 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]);
9894
9892
  const handleClick = throttle((item) => {
9895
- var _a;
9896
9893
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9897
9894
  eventSubject: 'clickCta',
9898
9895
  eventDescription: 'User clicked the CTA'
9899
9896
  }, recData, item);
9900
9897
  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 }) }));
9901
9898
  if (isExternalLink) {
9902
- if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
9899
+ if (item === null || item === void 0 ? void 0 : item.link) {
9903
9900
  jumpToWeb(recData, item, item.bindCta);
9904
- window.location.href = item.bindCta.link;
9901
+ window.location.href = item.link;
9905
9902
  }
9906
9903
  }
9907
9904
  else {