pb-sxp-ui 1.2.0 → 1.2.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 +127 -83
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +63 -31
- package/dist/index.js +127 -83
- 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 +127 -83
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +1 -0
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
- package/es/core/components/SxpPageRender/Hashtag/index.js +3 -1
- package/es/core/components/SxpPageRender/Navbar.js +1 -1
- package/es/core/components/SxpPageRender/VideoWidget/index.js +13 -10
- package/es/core/components/SxpPageRender/WaterFall/List.js +1 -1
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
- package/es/core/components/SxpPageRender/index.d.ts +3 -0
- package/es/core/components/SxpPageRender/index.js +8 -8
- package/es/core/context/SxpDataSourceProvider.js +2 -3
- package/es/materials/sxp/HashTag/material.js +2 -1
- package/es/materials/sxp/cta/AniLink/index.js +29 -12
- package/es/materials/sxp/cta/AniLinkPopup/index.js +41 -23
- package/es/materials/sxp/popup/CommodityDetail/index.js +1 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/es/materials/sxp/popup/CommodityList/index.js +10 -10
- package/es/materials/sxp/template/Link/index.js +2 -2
- package/es/materials/sxp/template/components/Img.js +1 -1
- package/es/materials/sxp/template/components/settingRender.js +5 -0
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +1 -0
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
- package/lib/core/components/SxpPageRender/Hashtag/index.js +3 -1
- package/lib/core/components/SxpPageRender/Navbar.js +1 -1
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +13 -10
- package/lib/core/components/SxpPageRender/WaterFall/List.js +1 -1
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
- package/lib/core/components/SxpPageRender/index.d.ts +3 -0
- package/lib/core/components/SxpPageRender/index.js +8 -8
- package/lib/core/context/SxpDataSourceProvider.js +2 -3
- package/lib/materials/sxp/HashTag/material.js +2 -1
- package/lib/materials/sxp/cta/AniLink/index.js +28 -11
- package/lib/materials/sxp/cta/AniLinkPopup/index.js +40 -22
- package/lib/materials/sxp/popup/CommodityDetail/index.js +1 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/lib/materials/sxp/popup/CommodityList/index.js +9 -9
- package/lib/materials/sxp/template/Link/index.js +2 -2
- package/lib/materials/sxp/template/components/Img.js +1 -1
- package/lib/materials/sxp/template/components/settingRender.js +5 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -531,7 +531,6 @@ var DataSourceType;
|
|
531
531
|
(function (DataSourceType) {
|
532
532
|
DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
|
533
533
|
})(DataSourceType || (DataSourceType = {}));
|
534
|
-
const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
|
535
534
|
const DEFAULT_TAG = 'FOR U';
|
536
535
|
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isShowTag = true, isOpenConsent = false, globalConfig, isEditor = false }) => {
|
537
536
|
var _a, _b, _c;
|
@@ -615,7 +614,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
615
614
|
const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
|
616
615
|
var _a, _b;
|
617
616
|
const key = val.split('=')[0];
|
618
|
-
return (_b = ((_a = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.channels) !== null && _a !== void 0 ? _a :
|
617
|
+
return (_b = ((_a = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
619
618
|
})) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
|
620
619
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
621
620
|
}
|
@@ -710,7 +709,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
710
709
|
const val = (_o = (_m = (_l = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _l === void 0 ? void 0 : _l.filter((val) => {
|
711
710
|
var _a, _b;
|
712
711
|
const key = val.split('=')[0];
|
713
|
-
return (_b = ((_a = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.channels) !== null && _a !== void 0 ? _a :
|
712
|
+
return (_b = ((_a = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
714
713
|
})) === null || _m === void 0 ? void 0 : _m.join('&')) !== null && _o !== void 0 ? _o : '';
|
715
714
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
716
715
|
setTagList((_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []);
|
@@ -8967,7 +8966,7 @@ const CommodityDetail$1 = (_a) => {
|
|
8967
8966
|
width: '100%',
|
8968
8967
|
objectFit: 'cover',
|
8969
8968
|
display: 'block',
|
8970
|
-
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ?
|
8969
|
+
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
8971
8970
|
}, src: src }))));
|
8972
8971
|
}))))),
|
8973
8972
|
!((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
|
@@ -9695,7 +9694,7 @@ Made in Italy` })));
|
|
9695
9694
|
width: '100%',
|
9696
9695
|
objectFit: 'cover',
|
9697
9696
|
display: 'block',
|
9698
|
-
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ?
|
9697
|
+
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
9699
9698
|
}, src: src }))));
|
9700
9699
|
}))),
|
9701
9700
|
!((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
|
@@ -10081,7 +10080,7 @@ function useOnScreen(ref) {
|
|
10081
10080
|
* @Author: binruan@chatlabs.com
|
10082
10081
|
* @Date: 2024-01-16 14:50:13
|
10083
10082
|
* @LastEditors: binruan@chatlabs.com
|
10084
|
-
* @LastEditTime: 2024-
|
10083
|
+
* @LastEditTime: 2024-07-04 18:13:23
|
10085
10084
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
|
10086
10085
|
*
|
10087
10086
|
*/
|
@@ -10102,7 +10101,7 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle }) => {
|
|
10102
10101
|
}, [src]);
|
10103
10102
|
return (React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, imgStyle)) },
|
10104
10103
|
React.createElement("div", { ref: ref, hidden: !src, className: css({ width: '100%', height: '100%' }) },
|
10105
|
-
React.createElement(FormatImage$1, { className: css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block', objectPosition: `50% ${translateY ?
|
10104
|
+
React.createElement(FormatImage$1, { className: css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block', objectPosition: `50% ${translateY ? translateY + 50 : 50}%` }, style)), src: src }))));
|
10106
10105
|
};
|
10107
10106
|
var Img$1 = memo(Img);
|
10108
10107
|
|
@@ -10141,7 +10140,6 @@ const CommodityList$1 = (_a) => {
|
|
10141
10140
|
var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, index, translateY = 0, commodityPicture, isExternalLink } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "index", "translateY", "commodityPicture", "isExternalLink"]);
|
10142
10141
|
const { sxpParameter } = useSxpDataSource();
|
10143
10142
|
const { popupDetailData, bffEventReport, isPreview, swiperRef, bffFbReport } = useSxpDataSource();
|
10144
|
-
useRef(null);
|
10145
10143
|
const recData = isPost ? rec : popupDetailData;
|
10146
10144
|
const product = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [null, null, null, null];
|
10147
10145
|
const priceText = useCallback((product) => {
|
@@ -10161,13 +10159,14 @@ const CommodityList$1 = (_a) => {
|
|
10161
10159
|
display: 'flex'
|
10162
10160
|
}) }),
|
10163
10161
|
React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: commodityPicture }),
|
10164
|
-
React.createElement("div",
|
10165
|
-
React.createElement("div",
|
10166
|
-
|
10167
|
-
|
10168
|
-
|
10169
|
-
|
10170
|
-
|
10162
|
+
React.createElement("div", { style: { flex: 1, display: 'flex', flexDirection: 'column', justifyContent: 'space-between' } },
|
10163
|
+
React.createElement("div", null,
|
10164
|
+
React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.title), dangerouslySetInnerHTML: {
|
10165
|
+
__html: setFontForText((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
|
10166
|
+
} }),
|
10167
|
+
React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection, hidden: !!item && (!(item === null || item === void 0 ? void 0 : item.collection) || (item === null || item === void 0 ? void 0 : item.collection) === ''), dangerouslySetInnerHTML: {
|
10168
|
+
__html: setFontForText((_f = item === null || item === void 0 ? void 0 : item.collection) !== null && _f !== void 0 ? _f : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
10169
|
+
} })),
|
10171
10170
|
React.createElement("div", { className: css({
|
10172
10171
|
display: 'flex',
|
10173
10172
|
alignItems: 'flex-end',
|
@@ -10178,7 +10177,7 @@ const CommodityList$1 = (_a) => {
|
|
10178
10177
|
React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.price), dangerouslySetInnerHTML: {
|
10179
10178
|
__html: setFontForText(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
10180
10179
|
} }),
|
10181
|
-
React.createElement("div", { style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px' }), dangerouslySetInnerHTML: {
|
10180
|
+
React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px', maxWidth: '100px' }), dangerouslySetInnerHTML: {
|
10182
10181
|
__html: setFontForText((_h = (_g = item === null || item === void 0 ? void 0 : item.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now', buttonStyle)
|
10183
10182
|
} })))));
|
10184
10183
|
})));
|
@@ -10272,7 +10271,7 @@ const CommodityList = createMaterial(CommodityListComponent, {
|
|
10272
10271
|
* @Author: binruan@chatlabs.com
|
10273
10272
|
* @Date: 2024-03-26 16:50:25
|
10274
10273
|
* @LastEditors: binruan@chatlabs.com
|
10275
|
-
* @LastEditTime: 2024-
|
10274
|
+
* @LastEditTime: 2024-07-04 17:47:52
|
10276
10275
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
|
10277
10276
|
*
|
10278
10277
|
*/
|
@@ -10517,6 +10516,11 @@ var settingRender$4 = [
|
|
10517
10516
|
label: '对齐',
|
10518
10517
|
type: 'TextAlign',
|
10519
10518
|
name: ['props', 'ctaTempStyles', 'ctaTitle']
|
10519
|
+
},
|
10520
|
+
{
|
10521
|
+
label: '间距',
|
10522
|
+
type: 'TextSpace',
|
10523
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle']
|
10520
10524
|
}
|
10521
10525
|
]
|
10522
10526
|
}
|
@@ -10829,7 +10833,7 @@ const Link$1 = (_a) => {
|
|
10829
10833
|
overflow: 'hidden'
|
10830
10834
|
}) },
|
10831
10835
|
React.createElement("div", null,
|
10832
|
-
React.createElement("div", { className:
|
10836
|
+
React.createElement("div", { className: styles$7['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
|
10833
10837
|
__html: setFontForText((_h = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _h !== void 0 ? _h : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
10834
10838
|
} }),
|
10835
10839
|
(customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) && (React.createElement("div", { style: Object.assign(Object.assign({}, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style), { lineHeight: ((_j = customTitle === null || customTitle === void 0 ? void 0 : customTitle.style) === null || _j === void 0 ? void 0 : _j.height) + 'px' }), className: styles$7['one-line-ellipsis'], dangerouslySetInnerHTML: {
|
@@ -11657,7 +11661,7 @@ var settingRender$3 = [
|
|
11657
11661
|
* @Author: binruan@chatlabs.com
|
11658
11662
|
* @Date: 2023-12-26 16:11:34
|
11659
11663
|
* @LastEditors: binruan@chatlabs.com
|
11660
|
-
* @LastEditTime: 2024-
|
11664
|
+
* @LastEditTime: 2024-07-04 18:34:18
|
11661
11665
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Navbar.tsx
|
11662
11666
|
*
|
11663
11667
|
*/
|
@@ -11666,7 +11670,7 @@ const Navbar = ({ icon, styles, textStyle, onClose }) => {
|
|
11666
11670
|
const { waterFallData, setOpenHashtag } = useSxpDataSource();
|
11667
11671
|
return (React.createElement("div", { className: 'clc-sxp-nav', style: styles },
|
11668
11672
|
React.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: 'back button', onClick: onClose }),
|
11669
|
-
React.createElement("div", { className: 'clc-sxp-nav-title', style: textStyle, dangerouslySetInnerHTML: {
|
11673
|
+
React.createElement("div", { className: 'clc-sxp-nav-title', style: Object.assign(Object.assign({}, textStyle), { paddingLeft: (textStyle === null || textStyle === void 0 ? void 0 : textStyle.textAlign) === 'left' ? '35px' : 0 }), dangerouslySetInnerHTML: {
|
11670
11674
|
__html: setFontForText(`#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`, textStyle)
|
11671
11675
|
} })));
|
11672
11676
|
};
|
@@ -13261,7 +13265,7 @@ function WaterfallList$1(_a) {
|
|
13261
13265
|
var _a, _b;
|
13262
13266
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
13263
13267
|
reportTagsView();
|
13264
|
-
window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
|
13268
|
+
window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
|
13265
13269
|
}
|
13266
13270
|
};
|
13267
13271
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
@@ -13496,7 +13500,7 @@ function WaterfallList(_a) {
|
|
13496
13500
|
var _a, _b;
|
13497
13501
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
13498
13502
|
reportTagsView();
|
13499
|
-
window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
|
13503
|
+
window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
|
13500
13504
|
}
|
13501
13505
|
};
|
13502
13506
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
@@ -13649,7 +13653,7 @@ var HashTagComponent = memo(HashTag$1);
|
|
13649
13653
|
* @Author: binruan@chatlabs.com
|
13650
13654
|
* @Date: 2023-07-28 18:29:57
|
13651
13655
|
* @LastEditors: binruan@chatlabs.com
|
13652
|
-
* @LastEditTime: 2024-04
|
13656
|
+
* @LastEditTime: 2024-07-04 18:38:10
|
13653
13657
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\material.tsx
|
13654
13658
|
*
|
13655
13659
|
*/
|
@@ -13669,7 +13673,8 @@ const HashTag = createMaterial(HashTagComponent, {
|
|
13669
13673
|
textStyles: {
|
13670
13674
|
hashTagTitle: {
|
13671
13675
|
fontSize: 16,
|
13672
|
-
color: '#000'
|
13676
|
+
color: '#000',
|
13677
|
+
textAlign: 'center'
|
13673
13678
|
},
|
13674
13679
|
hashTagDesc: {
|
13675
13680
|
fontSize: 12,
|
@@ -13909,28 +13914,36 @@ var settingRender$1 = [
|
|
13909
13914
|
var styles$1 = {"animated-button":"index-module_animated-button__lqTbg","gradientCover":"index-module_gradientCover__5iUag"};
|
13910
13915
|
|
13911
13916
|
const AniLink$1 = (_a) => {
|
13912
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
13917
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
13913
13918
|
var { style, recData, ctaTempStyles, index, event, onClick, isExternalLink = false } = _a, props = __rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "onClick", "isExternalLink"]);
|
13914
|
-
const { ctaEvent } = useSxpDataSource();
|
13919
|
+
const { ctaEvent, setPopupDetailData } = useSxpDataSource();
|
13915
13920
|
const { jumpToWeb } = useEventReport();
|
13921
|
+
const [visible, setVisible] = useState(false);
|
13916
13922
|
const ref = useRef(null);
|
13917
13923
|
const isOnScreen = useOnScreen(ref);
|
13918
13924
|
const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
|
13919
13925
|
const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
|
13920
13926
|
const handleTo = () => {
|
13921
|
-
var _a, _b, _c;
|
13927
|
+
var _a, _b, _c, _d;
|
13922
13928
|
const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
|
13923
13929
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
13924
13930
|
eventSubject: 'clickCta',
|
13925
13931
|
eventDescription: 'User clicked the CTA'
|
13926
13932
|
}, recData, item, index);
|
13933
|
+
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { index }));
|
13927
13934
|
if (isExternalLink) {
|
13928
|
-
|
13935
|
+
const link = (product === null || product === void 0 ? void 0 : product.link) || ((_d = item === null || item === void 0 ? void 0 : item.bindCta) === null || _d === void 0 ? void 0 : _d.link);
|
13936
|
+
if (link) {
|
13937
|
+
jumpToWeb(recData, product, cta, index);
|
13938
|
+
window.location.href = window.getJointUtmLink(link);
|
13939
|
+
}
|
13940
|
+
}
|
13941
|
+
else {
|
13942
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
13929
13943
|
}
|
13930
|
-
onClick === null || onClick === void 0 ? void 0 : onClick();
|
13931
13944
|
};
|
13932
|
-
const title = (cta === null || cta === void 0 ? void 0 : cta.
|
13933
|
-
const
|
13945
|
+
const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情 >';
|
13946
|
+
const aniTimStyle = useMemo(() => {
|
13934
13947
|
var _a, _b;
|
13935
13948
|
const ani = event === null || event === void 0 ? void 0 : event.animation;
|
13936
13949
|
if (ani) {
|
@@ -13952,10 +13965,19 @@ const AniLink$1 = (_a) => {
|
|
13952
13965
|
}, recData, product, index);
|
13953
13966
|
}
|
13954
13967
|
}, [isOnScreen]);
|
13955
|
-
|
13956
|
-
|
13957
|
-
|
13958
|
-
|
13968
|
+
useEffect(() => {
|
13969
|
+
if (isOnScreen) {
|
13970
|
+
setVisible(true);
|
13971
|
+
}
|
13972
|
+
}, [isOnScreen]);
|
13973
|
+
const aniNamStyle = useMemo(() => {
|
13974
|
+
if (!visible)
|
13975
|
+
return null;
|
13976
|
+
return styles$1['animated-button'];
|
13977
|
+
}, [visible]);
|
13978
|
+
return (React.createElement("div", Object.assign({ ref: ref, style: Object.assign(Object.assign(Object.assign({}, style), ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: `${(_l = style === null || style === void 0 ? void 0 : style.height) !== null && _l !== void 0 ? _l : 0}px` }) }, props, { className: `${aniNamStyle} ${css(aniTimStyle)} one-line-ellipsis`, onClick: handleTo, dangerouslySetInnerHTML: {
|
13979
|
+
__html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
13980
|
+
} })));
|
13959
13981
|
};
|
13960
13982
|
var AniLinkComponent = memo(AniLink$1);
|
13961
13983
|
|
@@ -14318,61 +14340,78 @@ var settingRender = [
|
|
14318
14340
|
}
|
14319
14341
|
];
|
14320
14342
|
|
14321
|
-
var styles = {"animated-
|
14343
|
+
var styles = {"aniLinkPopup":"index-module_aniLinkPopup__YT7kj","animated-fadeIn":"index-module_animated-fadeIn__8ZCbq","fadeIn":"index-module_fadeIn__2E-dk","animated-fadeOut":"index-module_animated-fadeOut__iK4oc","fadeOut":"index-module_fadeOut__MgevT","tow-line-ellipsis":"index-module_tow-line-ellipsis__GKFXr","modal-icon-wrapper":"index-module_modal-icon-wrapper__tu3BY","modal-icon-wrapper-img":"index-module_modal-icon-wrapper-img__4b7qZ"};
|
14322
14344
|
|
14323
14345
|
const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
14324
14346
|
const AniLinkPopup$1 = (_a) => {
|
14325
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
14347
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
14326
14348
|
var { style, recData, ctaTempStyles, index, event, bottom_image, translateY, isTel, onClick, isExternalLink = false } = _a, props = __rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "bottom_image", "translateY", "isTel", "onClick", "isExternalLink"]);
|
14327
|
-
|
14349
|
+
style === null || style === void 0 ? true : delete style.transform;
|
14350
|
+
const { sxpParameter, globalConfig, ctaEvent, setPopupDetailData } = useSxpDataSource();
|
14328
14351
|
const { jumpToWeb } = useEventReport();
|
14329
|
-
const
|
14352
|
+
const ref = useRef(null);
|
14353
|
+
const isOnScreen = useOnScreen(ref);
|
14354
|
+
const [visible, setVisible] = useState(false);
|
14355
|
+
const [startAni, setStartAni] = useState(true);
|
14330
14356
|
const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
|
14331
14357
|
const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
|
14332
14358
|
const handleTo = () => {
|
14333
|
-
var _a, _b, _c;
|
14359
|
+
var _a, _b, _c, _d;
|
14334
14360
|
const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
|
14335
14361
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
14336
14362
|
eventSubject: 'clickCta',
|
14337
14363
|
eventDescription: 'User clicked the CTA'
|
14338
14364
|
}, recData, item, index);
|
14365
|
+
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { index }));
|
14339
14366
|
if (isExternalLink) {
|
14340
|
-
|
14367
|
+
const link = (product === null || product === void 0 ? void 0 : product.link) || ((_d = item === null || item === void 0 ? void 0 : item.bindCta) === null || _d === void 0 ? void 0 : _d.link);
|
14368
|
+
if (link) {
|
14369
|
+
jumpToWeb(recData, product, cta, index);
|
14370
|
+
window.location.href = window.getJointUtmLink(link);
|
14371
|
+
}
|
14372
|
+
}
|
14373
|
+
else {
|
14374
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
14341
14375
|
}
|
14342
|
-
onClick === null || onClick === void 0 ? void 0 : onClick();
|
14343
14376
|
};
|
14344
|
-
const title = (cta === null || cta === void 0 ? void 0 : cta.
|
14345
|
-
const
|
14346
|
-
var _a, _b;
|
14377
|
+
const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情 >';
|
14378
|
+
const aniTimStyle = useMemo(() => {
|
14347
14379
|
const ani = event === null || event === void 0 ? void 0 : event.animation;
|
14348
14380
|
if (ani) {
|
14349
|
-
const { delay, duration
|
14381
|
+
const { delay, duration } = ani;
|
14350
14382
|
return {
|
14351
|
-
|
14352
|
-
|
14353
|
-
animationDuration: `${(_b = duration / 1000) !== null && _b !== void 0 ? _b : 0}s`,
|
14354
|
-
backgroundColor: `${backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'transparent'}`
|
14355
|
-
}
|
14383
|
+
animationDelay: `${delay ? delay / 1000 : 0}s`,
|
14384
|
+
animationDuration: `${duration ? duration / 1000 : 0}s`
|
14356
14385
|
};
|
14357
14386
|
}
|
14358
14387
|
}, [event === null || event === void 0 ? void 0 : event.animation]);
|
14359
14388
|
const src = (_q = (_p = (_o = (_l = product === null || product === void 0 ? void 0 : product.cover) !== null && _l !== void 0 ? _l : (_m = product === null || product === void 0 ? void 0 : product.homePage) === null || _m === void 0 ? void 0 : _m[0]) !== null && _o !== void 0 ? _o : cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _p !== void 0 ? _p : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _q !== void 0 ? _q : bottom_image;
|
14360
14389
|
const onClose = (event) => {
|
14361
14390
|
event.stopPropagation();
|
14362
|
-
|
14391
|
+
setStartAni(false);
|
14363
14392
|
};
|
14393
|
+
useEffect(() => {
|
14394
|
+
if (isOnScreen) {
|
14395
|
+
setVisible(true);
|
14396
|
+
}
|
14397
|
+
}, [isOnScreen]);
|
14398
|
+
const aniNamStyle = useMemo(() => {
|
14399
|
+
if (!visible)
|
14400
|
+
return null;
|
14401
|
+
return startAni ? styles['animated-fadeIn'] : styles['animated-fadeOut'];
|
14402
|
+
}, [visible, startAni]);
|
14364
14403
|
return (React.createElement(React.Fragment, null, isTel ? (React.createElement("div", { style: {
|
14365
14404
|
height: '40px',
|
14366
14405
|
lineHeight: '40px',
|
14367
14406
|
paddingLeft: '6px'
|
14368
|
-
} }, "Cta Title")) : (React.createElement("div", Object.assign({
|
14369
|
-
React.createElement("div", { onClick: onClose, className: styles['modal-icon-wrapper'], style: { padding: (
|
14370
|
-
React.createElement("img", { src: (
|
14371
|
-
React.createElement(Img$1, { src: src, rec: recData, item: (
|
14407
|
+
} }, "Cta Title")) : (React.createElement("div", Object.assign({ ref: ref }, props, { className: `${css(Object.assign(Object.assign({}, style), { '--transY': `translateY(calc(100% + ${(_r = style === null || style === void 0 ? void 0 : style.margin) !== null && _r !== void 0 ? _r : 0}px))` }))} ${styles['aniLinkPopup']} ${aniNamStyle} ${css(aniTimStyle)}`, onClick: handleTo }),
|
14408
|
+
React.createElement("div", { onClick: onClose, className: styles['modal-icon-wrapper'], style: { padding: (_s = style === null || style === void 0 ? void 0 : style['padding']) !== null && _s !== void 0 ? _s : 0 } },
|
14409
|
+
React.createElement("img", { src: (_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _t !== void 0 ? _t : closeIcon, alt: 'close', className: styles['modal-icon-wrapper-img'] })),
|
14410
|
+
React.createElement(Img$1, { src: src, rec: recData, item: (_y = (_w = (_v = (_u = recData === null || recData === void 0 ? void 0 : recData.video) === null || _u === void 0 ? void 0 : _u.bindProducts) === null || _v === void 0 ? void 0 : _v[0]) !== null && _w !== void 0 ? _w : (_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.bindProduct) !== null && _y !== void 0 ? _y : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
|
14372
14411
|
React.createElement("div", { hidden: !!recData && !(product === null || product === void 0 ? void 0 : product.title), className: styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
14373
|
-
__html: setFontForText((
|
14412
|
+
__html: setFontForText((_z = product === null || product === void 0 ? void 0 : product.title) !== null && _z !== void 0 ? _z : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
|
14374
14413
|
} }),
|
14375
|
-
React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: ((
|
14414
|
+
React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: ((_0 = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _0 === void 0 ? void 0 : _0.height) + 'px' }), dangerouslySetInnerHTML: {
|
14376
14415
|
__html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
14377
14416
|
} })))));
|
14378
14417
|
};
|
@@ -14818,20 +14857,23 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
14818
14857
|
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
|
14819
14858
|
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
|
14820
14859
|
return () => {
|
14821
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
14860
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
14861
|
+
const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
|
14862
|
+
if (!isPause)
|
14863
|
+
handlePause();
|
14822
14864
|
if (hls)
|
14823
14865
|
hls === null || hls === void 0 ? void 0 : hls.destroy();
|
14824
14866
|
setIsLoadFinish(false);
|
14825
|
-
(
|
14826
|
-
(
|
14827
|
-
(
|
14828
|
-
(
|
14829
|
-
(
|
14830
|
-
(
|
14831
|
-
(
|
14832
|
-
(
|
14867
|
+
(_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadedmetadata', handleLoadedmetadata);
|
14868
|
+
(_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadeddata', handLoadeddata);
|
14869
|
+
(_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('play', handleStartPlay);
|
14870
|
+
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('playing', handlePlaying);
|
14871
|
+
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('pause', handlePause);
|
14872
|
+
(_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('ended', handlePlay);
|
14873
|
+
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('canplay', handlePlay);
|
14874
|
+
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('waiting', handleWaiting);
|
14833
14875
|
};
|
14834
|
-
}, [isActive, videoId, rec]);
|
14876
|
+
}, [isActive, videoId, rec, handlePause]);
|
14835
14877
|
useEffect(() => {
|
14836
14878
|
var _a, _b;
|
14837
14879
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
|
@@ -14977,23 +15019,23 @@ var ToggleButton$1 = memo(ToggleButton);
|
|
14977
15019
|
* @Author: binruan@chatlabs.com
|
14978
15020
|
* @Date: 2024-01-15 19:03:09
|
14979
15021
|
* @LastEditors: binruan@chatlabs.com
|
14980
|
-
* @LastEditTime: 2024-
|
15022
|
+
* @LastEditTime: 2024-07-11 18:19:29
|
14981
15023
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FingerSwipeTip\index.tsx
|
14982
15024
|
*
|
14983
15025
|
*/
|
14984
|
-
const FingerSwipeTip = ({ imageUrl, style }) => {
|
15026
|
+
const FingerSwipeTip = ({ imageUrl, style, duration = 2000 }) => {
|
14985
15027
|
const [show, setShow] = useState(true);
|
14986
15028
|
useEditor();
|
14987
15029
|
useEffect(() => {
|
14988
15030
|
setTimeout(() => {
|
14989
15031
|
setShow(false);
|
14990
|
-
},
|
15032
|
+
}, duration);
|
14991
15033
|
}, []);
|
14992
15034
|
const FINGER_SWIPE_ICON = useIconLink('/pb_static/finger-swipe-tip.29dc3a48a3c746c906ea..png');
|
14993
15035
|
const animationCls = useMemo(() => {
|
14994
15036
|
return show ? 'pb-fadeIn' : 'pb-fadeOut';
|
14995
15037
|
}, [show]);
|
14996
|
-
return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
|
15038
|
+
return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: Object.assign(Object.assign({}, style), { animationDuration: `${duration / 1000}s` }) },
|
14997
15039
|
React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON, alt: 'finger swiper' })));
|
14998
15040
|
};
|
14999
15041
|
|
@@ -15097,11 +15139,12 @@ var PictureGroup$3 = memo(PictureGroup$2);
|
|
15097
15139
|
* @Author: binruan@chatlabs.com
|
15098
15140
|
* @Date: 2024-01-15 19:03:09
|
15099
15141
|
* @LastEditors: binruan@chatlabs.com
|
15100
|
-
* @LastEditTime: 2024-
|
15142
|
+
* @LastEditTime: 2024-07-09 18:47:05
|
15101
15143
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
|
15102
15144
|
*
|
15103
15145
|
*/
|
15104
15146
|
const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
|
15147
|
+
var _a;
|
15105
15148
|
const [isShowMore, setIsShowMore] = useState(false);
|
15106
15149
|
const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
|
15107
15150
|
const handleClickTag = (data) => {
|
@@ -15133,7 +15176,8 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
|
|
15133
15176
|
}
|
15134
15177
|
return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
|
15135
15178
|
}, [isShowMore, tags]);
|
15136
|
-
|
15179
|
+
console.log(hashTagStyle, '111');
|
15180
|
+
return (React.createElement("div", { className: 'clc-sxp-bottom-hashtag', style: { marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px` } },
|
15137
15181
|
React.createElement(Scroll$1, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (React.createElement(SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item) },
|
15138
15182
|
React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
|
15139
15183
|
};
|
@@ -15337,7 +15381,7 @@ var Tagbar$1 = memo(Tagbar);
|
|
15337
15381
|
* @Author: binruan@chatlabs.com
|
15338
15382
|
* @Date: 2024-01-15 19:03:09
|
15339
15383
|
* @LastEditors: binruan@chatlabs.com
|
15340
|
-
* @LastEditTime: 2024-07-
|
15384
|
+
* @LastEditTime: 2024-07-24 14:59:23
|
15341
15385
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
15342
15386
|
*
|
15343
15387
|
*/
|
@@ -15543,18 +15587,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15543
15587
|
};
|
15544
15588
|
}, [isShowMore]);
|
15545
15589
|
const renderBottom = useCallback((rec, index) => {
|
15546
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
15590
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
15547
15591
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
15548
15592
|
return (React.createElement(React.Fragment, null,
|
15549
15593
|
((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
|
15550
|
-
React.createElement("div", { className: 'clc-sxp-bottom' },
|
15594
|
+
React.createElement("div", { className: 'clc-sxp-bottom', style: { paddingBottom: `${(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _b !== void 0 ? _b : 40}px` } },
|
15551
15595
|
React.createElement(Nudge, { nudge: nudge }),
|
15552
15596
|
(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' },
|
15553
15597
|
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
15554
15598
|
React.createElement("div", null,
|
15555
|
-
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: (
|
15599
|
+
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: (_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.title) !== null && _d !== void 0 ? _d : '', 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 }),
|
15556
15600
|
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
|
15557
|
-
React.createElement(Hashtag$1, { index: activeIndex, tags: (
|
15601
|
+
React.createElement(Hashtag$1, { index: activeIndex, tags: (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.hashTags) !== null && _f !== void 0 ? _f : [], itemId: (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId, itemType: ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))),
|
15558
15602
|
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'] })));
|
15559
15603
|
}
|
15560
15604
|
return null;
|
@@ -15736,7 +15780,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15736
15780
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } })));
|
15737
15781
|
}
|
15738
15782
|
return visList === null || visList === void 0 ? void 0 : visList.map((rec, index) => {
|
15739
|
-
return (React.createElement(SwiperSlide, { key: index, virtualIndex: index }, rec && (React.createElement(React.Fragment, null, (rec === null || rec === void 0 ? void 0 : rec.loading) ? (React.createElement("div", { style: {
|
15783
|
+
return (React.createElement(SwiperSlide, { key: index, virtualIndex: index, style: { overflow: 'hidden' } }, rec && (React.createElement(React.Fragment, null, (rec === null || rec === void 0 ? void 0 : rec.loading) ? (React.createElement("div", { style: {
|
15740
15784
|
height,
|
15741
15785
|
width: containerWidth,
|
15742
15786
|
display: 'flex',
|
@@ -15759,7 +15803,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15759
15803
|
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
|
15760
15804
|
top: minusHeight
|
15761
15805
|
} }),
|
15762
|
-
isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50
|
15806
|
+
isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
|
15763
15807
|
React.createElement(Swiper, { style: {
|
15764
15808
|
marginTop: tagHeight
|
15765
15809
|
}, ref: swiperRef, onSlideChange: () => {
|
@@ -15784,13 +15828,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15784
15828
|
}
|
15785
15829
|
}
|
15786
15830
|
}, direction: 'vertical', height: height },
|
15787
|
-
React.createElement(ToggleButton$1, { style: {
|
15831
|
+
((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: {
|
15788
15832
|
position: 'fixed',
|
15789
15833
|
visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
|
15790
15834
|
zIndex: 999,
|
15791
15835
|
[(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _d !== void 0 ? _d : 'right']: (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _e !== void 0 ? _e : 0,
|
15792
15836
|
[(_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _f !== void 0 ? _f : 'bottom']: (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _g !== void 0 ? _g : 23
|
15793
|
-
}, defaultValue: isMuted, 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, onChange: setIsMuted }),
|
15837
|
+
}, defaultValue: isMuted, 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, onChange: setIsMuted })),
|
15794
15838
|
renderView),
|
15795
15839
|
React.createElement(WaterFall$1, Object.assign({}, (_k = (_j = (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.item) === null || _k === void 0 ? void 0 : _k.props))));
|
15796
15840
|
};
|