pb-sxp-ui 1.0.75 → 1.0.77

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 CHANGED
@@ -10361,19 +10361,29 @@ 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
+ },
10364
10374
  {
10365
10375
  title: '卡片样式',
10366
10376
  child: [
10367
- // {
10368
- // type: 'Number',
10369
- // label: '文本行数',
10370
- // name: ['props', 'lineClamp']
10371
- // },
10372
10377
  {
10373
10378
  type: 'Number',
10374
10379
  label: '上下边距',
10375
10380
  name: ['props', 'space'],
10376
10381
  addonAfter: 'px'
10382
+ },
10383
+ {
10384
+ type: 'Switch',
10385
+ label: '固定宽高',
10386
+ name: ['props', 'isWaterfallFlow']
10377
10387
  }
10378
10388
  ]
10379
10389
  },
@@ -11843,9 +11853,14 @@ var previewData = {
11843
11853
  };
11844
11854
 
11845
11855
  const WaterfallFlowItem = (props) => {
11846
- const { rec, index, list, reportTagsView, textStyles, space } = props;
11847
- const { swiperRef, setRtcList, setOpenHashtag, bffEventReport, sxpParameter } = useSxpDataSource();
11856
+ const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
11857
+ const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
11848
11858
  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
+ });
11849
11864
  const imgDom = React.useRef(null);
11850
11865
  const ref = React.useRef(null);
11851
11866
  const videoDom = React.useRef(null);
@@ -11870,6 +11885,26 @@ const WaterfallFlowItem = (props) => {
11870
11885
  var _a, _b;
11871
11886
  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;
11872
11887
  }, [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]);
11873
11908
  const priceText = React.useMemo(() => {
11874
11909
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
11875
11910
  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)) {
@@ -11882,42 +11917,55 @@ const WaterfallFlowItem = (props) => {
11882
11917
  }
11883
11918
  }, [rec]);
11884
11919
  // useEffect(() => {
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;
11920
+ // const observer = new IntersectionObserver((entries) => {
11921
+ // entries.forEach((entry) => {
11922
+ // if (entry.isIntersecting) {
11923
+ // if (ref.current === null || src === '') {
11924
+ // return;
11925
+ // }
11926
+ // if (showVideo && firstFrameSrc) {
11927
+ // imgDom.current.setSrc(firstFrameSrc);
11928
+ // } else {
11929
+ // imgDom.current.setSrc(src);
11930
+ // }
11931
+ // observer.unobserve(ref.current);
11932
+ // }
11933
+ // });
11934
+ // });
11935
+ // observer.observe(ref.current);
11936
+ // return () => {
11937
+ // observer.disconnect();
11938
+ // };
11898
11939
  // }, [src, showVideo, firstFrameSrc]);
11899
11940
  React.useEffect(() => {
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
- }
11941
+ if (imgDom.current === null || src === '' || isImgShow === false) {
11942
+ return;
11943
+ }
11944
+ const img = new Image();
11945
+ if (showVideo && firstFrameSrc) {
11946
+ img.src = firstFrameSrc;
11947
+ }
11948
+ else {
11949
+ img.src = src;
11950
+ }
11951
+ img.onload = () => {
11952
+ setImgInfo({
11953
+ height: img.height,
11954
+ width: img.width
11914
11955
  });
11915
- });
11916
- observer.observe(ref.current);
11917
- return () => {
11918
- observer.disconnect();
11956
+ setIsLoading(true);
11919
11957
  };
11920
- }, [src, showVideo, firstFrameSrc]);
11958
+ // imgDom.current.setSrc(img.src);
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预览编辑时无限刷新 */
11921
11969
  const calculateHeightForWidth = (videoWidth, videoHeight, targetWidth) => {
11922
11970
  const aspectRatio = videoWidth / videoHeight;
11923
11971
  const targetHeight = targetWidth / aspectRatio;
@@ -11955,40 +12003,135 @@ const WaterfallFlowItem = (props) => {
11955
12003
  setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(false);
11956
12004
  }, 0);
