pb-sxp-ui 1.9.7 → 1.9.8

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.
@@ -11,9 +11,9 @@ const EventProvider = (_a) => {
11
11
  const { jumpToWeb } = useEventReport();
12
12
  const [element, setElement] = useState(null);
13
13
  const handleClick = throttle((event) => {
14
- var _a, _b, _c, _d, _e, _f, _g;
14
+ var _a, _b, _c, _d, _e, _f;
15
15
  event.preventDefault();
16
- const item = (_c = (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video) !== null && _c !== void 0 ? _c : multItem;
16
+ const item = multItem ? multItem : (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video;
17
17
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
18
18
  eventSubject: 'clickCta',
19
19
  eventDescription: 'User clicked the CTA'
@@ -22,10 +22,10 @@ const EventProvider = (_a) => {
22
22
  ? Object.assign(Object.assign({}, rec), { video: Object.assign(Object.assign({}, rec === null || rec === void 0 ? void 0 : rec.video), { bindProduct: multItem }), index, multiCheckIndex }) : Object.assign(Object.assign({}, rec), { index }));
23
23
  setElement(ref === null || ref === void 0 ? void 0 : ref.current);
24
24
  if (isExternalLink) {
25
- const link = ((_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.link) || (multItem === null || multItem === void 0 ? void 0 : multItem.link);
25
+ const link = ((_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) || (multItem === null || multItem === void 0 ? void 0 : multItem.link);
26
26
  if (jumpLink || link) {
27
- const cta = ((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindCta) || (multItem === null || multItem === void 0 ? void 0 : multItem.bindCta);
28
- const product = ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) || multItem;
27
+ const cta = ((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta) || (multItem === null || multItem === void 0 ? void 0 : multItem.bindCta);
28
+ const product = ((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct) || multItem;
29
29
  jumpToWeb(rec, product, cta, index);
30
30
  window.location.href = window.getJointUtmLink(jumpLink || link || '');
31
31
  }
@@ -13,9 +13,9 @@ const EventProvider = (_a) => {
13
13
  const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
14
14
  const [element, setElement] = (0, react_1.useState)(null);
15
15
  const handleClick = (0, lodash_1.throttle)((event) => {
16
- var _a, _b, _c, _d, _e, _f, _g;
16
+ var _a, _b, _c, _d, _e, _f;
17
17
  event.preventDefault();
18
- const item = (_c = (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video) !== null && _c !== void 0 ? _c : multItem;
18
+ const item = multItem ? multItem : (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video;
19
19
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
20
20
  eventSubject: 'clickCta',
21
21
  eventDescription: 'User clicked the CTA'
@@ -24,10 +24,10 @@ const EventProvider = (_a) => {
24
24
  ? Object.assign(Object.assign({}, rec), { video: Object.assign(Object.assign({}, rec === null || rec === void 0 ? void 0 : rec.video), { bindProduct: multItem }), index, multiCheckIndex }) : Object.assign(Object.assign({}, rec), { index }));
25
25
  setElement(ref === null || ref === void 0 ? void 0 : ref.current);
26
26
  if (isExternalLink) {
27
- const link = ((_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.link) || (multItem === null || multItem === void 0 ? void 0 : multItem.link);
27
+ const link = ((_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) || (multItem === null || multItem === void 0 ? void 0 : multItem.link);
28
28
  if (jumpLink || link) {
29
- const cta = ((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindCta) || (multItem === null || multItem === void 0 ? void 0 : multItem.bindCta);
30
- const product = ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) || multItem;
29
+ const cta = ((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta) || (multItem === null || multItem === void 0 ? void 0 : multItem.bindCta);
30
+ const product = ((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct) || multItem;
31
31
  jumpToWeb(rec, product, cta, index);
32
32
  window.location.href = window.getJointUtmLink(jumpLink || link || '');
33
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.9.7",
3
+ "version": "1.9.8",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",