pb-sxp-ui 1.2.10 → 1.3.1

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 (100) hide show
  1. package/dist/index.cjs +700 -284
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +62 -2
  4. package/dist/index.js +700 -284
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -3
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -3
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +700 -284
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageRender/FormatImage.js +1 -1
  15. package/es/core/components/SxpPageRender/Modal/index.js +34 -20
  16. package/es/core/components/SxpPageRender/Popup/index.js +2 -2
  17. package/es/core/components/SxpPageRender/ToggleButton/index.js +4 -1
  18. package/es/core/components/SxpPageRender/WaterFall/List.js +13 -18
  19. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +12 -17
  20. package/es/core/components/SxpPageRender/index.d.ts +6 -1
  21. package/es/core/components/SxpPageRender/index.js +73 -42
  22. package/es/core/components/SxpPageRender/typing.d.ts +2 -0
  23. package/es/core/context/EditorContext.js +2 -0
  24. package/es/core/context/SxpDataSourceProvider.d.ts +3 -2
  25. package/es/core/context/SxpDataSourceProvider.js +53 -33
  26. package/es/core/hooks/useEventReport.d.ts +1 -1
  27. package/es/core/hooks/useEventReport.js +10 -9
  28. package/es/core/utils/tool.d.ts +5 -1
  29. package/es/core/utils/tool.js +69 -1
  30. package/es/materials/sxp/popup/AppointForm/settingRender.js +15 -0
  31. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +13 -2
  32. package/es/materials/sxp/popup/CommodityDetail/index.js +60 -34
  33. package/es/materials/sxp/popup/CommodityDetail/material.js +4 -0
  34. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -2
  35. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +52 -0
  36. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -2
  37. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +85 -51
  38. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +4 -0
  39. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +28 -2
  40. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +52 -0
  41. package/es/materials/sxp/popup/CommodityList/settingRender.js +15 -0
  42. package/es/materials/sxp/popup/Iframe/index.d.ts +16 -0
  43. package/es/materials/sxp/popup/Iframe/index.js +18 -0
  44. package/es/materials/sxp/popup/Iframe/material.d.ts +2 -0
  45. package/es/materials/sxp/popup/Iframe/material.js +21 -0
  46. package/es/materials/sxp/popup/Iframe/settingRender.d.ts +9 -0
  47. package/es/materials/sxp/popup/Iframe/settingRender.js +12 -0
  48. package/es/materials/sxp/popup/Prompt/settingRender.js +16 -1
  49. package/es/materials/sxp/popup/index.d.ts +1 -0
  50. package/es/materials/sxp/popup/index.js +1 -0
  51. package/es/materials/sxp/template/Link/index.js +5 -11
  52. package/es/materials/sxp/template/Link/interactionRender.d.ts +8 -0
  53. package/es/materials/sxp/template/Link/interactionRender.js +11 -0
  54. package/es/materials/sxp/template/Link/material.js +3 -1
  55. package/es/materials/sxp/template/components/EventProvider.d.ts +3 -2
  56. package/es/materials/sxp/template/components/EventProvider.js +3 -3
  57. package/lib/core/components/SxpPageRender/FormatImage.js +1 -1
  58. package/lib/core/components/SxpPageRender/Modal/index.js +34 -20
  59. package/lib/core/components/SxpPageRender/Popup/index.js +2 -2
  60. package/lib/core/components/SxpPageRender/ToggleButton/index.js +3 -0
  61. package/lib/core/components/SxpPageRender/WaterFall/List.js +13 -18
  62. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +12 -17
  63. package/lib/core/components/SxpPageRender/index.d.ts +6 -1
  64. package/lib/core/components/SxpPageRender/index.js +72 -41
  65. package/lib/core/components/SxpPageRender/typing.d.ts +2 -0
  66. package/lib/core/context/EditorContext.js +2 -0
  67. package/lib/core/context/SxpDataSourceProvider.d.ts +3 -2
  68. package/lib/core/context/SxpDataSourceProvider.js +53 -33
  69. package/lib/core/hooks/useEventReport.d.ts +1 -1
  70. package/lib/core/hooks/useEventReport.js +10 -9
  71. package/lib/core/utils/tool.d.ts +5 -1
  72. package/lib/core/utils/tool.js +73 -1
  73. package/lib/materials/sxp/popup/AppointForm/settingRender.js +15 -0
  74. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +13 -2
  75. package/lib/materials/sxp/popup/CommodityDetail/index.js +60 -34
  76. package/lib/materials/sxp/popup/CommodityDetail/material.js +4 -0
  77. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +28 -2
  78. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +52 -0
  79. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -2
  80. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +85 -51
  81. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +4 -0
  82. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +28 -2
  83. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +52 -0
  84. package/lib/materials/sxp/popup/CommodityList/settingRender.js +15 -0
  85. package/lib/materials/sxp/popup/Iframe/index.d.ts +16 -0
  86. package/lib/materials/sxp/popup/Iframe/index.js +20 -0
  87. package/lib/materials/sxp/popup/Iframe/material.d.ts +2 -0
  88. package/lib/materials/sxp/popup/Iframe/material.js +25 -0
  89. package/lib/materials/sxp/popup/Iframe/settingRender.d.ts +9 -0
  90. package/lib/materials/sxp/popup/Iframe/settingRender.js +14 -0
  91. package/lib/materials/sxp/popup/Prompt/settingRender.js +16 -1
  92. package/lib/materials/sxp/popup/index.d.ts +1 -0
  93. package/lib/materials/sxp/popup/index.js +1 -0
  94. package/lib/materials/sxp/template/Link/index.js +5 -11
  95. package/lib/materials/sxp/template/Link/interactionRender.d.ts +8 -0
  96. package/lib/materials/sxp/template/Link/interactionRender.js +13 -0
  97. package/lib/materials/sxp/template/Link/material.js +3 -1
  98. package/lib/materials/sxp/template/components/EventProvider.d.ts +3 -2
  99. package/lib/materials/sxp/template/components/EventProvider.js +3 -3
  100. package/package.json +1 -1
