pb-sxp-ui 1.3.0 → 1.3.2

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 (89) hide show
  1. package/dist/index.cjs +371 -198
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +371 -198
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +3 -3
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +3 -3
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +371 -198
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +3 -3
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/SxpPageRender/Modal/index.js +3 -2
  14. package/es/core/components/SxpPageRender/RenderCard.d.ts +3 -3
  15. package/es/core/components/SxpPageRender/RenderCard.js +17 -27
  16. package/es/core/components/SxpPageRender/WaterFall/List.js +28 -15
  17. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +27 -14
  18. package/es/core/components/SxpPageRender/index.js +41 -29
  19. package/es/core/context/EditorContext.js +2 -0
  20. package/es/core/context/EditorDataProvider.d.ts +3 -0
  21. package/es/core/context/EditorDataProvider.js +2 -1
  22. package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
  23. package/es/core/context/SxpDataSourceProvider.js +58 -23
  24. package/es/core/hooks/useEventReport.d.ts +1 -1
  25. package/es/core/hooks/useEventReport.js +2 -2
  26. package/es/core/utils/tool.d.ts +3 -3
  27. package/es/core/utils/tool.js +6 -6
  28. package/es/materials/sxp/HashTag/index.d.ts +3 -1
  29. package/es/materials/sxp/HashTag/settingRender.d.ts +13 -7
  30. package/es/materials/sxp/HashTag/settingRender.js +15 -0
  31. package/es/materials/sxp/cta/AniLink/settingRender.d.ts +5 -0
  32. package/es/materials/sxp/cta/AniLink/settingRender.js +4 -0
  33. package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +8 -5
  34. package/es/materials/sxp/popup/AppointForm/settingRender.js +12 -0
  35. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +3 -1
  36. package/es/materials/sxp/popup/CommodityDetail/index.js +34 -27
  37. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
  38. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +15 -0
  39. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +3 -1
  40. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +37 -30
  41. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +13 -0
  42. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +15 -0
  43. package/es/materials/sxp/popup/CommodityList/index.d.ts +3 -1
  44. package/es/materials/sxp/popup/CommodityList/index.js +11 -7
  45. package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +7 -0
  46. package/es/materials/sxp/popup/CommodityList/settingRender.js +10 -0
  47. package/es/materials/sxp/popup/Iframe/index.d.ts +1 -0
  48. package/es/materials/sxp/popup/Iframe/index.js +8 -7
  49. package/es/materials/sxp/popup/Prompt/settingRender.js +10 -0
  50. package/es/materials/sxp/template/Link/settingRender.js +5 -0
  51. package/lib/core/components/SxpPageRender/Modal/index.js +3 -2
  52. package/lib/core/components/SxpPageRender/RenderCard.d.ts +3 -3
  53. package/lib/core/components/SxpPageRender/RenderCard.js +16 -26
  54. package/lib/core/components/SxpPageRender/WaterFall/List.js +28 -15
  55. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +27 -14
  56. package/lib/core/components/SxpPageRender/index.js +40 -28
  57. package/lib/core/context/EditorContext.js +2 -0
  58. package/lib/core/context/EditorDataProvider.d.ts +3 -0
  59. package/lib/core/context/EditorDataProvider.js +2 -1
  60. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
  61. package/lib/core/context/SxpDataSourceProvider.js +58 -23
  62. package/lib/core/hooks/useEventReport.d.ts +1 -1
  63. package/lib/core/hooks/useEventReport.js +2 -2
  64. package/lib/core/utils/tool.d.ts +3 -3
  65. package/lib/core/utils/tool.js +6 -6
  66. package/lib/materials/sxp/HashTag/index.d.ts +3 -1
  67. package/lib/materials/sxp/HashTag/settingRender.d.ts +13 -7
  68. package/lib/materials/sxp/HashTag/settingRender.js +15 -0
  69. package/lib/materials/sxp/cta/AniLink/settingRender.d.ts +5 -0
  70. package/lib/materials/sxp/cta/AniLink/settingRender.js +4 -0
  71. package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +8 -5
  72. package/lib/materials/sxp/popup/AppointForm/settingRender.js +12 -0
  73. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +3 -1
  74. package/lib/materials/sxp/popup/CommodityDetail/index.js +34 -27
  75. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
  76. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +15 -0
  77. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +3 -1
  78. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +37 -30
  79. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +13 -0
  80. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +15 -0
  81. package/lib/materials/sxp/popup/CommodityList/index.d.ts +3 -1
  82. package/lib/materials/sxp/popup/CommodityList/index.js +11 -7
  83. package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +7 -0
  84. package/lib/materials/sxp/popup/CommodityList/settingRender.js +10 -0
  85. package/lib/materials/sxp/popup/Iframe/index.d.ts +1 -0
  86. package/lib/materials/sxp/popup/Iframe/index.js +8 -7
  87. package/lib/materials/sxp/popup/Prompt/settingRender.js +10 -0
  88. package/lib/materials/sxp/template/Link/settingRender.js +5 -0
  89. package/package.json +1 -1
