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.
@@ -17,16 +17,15 @@ const MultiCommodity = (_a) => {
17
17
  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]);
18
18
  const { jumpToWeb } = useEventReport();
19
19
  const handleClick = throttle((item) => {
20
- var _a;
21
20
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
22
21
  eventSubject: 'clickCta',
23
22
  eventDescription: 'User clicked the CTA'
24
23
  }, recData, item);
25
24
  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 }) }));
26
25
  if (isExternalLink) {
27
- if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
26
+ if (item === null || item === void 0 ? void 0 : item.link) {
28
27
  jumpToWeb(recData, item, item.bindCta);
29
- window.location.href = item.bindCta.link;
28
+ window.location.href = item.link;
30
29
  }
31
30
  }
32
31
  else {
@@ -16,16 +16,15 @@ const MultiCommodityDiro = (_a) => {
16
16
  const { jumpToWeb } = useEventReport();
17
17
  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]);
18
18
  const handleClick = throttle((item) => {
19
- var _a;
20
19
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
21
20
  eventSubject: 'clickCta',
22
21
  eventDescription: 'User clicked the CTA'
23
22
  }, recData, item);
24
23
  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 }) }));
25
24
  if (isExternalLink) {
26
- if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
25
+ if (item === null || item === void 0 ? void 0 : item.link) {
27
26
  jumpToWeb(recData, item, item.bindCta);
28
- window.location.href = item.bindCta.link;
27
+ window.location.href = item.link;
29
28
  }
30
29
  }
31
30
  else {
@@ -16,16 +16,15 @@ const MultiCommodityDiroNew = (_a) => {
16
16
  const { jumpToWeb } = useEventReport();
17
17
  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]);
18
18
  const handleClick = throttle((item) => {
19
- var _a;
20
19
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
21
20
  eventSubject: 'clickCta',
22
21
  eventDescription: 'User clicked the CTA'
23
22
  }, recData, item);
24
23
  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 }) }));
25
24
  if (isExternalLink) {
26
- if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
25
+ if (item === null || item === void 0 ? void 0 : item.link) {
27
26
  jumpToWeb(recData, item, item.bindCta);
28
- window.location.href = item.bindCta.link;
27
+ window.location.href = item.link;
29
28
  }
30
29
  }
31
30
  else {
@@ -30,11 +30,11 @@ const EventProvider = (_a) => {
30
30
  }, rec, item);
31
31
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(rec);
32
32
  if (isExternalLink) {
33
- 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) {
33
+ 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) {
34
34
  const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
35
35
  const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
36
36
  jumpToWeb(rec, product, cta);
37
- 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;
37
+ 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;
38
38
  }
39
39
  }
40
40
  else {
@@ -19,16 +19,15 @@ const MultiCommodity = (_a) => {
19
19
  const [products, setProducts] = (0, react_1.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]);
20
20
  const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
21
21
  const handleClick = (0, lodash_1.throttle)((item) => {
22
- var _a;
23
22
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
24
23
  eventSubject: 'clickCta',
25
24
  eventDescription: 'User clicked the CTA'
26
25
  }, recData, item);
27
26
  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 }) }));
28
27
  if (isExternalLink) {
29
- if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
28
+ if (item === null || item === void 0 ? void 0 : item.link) {
30
29
  jumpToWeb(recData, item, item.bindCta);
31
- window.location.href = item.bindCta.link;
30
+ window.location.href = item.link;
32
31
  }
33
32
  }
34
33
  else {
@@ -18,16 +18,15 @@ const MultiCommodityDiro = (_a) => {
18
18
  const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
19
19
  const [products, setProducts] = (0, react_1.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]);
20
20
  const handleClick = (0, lodash_1.throttle)((item) => {
21
- var _a;
22
21
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
23
22
  eventSubject: 'clickCta',
24
23
  eventDescription: 'User clicked the CTA'
25
24
  }, recData, item);
26
25
  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 }) }));
27
26
  if (isExternalLink) {
28
- if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
27
+ if (item === null || item === void 0 ? void 0 : item.link) {
29
28
  jumpToWeb(recData, item, item.bindCta);
30
- window.location.href = item.bindCta.link;
29
+ window.location.href = item.link;
31
30
  }
32
31
  }
33
32
  else {
@@ -18,16 +18,15 @@ const MultiCommodityDiroNew = (_a) => {
18
18
  const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
19
19
  const [products, setProducts] = (0, react_1.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]);
20
20
  const handleClick = (0, lodash_1.throttle)((item) => {
21
- var _a;
22
21
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
23
22
  eventSubject: 'clickCta',
24
23
  eventDescription: 'User clicked the CTA'
25
24
  }, recData, item);
26
25
  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 }) }));
27
26
  if (isExternalLink) {
28
- if ((_a = item === null || item === void 0 ? void 0 : item.bindCta) === null || _a === void 0 ? void 0 : _a.link) {
27
+ if (item === null || item === void 0 ? void 0 : item.link) {
29
28
  jumpToWeb(recData, item, item.bindCta);
30
- window.location.href = item.bindCta.link;
29
+ window.location.href = item.link;
31
30
  }
32
31
  }
33
32
  else {
@@ -32,11 +32,11 @@ const EventProvider = (_a) => {
32
32
  }, rec, item);
33
33
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(rec);
34
34
  if (isExternalLink) {
35
- 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) {
35
+ 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) {
36
36
  const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
37
37
  const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
38
38
  jumpToWeb(rec, product, cta);
39
- 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;
39
+ 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;
40
40
  }
41
41
  }
42
42
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",