pb-sxp-ui 1.0.2 → 1.0.3-alpha.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.
- package/dist/index.cjs +3624 -1460
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +143 -245
- package/dist/index.js +3625 -1461
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -5
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -5
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +3624 -1460
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -5
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageCore/index.d.ts +1 -0
- package/es/core/components/SxpPageCore/index.js +2 -2
- package/es/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
- package/es/core/components/SxpPageRender/ExpandableText.js +17 -10
- package/es/core/components/SxpPageRender/Hashtag/index.d.ts +2 -1
- package/es/core/components/SxpPageRender/Hashtag/index.js +3 -3
- package/es/core/components/SxpPageRender/Modal/index.d.ts +2 -0
- package/es/core/components/SxpPageRender/Modal/index.js +7 -4
- package/es/core/components/SxpPageRender/Navbar.d.ts +1 -0
- package/es/core/components/SxpPageRender/Navbar.js +3 -2
- package/es/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
- package/es/core/components/SxpPageRender/Nudge/index.js +13 -0
- package/es/core/components/SxpPageRender/PictureGroup/index.js +11 -7
- package/es/core/components/SxpPageRender/Popup/index.js +3 -3
- package/es/core/components/SxpPageRender/VideoWidget/index.js +30 -21
- package/es/core/components/SxpPageRender/WaterFall/List.d.ts +2 -1
- package/es/core/components/SxpPageRender/WaterFall/List.js +24 -14
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +2 -1
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +17 -14
- package/es/core/components/SxpPageRender/WaterFall/index.d.ts +2 -1
- package/es/core/components/SxpPageRender/WaterFall/index.js +4 -3
- package/es/core/components/SxpPageRender/WaterFall/preview.json +1242 -0
- package/es/core/components/SxpPageRender/index.d.ts +22 -1
- package/es/core/components/SxpPageRender/index.js +22 -19
- package/es/core/components/SxpPageRender/typing.d.ts +1 -0
- package/es/core/components/SxpPageRender/useIconLink.d.ts +1 -1
- package/es/core/components/SxpPageRender/useIconLink.js +8 -3
- package/es/core/context/EditorContext.d.ts +5 -0
- package/es/core/context/EditorContext.js +21 -3
- package/es/core/context/EditorDataProvider.d.ts +3 -1
- package/es/core/context/EditorDataProvider.js +5 -2
- package/es/core/context/SxpDataSourceProvider.d.ts +2 -0
- package/es/core/context/SxpDataSourceProvider.js +8 -4
- package/es/core/create.d.ts +1 -1
- package/es/materials/sxp/HashTag/index.d.ts +14 -0
- package/es/materials/sxp/HashTag/index.js +6 -0
- package/es/materials/sxp/HashTag/material.d.ts +2 -0
- package/es/materials/sxp/HashTag/material.js +52 -0
- package/es/materials/sxp/HashTag/settingRender.d.ts +122 -0
- package/es/materials/sxp/HashTag/settingRender.js +153 -0
- package/es/materials/sxp/index.d.ts +1 -0
- package/es/materials/sxp/index.js +1 -0
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +20 -1
- package/es/materials/sxp/popup/CommodityDetail/index.js +44 -21
- package/es/materials/sxp/popup/CommodityDetail/material.js +36 -1
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +134 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +167 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
- package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +46 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +171 -0
- package/es/materials/sxp/popup/index.d.ts +0 -1
- package/es/materials/sxp/popup/index.js +0 -1
- package/es/materials/sxp/template/Appoint/index.d.ts +2 -0
- package/es/materials/sxp/template/Appoint/index.js +4 -18
- package/es/materials/sxp/template/Appoint/material.js +22 -6
- package/es/materials/sxp/template/Commodity/index.d.ts +2 -0
- package/es/materials/sxp/template/Commodity/index.js +5 -22
- package/es/materials/sxp/template/Commodity/material.js +31 -6
- package/es/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
- package/es/materials/sxp/template/CommodityDiro/index.js +5 -24
- package/es/materials/sxp/template/CommodityDiro/material.js +30 -5
- package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
- package/es/materials/sxp/template/CommodityDiroNew/index.js +5 -24
- package/es/materials/sxp/template/CommodityDiroNew/material.js +32 -6
- package/es/materials/sxp/template/Link/index.d.ts +2 -0
- package/es/materials/sxp/template/Link/index.js +4 -13
- package/es/materials/sxp/template/Link/material.js +22 -5
- package/es/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
- package/es/materials/sxp/template/MultiCommodity/index.js +8 -24
- package/es/materials/sxp/template/MultiCommodity/material.js +30 -5
- package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +8 -27
- package/es/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +8 -25
- package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
- package/es/materials/sxp/template/components/EventProvider.d.ts +2 -1
- package/es/materials/sxp/template/components/EventProvider.js +5 -4
- package/es/materials/sxp/template/components/settingRender.d.ts +123 -0
- package/es/materials/sxp/template/components/settingRender.js +215 -0
- package/es/materials/sxp/template/components/typing.d.ts +6 -0
- package/es/materials/sxp/template/components/typing.js +1 -0
- package/lib/core/components/SxpPageCore/index.d.ts +1 -0
- package/lib/core/components/SxpPageCore/index.js +2 -2
- package/lib/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
- package/lib/core/components/SxpPageRender/ExpandableText.js +17 -10
- package/lib/core/components/SxpPageRender/Hashtag/index.d.ts +2 -1
- package/lib/core/components/SxpPageRender/Hashtag/index.js +3 -3
- package/lib/core/components/SxpPageRender/Modal/index.d.ts +2 -0
- package/lib/core/components/SxpPageRender/Modal/index.js +7 -4
- package/lib/core/components/SxpPageRender/Navbar.d.ts +1 -0
- package/lib/core/components/SxpPageRender/Navbar.js +3 -2
- package/lib/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
- package/lib/core/components/SxpPageRender/Nudge/index.js +16 -0
- package/lib/core/components/SxpPageRender/PictureGroup/index.js +10 -6
- package/lib/core/components/SxpPageRender/Popup/index.js +3 -3
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +30 -21
- package/lib/core/components/SxpPageRender/WaterFall/List.d.ts +2 -1
- package/lib/core/components/SxpPageRender/WaterFall/List.js +23 -14
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.d.ts +2 -1
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +15 -13
- package/lib/core/components/SxpPageRender/WaterFall/index.d.ts +2 -1
- package/lib/core/components/SxpPageRender/WaterFall/index.js +4 -3
- package/lib/core/components/SxpPageRender/WaterFall/preview.json +1242 -0
- package/lib/core/components/SxpPageRender/index.d.ts +22 -1
- package/lib/core/components/SxpPageRender/index.js +22 -19
- package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
- package/lib/core/components/SxpPageRender/useIconLink.d.ts +1 -1
- package/lib/core/components/SxpPageRender/useIconLink.js +8 -3
- package/lib/core/context/EditorContext.d.ts +5 -0
- package/lib/core/context/EditorContext.js +21 -3
- package/lib/core/context/EditorDataProvider.d.ts +3 -1
- package/lib/core/context/EditorDataProvider.js +4 -1
- package/lib/core/context/SxpDataSourceProvider.d.ts +2 -0
- package/lib/core/context/SxpDataSourceProvider.js +8 -4
- package/lib/core/create.d.ts +1 -1
- package/lib/materials/sxp/HashTag/index.d.ts +14 -0
- package/lib/materials/sxp/HashTag/index.js +9 -0
- package/lib/materials/sxp/HashTag/material.d.ts +2 -0
- package/lib/materials/sxp/HashTag/material.js +56 -0
- package/lib/materials/sxp/HashTag/settingRender.d.ts +122 -0
- package/lib/materials/sxp/HashTag/settingRender.js +155 -0
- package/lib/materials/sxp/index.d.ts +1 -0
- package/lib/materials/sxp/index.js +1 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +20 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.js +43 -20
- package/lib/materials/sxp/popup/CommodityDetail/material.js +36 -1
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +134 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +169 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +46 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +173 -0
- package/lib/materials/sxp/popup/index.d.ts +0 -1
- package/lib/materials/sxp/popup/index.js +0 -1
- package/lib/materials/sxp/template/Appoint/index.d.ts +2 -0
- package/lib/materials/sxp/template/Appoint/index.js +4 -18
- package/lib/materials/sxp/template/Appoint/material.js +22 -6
- package/lib/materials/sxp/template/Commodity/index.d.ts +2 -0
- package/lib/materials/sxp/template/Commodity/index.js +5 -22
- package/lib/materials/sxp/template/Commodity/material.js +31 -6
- package/lib/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
- package/lib/materials/sxp/template/CommodityDiro/index.js +5 -24
- package/lib/materials/sxp/template/CommodityDiro/material.js +30 -5
- package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +5 -24
- package/lib/materials/sxp/template/CommodityDiroNew/material.js +32 -6
- package/lib/materials/sxp/template/Link/index.d.ts +2 -0
- package/lib/materials/sxp/template/Link/index.js +4 -13
- package/lib/materials/sxp/template/Link/material.js +22 -5
- package/lib/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
- package/lib/materials/sxp/template/MultiCommodity/index.js +7 -23
- package/lib/materials/sxp/template/MultiCommodity/material.js +30 -5
- package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +7 -26
- package/lib/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -24
- package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
- package/lib/materials/sxp/template/components/EventProvider.d.ts +2 -1
- package/lib/materials/sxp/template/components/EventProvider.js +4 -3
- package/lib/materials/sxp/template/components/settingRender.d.ts +123 -0
- package/lib/materials/sxp/template/components/settingRender.js +217 -0
- package/lib/materials/sxp/template/components/typing.d.ts +6 -0
- package/lib/materials/sxp/template/components/typing.js +2 -0
- package/package.json +1 -1
@@ -4,8 +4,11 @@ const tslib_1 = require("tslib");
|
|
4
4
|
const lodash_1 = require("lodash");
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
6
6
|
const ReactDOM = tslib_1.__importStar(require("react-dom"));
|
7
|
+
const hooks_1 = require("../../../../core/hooks");
|
7
8
|
const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
8
|
-
const Modal = ({ visible, onClose, children, modalStyle, padding }) => {
|
9
|
+
const Modal = ({ visible, onClose, children, modalStyle, padding, popupAniData }) => {
|
10
|
+
const { popupAni } = (0, hooks_1.useEditor)();
|
11
|
+
const cssAni = popupAniData !== null && popupAniData !== void 0 ? popupAniData : popupAni;
|
9
12
|
const [isShow, setIsShow] = (0, react_1.useState)(false);
|
10
13
|
const modalEleRef = (0, react_1.useRef)(null);
|
11
14
|
(0, react_1.useEffect)(() => {
|
@@ -27,16 +30,16 @@ const Modal = ({ visible, onClose, children, modalStyle, padding }) => {
|
|
27
30
|
else {
|
28
31
|
setTimeout(() => {
|
29
32
|
setIsShow(false);
|
30
|
-
},
|
33
|
+
}, cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration);
|
31
34
|
}
|
32
|
-
}, [visible]);
|
35
|
+
}, [visible, cssAni]);
|
33
36
|
if (!modalEleRef.current)
|
34
37
|
return null;
|
35
38
|
const handleClose = (0, lodash_1.debounce)(() => {
|
36
39
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
37
40
|
}, 300);
|
38
41
|
return ReactDOM.createPortal(react_1.default.createElement("div", { className: 'modal-bg', style: Object.assign({ display: isShow ? 'flex' : 'none', backgroundColor: visible ? 'rgba(0, 0, 0, 0.7)' : 'rgba(0, 0, 0, 0)' }, modalStyle), onClick: handleClose },
|
39
|
-
react_1.default.createElement("div", { className: `modal-container ${visible ? 'modal-popIn' : 'modal-popOut'}`, style: { padding }, onClick: (e) => {
|
42
|
+
react_1.default.createElement("div", { className: `modal-container ${visible ? 'modal-popIn' : 'modal-popOut'}`, style: { padding, animationDuration: (cssAni === null || cssAni === void 0 ? void 0 : cssAni.duration) / 1000 + 's' }, onClick: (e) => {
|
40
43
|
e.stopPropagation();
|
41
44
|
e.preventDefault();
|
42
45
|
} },
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
5
5
|
const hooks_1 = require("../../../core/hooks");
|
6
|
-
const Navbar = ({ icon, styles, onClose }) => {
|
6
|
+
const Navbar = ({ icon, styles, textStyle, onClose }) => {
|
7
|
+
var _a;
|
7
8
|
const { waterFallData, setOpenHashtag } = (0, hooks_1.useSxpDataSource)();
|
8
9
|
return (react_1.default.createElement("div", { className: 'clc-sxp-nav', style: styles },
|
9
10
|
react_1.default.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: '', onClick: onClose }),
|
10
|
-
react_1.default.createElement("div", { className: 'clc-sxp-nav-title' }, `#${waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag}`)));
|
11
|
+
react_1.default.createElement("div", { className: 'clc-sxp-nav-title', style: textStyle }, `#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`)));
|
11
12
|
};
|
12
13
|
exports.default = (0, react_1.memo)(Navbar);
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { FC } from 'react';
|
2
|
+
interface IProps {
|
3
|
+
nudge?: {
|
4
|
+
isOpen: boolean;
|
5
|
+
icon?: string;
|
6
|
+
backgroundColor: string;
|
7
|
+
content?: string;
|
8
|
+
marginBottom: number;
|
9
|
+
borderRadius: number;
|
10
|
+
size: {
|
11
|
+
height: number;
|
12
|
+
width: number;
|
13
|
+
};
|
14
|
+
textStyle: {
|
15
|
+
color: string;
|
16
|
+
fontFamily: string;
|
17
|
+
fontSize: number;
|
18
|
+
fontStyle: string;
|
19
|
+
textAlign: string;
|
20
|
+
};
|
21
|
+
};
|
22
|
+
}
|
23
|
+
declare const Nudge: FC<IProps>;
|
24
|
+
export default Nudge;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("tslib");
|
4
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
5
|
+
const Nudge = ({ nudge }) => {
|
6
|
+
return (react_1.default.createElement("div", { hidden: !(nudge === null || nudge === void 0 ? void 0 : nudge.isOpen), className: 'clc-sxp-bottom-nudge', style: {
|
7
|
+
marginBottom: nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom,
|
8
|
+
width: nudge === null || nudge === void 0 ? void 0 : nudge.size.width,
|
9
|
+
height: nudge === null || nudge === void 0 ? void 0 : nudge.size.height,
|
10
|
+
backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
|
11
|
+
borderRadius: nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius
|
12
|
+
} },
|
13
|
+
(nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? react_1.default.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
|
14
|
+
react_1.default.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)));
|
15
|
+
};
|
16
|
+
exports.default = Nudge;
|
@@ -9,16 +9,20 @@ const hooks_1 = require("../../../../core/hooks");
|
|
9
9
|
const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent }) => {
|
10
10
|
const { isActive } = (0, react_2.useSwiperSlide)();
|
11
11
|
const { sxpParameter, openHashtag } = (0, hooks_1.useSxpDataSource)();
|
12
|
+
const [isLoad, setIsLoad] = (0, react_1.useState)(false);
|
12
13
|
(0, react_1.useEffect)(() => {
|
13
|
-
if (
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
if (isLoad && isActive) {
|
15
|
+
if (openHashtag) {
|
16
|
+
onReportViewImageEnd(rec);
|
17
|
+
}
|
18
|
+
else {
|
19
|
+
onViewImageStartEvent(index);
|
20
|
+
}
|
17
21
|
}
|
18
22
|
else {
|
19
|
-
|
23
|
+
setIsLoad(true);
|
20
24
|
}
|
21
|
-
}, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent]);
|
25
|
+
}, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent, isLoad]);
|
22
26
|
if (!isActive) {
|
23
27
|
return react_1.default.createElement("img", { src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image, style: { width, height, objectFit: 'cover' } });
|
24
28
|
}
|
@@ -7,7 +7,7 @@ const hooks_1 = require("../../../../core/hooks");
|
|
7
7
|
const withBindDataSource_1 = tslib_1.__importDefault(require("../../../../core/hoc/withBindDataSource"));
|
8
8
|
const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
9
9
|
const Popup = () => {
|
10
|
-
const { schema, resolver, popup } = (0, hooks_1.useEditor)();
|
10
|
+
const { schema, resolver, popup, popupAni } = (0, hooks_1.useEditor)();
|
11
11
|
const { setPopupDetailData, popupDetailData, bffEventReport } = (0, hooks_1.useSxpDataSource)();
|
12
12
|
const { productView } = (0, useEventReport_1.useEventReport)();
|
13
13
|
const [visible, setVisible] = (0, react_1.useState)(false);
|
@@ -30,7 +30,7 @@ const Popup = () => {
|
|
30
30
|
}, [popup]);
|
31
31
|
const handleClose = () => {
|
32
32
|
var _a, _b, _c;
|
33
|
-
if (!popup || popup === '' || !visible || new Date() - curTimeRef.current <
|
33
|
+
if (!popup || popup === '' || !visible || new Date() - curTimeRef.current < (popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration)) {
|
34
34
|
return;
|
35
35
|
}
|
36
36
|
setVisible(false);
|
@@ -43,7 +43,7 @@ const Popup = () => {
|
|
43
43
|
setTimeout(() => {
|
44
44
|
window === null || window === void 0 ? void 0 : window.sxpPopup('');
|
45
45
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(null);
|
46
|
-
},
|
46
|
+
}, popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration);
|
47
47
|
};
|
48
48
|
const renderPopupDetail = (0, react_1.useMemo)(() => {
|
49
49
|
var _a, _b, _c;
|
@@ -19,8 +19,10 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
|
|
19
19
|
videoRef.current.muted = muted;
|
20
20
|
}, [muted]);
|
21
21
|
const handleVideoStart = (0, react_1.useCallback)(() => {
|
22
|
-
var _a;
|
23
|
-
(_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.
|
22
|
+
var _a, _b;
|
23
|
+
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
|
24
|
+
return;
|
25
|
+
(_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
|
24
26
|
}, []);
|
25
27
|
const PAUSE_ICON = (0, useIconLink_1.useIconLink)('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
|
26
28
|
const handlePlaying = (0, react_1.useCallback)(() => {
|
@@ -77,37 +79,38 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
|
|
77
79
|
});
|
78
80
|
}
|
79
81
|
setTimeout(() => {
|
80
|
-
var _a;
|
81
|
-
(_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.
|
82
|
+
var _a, _b;
|
83
|
+
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
|
84
|
+
return;
|
85
|
+
(_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
|
82
86
|
}, 0);
|
83
87
|
}, [index, bffEventReport, data, isLoad]);
|
84
88
|
const handleClickVideo = (0, react_1.useCallback)((type) => () => {
|
85
|
-
var _a, _b, _c, _d, _e, _f
|
89
|
+
var _a, _b, _c, _d, _e, _f;
|
90
|
+
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
|
91
|
+
return;
|
86
92
|
if (!isLoad)
|
87
93
|
return;
|
88
|
-
const
|
89
|
-
const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
|
90
|
-
const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
|
91
|
-
const isPause = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.paused;
|
94
|
+
const isPause = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.paused;
|
92
95
|
switch (type) {
|
93
96
|
case 'start':
|
94
97
|
if (!isPause)
|
95
98
|
return;
|
96
|
-
(
|
99
|
+
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.play();
|
97
100
|
setIsPauseVideo(false);
|
98
101
|
break;
|
99
102
|
case 'pause':
|
100
103
|
if (isPause)
|
101
104
|
return;
|
102
|
-
(
|
105
|
+
(_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.pause();
|
103
106
|
setIsPauseVideo(true);
|
104
107
|
break;
|
105
108
|
default:
|
106
109
|
if (isPause) {
|
107
|
-
(
|
110
|
+
(_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
|
108
111
|
}
|
109
112
|
else {
|
110
|
-
(
|
113
|
+
(_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
|
111
114
|
}
|
112
115
|
setIsPauseVideo(!isPause);
|
113
116
|
break;
|
@@ -138,14 +141,16 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
|
|
138
141
|
}
|
139
142
|
}, [data, index, bffEventReport]);
|
140
143
|
(0, react_1.useEffect)(() => {
|
141
|
-
var _a, _b, _c;
|
144
|
+
var _a, _b, _c, _d, _e, _f;
|
142
145
|
if (data.length <= 0)
|
143
146
|
return;
|
144
147
|
if (!videoRef.current)
|
145
148
|
return;
|
149
|
+
const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
|
146
150
|
setIsPauseVideo(false);
|
147
151
|
if (!isActive) {
|
148
|
-
(
|
152
|
+
if (!isPause && ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.readyState) >= 2)
|
153
|
+
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
|
149
154
|
return;
|
150
155
|
}
|
151
156
|
if (!videoRef.current.src) {
|
@@ -155,10 +160,12 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
|
|
155
160
|
videoRef.current.setAttribute('webkit-playsinline', 'true');
|
156
161
|
}
|
157
162
|
else {
|
163
|
+
if (((_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.readyState) < 2)
|
164
|
+
return;
|
158
165
|
videoRef.current.play();
|
159
166
|
}
|
160
|
-
(
|
161
|
-
(
|
167
|
+
(_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('canplay', handleLoadedMetadata);
|
168
|
+
(_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
|
162
169
|
return () => {
|
163
170
|
var _a, _b;
|
164
171
|
(_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('canplay', handleLoadedMetadata);
|
@@ -166,15 +173,17 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
|
|
166
173
|
};
|
167
174
|
}, [data, handleLoadedMetadata, handlePlaying, isActive, isLoad, rec.video]);
|
168
175
|
(0, react_1.useEffect)(() => {
|
169
|
-
var _a, _b, _c;
|
170
|
-
|
176
|
+
var _a, _b, _c, _d;
|
177
|
+
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.readyState) < 2)
|
178
|
+
return;
|
179
|
+
const isPause = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.paused;
|
171
180
|
if (!isActive)
|
172
181
|
return;
|
173
182
|
if (!isPause && openHashtag) {
|
174
|
-
(
|
183
|
+
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
|
175
184
|
}
|
176
185
|
else if (!openHashtag) {
|
177
|
-
(
|
186
|
+
(_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
|
178
187
|
}
|
179
188
|
}, [openHashtag, isActive]);
|
180
189
|
(0, react_1.useEffect)(() => {
|
@@ -1,3 +1,4 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import './List.less';
|
3
|
-
|
3
|
+
import { IHashTagProps } from '../../../../materials/sxp/HashTag';
|
4
|
+
export default function WaterfallList({ reportTagsView, ...props }: any & IHashTagProps): React.JSX.Element;
|
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
5
5
|
require("./List.less");
|
6
|
+
const preview_json_1 = tslib_1.__importDefault(require("./preview.json"));
|
6
7
|
const hooks_1 = require("../../../../core/hooks");
|
7
8
|
const WaterfallFlowItem = (props) => {
|
8
|
-
const { rec, index, list, reportTagsView } = props;
|
9
|
+
const { rec, index, list, reportTagsView, textStyles, space } = props;
|
9
10
|
const { swiperRef, setRtcList, setOpenHashtag, bffEventReport, sxpParameter } = (0, hooks_1.useSxpDataSource)();
|
10
11
|
const [showVideo, setShowVideo] = (0, react_1.useState)(false);
|
11
12
|
const imgDom = (0, react_1.useRef)(null);
|
@@ -105,19 +106,20 @@ const WaterfallFlowItem = (props) => {
|
|
105
106
|
setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(false);
|
106
107
|
}, 0);
|
107
108
|
};
|
108
|
-
return (react_1.default.createElement("div", { className: 'list-content-listItem', key: index, onClick: handleClickToDetail },
|
109
|
+
return (react_1.default.createElement("div", { className: 'list-content-listItem', key: index, onClick: handleClickToDetail, style: { marginBottom: space } },
|
109
110
|
react_1.default.createElement("div", { className: 'list-content-listItem-picture' },
|
110
111
|
showVideo && (react_1.default.createElement("div", { style: { display: 'none' } },
|
111
112
|
react_1.default.createElement("video", { ref: videoDom, crossOrigin: 'anonymous', className: 'list-content-listItem-picture-img' }),
|
112
113
|
react_1.default.createElement("canvas", { ref: canvasRef }))),
|
113
114
|
react_1.default.createElement("img", { className: 'list-content-listItem-picture-img', loading: 'lazy', ref: imgDom })),
|
114
115
|
react_1.default.createElement("div", { className: 'list-content-listItem-info' },
|
115
|
-
react_1.default.createElement("div", { className: `${'list-content-listItem-info-title'} ${priceText ? 'list-content-listItem-info-nowrap' : ''}
|
116
|
-
react_1.default.createElement("div", { className: 'list-content-listItem-info-price', hidden: !priceText }, priceText))));
|
116
|
+
react_1.default.createElement("div", { className: `${'list-content-listItem-info-title'} ${priceText ? 'list-content-listItem-info-nowrap' : ''}`, style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.title }, title && title),
|
117
|
+
react_1.default.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles.price, hidden: !priceText }, priceText))));
|
117
118
|
};
|
118
|
-
function WaterfallList(
|
119
|
-
var
|
120
|
-
|
119
|
+
function WaterfallList(_a) {
|
120
|
+
var _b, _c, _d, _e, _f, _g, _h;
|
121
|
+
var { reportTagsView } = _a, props = tslib_1.__rest(_a, ["reportTagsView"]);
|
122
|
+
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = (0, hooks_1.useSxpDataSource)();
|
121
123
|
const [list, setList] = (0, react_1.useState)();
|
122
124
|
const [data, setData] = (0, react_1.useState)();
|
123
125
|
const [isLoadingData, setIsLoadingData] = (0, react_1.useState)(false);
|
@@ -139,6 +141,7 @@ function WaterfallList({ reportTagsView }) {
|
|
139
141
|
}));
|
140
142
|
}, [waterFallData, getRecommendVideos, list, isLoadMore]);
|
141
143
|
(0, react_1.useEffect)(() => {
|
144
|
+
var _a, _b;
|
142
145
|
setIsLoadingData(true);
|
143
146
|
waterFallData &&
|
144
147
|
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
@@ -152,7 +155,13 @@ function WaterfallList({ reportTagsView }) {
|
|
152
155
|
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 : []);
|
153
156
|
setIsLoadingData(false);
|
154
157
|
}));
|
155
|
-
|
158
|
+
if (isOpenHashTag) {
|
159
|
+
const res = preview_json_1.default;
|
160
|
+
setData(res);
|
161
|
+
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 : []);
|
162
|
+
setIsLoadingData(false);
|
163
|
+
}
|
164
|
+
}, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
|
156
165
|
const handleClickLink = () => {
|
157
166
|
var _a, _b;
|
158
167
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
@@ -163,15 +172,15 @@ function WaterfallList({ reportTagsView }) {
|
|
163
172
|
return (react_1.default.createElement(react_1.default.Fragment, null, isLoadingData ? (react_1.default.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
164
173
|
react_1.default.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (react_1.default.createElement("div", { className: 'list' },
|
165
174
|
react_1.default.createElement("div", { className: 'list-scroll', ref: containerRef, style: {
|
166
|
-
bottom: ((
|
175
|
+
bottom: ((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link) ? '100px' : 0
|
167
176
|
} },
|
168
|
-
react_1.default.createElement("div", { className: 'list-info' }, (
|
169
|
-
react_1.default.createElement("div", { hidden: !((
|
177
|
+
react_1.default.createElement("div", { className: 'list-info', style: (_c = props === null || props === void 0 ? void 0 : props.textStyles) === null || _c === void 0 ? void 0 : _c.hashTagDesc }, (_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.info),
|
178
|
+
react_1.default.createElement("div", { hidden: !((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link), className: 'list-collection', onClick: handleClickLink, style: { marginBottom: props === null || props === void 0 ? void 0 : props.space } }, ((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.linkTitle) || 'Shop the collection'),
|
170
179
|
react_1.default.createElement("div", { className: 'list-content' }, list === null || list === void 0 ? void 0 : list.map((item, ind) => {
|
171
|
-
return (react_1.default.createElement(WaterfallFlowItem, { key: ind, index: ind, rec: item, list: list, reportTagsView: reportTagsView }));
|
180
|
+
return (react_1.default.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, reportTagsView: reportTagsView }, props)));
|
172
181
|
})),
|
173
182
|
react_1.default.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading...")),
|
174
|
-
react_1.default.createElement("div", { className: 'list-bottom', hidden: !((
|
175
|
-
react_1.default.createElement("button", { className: 'list-bottom-btn', onClick: handleClickLink }, ((
|
183
|
+
react_1.default.createElement("div", { className: 'list-bottom', hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link) },
|
184
|
+
react_1.default.createElement("button", { className: 'list-bottom-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_h = data === null || data === void 0 ? void 0 : data.tag) === null || _h === void 0 ? void 0 : _h.linkTitle) || 'Shop the collection'))))));
|
176
185
|
}
|
177
186
|
exports.default = WaterfallList;
|
@@ -1,3 +1,4 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import './WaterfallList.less';
|
3
|
-
|
3
|
+
import { IHashTagProps } from '../../../../materials/sxp/HashTag';
|
4
|
+
export default function WaterfallList({ reportTagsView, ...props }: any & IHashTagProps): React.JSX.Element;
|
@@ -5,7 +5,7 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
5
5
|
const hooks_1 = require("../../../../core/hooks");
|
6
6
|
require("./WaterfallList.less");
|
7
7
|
const WaterfallFlowItem = (props) => {
|
8
|
-
const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView } = props;
|
8
|
+
const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, lineClamp } = props;
|
9
9
|
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = (0, hooks_1.useSxpDataSource)();
|
10
10
|
const [showVideo, setShowVideo] = (0, react_1.useState)(false);
|
11
11
|
const [isLoading, setIsLoading] = (0, react_1.useState)(false);
|
@@ -141,11 +141,13 @@ const WaterfallFlowItem = (props) => {
|
|
141
141
|
visibility: isLoading ? 'visible' : 'hidden'
|
142
142
|
} })),
|
143
143
|
react_1.default.createElement("div", { className: 'waterFallList-content-listItem-info' },
|
144
|
-
react_1.default.createElement("div", { className: `${'waterFallList-content-listItem-info-title'} ${priceText ? 'waterFallList-content-listItem-info-nowrap' : ''}
|
145
|
-
react_1.default.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText }, priceText))));
|
144
|
+
react_1.default.createElement("div", { className: `${'waterFallList-content-listItem-info-title'} ${priceText ? 'waterFallList-content-listItem-info-nowrap' : ''}`, style: Object.assign({}, textStyles === null || textStyles === void 0 ? void 0 : textStyles.title) }, title && title),
|
145
|
+
react_1.default.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText, style: textStyles.price }, priceText))));
|
146
146
|
};
|
147
|
-
function WaterfallList(
|
148
|
-
var
|
147
|
+
function WaterfallList(_a) {
|
148
|
+
var _b, _c, _d, _e, _f, _g, _h;
|
149
|
+
var { reportTagsView } = _a, props = tslib_1.__rest(_a, ["reportTagsView"]);
|
150
|
+
const { popupAni } = (0, hooks_1.useEditor)();
|
149
151
|
const { waterFallData, getRecommendVideos, loadingImage } = (0, hooks_1.useSxpDataSource)();
|
150
152
|
const scrollParent = (0, react_1.useRef)(null);
|
151
153
|
const [scrollTop, setScrollTop] = (0, react_1.useState)(0);
|
@@ -163,7 +165,7 @@ function WaterfallList({ reportTagsView }) {
|
|
163
165
|
const [frameInfo, setFrameInfoInfo] = (0, react_1.useState)({ width: 0 });
|
164
166
|
const rowsNum = (0, react_1.useMemo)(() => {
|
165
167
|
const width = frameInfo.width || 0;
|
166
|
-
if (width >=
|
168
|
+
if (width >= (popupAni === null || popupAni === void 0 ? void 0 : popupAni.duration)) {
|
167
169
|
return 6;
|
168
170
|
}
|
169
171
|
else if (width >= 768 && width <= 1199) {
|
@@ -172,7 +174,7 @@ function WaterfallList({ reportTagsView }) {
|
|
172
174
|
else {
|
173
175
|
return 2;
|
174
176
|
}
|
175
|
-
}, [frameInfo]);
|
177
|
+
}, [frameInfo, popupAni]);
|
176
178
|
const unitWidth = (0, react_1.useMemo)(() => {
|
177
179
|
return frameInfo.width / rowsNum - 2;
|
178
180
|
}, [rowsNum, frameInfo]);
|
@@ -308,14 +310,14 @@ function WaterfallList({ reportTagsView }) {
|
|
308
310
|
react_1.default.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } })),
|
309
311
|
react_1.default.createElement("div", { className: 'waterFallList', hidden: isLoadingData },
|
310
312
|
react_1.default.createElement("div", { className: 'waterFallList-scroll', ref: scrollParent, style: {
|
311
|
-
bottom: ((
|
313
|
+
bottom: ((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link) ? '100px' : 0
|
312
314
|
} },
|
313
|
-
react_1.default.createElement("div", { className: 'waterFallList-info' }, (
|
314
|
-
react_1.default.createElement("div", { hidden: !((
|
315
|
+
react_1.default.createElement("div", { className: 'waterFallList-info', style: (_c = props === null || props === void 0 ? void 0 : props.textStyles) === null || _c === void 0 ? void 0 : _c.hashTagDesc }, (_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.info),
|
316
|
+
react_1.default.createElement("div", { hidden: !((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link), className: 'waterFallList-collection', onClick: handleClickLink }, ((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.linkTitle) || 'Shop the collection'),
|
315
317
|
react_1.default.createElement("div", { className: 'waterFallList-content', ref: waterfallFlowDom }, list === null || list === void 0 ? void 0 : list.map((item, ind) => {
|
316
|
-
return (react_1.default.createElement(WaterfallFlowItem, { key: ind, index: ind, rec: item, list: list, showBorder: scrollTop + scrollParent.current.clientHeight, style: styleList[ind], sizeChange: onSizeChange, unitWidth: unitWidth, reportTagsView: reportTagsView }));
|
318
|
+
return (react_1.default.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, showBorder: scrollTop + scrollParent.current.clientHeight, style: styleList[ind], sizeChange: onSizeChange, unitWidth: unitWidth, reportTagsView: reportTagsView }, props)));
|
317
319
|
}))),
|
318
|
-
react_1.default.createElement("div", { className: 'waterFallList-bottom', hidden: !((
|
319
|
-
react_1.default.createElement("button", { className: 'waterFallList-bottom-btn', onClick: handleClickLink }, ((
|
320
|
+
react_1.default.createElement("div", { className: 'waterFallList-bottom', hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link) },
|
321
|
+
react_1.default.createElement("button", { className: 'waterFallList-bottom-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_h = data === null || data === void 0 ? void 0 : data.tag) === null || _h === void 0 ? void 0 : _h.linkTitle) || 'Shop the collection')))));
|
320
322
|
}
|
321
323
|
exports.default = WaterfallList;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import './index.less';
|
3
|
+
import { IHashTagProps } from '../../../../materials/sxp/HashTag';
|
3
4
|
interface IWaterFallProps {
|
4
5
|
}
|
5
|
-
declare const _default: React.NamedExoticComponent<IWaterFallProps>;
|
6
|
+
declare const _default: React.NamedExoticComponent<IWaterFallProps & IHashTagProps>;
|
6
7
|
export default _default;
|
@@ -9,7 +9,8 @@ const Navbar_1 = tslib_1.__importDefault(require("../Navbar"));
|
|
9
9
|
const List_1 = tslib_1.__importDefault(require("./List"));
|
10
10
|
const left_png_1 = tslib_1.__importDefault(require("./left.png"));
|
11
11
|
const hooks_1 = require("../../../../core/hooks");
|
12
|
-
const WaterFall = () => {
|
12
|
+
const WaterFall = (props) => {
|
13
|
+
var _a;
|
13
14
|
const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport } = (0, hooks_1.useSxpDataSource)();
|
14
15
|
const ref = (0, react_1.useRef)(null);
|
15
16
|
const modalEleRef = (0, react_1.useRef)(null);
|
@@ -97,7 +98,7 @@ const WaterFall = () => {
|
|
97
98
|
return ReactDOM.createPortal(react_1.default.createElement("div", { className: 'waterfall', style: {
|
98
99
|
display: openHashtag ? 'block' : 'none'
|
99
100
|
} },
|
100
|
-
react_1.default.createElement(Navbar_1.default, { icon: left_png_1.default, styles: { top: '32px' }, onClose: handleClose }),
|
101
|
-
react_1.default.createElement(List_1.default, { reportTagsView: reportTagsView })), modalEleRef.current);
|
101
|
+
react_1.default.createElement(Navbar_1.default, { icon: left_png_1.default, styles: { top: '32px' }, textStyle: (_a = props === null || props === void 0 ? void 0 : props.textStyles) === null || _a === void 0 ? void 0 : _a.hashTagTitle, onClose: handleClose }),
|
102
|
+
react_1.default.createElement(List_1.default, Object.assign({ reportTagsView: reportTagsView }, props))), modalEleRef.current);
|
102
103
|
};
|
103
104
|
exports.default = (0, react_1.memo)(WaterFall);
|