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/LICENSE +21 -21
- package/README.md +111 -111
- package/dist/index.cjs +69 -71
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +2 -0
- package/dist/index.js +69 -71
- 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 +69 -71
- 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/VideoWidget/index.js +54 -56
- package/es/core/components/SxpPageRender/WaterFall/List.js +6 -6
- package/es/materials/sxp/popup/CommodityDetail/index.js +4 -4
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +54 -56
- package/lib/core/components/SxpPageRender/WaterFall/List.js +6 -6
- package/lib/materials/sxp/popup/CommodityDetail/index.js +4 -4
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/package.json +115 -115
package/dist/index.css
CHANGED
@@ -62,6 +62,7 @@
|
|
62
62
|
|
63
63
|
.pb-commondity {
|
64
64
|
position: relative;
|
65
|
+
height: 100%;
|
65
66
|
}
|
66
67
|
.pb-commondity-content {
|
67
68
|
padding: 21px 19px 80px;
|
@@ -659,6 +660,7 @@
|
|
659
660
|
position: absolute;
|
660
661
|
top: 0;
|
661
662
|
width: 100%;
|
663
|
+
height: 100%;
|
662
664
|
overflow: auto;
|
663
665
|
}
|
664
666
|
.list-info {
|
package/dist/index.js
CHANGED
@@ -8394,10 +8394,10 @@ const CommodityDetail$1 = (_a) => {
|
|
8394
8394
|
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'),
|
8395
8395
|
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),
|
8396
8396
|
React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
8397
|
-
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
|
8398
|
-
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
8399
|
-
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
8400
|
-
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
8397
|
+
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
|
8398
|
+
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
8399
|
+
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
8400
|
+
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
8401
8401
|
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 }))));
|
8402
8402
|
};
|
8403
8403
|
const renderBtn = () => {
|
@@ -8848,7 +8848,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
8848
8848
|
const productInfoText = ({ isPost }) => {
|
8849
8849
|
return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
8850
8850
|
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) ||
|
8851
|
-
`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
|
8851
|
+
`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
|
8852
8852
|
Made in Italy` })));
|
8853
8853
|
};
|
8854
8854
|
return (React.createElement("div", { className: 'pb-commondityDiroNew' },
|
@@ -11676,7 +11676,7 @@ const WaterfallFlowItem = (props) => {
|
|
11676
11676
|
React.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.price, hidden: !priceText }, priceText))));
|
11677
11677
|
};
|
11678
11678
|
function WaterfallList(_a) {
|
11679
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
11679
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
11680
11680
|
var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
|
11681
11681
|
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
11682
11682
|
const [list, setList] = useState();
|
@@ -11753,16 +11753,12 @@ function WaterfallList(_a) {
|
|
11753
11753
|
return (React.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, reportTagsView: reportTagsView }, props)));
|
11754
11754
|
})),
|
11755
11755
|
React.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading..."),
|
11756
|
-
React.createElement("div", {
|
11757
|
-
|
11758
|
-
style: {
|
11759
|
-
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
|
11756
|
+
React.createElement("div", { hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link), style: {
|
11757
|
+
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
|
11760
11758
|
} })),
|
11761
|
-
React.createElement("div", { className: 'list-bottom', style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
|
11762
|
-
React.createElement("div", {
|
11763
|
-
|
11764
|
-
className: 'list-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
|
11765
|
-
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'))))));
|
11759
|
+
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 }),
|
11760
|
+
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' }) },
|
11761
|
+
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'))))));
|
11766
11762
|
}
|
11767
11763
|
|
11768
11764
|
var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
|
@@ -12053,6 +12049,33 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12053
12049
|
const [firstFrameSrc, setFirstFrameSrc] = useState('');
|
12054
12050
|
const videoId = `pb-cache-video-${index}`;
|
12055
12051
|
const videoEleRef = useRef(null);
|
12052
|
+
const blur = useMemo(() => {
|
12053
|
+
return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
|
12054
|
+
}, [videoPostConfig]);
|
12055
|
+
const translateY = useMemo(() => {
|
12056
|
+
var _a;
|
12057
|
+
return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2'
|
12058
|
+
? `translateY(-${50 + ((_a = videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%) translate3d(0px, 0px, 0px)`
|
12059
|
+
: 'translateY(-50%)';
|
12060
|
+
}, [videoPostConfig]);
|
12061
|
+
const blurBgSrc = useMemo(() => {
|
12062
|
+
var _a;
|
12063
|
+
return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
|
12064
|
+
}, [firstFrameSrc, rec]);
|
12065
|
+
const blurStyle = useMemo(() => {
|
12066
|
+
return blur
|
12067
|
+
? {
|
12068
|
+
filter: 'blur(10px)',
|
12069
|
+
transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
|
12070
|
+
}
|
12071
|
+
: {};
|
12072
|
+
}, [blur]);
|
12073
|
+
const isBgColor = useMemo(() => {
|
12074
|
+
return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgWay) === '1';
|
12075
|
+
}, [videoPostConfig]);
|
12076
|
+
const bgStyle = useMemo(() => {
|
12077
|
+
return isBgColor && (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor) ? { backgroundColor: videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor } : {};
|
12078
|
+
}, [videoPostConfig, isBgColor]);
|
12056
12079
|
useEffect(() => {
|
12057
12080
|
if (!videoRef)
|
12058
12081
|
return;
|
@@ -12093,15 +12116,39 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12093
12116
|
setIsFirstPlay(false);
|
12094
12117
|
}
|
12095
12118
|
}, [bffEventReport, data, index, isFirstPlay, videoRef]);
|
12119
|
+
const handLoadeddata = useCallback(() => {
|
12120
|
+
var _a;
|
12121
|
+
if (!videoRef || isBgColor || firstFrameSrc)
|
12122
|
+
return;
|
12123
|
+
const videoDomRef = document.getElementById('player-container-id_html5_api');
|
12124
|
+
if (((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || !canvasRef || !videoDomRef || !canvasRef.current)
|
12125
|
+
return;
|
12126
|
+
const setFrameImg = () => {
|
12127
|
+
const video = videoDomRef;
|
12128
|
+
const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
|
12129
|
+
const ctx = canvas.getContext('2d');
|
12130
|
+
const targetWidth = window === null || window === void 0 ? void 0 : window.innerWidth;
|
12131
|
+
const targetHeight = window === null || window === void 0 ? void 0 : window.innerHeight;
|
12132
|
+
canvas.height = targetHeight;
|
12133
|
+
canvas.width = targetWidth;
|
12134
|
+
ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
|
12135
|
+
setFirstFrameSrc(canvas.toDataURL());
|
12136
|
+
};
|
12137
|
+
setFrameImg();
|
12138
|
+
setTimeout(() => {
|
12139
|
+
setFrameImg();
|
12140
|
+
}, 500);
|
12141
|
+
}, [videoRef, isBgColor, rec, firstFrameSrc]);
|
12096
12142
|
const handleLoadedmetadata = useCallback(() => {
|
12097
12143
|
if (!videoRef)
|
12098
12144
|
return;
|
12099
|
-
|
12100
|
-
|
12101
|
-
|
12102
|
-
|
12145
|
+
handLoadeddata();
|
12146
|
+
// if (activeIndex !== index) {
|
12147
|
+
// videoRef?.play();
|
12148
|
+
// videoRef?.pause();
|
12149
|
+
// }
|
12103
12150
|
setIsLoadFinish(true);
|
12104
|
-
}, [
|
12151
|
+
}, [videoRef, handLoadeddata]);
|
12105
12152
|
const handleCanplay = useCallback(() => {
|
12106
12153
|
setIsLoadFinish(true);
|
12107
12154
|
}, []);
|
@@ -12162,57 +12209,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12162
12209
|
}
|
12163
12210
|
});
|
12164
12211
|
}
|
12165
|
-
}, [data, index, bffEventReport, videoRef]);
|
12166
|
-
const blur = useMemo(() => {
|
12167
|
-
return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
|
12168
|
-
}, [videoPostConfig]);
|
12169
|
-
const translateY = useMemo(() => {
|
12170
|
-
var _a;
|
12171
|
-
return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2'
|
12172
|
-
? `translateY(-${50 + ((_a = videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%) translate3d(0px, 0px, 0px)`
|
12173
|
-
: 'translateY(-50%)';
|
12174
|
-
}, [videoPostConfig]);
|
12175
|
-
const blurBgSrc = useMemo(() => {
|
12176
|
-
var _a;
|
12177
|
-
return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
|
12178
|
-
}, [firstFrameSrc, rec]);
|
12179
|
-
const blurStyle = useMemo(() => {
|
12180
|
-
return blur
|
12181
|
-
? {
|
12182
|
-
filter: 'blur(10px)',
|
12183
|
-
transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
|
12184
|
-
}
|
12185
|
-
: {};
|
12186
|
-
}, [blur]);
|
12187
|
-
const isBgColor = useMemo(() => {
|
12188
|
-
return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgWay) === '1';
|
12189
|
-
}, [videoPostConfig]);
|
12190
|
-
const bgStyle = useMemo(() => {
|
12191
|
-
return isBgColor && (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor) ? { backgroundColor: videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor } : {};
|
12192
|
-
}, [videoPostConfig, isBgColor]);
|
12193
|
-
const handLoadeddata = useCallback(() => {
|
12194
|
-
var _a;
|
12195
|
-
if (!videoRef || isBgColor)
|
12196
|
-
return;
|
12197
|
-
const videoDomRef = document.getElementById('player-container-id_html5_api');
|
12198
|
-
if (((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || !canvasRef || !videoDomRef || !canvasRef.current)
|
12199
|
-
return;
|
12200
|
-
const setFrameImg = () => {
|
12201
|
-
const video = videoDomRef;
|
12202
|
-
const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
|
12203
|
-
const ctx = canvas.getContext('2d');
|
12204
|
-
const targetWidth = window === null || window === void 0 ? void 0 : window.innerWidth;
|
12205
|
-
const targetHeight = window === null || window === void 0 ? void 0 : window.innerHeight;
|
12206
|
-
canvas.height = targetHeight;
|
12207
|
-
canvas.width = targetWidth;
|
12208
|
-
ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
|
12209
|
-
setFirstFrameSrc(canvas.toDataURL());
|
12210
|
-
};
|
12211
|
-
setFrameImg();
|
12212
|
-
setTimeout(() => {
|
12213
|
-
setFrameImg();
|
12214
|
-
}, 500);
|
12215
|
-
}, [videoRef, isBgColor, rec]);
|
12212
|
+
}, [data, index, bffEventReport, videoRef, activeIndex]);
|
12216
12213
|
useEffect(() => {
|
12217
12214
|
if (!isActive || !videoRef)
|
12218
12215
|
return;
|
@@ -12226,6 +12223,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
12226
12223
|
if (!dom && !dom2)
|
12227
12224
|
return;
|
12228
12225
|
videoPlayerWrapperNode === null || videoPlayerWrapperNode === void 0 ? void 0 : videoPlayerWrapperNode.appendChild(dom || dom2);
|
12226
|
+
videoRef.poster('https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240218/fsTan2fgYKJWrCpJtGZPogm0NnvdT1708239153661.jpeg');
|
12229
12227
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
|
12230
12228
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadedmetadata', handleLoadedmetadata);
|
12231
12229
|
videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadeddata', handLoadeddata);
|