pb-sxp-ui 1.10.2 → 1.10.3

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 (45) hide show
  1. package/dist/index.cjs +58 -31
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +58 -31
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +4 -4
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +4 -4
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +58 -31
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +4 -4
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/SxpPageRender/WaterFall/List.js +2 -2
  14. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +2 -2
  15. package/es/core/components/SxpPageRender/index.js +2 -2
  16. package/es/core/context/SxpDataSourceProvider.d.ts +6 -0
  17. package/es/core/context/SxpDataSourceProvider.js +18 -1
  18. package/es/core/hooks/useEventReport.d.ts +1 -1
  19. package/es/core/hooks/useEventReport.js +10 -3
  20. package/es/materials/sxp/cta/AniLink/index.js +2 -2
  21. package/es/materials/sxp/cta/AniLinkPopup/index.js +2 -2
  22. package/es/materials/sxp/popup/AppointForm/index.js +2 -2
  23. package/es/materials/sxp/popup/CommodityDetail/index.js +2 -2
  24. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -2
  25. package/es/materials/sxp/popup/CommodityList/index.js +3 -3
  26. package/es/materials/sxp/popup/Prompt/index.js +2 -2
  27. package/es/materials/sxp/template/Link/index.js +1 -3
  28. package/es/materials/sxp/template/components/EventProvider.js +3 -3
  29. package/lib/core/components/SxpPageRender/WaterFall/List.js +2 -2
  30. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +2 -2
  31. package/lib/core/components/SxpPageRender/index.js +2 -2
  32. package/lib/core/context/SxpDataSourceProvider.d.ts +6 -0
  33. package/lib/core/context/SxpDataSourceProvider.js +18 -1
  34. package/lib/core/hooks/useEventReport.d.ts +1 -1
  35. package/lib/core/hooks/useEventReport.js +10 -3
  36. package/lib/materials/sxp/cta/AniLink/index.js +2 -2
  37. package/lib/materials/sxp/cta/AniLinkPopup/index.js +2 -2
  38. package/lib/materials/sxp/popup/AppointForm/index.js +2 -2
  39. package/lib/materials/sxp/popup/CommodityDetail/index.js +2 -2
  40. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -2
  41. package/lib/materials/sxp/popup/CommodityList/index.js +3 -3
  42. package/lib/materials/sxp/popup/Prompt/index.js +2 -2
  43. package/lib/materials/sxp/template/Link/index.js +1 -3
  44. package/lib/materials/sxp/template/components/EventProvider.js +3 -3
  45. package/package.json +1 -1
@@ -5,15 +5,13 @@ const css_1 = require("@emotion/css");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const EventProvider_1 = tslib_1.__importDefault(require("../components/EventProvider"));
7
7
  const hooks_1 = require("../../../../core/hooks");
8
- const useEventReport_1 = require("../../../../core/hooks/useEventReport");
9
8
  const Img_1 = tslib_1.__importDefault(require("../components/Img"));
10
9
  const tool_1 = require("../../../../core/utils/tool");
11
10
  const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
12
11
  const Link = (_a) => {
13
12
  var _b, _c, _d, _e, _f, _g, _h, _j, _k;
14
13
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle, isActive } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle", "isActive"]);
15
- const { sxpParameter, bffEventReport } = (0, hooks_1.useSxpDataSource)();
16
- const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
14
+ const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
17
15
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
18
16
  const product = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
19
17
  const src = (_e = (_d = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
@@ -12,9 +12,9 @@ const EventProvider = (_a) => {
12
12
  const { setPopupDetailData, ctaEvent } = (0, hooks_1.useSxpDataSource)();
13
13
  const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
14
14
  const [element, setElement] = (0, react_1.useState)(null);
15
- const handleClick = (0, lodash_1.throttle)((event) => {
15
+ const handleClick = (0, lodash_1.throttle)((e) => {
16
16
  var _a, _b, _c, _d, _e, _f;
17
- event.preventDefault();
17
+ e.preventDefault();
18
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',
@@ -28,7 +28,7 @@ const EventProvider = (_a) => {
28
28
  if (jumpLink || link) {
29
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
30
  const product = ((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct) || multItem;
31
- jumpToWeb(rec, product, cta, index);
31
+ jumpToWeb(e, rec, product, cta, index);
32
32
  window.location.href = window.getJointUtmLink(jumpLink || link || '');
33
33
  }
34
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.10.2",
3
+ "version": "1.10.3",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",