@@ -17,7 +17,7 @@ const FormatImage = forwardRef((props, ref) => {
17
17
  }, [src]);
18
18
  useEffect(() => {
19
19
  const onShow = () => {
20
- if (src && !visible) {
20
+ if (src && !visible && imgRef.current) {
21
21
  imgRef.current.src = '';
22
22
  imgRef.current.src = src;
23
23
  }
@@ -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;
7
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
8
8
  const touchRef = useRef(null);
9
9
  const fTouchRef = useRef(null);
10
10
  const touchMoveRef = useRef(null);
@@ -31,12 +31,16 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
31
31
  const isOpen = useMemo(() => {
32
32
  return ((popup === null || popup === void 0 ? void 0 : popup.id) && (popup === null || popup === void 0 ? void 0 : popup.id) !== '') || visible;
33
33
  }, [visible, popup]);
34
- const isScrollFullScreen = useMemo(() => {
35
- var _a, _b, _c, _d, _e;
34
+ const getPopupById = useMemo(() => {
35
+ var _a, _b, _c;
36
36
  const schemaData = schema !== null && schema !== void 0 ? schema : _schema;
37
37
  const value = (_c = (_b = (_a = schemaData === null || schemaData === void 0 ? void 0 : schemaData.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.find((value) => (value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id));
38
- return ((_e = (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.event) === null || _e === void 0 ? void 0 : _e.isScrollFullScreen) || false;
38
+ return value;
39
39
  }, [popup, schema, _schema]);
40
+ const isScrollFullScreen = useMemo(() => {
41
+ var _a, _b;
42
+ return ((_b = (_a = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _a === void 0 ? void 0 : _a.event) === null || _b === void 0 ? void 0 : _b.isScrollFullScreen) || false;
43
+ }, [getPopupById]);
40
44
  useEffect(() => {
41
45
  if (isOpen) {
42
46
  setIsShow(true);
@@ -100,21 +104,31 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
100
104
  touchMoveRef.current = false;
101
105
  };
102
106
  return ReactDOM.createPortal(React.createElement(React.Fragment, null, isShow && (React.createElement("div", { className: 'modal-bg', style: Object.assign({ display: 'flex', backgroundColor: isOpen ? 'rgba(0, 0, 0, 0.7)' : 'rgba(0, 0, 0, 0)' }, modalStyle), onClick: handleClose },
103
- React.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: Object.assign({ padding, animationDuration: ((_a = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _a !== void 0 ? _a : 0) / 1000 + 's' }, (isScrollFullScreen && {
104
- transform: `translateY(${modalTrans}px)`
105
- })), onClick: (e) => {
106
- e.stopPropagation();
107
- e.preventDefault();
108
- } }, (isScrollFullScreen && {
109
- onTouchMove: handleTouchMove,
110
- onTouchStart: handleTouchStart,
111
- onTouchEnd: handleTouchEnd
112
- })),
113
- React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
114
- React.createElement("img", { src: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _b !== void 0 ? _b : closeIcon, alt: 'close', className: 'modal-icon' })),
115
- React.createElement("div", { ref: ref, style: {
116
- height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
117
- overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
118
- } }, children))))), modalEleRef.current);
107
+ React.createElement("div", { style: {
108
+ position: 'relative',
109
+ left: `${(_d = (_c = (_b = (_a = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.popupBg) === null || _c === void 0 ? void 0 : _c.horizontalMargin) !== null && _d !== void 0 ? _d : 0}px`,
110
+ right: `${(_h = (_g = (_f = (_e = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _e === void 0 ? void 0 : _e.props) === null || _f === void 0 ? void 0 : _f.popupBg) === null || _g === void 0 ? void 0 : _g.horizontalMargin) !== null && _h !== void 0 ? _h : 0}px`,
111
+ bottom: `${(_m = (_l = (_k = (_j = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _j === void 0 ? void 0 : _j.props) === null || _k === void 0 ? void 0 : _k.popupBg) === null || _l === void 0 ? void 0 : _l.bottomMargin) !== null && _m !== void 0 ? _m : 0}px`,
112
+ overflow: 'hidden',
113
+ width: `calc(100% - ${((_r = (_q = (_p = (_o = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _o === void 0 ? void 0 : _o.props) === null || _p === void 0 ? void 0 : _p.popupBg) === null || _q === void 0 ? void 0 : _q.horizontalMargin) !== null && _r !== void 0 ? _r : 0) * 2}px)`,
114
+ height: '100%'
115
+ } },
116
+ React.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: Object.assign({ padding, animationDuration: ((_s = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _s !== void 0 ? _s : 0) / 1000 + 's' }, (isScrollFullScreen && {
117
+ transform: `translateY(${modalTrans}px)`
118
+ })), onClick: (e) => {
119
+ e.stopPropagation();
120
+ e.preventDefault();
121
+ } }, (isScrollFullScreen && {
122
+ onTouchMove: handleTouchMove,
123
+ onTouchStart: handleTouchStart,
124
+ onTouchEnd: handleTouchEnd
125
+ })),
126
+ React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
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
+ React.createElement("div", { ref: ref, style: {
129
+ height: (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),
131
+ overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
132
+ } }, children)))))), modalEleRef.current);
119
133
  };
120
134
  export default memo(Modal);
@@ -58,14 +58,14 @@ const Popup = () => {
58
58
  const renderPopupDetail = useMemo(() => {
59
59
  var _a, _b, _c;
60
60
  return (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.map((value, index) => {
61
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
61
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
62
62
  if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
63
63
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
64
64
  const Component = withBindDataSource(t);
65
65
  const isExternalLink = ((_d = (_c = (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.event) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
66
66
  const isPopup = ((_g = (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.event) === null || _f === void 0 ? void 0 : _f.onClick) === null || _g === void 0 ? void 0 : _g.linkType) === 'popup';
67
67
  const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
68
- return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw', height: '100%' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
68
+ return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { height: '100%' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.textStyle), bindDatas: (_m = (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.bindDatas) !== null && _m !== void 0 ? _m : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_o = value === null || value === void 0 ? void 0 : value.item) === null || _o === void 0 ? void 0 : _o.props, { event: ((_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
69
69
  }
70
70
  else {
71
71
  return React.createElement(React.Fragment, null);
@@ -1,4 +1,4 @@
1
- import React, { memo, useState } from 'react';
1
+ import React, { memo, useEffect, useState } from 'react';
2
2
  const ToggleButton = ({ defaultValue, activeIcon, unactiveIcon, onChange, style }) => {
3
3
  const [isTrue, setIsTure] = useState(defaultValue);
4
4
  const handleClick = (e) => {
@@ -7,6 +7,9 @@ const ToggleButton = ({ defaultValue, activeIcon, unactiveIcon, onChange, style
7
7
  setIsTure(result);
8
8
  onChange === null || onChange === void 0 ? void 0 : onChange(result);
9
9
  };
10
+ useEffect(() => {
11
+ setIsTure(defaultValue);
12
+ }, [defaultValue]);
10
13
  return (React.createElement("button", { style: style, "aria-label": 'toggle button', className: 'pb-toggle-button', onClick: handleClick },
11
14
  React.createElement("img", { className: 'pb-toggle-button-icon', alt: 'toggle image', src: isTrue ? activeIcon : unactiveIcon })));
12
15
  };
@@ -6,9 +6,10 @@ 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) => {
10
11
  const { rec, index, list, reportTagsView, textStyles, space } = props;
11
- const { swiperRef, setRtcList, setOpenHashtag, bffEventReport, sxpParameter } = useSxpDataSource();
12
+ const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
12
13
  const [showVideo, setShowVideo] = useState(false);
13
14
  const imgDom = useRef(null);
14
15
  const ref = useRef(null);
@@ -121,38 +122,30 @@ const WaterfallFlowItem = (props) => {
121
122
  export default function WaterfallList(_a) {
122
123
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
123
124
  var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
124
- const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
125
+ const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
126
+ const { jumpToWeb } = useEventReport();
125
127
  const [list, setList] = useState();
126
128
  const [data, setData] = useState();
127
129
  const [isLoadingData, setIsLoadingData] = useState(false);
128
130
  const containerRef = useRef(null);
129
131
  const [isLoadMore, setIsLoadMore] = useState(false);
130
132
  const loadMoreData = useCallback(() => {
133
+ var _a, _b, _c, _d;
131
134
  if (isLoadMore)
132
135
  return;
133
136
  setIsLoadMore(true);
134
137
  waterFallData &&
135
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
136
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
137
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
138
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
139
- }).then((res) => {
138
+ (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) => {
140
139
  var _a;
141
140
  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 : []));
142
141
  setIsLoadMore(false);
143
142
  }));
144
143
  }, [waterFallData, getRecommendVideos, list, isLoadMore]);
145
144
  useEffect(() => {
146
- var _a, _b;
145
+ var _a, _b, _c, _d, _e, _f;
147
146
  setIsLoadingData(true);
148
147
  waterFallData &&
149
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
150
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
151
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
152
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
153
- defaultSize: hashTagSize,
154
- maxSize: hashTagSize
155
- }).then((res) => {
148
+ (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) => {
156
149
  var _a, _b;
157
150
  setData(res);
158
151
  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 : []);
@@ -161,15 +154,17 @@ export default function WaterfallList(_a) {
161
154
  if (isOpenHashTag) {
162
155
  const res = previewData;
163
156
  setData(res);
164
- 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 : []);
157
+ 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 : []);
165
158
  setIsLoadingData(false);
166
159
  }
167
160
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
168
161
  const handleClickLink = () => {
169
- var _a, _b;
162
+ var _a, _b, _c, _d, _e;
170
163
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
171
164
  reportTagsView();
172
- window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
165
+ const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
166
+ 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);
167
+ window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
173
168
  }
174
169
  };
175
170
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -6,6 +6,7 @@ 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) => {
10
11
  const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
11
12
  const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
@@ -113,7 +114,8 @@ const WaterfallFlowItem = (props) => {
113
114
  export default function WaterfallList(_a) {
114
115
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
115
116
  var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
116
- const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
117
+ const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
118
+ const { jumpToWeb } = useEventReport();
117
119
  const scrollParent = useRef(null);
118
120
  const [scrollTop, setScrollTop] = useState(0);
119
121
  const [data, setData] = useState();
@@ -207,16 +209,10 @@ export default function WaterfallList(_a) {
207
209
  styleListRef.current = getStyleList();
208
210
  }, [unitWidth, rowsNum, list]);
209
211
  useEffect(() => {
210
- var _a, _b;
212
+ var _a, _b, _c, _d, _e, _f;
211
213
  setIsLoadingData(true);
212
214
  waterFallData &&
213
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
214
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
215
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
216
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
217
- defaultSize: hashTagSize,
218
- maxSize: hashTagSize
219
- }).then((res) => {
215
+ (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) => {
220
216
  var _a, _b;
221
217
  setData(res);
222
218
  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 : []);
@@ -225,7 +221,7 @@ export default function WaterfallList(_a) {
225
221
  if (isOpenHashTag) {
226
222
  const res = previewData;
227
223
  setData(res);
228
- 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 : []);
224
+ 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 : []);
229
225
  setIsLoadingData(false);
230
226
  }
231
227
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
@@ -250,13 +246,10 @@ export default function WaterfallList(_a) {
250
246
  };
251
247
  }, [onResize]);
252
248
  const loadMoreData = useCallback(() => {
249
+ var _a, _b, _c, _d;
253
250
  setIsLoadingData(true);
254
251
  waterFallData &&
255
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
256
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
257
- 'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
258
- 'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
259
- }).then((res) => {
252
+ (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) => {
260
253
  var _a, _b;
261
254
  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 : []));
262
255
  setIsLoadingData(false);
@@ -274,10 +267,12 @@ export default function WaterfallList(_a) {
274
267
  };
275
268
  }, [onScroll, scrollParent]);
276
269
  const handleClickLink = () => {
277
- var _a, _b;
270
+ var _a, _b, _c, _d, _e;
278
271
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
279
272
  reportTagsView();
280
- window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
273
+ const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
274
+ 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);
275
+ window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
281
276
  }
282
277
  };
283
278
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -43,6 +43,11 @@ export interface ISxpPageRenderProps {
43
43
  popupCloseIcon?: string;
44
44
  openSlideSkip?: boolean;
45
45
  slideSkipStartTime?: number;
46
+ muteIconFixed?: boolean;
47
+ likeIconFixed?: boolean;
48
+ enablePreview?: boolean;
49
+ enableSwiperTip?: boolean;
50
+ logoBar?: any;
46
51
  };
47
52
  descStyle?: CSSProperties;
48
53
  tipText?: {
@@ -74,7 +79,7 @@ export interface ISxpPageRenderProps {
74
79
  data?: RecItemType[];
75
80
  tagList?: string[];
76
81
  resolver: any;
77
- ctaType?: string;
82
+ ctaType?: Array<string>;
78
83
  _schema?: any;
79
84
  hashTagStyle?: CSSProperties;
80
85
  licenseUrl?: string;
@@ -20,9 +20,11 @@ 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
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
25
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
26
+ const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
27
+ const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
26
28
  const { schema } = useEditor();
27
29
  const [activeIndex, setActiveIndex] = useState(0);
28
30
  const viewImageStartTime = useRef(0);
@@ -33,11 +35,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
33
35
  const [isReload, setIsReload] = useState(new Date().getTime());
34
36
  const skipLinkRef = useRef(false);
35
37
  const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
36
- const { backMainFeed } = useEventReport();
37
- const { productView } = useEventReport();
38
+ const { backMainFeed, productView, jumpToWeb } = useEventReport();
38
39
  const isShowFingerTip = useMemo(() => {
39
- return data.length > 0 && !loading && getFeUserId();
40
- }, [data, loading]);
40
+ return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
41
+ }, [data, loading, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip]);
41
42
  useEffect(() => {
42
43
  refreshFeSessionId();
43
44
  }, []);
@@ -65,14 +66,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
65
66
  var _a;
66
67
  const index = (data === null || data === void 0 ? void 0 : data.findIndex((item) => {
67
68
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
68
- if (ctaType === '多商品CTA') {
69
+ const ctaType0 = ctaType === null || ctaType === void 0 ? void 0 : ctaType[0];
70
+ if (ctaType0 === '多商品CTA') {
69
71
  return ((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) && ((_c = (_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c.length) > 0;
70
72
  }
71
- else if (ctaType === '商品CTA') {
73
+ else if (ctaType0 === '商品CTA') {
72
74
  return (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindProduct;
73
75
  }
74
76
  else {
75
- 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) === ctaType && (((_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));
77
+ 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));
76
78
  }
77
79
  })) || 0;
78
80
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
@@ -173,13 +175,39 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
173
175
  const height = useMemo(() => {
174
176
  return containerHeight - minusHeight - tagHeight;
175
177
  }, [globalConfig, containerHeight, tagHeight]);
178
+ const visList = useMemo(() => {
179
+ var _a;
180
+ const list = activeIndex === 0 && !waterFallData
181
+ ? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
182
+ : data === null || data === void 0 ? void 0 : data.map((item, index) => {
183
+ if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
184
+ return item;
185
+ }
186
+ else {
187
+ return null;
188
+ }
189
+ });
190
+ return !waterFallData ? list.concat([{ loading: true }]) : list;
191
+ }, [data, activeIndex, waterFallData]);
176
192
  const renderLogo = useMemo(() => {
193
+ var _a, _b, _c, _d;
177
194
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
178
- return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
195
+ 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;
196
+ 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';
197
+ const rec = visList[activeIndex];
198
+ return (React.createElement("div", Object.assign({ className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } }, (link && {
199
+ onClick: () => {
200
+ var _a, _b, _c, _d;
201
+ if (isExternalLink) {
202
+ 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));
203
+ }
204
+ new Function(link)();
205
+ }
206
+ })),
179
207
  React.createElement("img", { src: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl, alt: 'logo' })));
180
208
  }
181
209
  return null;
182
- }, [globalConfig]);
210
+ }, [globalConfig, activeIndex, visList]);
183
211
  const renderContent = useCallback((rec, index) => {
184
212
  var _a, _b, _c, _d;
185
213
  if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
@@ -255,9 +283,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
255
283
  isShowMore,
256
284
  lineGradStyle
257
285
  ]);
258
- const renderLikeButton = useCallback((rec, index) => {
286
+ const renderLikeButton = useCallback((rec, index, visible) => {
259
287
  var _a, _b, _c, _d;
260
- if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
288
+ if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike) || !visible)
261
289
  return;
262
290
  let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
263
291
  if (waterFallData && top < 40) {
@@ -265,6 +293,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
265
293
  }
266
294
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
267
295
  return (React.createElement(LikeButton, { key: rec.position, activeIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon, unActicveIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
296
+ position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed) ? 'fixed' : 'absolute',
268
297
  [(_b = globalConfig.likeIconXPosit) !== null && _b !== void 0 ? _b : 'right']: (_c = globalConfig.likeIconX) !== null && _c !== void 0 ? _c : 0,
269
298
  [(_d = globalConfig.likeIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top
270
299
  }, position: index }));
@@ -315,7 +344,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
315
344
  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 : ''
316
345
  }
317
346
  });
318
- setSlideSkipState();
319
347
  skipLinkRef.current = true;
320
348
  window.location.href = window.getJointUtmLink(link);
321
349
  }
@@ -397,20 +425,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
397
425
  });
398
426
  }
399
427
  };
400
- const visList = useMemo(() => {
401
- var _a;
402
- const list = activeIndex === 0 && !waterFallData
403
- ? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
404
- : data === null || data === void 0 ? void 0 : data.map((item, index) => {
405
- if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
406
- return item;
407
- }
408
- else {
409
- return null;
410
- }
411
- });
412
- return !waterFallData ? list.concat([{ loading: true }]) : list;
413
- }, [data, activeIndex, waterFallData]);
428
+ const renderToggleButton = useCallback((visible) => {
429
+ var _a, _b, _c, _d, _e, _f;
430
+ if (!visible)
431
+ return;
432
+ return (((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (React.createElement(ToggleButton, { style: {
433
+ position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
434
+ 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',
435
+ zIndex: 999,
436
+ [(_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,
437
+ [(_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
438
+ }, 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 })));
439
+ }, [globalConfig, visList, activeIndex, isMuted]);
414
440
  const renderView = useMemo(() => {
415
441
  if (loading) {
416
442
  return (React.createElement("div", { style: { height, width: containerWidth, display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -427,20 +453,30 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
427
453
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
428
454
  renderContent(rec, index),
429
455
  renderBottom(rec, index),
430
- renderLikeButton(rec, index)))))));
456
+ renderLikeButton(rec, index, !(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
457
+ renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))))))));
431
458
  });
