pb-sxp-ui 1.0.47 → 1.0.48

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/pb-ui.js CHANGED
@@ -8408,10 +8408,10 @@
8408
8408
  React.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
8409
8409
  React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
8410
8410
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8411
- React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8412
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8413
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8414
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8411
+ React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8412
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8413
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8414
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8415
8415
  18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
8416
8416
  };
8417
8417
  const renderBtn = () => {
@@ -8862,7 +8862,7 @@
8862
8862
  const productInfoText = ({ isPost }) => {
8863
8863
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8864
8864
  React.createElement(ExpandableText$1, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
8865
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8865
+ `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8866
8866
  Made in Italy` })));
8867
8867
  };
8868
8868
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
@@ -11690,7 +11690,7 @@ Made in Italy` })));
11690
11690
  React.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.price, hidden: !priceText }, priceText))));
11691
11691
  };
11692
11692
  function WaterfallList(_a) {
11693
- var _b, _c, _d, _e, _f, _g, _h, _j, _k;
11693
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
11694
11694
  var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
11695
11695
  const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
11696
11696
  const [list, setList] = React.useState();
@@ -11767,16 +11767,12 @@ Made in Italy` })));
11767
11767
  return (React.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, reportTagsView: reportTagsView }, props)));
11768
11768
  })),
11769
11769
  React.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading..."),
