pb-sxp-ui 1.15.13-alpha.1 → 1.15.13-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 +333 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +333 -24
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +6 -6
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +6 -6
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +333 -24
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +6 -6
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/DiyStoryPreview/VideoWidget.js +5 -2
- package/es/core/components/DiyStoryPreview/index.d.ts +2 -0
- package/es/core/components/DiyStoryPreview/index.js +277 -18
- package/es/core/components/SxpPageRender/ExpandableText.js +10 -2
- package/es/core/components/SxpPageRender/RenderCard.js +4 -4
- package/es/materials/sxp/template/MultiCommodity/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -1
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -1
- package/es/materials/sxp/template/components/EventProvider.js +2 -2
- package/lib/core/components/DiyStoryPreview/VideoWidget.js +5 -2
- package/lib/core/components/DiyStoryPreview/index.d.ts +2 -0
- package/lib/core/components/DiyStoryPreview/index.js +277 -18
- package/lib/core/components/SxpPageRender/ExpandableText.js +10 -2
- package/lib/core/components/SxpPageRender/RenderCard.js +4 -4
- package/lib/materials/sxp/template/MultiCommodity/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -1
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -1
- package/lib/materials/sxp/template/components/EventProvider.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -10084,7 +10084,15 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
10084
10084
|
wordBreak: 'break-word'
|
10085
10085
|
}, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), style) } }),
|
10086
10086
|
React.createElement("div", { ref: multiRowCopy, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), style) } }),
|
10087
|
-
text && isPost && isShow && (React.createElement("button", { "aria-label": isShowMore ? unfoldText || 'show less' : foldText || 'show more', style: {
|
10087
|
+
text && isPost && isShow && (React.createElement("button", { "aria-label": isShowMore ? unfoldText || 'show less' : foldText || 'show more', style: {
|
10088
|
+
textDecoration: 'underline',
|
10089
|
+
cursor: 'pointer',
|
10090
|
+
outline: 'none',
|
10091
|
+
border: 'none',
|
10092
|
+
boxSizing: 'content-box',
|
10093
|
+
padding: 0,
|
10094
|
+
background: 'transparent'
|
10095
|
+
}, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick, dangerouslySetInnerHTML: {
|
10088
10096
|
__html: setFontForText(isShowMore ? unfoldText || 'show less' : foldText || 'show more', style)
|
10089
10097
|
} }))));
|
10090
10098
|
};
|
@@ -12442,7 +12450,7 @@ const EventProvider = (_a) => {
|
|
12442
12450
|
const handleClick = throttle((e) => {
|
12443
12451
|
var _a, _b, _c, _d, _e, _f;
|
12444
12452
|
e.preventDefault();
|
12445
|
-
const item = multItem
|
12453
|
+
const item = multItem || ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video);
|
12446
12454
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
12447
12455
|
eventSubject: 'clickCta',
|
12448
12456
|
eventDescription: 'User clicked the CTA'
|
@@ -12469,7 +12477,7 @@ const EventProvider = (_a) => {
|
|
12469
12477
|
setElement(null);
|
12470
12478
|
}
|
12471
12479
|
}, [element, popup]);
|
12472
|
-
return (React.createElement("button", { ref: ref, className: className, style: Object.assign({ display: 'flex', alignItems: 'normal' }, style), onClick: handleClick, role: 'button', "aria-label": 'CTA', tabIndex: 0 }, children));
|
12480
|
+
return (React.createElement("button", { ref: ref, className: className, style: Object.assign({ outline: 'none', border: 'none', boxSizing: 'content-box', padding: 0, background: 'transparent', display: 'flex', alignItems: 'normal' }, style), onClick: handleClick, role: 'button', "aria-label": 'CTA', tabIndex: 0 }, children));
|
12473
12481
|
};
|
12474
12482
|
var EventProvider$1 = memo(EventProvider);
|
12475
12483
|
|
@@ -13065,6 +13073,7 @@ const MultiCommodityDiro$1 = (_a) => {
|
|
13065
13073
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
|
13066
13074
|
const { sxpParameter } = useSxpDataSource();
|
13067
13075
|
const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
13076
|
+
console.log(recData, '222');
|
13068
13077
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
13069
13078
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
13070
13079
|
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
@@ -13271,6 +13280,7 @@ const MultiCommodityDiroNew$1 = (_a) => {
|
|
13271
13280
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
|
13272
13281
|
const { sxpParameter } = useSxpDataSource();
|
13273
13282
|
const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
13283
|
+
console.log(recData, '333');
|
13274
13284
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
13275
13285
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13276
13286
|
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
@@ -18289,7 +18299,7 @@ function withBindDataSource(Component) {
|
|
18289
18299
|
* @Author: binruan@chatlabs.com
|
18290
18300
|
* @Date: 2023-12-26 16:11:34
|
18291
18301
|
* @LastEditors: binruan@chatlabs.com
|
18292
|
-
* @LastEditTime:
|
18302
|
+
* @LastEditTime: 2025-03-26 19:32:00
|
18293
18303
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
|
18294
18304
|
*
|
18295
18305
|
*/
|
@@ -18299,10 +18309,10 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive,
|
|
18299
18309
|
return null;
|
18300
18310
|
const renderComp = useMemo(() => {
|
18301
18311
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
|
18302
|
-
|
18312
|
+
// 如果includesCtaType有值,则只渲染includesCtaType包含的cta类型组件,用于在页面某处只显示某一组件
|
18303
18313
|
if (includesCtaType && !(includesCtaType === null || includesCtaType === void 0 ? void 0 : includesCtaType.includes((_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type)))
|
18304
18314
|
return;
|
18305
|
-
|
18315
|
+
// 默认不渲染category为cta类型的组件,该类型的组件只用于某一处
|
18306
18316
|
if (!includesCtaType && ((_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.category) === 'cta')
|
18307
18317
|
return;
|
18308
18318
|
if ((((_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.type) === 'CommodityDiro' && !((_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindProduct)) ||
|
@@ -18319,10 +18329,10 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive,
|
|
18319
18329
|
const Component = withBindDataSource(t);
|
18320
18330
|
const defaulSetting = (_u = t === null || t === void 0 ? void 0 : t.extend) === null || _u === void 0 ? void 0 : _u.defaulSetting;
|
18321
18331
|
const isExternalLink = ((_x = (_w = (_v = value === null || value === void 0 ? void 0 : value.item) === null || _v === void 0 ? void 0 : _v.event) === null || _w === void 0 ? void 0 : _w.onClick) === null || _x === void 0 ? void 0 : _x.linkType) === 'externalLink';
|
18322
|
-
|
18332
|
+
const style = cloneDeep((_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.style);
|
18323
18333
|
if (style.hasOwnProperty('backdropFilter')) {
|
18324
|
-
|
18325
|
-
style
|
18334
|
+
const sbf = style.backdropFilter;
|
18335
|
+
style.backdropFilter = `blur(${sbf !== null && sbf !== void 0 ? sbf : 0}px)`;
|
18326
18336
|
}
|
18327
18337
|
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.textStyle), bindDatas: (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.bindDatas) !== null && _1 !== void 0 ? _1 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.props, { event: ((_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index, isActive: isActive })));
|
18328
18338
|
}
|
@@ -19486,6 +19496,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
19486
19496
|
}, [bffEventReport, data, index, isFirstPlay]);
|
19487
19497
|
const handleLoadedMetadata = useCallback(() => {
|
19488
19498
|
var _a;
|
19499
|
+
videoRef.current.currentTime = rec === null || rec === void 0 ? void 0 : rec.startTime;
|
19489
19500
|
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
19490
19501
|
setIsLoadFinish(true);
|
19491
19502
|
}, []);
|
@@ -19559,6 +19570,8 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
19559
19570
|
}, []);
|
19560
19571
|
const handlePause = () => {
|
19561
19572
|
var _a, _b, _c, _d, _e, _f;
|
19573
|
+
if (!videoRef.current || !isActive)
|
19574
|
+
return;
|
19562
19575
|
if (!loopPlay)
|
19563
19576
|
return;
|
19564
19577
|
if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
|
@@ -19570,6 +19583,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
19570
19583
|
}
|
19571
19584
|
};
|
19572
19585
|
// useEffect(() => {
|
19586
|
+
// if (!videoRef.current) return;
|
19573
19587
|
// if (!isActive) return;
|
19574
19588
|
// if (!loopPlay) {
|
19575
19589
|
// videoRef?.current?.pause();
|
@@ -19589,7 +19603,6 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
19589
19603
|
if (!videoPlayerWrapperNode)
|
19590
19604
|
return;
|
19591
19605
|
videoRef.current = mountVideoPlayerAtNode === null || mountVideoPlayerAtNode === void 0 ? void 0 : mountVideoPlayerAtNode(videoPlayerWrapperNode);
|
19592
|
-
videoRef.current.currentTime = rec === null || rec === void 0 ? void 0 : rec.startTime;
|
19593
19606
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
|
19594
19607
|
return;
|
19595
19608
|
const Hls = window === null || window === void 0 ? void 0 : window.Hls;
|
@@ -19600,6 +19613,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
19600
19613
|
hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
|
19601
19614
|
hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
|
19602
19615
|
var _a;
|
19616
|
+
videoRef.current.currentTime = rec === null || rec === void 0 ? void 0 : rec.startTime;
|
19603
19617
|
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
19604
19618
|
});
|
19605
19619
|
}
|
@@ -19622,7 +19636,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
19622
19636
|
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('pause', handlePause);
|
19623
19637
|
(_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('timeupdate', handleTimeUpload);
|
19624
19638
|
};
|
19625
|
-
}, [handleLoadedMetadata, handlePlaying, rec, handLoadeddata, isActive]);
|
19639
|
+
}, [handleLoadedMetadata, handlePlaying, rec, handLoadeddata, isActive, loopPlay]);
|
19626
19640
|
useMemo(() => {
|
19627
19641
|
if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
|
19628
19642
|
return null;
|
@@ -19655,7 +19669,7 @@ var VideoWidget$1 = memo(VideoWidget);
|
|
19655
19669
|
* @Author: binruan@chatlabs.com
|
19656
19670
|
* @Date: 2025-03-25 13:54:27
|
19657
19671
|
* @LastEditors: binruan@chatlabs.com
|
19658
|
-
* @LastEditTime: 2025-03-26
|
19672
|
+
* @LastEditTime: 2025-03-26 22:40:52
|
19659
19673
|
* @FilePath: \pb-sxp-ui\src\core\components\DiyStoryPreview\index.tsx
|
19660
19674
|
*
|
19661
19675
|
*/
|
@@ -19665,6 +19679,184 @@ Object.values(_materials_).forEach((v) => {
|
|
19665
19679
|
});
|
19666
19680
|
const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
|
19667
19681
|
const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
|
19682
|
+
const recData = {
|
19683
|
+
position: 0,
|
19684
|
+
isCollected: false,
|
19685
|
+
product: null,
|
19686
|
+
video: {
|
19687
|
+
appId: null,
|
19688
|
+
itemId: 'VIDEOSsRgI1695278974368',
|
19689
|
+
title: '8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片',
|
19690
|
+
enTitle: null,
|
19691
|
+
icon: null,
|
19692
|
+
cover: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20231017/fsJFWmW1dGyW7XmDspbJPTn5esL3U1697538777398.png',
|
19693
|
+
link: null,
|
19694
|
+
linkTitle: null,
|
19695
|
+
linkType: null,
|
19696
|
+
menuCategoryId: null,
|
19697
|
+
remark: null,
|
19698
|
+
tags: [
|
19699
|
+
'Gift-Giving',
|
19700
|
+
'Daily Wear',
|
19701
|
+
'Business Formal',
|
19702
|
+
'Sports/Casual',
|
19703
|
+
'Anniversary Gifts',
|
19704
|
+
'Wedding/Engagement',
|
19705
|
+
'Formal Dinner/Party'
|
19706
|
+
],
|
19707
|
+
traceInfo: ':VIDEO:VIDEOSsRgI1695278974368:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19708
|
+
value: 385,
|
19709
|
+
weight: null,
|
19710
|
+
bindCta: null,
|
19711
|
+
bindProduct: null,
|
19712
|
+
bindProducts: [
|
19713
|
+
{
|
19714
|
+
appId: 'wx448578f8851f3dce',
|
19715
|
+
itemId: 'test02178888',
|
19716
|
+
title: 'christian dior小包包 新CDN',
|
19717
|
+
enTitle: null,
|
19718
|
+
icon: null,
|
19719
|
+
cover: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fs2jqiurjftpoaba67iiwr9jt5sc31726213277754.avif',
|
19720
|
+
link: '/pages/details/index?spu_id=1702262707659534338',
|
19721
|
+
linkTitle: '',
|
19722
|
+
linkType: 'MP',
|
19723
|
+
menuCategoryId: null,
|
19724
|
+
remark: null,
|
19725
|
+
tags: [],
|
19726
|
+
traceInfo: ':PRODUCT:test02178888:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19727
|
+
value: null,
|
19728
|
+
weight: null,
|
19729
|
+
bindCta: {
|
19730
|
+
appId: 'wx448578f8851f3dce',
|
19731
|
+
itemId: 'CTA3KofE1716186622249',
|
19732
|
+
title: 'SHOP NOW 立即购买',
|
19733
|
+
enTitle: 'BUY NOW立即购买,选择你所喜爱的;',
|
19734
|
+
icon: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240520/fssfxbmiwghixmgblz9uriwennd2r1716186615574.avif',
|
19735
|
+
cover: null,
|
19736
|
+
link: '/pages/details/index?spu_id=1702262707659534338',
|
19737
|
+
linkTitle: '',
|
19738
|
+
linkType: 'MP',
|
19739
|
+
menuCategoryId: '64b60b202caf0e1c1ce1e17d',
|
19740
|
+
remark: null,
|
19741
|
+
tags: [
|
19742
|
+
"Woman's Perfumes",
|
19743
|
+
'Plates & Bowls',
|
19744
|
+
'Glasses',
|
19745
|
+
'Multicolor',
|
19746
|
+
'Carafes',
|
19747
|
+
'Tea & Coffee',
|
19748
|
+
'Green',
|
19749
|
+
'Grey',
|
19750
|
+
'Cutlery'
|
19751
|
+
],
|
19752
|
+
traceInfo: ':CTA:CTA3KofE1716186622249:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19753
|
+
value: null,
|
19754
|
+
weight: null
|
19755
|
+
},
|
19756
|
+
collection: 'Ricco',
|
19757
|
+
currency: 'INR-₹',
|
19758
|
+
homePage: [
|
19759
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fs2jqiurjftpoaba67iiwr9jt5sc31726213277754.avif',
|
19760
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fsr9ttuzuljs85smqi6lsidovnyoy1726213285994.avif',
|
19761
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fsknmfhx2lxukxews05guwwxr8rju1726213281108.avif',
|
19762
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fs0acnua4f1clamdpwdsrh0v5dgc61726213289247.avif'
|
19763
|
+
],
|
19764
|
+
info: 'test',
|
19765
|
+
price: 53200,
|
19766
|
+
shippingInfo: null,
|
19767
|
+
taxInfo: null
|
19768
|
+
},
|
19769
|
+
{
|
19770
|
+
appId: null,
|
19771
|
+
itemId: '113J631A0684_C520',
|
19772
|
+
title: 'Sweatshirt à capuche Dior Oblique, coupe relax',
|
19773
|
+
enTitle: null,
|
19774
|
+
icon: null,
|
19775
|
+
cover: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241115/fsaf0xq8vx8gkkl30y1h1swpinmbt1731661943891.avif',
|
19776
|
+
link: 'https://www.dior.com/fr_fr/fashion/products/113J631A0684_C520',
|
19777
|
+
linkTitle: null,
|
19778
|
+
linkType: 'WEB',
|
19779
|
+
menuCategoryId: null,
|
19780
|
+
remark: null,
|
19781
|
+
tags: [],
|
19782
|
+
traceInfo: ':PRODUCT:113J631A0684_C520:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19783
|
+
value: null,
|
19784
|
+
weight: null,
|
19785
|
+
bindCta: {
|
19786
|
+
appId: null,
|
19787
|
+
itemId: 'CTAAfaKf1730796437032',
|
19788
|
+
title: 'test',
|
19789
|
+
enTitle: 'test',
|
19790
|
+
icon: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241105/fsjblxoud2tmehpiqqomh0oktwqrd1730796431496.avif',
|
19791
|
+
cover: null,
|
19792
|
+
link: null,
|
19793
|
+
linkTitle: null,
|
19794
|
+
linkType: null,
|
19795
|
+
menuCategoryId: '64b60b202caf0e1c1ce1e17d',
|
19796
|
+
remark: '',
|
19797
|
+
tags: [],
|
19798
|
+
traceInfo: ':CTA:CTAAfaKf1730796437032:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19799
|
+
value: null,
|
19800
|
+
weight: null
|
19801
|
+
},
|
19802
|
+
collection: 'Jacquard de coton éponge bleu',
|
19803
|
+
currency: 'EUR-€',
|
19804
|
+
homePage: [
|
19805
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241115/fsaf0xq8vx8gkkl30y1h1swpinmbt1731661943891.avif',
|
19806
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241115/fszxkdcjfjql2oiy90ffbal5tsfd81731661964913.avif',
|
19807
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241115/fs1jhd9jwxvfqmrbjwy5abfzb0fde1731661994996.avif'
|
19808
|
+
],
|
19809
|
+
info: "Le sweatshirt à capuche bleu met à l'honneur l'emblématique motif dior oblique. Confectionné en jacquard de coton éponge bleu, il présente une coupe relax très confortable. Doté de poches latérales fendues, ce sweatshirt à capuche s'associera à tous vos jeans ou pantalons de survêtement pour un look décontracté.. Sweatshirt à capuche dior oblique, coupe relax Jacquard de coton éponge bleu",
|
19810
|
+
price: 1800,
|
19811
|
+
shippingInfo: null,
|
19812
|
+
taxInfo: null
|
19813
|
+
},
|
19814
|
+
{
|
19815
|
+
appId: null,
|
19816
|
+
itemId: 'S5573CRIW_M928',
|
19817
|
+
title: 'Mini Dior Book Tote',
|
19818
|
+
enTitle: null,
|
19819
|
+
icon: null,
|
19820
|
+
cover: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fsvewk9etrawxrzznmvvewgt1bctu1739415576729.avif',
|
19821
|
+
link: 'https://www.dior.com/en_gb/fashion/products/S5573CRIW_M928',
|
19822
|
+
linkTitle: null,
|
19823
|
+
linkType: 'WEB',
|
19824
|
+
menuCategoryId: null,
|
19825
|
+
remark: null,
|
19826
|
+
tags: ['ダイヤモンド'],
|
19827
|
+
traceInfo: ':PRODUCT:S5573CRIW_M928:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19828
|
+
value: null,
|
19829
|
+
weight: null,
|
19830
|
+
bindCta: null,
|
19831
|
+
collection: null,
|
19832
|
+
currency: 'GBP-£',
|
19833
|
+
homePage: [
|
19834
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fsvewk9etrawxrzznmvvewgt1bctu1739415576729.avif',
|
19835
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fsngtlvhid7xwt5if0viw7vqanm831739415582147.avif',
|
19836
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fs4hotdvyzjtnqb9vszlynuzplddc1739415586910.avif',
|
19837
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fswffx9kwexf3z3vcnxisut1qxtez1739415591629.avif',
|
19838
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fsbfsi7tttx1hnzldoiw7eoea7fvh1739415597388.avif'
|
19839
|
+
],
|
19840
|
+
info: "The Dior Book Tote is a House classic and original design by Maria Grazia Chiuri, Creative Director of Christian Dior. The style is fully embroidered with the House's hallmark blue Dior Oblique motif and showcases the Christian Dior Paris signature. Exemplifying House savoir-faire, the miniature style features an adjustable and removable strap that allows it to be carried by hand, worn over the shoulder or crossbody.",
|
19841
|
+
price: 1950,
|
19842
|
+
shippingInfo: null,
|
19843
|
+
taxInfo: null
|
19844
|
+
}
|
19845
|
+
],
|
19846
|
+
url: null,
|
19847
|
+
blockCta: 1,
|
19848
|
+
blockProduct: 1,
|
19849
|
+
hashTags: [
|
19850
|
+
'Sports/Casual',
|
19851
|
+
'Formal Dinner/Party',
|
19852
|
+
'Business Formal',
|
19853
|
+
'Wedding/Engagement',
|
19854
|
+
'Gift-Giving',
|
19855
|
+
'Daily Wear',
|
19856
|
+
'Anniversary Gifts'
|
19857
|
+
]
|
19858
|
+
}
|
19859
|
+
};
|
19668
19860
|
const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain, tagList = [], scenes, onActiveChange, activeIndex, loopPlay = false }) => {
|
19669
19861
|
const swiperRef = useRef(null);
|
19670
19862
|
useMemo(() => {
|
@@ -19704,12 +19896,126 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
19704
19896
|
}
|
19705
19897
|
return null;
|
19706
19898
|
}, [globalConfig]);
|
19707
|
-
|
19708
|
-
|
19709
|
-
|
19710
|
-
|
19711
|
-
|
19712
|
-
|
19899
|
+
const renderBottom = (rec, index) => {
|
19900
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
19901
|
+
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
19902
|
+
let cta = null;
|
19903
|
+
if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
|
19904
|
+
cta = '多商品CTA';
|
19905
|
+
}
|
19906
|
+
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
19907
|
+
cta = '商品CTA';
|
19908
|
+
}
|
19909
|
+
else {
|
19910
|
+
cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
|
19911
|
+
}
|
19912
|
+
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
19913
|
+
return (React.createElement(React.Fragment, null,
|
19914
|
+
((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.title) && (React.createElement("div", { style: {
|
19915
|
+
background: 'repeating-linear-gradient(0deg, rgba(26, 26, 25, 0.7), hsla(0, 0%, 100%, 0))',
|
19916
|
+
height: '130px',
|
19917
|
+
position: 'absolute',
|
19918
|
+
bottom: 0,
|
19919
|
+
width: '100%',
|
19920
|
+
willChange: 'transform',
|
19921
|
+
zIndex: 2,
|
19922
|
+
pointerEvents: 'none'
|
19923
|
+
} })),
|
19924
|
+
React.createElement("div", { style: {
|
19925
|
+
marginBottom: `${(_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _g !== void 0 ? _g : 40}px`,
|
19926
|
+
zIndex: 999,
|
19927
|
+
position: 'absolute',
|
19928
|
+
bottom: 0,
|
19929
|
+
left: 0,
|
19930
|
+
right: 0,
|
19931
|
+
paddingTop: '20px'
|
19932
|
+
} },
|
19933
|
+
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { style: {} },
|
19934
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, isActive: index === activeIndex, value: value }))) : null,
|
19935
|
+
React.createElement("div", null,
|
19936
|
+
React.createElement(ExpandableText$1
|
19937
|
+
// className='clc-sxp-bottom-text'
|
19938
|
+
, {
|
19939
|
+
// className='clc-sxp-bottom-text'
|
19940
|
+
isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_j = (_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.title) !== null && _j !== void 0 ? _j : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none', padding: '0 20px', fontSize: '12px' }) }),
|
19941
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }))),
|
19942
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
|
19943
|
+
}
|
19944
|
+
return null;
|
19945
|
+
};
|
19946
|
+
const likeIcon = useIconLink(defaultLikeIconPath, appDomain);
|
19947
|
+
const unlikeIcon = useIconLink(defaultUnLikeIconPath, appDomain);
|
19948
|
+
const renderLikeButton = (rec, index) => {
|
19949
|
+
var _a, _b, _c, _d;
|
19950
|
+
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
|
19951
|
+
return;
|
19952
|
+
let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
|
19953
|
+
if (top < 40) {
|
19954
|
+
top += 40;
|
19955
|
+
}
|
19956
|
+
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
19957
|
+
return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon) !== null && _b !== void 0 ? _b : likeIcon, unActicveIcon: (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon) !== null && _c !== void 0 ? _c : unlikeIcon, position: index, active: rec.isCollected, recData: rec,
|
19958
|
+
// className={style['clc-sxp-like-button']}
|
19959
|
+
style: {
|
19960
|
+
top,
|
19961
|
+
right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0,
|
19962
|
+
position: 'absolute',
|
19963
|
+
zIndex: 999,
|
19964
|
+
backgroundColor: 'transparent',
|
19965
|
+
width: '50px',
|
19966
|
+
height: '50px',
|
19967
|
+
outline: 'none',
|
19968
|
+
border: 'none',
|
19969
|
+
boxSizing: 'content-box',
|
19970
|
+
padding: 0,
|
19971
|
+
transform: 'translate3d(0px, 0px, 0px)'
|
19972
|
+
} }));
|
19973
|
+
}
|
19974
|
+
return null;
|
19975
|
+
};
|
19976
|
+
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png', appDomain);
|
19977
|
+
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png', appDomain);
|
19978
|
+
const renderToggleButton = (visible) => {
|
19979
|
+
var _a, _b, _c, _d;
|
19980
|
+
if (!visible)
|
19981
|
+
return;
|
19982
|
+
let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _a !== void 0 ? _a : 23;
|
19983
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) === 'top') {
|
19984
|
+
top += 45;
|
19985
|
+
}
|
19986
|
+
return (((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (React.createElement(ToggleButton$1, { style: {
|
19987
|
+
position: 'absolute',
|
19988
|
+
visibility: 'visible',
|
19989
|
+
zIndex: 999,
|
19990
|
+
transform: 'translate3d(0px,0px,0px)',
|
19991
|
+
[(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _b !== void 0 ? _b : 'right']: (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _c !== void 0 ? _c : 0,
|
19992
|
+
[(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top,
|
19993
|
+
backgroundColor: 'transparent',
|
19994
|
+
width: '50px',
|
19995
|
+
height: '50px',
|
19996
|
+
outline: 'none',
|
19997
|
+
border: 'none',
|
19998
|
+
boxSizing: 'content-box',
|
19999
|
+
padding: 0
|
20000
|
+
}, defaultValue: true, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon })));
|
20001
|
+
};
|
20002
|
+
const renderView = (item, index) => {
|
20003
|
+
var _a, _b, _c, _d;
|
20004
|
+
const rec = cloneDeep(recData);
|
20005
|
+
rec.video.bindProducts = item === null || item === void 0 ? void 0 : item.bindProducts;
|
20006
|
+
return (React.createElement("div", { style: { position: 'relative' } },
|
20007
|
+
React.createElement(SwiperSlide, { key: index, virtualIndex: index, style: { overflow: 'hidden', position: 'relative' } },
|
20008
|
+
renderBottom(rec, index),
|
20009
|
+
renderLikeButton(rec, index),
|
20010
|
+
renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
20011
|
+
React.createElement(ToggleButton$1, { style: {
|
20012
|
+
position: 'absolute',
|
20013
|
+
right: (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _a !== void 0 ? _a : 0,
|
20014
|
+
visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[index]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
|
20015
|
+
bottom: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _d !== void 0 ? _d : 23,
|
20016
|
+
zIndex: 999
|
20017
|
+
}, defaultValue: true, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon }),
|
20018
|
+
renderContent(item, index))));
|
19713
20019
|
};
|
19714
20020
|
useEffect(() => {
|
19715
20021
|
var _a, _b;
|
@@ -19723,12 +20029,15 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
19723
20029
|
return;
|
19724
20030
|
(_b = (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.slideTo(0);
|
19725
20031
|
}, [loopPlay]);
|
19726
|
-
return (React.createElement(
|
19727
|
-
|
19728
|
-
|
19729
|
-
|
19730
|
-
|
19731
|
-
|
20032
|
+
return (React.createElement("div", { id: 'sxp-render',
|
20033
|
+
// className={style['clc-sxp-container']}
|
20034
|
+
style: { height: containerHeight, position: 'relative', pointerEvents: 'none' } },
|
20035
|
+
React.createElement(Swiper, { ref: swiperRef, allowTouchMove: false, onActiveIndexChange: (swiper) => {
|
20036
|
+
// setActiveIndex(swiper.activeIndex);
|
20037
|
+
onActiveChange === null || onActiveChange === void 0 ? void 0 : onActiveChange(swiper.activeIndex);
|
20038
|
+
}, direction: 'vertical', style: { overflow: 'hidden', height: containerHeight }, height: containerHeight }, scenes === null || scenes === void 0 ? void 0 : scenes.map((rec, index) => {
|
20039
|
+
return renderView(rec, index);
|
20040
|
+
}))));
|
19732
20041
|
};
|
19733
20042
|
var index$1 = memo(DiyStoryPreview);
|
19734
20043
|
|