pb-sxp-ui 1.0.41 → 1.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +111 -111
- package/dist/index.cjs +111 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +48 -3
- package/dist/index.js +111 -27
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +111 -27
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/DiyPortalPreview/index.js +21 -6
- package/es/core/components/SxpPageCore/index.js +2 -2
- package/es/core/components/SxpPageRender/Nudge/index.js +6 -5
- package/es/core/components/SxpPageRender/Tagbar.d.ts +7 -0
- package/es/core/components/SxpPageRender/Tagbar.js +37 -0
- package/es/core/components/SxpPageRender/index.d.ts +2 -0
- package/es/core/components/SxpPageRender/index.js +14 -5
- package/es/core/context/SxpDataSourceProvider.d.ts +3 -0
- package/es/core/context/SxpDataSourceProvider.js +28 -4
- package/es/materials/sxp/popup/CommodityDetail/index.js +4 -4
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/lib/core/components/DiyPortalPreview/index.js +21 -6
- package/lib/core/components/SxpPageCore/index.js +2 -2
- package/lib/core/components/SxpPageRender/Nudge/index.js +6 -5
- package/lib/core/components/SxpPageRender/Tagbar.d.ts +7 -0
- package/lib/core/components/SxpPageRender/Tagbar.js +40 -0
- package/lib/core/components/SxpPageRender/index.d.ts +2 -0
- package/lib/core/components/SxpPageRender/index.js +14 -5
- package/lib/core/context/SxpDataSourceProvider.d.ts +3 -0
- package/lib/core/context/SxpDataSourceProvider.js +28 -4
- package/lib/materials/sxp/popup/CommodityDetail/index.js +4 -4
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/package.json +115 -115
package/dist/pb-ui.js
CHANGED
@@ -422,7 +422,8 @@
|
|
422
422
|
}
|
423
423
|
|
424
424
|
const SxpDataSourceContext = React.createContext({
|
425
|
-
rtcList: []
|
425
|
+
rtcList: [],
|
426
|
+
tagList: []
|
426
427
|
});
|
427
428
|
var DataSourceType;
|
428
429
|
(function (DataSourceType) {
|
@@ -431,6 +432,7 @@
|
|
431
432
|
const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
|
432
433
|
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false }) => {
|
433
434
|
const [rtcList, setRtcList] = React.useState([]);
|
435
|
+
const [tagList, setTagList] = React.useState([]);
|
434
436
|
const [loading, setLoading] = React.useState(false);
|
435
437
|
const [curReqInfo, setCurReqInfo] = React.useState({ rtc: '', requestId: '' });
|
436
438
|
const swiperRef = React.useRef(null);
|
@@ -554,6 +556,19 @@
|
|
554
556
|
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/customform', { method: 'POST', body }));
|
555
557
|
return res === null || res === void 0 ? void 0 : res.success;
|
556
558
|
}), [bffFetch]);
|
559
|
+
// 获取 Tag
|
560
|
+
const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
561
|
+
var _g, _h;
|
562
|
+
if (!utmVal)
|
563
|
+
return;
|
564
|
+
try {
|
565
|
+
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: utmVal } }));
|
566
|
+
setTagList((_h = (_g = result === null || result === void 0 ? void 0 : result.data) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []);
|
567
|
+
}
|
568
|
+
catch (e) {
|
569
|
+
console.log('e', e);
|
570
|
+
}
|
571
|
+
}), [bffFetch, utmVal]);
|
557
572
|
const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
|
558
573
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
559
574
|
const cta = product === null || product === void 0 ? void 0 : product.bindCta;
|
@@ -574,6 +589,7 @@
|
|
574
589
|
}, [bffEventReport, isFromHashtag]);
|
575
590
|
React.useEffect(() => {
|
576
591
|
setLoading(true);
|
592
|
+
bffGetTagList();
|
577
593
|
getRecommendVideos()
|
578
594
|
.then((data) => {
|
579
595
|
var _a, _b;
|
@@ -589,6 +605,7 @@
|
|
589
605
|
if (!isInit.current)
|
590
606
|
return;
|
591
607
|
setLoading(true);
|
608
|
+
bffGetTagList();
|
592
609
|
getRecommendVideos()
|
593
610
|
.then((data) => {
|
594
611
|
var _a, _b;
|
@@ -598,7 +615,7 @@
|
|
598
615
|
.finally(() => {
|
599
616
|
setLoading(false);
|
600
617
|
});
|
601
|
-
}, [getRecommendVideos]);
|
618
|
+
}, [getRecommendVideos, bffGetTagList]);
|
602
619
|
const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
|
603
620
|
return (React.createElement(SxpDataSourceContext.Provider, { value: {
|
604
621
|
rtcList,
|
@@ -630,8 +647,16 @@
|
|
630
647
|
appDomain,
|
631
648
|
hashTagSize,
|
632
649
|
loadingImage: loadingImage !== null && loadingImage !== void 0 ? loadingImage : defaultLoadingImage,
|
633
|
-
isOpenHashTag
|
634
|
-
|
650
|
+
isOpenHashTag,
|
651
|
+
tagList,
|
652
|
+
setLoading
|
653
|
+
} }, render({
|
654
|
+
rtcList,
|
655
|
+
mutateLike: bffMutateLike,
|
656
|
+
mutateUnlike: bffMutateUnlike,
|
657
|
+
submitForm: bffSubmitForm,
|
658
|
+
tagList
|
659
|
+
})));
|
635
660
|
};
|
636
661
|
var SxpDataSourceProvider$1 = React.memo(SxpDataSourceProvider);
|
637
662
|
|
@@ -8380,10 +8405,10 @@
|
|
8380
8405
|
React.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
|
8381
8406
|
React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
|
8382
8407
|
React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
8383
|
-
React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
|
8384
|
-
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
8385
|
-
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
8386
|
-
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
8408
|
+
React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
|
8409
|
+
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
8410
|
+
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
8411
|
+
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
8387
8412
|
18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
|
8388
8413
|
};
|
8389
8414
|
const renderBtn = () => {
|
@@ -8834,7 +8859,7 @@
|
|
8834
8859
|
const productInfoText = ({ isPost }) => {
|
8835
8860
|
return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
8836
8861
|
React.createElement(ExpandableText$1, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
|
8837
|
-
`Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
|
8862
|
+
`Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
|
8838
8863
|
Made in Italy` })));
|
8839
8864
|
};
|
8840
8865
|
return (React.createElement("div", { className: 'pb-commondityDiroNew' },
|
@@ -12543,17 +12568,54 @@ Made in Italy` })));
|
|
12543
12568
|
*
|
12544
12569
|
*/
|
12545
12570
|
const Nudge = ({ nudge }) => {
|
12571
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
12546
12572
|
return (React.createElement(React.Fragment, null, (nudge === null || nudge === void 0 ? void 0 : nudge.isOpen) && (React.createElement("div", { className: 'clc-sxp-bottom-nudge', style: {
|
12547
|
-
marginBottom: nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom,
|
12548
|
-
width: nudge === null || nudge === void 0 ? void 0 : nudge.size.width,
|
12549
|
-
height: nudge === null || nudge === void 0 ? void 0 : nudge.size.height,
|
12573
|
+
marginBottom: (_a = nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom) !== null && _a !== void 0 ? _a : 5,
|
12574
|
+
width: (_c = (_b = nudge === null || nudge === void 0 ? void 0 : nudge.size) === null || _b === void 0 ? void 0 : _b.width) !== null && _c !== void 0 ? _c : 212,
|
12575
|
+
height: (_e = (_d = nudge === null || nudge === void 0 ? void 0 : nudge.size) === null || _d === void 0 ? void 0 : _d.height) !== null && _e !== void 0 ? _e : 38,
|
12550
12576
|
backgroundColor: nudge === null || nudge === void 0 ? void 0 : nudge.backgroundColor,
|
12551
|
-
borderRadius: nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius
|
12577
|
+
borderRadius: (_f = nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius) !== null && _f !== void 0 ? _f : 4
|
12552
12578
|
} },
|
12553
12579
|
(nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
|
12554
|
-
React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)))));
|
12580
|
+
React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, (_g = nudge === null || nudge === void 0 ? void 0 : nudge.content) !== null && _g !== void 0 ? _g : '')))));
|
12555
12581
|
};
|
12556
12582
|
|
12583
|
+
const DEFAULT_TAG = 'FOR U';
|
12584
|
+
const Tagbar = ({ tagList = [], setActiveIndex }) => {
|
12585
|
+
const [selectTag, setSelectTag] = React.useState(DEFAULT_TAG);
|
12586
|
+
const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef } = useSxpDataSource();
|
12587
|
+
const realTagList = React.useMemo(() => {
|
12588
|
+
return [DEFAULT_TAG, ...tagList];
|
12589
|
+
}, [tagList]);
|
12590
|
+
const handleSelectTag = (tag) => () => {
|
12591
|
+
if (tag === selectTag)
|
12592
|
+
return;
|
12593
|
+
let hashTag;
|
12594
|
+
if (tag !== DEFAULT_TAG) {
|
12595
|
+
hashTag = tag;
|
12596
|
+
}
|
12597
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
|
12598
|
+
getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({ hashTag }).then((res) => {
|
12599
|
+
var _a, _b, _c, _d;
|
12600
|
+
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []);
|
12601
|
+
setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList((_b = res === null || res === void 0 ? void 0 : res.recList) !== null && _b !== void 0 ? _b : []);
|
12602
|
+
setActiveIndex === null || setActiveIndex === void 0 ? void 0 : setActiveIndex(0);
|
12603
|
+
setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(0);
|
12604
|
+
(_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slideTo(0);
|
12605
|
+
}).finally(() => {
|
12606
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
|
12607
|
+
});
|
12608
|
+
setSelectTag(tag);
|
12609
|
+
};
|
12610
|
+
if (tagList.length <= 0)
|
12611
|
+
return null;
|
12612
|
+
return (React.createElement("div", { className: 'clc-sxp-tagbar', style: { height: 45 } },
|
12613
|
+
React.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
|
12614
|
+
return (React.createElement("li", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, onClick: handleSelectTag(tag) }, tag));
|
12615
|
+
}))));
|
12616
|
+
};
|
12617
|
+
var Tagbar$1 = React.memo(Tagbar);
|
12618
|
+
|
12557
12619
|
/*
|
12558
12620
|
* @Author: binruan@chatlabs.com
|
12559
12621
|
* @Date: 2024-01-15 19:03:09
|
@@ -12562,7 +12624,7 @@ Made in Italy` })));
|
|
12562
12624
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
12563
12625
|
*
|
12564
12626
|
*/
|
12565
|
-
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle }) => {
|
12627
|
+
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [] }) => {
|
12566
12628
|
var _a, _b, _c, _d, _e, _f, _g;
|
12567
12629
|
const { schema } = useEditor();
|
12568
12630
|
const [activeIndex, setActiveIndex] = React.useState(0);
|
@@ -12707,8 +12769,15 @@ Made in Italy` })));
|
|
12707
12769
|
};
|
12708
12770
|
}, [activeIndex, bffEventReport, curTime, data, handleH5EnterLink, popupDetailData, isFromHashtag, tempMap]);
|
12709
12771
|
const height = React.useMemo(() => {
|
12710
|
-
|
12711
|
-
|
12772
|
+
let minusHeight = 0;
|
12773
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
12774
|
+
minusHeight += 45;
|
12775
|
+
}
|
12776
|
+
if (tagList.length > 0) {
|
12777
|
+
minusHeight += 45;
|
12778
|
+
}
|
12779
|
+
return containerHeight - minusHeight;
|
12780
|
+
}, [globalConfig, containerHeight, tagList]);
|
12712
12781
|
const renderLogo = React.useMemo(() => {
|
12713
12782
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
12714
12783
|
return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
|
@@ -12756,8 +12825,8 @@ Made in Italy` })));
|
|
12756
12825
|
((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
|
12757
12826
|
React.createElement("div", { className: 'clc-sxp-bottom' },
|
12758
12827
|
React.createElement(Nudge, { nudge: nudge }),
|
12759
|
-
React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
12760
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
|
12828
|
+
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
12829
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
12761
12830
|
React.createElement("div", null,
|
12762
12831
|
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', 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' }), onChange: onExpandableChange }),
|
12763
12832
|
React.createElement(Hashtag$1, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })))));
|
@@ -12918,6 +12987,7 @@ Made in Italy` })));
|
|
12918
12987
|
setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
|
12919
12988
|
} })),
|
12920
12989
|
renderLogo,
|
12990
|
+
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
|
12921
12991
|
isShowFingerTip ? React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon }) : null,
|
12922
12992
|
React.createElement(Swiper, { ref: swiperRef, onActiveIndexChange: (swiper) => {
|
12923
12993
|
setActiveIndex(swiper.activeIndex);
|
@@ -13207,10 +13277,17 @@ Made in Italy` })));
|
|
13207
13277
|
});
|
13208
13278
|
const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
|
13209
13279
|
const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
|
13210
|
-
const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain }) => {
|
13280
|
+
const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain, tagList = [] }) => {
|
13211
13281
|
const height = React.useMemo(() => {
|
13212
|
-
|
13213
|
-
|
13282
|
+
let minusHeight = 0;
|
13283
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
13284
|
+
minusHeight += 45;
|
13285
|
+
}
|
13286
|
+
if (tagList.length > 0) {
|
13287
|
+
minusHeight += 45;
|
13288
|
+
}
|
13289
|
+
return containerHeight - minusHeight;
|
13290
|
+
}, [globalConfig, containerHeight, tagList]);
|
13214
13291
|
const renderContent = (rec, index) => {
|
13215
13292
|
var _a, _b, _c, _d;
|
13216
13293
|
if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
|
@@ -13242,6 +13319,13 @@ Made in Italy` })));
|
|
13242
13319
|
}
|
13243
13320
|
return null;
|
13244
13321
|
}, [globalConfig]);
|
13322
|
+
const CTA = (rec, index) => {
|
13323
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
|
13324
|
+
return (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
13325
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1 })));
|
13326
|
+
}
|
13327
|
+
return null;
|
13328
|
+
};
|
13245
13329
|
const renderBottom = (rec, index) => {
|
13246
13330
|
var _a, _b, _c, _d, _e, _f, _g;
|
13247
13331
|
if (rec.video) {
|
@@ -13249,8 +13333,7 @@ Made in Italy` })));
|
|
13249
13333
|
((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
|
13250
13334
|
React.createElement("div", { className: 'clc-sxp-bottom' },
|
13251
13335
|
React.createElement(Nudge, { nudge: nudge }),
|
13252
|
-
|
13253
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1 })),
|
13336
|
+
CTA(rec, index),
|
13254
13337
|
React.createElement("div", null,
|
13255
13338
|
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', 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' }) })),
|
13256
13339
|
React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
|
@@ -13279,8 +13362,9 @@ Made in Italy` })));
|
|
13279
13362
|
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png', appDomain);
|
13280
13363
|
const renderView = (rec, index) => {
|
13281
13364
|
var _a, _b, _c, _d;
|
13282
|
-
return (React.createElement("div", { style: { position: 'relative' } },
|
13365
|
+
return (React.createElement("div", { style: { position: 'relative', border: '1px solid #e1e1e1' } },
|
13283
13366
|
renderLogo,
|
13367
|
+
React.createElement(Tagbar$1, { tagList: tagList }),
|
13284
13368
|
React.createElement(ToggleButton$1, { style: {
|
13285
13369
|
position: 'absolute',
|
13286
13370
|
right: (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _a !== void 0 ? _a : 0,
|
@@ -13399,10 +13483,10 @@ Made in Italy` })));
|
|
13399
13483
|
return searchParams;
|
13400
13484
|
}, []);
|
13401
13485
|
return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
|
13402
|
-
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, render: ({ rtcList }) => {
|
13486
|
+
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, render: ({ rtcList, tagList }) => {
|
13403
13487
|
var _a;
|
13404
13488
|
return (React.createElement(React.Fragment, null,
|
13405
|
-
React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { data: rtcList, resolver: RESOLVER })),
|
13489
|
+
React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER })),
|
13406
13490
|
React.createElement(Popup, null)));
|
13407
13491
|
} })));
|
13408
13492
|
};
|