11957
12005
  };
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' },
12006
+ return (React.createElement("div", { ref: ref, style: Object.assign({}, style), className: 'waterFallList-content-listItem', key: index, onClick: handleClickToDetail },
12007
+ React.createElement("div", { className: 'waterFallList-content-listItem-picture' },
11960
12008
  showVideo && (React.createElement("div", { style: { display: 'none' } },
11961
- React.createElement("video", { ref: videoDom, crossOrigin: 'anonymous', className: 'list-content-listItem-picture-img' }),
12009
+ React.createElement("video", { ref: videoDom, src: src, crossOrigin: 'anonymous', className: 'waterFallList-content-listItem-picture-img' }),
11962
12010
  React.createElement("canvas", { ref: canvasRef }))),
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))));
12011
+ React.createElement("img", { loading: 'lazy', className: 'waterFallList-content-listItem-picture-img', ref: imgDom })),
12012
+ React.createElement("div", { className: 'waterFallList-content-listItem-info' },
12013
+ React.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),
12014
+ React.createElement("div", { className: 'waterFallList-content-listItem-info-price', hidden: !priceText, style: textStyles.price }, priceText))));
11967
12015
  };
11968
12016
  function WaterfallList(_a) {
11969
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
12017
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
11970
12018
  var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
11971
12019
  const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
11972
- const [list, setList] = React.useState();
12020
+ /** 滚动的父元素 */
12021
+ const scrollParent = React.useRef(null);
12022
+ /** 向上滚动的距离 */
12023
+ const [scrollTop, setScrollTop] = React.useState(0);
12024
+ /** 数据列表 */
11973
12025
  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
+ /** 到达底部 */
11974
12033
  const [isLoadingData, setIsLoadingData] = React.useState(false);
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]);
12034
+ const [list, setList] = React.useState([]);
12035
+ const buttonRef = React.useRef();
12036
+ /** 生成随机数 */
12037
+ const createRandomNum = React.useCallback((min, max) => {
12038
+ return Math.floor(Math.random() * (max - min + 1)) + min;
12039
+ }, []);
12040
+ const waterfallFlowListInfo = React.useRef([]);
12041
+ /** 当前容器信息 */
12042
+ const [frameInfo, setFrameInfoInfo] = React.useState({ width: 0 });
12043
+ /** 每行个数 */
12044
+ const rowsNum = React.useMemo(() => {
12045
+ const width = frameInfo.width || 0;
12046
+ if (width >= 1200) {
12047
+ return 6;
12048
+ }
12049
+ else if (width >= 768 && width <= 1199) {
12050
+ return 4;
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
+ /** 初始化请求数据 */
11992
12135
  React.useEffect(() => {
11993
12136
  var _a, _b;
11994
12137
  setIsLoadingData(true);
@@ -12012,22 +12155,60 @@ function WaterfallList(_a) {
12012
12155
  setIsLoadingData(false);
12013
12156
  }
12014
12157
  }, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
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]);
12158
+ const onResize = React.useCallback(() => {
12159
+ if (waterfallFlowDom.current === null) {
12160
+ return;
12161
+ }
12162
+ setFrameInfoInfo({
12163
+ width: waterfallFlowDom.current.getBoundingClientRect().width
12164
+ });
12165
+ }, []);
12166
+ /** 监听列表容器大小变化 */
12167
+ React.useEffect(() => {
12168
+ if (waterfallFlowDom.current === null) {
12169
+ return;
12170
+ }
12171
+ const resizeObserver = new ResizeObserver((entries) => {
12172
+ onResize();
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]);
12031
12212
  const handleClickLink = () => {
12032
12213
  var _a, _b;
12033
12214
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
@@ -12036,20 +12217,27 @@ function WaterfallList(_a) {
12036
12217
  }
12037
12218
  };
12038
12219
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
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'))))));
12220
+ React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { className: 'waterFallList', ref: waterfallFlowDom },
12221
+ React.createElement("div", { className: 'waterFallList-scroll', ref: scrollParent },
12222
+ React.createElement("div", { className: 'waterFallList-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),
12223
+ React.createElement("div", { hidden: !((_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.link), className: 'waterFallList-collection', style: Object.assign({}, (_e = props === null || props === void 0 ? void 0 : props.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagLink), onClick: handleClickLink }, ((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.linkTitle) || 'Shop the collection'),
12224
+ React.createElement("div", { className: 'waterFallList-content' }, list === null || list === void 0 ? void 0 :
12225
+ list.map((item, ind) => {
12226
+ var _a;
12227
+ return (React.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, showBorder: scrollTop + ((_a = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.current) === null || _a === void 0 ? void 0 : _a.clientHeight), style: styleList[ind], sizeChange: onSizeChange, unitWidth: unitWidth, reportTagsView: reportTagsView }, props)));
12228
+ }),
12229
+ React.createElement("div", { hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link), style: {
12230
+ position: 'absolute',
12231
+ width: '100%',
12232
+ transform: `translate(0px,${(_m = ((_j = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_h = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _h === void 0 ? void 0 : _h.length) - 1]) === null || _j === void 0 ? void 0 : _j.top) +
12233
+ ((_l = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current[((_k = waterfallFlowListInfo === null || waterfallFlowListInfo === void 0 ? void 0 : waterfallFlowListInfo.current) === null || _k === void 0 ? void 0 : _k.length) - 1]) === null || _l === void 0 ? void 0 : _l.height)) !== null && _m !== void 0 ? _m : 0}px)`,
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'))))));
12053
12241
  }
12054
12242
 
12055
12243
  var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
@@ -12058,7 +12246,7 @@ var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
12058
12246
  * @Author: binruan@chatlabs.com
12059
12247
  * @Date: 2024-01-10 10:58:24
12060
12248
  * @LastEditors: binruan@chatlabs.com
12061
- * @LastEditTime: 2024-04-15 17:57:59
12249
+ * @LastEditTime: 2024-06-06 17:19:25
12062
12250
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
12063
12251
  *
12064
12252
  */
@@ -12967,7 +13155,7 @@ var Tagbar$1 = React.memo(Tagbar);
12967
13155
  * @Author: binruan@chatlabs.com
12968
13156
  * @Date: 2024-01-15 19:03:09
12969
13157
  * @LastEditors: binruan@chatlabs.com
12970
- * @LastEditTime: 2024-05-30 11:35:35
13158
+ * @LastEditTime: 2024-06-06 18:42:24
12971
13159
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12972
13160
  *
12973
13161
  */
@@ -13027,7 +13215,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13027
13215
  };
13028
13216
  const firstRef = React.useRef();
13029
13217
  React.useEffect(() => {
13030
- var _a, _b, _c;
13218
+ var _a, _b, _c, _d;
13031
13219
  if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
13032
13220
  firstRef.current = true;
13033
13221
  const player = TCPlayer('player-container-id', {
@@ -13039,11 +13227,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13039
13227
  preload: 'auto',
13040
13228
  posterImage: false,
13041
13229
  bigPlayButton: true,
13042
- sources: [
13043
- {
13044
- src: (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data[0]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.url) !== null && _c !== void 0 ? _c : ''
13045
- }
13046
- ]
13230
+ sources: ((_b = (_a = data === null || data === void 0 ? void 0 : data[0]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.url)
13231
+ ? [
13232
+ {
13233
+ src: (_d = (_c = data === null || data === void 0 ? void 0 : data[0]) === null || _c === void 0 ? void 0 : _c.video) === null || _d === void 0 ? void 0 : _d.url
13234
+ }
13235
+ ]
13236
+ : []
13047
13237
  });
13048
13238
  player === null || player === void 0 ? void 0 : player.ready(() => {
13049
13239
  setVideoRef(player);