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.cjs
CHANGED
@@ -10106,7 +10106,15 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
10106
10106
|
wordBreak: 'break-word'
|
10107
10107
|
}, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), style) } }),
|
10108
10108
|
React.createElement("div", { ref: multiRowCopy, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), style) } }),
|
10109
|
-
text && isPost && isShow && (React.createElement("button", { "aria-label": isShowMore ? unfoldText || 'show less' : foldText || 'show more', style: {
|
10109
|
+
text && isPost && isShow && (React.createElement("button", { "aria-label": isShowMore ? unfoldText || 'show less' : foldText || 'show more', style: {
|
10110
|
+
textDecoration: 'underline',
|
10111
|
+
cursor: 'pointer',
|
10112
|
+
outline: 'none',
|
10113
|
+
border: 'none',
|
10114
|
+
boxSizing: 'content-box',
|
10115
|
+
padding: 0,
|
10116
|
+
background: 'transparent'
|
10117
|
+
}, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick, dangerouslySetInnerHTML: {
|
10110
10118
|
__html: setFontForText(isShowMore ? unfoldText || 'show less' : foldText || 'show more', style)
|
10111
10119
|
} }))));
|
10112
10120
|
};
|
@@ -12464,7 +12472,7 @@ const EventProvider = (_a) => {
|
|
12464
12472
|
const handleClick = lodash.throttle((e) => {
|
12465
12473
|
var _a, _b, _c, _d, _e, _f;
|
12466
12474
|
e.preventDefault();
|
12467
|
-
const item = multItem
|
12475
|
+
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);
|
12468
12476
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
12469
12477
|
eventSubject: 'clickCta',
|
12470
12478
|
eventDescription: 'User clicked the CTA'
|
@@ -12491,7 +12499,7 @@ const EventProvider = (_a) => {
|
|
12491
12499
|
setElement(null);
|
12492
12500
|
}
|
12493
12501
|
}, [element, popup]);
|
12494
|
-
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));
|
12502
|
+
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));
|
12495
12503
|
};
|
12496
12504
|
var EventProvider$1 = React.memo(EventProvider);
|
12497
12505
|
|
@@ -13087,6 +13095,7 @@ const MultiCommodityDiro$1 = (_a) => {
|
|
13087
13095
|
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"]);
|
13088
13096
|
const { sxpParameter } = useSxpDataSource();
|
13089
13097
|
const [products] = React.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]);
|
13098
|
+
console.log(recData, '222');
|
13090
13099
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
13091
13100
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
13092
13101
|
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
@@ -13293,6 +13302,7 @@ const MultiCommodityDiroNew$1 = (_a) => {
|
|
13293
13302
|
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"]);
|
13294
13303
|
const { sxpParameter } = useSxpDataSource();
|
13295
13304
|
const [products] = React.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]);
|
13305
|
+
console.log(recData, '333');
|
13296
13306
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
13297
13307
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13298
13308
|
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
@@ -18311,7 +18321,7 @@ function withBindDataSource(Component) {
|
|
18311
18321
|
* @Author: binruan@chatlabs.com
|
18312
18322
|
* @Date: 2023-12-26 16:11:34
|
18313
18323
|
* @LastEditors: binruan@chatlabs.com
|
18314
|
-
* @LastEditTime:
|
18324
|
+
* @LastEditTime: 2025-03-26 19:32:00
|
18315
18325
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
|
18316
18326
|
*
|
18317
18327
|
*/
|
@@ -18321,10 +18331,10 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive,
|
|
18321
18331
|
return null;
|
18322
18332
|
const renderComp = React.useMemo(() => {
|
18323
18333
|
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;
|
18324
|
-
|
18334
|
+
// 如果includesCtaType有值,则只渲染includesCtaType包含的cta类型组件,用于在页面某处只显示某一组件
|
18325
18335
|
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)))
|
18326
18336
|
return;
|
18327
|
-
|
18337
|
+
// 默认不渲染category为cta类型的组件,该类型的组件只用于某一处
|
18328
18338
|
if (!includesCtaType && ((_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.category) === 'cta')
|
18329
18339
|
return;
|
18330
18340
|
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)) ||
|
@@ -18341,10 +18351,10 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive,
|
|
18341
18351
|
const Component = withBindDataSource(t);
|
18342
18352
|
const defaulSetting = (_u = t === null || t === void 0 ? void 0 : t.extend) === null || _u === void 0 ? void 0 : _u.defaulSetting;
|
18343
18353
|
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';
|
18344
|
-
|
18354
|
+
const style = lodash.cloneDeep((_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.style);
|
18345
18355
|
if (style.hasOwnProperty('backdropFilter')) {
|
18346
|
-
|
18347
|
-
style
|
18356
|
+
const sbf = style.backdropFilter;
|
18357
|
+
style.backdropFilter = `blur(${sbf !== null && sbf !== void 0 ? sbf : 0}px)`;
|
18348
18358
|
}
|
18349
18359
|
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 })));
|
18350
18360
|
}
|
@@ -19508,6 +19518,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
19508
19518
|
}, [bffEventReport, data, index, isFirstPlay]);
|
19509
19519
|
const handleLoadedMetadata = React.useCallback(() => {
|
19510
19520
|
var _a;
|
19521
|
+
videoRef.current.currentTime = rec === null || rec === void 0 ? void 0 : rec.startTime;
|
19511
19522
|
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
19512
19523
|
setIsLoadFinish(true);
|
19513
19524
|
}, []);
|
@@ -19581,6 +19592,8 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
19581
19592
|
}, []);
|
19582
19593
|
const handlePause = () => {
|
19583
19594
|
var _a, _b, _c, _d, _e, _f;
|
19595
|
+
if (!videoRef.current || !isActive)
|
19596
|
+
return;
|
19584
19597
|
if (!loopPlay)
|
19585
19598
|
return;
|
19586
19599
|
if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
|
@@ -19592,6 +19605,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
19592
19605
|
}
|
19593
19606
|
};
|
19594
19607
|
// useEffect(() => {
|
19608
|
+
// if (!videoRef.current) return;
|
19595
19609
|
// if (!isActive) return;
|
19596
19610
|
// if (!loopPlay) {
|
19597
19611
|
// videoRef?.current?.pause();
|
@@ -19611,7 +19625,6 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
19611
19625
|
if (!videoPlayerWrapperNode)
|
19612
19626
|
return;
|
19613
19627
|
videoRef.current = mountVideoPlayerAtNode === null || mountVideoPlayerAtNode === void 0 ? void 0 : mountVideoPlayerAtNode(videoPlayerWrapperNode);
|
19614
|
-
videoRef.current.currentTime = rec === null || rec === void 0 ? void 0 : rec.startTime;
|
19615
19628
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
|
19616
19629
|
return;
|
19617
19630
|
const Hls = window === null || window === void 0 ? void 0 : window.Hls;
|
@@ -19622,6 +19635,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
19622
19635
|
hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
|
19623
19636
|
hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
|
19624
19637
|
var _a;
|
19638
|
+
videoRef.current.currentTime = rec === null || rec === void 0 ? void 0 : rec.startTime;
|
19625
19639
|
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
19626
19640
|
});
|
19627
19641
|
}
|
@@ -19644,7 +19658,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
19644
19658
|
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('pause', handlePause);
|
19645
19659
|
(_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('timeupdate', handleTimeUpload);
|
19646
19660
|
};
|
19647
|
-
}, [handleLoadedMetadata, handlePlaying, rec, handLoadeddata, isActive]);
|
19661
|
+
}, [handleLoadedMetadata, handlePlaying, rec, handLoadeddata, isActive, loopPlay]);
|
19648
19662
|
React.useMemo(() => {
|
19649
19663
|
if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
|
19650
19664
|
return null;
|
@@ -19677,7 +19691,7 @@ var VideoWidget$1 = React.memo(VideoWidget);
|
|
19677
19691
|
* @Author: binruan@chatlabs.com
|
19678
19692
|
* @Date: 2025-03-25 13:54:27
|
19679
19693
|
* @LastEditors: binruan@chatlabs.com
|
19680
|
-
* @LastEditTime: 2025-03-26
|
19694
|
+
* @LastEditTime: 2025-03-26 22:40:52
|
19681
19695
|
* @FilePath: \pb-sxp-ui\src\core\components\DiyStoryPreview\index.tsx
|
19682
19696
|
*
|
19683
19697
|
*/
|
@@ -19687,6 +19701,184 @@ Object.values(_materials_).forEach((v) => {
|
|
19687
19701
|
});
|
19688
19702
|
const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
|
19689
19703
|
const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
|
19704
|
+
const recData = {
|
19705
|
+
position: 0,
|
19706
|
+
isCollected: false,
|
19707
|
+
product: null,
|
19708
|
+
video: {
|
19709
|
+
appId: null,
|
19710
|
+
itemId: 'VIDEOSsRgI1695278974368',
|
19711
|
+
title: '8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片',
|
19712
|
+
enTitle: null,
|
19713
|
+
icon: null,
|
19714
|
+
cover: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20231017/fsJFWmW1dGyW7XmDspbJPTn5esL3U1697538777398.png',
|
19715
|
+
link: null,
|
19716
|
+
linkTitle: null,
|
19717
|
+
linkType: null,
|
19718
|
+
menuCategoryId: null,
|
19719
|
+
remark: null,
|
19720
|
+
tags: [
|
19721
|
+
'Gift-Giving',
|
19722
|
+
'Daily Wear',
|
19723
|
+
'Business Formal',
|
19724
|
+
'Sports/Casual',
|
19725
|
+
'Anniversary Gifts',
|
19726
|
+
'Wedding/Engagement',
|
19727
|
+
'Formal Dinner/Party'
|
19728
|
+
],
|
19729
|
+
traceInfo: ':VIDEO:VIDEOSsRgI1695278974368:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19730
|
+
value: 385,
|
19731
|
+
weight: null,
|
19732
|
+
bindCta: null,
|
19733
|
+
bindProduct: null,
|
19734
|
+
bindProducts: [
|
19735
|
+
{
|
19736
|
+
appId: 'wx448578f8851f3dce',
|
19737
|
+
itemId: 'test02178888',
|
19738
|
+
title: 'christian dior小包包 新CDN',
|
19739
|
+
enTitle: null,
|
19740
|
+
icon: null,
|
19741
|
+
cover: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fs2jqiurjftpoaba67iiwr9jt5sc31726213277754.avif',
|
19742
|
+
link: '/pages/details/index?spu_id=1702262707659534338',
|
19743
|
+
linkTitle: '',
|
19744
|
+
linkType: 'MP',
|
19745
|
+
menuCategoryId: null,
|
19746
|
+
remark: null,
|
19747
|
+
tags: [],
|
19748
|
+
traceInfo: ':PRODUCT:test02178888:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19749
|
+
value: null,
|
19750
|
+
weight: null,
|
19751
|
+
bindCta: {
|
19752
|
+
appId: 'wx448578f8851f3dce',
|
19753
|
+
itemId: 'CTA3KofE1716186622249',
|
19754
|
+
title: 'SHOP NOW 立即购买',
|
19755
|
+
enTitle: 'BUY NOW立即购买,选择你所喜爱的;',
|
19756
|
+
icon: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240520/fssfxbmiwghixmgblz9uriwennd2r1716186615574.avif',
|
19757
|
+
cover: null,
|
19758
|
+
link: '/pages/details/index?spu_id=1702262707659534338',
|
19759
|
+
linkTitle: '',
|
19760
|
+
linkType: 'MP',
|
19761
|
+
menuCategoryId: '64b60b202caf0e1c1ce1e17d',
|
19762
|
+
remark: null,
|
19763
|
+
tags: [
|
19764
|
+
"Woman's Perfumes",
|
19765
|
+
'Plates & Bowls',
|
19766
|
+
'Glasses',
|
19767
|
+
'Multicolor',
|
19768
|
+
'Carafes',
|
19769
|
+
'Tea & Coffee',
|
19770
|
+
'Green',
|
19771
|
+
'Grey',
|
19772
|
+
'Cutlery'
|
19773
|
+
],
|
19774
|
+
traceInfo: ':CTA:CTA3KofE1716186622249:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19775
|
+
value: null,
|
19776
|
+
weight: null
|
19777
|
+
},
|
19778
|
+
collection: 'Ricco',
|
19779
|
+
currency: 'INR-₹',
|
19780
|
+
homePage: [
|
19781
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fs2jqiurjftpoaba67iiwr9jt5sc31726213277754.avif',
|
19782
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fsr9ttuzuljs85smqi6lsidovnyoy1726213285994.avif',
|
19783
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fsknmfhx2lxukxews05guwwxr8rju1726213281108.avif',
|
19784
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fs0acnua4f1clamdpwdsrh0v5dgc61726213289247.avif'
|
19785
|
+
],
|
19786
|
+
info: 'test',
|
19787
|
+
price: 53200,
|
19788
|
+
shippingInfo: null,
|
19789
|
+
taxInfo: null
|
19790
|
+
},
|
19791
|
+
{
|
19792
|
+
appId: null,
|
19793
|
+
itemId: '113J631A0684_C520',
|
19794
|
+
title: 'Sweatshirt à capuche Dior Oblique, coupe relax',
|
19795
|
+
enTitle: null,
|
19796
|
+
icon: null,
|
19797
|
+
cover: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241115/fsaf0xq8vx8gkkl30y1h1swpinmbt1731661943891.avif',
|
19798
|
+
link: 'https://www.dior.com/fr_fr/fashion/products/113J631A0684_C520',
|
19799
|
+
linkTitle: null,
|
19800
|
+
linkType: 'WEB',
|
19801
|
+
menuCategoryId: null,
|
19802
|
+
remark: null,
|
19803
|
+
tags: [],
|
19804
|
+
traceInfo: ':PRODUCT:113J631A0684_C520:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19805
|
+
value: null,
|
19806
|
+
weight: null,
|
19807
|
+
bindCta: {
|
19808
|
+
appId: null,
|
19809
|
+
itemId: 'CTAAfaKf1730796437032',
|
19810
|
+
title: 'test',
|
19811
|
+
enTitle: 'test',
|
19812
|
+
icon: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241105/fsjblxoud2tmehpiqqomh0oktwqrd1730796431496.avif',
|
19813
|
+
cover: null,
|
19814
|
+
link: null,
|
19815
|
+
linkTitle: null,
|
19816
|
+
linkType: null,
|
19817
|
+
menuCategoryId: '64b60b202caf0e1c1ce1e17d',
|
19818
|
+
remark: '',
|
19819
|
+
tags: [],
|
19820
|
+
traceInfo: ':CTA:CTAAfaKf1730796437032:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19821
|
+
value: null,
|
19822
|
+
weight: null
|
19823
|
+
},
|
19824
|
+
collection: 'Jacquard de coton éponge bleu',
|
19825
|
+
currency: 'EUR-€',
|
19826
|
+
homePage: [
|
19827
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241115/fsaf0xq8vx8gkkl30y1h1swpinmbt1731661943891.avif',
|
19828
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241115/fszxkdcjfjql2oiy90ffbal5tsfd81731661964913.avif',
|
19829
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241115/fs1jhd9jwxvfqmrbjwy5abfzb0fde1731661994996.avif'
|
19830
|
+
],
|
19831
|
+
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",
|
19832
|
+
price: 1800,
|
19833
|
+
shippingInfo: null,
|
19834
|
+
taxInfo: null
|
19835
|
+
},
|
19836
|
+
{
|
19837
|
+
appId: null,
|
19838
|
+
itemId: 'S5573CRIW_M928',
|
19839
|
+
title: 'Mini Dior Book Tote',
|
19840
|
+
enTitle: null,
|
19841
|
+
icon: null,
|
19842
|
+
cover: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fsvewk9etrawxrzznmvvewgt1bctu1739415576729.avif',
|
19843
|
+
link: 'https://www.dior.com/en_gb/fashion/products/S5573CRIW_M928',
|
19844
|
+
linkTitle: null,
|
19845
|
+
linkType: 'WEB',
|
19846
|
+
menuCategoryId: null,
|
19847
|
+
remark: null,
|
19848
|
+
tags: ['ダイヤモンド'],
|
19849
|
+
traceInfo: ':PRODUCT:S5573CRIW_M928:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19850
|
+
value: null,
|
19851
|
+
weight: null,
|
19852
|
+
bindCta: null,
|
19853
|
+
collection: null,
|
19854
|
+
currency: 'GBP-£',
|
19855
|
+
homePage: [
|
19856
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fsvewk9etrawxrzznmvvewgt1bctu1739415576729.avif',
|
19857
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fsngtlvhid7xwt5if0viw7vqanm831739415582147.avif',
|
19858
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fs4hotdvyzjtnqb9vszlynuzplddc1739415586910.avif',
|
19859
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fswffx9kwexf3z3vcnxisut1qxtez1739415591629.avif',
|
19860
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fsbfsi7tttx1hnzldoiw7eoea7fvh1739415597388.avif'
|
19861
|
+
],
|
19862
|
+
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.",
|
19863
|
+
price: 1950,
|
19864
|
+
shippingInfo: null,
|
19865
|
+
taxInfo: null
|
19866
|
+
}
|
19867
|
+
],
|
19868
|
+
url: null,
|
19869
|
+
blockCta: 1,
|
19870
|
+
blockProduct: 1,
|
19871
|
+
hashTags: [
|
19872
|
+
'Sports/Casual',
|
19873
|
+
'Formal Dinner/Party',
|
19874
|
+
'Business Formal',
|
19875
|
+
'Wedding/Engagement',
|
19876
|
+
'Gift-Giving',
|
19877
|
+
'Daily Wear',
|
19878
|
+
'Anniversary Gifts'
|
19879
|
+
]
|
19880
|
+
}
|
19881
|
+
};
|
19690
19882
|
const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain, tagList = [], scenes, onActiveChange, activeIndex, loopPlay = false }) => {
|
19691
19883
|
const swiperRef = React.useRef(null);
|
19692
19884
|
React.useMemo(() => {
|
@@ -19726,12 +19918,126 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
19726
19918
|
}
|
19727
19919
|
return null;
|
19728
19920
|
}, [globalConfig]);
|
19729
|
-
|
19730
|
-
|
19731
|
-
|
19732
|
-
|
19733
|
-
|
19734
|
-
|
19921
|
+
const renderBottom = (rec, index) => {
|
19922
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
19923
|
+
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
19924
|
+
let cta = null;
|
19925
|
+
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) {
|
19926
|
+
cta = '多商品CTA';
|
19927
|
+
}
|
19928
|
+
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
19929
|
+
cta = '商品CTA';
|
19930
|
+
}
|
19931
|
+
else {
|
19932
|
+
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;
|
19933
|
+
}
|
19934
|
+
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
19935
|
+
return (React.createElement(React.Fragment, null,
|
19936
|
+
((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.title) && (React.createElement("div", { style: {
|
19937
|
+
background: 'repeating-linear-gradient(0deg, rgba(26, 26, 25, 0.7), hsla(0, 0%, 100%, 0))',
|
19938
|
+
height: '130px',
|
19939
|
+
position: 'absolute',
|
19940
|
+
bottom: 0,
|
19941
|
+
width: '100%',
|
19942
|
+
willChange: 'transform',
|
19943
|
+
zIndex: 2,
|
19944
|
+
pointerEvents: 'none'
|
19945
|
+
} })),
|
19946
|
+
React.createElement("div", { style: {
|
19947
|
+
marginBottom: `${(_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _g !== void 0 ? _g : 40}px`,
|
19948
|
+
zIndex: 999,
|
19949
|
+
position: 'absolute',
|
19950
|
+
bottom: 0,
|
19951
|
+
left: 0,
|
19952
|
+
right: 0,
|
19953
|
+
paddingTop: '20px'
|
19954
|
+
} },
|
19955
|
+
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { style: {} },
|
19956
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, isActive: index === activeIndex, value: value }))) : null,
|
19957
|
+
React.createElement("div", null,
|
19958
|
+
React.createElement(ExpandableText$1
|
19959
|
+
// className='clc-sxp-bottom-text'
|
19960
|
+
, {
|
19961
|
+
// className='clc-sxp-bottom-text'
|
19962
|
+
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' }) }),
|
19963
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }))),
|
19964
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
|
19965
|
+
}
|
19966
|
+
return null;
|
19967
|
+
};
|
19968
|
+
const likeIcon = useIconLink(defaultLikeIconPath, appDomain);
|
19969
|
+
const unlikeIcon = useIconLink(defaultUnLikeIconPath, appDomain);
|
19970
|
+
const renderLikeButton = (rec, index) => {
|
19971
|
+
var _a, _b, _c, _d;
|
19972
|
+
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
|
19973
|
+
return;
|
19974
|
+
let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
|
19975
|
+
if (top < 40) {
|
19976
|
+
top += 40;
|
19977
|
+
}
|
19978
|
+
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
19979
|
+
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,
|
19980
|
+
// className={style['clc-sxp-like-button']}
|
19981
|
+
style: {
|
19982
|
+
top,
|
19983
|
+
right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0,
|
19984
|
+
position: 'absolute',
|
19985
|
+
zIndex: 999,
|
19986
|
+
backgroundColor: 'transparent',
|
19987
|
+
width: '50px',
|
19988
|
+
height: '50px',
|
19989
|
+
outline: 'none',
|
19990
|
+
border: 'none',
|
19991
|
+
boxSizing: 'content-box',
|
19992
|
+
padding: 0,
|
19993
|
+
transform: 'translate3d(0px, 0px, 0px)'
|
19994
|
+
} }));
|
19995
|
+
}
|
19996
|
+
return null;
|
19997
|
+
};
|
19998
|
+
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png', appDomain);
|
19999
|
+
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png', appDomain);
|
20000
|
+
const renderToggleButton = (visible) => {
|
20001
|
+
var _a, _b, _c, _d;
|
20002
|
+
if (!visible)
|
20003
|
+
return;
|
20004
|
+
let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _a !== void 0 ? _a : 23;
|
20005
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) === 'top') {
|
20006
|
+
top += 45;
|
20007
|
+
}
|
20008
|
+
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: {
|
20009
|
+
position: 'absolute',
|
20010
|
+
visibility: 'visible',
|
20011
|
+
zIndex: 999,
|
20012
|
+
transform: 'translate3d(0px,0px,0px)',
|
20013
|
+
[(_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,
|
20014
|
+
[(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top,
|
20015
|
+
backgroundColor: 'transparent',
|
20016
|
+
width: '50px',
|
20017
|
+
height: '50px',
|
20018
|
+
outline: 'none',
|
20019
|
+
border: 'none',
|
20020
|
+
boxSizing: 'content-box',
|
20021
|
+
padding: 0
|
20022
|
+
}, 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 })));
|
20023
|
+
};
|
20024
|
+
const renderView = (item, index) => {
|
20025
|
+
var _a, _b, _c, _d;
|
20026
|
+
const rec = lodash.cloneDeep(recData);
|
20027
|
+
rec.video.bindProducts = item === null || item === void 0 ? void 0 : item.bindProducts;
|
20028
|
+
return (React.createElement("div", { style: { position: 'relative' } },
|
20029
|
+
React.createElement(SwiperSlide, { key: index, virtualIndex: index, style: { overflow: 'hidden', position: 'relative' } },
|
20030
|
+
renderBottom(rec, index),
|
20031
|
+
renderLikeButton(rec, index),
|
20032
|
+
renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
20033
|
+
React.createElement(ToggleButton$1, { style: {
|
20034
|
+
position: 'absolute',
|
20035
|
+
right: (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _a !== void 0 ? _a : 0,
|
20036
|
+
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',
|
20037
|
+
bottom: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _d !== void 0 ? _d : 23,
|
20038
|
+
zIndex: 999
|
20039
|
+
}, 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 }),
|
20040
|
+
renderContent(item, index))));
|
19735
20041
|
};
|
19736
20042
|
React.useEffect(() => {
|
19737
20043
|
var _a, _b;
|
@@ -19745,12 +20051,15 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
19745
20051
|
return;
|
19746
20052
|
(_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);
|
19747
20053
|
}, [loopPlay]);
|
19748
|
-
return (React.createElement(
|
19749
|
-
|
19750
|
-
|
19751
|
-
|
19752
|
-
|
19753
|
-
|
20054
|
+
return (React.createElement("div", { id: 'sxp-render',
|
20055
|
+
// className={style['clc-sxp-container']}
|
20056
|
+
style: { height: containerHeight, position: 'relative', pointerEvents: 'none' } },
|
20057
|
+
React.createElement(Swiper, { ref: swiperRef, allowTouchMove: false, onActiveIndexChange: (swiper) => {
|
20058
|
+
// setActiveIndex(swiper.activeIndex);
|
20059
|
+
onActiveChange === null || onActiveChange === void 0 ? void 0 : onActiveChange(swiper.activeIndex);
|
20060
|
+
}, direction: 'vertical', style: { overflow: 'hidden', height: containerHeight }, height: containerHeight }, scenes === null || scenes === void 0 ? void 0 : scenes.map((rec, index) => {
|
20061
|
+
return renderView(rec, index);
|
20062
|
+
}))));
|
19754
20063
|
};
|
19755
20064
|
var index$1 = React.memo(DiyStoryPreview);
|
19756
20065
|
|