@@ -4,7 +4,7 @@ import * as ReactDOM from 'react-dom';
4
4
  import { useEditor, useSxpDataSource } from '../../../../core/hooks';
5
5
  const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
6
6
  const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
7
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
7
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
8
8
  const touchRef = useRef(null);
9
9
  const fTouchRef = useRef(null);
10
10
  const touchMoveRef = useRef(null);
@@ -126,7 +126,8 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
126
126
  React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
127
127
  React.createElement("img", { src: (_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _t !== void 0 ? _t : closeIcon, alt: 'close', className: 'modal-icon' })),
128
128
  React.createElement("div", { ref: ref, style: {
129
- height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
129
+ height: (_x = (isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H) -
130
+ ((_w = (_v = (_u = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _u === void 0 ? void 0 : _u.props) === null || _v === void 0 ? void 0 : _v.popupBg) === null || _w === void 0 ? void 0 : _w.bottomMargin)) !== null && _x !== void 0 ? _x : 0,
130
131
  overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
131
132
  } }, children)))))), modalEleRef.current);
132
133
  };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { FC } from 'react';
2
2
  import './index.less';
3
3
  import { RecItemType } from './typing';
4
4
  interface IRenderCardProps {
@@ -9,5 +9,5 @@ interface IRenderCardProps {
9
9
  includesCtaType?: string[];
10
10
  isActive?: boolean;
11
11
  }
12
- declare const _default: React.NamedExoticComponent<IRenderCardProps>;
13
- export default _default;
12
+ declare const RenderCard: FC<IRenderCardProps>;
13
+ export default RenderCard;
@@ -1,4 +1,4 @@
1
- import React, { memo, useMemo } from 'react';
1
+ import React, { useCallback } from 'react';
2
2
  import './index.less';
3
3
  import withBindDataSource from '../../../core/hoc/withBindDataSource';
4
4
  import { useEditor } from '../../../core/hooks';
@@ -18,43 +18,33 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive }
18
18
  cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
19
19
  }
20
20
  const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