432
- }, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage, isReload]);
433
- const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
434
- const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
459
+ }, [
460
+ containerWidth,
461
+ data,
462
+ height,
463
+ loading,
464
+ renderBottom,
465
+ renderContent,
466
+ visList,
467
+ loadingImage,
468
+ isReload,
469
+ renderToggleButton
470
+ ]);
435
471
  return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
436
- waterFallData && (React.createElement(Navbar, { icon: left, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, onClose: () => {
472
+ waterFallData && (React.createElement(Navbar, { icon: left, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, textStyle: Object.assign(Object.assign({}, (_e = (_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagTitle), { color: '#fff' }), onClose: () => {
437
473
  setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
438
474
  } })),
439
475
  renderLogo,
440
476
  React.createElement(Tagbar, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
441
477
  top: minusHeight
442
478
  } }),
443
- isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
479
+ isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _f !== void 0 ? _f : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
444
480
  React.createElement(Swiper, { style: {
445
481
  marginTop: tagHeight
446
482
  }, ref: swiperRef, onSlideChange: () => {
@@ -464,14 +500,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
464
500
  }
465
501
  }
466
502
  }, direction: 'vertical', height: height },
467
- ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (React.createElement(ToggleButton, { style: {
468
- position: 'fixed',
469
- visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
470
- zIndex: 999,
471
- [(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _d !== void 0 ? _d : 'right']: (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _e !== void 0 ? _e : 0,
472
- [(_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _f !== void 0 ? _f : 'bottom']: (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _g !== void 0 ? _g : 23
473
- }, 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 })),
503
+ renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
504
+ renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
474
505
  renderView),
475
- React.createElement(WaterFall, Object.assign({}, (_k = (_j = (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.item) === null || _k === void 0 ? void 0 : _k.props))));
506
+ React.createElement(WaterFall, Object.assign({}, (_j = (_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.item) === null || _j === void 0 ? void 0 : _j.props))));
476
507
  };
477
508
  export default SxpPageRender;
@@ -27,6 +27,7 @@ export type CTAInfoType = {
27
27
  weight: number | null;
28
28
  enTitle: string;
29
29
  link: string | null;
30
+ remark?: string;
30
31
  };
31
32
  export type ProductInfoType = {
32
33
  traceInfo?: string | null;
@@ -44,6 +45,7 @@ export type ProductInfoType = {
44
45
  bindCta?: CTAInfoType;
45
46
  taxInfo?: string;
46
47
  cover?: string;
48
+ remark?: string;
47
49
  };
48
50
  export type VideoInfoType = {
49
51
  bindCtaId: string;
@@ -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
  }
@@ -31,10 +31,10 @@ export interface ISxpDataSourceContext {
31
31
  defaultSize?: number;
32
32
  channel?: string;
33
33
  hashTag?: string;
34
- 'itemFilter.itemId'?: string;
35
- 'itemFilter.itemType'?: 'VIDEO' | 'PRODUCT' | null | undefined;
36
34
  traceInfo?: string;
37
35
  themeTag?: string;
36
+ contentFilter?: string;
37
+ productFilter?: string;
38
38
  }) => Promise<RecommendVideoResultType | undefined>;
39
39
  utmVal?: string;
40
40
  bffEventReport?: (body: {
@@ -119,6 +119,7 @@ export interface SxpDataSourceProviderProps {
119
119
  globalConfig?: ISxpPageRenderProps['globalConfig'];
120
120
  isEditor?: boolean;
121
121
  utmParameter?: PageData['utm_parameter'];
122
+ channelQueryList?: any[];
122
123
  }
123
124
  export declare const DEFAULT_TAG = "FOR U";
124
125
  declare const _default: React.NamedExoticComponent<SxpDataSourceProviderProps>;