pb-sxp-ui 1.15.13-alpha.1 → 1.15.13-alpha.3
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 +356 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +354 -46
- 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 +356 -48
- 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 +3 -0
- package/es/core/components/DiyStoryPreview/index.js +288 -22
- package/es/core/components/SxpPageCore/index.d.ts +1 -0
- package/es/core/components/SxpPageCore/index.js +3 -3
- package/es/core/components/SxpPageRender/ExpandableText.js +10 -2
- package/es/core/components/SxpPageRender/RenderCard.js +4 -4
- package/es/core/context/SxpDataSourceProvider.js +3 -3
- 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 +3 -0
- package/lib/core/components/DiyStoryPreview/index.js +287 -21
- package/lib/core/components/SxpPageCore/index.d.ts +1 -0
- package/lib/core/components/SxpPageCore/index.js +3 -3
- package/lib/core/components/SxpPageRender/ExpandableText.js +10 -2
- package/lib/core/components/SxpPageRender/RenderCard.js +4 -4
- package/lib/core/context/SxpDataSourceProvider.js +3 -3
- 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
@@ -764,9 +764,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
764
764
|
}
|
765
765
|
else if (utmVal) {
|
766
766
|
const val = (_k = (_j = (_h = splitUrlParams(utmVal)) === null || _h === void 0 ? void 0 : _h.filter((val) => {
|
767
|
-
var _a, _b;
|
768
767
|
const key = val.split('=')[0];
|
769
|
-
return
|
768
|
+
return key;
|
770
769
|
})) === null || _j === void 0 ? void 0 : _j.join('&')) !== null && _k !== void 0 ? _k : '';
|
771
770
|
if (val)
|
772
771
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
@@ -807,7 +806,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
807
806
|
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
808
807
|
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_o = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _o !== void 0 ? _o : 1 });
|
809
808
|
}
|
810
|
-
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('
|
809
|
+
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct', { method: 'POST', body: query }));
|
811
810
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
812
811
|
return undefined;
|
813
812
|
}
|
@@ -1084,6 +1083,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1084
1083
|
if (!isShowConsent)
|
1085
1084
|
h5EnterLink();
|
1086
1085
|
}, [isShowConsent]);
|
1086
|
+
console.log(data, '111');
|
1087
1087
|
useEffect(() => {
|
1088
1088
|
if (isShowConsent || isPreview)
|
1089
1089
|
return;
|
@@ -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
|
}
|
@@ -19054,7 +19064,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19054
19064
|
React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig }),
|
19055
19065
|
openMultiPosts && (React.createElement(MultiPosts$2, Object.assign({}, (_x = (_w = (_v = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.item) === null || _x === void 0 ? void 0 : _x.props, (_0 = (_z = (_y = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.item) === null || _0 === void 0 ? void 0 : _0.event, { style: { position: 'fixed', top: 0, left: 0, right: 0 } })))))));
|
19056
19066
|
};
|
19057
|
-
var
|
19067
|
+
var index$2 = memo(SxpPageRender);
|
19058
19068
|
|
19059
19069
|
const PictureGroup$2 = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
|
19060
19070
|
return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
|
@@ -19418,7 +19428,7 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
|
|
19418
19428
|
return renderView(rec, index);
|
19419
19429
|
})));
|
19420
19430
|
};
|
19421
|
-
var index$
|
19431
|
+
var index$1 = memo(DiyPortalPreview);
|
19422
19432
|
|
19423
19433
|
const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index, swiperRef, data = [], loopPlay }) => {
|
19424
19434
|
const { isActive } = useSwiperSlide();
|
@@ -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,17 +19669,196 @@ 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-
|
19672
|
+
* @LastEditTime: 2025-03-27 17:20:34
|
19659
19673
|
* @FilePath: \pb-sxp-ui\src\core\components\DiyStoryPreview\index.tsx
|
19660
19674
|
*
|
19661
19675
|
*/
|
19676
|
+
const recData = {
|
19677
|
+
position: 0,
|
19678
|
+
isCollected: false,
|
19679
|
+
product: null,
|
19680
|
+
video: {
|
19681
|
+
appId: null,
|
19682
|
+
itemId: 'VIDEOSsRgI1695278974368',
|
19683
|
+
title: '8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片',
|
19684
|
+
enTitle: null,
|
19685
|
+
icon: null,
|
19686
|
+
cover: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20231017/fsJFWmW1dGyW7XmDspbJPTn5esL3U1697538777398.png',
|
19687
|
+
link: null,
|
19688
|
+
linkTitle: null,
|
19689
|
+
linkType: null,
|
19690
|
+
menuCategoryId: null,
|
19691
|
+
remark: null,
|
19692
|
+
tags: [
|
19693
|
+
'Gift-Giving',
|
19694
|
+
'Daily Wear',
|
19695
|
+
'Business Formal',
|
19696
|
+
'Sports/Casual',
|
19697
|
+
'Anniversary Gifts',
|
19698
|
+
'Wedding/Engagement',
|
19699
|
+
'Formal Dinner/Party'
|
19700
|
+
],
|
19701
|
+
traceInfo: ':VIDEO:VIDEOSsRgI1695278974368:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19702
|
+
value: 385,
|
19703
|
+
weight: null,
|
19704
|
+
bindCta: null,
|
19705
|
+
bindProduct: null,
|
19706
|
+
bindProducts: [
|
19707
|
+
{
|
19708
|
+
appId: 'wx448578f8851f3dce',
|
19709
|
+
itemId: 'test02178888',
|
19710
|
+
title: 'christian dior小包包 新CDN',
|
19711
|
+
enTitle: null,
|
19712
|
+
icon: null,
|
19713
|
+
cover: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fs2jqiurjftpoaba67iiwr9jt5sc31726213277754.avif',
|
19714
|
+
link: '/pages/details/index?spu_id=1702262707659534338',
|
19715
|
+
linkTitle: '',
|
19716
|
+
linkType: 'MP',
|
19717
|
+
menuCategoryId: null,
|
19718
|
+
remark: null,
|
19719
|
+
tags: [],
|
19720
|
+
traceInfo: ':PRODUCT:test02178888:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19721
|
+
value: null,
|
19722
|
+
weight: null,
|
19723
|
+
bindCta: {
|
19724
|
+
appId: 'wx448578f8851f3dce',
|
19725
|
+
itemId: 'CTA3KofE1716186622249',
|
19726
|
+
title: 'SHOP NOW 立即购买',
|
19727
|
+
enTitle: 'BUY NOW立即购买,选择你所喜爱的;',
|
19728
|
+
icon: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240520/fssfxbmiwghixmgblz9uriwennd2r1716186615574.avif',
|
19729
|
+
cover: null,
|
19730
|
+
link: '/pages/details/index?spu_id=1702262707659534338',
|
19731
|
+
linkTitle: '',
|
19732
|
+
linkType: 'MP',
|
19733
|
+
menuCategoryId: '64b60b202caf0e1c1ce1e17d',
|
19734
|
+
remark: null,
|
19735
|
+
tags: [
|
19736
|
+
"Woman's Perfumes",
|
19737
|
+
'Plates & Bowls',
|
19738
|
+
'Glasses',
|
19739
|
+
'Multicolor',
|
19740
|
+
'Carafes',
|
19741
|
+
'Tea & Coffee',
|
19742
|
+
'Green',
|
19743
|
+
'Grey',
|
19744
|
+
'Cutlery'
|
19745
|
+
],
|
19746
|
+
traceInfo: ':CTA:CTA3KofE1716186622249:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19747
|
+
value: null,
|
19748
|
+
weight: null
|
19749
|
+
},
|
19750
|
+
collection: 'Ricco',
|
19751
|
+
currency: 'INR-₹',
|
19752
|
+
homePage: [
|
19753
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fs2jqiurjftpoaba67iiwr9jt5sc31726213277754.avif',
|
19754
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fsr9ttuzuljs85smqi6lsidovnyoy1726213285994.avif',
|
19755
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fsknmfhx2lxukxews05guwwxr8rju1726213281108.avif',
|
19756
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fs0acnua4f1clamdpwdsrh0v5dgc61726213289247.avif'
|
19757
|
+
],
|
19758
|
+
info: 'test',
|
19759
|
+
price: 53200,
|
19760
|
+
shippingInfo: null,
|
19761
|
+
taxInfo: null
|
19762
|
+
},
|
19763
|
+
{
|
19764
|
+
appId: null,
|
19765
|
+
itemId: '113J631A0684_C520',
|
19766
|
+
title: 'Sweatshirt à capuche Dior Oblique, coupe relax',
|
19767
|
+
enTitle: null,
|
19768
|
+
icon: null,
|
19769
|
+
cover: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241115/fsaf0xq8vx8gkkl30y1h1swpinmbt1731661943891.avif',
|
19770
|
+
link: 'https://www.dior.com/fr_fr/fashion/products/113J631A0684_C520',
|
19771
|
+
linkTitle: null,
|
19772
|
+
linkType: 'WEB',
|
19773
|
+
menuCategoryId: null,
|
19774
|
+
remark: null,
|
19775
|
+
tags: [],
|
19776
|
+
traceInfo: ':PRODUCT:113J631A0684_C520:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19777
|
+
value: null,
|
19778
|
+
weight: null,
|
19779
|
+
bindCta: {
|
19780
|
+
appId: null,
|
19781
|
+
itemId: 'CTAAfaKf1730796437032',
|
19782
|
+
title: 'test',
|
19783
|
+
enTitle: 'test',
|
19784
|
+
icon: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241105/fsjblxoud2tmehpiqqomh0oktwqrd1730796431496.avif',
|
19785
|
+
cover: null,
|
19786
|
+
link: null,
|
19787
|
+
linkTitle: null,
|
19788
|
+
linkType: null,
|
19789
|
+
menuCategoryId: '64b60b202caf0e1c1ce1e17d',
|
19790
|
+
remark: '',
|
19791
|
+
tags: [],
|
19792
|
+
traceInfo: ':CTA:CTAAfaKf1730796437032:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19793
|
+
value: null,
|
19794
|
+
weight: null
|
19795
|
+
},
|
19796
|
+
collection: 'Jacquard de coton éponge bleu',
|
19797
|
+
currency: 'EUR-€',
|
19798
|
+
homePage: [
|
19799
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241115/fsaf0xq8vx8gkkl30y1h1swpinmbt1731661943891.avif',
|
19800
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241115/fszxkdcjfjql2oiy90ffbal5tsfd81731661964913.avif',
|
19801
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241115/fs1jhd9jwxvfqmrbjwy5abfzb0fde1731661994996.avif'
|
19802
|
+
],
|
19803
|
+
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",
|
19804
|
+
price: 1800,
|
19805
|
+
shippingInfo: null,
|
19806
|
+
taxInfo: null
|
19807
|
+
},
|
19808
|
+
{
|
19809
|
+
appId: null,
|
19810
|
+
itemId: 'S5573CRIW_M928',
|
19811
|
+
title: 'Mini Dior Book Tote',
|
19812
|
+
enTitle: null,
|
19813
|
+
icon: null,
|
19814
|
+
cover: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fsvewk9etrawxrzznmvvewgt1bctu1739415576729.avif',
|
19815
|
+
link: 'https://www.dior.com/en_gb/fashion/products/S5573CRIW_M928',
|
19816
|
+
linkTitle: null,
|
19817
|
+
linkType: 'WEB',
|
19818
|
+
menuCategoryId: null,
|
19819
|
+
remark: null,
|
19820
|
+
tags: ['ダイヤモンド'],
|
19821
|
+
traceInfo: ':PRODUCT:S5573CRIW_M928:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
19822
|
+
value: null,
|
19823
|
+
weight: null,
|
19824
|
+
bindCta: null,
|
19825
|
+
collection: null,
|
19826
|
+
currency: 'GBP-£',
|
19827
|
+
homePage: [
|
19828
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fsvewk9etrawxrzznmvvewgt1bctu1739415576729.avif',
|
19829
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fsngtlvhid7xwt5if0viw7vqanm831739415582147.avif',
|
19830
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fs4hotdvyzjtnqb9vszlynuzplddc1739415586910.avif',
|
19831
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fswffx9kwexf3z3vcnxisut1qxtez1739415591629.avif',
|
19832
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fsbfsi7tttx1hnzldoiw7eoea7fvh1739415597388.avif'
|
19833
|
+
],
|
19834
|
+
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.",
|
19835
|
+
price: 1950,
|
19836
|
+
shippingInfo: null,
|
19837
|
+
taxInfo: null
|
19838
|
+
}
|
19839
|
+
],
|
19840
|
+
url: null,
|
19841
|
+
blockCta: 1,
|
19842
|
+
blockProduct: 1,
|
19843
|
+
hashTags: [
|
19844
|
+
'Sports/Casual',
|
19845
|
+
'Formal Dinner/Party',
|
19846
|
+
'Business Formal',
|
19847
|
+
'Wedding/Engagement',
|
19848
|
+
'Gift-Giving',
|
19849
|
+
'Daily Wear',
|
19850
|
+
'Anniversary Gifts'
|
19851
|
+
]
|
19852
|
+
}
|
19853
|
+
};
|
19662
19854
|
const RESOLVER$1 = {};
|
19663
19855
|
Object.values(_materials_).forEach((v) => {
|
19664
19856
|
RESOLVER$1[v.extend.type] = v;
|
19665
19857
|
});
|
19666
19858
|
const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
|
19667
19859
|
const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
|
19668
|
-
const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain, tagList = [], scenes, onActiveChange, activeIndex, loopPlay = false }) => {
|
19860
|
+
const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain, tagList = [], scenes, onActiveChange, activeIndex, loopPlay = false, pointerEvents = 'none' }) => {
|
19861
|
+
const [loopPlaySwiper, setLooPlaySwiper] = useState(loopPlay);
|
19669
19862
|
const swiperRef = useRef(null);
|
19670
19863
|
useMemo(() => {
|
19671
19864
|
let minusHeight = 0;
|
@@ -19691,10 +19884,10 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
19691
19884
|
const renderContent = (rec, index) => {
|
19692
19885
|
const isVideo = isVideoUrl(rec === null || rec === void 0 ? void 0 : rec.mediaUrl);
|
19693
19886
|
if (isVideo) {
|
19694
|
-
return (React.createElement(VideoWidget$1, { rec: rec, index: index, muted: true, width: containerWidth, data: scenes !== null && scenes !== void 0 ? scenes : [], height: containerHeight, activeIndex: index, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, swiperRef: swiperRef, loopPlay:
|
19887
|
+
return (React.createElement(VideoWidget$1, { rec: rec, index: index, muted: true, width: containerWidth, data: scenes !== null && scenes !== void 0 ? scenes : [], height: containerHeight, activeIndex: index, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, swiperRef: swiperRef, loopPlay: loopPlaySwiper }));
|
19695
19888
|
}
|
19696
19889
|
else {
|
19697
|
-
return (React.createElement(PictureGroup$1, { key: rec.itemId, imgUrls: [rec === null || rec === void 0 ? void 0 : rec.mediaUrl], width: containerWidth, height: containerHeight, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost, data: scenes !== null && scenes !== void 0 ? scenes : [], swiperRef: swiperRef, loopPlay:
|
19890
|
+
return (React.createElement(PictureGroup$1, { key: rec.itemId, imgUrls: [rec === null || rec === void 0 ? void 0 : rec.mediaUrl], width: containerWidth, height: containerHeight, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost, data: scenes !== null && scenes !== void 0 ? scenes : [], swiperRef: swiperRef, loopPlay: loopPlaySwiper }));
|
19698
19891
|
}
|
19699
19892
|
};
|
19700
19893
|
useMemo(() => {
|
@@ -19704,12 +19897,126 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
19704
19897
|
}
|
19705
19898
|
return null;
|
19706
19899
|
}, [globalConfig]);
|
19707
|
-
|
19708
|
-
|
19709
|
-
|
19710
|
-
|
19711
|
-
|
19712
|
-
|
19900
|
+
const renderBottom = (rec, index) => {
|
19901
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
19902
|
+
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
19903
|
+
let cta = null;
|
19904
|
+
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) {
|
19905
|
+
cta = '多商品CTA';
|
19906
|
+
}
|
19907
|
+
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
19908
|
+
cta = '商品CTA';
|
19909
|
+
}
|
19910
|
+
else {
|
19911
|
+
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;
|
19912
|
+
}
|
19913
|
+
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
19914
|
+
return (React.createElement(React.Fragment, null,
|
19915
|
+
((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.title) && (React.createElement("div", { style: {
|
19916
|
+
background: 'repeating-linear-gradient(0deg, rgba(26, 26, 25, 0.7), hsla(0, 0%, 100%, 0))',
|
19917
|
+
height: '130px',
|
19918
|
+
position: 'absolute',
|
19919
|
+
bottom: 0,
|
19920
|
+
width: '100%',
|
19921
|
+
willChange: 'transform',
|
19922
|
+
zIndex: 2,
|
19923
|
+
pointerEvents
|
19924
|
+
} })),
|
19925
|
+
React.createElement("div", { style: {
|
19926
|
+
marginBottom: `${(_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _g !== void 0 ? _g : 40}px`,
|
19927
|
+
zIndex: 999,
|
19928
|
+
position: 'absolute',
|
19929
|
+
bottom: 0,
|
19930
|
+
left: 0,
|
19931
|
+
right: 0,
|
19932
|
+
paddingTop: '20px'
|
19933
|
+
} },
|
19934
|
+
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { style: {} },
|
19935
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, isActive: index === activeIndex, value: value }))) : null,
|
19936
|
+
React.createElement("div", null,
|
19937
|
+
React.createElement(ExpandableText$1
|
19938
|
+
// className='clc-sxp-bottom-text'
|
19939
|
+
, {
|
19940
|
+
// className='clc-sxp-bottom-text'
|
19941
|
+
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' }) }),
|
19942
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }))),
|
19943
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
|
19944
|
+
}
|
19945
|
+
return null;
|
19946
|
+
};
|
19947
|
+
const likeIcon = useIconLink(defaultLikeIconPath, appDomain);
|
19948
|
+
const unlikeIcon = useIconLink(defaultUnLikeIconPath, appDomain);
|
19949
|
+
const renderLikeButton = (rec, index) => {
|
19950
|
+
var _a, _b, _c, _d;
|
19951
|
+
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
|
19952
|
+
return;
|
19953
|
+
let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
|
19954
|
+
if (top < 40) {
|
19955
|
+
top += 40;
|
19956
|
+
}
|
19957
|
+
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
19958
|
+
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,
|
19959
|
+
// className={style['clc-sxp-like-button']}
|
19960
|
+
style: {
|
19961
|
+
top,
|
19962
|
+
right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0,
|
19963
|
+
position: 'absolute',
|
19964
|
+
zIndex: 999,
|
19965
|
+
backgroundColor: 'transparent',
|
19966
|
+
width: '50px',
|
19967
|
+
height: '50px',
|
19968
|
+
outline: 'none',
|
19969
|
+
border: 'none',
|
19970
|
+
boxSizing: 'content-box',
|
19971
|
+
padding: 0,
|
19972
|
+
transform: 'translate3d(0px, 0px, 0px)'
|
19973
|
+
} }));
|
19974
|
+
}
|
19975
|
+
return null;
|
19976
|
+
};
|
19977
|
+
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png', appDomain);
|
19978
|
+
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png', appDomain);
|
19979
|
+
const renderToggleButton = (visible) => {
|
19980
|
+
var _a, _b, _c, _d;
|
19981
|
+
if (!visible)
|
19982
|
+
return;
|
19983
|
+
let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _a !== void 0 ? _a : 23;
|
19984
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) === 'top') {
|
19985
|
+
top += 45;
|
19986
|
+
}
|
19987
|
+
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: {
|
19988
|
+
position: 'absolute',
|
19989
|
+
visibility: 'visible',
|
19990
|
+
zIndex: 999,
|
19991
|
+
transform: 'translate3d(0px,0px,0px)',
|
19992
|
+
[(_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,
|
19993
|
+
[(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top,
|
19994
|
+
backgroundColor: 'transparent',
|
19995
|
+
width: '50px',
|
19996
|
+
height: '50px',
|
19997
|
+
outline: 'none',
|
19998
|
+
border: 'none',
|
19999
|
+
boxSizing: 'content-box',
|
20000
|
+
padding: 0
|
20001
|
+
}, 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 })));
|
20002
|
+
};
|
20003
|
+
const renderView = (item, index) => {
|
20004
|
+
var _a, _b, _c, _d;
|
20005
|
+
const rec = cloneDeep(recData);
|
20006
|
+
rec.video.bindProducts = item === null || item === void 0 ? void 0 : item.bindProducts;
|
20007
|
+
return (React.createElement("div", { style: { position: 'relative' } },
|
20008
|
+
React.createElement(SwiperSlide, { key: index, virtualIndex: index, style: { overflow: 'hidden', position: 'relative' } },
|
20009
|
+
renderBottom(rec, index),
|
20010
|
+
renderLikeButton(rec, index),
|
20011
|
+
renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
20012
|
+
React.createElement(ToggleButton$1, { style: {
|
20013
|
+
position: 'absolute',
|
20014
|
+
right: (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _a !== void 0 ? _a : 0,
|
20015
|
+
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',
|
20016
|
+
bottom: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _d !== void 0 ? _d : 23,
|
20017
|
+
zIndex: 999
|
20018
|
+
}, 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 }),
|
20019
|
+
renderContent(item, index))));
|
19713
20020
|
};
|
19714
20021
|
useEffect(() => {
|
19715
20022
|
var _a, _b;
|
@@ -19723,14 +20030,23 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
19723
20030
|
return;
|
19724
20031
|
(_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
20032
|
}, [loopPlay]);
|
19726
|
-
return (React.createElement(
|
19727
|
-
|
19728
|
-
|
19729
|
-
|
19730
|
-
|
19731
|
-
|
20033
|
+
return (React.createElement("div", { id: 'sxp-render',
|
20034
|
+
// className={style['clc-sxp-container']}
|
20035
|
+
style: { height: containerHeight, position: 'relative', pointerEvents } },
|
20036
|
+
React.createElement(Swiper, { ref: swiperRef, allowTouchMove: pointerEvents !== 'none', onSlideChange: () => {
|
20037
|
+
setLooPlaySwiper(false);
|
20038
|
+
swiperRef.current.swiper.allowTouchMove = false;
|
20039
|
+
setTimeout(() => {
|
20040
|
+
swiperRef.current.swiper.allowTouchMove = true;
|
20041
|
+
}, 500);
|
20042
|
+
}, onActiveIndexChange: (swiper) => {
|
20043
|
+
// setActiveIndex(swiper.activeIndex);
|
20044
|
+
onActiveChange === null || onActiveChange === void 0 ? void 0 : onActiveChange(swiper.activeIndex);
|
20045
|
+
}, direction: 'vertical', style: { overflow: 'hidden', height: containerHeight }, height: containerHeight }, scenes === null || scenes === void 0 ? void 0 : scenes.map((rec, index) => {
|
20046
|
+
return renderView(rec, index);
|
20047
|
+
}))));
|
19732
20048
|
};
|
19733
|
-
var
|
20049
|
+
var DiyStoryPreview$1 = memo(DiyStoryPreview);
|
19734
20050
|
|
19735
20051
|
/*
|
19736
20052
|
* @Author: binruan@chatlabs.com
|
@@ -19828,17 +20144,9 @@ const Popup = () => {
|
|
19828
20144
|
|
19829
20145
|
/*
|
19830
20146
|
* @Author: binruan@chatlabs.com
|
19831
|
-
* @Date: 2024-
|
19832
|
-
* @LastEditors: binruan@chatlabs.com
|
19833
|
-
* @LastEditTime: 2025-02-24 15:47:44
|
19834
|
-
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
19835
|
-
*
|
19836
|
-
*/
|
19837
|
-
/*
|
19838
|
-
* @Author: binruan@chatlabs.com
|
19839
|
-
* @Date: 2023-11-24 15:58:00
|
20147
|
+
* @Date: 2024-03-20 10:27:31
|
19840
20148
|
* @LastEditors: binruan@chatlabs.com
|
19841
|
-
* @LastEditTime:
|
20149
|
+
* @LastEditTime: 2025-03-27 17:17:56
|
19842
20150
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
19843
20151
|
*
|
19844
20152
|
*/
|
@@ -19846,7 +20154,7 @@ const RESOLVER = {};
|
|
19846
20154
|
Object.values(_materials_).forEach((v) => {
|
19847
20155
|
RESOLVER[v.extend.type] = v;
|
19848
20156
|
});
|
19849
|
-
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList }) => {
|
20157
|
+
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList, pointerEvents }) => {
|
19850
20158
|
var _a, _b, _c, _d, _e, _f;
|
19851
20159
|
const utmVal = useMemo(() => {
|
19852
20160
|
var _a;
|
@@ -19859,7 +20167,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
|
|
19859
20167
|
React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, data: data, dataList: dataList, onUpdateSchema: (d) => setSchema(d), onUpdateChannel: (d) => setChannel(d), render: ({ rtcList, tagList, pageData }) => {
|
19860
20168
|
var _a;
|
19861
20169
|
return (React.createElement(React.Fragment, null,
|
19862
|
-
React.createElement(
|
20170
|
+
React.createElement(DiyStoryPreview$1, Object.assign({ defaultData: data }, (_a = pageData === null || pageData === void 0 ? void 0 : pageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, scenes: rtcList, resolver: RESOLVER, containerHeight: window === null || window === void 0 ? void 0 : window.innerHeight, pointerEvents: pointerEvents })),
|
19863
20171
|
React.createElement(Popup, null)));
|
19864
20172
|
} })));
|
19865
20173
|
};
|
@@ -19873,5 +20181,5 @@ var index = memo(SxpPageCore);
|
|
19873
20181
|
* @FilePath: \pb-sxp-ui\src\index.ts
|
19874
20182
|
*/
|
19875
20183
|
|
19876
|
-
export { index$
|
20184
|
+
export { index$1 as DiyPortalPreview, DiyStoryPreview$1 as DiyStoryPreview, EditorDataProvider, Modal$1 as Modal, SxpDataSourceProvider$1 as SxpDataSourceProvider, index as SxpPageCore, index$2 as SxpPageRender, index$3 as core, Pagebuilder as default, _materials_ as materials, useEditorDataProvider };
|
19877
20185
|
//# sourceMappingURL=index.js.map
|