21
- const renderComp = useMemo(() => {
22
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
21
+ const renderComp = useCallback(() => {
22
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
23
23
  if (!(rec === null || rec === void 0 ? void 0 : rec.video))
24
24
  return null;
25
- let cta = null;
26
- if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
27
- cta = '多商品CTA';
28
- }
29
- else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
30
- cta = '商品CTA';
31
- }
32
- else {
33
- cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
34
- }
35
- if (includesCtaType && !(includesCtaType === null || includesCtaType === void 0 ? void 0 : includesCtaType.includes((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.type)))
25
+ if (includesCtaType && !(includesCtaType === null || includesCtaType === void 0 ? void 0 : includesCtaType.includes((_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type)))
36
26
  return;
37
- if (!includesCtaType && ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.category) === 'cta')
27
+ if (!includesCtaType && ((_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.category) === 'cta')
38
28
  return;
39
- if ((((_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.type) === 'CommodityDiro' && !((_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProduct)) ||
40
- (((_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.type) === 'Commodity' && !((_l = rec === null || rec === void 0 ? void 0 : rec.video) === null || _l === void 0 ? void 0 : _l.bindProduct)) ||
41
- (((_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.type) === 'CommodityDiroNew' && !((_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.bindProduct)) ||
42
- (((_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.type) === 'MultiCommodity' && !((_r = (_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.bindProducts) === null || _r === void 0 ? void 0 : _r.length)) ||
43
- (((_s = value === null || value === void 0 ? void 0 : value.item) === null || _s === void 0 ? void 0 : _s.type) === 'MultiCommodityDiro' && !((_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.bindProducts) === null || _u === void 0 ? void 0 : _u.length)) ||
44
- (((_v = value === null || value === void 0 ? void 0 : value.item) === null || _v === void 0 ? void 0 : _v.type) === 'MultiCommodityDiroNew' && !((_x = (_w = rec === null || rec === void 0 ? void 0 : rec.video) === null || _w === void 0 ? void 0 : _w.bindProducts) === null || _x === void 0 ? void 0 : _x.length))) {
29
+ if ((((_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.type) === 'CommodityDiro' && !((_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindProduct)) ||
30
+ (((_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.type) === 'Commodity' && !((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct)) ||
31
+ (((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.type) === 'CommodityDiroNew' && !((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.bindProduct)) ||
32
+ (((_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.type) === 'MultiCommodity' && !((_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.bindProducts) === null || _l === void 0 ? void 0 : _l.length)) ||
33
+ (((_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.type) === 'MultiCommodityDiro' && !((_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.bindProducts) === null || _p === void 0 ? void 0 : _p.length)) ||
34
+ (((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.type) === 'MultiCommodityDiroNew' && !((_s = (_r = rec === null || rec === void 0 ? void 0 : rec.video) === null || _r === void 0 ? void 0 : _r.bindProducts) === null || _s === void 0 ? void 0 : _s.length))) {
45
35
  return null;
46
36
  }
47
37
  if (value && resolver) {
48
- const t = resolver[(_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.type];
38
+ const t = resolver[(_t = value === null || value === void 0 ? void 0 : value.item) === null || _t === void 0 ? void 0 : _t.type];
49
39
  const Component = withBindDataSource(t);
50
- const defaulSetting = (_z = t === null || t === void 0 ? void 0 : t.extend) === null || _z === void 0 ? void 0 : _z.defaulSetting;
51
- const isExternalLink = ((_2 = (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.event) === null || _1 === void 0 ? void 0 : _1.onClick) === null || _2 === void 0 ? void 0 : _2.linkType) === 'externalLink';
52
- return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_4 = value === null || value === void 0 ? void 0 : value.item) === null || _4 === void 0 ? void 0 : _4.textStyle), bindDatas: (_6 = (_5 = value === null || value === void 0 ? void 0 : value.item) === null || _5 === void 0 ? void 0 : _5.bindDatas) !== null && _6 !== void 0 ? _6 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_7 = value === null || value === void 0 ? void 0 : value.item) === null || _7 === void 0 ? void 0 : _7.props, { event: ((_8 = value === null || value === void 0 ? void 0 : value.item) === null || _8 === void 0 ? void 0 : _8.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index, isActive: isActive })));
40
+ const defaulSetting = (_u = t === null || t === void 0 ? void 0 : t.extend) === null || _u === void 0 ? void 0 : _u.defaulSetting;
41
+ const isExternalLink = ((_x = (_w = (_v = value === null || value === void 0 ? void 0 : value.item) === null || _v === void 0 ? void 0 : _v.event) === null || _w === void 0 ? void 0 : _w.onClick) === null || _x === void 0 ? void 0 : _x.linkType) === 'externalLink';
42
+ return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.textStyle), bindDatas: (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.bindDatas) !== null && _1 !== void 0 ? _1 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.props, { event: ((_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index, isActive: isActive })));
53
43
  }
54
44
  else {
55
45
  return null;
56
46
  }
57
47
  }, [rec, resolver, tempMap, schema, value === null || value === void 0 ? void 0 : value.id, isActive]);
58
- return React.createElement(React.Fragment, null, renderComp);
48
+ return React.createElement(React.Fragment, null, renderComp());
59
49
  };
60
- export default memo(RenderCard);
50
+ export default RenderCard;
@@ -6,9 +6,11 @@ import previewData from './preview.json';
6
6
  import { useSxpDataSource } from '../../../../core/hooks';
7
7
  import { css } from '@emotion/css';
8
8
  import { setFontForText } from '../../../../core/utils/tool';
9
+ import { useEventReport } from '../../../../core/hooks/useEventReport';
9
10
  const WaterfallFlowItem = (props) => {
11
+ var _a;
10
12
  const { rec, index, list, reportTagsView, textStyles, space } = props;
11
- const { swiperRef, setRtcList, setOpenHashtag, bffEventReport, sxpParameter } = useSxpDataSource();
13
+ const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
12
14
  const [showVideo, setShowVideo] = useState(false);
13
15
  const imgDom = useRef(null);
14
16
  const ref = useRef(null);
@@ -35,16 +37,19 @@ const WaterfallFlowItem = (props) => {
35
37
  return ((_a = rec === null || rec === void 0 ? void 0 : rec.product) === null || _a === void 0 ? void 0 : _a.title) || ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) || null;
36
38
  }, [rec]);
37
39
  const priceText = useMemo(() => {
38
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
39
- if (((_a = rec === null || rec === void 0 ? void 0 : rec.product) === null || _a === void 0 ? void 0 : _a.currency) && ((_b = rec === null || rec === void 0 ? void 0 : rec.product) === null || _b === void 0 ? void 0 : _b.price)) {
40
- return `${(_f = (_e = (_d = (_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.currency) === null || _d === void 0 ? void 0 : _d.split('-')[1]) === null || _e === void 0 ? void 0 : _e.toUpperCase()) !== null && _f !== void 0 ? _f : ''}${(_j = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.product) === null || _g === void 0 ? void 0 : _g.price) === null || _h === void 0 ? void 0 : _h.toLocaleString('zh', {
41
- minimumFractionDigits: 0
42
- })) !== null && _j !== void 0 ? _j : ''}`;
40
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
41
+ const isToLocStr = ((_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
42
+ if (((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.currency) && ((_d = rec === null || rec === void 0 ? void 0 : rec.product) === null || _d === void 0 ? void 0 : _d.price)) {
43
+ return `${(_h = (_g = (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.product) === null || _e === void 0 ? void 0 : _e.currency) === null || _f === void 0 ? void 0 : _f.split('-')[1]) === null || _g === void 0 ? void 0 : _g.toUpperCase()) !== null && _h !== void 0 ? _h : ''}${isToLocStr
44
+ ? (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.product) === null || _j === void 0 ? void 0 : _j.price) === null || _k === void 0 ? void 0 : _k.toLocaleString('zh', {
45
+ minimumFractionDigits: 0
46
+ })) !== null && _l !== void 0 ? _l : ''
47
+ : (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
43
48
  }
44
49
  else {
45
50
  return null;
46
51
  }
47
- }, [rec]);
52
+ }, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
48
53
  useEffect(() => {
49
54
  const observer = new IntersectionObserver((entries) => {
50
55
  entries.forEach((entry) => {
@@ -121,29 +126,35 @@ const WaterfallFlowItem = (props) => {
121
126
  export default function WaterfallList(_a) {
122
127
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
123
128
  var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
124
- const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
129
+ const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
130
+ const { jumpToWeb } = useEventReport();
125
131
  const [list, setList] = useState();
126
132
  const [data, setData] = useState();
127
133
  const [isLoadingData, setIsLoadingData] = useState(false);
128
134
  const containerRef = useRef(null);
129
135
  const [isLoadMore, setIsLoadMore] = useState(false);
130
136
  const loadMoreData = useCallback(() => {
131
- var _a, _b, _c, _d;
132
137
  if (isLoadMore)
133
138
  return;
134
139
  setIsLoadMore(true);
135
140
  waterFallData &&
136
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_b = (_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.itemId) && { productFilter: (_d = (_c = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.itemId })), ((waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId) && { contentFilter: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId }))).then((res) => {
141
+ (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
142
+ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag
143
+ }).then((res) => {
137
144
  var _a;
138
145
  setList(list === null || list === void 0 ? void 0 : list.concat((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []));
139
146
  setIsLoadMore(false);
140
147
  }));
141
148
  }, [waterFallData, getRecommendVideos, list, isLoadMore]);
142
149
  useEffect(() => {
143
- var _a, _b, _c, _d, _e, _f;
150
+ var _a, _b;
144
151
  setIsLoadingData(true);
145
152
  waterFallData &&
146
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_b = (_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.itemId) && { productFilter: (_d = (_c = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.itemId })), ((waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId) && { contentFilter: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId })), { defaultSize: hashTagSize, maxSize: hashTagSize })).then((res) => {
153
+ (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
154
+ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
155
+ defaultSize: hashTagSize,
156
+ maxSize: hashTagSize
157
+ }).then((res) => {
147
158
  var _a, _b;
148
159
  setData(res);
149
160
  setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
@@ -152,15 +163,17 @@ export default function WaterfallList(_a) {
152
163
  if (isOpenHashTag) {
153
164
  const res = previewData;
154
165
  setData(res);
155
- setList((_f = (_e = res === null || res === void 0 ? void 0 : res.recList) === null || _e === void 0 ? void 0 : _e.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _f !== void 0 ? _f : []);
166
+ setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
156
167
  setIsLoadingData(false);
157
168
  }
158
169
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
159
170
  const handleClickLink = () => {
160
- var _a, _b;
171
+ var _a, _b, _c, _d, _e;
161
172
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
162
173
  reportTagsView();
163
- window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
174
+ const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
175
+ jumpToWeb(rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
176
+ window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
164
177
  }
165
178
  };
166
179
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -6,7 +6,9 @@ import previewData from './preview.json';
6
6
  import FormatImage from '../FormatImage';
7
7
  import { css } from '@emotion/css';
8
8
  import { setFontForText } from '../../../../core/utils/tool';
9
+ import { useEventReport } from '../../../../core/hooks/useEventReport';
9
10
  const WaterfallFlowItem = (props) => {
11
+ var _a;
10
12
  const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
11
13
  const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
12
14
  const [showVideo, setShowVideo] = useState(false);
@@ -58,16 +60,19 @@ const WaterfallFlowItem = (props) => {
58
60
  }
59
61
  }, [top, showBorder]);
60
62
  const priceText = useMemo(() => {
61
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
62
- if (((_a = rec === null || rec === void 0 ? void 0 : rec.product) === null || _a === void 0 ? void 0 : _a.currency) && ((_b = rec === null || rec === void 0 ? void 0 : rec.product) === null || _b === void 0 ? void 0 : _b.price)) {
63
- return `${(_f = (_e = (_d = (_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.currency) === null || _d === void 0 ? void 0 : _d.split('-')[1]) === null || _e === void 0 ? void 0 : _e.toUpperCase()) !== null && _f !== void 0 ? _f : ''}${(_j = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.product) === null || _g === void 0 ? void 0 : _g.price) === null || _h === void 0 ? void 0 : _h.toLocaleString('zh', {
64
- minimumFractionDigits: 0
65
- })) !== null && _j !== void 0 ? _j : ''}`;
63
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
64
+ const isToLocStr = ((_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
65
+ if (((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.currency) && ((_d = rec === null || rec === void 0 ? void 0 : rec.product) === null || _d === void 0 ? void 0 : _d.price)) {
66
+ return `${(_h = (_g = (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.product) === null || _e === void 0 ? void 0 : _e.currency) === null || _f === void 0 ? void 0 : _f.split('-')[1]) === null || _g === void 0 ? void 0 : _g.toUpperCase()) !== null && _h !== void 0 ? _h : ''}${isToLocStr
67
+ ? (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.product) === null || _j === void 0 ? void 0 : _j.price) === null || _k === void 0 ? void 0 : _k.toLocaleString('zh', {
68
+ minimumFractionDigits: 0
69
+ })) !== null && _l !== void 0 ? _l : ''
70
+ : (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
66
71
  }
67
72
  else {
68
73
  return null;
69
74
  }
70
- }, [rec]);
75
+ }, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
71
76
  useEffect(() => {
72
77
  if (imgDom.current === null || src === '') {
73
78
  return;
@@ -113,7 +118,8 @@ const WaterfallFlowItem = (props) => {
113
118
  export default function WaterfallList(_a) {
114
119
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
115
120
  var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
116
- const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
121
+ const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
122
+ const { jumpToWeb } = useEventReport();
117
123
  const scrollParent = useRef(null);
118
124
  const [scrollTop, setScrollTop] = useState(0);
119
125
  const [data, setData] = useState();
@@ -207,10 +213,14 @@ export default function WaterfallList(_a) {
207
213
  styleListRef.current = getStyleList();
208
214
  }, [unitWidth, rowsNum, list]);
209
215
  useEffect(() => {
210
- var _a, _b, _c, _d, _e, _f;
216
+ var _a, _b;
211
217
  setIsLoadingData(true);
212
218
  waterFallData &&
213
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag, defaultSize: hashTagSize, maxSize: hashTagSize }, (((_b = (_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.itemId) && { productFilter: (_d = (_c = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.itemId })), ((waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId) && { contentFilter: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId }))).then((res) => {
219
+ (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
220
+ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
221
+ defaultSize: hashTagSize,
222
+ maxSize: hashTagSize
223
+ }).then((res) => {
214
224
  var _a, _b;
215
225
  setData(res);
216
226
  setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
@@ -219,7 +229,7 @@ export default function WaterfallList(_a) {
219
229
  if (isOpenHashTag) {
220
230
  const res = previewData;
221
231
  setData(res);
222
- setList((_f = (_e = res === null || res === void 0 ? void 0 : res.recList) === null || _e === void 0 ? void 0 : _e.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _f !== void 0 ? _f : []);
232
+ setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
223
233
  setIsLoadingData(false);
224
234
  }
225
235
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
@@ -244,10 +254,11 @@ export default function WaterfallList(_a) {
244
254
  };
245
255
  }, [onResize]);
246
256
  const loadMoreData = useCallback(() => {
247
- var _a, _b, _c, _d;
248
257
  setIsLoadingData(true);
249
258
  waterFallData &&
250
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_b = (_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _a === void 0 ? void 0 : _a.product) === null || _b === void 0 ? void 0 : _b.itemId) && { productFilter: (_d = (_c = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec) === null || _c === void 0 ? void 0 : _c.product) === null || _d === void 0 ? void 0 : _d.itemId })), ((waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId) && { contentFilter: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId }))).then((res) => {
259
+ (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
260
+ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag
261
+ }).then((res) => {
251
262
  var _a, _b;
252
263
  setList(list === null || list === void 0 ? void 0 : list.concat((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => !(item === null || item === void 0 ? void 0 : item.video))) !== null && _b !== void 0 ? _b : []));
253
264
  setIsLoadingData(false);
@@ -265,10 +276,12 @@ export default function WaterfallList(_a) {
265
276
  };
266
277
  }, [onScroll, scrollParent]);
267
278
  const handleClickLink = () => {
268
- var _a, _b;
279
+ var _a, _b, _c, _d, _e;
269
280
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
270
281
  reportTagsView();
271
- window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
282
+ const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
283
+ jumpToWeb(rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
284
+ window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
272
285
  }
273
286
  };
274
287
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -20,7 +20,7 @@ import './index.less';
20
20
  import { useEventReport } from '../../../core/hooks/useEventReport';
21
21
  import withBindDataSource from '../../../core/hoc/withBindDataSource';
22
22
  import Tagbar from './Tagbar';
23
- import { getFeUserId, getSlideSkipState, setSlideSkipState } from '../../../core/utils/localStore';
23
+ import { getFeUserId, getSlideSkipState } from '../../../core/utils/localStore';
24
24
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
25
25
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
26
26
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
@@ -34,9 +34,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
34
34
  const [isShowMore, setIsShowMore] = useState(false);
35
35
  const [isReload, setIsReload] = useState(new Date().getTime());
36
36
  const skipLinkRef = useRef(false);
37
- const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
38
- const { backMainFeed } = useEventReport();
39
- const { productView } = useEventReport();
37
+ const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor } = useSxpDataSource();
38
+ const { backMainFeed, productView, jumpToWeb } = useEventReport();
40
39
  const isShowFingerTip = useMemo(() => {
41
40
  return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
42
41
  }, [data, loading, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip]);
@@ -65,6 +64,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
65
64
  }, [data.length, bffFbReport, h5EnterLink]);
66
65
  useEffect(() => {
67
66
  var _a;
67
+ if (!ctaType || (ctaType === null || ctaType === void 0 ? void 0 : ctaType.length) < 1)
68
+ return;
68
69
  const index = (data === null || data === void 0 ? void 0 : data.findIndex((item) => {
69
70
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
70
71
  const ctaType0 = ctaType === null || ctaType === void 0 ? void 0 : ctaType[0];
@@ -78,8 +79,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
78
79
  return ((_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.bindCta) === null || _f === void 0 ? void 0 : _f.itemId) === ctaType0 && (((_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.url) || ((_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.imgUrls) === null || _j === void 0 ? void 0 : _j.length));
79
80
  }
80
81
  })) || 0;
81
- (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
82
- }, [ctaType, swiperRef]);
82
+ if (index !== -1)
83
+ (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
84
+ }, [data, ctaType, swiperRef]);
83
85
  useEffect(() => {
84
86
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
85
87
  const visibleChange = () => {
@@ -176,15 +178,39 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
176
178
  const height = useMemo(() => {
177
179
  return containerHeight - minusHeight - tagHeight;
178
180
  }, [globalConfig, containerHeight, tagHeight]);
181
+ const visList = useMemo(() => {
182
+ var _a;
183
+ const list = activeIndex === 0 && !waterFallData && !isEditor
184
+ ? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
185
+ : data === null || data === void 0 ? void 0 : data.map((item, index) => {
186
+ if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
187
+ return item;
188
+ }
189
+ else {
190
+ return null;
191
+ }
192
+ });
193
+ return !waterFallData ? list.concat([{ loading: true }]) : list;
194
+ }, [data, activeIndex, waterFallData, isEditor]);
179
195
  const renderLogo = useMemo(() => {
180
- var _a, _b;
196
+ var _a, _b, _c, _d;
181
197
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
182
198
  const link = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoBar) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.value;
183
- return (React.createElement("div", Object.assign({ className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } }, (link && { onClick: () => new Function(link)() })),
199
+ const isExternalLink = ((_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoBar) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
200
+ const rec = visList[activeIndex];
201
+ return (React.createElement("div", Object.assign({ className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } }, (link && {
202
+ onClick: () => {
203
+ var _a, _b, _c, _d;
204
+ if (isExternalLink) {
205
+ jumpToWeb(rec, (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindCta, activeIndex, ((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.traceInfo) || ((_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo));
206
+ }
207
+ new Function(link)();
208
+ }
209
+ })),
184
210
  React.createElement("img", { src: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl, alt: 'logo' })));
185
211
  }
186
212
  return null;
187
- }, [globalConfig]);
213
+ }, [globalConfig, activeIndex, visList]);
188
214
  const renderContent = useCallback((rec, index) => {
189
215
  var _a, _b, _c, _d;
190
216
  if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
@@ -321,7 +347,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
321
347
  traceInfo: (_u = (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : (_t = item === null || item === void 0 ? void 0 : item.product) === null || _t === void 0 ? void 0 : _t.traceInfo) !== null && _u !== void 0 ? _u : ''
322
348
  }
323
349
  });
324
- setSlideSkipState();
325
350
  skipLinkRef.current = true;
326
351
  window.location.href = window.getJointUtmLink(link);
327
352
  }
@@ -403,20 +428,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
403
428
  });
404
429
  }
405
430
  };
406
- const visList = useMemo(() => {
407
- var _a;
408
- const list = activeIndex === 0 && !waterFallData
409
- ? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
410
- : data === null || data === void 0 ? void 0 : data.map((item, index) => {
411
- if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
412
- return item;
413
- }
414
- else {
415
- return null;
416
- }
417
- });
418
- return !waterFallData ? list.concat([{ loading: true }]) : list;
419
- }, [data, activeIndex, waterFallData]);
420
431
  const renderToggleButton = useCallback((visible) => {
421
432
  var _a, _b, _c, _d, _e, _f;
422
433
  if (!visible)
@@ -425,6 +436,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
425
436
  position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
426
437
  visibility: ((_b = (_a = visList === null || visList === void 0 ? void 0 : visList[activeIndex]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.url) ? 'visible' : 'hidden',
427
438
  zIndex: 999,
439
+ transform: 'translate3d(0px,0px,0px)',
428
440
  [(_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _c !== void 0 ? _c : 'right']: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _d !== void 0 ? _d : 0,
429
441
  [(_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _e !== void 0 ? _e : 'bottom']: (_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _f !== void 0 ? _f : 23
430
442
  }, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted })));
@@ -443,10 +455,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
443
455
  alignItems: 'center'
444
456
  } },
445
457
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
446
- renderContent(rec, index),
447
- renderBottom(rec, index),
448
458
  renderLikeButton(rec, index, !(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
449
- renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))))))));
459
+ renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
460
+ renderBottom(rec, index),
461
+ renderContent(rec, index)))))));
450
462
  });