11770
- React.createElement("div", {
11771
- // hidden={!data?.tag?.link}
11772
- style: {
11773
- height: ((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link) ? ((_h = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _h === void 0 ? void 0 : _h.height) || ((_j = props === null || props === void 0 ? void 0 : props.buttonStyle) === null || _j === void 0 ? void 0 : _j.height) || '100px' : 0
11770
+ React.createElement("div", { hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link), style: {
11771
+ 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
11774
11772
  } })),
11775
- React.createElement("div", { className: 'list-bottom', style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
11776
- React.createElement("div", {
11777
- // hidden={!data?.tag?.link}
11778
- className: 'list-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
11779
- React.createElement("button", { className: 'list-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_k = data === null || data === void 0 ? void 0 : data.tag) === null || _k === void 0 ? void 0 : _k.linkTitle) || 'Shop the collection'))))));
11773
+ 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 }),
11774
+ 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' }) },
11775
+ 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'))))));
11780
11776
  }
11781
11777
 
11782
11778
  var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
@@ -12067,6 +12063,33 @@ Made in Italy` })));
12067
12063
  const [firstFrameSrc, setFirstFrameSrc] = React.useState('');
12068
12064
  const videoId = `pb-cache-video-${index}`;
12069
12065
  const videoEleRef = React.useRef(null);
12066
+ const blur = React.useMemo(() => {
12067
+ return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
12068
+ }, [videoPostConfig]);
12069
+ const translateY = React.useMemo(() => {
12070
+ var _a;
12071
+ return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2'
12072
+ ? `translateY(-${50 + ((_a = videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%) translate3d(0px, 0px, 0px)`
12073
+ : 'translateY(-50%)';
12074
+ }, [videoPostConfig]);
12075
+ const blurBgSrc = React.useMemo(() => {
12076
+ var _a;
12077
+ return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
12078
+ }, [firstFrameSrc, rec]);
12079
+ const blurStyle = React.useMemo(() => {
12080
+ return blur
12081
+ ? {
12082
+ filter: 'blur(10px)',
12083
+ transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
12084
+ }
12085
+ : {};
12086
+ }, [blur]);
12087
+ const isBgColor = React.useMemo(() => {
12088
+ return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgWay) === '1';
12089
+ }, [videoPostConfig]);
12090
+ const bgStyle = React.useMemo(() => {
12091
+ return isBgColor && (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor) ? { backgroundColor: videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor } : {};
12092
+ }, [videoPostConfig, isBgColor]);
12070
12093
  React.useEffect(() => {
12071
12094
  if (!videoRef)
12072
12095
  return;
@@ -12107,15 +12130,39 @@ Made in Italy` })));
12107
12130
  setIsFirstPlay(false);
12108
12131
  }
12109
12132
  }, [bffEventReport, data, index, isFirstPlay, videoRef]);
12133
+ const handLoadeddata = React.useCallback(() => {
12134
+ var _a;
12135
+ if (!videoRef || isBgColor || firstFrameSrc)
12136
+ return;
12137
+ const videoDomRef = document.getElementById('player-container-id_html5_api');
12138
+ if (((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || !canvasRef || !videoDomRef || !canvasRef.current)
12139
+ return;
12140
+ const setFrameImg = () => {
12141
+ const video = videoDomRef;
12142
+ const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
12143
+ const ctx = canvas.getContext('2d');
12144
+ const targetWidth = window === null || window === void 0 ? void 0 : window.innerWidth;
12145
+ const targetHeight = window === null || window === void 0 ? void 0 : window.innerHeight;
12146
+ canvas.height = targetHeight;
12147
+ canvas.width = targetWidth;
12148
+ ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
12149
+ setFirstFrameSrc(canvas.toDataURL());
12150
+ };
12151
+ setFrameImg();
12152
+ setTimeout(() => {
12153
+ setFrameImg();
12154
+ }, 500);
12155
+ }, [videoRef, isBgColor, rec, firstFrameSrc]);
12110
12156
  const handleLoadedmetadata = React.useCallback(() => {
12111
12157
  if (!videoRef)
12112
12158
  return;
12113
- if (activeIndex !== index) {
12114
- videoRef === null || videoRef === void 0 ? void 0 : videoRef.play();
12115
- videoRef === null || videoRef === void 0 ? void 0 : videoRef.pause();
12116
- }
12159
+ handLoadeddata();
12160
+ // if (activeIndex !== index) {
12161
+ // videoRef?.play();
12162
+ // videoRef?.pause();
12163
+ // }
12117
12164
  setIsLoadFinish(true);
12118
- }, [activeIndex, index, videoRef]);
12165
+ }, [videoRef, handLoadeddata]);
12119
12166
  const handleCanplay = React.useCallback(() => {
12120
12167
  setIsLoadFinish(true);
12121
12168
  }, []);
@@ -12176,57 +12223,7 @@ Made in Italy` })));
12176
12223
  }
12177
12224
  });
12178
12225
  }
12179
- }, [data, index, bffEventReport, videoRef]);
12180
- const blur = React.useMemo(() => {
12181
- return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
12182
- }, [videoPostConfig]);
12183
- const translateY = React.useMemo(() => {
12184
- var _a;
12185
- return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2'
12186
- ? `translateY(-${50 + ((_a = videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%) translate3d(0px, 0px, 0px)`
12187
- : 'translateY(-50%)';
12188
- }, [videoPostConfig]);
12189
- const blurBgSrc = React.useMemo(() => {
12190
- var _a;
12191
- return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
12192
- }, [firstFrameSrc, rec]);
12193
- const blurStyle = React.useMemo(() => {
12194
- return blur
12195
- ? {
12196
- filter: 'blur(10px)',
12197
- transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
12198
- }
12199
- : {};
12200
- }, [blur]);
12201
- const isBgColor = React.useMemo(() => {
12202
- return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgWay) === '1';
12203
- }, [videoPostConfig]);
12204
- const bgStyle = React.useMemo(() => {
12205
- return isBgColor && (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor) ? { backgroundColor: videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor } : {};
12206
- }, [videoPostConfig, isBgColor]);
12207
- const handLoadeddata = React.useCallback(() => {
12208
- var _a;
12209
- if (!videoRef || isBgColor)
12210
- return;
12211
- const videoDomRef = document.getElementById('player-container-id_html5_api');
12212
- if (((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || !canvasRef || !videoDomRef || !canvasRef.current)
12213
- return;
12214
- const setFrameImg = () => {
12215
- const video = videoDomRef;
12216
- const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
12217
- const ctx = canvas.getContext('2d');
12218
- const targetWidth = window === null || window === void 0 ? void 0 : window.innerWidth;
12219
- const targetHeight = window === null || window === void 0 ? void 0 : window.innerHeight;
12220
- canvas.height = targetHeight;
12221
- canvas.width = targetWidth;
12222
- ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
12223
- setFirstFrameSrc(canvas.toDataURL());
12224
- };
12225
- setFrameImg();
12226
- setTimeout(() => {
12227
- setFrameImg();
12228
- }, 500);
12229
- }, [videoRef, isBgColor, rec]);
12226
+ }, [data, index, bffEventReport, videoRef, activeIndex]);
12230
12227
  React.useEffect(() => {
12231
12228
  if (!isActive || !videoRef)
12232
12229
  return;
@@ -12240,6 +12237,7 @@ Made in Italy` })));
12240
12237
  if (!dom && !dom2)
12241
12238
  return;
12242
12239
  videoPlayerWrapperNode === null || videoPlayerWrapperNode === void 0 ? void 0 : videoPlayerWrapperNode.appendChild(dom || dom2);
12240
+ videoRef.poster('https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240218/fsTan2fgYKJWrCpJtGZPogm0NnvdT1708239153661.jpeg');
12243
12241
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
12244
12242
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadedmetadata', handleLoadedmetadata);
12245
12243
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadeddata', handLoadeddata);