pb-sxp-ui 1.2.1 → 1.2.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 +132 -83
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +99 -32
- package/dist/index.js +132 -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 +132 -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/Pagebuilder/type.d.ts +1 -0
- package/es/core/components/SxpPageCore/index.js +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.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.js +3 -3
- package/es/materials/sxp/HashTag/material.js +2 -1
- package/es/materials/sxp/cta/AniLink/index.js +27 -11
- package/es/materials/sxp/cta/AniLinkPopup/index.js +40 -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 +13 -7
- 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/Pagebuilder/type.d.ts +1 -0
- package/lib/core/components/SxpPageCore/index.js +1 -1
- 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.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.js +3 -3
- package/lib/materials/sxp/HashTag/material.js +2 -1
- package/lib/materials/sxp/cta/AniLink/index.js +26 -10
- package/lib/materials/sxp/cta/AniLinkPopup/index.js +39 -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 +13 -7
- 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
@@ -532,7 +532,7 @@ var DataSourceType;
|
|
532
532
|
DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
|
533
533
|
})(DataSourceType || (DataSourceType = {}));
|
534
534
|
const DEFAULT_TAG = 'FOR U';
|
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 }) => {
|
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, utmParameter }) => {
|
536
536
|
var _a, _b, _c;
|
537
537
|
const [rtcList, setRtcList] = useState([]);
|
538
538
|
const [tagList, setTagList] = useState([]);
|
@@ -614,7 +614,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
614
614
|
const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
|
615
615
|
var _a, _b;
|
616
616
|
const key = val.split('=')[0];
|
617
|
-
return (_b = ((_a =
|
617
|
+
return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
618
618
|
})) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
|
619
619
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
620
620
|
}
|
@@ -709,7 +709,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
709
709
|
const val = (_o = (_m = (_l = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _l === void 0 ? void 0 : _l.filter((val) => {
|
710
710
|
var _a, _b;
|
711
711
|
const key = val.split('=')[0];
|
712
|
-
return (_b = ((_a =
|
712
|
+
return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
713
713
|
})) === null || _m === void 0 ? void 0 : _m.join('&')) !== null && _o !== void 0 ? _o : '';
|
714
714
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
715
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 : []);
|
@@ -8966,7 +8966,7 @@ const CommodityDetail$1 = (_a) => {
|
|
8966
8966
|
width: '100%',
|
8967
8967
|
objectFit: 'cover',
|
8968
8968
|
display: 'block',
|
8969
|
-
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}%`
|
8970
8970
|
}, src: src }))));
|
8971
8971
|
}))))),
|
8972
8972
|
!((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
|
@@ -9694,7 +9694,7 @@ Made in Italy` })));
|
|
9694
9694
|
width: '100%',
|
9695
9695
|
objectFit: 'cover',
|
9696
9696
|
display: 'block',
|
9697
|
-
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}%`
|
9698
9698
|
}, src: src }))));
|
9699
9699
|
}))),
|
9700
9700
|
!((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
|
@@ -10080,7 +10080,7 @@ function useOnScreen(ref) {
|
|
10080
10080
|
* @Author: binruan@chatlabs.com
|
10081
10081
|
* @Date: 2024-01-16 14:50:13
|
10082
10082
|
* @LastEditors: binruan@chatlabs.com
|
10083
|
-
* @LastEditTime: 2024-
|
10083
|
+
* @LastEditTime: 2024-07-04 18:13:23
|
10084
10084
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
|
10085
10085
|
*
|
10086
10086
|
*/
|
@@ -10101,7 +10101,7 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle }) => {
|
|
10101
10101
|
}, [src]);
|
10102
10102
|
return (React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, imgStyle)) },
|
10103
10103
|
React.createElement("div", { ref: ref, hidden: !src, className: css({ width: '100%', height: '100%' }) },
|
10104
|
-
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 }))));
|
10105
10105
|
};
|
10106
10106
|
var Img$1 = memo(Img);
|
10107
10107
|
|
@@ -10154,18 +10154,24 @@ const CommodityList$1 = (_a) => {
|
|
10154
10154
|
}
|
10155
10155
|
}, []);
|
10156
10156
|
return (React.createElement("div", { className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
|
10157
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
10157
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
10158
10158
|
return (React.createElement(EventProvider$1, Object.assign({ key: index, isExternalLink: isExternalLink, rec: recData, index: index }, props, { className: css({
|
10159
10159
|
display: 'flex'
|
10160
10160
|
}) }),
|
10161
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 }),
|
10162
|
-
React.createElement("div", { style: {
|
10162
|
+
React.createElement("div", { style: {
|
10163
|
+
flex: 1,
|
10164
|
+
width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.marginRight) !== null && _f !== void 0 ? _f : 0}px - ${(_g = style === null || style === void 0 ? void 0 : style.padding) !== null && _g !== void 0 ? _g : 0}px)`,
|
10165
|
+
display: 'flex',
|
10166
|
+
flexDirection: 'column',
|
10167
|
+
justifyContent: 'space-between'
|
10168
|
+
} },
|
10163
10169
|
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((
|
10170
|
+
React.createElement("div", { className: 'one-line-ellipsis', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.title), dangerouslySetInnerHTML: {
|
10171
|
+
__html: setFontForText((_h = item === null || item === void 0 ? void 0 : item.title) !== null && _h !== void 0 ? _h : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
|
10166
10172
|
} }),
|
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((
|
10173
|
+
React.createElement("div", { className: 'two-line-ellipsis', 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: {
|
10174
|
+
__html: setFontForText((_j = item === null || item === void 0 ? void 0 : item.collection) !== null && _j !== void 0 ? _j : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
10169
10175
|
} })),
|
10170
10176
|
React.createElement("div", { className: css({
|
10171
10177
|
display: 'flex',
|
@@ -10178,7 +10184,7 @@ const CommodityList$1 = (_a) => {
|
|
10178
10184
|
__html: setFontForText(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
10179
10185
|
} }),
|
10180
10186
|
React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px', maxWidth: '100px' }), dangerouslySetInnerHTML: {
|
10181
|
-
__html: setFontForText((
|
10187
|
+
__html: setFontForText((_l = (_k = item === null || item === void 0 ? void 0 : item.bindCta) === null || _k === void 0 ? void 0 : _k.enTitle) !== null && _l !== void 0 ? _l : 'Shop Now', buttonStyle)
|
10182
10188
|
} })))));
|
10183
10189
|
})));
|
10184
10190
|
};
|
@@ -10271,7 +10277,7 @@ const CommodityList = createMaterial(CommodityListComponent, {
|
|
10271
10277
|
* @Author: binruan@chatlabs.com
|
10272
10278
|
* @Date: 2024-03-26 16:50:25
|
10273
10279
|
* @LastEditors: binruan@chatlabs.com
|
10274
|
-
* @LastEditTime: 2024-
|
10280
|
+
* @LastEditTime: 2024-07-04 17:47:52
|
10275
10281
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
|
10276
10282
|
*
|
10277
10283
|
*/
|
@@ -10516,6 +10522,11 @@ var settingRender$4 = [
|
|
10516
10522
|
label: '对齐',
|
10517
10523
|
type: 'TextAlign',
|
10518
10524
|
name: ['props', 'ctaTempStyles', 'ctaTitle']
|
10525
|
+
},
|
10526
|
+
{
|
10527
|
+
label: '间距',
|
10528
|
+
type: 'TextSpace',
|
10529
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle']
|
10519
10530
|
}
|
10520
10531
|
]
|
10521
10532
|
}
|
@@ -10828,7 +10839,7 @@ const Link$1 = (_a) => {
|
|
10828
10839
|
overflow: 'hidden'
|
10829
10840
|
}) },
|
10830
10841
|
React.createElement("div", null,
|
10831
|
-
React.createElement("div", { className:
|
10842
|
+
React.createElement("div", { className: styles$7['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
|
10832
10843
|
__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)
|
10833
10844
|
} }),
|
10834
10845
|
(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: {
|
@@ -11656,7 +11667,7 @@ var settingRender$3 = [
|
|
11656
11667
|
* @Author: binruan@chatlabs.com
|
11657
11668
|
* @Date: 2023-12-26 16:11:34
|
11658
11669
|
* @LastEditors: binruan@chatlabs.com
|
11659
|
-
* @LastEditTime: 2024-
|
11670
|
+
* @LastEditTime: 2024-07-04 18:34:18
|
11660
11671
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Navbar.tsx
|
11661
11672
|
*
|
11662
11673
|
*/
|
@@ -11665,7 +11676,7 @@ const Navbar = ({ icon, styles, textStyle, onClose }) => {
|
|
11665
11676
|
const { waterFallData, setOpenHashtag } = useSxpDataSource();
|
11666
11677
|
return (React.createElement("div", { className: 'clc-sxp-nav', style: styles },
|
11667
11678
|
React.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: 'back button', onClick: onClose }),
|
11668
|
-
React.createElement("div", { className: 'clc-sxp-nav-title', style: textStyle, dangerouslySetInnerHTML: {
|
11679
|
+
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: {
|
11669
11680
|
__html: setFontForText(`#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`, textStyle)
|
11670
11681
|
} })));
|
11671
11682
|
};
|
@@ -13260,7 +13271,7 @@ function WaterfallList$1(_a) {
|
|
13260
13271
|
var _a, _b;
|
13261
13272
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
13262
13273
|
reportTagsView();
|
13263
|
-
window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
|
13274
|
+
window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
|
13264
13275
|
}
|
13265
13276
|
};
|
13266
13277
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
@@ -13495,7 +13506,7 @@ function WaterfallList(_a) {
|
|
13495
13506
|
var _a, _b;
|
13496
13507
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
13497
13508
|
reportTagsView();
|
13498
|
-
window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
|
13509
|
+
window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
|
13499
13510
|
}
|
13500
13511
|
};
|
13501
13512
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
@@ -13648,7 +13659,7 @@ var HashTagComponent = memo(HashTag$1);
|
|
13648
13659
|
* @Author: binruan@chatlabs.com
|
13649
13660
|
* @Date: 2023-07-28 18:29:57
|
13650
13661
|
* @LastEditors: binruan@chatlabs.com
|
13651
|
-
* @LastEditTime: 2024-04
|
13662
|
+
* @LastEditTime: 2024-07-04 18:38:10
|
13652
13663
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\material.tsx
|
13653
13664
|
*
|
13654
13665
|
*/
|
@@ -13668,7 +13679,8 @@ const HashTag = createMaterial(HashTagComponent, {
|
|
13668
13679
|
textStyles: {
|
13669
13680
|
hashTagTitle: {
|
13670
13681
|
fontSize: 16,
|
13671
|
-
color: '#000'
|
13682
|
+
color: '#000',
|
13683
|
+
textAlign: 'center'
|
13672
13684
|
},
|
13673
13685
|
hashTagDesc: {
|
13674
13686
|
fontSize: 12,
|
@@ -13905,19 +13917,20 @@ var settingRender$1 = [
|
|
13905
13917
|
}
|
13906
13918
|
];
|
13907
13919
|
|
13908
|
-
var styles$1 = {"animated-button":"index-module_animated-button__lqTbg","gradientCover":"index-module_gradientCover__5iUag"};
|
13920
|
+
var styles$1 = {"animated-button":"index-module_animated-button__lqTbg","gradientCover":"index-module_gradientCover__5iUag","one-line-ellipsis":"index-module_one-line-ellipsis__HutE0","two-line-ellipsis":"index-module_two-line-ellipsis__c8gRJ"};
|
13909
13921
|
|
13910
13922
|
const AniLink$1 = (_a) => {
|
13911
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
13923
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
13912
13924
|
var { style, recData, ctaTempStyles, index, event, onClick, isExternalLink = false } = _a, props = __rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "onClick", "isExternalLink"]);
|
13913
13925
|
const { ctaEvent, setPopupDetailData } = useSxpDataSource();
|
13914
13926
|
const { jumpToWeb } = useEventReport();
|
13927
|
+
const [visible, setVisible] = useState(false);
|
13915
13928
|
const ref = useRef(null);
|
13916
13929
|
const isOnScreen = useOnScreen(ref);
|
13917
13930
|
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);
|
13918
13931
|
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);
|
13919
13932
|
const handleTo = () => {
|
13920
|
-
var _a, _b, _c;
|
13933
|
+
var _a, _b, _c, _d;
|
13921
13934
|
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);
|
13922
13935
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
13923
13936
|
eventSubject: 'clickCta',
|
@@ -13925,12 +13938,18 @@ const AniLink$1 = (_a) => {
|
|
13925
13938
|
}, recData, item, index);
|
13926
13939
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { index }));
|
13927
13940
|
if (isExternalLink) {
|
13928
|
-
|
13941
|
+
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);
|
13942
|
+
if (link) {
|
13943
|
+
jumpToWeb(recData, product, cta, index);
|
13944
|
+
window.location.href = window.getJointUtmLink(link);
|
13945
|
+
}
|
13946
|
+
}
|
13947
|
+
else {
|
13948
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
13929
13949
|
}
|
13930
|
-
onClick === null || onClick === void 0 ? void 0 : onClick();
|
13931
13950
|
};
|
13932
|
-
const title = (cta === null || cta === void 0 ? void 0 : cta.
|
13933
|
-
const
|
13951
|
+
const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情 >';
|
13952
|
+
const aniTimStyle = useMemo(() => {
|
13934
13953
|
var _a, _b;
|
13935
13954
|
const ani = event === null || event === void 0 ? void 0 : event.animation;
|
13936
13955
|
if (ani) {
|
@@ -13952,10 +13971,19 @@ const AniLink$1 = (_a) => {
|
|
13952
13971
|
}, recData, product, index);
|
13953
13972
|
}
|
13954
13973
|
}, [isOnScreen]);
|
13955
|
-
|
13956
|
-
|
13957
|
-
|
13958
|
-
|
13974
|
+
useEffect(() => {
|
13975
|
+
if (isOnScreen) {
|
13976
|
+
setVisible(true);
|
13977
|
+
}
|
13978
|
+
}, [isOnScreen]);
|
13979
|
+
const aniNamStyle = useMemo(() => {
|
13980
|
+
if (!visible)
|
13981
|
+
return null;
|
13982
|
+
return styles$1['animated-button'];
|
13983
|
+
}, [visible]);
|
13984
|
+
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)} ${styles$1['one-line-ellipsis']}`, onClick: handleTo, dangerouslySetInnerHTML: {
|
13985
|
+
__html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
13986
|
+
} })));
|
13959
13987
|
};
|
13960
13988
|
var AniLinkComponent = memo(AniLink$1);
|
13961
13989
|
|
@@ -14318,19 +14346,23 @@ var settingRender = [
|
|
14318
14346
|
}
|
14319
14347
|
];
|
14320
14348
|
|
14321
|
-
var styles = {"animated-
|
14349
|
+
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","one-line-ellipsis":"index-module_one-line-ellipsis__NRiVV","two-line-ellipsis":"index-module_two-line-ellipsis__k-YGB","modal-icon-wrapper":"index-module_modal-icon-wrapper__tu3BY","modal-icon-wrapper-img":"index-module_modal-icon-wrapper-img__4b7qZ"};
|
14322
14350
|
|
14323
14351
|
const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
14324
14352
|
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;
|
14353
|
+
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
14354
|
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"]);
|
14355
|
+
style === null || style === void 0 ? true : delete style.transform;
|
14327
14356
|
const { sxpParameter, globalConfig, ctaEvent, setPopupDetailData } = useSxpDataSource();
|
14328
14357
|
const { jumpToWeb } = useEventReport();
|
14329
|
-
const
|
14358
|
+
const ref = useRef(null);
|
14359
|
+
const isOnScreen = useOnScreen(ref);
|
14360
|
+
const [visible, setVisible] = useState(false);
|
14361
|
+
const [startAni, setStartAni] = useState(true);
|
14330
14362
|
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
14363
|
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
14364
|
const handleTo = () => {
|
14333
|
-
var _a, _b, _c;
|
14365
|
+
var _a, _b, _c, _d;
|
14334
14366
|
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
14367
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
14336
14368
|
eventSubject: 'clickCta',
|
@@ -14338,42 +14370,54 @@ const AniLinkPopup$1 = (_a) => {
|
|
14338
14370
|
}, recData, item, index);
|
14339
14371
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { index }));
|
14340
14372
|
if (isExternalLink) {
|
14341
|
-
|
14373
|
+
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);
|
14374
|
+
if (link) {
|
14375
|
+
jumpToWeb(recData, product, cta, index);
|
14376
|
+
window.location.href = window.getJointUtmLink(link);
|
14377
|
+
}
|
14378
|
+
}
|
14379
|
+
else {
|
14380
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
14342
14381
|
}
|
14343
|
-
onClick === null || onClick === void 0 ? void 0 : onClick();
|
14344
14382
|
};
|
14345
|
-
const title = (cta === null || cta === void 0 ? void 0 : cta.
|
14346
|
-
const
|
14347
|
-
var _a, _b;
|
14383
|
+
const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情 >';
|
14384
|
+
const aniTimStyle = useMemo(() => {
|
14348
14385
|
const ani = event === null || event === void 0 ? void 0 : event.animation;
|
14349
14386
|
if (ani) {
|
14350
|
-
const { delay, duration
|
14387
|
+
const { delay, duration } = ani;
|
14351
14388
|
return {
|
14352
|
-
|
14353
|
-
|
14354
|
-
animationDuration: `${(_b = duration / 1000) !== null && _b !== void 0 ? _b : 0}s`,
|
14355
|
-
backgroundColor: `${backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'transparent'}`
|
14356
|
-
}
|
14389
|
+
animationDelay: `${delay ? delay / 1000 : 0}s`,
|
14390
|
+
animationDuration: `${duration ? duration / 1000 : 0}s`
|
14357
14391
|
};
|
14358
14392
|
}
|
14359
14393
|
}, [event === null || event === void 0 ? void 0 : event.animation]);
|
14360
14394
|
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;
|
14361
14395
|
const onClose = (event) => {
|
14362
14396
|
event.stopPropagation();
|
14363
|
-
|
14397
|
+
setStartAni(false);
|
14364
14398
|
};
|
14399
|
+
useEffect(() => {
|
14400
|
+
if (isOnScreen) {
|
14401
|
+
setVisible(true);
|
14402
|
+
}
|
14403
|
+
}, [isOnScreen]);
|
14404
|
+
const aniNamStyle = useMemo(() => {
|
14405
|
+
if (!visible)
|
14406
|
+
return null;
|
14407
|
+
return startAni ? styles['animated-fadeIn'] : null;
|
14408
|
+
}, [visible, startAni]);
|
14365
14409
|
return (React.createElement(React.Fragment, null, isTel ? (React.createElement("div", { style: {
|
14366
14410
|
height: '40px',
|
14367
14411
|
lineHeight: '40px',
|
14368
14412
|
paddingLeft: '6px'
|
14369
|
-
} }, "Cta Title")) : (React.createElement("div", Object.assign({
|
14370
|
-
React.createElement("div", { onClick: onClose, className: styles['modal-icon-wrapper'], style: { padding: (
|
14371
|
-
React.createElement("img", { src: (
|
14372
|
-
React.createElement(Img$1, { src: src, rec: recData, item: (
|
14373
|
-
React.createElement("div", { hidden: !!recData && !(product === null || product === void 0 ? void 0 : product.title), className: styles['
|
14374
|
-
__html: setFontForText((
|
14413
|
+
} }, "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 }),
|
14414
|
+
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 } },
|
14415
|
+
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'] })),
|
14416
|
+
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 }),
|
14417
|
+
React.createElement("div", { hidden: !!recData && !(product === null || product === void 0 ? void 0 : product.title), className: styles['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
|
14418
|
+
__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)
|
14375
14419
|
} }),
|
14376
|
-
React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: ((
|
14420
|
+
React.createElement("div", { className: styles['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: {
|
14377
14421
|
__html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
14378
14422
|
} })))));
|
14379
14423
|
};
|
@@ -14819,20 +14863,23 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
14819
14863
|
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
|
14820
14864
|
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
|
14821
14865
|
return () => {
|
14822
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
14866
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
14867
|
+
const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
|
14868
|
+
if (!isPause)
|
14869
|
+
handlePause();
|
14823
14870
|
if (hls)
|
14824
14871
|
hls === null || hls === void 0 ? void 0 : hls.destroy();
|
14825
14872
|
setIsLoadFinish(false);
|
14826
|
-
(
|
14827
|
-
(
|
14828
|
-
(
|
14829
|
-
(
|
14830
|
-
(
|
14831
|
-
(
|
14832
|
-
(
|
14833
|
-
(
|
14873
|
+
(_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadedmetadata', handleLoadedmetadata);
|
14874
|
+
(_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadeddata', handLoadeddata);
|
14875
|
+
(_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('play', handleStartPlay);
|
14876
|
+
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('playing', handlePlaying);
|
14877
|
+
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('pause', handlePause);
|
14878
|
+
(_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('ended', handlePlay);
|
14879
|
+
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('canplay', handlePlay);
|
14880
|
+
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('waiting', handleWaiting);
|
14834
14881
|
};
|
14835
|
-
}, [isActive, videoId, rec]);
|
14882
|
+
}, [isActive, videoId, rec, handlePause]);
|
14836
14883
|
useEffect(() => {
|
14837
14884
|
var _a, _b;
|
14838
14885
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
|
@@ -14978,23 +15025,23 @@ var ToggleButton$1 = memo(ToggleButton);
|
|
14978
15025
|
* @Author: binruan@chatlabs.com
|
14979
15026
|
* @Date: 2024-01-15 19:03:09
|
14980
15027
|
* @LastEditors: binruan@chatlabs.com
|
14981
|
-
* @LastEditTime: 2024-
|
15028
|
+
* @LastEditTime: 2024-07-11 18:19:29
|
14982
15029
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FingerSwipeTip\index.tsx
|
14983
15030
|
*
|
14984
15031
|
*/
|
14985
|
-
const FingerSwipeTip = ({ imageUrl, style }) => {
|
15032
|
+
const FingerSwipeTip = ({ imageUrl, style, duration = 2000 }) => {
|
14986
15033
|
const [show, setShow] = useState(true);
|
14987
15034
|
useEditor();
|
14988
15035
|
useEffect(() => {
|
14989
15036
|
setTimeout(() => {
|
14990
15037
|
setShow(false);
|
14991
|
-
},
|
15038
|
+
}, duration);
|
14992
15039
|
}, []);
|
14993
15040
|
const FINGER_SWIPE_ICON = useIconLink('/pb_static/finger-swipe-tip.29dc3a48a3c746c906ea..png');
|
14994
15041
|
const animationCls = useMemo(() => {
|
14995
15042
|
return show ? 'pb-fadeIn' : 'pb-fadeOut';
|
14996
15043
|
}, [show]);
|
14997
|
-
return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
|
15044
|
+
return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: Object.assign(Object.assign({}, style), { animationDuration: `${duration / 1000}s` }) },
|
14998
15045
|
React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON, alt: 'finger swiper' })));
|
14999
15046
|
};
|
15000
15047
|
|
@@ -15098,11 +15145,12 @@ var PictureGroup$3 = memo(PictureGroup$2);
|
|
15098
15145
|
* @Author: binruan@chatlabs.com
|
15099
15146
|
* @Date: 2024-01-15 19:03:09
|
15100
15147
|
* @LastEditors: binruan@chatlabs.com
|
15101
|
-
* @LastEditTime: 2024-
|
15148
|
+
* @LastEditTime: 2024-07-09 18:47:05
|
15102
15149
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
|
15103
15150
|
*
|
15104
15151
|
*/
|
15105
15152
|
const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
|
15153
|
+
var _a;
|
15106
15154
|
const [isShowMore, setIsShowMore] = useState(false);
|
15107
15155
|
const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
|
15108
15156
|
const handleClickTag = (data) => {
|
@@ -15134,7 +15182,8 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
|
|
15134
15182
|
}
|
15135
15183
|
return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
|
15136
15184
|
}, [isShowMore, tags]);
|
15137
|
-
|
15185
|
+
console.log(hashTagStyle, '111');
|
15186
|
+
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` } },
|
15138
15187
|
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) },
|
15139
15188
|
React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
|
15140
15189
|
};
|
@@ -15338,7 +15387,7 @@ var Tagbar$1 = memo(Tagbar);
|
|
15338
15387
|
* @Author: binruan@chatlabs.com
|
15339
15388
|
* @Date: 2024-01-15 19:03:09
|
15340
15389
|
* @LastEditors: binruan@chatlabs.com
|
15341
|
-
* @LastEditTime: 2024-07-
|
15390
|
+
* @LastEditTime: 2024-07-24 14:59:23
|
15342
15391
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
15343
15392
|
*
|
15344
15393
|
*/
|
@@ -15544,18 +15593,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15544
15593
|
};
|
15545
15594
|
}, [isShowMore]);
|
15546
15595
|
const renderBottom = useCallback((rec, index) => {
|
15547
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
15596
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
15548
15597
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
15549
15598
|
return (React.createElement(React.Fragment, null,
|
15550
15599
|
((_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' }),
|
15551
|
-
React.createElement("div", { className: 'clc-sxp-bottom' },
|
15600
|
+
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` } },
|
15552
15601
|
React.createElement(Nudge, { nudge: nudge }),
|
15553
15602
|
(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' },
|
15554
15603
|
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
15555
15604
|
React.createElement("div", null,
|
15556
|
-
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: (
|
15605
|
+
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 }),
|
15557
15606
|
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
|
15558
|
-
React.createElement(Hashtag$1, { index: activeIndex, tags: (
|
15607
|
+
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 }))),
|
15559
15608
|
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'] })));
|
15560
15609
|
}
|
15561
15610
|
return null;
|
@@ -15737,7 +15786,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15737
15786
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } })));
|
15738
15787
|
}
|
15739
15788
|
return visList === null || visList === void 0 ? void 0 : visList.map((rec, index) => {
|
15740
|
-
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: {
|
15789
|
+
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: {
|
15741
15790
|
height,
|
15742
15791
|
width: containerWidth,
|
15743
15792
|
display: 'flex',
|
@@ -15760,7 +15809,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15760
15809
|
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
|
15761
15810
|
top: minusHeight
|
15762
15811
|
} }),
|
15763
|
-
isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50
|
15812
|
+
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,
|
15764
15813
|
React.createElement(Swiper, { style: {
|
15765
15814
|
marginTop: tagHeight
|
15766
15815
|
}, ref: swiperRef, onSlideChange: () => {
|
@@ -15785,13 +15834,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15785
15834
|
}
|
15786
15835
|
}
|
15787
15836
|
}, direction: 'vertical', height: height },
|
15788
|
-
React.createElement(ToggleButton$1, { style: {
|
15837
|
+
((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: {
|
15789
15838
|
position: 'fixed',
|
15790
15839
|
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',
|
15791
15840
|
zIndex: 999,
|
15792
15841
|
[(_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,
|
15793
15842
|
[(_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
|
15794
|
-
}, 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 }),
|
15843
|
+
}, 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 })),
|
15795
15844
|
renderView),
|
15796
15845
|
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))));
|
15797
15846
|
};
|
@@ -16227,7 +16276,7 @@ const Popup = () => {
|
|
16227
16276
|
* @Author: binruan@chatlabs.com
|
16228
16277
|
* @Date: 2024-01-15 19:03:09
|
16229
16278
|
* @LastEditors: binruan@chatlabs.com
|
16230
|
-
* @LastEditTime: 2024-
|
16279
|
+
* @LastEditTime: 2024-07-24 16:35:44
|
16231
16280
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
16232
16281
|
*
|
16233
16282
|
*/
|
@@ -16251,7 +16300,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
|
|
16251
16300
|
return searchParams;
|
16252
16301
|
}, []);
|
16253
16302
|
return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
|
16254
|
-
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, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, globalConfig: (_l = (_k = data === null || data === void 0 ? void 0 : data.data) === null || _k === void 0 ? void 0 : _k.sxpPageConf) === null || _l === void 0 ? void 0 : _l.globalConfig, render: ({ rtcList, tagList }) => {
|
16303
|
+
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, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, globalConfig: (_l = (_k = data === null || data === void 0 ? void 0 : data.data) === null || _k === void 0 ? void 0 : _k.sxpPageConf) === null || _l === void 0 ? void 0 : _l.globalConfig, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, render: ({ rtcList, tagList }) => {
|
16255
16304
|
var _a;
|
16256
16305
|
return (React.createElement(React.Fragment, null,
|
16257
16306
|
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, licenseUrl: licenseUrl })),
|