451
463
  }, [
452
464
  containerWidth,
@@ -481,9 +493,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
481
493
  if (openHashtag)
482
494
  return;
483
495
  handleScrollEvent(swiper);
484
- if (waterFallData)
496
+ if (waterFallData || isEditor)
485
497
  return;
486
- if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 2 >= (data === null || data === void 0 ? void 0 : data.length)) {
498
+ if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
487
499
  if (!isLoadMore) {
488
500
  setIsLoadMore(true);
489
501
  loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(Math.ceil(activeIndex / 10) + 1).then(() => {
@@ -2,6 +2,7 @@ import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useStat
2
2
  import { cloneDeep } from 'lodash';
3
3
  import DataSourceProvider from './DataSourceProvider';
4
4
  import { uuid } from '../../core/utils/tool';
5
+ import { setSlideSkipState } from '../utils/localStore';
5
6
  const item = {
6
7
  id: uuid(6, 10),
7
8
  item: {
@@ -75,6 +76,7 @@ const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSo
75
76
  });
76
77
  typeof window !== 'undefined' &&
77
78
  (window.getJointUtmLink = (url) => {
79
+ setSlideSkipState();
78
80
  if ((url === null || url === void 0 ? void 0 : url.indexOf('?')) !== -1) {
79
81
  return url + (utmVal ? '&' + utmVal : '');
80
82
  }
@@ -21,6 +21,9 @@ interface IEditorDataContext {
21
21
  openConsent?: boolean;
22
22
  setOpenConsent?: React.Dispatch<React.SetStateAction<boolean>>;
23
23
  sxpFontLinks?: any[];
24
+ utmParameter?: {
25
+ channels: string[];
26
+ };
24
27
  }
25
28
  interface IEditorProviderProps {
26
29
  data?: any;
@@ -25,7 +25,8 @@ const EditorDataProvider = ({ children, data }) => {
25
25
  setOpenHashtag,
26
26
  openConsent,
27
27
  setOpenConsent,
28
- sxpFontLinks: data === null || data === void 0 ? void 0 : data.sxpFontLinks
28
+ sxpFontLinks: data === null || data === void 0 ? void 0 : data.sxpFontLinks,
29
+ utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter
29
30
  } }, children));
30
31
  };
31
32
  export function useEditorDataProvider() {
@@ -81,6 +81,7 @@ export interface ISxpDataSourceContext {
81
81
  globalConfig?: ISxpPageRenderProps['globalConfig'];
82
82
  popupCurTimeRef?: any;
83
83
  checkCommodityIndexRef?: any;
84
+ isEditor?: boolean;
84
85
  }
85
86
  export declare const SxpDataSourceContext: React.Context<ISxpDataSourceContext>;
86
87
  export interface SxpDataSourceProviderProps {