pb-sxp-ui 1.0.77 → 1.0.78
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 +96 -284
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +27 -95
- package/dist/index.js +96 -284
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +96 -284
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +35 -49
- package/es/core/components/SxpPageRender/WaterFall/index.js +1 -1
- package/es/materials/sxp/HashTag/index.d.ts +0 -2
- package/es/materials/sxp/HashTag/settingRender.d.ts +2 -7
- package/es/materials/sxp/HashTag/settingRender.js +0 -15
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +35 -49
- package/lib/core/components/SxpPageRender/WaterFall/index.js +2 -2
- package/lib/materials/sxp/HashTag/index.d.ts +0 -2
- package/lib/materials/sxp/HashTag/settingRender.d.ts +2 -7
- package/lib/materials/sxp/HashTag/settingRender.js +0 -15
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -10361,29 +10361,19 @@ var _a, _b;
|
|
10361
10361
|
*
|
10362
10362
|
*/
|
10363
10363
|
var settingRender = [
|
10364
|
-
{
|
10365
|
-
title: 'Banner',
|
10366
|
-
child: [
|
10367
|
-
{
|
10368
|
-
type: 'Switch',
|
10369
|
-
label: 'Banner图开关',
|
10370
|
-
name: ['props', 'showBanner']
|
10371
|
-
}
|
10372
|
-
]
|
10373
|
-
},
|
10374
10364
|
{
|
10375
10365
|
title: '卡片样式',
|
10376
10366
|
child: [
|
10367
|
+
// {
|
10368
|
+
// type: 'Number',
|
10369
|
+
// label: '文本行数',
|
10370
|
+
// name: ['props', 'lineClamp']
|
10371
|
+
// },
|
10377
10372
|
{
|
10378
10373
|
type: 'Number',
|
10379
10374
|
label: '上下边距',
|
10380
10375
|
name: ['props', 'space'],
|
10381
10376
|
addonAfter: 'px'
|
10382
|
-
},
|
10383
|
-
{
|
10384
|
-
type: 'Switch',
|
10385
|
-
label: '固定宽高',
|
10386
|
-
name: ['props', 'isWaterfallFlow']
|
10387
10377
|
}
|
10388
10378
|
]
|
10389
10379
|
},
|
@@ -11853,14 +11843,9 @@ var previewData = {
|
|
11853
11843
|
};
|
11854
11844
|
|
11855
11845
|
const WaterfallFlowItem = (props) => {
|
11856
|
-
const { rec,
|
11857
|
-
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
11846
|
+
const { rec, index, list, reportTagsView, textStyles, space } = props;
|
11847
|
+
const { swiperRef, setRtcList, setOpenHashtag, bffEventReport, sxpParameter } = useSxpDataSource();
|
11858
11848
|
const [showVideo, setShowVideo] = React.useState(false);
|
11859
|
-
const [isLoading, setIsLoading] = React.useState(false);
|
11860
|
-
const [imgInfo, setImgInfo] = React.useState({
|
11861
|
-
height: 1,
|
11862
|
-
width: 1
|
11863
|
-
});
|
11864
11849
|
const imgDom = React.useRef(null);
|
11865
11850
|
const ref = React.useRef(null);
|
11866
11851
|
const videoDom = React.useRef(null);
|
@@ -11885,26 +11870,6 @@ const WaterfallFlowItem = (props) => {
|
|
11885
11870
|
var _a, _b;
|
11886
11871
|
return ((_a = rec === null || rec === void 0 ? void 0 : rec.product) === null || _a === void 0 ? void 0 : _a.title) || ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) || null;
|
11887
11872
|
}, [rec]);
|
11888
|
-
/** 离父亲上边框的距离 */
|
11889
|
-
const top = React.useMemo(() => {
|
11890
|
-
var _a;
|
11891
|
-
const y = style.transform
|
11892
|
-
? Number((_a = style.transform) === null || _a === void 0 ? void 0 : _a.substring(style.transform.indexOf(',', 0) + 1, style.transform.length - 3))
|
11893
|
-
: undefined;
|
11894
|
-
return y;
|
11895
|
-
}, [style]);
|
11896
|
-
/** 是否加载图片 */
|
11897
|
-
const isImgShow = React.useMemo(() => {
|
11898
|
-
if (top === undefined) {
|
11899
|
-
return false;
|
11900
|
-
}
|
11901
|
-
if (top <= showBorder) {
|
11902
|
-
return true;
|
11903
|
-
}
|
11904
|
-
else {
|
11905
|
-
return false;
|
11906
|
-
}
|
11907
|
-
}, [top, showBorder]);
|
11908
11873
|
const priceText = React.useMemo(() => {
|
11909
11874
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
11910
11875
|
if (((_a = rec === null || rec === void 0 ? void 0 : rec.product) === null || _a === void 0 ? void 0 : _a.currency) && ((_b = rec === null || rec === void 0 ? void 0 : rec.product) === null || _b === void 0 ? void 0 : _b.price)) {
|
@@ -11917,55 +11882,42 @@ const WaterfallFlowItem = (props) => {
|
|
11917
11882
|
}
|
11918
11883
|
}, [rec]);
|
11919
11884
|
// useEffect(() => {
|
11920
|
-
//
|
11921
|
-
//
|
11922
|
-
//
|
11923
|
-
//
|
11924
|
-
//
|
11925
|
-
//
|
11926
|
-
//
|
11927
|
-
//
|
11928
|
-
//
|
11929
|
-
//
|
11930
|
-
//
|
11931
|
-
//
|
11932
|
-
//
|
11933
|
-
// });
|
11934
|
-
// });
|
11935
|
-
// observer.observe(ref.current);
|
11936
|
-
// return () => {
|
11937
|
-
// observer.disconnect();
|
11938
|
-
// };
|
11885
|
+
// if (imgDom.current === null || src === '') {
|
11886
|
+
// return;
|
11887
|
+
// }
|
11888
|
+
// const img = new Image();
|
11889
|
+
// if (showVideo && firstFrameSrc) {
|
11890
|
+
// img.src = firstFrameSrc;
|
11891
|
+
// } else {
|
11892
|
+
// img.src = src;
|
11893
|
+
// }
|
11894
|
+
// // img.onload = () => {
|
11895
|
+
// // setIsLoading(true);
|
11896
|
+
// // };
|
11897
|
+
// imgDom.current.src = img.src;
|
11939
11898
|
// }, [src, showVideo, firstFrameSrc]);
|
11940
11899
|
React.useEffect(() => {
|
11941
|
-
|
11942
|
-
|
11943
|
-
|
11944
|
-
|
11945
|
-
|
11946
|
-
|
11947
|
-
|
11948
|
-
|
11949
|
-
|
11950
|
-
|
11951
|
-
|
11952
|
-
|
11953
|
-
|
11954
|
-
|
11900
|
+
const observer = new IntersectionObserver((entries) => {
|
11901
|
+
entries.forEach((entry) => {
|
11902
|
+
if (entry.isIntersecting) {
|
11903
|
+
if (ref.current === null || src === '') {
|
11904
|
+
return;
|
11905
|
+
}
|
11906
|
+
if (showVideo && firstFrameSrc) {
|
11907
|
+
imgDom.current.setSrc(firstFrameSrc);
|
11908
|
+
}
|
11909
|
+
else {
|
11910
|
+
imgDom.current.setSrc(src);
|
11911
|
+
}
|
11912
|
+
observer.unobserve(ref.current);
|
11913
|
+
}
|
11955
11914
|
});
|
11956
|
-
|
11915
|
+
});
|
11916
|
+
observer.observe(ref.current);
|
11917
|
+
return () => {
|
11918
|
+
observer.disconnect();
|
11957
11919
|
};
|
11958
|
-
|
11959
|
-
imgDom.current.src = img.src;
|
11960
|
-
}, [src, showVideo, firstFrameSrc, isImgShow]);
|
11961
|
-
React.useEffect(() => {
|
11962
|
-
// 通过宽度比例获取图片高度
|
11963
|
-
const height = imgInfo.height * (unitWidth / imgInfo.width);
|
11964
|
-
if (isLoading) {
|
11965
|
-
// 加40是因为下方文字部分高度为40,可以自己设置
|
11966
|
-
sizeChange(height + 76 + space, index);
|
11967
|
-
}
|
11968
|
-
}, [imgInfo, index, unitWidth, isLoading, space]); /* 增加sizeChange依赖项会导致在admin预览编辑时无限刷新 */
|
11920
|
+
}, [src, showVideo, firstFrameSrc]);
|
11969
11921
|
const calculateHeightForWidth = (videoWidth, videoHeight, targetWidth) => {
|
11970
11922
|
const aspectRatio = videoWidth / videoHeight;
|
11971
11923
|
const targetHeight = targetWidth / aspectRatio;
|
@@ -12003,135 +11955,40 @@ const WaterfallFlowItem = (props) => {
|
|
12003
11955
|
setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(false);
|
12004
11956
|
}, 0);
|
12005
11957
|
};
|
12006
|
-
return (React.createElement("div", { ref: ref,
|
12007
|
-
React.createElement("div", { className: '
|
11958
|
+
return (React.createElement("div", { ref: ref, className: 'list-content-listItem', key: index, onClick: handleClickToDetail, style: { marginBottom: space } },
|
11959
|
+
React.createElement("div", { className: 'list-content-listItem-picture' },
|
12008
11960
|
showVideo && (React.createElement("div", { style: { display: 'none' } },
|
12009
|
-
React.createElement("video", { ref: videoDom,
|
11961
|
+
React.createElement("video", { ref: videoDom, crossOrigin: 'anonymous', className: 'list-content-listItem-picture-img' }),
|
12010
11962
|
React.createElement("canvas", { ref: canvasRef }))),
|
12011
|
-
React.createElement(
|
12012
|
-
React.createElement("div", { className: '
|
12013
|
-
React.createElement("div", { className: `${'
|
12014
|
-
React.createElement("div", { className: '
|
11963
|
+
React.createElement(FormatImage$1, { loading: 'lazy', className: 'list-content-listItem-picture-img', ref: imgDom })),
|
11964
|
+
React.createElement("div", { className: 'list-content-listItem-info' },
|
11965
|
+
React.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),
|
11966
|
+
React.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.price, hidden: !priceText }, priceText))));
|
12015
11967
|
};
|
12016
11968
|
function WaterfallList(_a) {
|
12017
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o
|
11969
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
12018
11970
|
var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
|
12019
11971
|
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
12020
|
-
|
12021
|
-
const scrollParent = React.useRef(null);
|
12022
|
-
/** 向上滚动的距离 */
|
12023
|
-
const [scrollTop, setScrollTop] = React.useState(0);
|
12024
|
-
/** 数据列表 */
|
11972
|
+
const [list, setList] = React.useState();
|
12025
11973
|
const [data, setData] = React.useState();
|
12026
|
-
const waterfallFlowDom = React.useRef(null);
|
12027
|
-
/** 样式列表 */
|
12028
|
-
const [styleList, setStyleList] = React.useState([]);
|
12029
|
-
const styleListRef = React.useRef();
|
12030
|
-
/** 自定义骨架屏高度 */
|
12031
|
-
const heightList = [170, 230, 300];
|
12032
|
-
/** 到达底部 */
|
12033
11974
|
const [isLoadingData, setIsLoadingData] = React.useState(false);
|
12034
|
-
const
|
12035
|
-
const
|
12036
|
-
|
12037
|
-
|
12038
|
-
|
12039
|
-
|
12040
|
-
|
12041
|
-
|
12042
|
-
|
12043
|
-
|
12044
|
-
|
12045
|
-
|
12046
|
-
|
12047
|
-
|
12048
|
-
|
12049
|
-
|
12050
|
-
|
12051
|
-
}
|
12052
|
-
else {
|
12053
|
-
return 2;
|
12054
|
-
}
|
12055
|
-
}, [frameInfo]);
|
12056
|
-
/** 每一个的宽度 */
|
12057
|
-
const unitWidth = React.useMemo(() => {
|
12058
|
-
return frameInfo.width / rowsNum - 2;
|
12059
|
-
}, [rowsNum, frameInfo]);
|
12060
|
-
/** 获取位置 */
|
12061
|
-
const getStyleList = React.useCallback(() => {
|
12062
|
-
var _a;
|
12063
|
-
const temporaryStyleList = (_a = styleListRef.current) !== null && _a !== void 0 ? _a : [];
|
12064
|
-
/** 目前最下一行的index */
|
12065
|
-
const bottomItemIndex = [];
|
12066
|
-
for (let i = 0; i < (list === null || list === void 0 ? void 0 : list.length); i++) {
|
12067
|
-
// 原本应对应的行数
|
12068
|
-
const currentRow = Math.floor(i / rowsNum);
|
12069
|
-
//
|
12070
|
-
const remainder = (i % rowsNum) + 1;
|
12071
|
-
// 最低item下标
|
12072
|
-
let minHeightInd = 0;
|
12073
|
-
// 最低高度
|
12074
|
-
let minHeight = 9999999999;
|
12075
|
-
// 寻找最低高度的下标
|
12076
|
-
if (currentRow === 0) {
|
12077
|
-
bottomItemIndex[i] = i;
|
12078
|
-
}
|
12079
|
-
else {
|
12080
|
-
for (let j = 0; j < bottomItemIndex.length; j++) {
|
12081
|
-
if (waterfallFlowListInfo.current[bottomItemIndex[j]].top +
|
12082
|
-
waterfallFlowListInfo.current[bottomItemIndex[j]].height <
|
12083
|
-
minHeight) {
|
12084
|
-
minHeightInd = j;
|
12085
|
-
minHeight =
|
12086
|
-
waterfallFlowListInfo.current[bottomItemIndex[j]].top +
|
12087
|
-
waterfallFlowListInfo.current[bottomItemIndex[j]].height;
|
12088
|
-
}
|
12089
|
-
}
|
12090
|
-
bottomItemIndex[minHeightInd] = i;
|
12091
|
-
}
|
12092
|
-
if (waterfallFlowListInfo.current[i] === undefined) {
|
12093
|
-
waterfallFlowListInfo.current[i] = {};
|
12094
|
-
}
|
12095
|
-
// 第一行特殊处理,一定是从左到右铺的
|
12096
|
-
if (currentRow === 0) {
|
12097
|
-
if (remainder === 1) {
|
12098
|
-
waterfallFlowListInfo.current[i].left = 0;
|
12099
|
-
}
|
12100
|
-
else {
|
12101
|
-
waterfallFlowListInfo.current[i].left = waterfallFlowListInfo.current[i - 1].left + unitWidth + 4;
|
12102
|
-
}
|
12103
|
-
waterfallFlowListInfo.current[i].top = 0;
|
12104
|
-
}
|
12105
|
-
// 剩下的行数,铺在当前最低高度下面
|
12106
|
-
else {
|
12107
|
-
waterfallFlowListInfo.current[i].left = waterfallFlowListInfo.current[minHeightInd].left;
|
12108
|
-
waterfallFlowListInfo.current[i].top = minHeight;
|
12109
|
-
}
|
12110
|
-
// 是否已经有高度,有高度使用已有高度,否则随机生成
|
12111
|
-
waterfallFlowListInfo.current[i].height =
|
12112
|
-
waterfallFlowListInfo.current[i].height || heightList[createRandomNum(0, 2)];
|
12113
|
-
temporaryStyleList[i] = {
|
12114
|
-
transform: `translate(${waterfallFlowListInfo.current[i].left}px,${waterfallFlowListInfo.current[i].top}px)`,
|
12115
|
-
width: `${unitWidth}px`,
|
12116
|
-
height: waterfallFlowListInfo.current[i].height
|
12117
|
-
};
|
12118
|
-
}
|
12119
|
-
setStyleList([...temporaryStyleList]);
|
12120
|
-
return [...temporaryStyleList];
|
12121
|
-
}, [unitWidth, rowsNum, heightList, createRandomNum, list]);
|
12122
|
-
/** 图片加载完更新高度 */
|
12123
|
-
const onSizeChange = React.useCallback((height, index) => {
|
12124
|
-
if (waterfallFlowListInfo.current[index] === undefined) {
|
12125
|
-
waterfallFlowListInfo.current[index] = {};
|
12126
|
-
}
|
12127
|
-
waterfallFlowListInfo.current[index].height = height;
|
12128
|
-
styleListRef.current = getStyleList();
|
12129
|
-
}, [getStyleList]);
|
12130
|
-
/** 大小、数量发生变化时触发 */
|
12131
|
-
React.useEffect(() => {
|
12132
|
-
styleListRef.current = getStyleList();
|
12133
|
-
}, [unitWidth, rowsNum, list]); /* 增加getStyleList依赖项会导致在admin预览编辑时无限刷新 */
|
12134
|
-
/** 初始化请求数据 */
|
11975
|
+
const containerRef = React.useRef(null);
|
11976
|
+
const [isLoadMore, setIsLoadMore] = React.useState(false);
|
11977
|
+
React.useCallback(() => {
|
11978
|
+
if (isLoadMore)
|
11979
|
+
return;
|
11980
|
+
setIsLoadMore(true);
|
11981
|
+
waterFallData &&
|
11982
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
11983
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
|
11984
|
+
'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
|
11985
|
+
'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
|
11986
|
+
}).then((res) => {
|
11987
|
+
var _a;
|
11988
|
+
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 : []));
|
11989
|
+
setIsLoadMore(false);
|
11990
|
+
}));
|
11991
|
+
}, [waterFallData, getRecommendVideos, list, isLoadMore]);
|
12135
11992
|
React.useEffect(() => {
|
12136
11993
|
var _a, _b;
|
12137
11994
|
setIsLoadingData(true);
|
@@ -12155,60 +12012,22 @@ function WaterfallList(_a) {
|
|
12155
12012
|
setIsLoadingData(false);
|
12156
12013
|
}
|
12157
12014
|
}, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
|
12158
|
-
|
12159
|
-
|
12160
|
-
|
12161
|
-
|
12162
|
-
|
12163
|
-
|
12164
|
-
|
12165
|
-
|
12166
|
-
|
12167
|
-
|
12168
|
-
|
12169
|
-
|
12170
|
-
|
12171
|
-
|
12172
|
-
|
12173
|
-
|
12174
|
-
resizeObserver.observe(waterfallFlowDom.current);
|
12175
|
-
return () => {
|
12176
|
-
resizeObserver.disconnect();
|
12177
|
-
};
|
12178
|
-
}, [onResize]);
|
12179
|
-
React.useCallback(() => {
|
12180
|
-
setIsLoadingData(true);
|
12181
|
-
waterFallData &&
|
12182
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
12183
|
-
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
|
12184
|
-
'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
|
12185
|
-
'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
|
12186
|
-
}).then((res) => {
|
12187
|
-
var _a, _b;
|
12188
|
-
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 : []));
|
12189
|
-
setIsLoadingData(false);
|
12190
|
-
}));
|
12191
|
-
}, [waterFallData, getRecommendVideos, list]);
|
12192
|
-
const onScroll = React.useCallback(() => {
|
12193
|
-
// 记录滚动值
|
12194
|
-
setScrollTop(scrollParent.current.scrollTop);
|
12195
|
-
// const top = (scrollParent.current as any).scrollTop;
|
12196
|
-
// const clientHeight = (scrollParent.current as any).clientHeight;
|
12197
|
-
// const scrollHeight = (scrollParent.current as any).scrollHeight;
|
12198
|
-
// // 做底部加载
|
12199
|
-
// if (scrollHeight <= top + clientHeight && !isLoadingData) {
|
12200
|
-
// loadMoreData();
|
12201
|
-
// }
|
12202
|
-
}, []);
|
12203
|
-
/** 监听滚动 */
|
12204
|
-
React.useEffect(() => {
|
12205
|
-
var _a;
|
12206
|
-
(_a = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.current) === null || _a === void 0 ? void 0 : _a.addEventListener('scroll', onScroll);
|
12207
|
-
return () => {
|
12208
|
-
var _a;
|
12209
|
-
(_a = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('scroll', onScroll);
|
12210
|
-
};
|
12211
|
-
}, [onScroll, scrollParent]);
|
12015
|
+
// useEffect(() => {
|
12016
|
+
// const container = containerRef?.current;
|
12017
|
+
// if (!container) return;
|
12018
|
+
// const handleScroll = () => {
|
12019
|
+
// const top = (container as any)?.scrollTop;
|
12020
|
+
// const clientHeight = (container as any)?.clientHeight;
|
12021
|
+
// const scrollHeight = (container as any)?.scrollHeight;
|
12022
|
+
// if (scrollHeight <= top + clientHeight && !isLoadingData) {
|
12023
|
+
// loadMoreData();
|
12024
|
+
// }
|
12025
|
+
// };
|
12026
|
+
// container?.addEventListener('scroll', handleScroll);
|
12027
|
+
// return () => {
|
12028
|
+
// container?.removeEventListener('scroll', handleScroll); // 在组件卸载时移除事件监听器
|
12029
|
+
// };
|
12030
|
+
// }, [isLoadingData, containerRef, loadMoreData]);
|
12212
12031
|
const handleClickLink = () => {
|
12213
12032
|
var _a, _b;
|
12214
12033
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
@@ -12217,27 +12036,20 @@ function WaterfallList(_a) {
|
|
12217
12036
|
}
|
12218
12037
|
};
|
12219
12038
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
12220
|
-
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { className: '
|
12221
|
-
React.createElement("div", { className: '
|
12222
|
-
React.createElement("div", { className: '
|
12223
|
-
React.createElement("div", { hidden: !((_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.link), className: '
|
12224
|
-
React.createElement("div", { className: '
|
12225
|
-
|
12226
|
-
|
12227
|
-
|
12228
|
-
|
12229
|
-
|
12230
|
-
|
12231
|
-
|
12232
|
-
|
12233
|
-
|
12234
|
-
height: ((_o = data === null || data === void 0 ? void 0 : data.tag) === null || _o === void 0 ? void 0 : _o.link)
|
12235
|
-
? ((_p = buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) === null || _p === void 0 ? void 0 : _p.offsetHeight) || ((_q = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _q === void 0 ? void 0 : _q.height) || '100px'
|
12236
|
-
: 0
|
12237
|
-
} }))),
|
12238
|
-
React.createElement("div", { className: 'waterFallList-bottom', hidden: !((_r = data === null || data === void 0 ? void 0 : data.tag) === null || _r === void 0 ? void 0 : _r.link), style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
|
12239
|
-
React.createElement("div", { ref: buttonRef, hidden: !((_s = data === null || data === void 0 ? void 0 : data.tag) === null || _s === void 0 ? void 0 : _s.link), className: 'waterFallList-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
|
12240
|
-
React.createElement("button", { className: 'waterFallList-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_t = data === null || data === void 0 ? void 0 : data.tag) === null || _t === void 0 ? void 0 : _t.linkTitle) || 'Shop the collection'))))));
|
12039
|
+
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { className: 'list' },
|
12040
|
+
React.createElement("div", { className: 'list-scroll', ref: containerRef },
|
12041
|
+
React.createElement("div", { className: 'list-info', style: (_b = props === null || props === void 0 ? void 0 : props.textStyles) === null || _b === void 0 ? void 0 : _b.hashTagDesc }, (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.info),
|
12042
|
+
React.createElement("div", { hidden: !((_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.link), className: 'list-collection', onClick: handleClickLink, style: Object.assign(Object.assign({}, (_e = props === null || props === void 0 ? void 0 : props.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagLink), { 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'),
|
12043
|
+
React.createElement("div", { className: 'list-content' }, list === null || list === void 0 ? void 0 : list.map((item, ind) => {
|
12044
|
+
return (React.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, reportTagsView: reportTagsView }, props)));
|
12045
|
+
})),
|
12046
|
+
React.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading..."),
|
12047
|
+
React.createElement("div", { hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link), style: {
|
12048
|
+
height: ((_h = data === null || data === void 0 ? void 0 : data.tag) === null || _h === void 0 ? void 0 : _h.link) ? ((_j = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _j === void 0 ? void 0 : _j.height) || ((_k = props === null || props === void 0 ? void 0 : props.buttonStyle) === null || _k === void 0 ? void 0 : _k.height) || '100px' : 0
|
12049
|
+
} })),
|
12050
|
+
React.createElement("div", { className: 'list-bottom', hidden: !((_l = data === null || data === void 0 ? void 0 : data.tag) === null || _l === void 0 ? void 0 : _l.link), style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
|
12051
|
+
React.createElement("div", { hidden: !((_m = data === null || data === void 0 ? void 0 : data.tag) === null || _m === void 0 ? void 0 : _m.link), className: 'list-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
|
12052
|
+
React.createElement("button", { className: 'list-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_o = data === null || data === void 0 ? void 0 : data.tag) === null || _o === void 0 ? void 0 : _o.linkTitle) || 'Shop the collection'))))));
|
12241
12053
|
}
|
12242
12054
|
|
12243
12055
|
var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
|
@@ -12246,7 +12058,7 @@ var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
|
|
12246
12058
|
* @Author: binruan@chatlabs.com
|
12247
12059
|
* @Date: 2024-01-10 10:58:24
|
12248
12060
|
* @LastEditors: binruan@chatlabs.com
|
12249
|
-
* @LastEditTime: 2024-
|
12061
|
+
* @LastEditTime: 2024-04-15 17:57:59
|
12250
12062
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
|
12251
12063
|
*
|
12252
12064
|
*/
|