pb-sxp-ui 1.18.2 → 1.19.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +364 -252
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +7 -15
- package/dist/index.js +364 -252
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +6 -6
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +6 -6
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +364 -252
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +6 -6
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/DiyPortalPreview/index.js +3 -5
- package/es/core/components/DiyStoryPreview/index.js +18 -7
- package/es/core/components/SxpPageRender/RenderCard.d.ts +1 -0
- package/es/core/components/SxpPageRender/RenderCard.js +2 -14
- package/es/core/components/SxpPageRender/index.d.ts +1 -0
- package/es/core/components/SxpPageRender/index.js +98 -64
- package/es/core/context/SxpDataSourceProvider.d.ts +2 -0
- package/es/core/context/SxpDataSourceProvider.js +71 -27
- package/es/core/utils/tool.d.ts +3 -1
- package/es/core/utils/tool.js +29 -1
- package/es/materials/sxp/consentPopup/Display/index.js +1 -1
- package/es/materials/sxp/cta/AniLinkPopup/material.js +3 -2
- package/es/materials/sxp/popup/CommodityDetail/material.js +2 -1
- package/es/materials/sxp/popup/CommodityList/index.js +5 -4
- package/es/materials/sxp/popup/CommodityList/material.js +1 -1
- package/es/materials/sxp/popup/CommodityList/settingRender.js +1 -1
- package/es/materials/sxp/template/Appoint/material.js +2 -1
- package/es/materials/sxp/template/Commodity/material.js +3 -2
- package/es/materials/sxp/template/CommodityDiro/material.js +3 -2
- package/es/materials/sxp/template/CommodityDiroNew/material.js +4 -2
- package/es/materials/sxp/template/Link/material.js +4 -2
- package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodity/material.js +2 -1
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodityDiro/material.js +3 -2
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
- package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +4 -2
- package/es/materials/sxp/template/NineCommodity/material.js +3 -2
- package/es/materials/sxp/template/components/CommodityGroup.js +1 -1
- package/es/materials/sxp/template/components/settingRender.js +1 -1
- package/lib/core/components/DiyPortalPreview/index.js +3 -5
- package/lib/core/components/DiyStoryPreview/index.js +18 -7
- package/lib/core/components/SxpPageRender/RenderCard.d.ts +1 -0
- package/lib/core/components/SxpPageRender/RenderCard.js +2 -14
- package/lib/core/components/SxpPageRender/index.d.ts +1 -0
- package/lib/core/components/SxpPageRender/index.js +98 -64
- package/lib/core/context/SxpDataSourceProvider.d.ts +2 -0
- package/lib/core/context/SxpDataSourceProvider.js +71 -27
- package/lib/core/utils/tool.d.ts +3 -1
- package/lib/core/utils/tool.js +31 -1
- package/lib/materials/sxp/consentPopup/Display/index.js +1 -1
- package/lib/materials/sxp/cta/AniLinkPopup/material.js +2 -1
- package/lib/materials/sxp/popup/CommodityDetail/material.js +2 -1
- package/lib/materials/sxp/popup/CommodityList/index.js +5 -4
- package/lib/materials/sxp/popup/CommodityList/material.js +1 -1
- package/lib/materials/sxp/popup/CommodityList/settingRender.js +1 -1
- package/lib/materials/sxp/template/Appoint/material.js +2 -1
- package/lib/materials/sxp/template/Commodity/material.js +3 -2
- package/lib/materials/sxp/template/CommodityDiro/material.js +3 -2
- package/lib/materials/sxp/template/CommodityDiroNew/material.js +4 -2
- package/lib/materials/sxp/template/Link/material.js +4 -2
- package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodity/material.js +2 -1
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodityDiro/material.js +3 -2
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
- package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +4 -2
- package/lib/materials/sxp/template/NineCommodity/material.js +3 -2
- package/lib/materials/sxp/template/components/CommodityGroup.js +1 -1
- package/lib/materials/sxp/template/components/settingRender.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -298,6 +298,42 @@ function splitUrlParams(urlParams) {
|
|
|
298
298
|
});
|
|
299
299
|
return splitList !== null && splitList !== void 0 ? splitList : [];
|
|
300
300
|
}
|
|
301
|
+
function deleteCookie(name, path = '/', domain = '') {
|
|
302
|
+
// 设置过期时间为过去的时间
|
|
303
|
+
const expiration = 'expires=Thu, 01 Jan 1970 00:00:00 GMT';
|
|
304
|
+
const pathPart = path ? `; path=${path}` : '';
|
|
305
|
+
const domainPart = domain ? `; domain=${domain}` : '';
|
|
306
|
+
// 设置Cookie值为空,过期时间设为过去
|
|
307
|
+
document.cookie = `${name}=; ${expiration}${pathPart}${domainPart}`;
|
|
308
|
+
console.log(`已尝试删除Cookie: ${name}`);
|
|
309
|
+
}
|
|
310
|
+
function setCookie(name, value, days = 0, path = '/', domain = '', secure = false, sameSite = 'Lax') {
|
|
311
|
+
let cookieString = `${encodeURIComponent(name)}=${encodeURIComponent(value)}`;
|
|
312
|
+
// 设置过期时间
|
|
313
|
+
if (days) {
|
|
314
|
+
const date = new Date();
|
|
315
|
+
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
|
|
316
|
+
cookieString += `; expires=${date.toUTCString()}`;
|
|
317
|
+
}
|
|
318
|
+
// 设置路径
|
|
319
|
+
if (path) {
|
|
320
|
+
cookieString += `; path=${path}`;
|
|
321
|
+
}
|
|
322
|
+
// 设置域名
|
|
323
|
+
if (domain) {
|
|
324
|
+
cookieString += `; domain=${domain}`;
|
|
325
|
+
}
|
|
326
|
+
// 设置Secure标志
|
|
327
|
+
if (secure) {
|
|
328
|
+
cookieString += '; secure';
|
|
329
|
+
}
|
|
330
|
+
// 设置SameSite属性
|
|
331
|
+
if (sameSite) {
|
|
332
|
+
cookieString += `; samesite=${sameSite}`;
|
|
333
|
+
}
|
|
334
|
+
// 设置Cookie
|
|
335
|
+
document.cookie = cookieString;
|
|
336
|
+
}
|
|
301
337
|
|
|
302
338
|
function unzip(b64Data) {
|
|
303
339
|
const strData = atob(b64Data);
|
|
@@ -735,6 +771,23 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
735
771
|
var _a;
|
|
736
772
|
return ((_a = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _a === void 0 ? void 0 : _a['x-app-id']) + storeAndLoadFeUserId();
|
|
737
773
|
}, [bffDataSource]);
|
|
774
|
+
const getTargetingCookie = () => {
|
|
775
|
+
var _a;
|
|
776
|
+
function getCookie(name) {
|
|
777
|
+
var _a;
|
|
778
|
+
const value = `; ${document.cookie}`;
|
|
779
|
+
const parts = value.split(`; ${name}=`);
|
|
780
|
+
if (parts.length === 2)
|
|
781
|
+
return (_a = parts.pop()) === null || _a === void 0 ? void 0 : _a.split(';').shift();
|
|
782
|
+
return '';
|
|
783
|
+
}
|
|
784
|
+
decodeURIComponent((_a = getCookie('OptanonConsent')) !== null && _a !== void 0 ? _a : '');
|
|
785
|
+
console.log('OptanonConsent:', window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups);
|
|
786
|
+
if (((window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups) && !(window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups.includes('4')))) {
|
|
787
|
+
return true;
|
|
788
|
+
}
|
|
789
|
+
return false;
|
|
790
|
+
};
|
|
738
791
|
// bff API 请求方法
|
|
739
792
|
const bffFetch = React.useCallback((path, options, isBota = true) => {
|
|
740
793
|
var _a;
|
|
@@ -761,6 +814,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
761
814
|
}, [bffDataSource, fakeUserId]);
|
|
762
815
|
const bffCollectEvent = React.useCallback((params) => {
|
|
763
816
|
var _a;
|
|
817
|
+
if (getTargetingCookie())
|
|
818
|
+
return Promise.resolve();
|
|
764
819
|
const body = {
|
|
765
820
|
eventName: params === null || params === void 0 ? void 0 : params.eventName,
|
|
766
821
|
eventSource: params === null || params === void 0 ? void 0 : params.eventSource
|
|
@@ -773,36 +828,39 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
773
828
|
}, false);
|
|
774
829
|
}, [bffFetch, bffDataSource]);
|
|
775
830
|
React.useEffect(() => {
|
|
776
|
-
if (typeof (window
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
// img.onload = function () {
|
|
787
|
-
// 检查是否是目标 URL
|
|
788
|
-
if (value.includes('https://www.facebook.com/privacy_sandbox/pixel/register/trigger/')) {
|
|
789
|
-
// 解析 URL 参数
|
|
790
|
-
const url = new URL(value);
|
|
791
|
-
const params = Object.fromEntries(url.searchParams.entries());
|
|
792
|
-
bffCollectEvent({
|
|
793
|
-
eventName: params === null || params === void 0 ? void 0 : params.ev,
|
|
794
|
-
eventSource: 'Meta Pixel'
|
|
795
|
-
});
|
|
796
|
-
// }
|
|
797
|
-
}
|
|
798
|
-
},
|
|
799
|
-
get() {
|
|
800
|
-
return originalSrcDescriptor.get.call(this);
|
|
831
|
+
// if (typeof (window as any)?.fbq === 'function') {
|
|
832
|
+
const OriginalImage = window.Image;
|
|
833
|
+
window.Image = function () {
|
|
834
|
+
const img = new OriginalImage();
|
|
835
|
+
// 劫持 src 的 setter
|
|
836
|
+
const originalSrcDescriptor = Object.getOwnPropertyDescriptor(HTMLImageElement.prototype, 'src');
|
|
837
|
+
Object.defineProperty(img, 'src', {
|
|
838
|
+
set(value) {
|
|
839
|
+
if (getTargetingCookie() && (value.includes('https://www.facebook.com/privacy_sandbox/pixel/register/trigger/') || value.includes('https://www.facebook.com/tr'))) {
|
|
840
|
+
return;
|
|
801
841
|
}
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
842
|
+
// 继续正常设置 src
|
|
843
|
+
originalSrcDescriptor.set.call(this, value);
|
|
844
|
+
// img.onload = function () {
|
|
845
|
+
// 检查是否是目标 URL
|
|
846
|
+
if (value.includes('https://www.facebook.com/privacy_sandbox/pixel/register/trigger/')) {
|
|
847
|
+
// 解析 URL 参数
|
|
848
|
+
const url = new URL(value);
|
|
849
|
+
const params = Object.fromEntries(url.searchParams.entries());
|
|
850
|
+
bffCollectEvent({
|
|
851
|
+
eventName: params === null || params === void 0 ? void 0 : params.ev,
|
|
852
|
+
eventSource: 'Meta Pixel'
|
|
853
|
+
});
|
|
854
|
+
// }
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
get() {
|
|
858
|
+
return originalSrcDescriptor.get.call(this);
|
|
859
|
+
}
|
|
860
|
+
});
|
|
861
|
+
return img;
|
|
862
|
+
};
|
|
863
|
+
// }
|
|
806
864
|
}, [bffCollectEvent]);
|
|
807
865
|
React.useEffect(() => {
|
|
808
866
|
// 类型安全声明
|
|
@@ -816,6 +874,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
816
874
|
// 覆盖方法
|
|
817
875
|
navigatorWithBeacon.sendBeacon = function (url, data) {
|
|
818
876
|
const urlString = url instanceof URL ? url.href : url.toString();
|
|
877
|
+
if (getTargetingCookie() && (urlString.includes('https://tr.snapchat.com/p') || urlString.includes('https://analytics.tiktok.com/api/v2/pixel'))) {
|
|
878
|
+
return true;
|
|
879
|
+
}
|
|
819
880
|
const success = originalSendBeacon(url, data);
|
|
820
881
|
function parseBeaconData(data) {
|
|
821
882
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -887,6 +948,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
887
948
|
return _originalFetch.apply(this, arguments_1);
|
|
888
949
|
}
|
|
889
950
|
try {
|
|
951
|
+
if (getTargetingCookie() && (url.includes('https://www.google-analytics.com/g/collect') || url.includes('https://arms-retcode.aliyuncs.com/r.png'))) {
|
|
952
|
+
return Promise.resolve(new Response(''));
|
|
953
|
+
}
|
|
890
954
|
// 1. 先执行原始请求
|
|
891
955
|
const response = _originalFetch.apply(this, arguments_1);
|
|
892
956
|
// 检查是否是 GA4 收集端点
|
|
@@ -940,6 +1004,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
940
1004
|
};
|
|
941
1005
|
XMLHttpRequest.prototype.send = function (body) {
|
|
942
1006
|
var _a;
|
|
1007
|
+
if (getTargetingCookie() && this._url && typeof this._url === 'string' && (this._url.includes('https://rumcollector.uptime.com') || this._url.includes('https://arms-retcode.aliyuncs.com/r.png') || this._url.includes('https://i.giesswein.com/nb-collector'))) {
|
|
1008
|
+
return;
|
|
1009
|
+
}
|
|
943
1010
|
if (this._url && typeof this._url === 'string' && this._url.includes('https://i.giesswein.com/nb-collector')) {
|
|
944
1011
|
if (body && typeof body === 'string') {
|
|
945
1012
|
try {
|
|
@@ -1092,10 +1159,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
1092
1159
|
}
|
|
1093
1160
|
return expire;
|
|
1094
1161
|
}, [data]);
|
|
1095
|
-
const bffEventReport = React.useCallback(({ userInfo, eventInfo, reportLayId = true }) => {
|
|
1162
|
+
const bffEventReport = React.useCallback(({ userInfo, eventInfo, reportLayId = true, isActiveTargetingCookie = true }) => {
|
|
1096
1163
|
var _a, _b;
|
|
1097
1164
|
// 关闭 BFF 事件上报
|
|
1098
|
-
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
|
1165
|
+
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) || (isActiveTargetingCookie && getTargetingCookie())) {
|
|
1099
1166
|
return;
|
|
1100
1167
|
}
|
|
1101
1168
|
// 用户信息都是公共的
|
|
@@ -1201,7 +1268,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
1201
1268
|
}, [fakeUserId]);
|
|
1202
1269
|
const bffFbReport = React.useCallback(({ eventName, product }) => {
|
|
1203
1270
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1204
|
-
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
|
1271
|
+
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) || getTargetingCookie()) {
|
|
1205
1272
|
return;
|
|
1206
1273
|
}
|
|
1207
1274
|
let isPushState = false;
|
|
@@ -2639,35 +2706,6 @@ var settingRender$e = [
|
|
|
2639
2706
|
}
|
|
2640
2707
|
];
|
|
2641
2708
|
|
|
2642
|
-
/*
|
|
2643
|
-
* @Author: binruan@chatlabs.com
|
|
2644
|
-
* @Date: 2024-07-09 14:35:10
|
|
2645
|
-
* @LastEditors: binruan@chatlabs.com
|
|
2646
|
-
* @LastEditTime: 2024-07-12 17:53:02
|
|
2647
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\interactionRender.tsx
|
|
2648
|
-
*
|
|
2649
|
-
*/
|
|
2650
|
-
/*
|
|
2651
|
-
* @Author: binruan@chatlabs.com
|
|
2652
|
-
* @Date: 2024-07-05 14:08:41
|
|
2653
|
-
* @LastEditors: binruan@chatlabs.com
|
|
2654
|
-
* @LastEditTime: 2024-07-09 14:34:49
|
|
2655
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
|
|
2656
|
-
*
|
|
2657
|
-
*/
|
|
2658
|
-
var interactionRender$g = [
|
|
2659
|
-
{
|
|
2660
|
-
title: '滑动事件',
|
|
2661
|
-
child: [
|
|
2662
|
-
{
|
|
2663
|
-
type: 'Switch',
|
|
2664
|
-
label: '滑动铺满全屏',
|
|
2665
|
-
name: ['isScrollFullScreen']
|
|
2666
|
-
}
|
|
2667
|
-
]
|
|
2668
|
-
}
|
|
2669
|
-
];
|
|
2670
|
-
|
|
2671
2709
|
/**
|
|
2672
2710
|
* SSR Window 4.0.2
|
|
2673
2711
|
* Better handling for window object in SSR environment
|
|
@@ -10246,7 +10284,7 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
|
|
|
10246
10284
|
return (React.createElement(React.Fragment, null, (item === null || item === void 0 ? void 0 : item.bindCta) ? (React.createElement(SwiperSlide, { className: css.css({
|
|
10247
10285
|
width: '50px',
|
|
10248
10286
|
height: '50px',
|
|
10249
|
-
|
|
10287
|
+
marginRight: '10px'
|
|
10250
10288
|
}), onClick: () => {
|
|
10251
10289
|
handleClick(item, index);
|
|
10252
10290
|
}, key: index },
|
|
@@ -10845,6 +10883,35 @@ const CommodityDetail$1 = (_a) => {
|
|
|
10845
10883
|
};
|
|
10846
10884
|
var CommodityDetailComponent = React.memo(CommodityDetail$1);
|
|
10847
10885
|
|
|
10886
|
+
/*
|
|
10887
|
+
* @Author: binruan@chatlabs.com
|
|
10888
|
+
* @Date: 2024-07-09 14:35:10
|
|
10889
|
+
* @LastEditors: binruan@chatlabs.com
|
|
10890
|
+
* @LastEditTime: 2024-07-12 17:53:02
|
|
10891
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\interactionRender.tsx
|
|
10892
|
+
*
|
|
10893
|
+
*/
|
|
10894
|
+
/*
|
|
10895
|
+
* @Author: binruan@chatlabs.com
|
|
10896
|
+
* @Date: 2024-07-05 14:08:41
|
|
10897
|
+
* @LastEditors: binruan@chatlabs.com
|
|
10898
|
+
* @LastEditTime: 2024-07-09 14:34:49
|
|
10899
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
|
|
10900
|
+
*
|
|
10901
|
+
*/
|
|
10902
|
+
var interactionRender$g = [
|
|
10903
|
+
{
|
|
10904
|
+
title: '滑动事件',
|
|
10905
|
+
child: [
|
|
10906
|
+
{
|
|
10907
|
+
type: 'Switch',
|
|
10908
|
+
label: '滑动铺满全屏',
|
|
10909
|
+
name: ['isScrollFullScreen']
|
|
10910
|
+
}
|
|
10911
|
+
]
|
|
10912
|
+
}
|
|
10913
|
+
];
|
|
10914
|
+
|
|
10848
10915
|
/*
|
|
10849
10916
|
* @Author: binruan@chatlabs.com
|
|
10850
10917
|
* @Date: 2023-07-28 18:29:57
|
|
@@ -10891,6 +10958,7 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
|
|
|
10891
10958
|
taxInfo: {
|
|
10892
10959
|
color: '#000',
|
|
10893
10960
|
fontSize: 13,
|
|
10961
|
+
textAlign: 'left',
|
|
10894
10962
|
marginBottom: '10px'
|
|
10895
10963
|
}
|
|
10896
10964
|
},
|
|
@@ -11982,7 +12050,7 @@ var settingRender$b = [
|
|
|
11982
12050
|
type: 'Number',
|
|
11983
12051
|
label: '与右侧边距',
|
|
11984
12052
|
addonAfter: 'px',
|
|
11985
|
-
name: ['props', 'commodityPicture', '
|
|
12053
|
+
name: ['props', 'commodityPicture', 'marginRight']
|
|
11986
12054
|
},
|
|
11987
12055
|
{
|
|
11988
12056
|
label: '居中垂直偏移',
|
|
@@ -12268,11 +12336,12 @@ const CommodityList$1 = (_a) => {
|
|
|
12268
12336
|
React.createElement("button", Object.assign({ role: 'button', "aria-label": item === null || item === void 0 ? void 0 : item.title, tabIndex: 0, className: css.css({
|
|
12269
12337
|
display: 'flex',
|
|
12270
12338
|
alignItems: 'normal',
|
|
12271
|
-
width: '100%'
|
|
12339
|
+
width: '100%',
|
|
12340
|
+
textAlign: 'left'
|
|
12272
12341
|
}) }, props),
|
|
12273
12342
|
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, enableEventReport: false }),
|
|
12274
12343
|
React.createElement("div", { style: {
|
|
12275
|
-
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.
|
|
12344
|
+
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)`,
|
|
12276
12345
|
display: 'flex',
|
|
12277
12346
|
flexDirection: 'column',
|
|
12278
12347
|
justifyContent: 'space-between'
|
|
@@ -12353,7 +12422,7 @@ const CommodityList = createMaterial(CommodityListComponent, {
|
|
|
12353
12422
|
commodityPicture: {
|
|
12354
12423
|
width: 100,
|
|
12355
12424
|
height: 100,
|
|
12356
|
-
|
|
12425
|
+
marginRight: 10
|
|
12357
12426
|
},
|
|
12358
12427
|
commodityStyles: {
|
|
12359
12428
|
price: {
|
|
@@ -12599,7 +12668,7 @@ var settingRender$8 = [
|
|
|
12599
12668
|
type: 'Number',
|
|
12600
12669
|
label: '与右侧边距',
|
|
12601
12670
|
addonAfter: 'px',
|
|
12602
|
-
name: ['props', 'ctaTempStyles', 'img', '
|
|
12671
|
+
name: ['props', 'ctaTempStyles', 'img', 'marginRight']
|
|
12603
12672
|
},
|
|
12604
12673
|
{
|
|
12605
12674
|
label: '居中垂直偏移',
|
|
@@ -12860,11 +12929,12 @@ const Commodity = createMaterial(CommodityComponent, {
|
|
|
12860
12929
|
borderRadius: 3,
|
|
12861
12930
|
width: 60,
|
|
12862
12931
|
height: 60,
|
|
12863
|
-
|
|
12932
|
+
marginRight: 8
|
|
12864
12933
|
},
|
|
12865
12934
|
title: {
|
|
12866
12935
|
fontSize: 12,
|
|
12867
|
-
color: '#fff'
|
|
12936
|
+
color: '#fff',
|
|
12937
|
+
textAlign: 'left'
|
|
12868
12938
|
},
|
|
12869
12939
|
ctaTitle: {
|
|
12870
12940
|
fontSize: 10,
|
|
@@ -12942,11 +13012,12 @@ const Appoint = createMaterial(AppointComponent, {
|
|
|
12942
13012
|
borderRadius: 3,
|
|
12943
13013
|
width: 30,
|
|
12944
13014
|
height: 30,
|
|
12945
|
-
|
|
13015
|
+
marginRight: 8
|
|
12946
13016
|
},
|
|
12947
13017
|
ctaTitle: {
|
|
12948
13018
|
fontSize: 12,
|
|
12949
13019
|
color: '#fff',
|
|
13020
|
+
textAlign: 'left',
|
|
12950
13021
|
width: 130,
|
|
12951
13022
|
height: 20
|
|
12952
13023
|
}
|
|
@@ -13082,27 +13153,6 @@ var linkSettingRender = [
|
|
|
13082
13153
|
}
|
|
13083
13154
|
];
|
|
13084
13155
|
|
|
13085
|
-
/*
|
|
13086
|
-
* @Author: binruan@chatlabs.com
|
|
13087
|
-
* @Date: 2024-08-09 16:59:38
|
|
13088
|
-
* @LastEditors: binruan@chatlabs.com
|
|
13089
|
-
* @LastEditTime: 2024-09-09 13:59:50
|
|
13090
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
|
|
13091
|
-
*
|
|
13092
|
-
*/
|
|
13093
|
-
var interactionRender$a = [
|
|
13094
|
-
{
|
|
13095
|
-
title: '点击事件',
|
|
13096
|
-
child: [
|
|
13097
|
-
{
|
|
13098
|
-
type: 'link',
|
|
13099
|
-
name: 'onClick',
|
|
13100
|
-
hiddenUrl: true
|
|
13101
|
-
}
|
|
13102
|
-
]
|
|
13103
|
-
}
|
|
13104
|
-
];
|
|
13105
|
-
|
|
13106
13156
|
var styles$8 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one-line-ellipsis":"index-module_one-line-ellipsis__buFw1"};
|
|
13107
13157
|
|
|
13108
13158
|
const Link$1 = (_a) => {
|
|
@@ -13130,6 +13180,27 @@ const Link$1 = (_a) => {
|
|
|
13130
13180
|
};
|
|
13131
13181
|
var LinkComponent = React.memo(Link$1);
|
|
13132
13182
|
|
|
13183
|
+
/*
|
|
13184
|
+
* @Author: binruan@chatlabs.com
|
|
13185
|
+
* @Date: 2024-08-09 16:59:38
|
|
13186
|
+
* @LastEditors: binruan@chatlabs.com
|
|
13187
|
+
* @LastEditTime: 2024-09-09 13:59:50
|
|
13188
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
|
|
13189
|
+
*
|
|
13190
|
+
*/
|
|
13191
|
+
var interactionRender$a = [
|
|
13192
|
+
{
|
|
13193
|
+
title: '点击事件',
|
|
13194
|
+
child: [
|
|
13195
|
+
{
|
|
13196
|
+
type: 'link',
|
|
13197
|
+
name: 'onClick',
|
|
13198
|
+
hiddenUrl: true
|
|
13199
|
+
}
|
|
13200
|
+
]
|
|
13201
|
+
}
|
|
13202
|
+
];
|
|
13203
|
+
|
|
13133
13204
|
var _a;
|
|
13134
13205
|
const Link = createMaterial(LinkComponent, {
|
|
13135
13206
|
displayName: '普通CTA',
|
|
@@ -13148,17 +13219,19 @@ const Link = createMaterial(LinkComponent, {
|
|
|
13148
13219
|
borderRadius: 3,
|
|
13149
13220
|
width: 60,
|
|
13150
13221
|
height: 60,
|
|
13151
|
-
|
|
13222
|
+
marginRight: 8
|
|
13152
13223
|
},
|
|
13153
13224
|
ctaTitle: {
|
|
13154
13225
|
fontSize: 12,
|
|
13155
13226
|
color: '#fff',
|
|
13227
|
+
textAlign: 'left',
|
|
13156
13228
|
width: 130,
|
|
13157
13229
|
height: 20
|
|
13158
13230
|
}
|
|
13159
13231
|
},
|
|
13160
13232
|
customTitle: {
|
|
13161
13233
|
style: {
|
|
13234
|
+
textAlign: 'left',
|
|
13162
13235
|
textDecoration: 'underline',
|
|
13163
13236
|
fontWeight: 'bold',
|
|
13164
13237
|
width: 130,
|
|
@@ -13248,11 +13321,12 @@ const CommodityDiro = createMaterial(CommodityDiroComponent, {
|
|
|
13248
13321
|
borderRadius: 3,
|
|
13249
13322
|
width: 60,
|
|
13250
13323
|
height: 60,
|
|
13251
|
-
|
|
13324
|
+
marginRight: 8
|
|
13252
13325
|
},
|
|
13253
13326
|
title: {
|
|
13254
13327
|
fontSize: 12,
|
|
13255
|
-
color: '#000'
|
|
13328
|
+
color: '#000',
|
|
13329
|
+
textAlign: 'left'
|
|
13256
13330
|
},
|
|
13257
13331
|
ctaTitle: {
|
|
13258
13332
|
fontSize: 10,
|
|
@@ -13343,17 +13417,19 @@ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
|
|
|
13343
13417
|
borderRadius: 8,
|
|
13344
13418
|
width: 78,
|
|
13345
13419
|
height: 78,
|
|
13346
|
-
|
|
13420
|
+
marginRight: 16
|
|
13347
13421
|
},
|
|
13348
13422
|
title: {
|
|
13349
13423
|
fontSize: 13,
|
|
13350
|
-
color: '#000'
|
|
13424
|
+
color: '#000',
|
|
13425
|
+
textAlign: 'left'
|
|
13351
13426
|
},
|
|
13352
13427
|
ctaTitle: {
|
|
13353
13428
|
textDecoration: 'underline',
|
|
13354
13429
|
fontSize: 14,
|
|
13355
13430
|
fontWeight: 'bold',
|
|
13356
13431
|
color: '#000',
|
|
13432
|
+
textAlign: 'left',
|
|
13357
13433
|
width: 150,
|
|
13358
13434
|
height: 20
|
|
13359
13435
|
}
|
|
@@ -13395,7 +13471,7 @@ const MultiCommodityDiro$1 = (_a) => {
|
|
|
13395
13471
|
const [products] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
|
13396
13472
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
|
13397
13473
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
13398
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0,
|
|
13474
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
|
13399
13475
|
React.createElement(EventProvider$1, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
|
|
13400
13476
|
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: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
|
13401
13477
|
React.createElement("div", { className: css.css({
|
|
@@ -13441,11 +13517,12 @@ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
|
|
|
13441
13517
|
borderRadius: 3,
|
|
13442
13518
|
width: 60,
|
|
13443
13519
|
height: 60,
|
|
13444
|
-
|
|
13520
|
+
marginRight: 8
|
|
13445
13521
|
},
|
|
13446
13522
|
title: {
|
|
13447
13523
|
fontSize: 12,
|
|
13448
|
-
color: '#000'
|
|
13524
|
+
color: '#000',
|
|
13525
|
+
textAlign: 'left'
|
|
13449
13526
|
},
|
|
13450
13527
|
ctaTitle: {
|
|
13451
13528
|
fontSize: 10,
|
|
@@ -13493,7 +13570,7 @@ const MultiCommodity$1 = (_a) => {
|
|
|
13493
13570
|
const [products] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
|
13494
13571
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
|
13495
13572
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
13496
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0,
|
|
13573
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
|
13497
13574
|
React.createElement(EventProvider$1, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
|
|
13498
13575
|
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: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
|
13499
13576
|
React.createElement("div", { className: css.css({
|
|
@@ -13539,11 +13616,12 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
|
|
|
13539
13616
|
borderRadius: 3,
|
|
13540
13617
|
width: 60,
|
|
13541
13618
|
height: 60,
|
|
13542
|
-
|
|
13619
|
+
marginRight: 8
|
|
13543
13620
|
},
|
|
13544
13621
|
title: {
|
|
13545
13622
|
fontSize: 12,
|
|
13546
13623
|
color: '#fff',
|
|
13624
|
+
textAlign: 'left'
|
|
13547
13625
|
},
|
|
13548
13626
|
ctaTitle: {
|
|
13549
13627
|
fontSize: 10,
|
|
@@ -13599,7 +13677,7 @@ const MultiCommodityDiroNew$1 = (_a) => {
|
|
|
13599
13677
|
const [products] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
|
13600
13678
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
|
13601
13679
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
13602
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0,
|
|
13680
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
|
13603
13681
|
React.createElement(EventProvider$1, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
|
|
13604
13682
|
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: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
|
13605
13683
|
React.createElement("div", { className: css.css({
|
|
@@ -13646,17 +13724,19 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
|
|
|
13646
13724
|
borderRadius: 8,
|
|
13647
13725
|
width: 78,
|
|
13648
13726
|
height: 78,
|
|
13649
|
-
|
|
13727
|
+
marginRight: 16
|
|
13650
13728
|
},
|
|
13651
13729
|
title: {
|
|
13652
13730
|
fontSize: 12,
|
|
13653
|
-
color: '#000'
|
|
13731
|
+
color: '#000',
|
|
13732
|
+
textAlign: 'left'
|
|
13654
13733
|
},
|
|
13655
13734
|
ctaTitle: {
|
|
13656
13735
|
textDecoration: 'underline',
|
|
13657
13736
|
fontSize: 12,
|
|
13658
13737
|
fontWeight: 'bold',
|
|
13659
13738
|
color: '#000',
|
|
13739
|
+
textAlign: 'left',
|
|
13660
13740
|
width: 150,
|
|
13661
13741
|
height: 20
|
|
13662
13742
|
}
|
|
@@ -13751,11 +13831,12 @@ const NineCommodity = createMaterial(NineCommodityComponent, {
|
|
|
13751
13831
|
borderRadius: 3,
|
|
13752
13832
|
width: 60,
|
|
13753
13833
|
height: 60,
|
|
13754
|
-
|
|
13834
|
+
marginRight: 8
|
|
13755
13835
|
},
|
|
13756
13836
|
title: {
|
|
13757
13837
|
fontSize: 12,
|
|
13758
|
-
color: '#fff'
|
|
13838
|
+
color: '#fff',
|
|
13839
|
+
textAlign: 'left'
|
|
13759
13840
|
},
|
|
13760
13841
|
ctaTitle: {
|
|
13761
13842
|
fontSize: 10,
|
|
@@ -16675,60 +16756,6 @@ var settingRender$4 = [
|
|
|
16675
16756
|
}
|
|
16676
16757
|
];
|
|
16677
16758
|
|
|
16678
|
-
/*
|
|
16679
|
-
* @Author: binruan@chatlabs.com
|
|
16680
|
-
* @Date: 2024-07-24 14:58:40
|
|
16681
|
-
* @LastEditors: binruan@chatlabs.com
|
|
16682
|
-
* @LastEditTime: 2024-09-09 13:54:35
|
|
16683
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
|
|
16684
|
-
*
|
|
16685
|
-
*/
|
|
16686
|
-
var interactionRender$2 = [
|
|
16687
|
-
{
|
|
16688
|
-
title: '点击事件',
|
|
16689
|
-
child: [
|
|
16690
|
-
{
|
|
16691
|
-
type: 'link',
|
|
16692
|
-
name: 'onClick',
|
|
16693
|
-
hiddenUrl: true
|
|
16694
|
-
}
|
|
16695
|
-
]
|
|
16696
|
-
},
|
|
16697
|
-
{
|
|
16698
|
-
title: '动画效果',
|
|
16699
|
-
child: [
|
|
16700
|
-
{
|
|
16701
|
-
type: 'Select',
|
|
16702
|
-
name: ['animation', 'name'],
|
|
16703
|
-
label: '动画',
|
|
16704
|
-
options: [
|
|
16705
|
-
{
|
|
16706
|
-
label: '默认',
|
|
16707
|
-
value: 1
|
|
16708
|
-
}
|
|
16709
|
-
],
|
|
16710
|
-
fieldProps: {
|
|
16711
|
-
style: {
|
|
16712
|
-
width: '100%'
|
|
16713
|
-
}
|
|
16714
|
-
}
|
|
16715
|
-
},
|
|
16716
|
-
{
|
|
16717
|
-
type: 'Number',
|
|
16718
|
-
label: '动画启动时间',
|
|
16719
|
-
name: ['animation', 'delay'],
|
|
16720
|
-
addonAfter: 'ms'
|
|
16721
|
-
},
|
|
16722
|
-
{
|
|
16723
|
-
type: 'Number',
|
|
16724
|
-
label: '动画持续时间',
|
|
16725
|
-
name: ['animation', 'duration'],
|
|
16726
|
-
addonAfter: 'ms'
|
|
16727
|
-
}
|
|
16728
|
-
]
|
|
16729
|
-
}
|
|
16730
|
-
];
|
|
16731
|
-
|
|
16732
16759
|
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"};
|
|
16733
16760
|
|
|
16734
16761
|
const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
|
@@ -16801,6 +16828,60 @@ const AniLinkPopup$1 = (_a) => {
|
|
|
16801
16828
|
};
|
|
16802
16829
|
var AniLinkPopupComponent = React.memo(AniLinkPopup$1);
|
|
16803
16830
|
|
|
16831
|
+
/*
|
|
16832
|
+
* @Author: binruan@chatlabs.com
|
|
16833
|
+
* @Date: 2024-07-24 14:58:40
|
|
16834
|
+
* @LastEditors: binruan@chatlabs.com
|
|
16835
|
+
* @LastEditTime: 2024-09-09 13:54:35
|
|
16836
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
|
|
16837
|
+
*
|
|
16838
|
+
*/
|
|
16839
|
+
var interactionRender$2 = [
|
|
16840
|
+
{
|
|
16841
|
+
title: '点击事件',
|
|
16842
|
+
child: [
|
|
16843
|
+
{
|
|
16844
|
+
type: 'link',
|
|
16845
|
+
name: 'onClick',
|
|
16846
|
+
hiddenUrl: true
|
|
16847
|
+
}
|
|
16848
|
+
]
|
|
16849
|
+
},
|
|
16850
|
+
{
|
|
16851
|
+
title: '动画效果',
|
|
16852
|
+
child: [
|
|
16853
|
+
{
|
|
16854
|
+
type: 'Select',
|
|
16855
|
+
name: ['animation', 'name'],
|
|
16856
|
+
label: '动画',
|
|
16857
|
+
options: [
|
|
16858
|
+
{
|
|
16859
|
+
label: '默认',
|
|
16860
|
+
value: 1
|
|
16861
|
+
}
|
|
16862
|
+
],
|
|
16863
|
+
fieldProps: {
|
|
16864
|
+
style: {
|
|
16865
|
+
width: '100%'
|
|
16866
|
+
}
|
|
16867
|
+
}
|
|
16868
|
+
},
|
|
16869
|
+
{
|
|
16870
|
+
type: 'Number',
|
|
16871
|
+
label: '动画启动时间',
|
|
16872
|
+
name: ['animation', 'delay'],
|
|
16873
|
+
addonAfter: 'ms'
|
|
16874
|
+
},
|
|
16875
|
+
{
|
|
16876
|
+
type: 'Number',
|
|
16877
|
+
label: '动画持续时间',
|
|
16878
|
+
name: ['animation', 'duration'],
|
|
16879
|
+
addonAfter: 'ms'
|
|
16880
|
+
}
|
|
16881
|
+
]
|
|
16882
|
+
}
|
|
16883
|
+
];
|
|
16884
|
+
|
|
16804
16885
|
/*
|
|
16805
16886
|
* @Author: binruan@chatlabs.com
|
|
16806
16887
|
* @Date: 2024-07-24 14:58:40
|
|
@@ -16839,6 +16920,7 @@ const AniLinkPopup = createMaterial(AniLinkPopupComponent, {
|
|
|
16839
16920
|
title: {
|
|
16840
16921
|
fontSize: 14,
|
|
16841
16922
|
color: '#000',
|
|
16923
|
+
textAlign: 'left',
|
|
16842
16924
|
lineHeight: 2.6
|
|
16843
16925
|
},
|
|
16844
16926
|
ctaTitle: {
|
|
@@ -17067,7 +17149,7 @@ const Display$1 = (_a) => {
|
|
|
17067
17149
|
React.createElement("span", { style: content === null || content === void 0 ? void 0 : content.style, dangerouslySetInnerHTML: {
|
|
17068
17150
|
__html: setFontForText((_b = content === null || content === void 0 ? void 0 : content.text) === null || _b === void 0 ? void 0 : _b.replace(/\n/g, '</br>'), content === null || content === void 0 ? void 0 : content.style)
|
|
17069
17151
|
} }),
|
|
17070
|
-
React.createElement("span", { style: Object.assign(Object.assign({}, interaction === null || interaction === void 0 ? void 0 : interaction.style), {
|
|
17152
|
+
React.createElement("span", { style: Object.assign(Object.assign({}, interaction === null || interaction === void 0 ? void 0 : interaction.style), { marginLeft: '5px' }), dangerouslySetInnerHTML: {
|
|
17071
17153
|
__html: setFontForText((_c = interaction === null || interaction === void 0 ? void 0 : interaction.text) === null || _c === void 0 ? void 0 : _c.replace(/\n/g, '</br>'), interaction === null || interaction === void 0 ? void 0 : interaction.style)
|
|
17072
17154
|
}, onClick: handleClick })),
|
|
17073
17155
|
isShowClose && (React.createElement("button", { "aria-label": 'close', className: 'consentPopupDisplay-close', onClick: handleClickClose },
|
|
@@ -18767,22 +18849,10 @@ function withBindDataSource(Component) {
|
|
|
18767
18849
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
|
|
18768
18850
|
*
|
|
18769
18851
|
*/
|
|
18770
|
-
const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive, isNineProduct }) => {
|
|
18771
|
-
var _a, _b, _c, _d, _e;
|
|
18852
|
+
const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive, value, isNineProduct }) => {
|
|
18772
18853
|
const { schema } = useEditor();
|
|
18773
18854
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
|
18774
18855
|
return null;
|
|
18775
|
-
let cta = null;
|
|
18776
|
-
if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
|
|
18777
|
-
cta = '多商品CTA';
|
|
18778
|
-
}
|
|
18779
|
-
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
|
18780
|
-
cta = '商品CTA';
|
|
18781
|
-
}
|
|
18782
|
-
else {
|
|
18783
|
-
cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
|
|
18784
|
-
}
|
|
18785
|
-
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
|
18786
18856
|
const renderComp = React.useMemo(() => {
|
|
18787
18857
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
|
|
18788
18858
|
// 如果includesCtaType有值,则只渲染includesCtaType包含的cta类型组件,用于在页面某处只显示某一组件
|
|
@@ -18810,7 +18880,7 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive,
|
|
|
18810
18880
|
const sbf = style.backdropFilter;
|
|
18811
18881
|
style.backdropFilter = `blur(${sbf !== null && sbf !== void 0 ? sbf : 0}px)`;
|
|
18812
18882
|
}
|
|
18813
|
-
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), style), { zIndex: 50,
|
|
18883
|
+
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.textStyle), bindDatas: (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.bindDatas) !== null && _1 !== void 0 ? _1 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.props, { event: ((_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index, isActive: isActive })));
|
|
18814
18884
|
}
|
|
18815
18885
|
else {
|
|
18816
18886
|
return null;
|
|
@@ -18958,6 +19028,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
18958
19028
|
const skipLinkRef = React.useRef(false);
|
|
18959
19029
|
const [pageNum, setPageNum] = React.useState(2);
|
|
18960
19030
|
const videoWidgetRef = React.useRef(null);
|
|
19031
|
+
const fbcRef = React.useRef('');
|
|
18961
19032
|
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, isNoMoreData, channel, refreshFeSession, isDiyH5 } = useSxpDataSource();
|
|
18962
19033
|
const { backMainFeed, productView, jumpToWeb } = useEventReport();
|
|
18963
19034
|
const isShowFingerTip = React.useMemo(() => {
|
|
@@ -19233,17 +19304,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
19233
19304
|
index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 2 : 1) &&
|
|
19234
19305
|
((_f = ['MultiCommodity', 'MultiCommodityDiro', 'MultiCommodityDiroNew']) === null || _f === void 0 ? void 0 : _f.includes((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.type));
|
|
19235
19306
|
return (React.createElement(React.Fragment, null,
|
|
19236
|
-
isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, isNineProduct: isNineProduct })),
|
|
19307
|
+
isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value, isNineProduct: isNineProduct })),
|
|
19237
19308
|
((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
|
|
19238
19309
|
React.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _j !== void 0 ? _j : 40}px` } },
|
|
19239
19310
|
React.createElement(Nudge, { nudge: nudge }),
|
|
19240
19311
|
((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) && !isNineProduct ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
|
19241
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex }))) : null,
|
|
19242
|
-
React.createElement("div",
|
|
19312
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value }))) : null,
|
|
19313
|
+
React.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
|
|
19243
19314
|
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: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.title) !== null && _l !== void 0 ? _l : '', 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 }),
|
|
19244
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex }),
|
|
19315
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }),
|
|
19245
19316
|
React.createElement(Hashtag$1, { index: activeIndex, tags: (_o = (_m = rec === null || rec === void 0 ? void 0 : rec.video) === null || _m === void 0 ? void 0 : _m.hashTags) !== null && _o !== void 0 ? _o : [], itemId: (_p = rec === null || rec === void 0 ? void 0 : rec.video) === null || _p === void 0 ? void 0 : _p.itemId, itemType: ((_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle, hashTagRightMargin: containerWidth - (hashTagRightMargin !== null && hashTagRightMargin !== void 0 ? hashTagRightMargin : 0) }))),
|
|
19246
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
|
19317
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
|
|
19247
19318
|
}
|
|
19248
19319
|
return null;
|
|
19249
19320
|
}, [
|
|
@@ -19401,6 +19472,35 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
19401
19472
|
viewTime.current = new Date();
|
|
19402
19473
|
}
|
|
19403
19474
|
}, [openHashtag, data, activeIndex]);
|
|
19475
|
+
React.useEffect(() => {
|
|
19476
|
+
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting))
|
|
19477
|
+
return;
|
|
19478
|
+
window.OptanonWrapper = function () {
|
|
19479
|
+
var _a, _b;
|
|
19480
|
+
const activeGroups = window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups;
|
|
19481
|
+
if (!activeGroups)
|
|
19482
|
+
return;
|
|
19483
|
+
if (activeGroups === null || activeGroups === void 0 ? void 0 : activeGroups.includes('4')) {
|
|
19484
|
+
if (fbcRef.current) {
|
|
19485
|
+
setCookie('_fbc', fbcRef.current, 90);
|
|
19486
|
+
}
|
|
19487
|
+
}
|
|
19488
|
+
else {
|
|
19489
|
+
fbcRef.current = getCookie('_fbc');
|
|
19490
|
+
deleteCookie('_fbc');
|
|
19491
|
+
const item = data[activeIndex];
|
|
19492
|
+
const traceInfo = ((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.traceInfo) || ((_b = item === null || item === void 0 ? void 0 : item.product) === null || _b === void 0 ? void 0 : _b.traceInfo) || '';
|
|
19493
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
|
19494
|
+
eventInfo: {
|
|
19495
|
+
eventSubject: 'refuseCookie',
|
|
19496
|
+
eventDescription: 'refuseCookie',
|
|
19497
|
+
traceInfo
|
|
19498
|
+
},
|
|
19499
|
+
isActiveTargetingCookie: false
|
|
19500
|
+
});
|
|
19501
|
+
}
|
|
19502
|
+
};
|
|
19503
|
+
}, [globalConfig, bffEventReport, data, activeIndex]);
|
|
19404
19504
|
const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
|
|
19405
19505
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
19406
19506
|
const item = data[activeIndex];
|
|
@@ -19485,68 +19585,71 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
19485
19585
|
isReload,
|
|
19486
19586
|
renderToggleButton
|
|
19487
19587
|
]);
|
|
19488
|
-
return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
|
|
19489
|
-
|
|
19490
|
-
|
|
19491
|
-
|
|
19492
|
-
|
|
19493
|
-
|
|
19494
|
-
|
|
19495
|
-
setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
|
|
19496
|
-
} })),
|
|
19497
|
-
renderLogo,
|
|
19498
|
-
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
|
|
19499
|
-
top: minusHeight
|
|
19500
|
-
} }),
|
|
19501
|
-
((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _f === void 0 ? void 0 : _f.enable) && !channel && !openMultiPosts && !waterFallData && (React.createElement(NavBack$1, { data: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton, minusHeight: minusHeight, tagHeight: tagHeight, onClick: () => history === null || history === void 0 ? void 0 : history.back() })),
|
|
19502
|
-
((((_l = (_k = (_j = (_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.item) === null || _j === void 0 ? void 0 : _j.props) === null || _k === void 0 ? void 0 : _k.backButton) === null || _l === void 0 ? void 0 : _l.enable) && channel) || openMultiPosts) &&
|
|
19503
|
-
!waterFallData && (React.createElement(NavBack$1, { data: (_q = (_p = (_o = (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.item) === null || _p === void 0 ? void 0 : _p.props) === null || _q === void 0 ? void 0 : _q.backButton, minusHeight: minusHeight, tagHeight: tagHeight, onClick: () => {
|
|
19504
|
-
var _a, _b;
|
|
19505
|
-
const item = visList === null || visList === void 0 ? void 0 : visList[activeIndex];
|
|
19506
|
-
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
|
19507
|
-
eventInfo: {
|
|
19508
|
-
eventSubject: 'backMultiPostClick',
|
|
19509
|
-
eventDescription: 'backMultiPostClick',
|
|
19510
|
-
traceInfo: ((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.traceInfo) || ((_b = item === null || item === void 0 ? void 0 : item.product) === null || _b === void 0 ? void 0 : _b.traceInfo) || ''
|
|
19588
|
+
return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
|
|
19589
|
+
(data === null || data === void 0 ? void 0 : data.length) < 1 && loading ? (React.createElement("div", { style: { height, width: containerWidth, display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
|
19590
|
+
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { style: Object.assign({}, ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.textUnderlineOffset) && { textUnderlineOffset: `${globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.textUnderlineOffset}px` })) },
|
|
19591
|
+
waterFallData && (React.createElement(Navbar$1, { icon: img, styles: { background: 'rgba(0,0,0,.3)', color: '#fff', top: `${minusHeight}px` }, textStyle: Object.assign(Object.assign({}, (_e = (_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagTitle), { color: '#fff' }), onClose: () => {
|
|
19592
|
+
const isEq = lodash.isEqual(rtcList, cacheRtcList);
|
|
19593
|
+
if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
|
|
19594
|
+
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
|
|
19511
19595
|
}
|
|
19512
|
-
|
|
19513
|
-
|
|
19514
|
-
|
|
19515
|
-
|
|
19516
|
-
|
|
19517
|
-
|
|
19518
|
-
|
|
19519
|
-
|
|
19520
|
-
|
|
19521
|
-
|
|
19522
|
-
|
|
19523
|
-
|
|
19524
|
-
|
|
19525
|
-
|
|
19526
|
-
|
|
19527
|
-
|
|
19528
|
-
|
|
19529
|
-
|
|
19530
|
-
|
|
19531
|
-
|
|
19532
|
-
|
|
19533
|
-
|
|
19534
|
-
|
|
19535
|
-
|
|
19536
|
-
|
|
19537
|
-
|
|
19538
|
-
|
|
19539
|
-
|
|
19540
|
-
|
|
19596
|
+
setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
|
|
19597
|
+
} })),
|
|
19598
|
+
renderLogo,
|
|
19599
|
+
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
|
|
19600
|
+
top: minusHeight
|
|
19601
|
+
} }),
|
|
19602
|
+
((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _f === void 0 ? void 0 : _f.enable) && !channel && !openMultiPosts && !waterFallData && (React.createElement(NavBack$1, { data: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton, minusHeight: minusHeight, tagHeight: tagHeight, onClick: () => history === null || history === void 0 ? void 0 : history.back() })),
|
|
19603
|
+
((((_l = (_k = (_j = (_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.item) === null || _j === void 0 ? void 0 : _j.props) === null || _k === void 0 ? void 0 : _k.backButton) === null || _l === void 0 ? void 0 : _l.enable) && channel) || openMultiPosts) &&
|
|
19604
|
+
!waterFallData && (React.createElement(NavBack$1, { data: (_q = (_p = (_o = (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.item) === null || _p === void 0 ? void 0 : _p.props) === null || _q === void 0 ? void 0 : _q.backButton, minusHeight: minusHeight, tagHeight: tagHeight, onClick: () => {
|
|
19605
|
+
var _a, _b;
|
|
19606
|
+
const item = visList === null || visList === void 0 ? void 0 : visList[activeIndex];
|
|
19607
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
|
19608
|
+
eventInfo: {
|
|
19609
|
+
eventSubject: 'backMultiPostClick',
|
|
19610
|
+
eventDescription: 'backMultiPostClick',
|
|
19611
|
+
traceInfo: ((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.traceInfo) || ((_b = item === null || item === void 0 ? void 0 : item.product) === null || _b === void 0 ? void 0 : _b.traceInfo) || ''
|
|
19612
|
+
}
|
|
19613
|
+
});
|
|
19614
|
+
location === null || location === void 0 ? void 0 : location.reload();
|
|
19615
|
+
} })),
|
|
19616
|
+
isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_r = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _r !== void 0 ? _r : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
|
|
19617
|
+
React.createElement(Swiper, { style: {
|
|
19618
|
+
marginTop: tagHeight
|
|
19619
|
+
}, ref: swiperRef, onSlideChange: () => {
|
|
19620
|
+
swiperRef.current.swiper.allowTouchMove = false;
|
|
19621
|
+
setTimeout(() => {
|
|
19622
|
+
swiperRef.current.swiper.allowTouchMove = true;
|
|
19623
|
+
}, 500);
|
|
19624
|
+
}, onActiveIndexChange: (swiper) => {
|
|
19625
|
+
setActiveIndex(swiper.activeIndex);
|
|
19626
|
+
if (openHashtag)
|
|
19627
|
+
return;
|
|
19628
|
+
// 处理上滑下滑事件
|
|
19629
|
+
handleScrollEvent(swiper);
|
|
19630
|
+
if (waterFallData || isEditor || isDiyH5)
|
|
19631
|
+
return;
|
|
19632
|
+
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
|
|
19633
|
+
if (!isLoadMore) {
|
|
19634
|
+
setIsLoadMore(true);
|
|
19635
|
+
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
|
|
19636
|
+
var _a;
|
|
19637
|
+
setIsLoadMore(false);
|
|
19638
|
+
if (res && ((_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
19639
|
+
setPageNum(pageNum + 1);
|
|
19640
|
+
}
|
|
19641
|
+
});
|
|
19642
|
+
}
|
|
19541
19643
|
}
|
|
19542
|
-
}
|
|
19543
|
-
|
|
19544
|
-
|
|
19545
|
-
|
|
19546
|
-
|
|
19547
|
-
|
|
19548
|
-
|
|
19549
|
-
|
|
19644
|
+
}, direction: 'vertical', height: height },
|
|
19645
|
+
renderView,
|
|
19646
|
+
renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
|
|
19647
|
+
renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))),
|
|
19648
|
+
React.createElement(WaterFall$1, Object.assign({}, (_u = (_t = (_s = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _s === void 0 ? void 0 : _s[0]) === null || _t === void 0 ? void 0 : _t.item) === null || _u === void 0 ? void 0 : _u.props)),
|
|
19649
|
+
React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig }),
|
|
19650
|
+
openMultiPosts && (React.createElement(MultiPosts$2, Object.assign({}, (_x = (_w = (_v = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.item) === null || _x === void 0 ? void 0 : _x.props, (_0 = (_z = (_y = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.item) === null || _0 === void 0 ? void 0 : _0.event, { style: { position: 'fixed', top: 0, left: 0, right: 0 } }))))),
|
|
19651
|
+
(window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting) && (React.createElement("div", { style: { position: 'fixed', bottom: 0, left: 0, right: 0, width: '100%', zIndex: 10, backgroundColor: '#000', fontSize: 0 } },
|
|
19652
|
+
React.createElement("button", { id: 'ot-sdk-btn', className: 'ot-sdk-show-settings', style: { textDecoration: 'underline', width: 'fit-content', border: 'none', lineHeight: '24px', fontSize: '10px', color: '#fff', padding: '0 20px' } }, "Cookie settings")))));
|
|
19550
19653
|
};
|
|
19551
19654
|
var SxpPageRender$1 = React.memo(SxpPageRender);
|
|
19552
19655
|
|
|
@@ -19845,7 +19948,7 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
|
|
|
19845
19948
|
const CTA = (rec, index) => {
|
|
19846
19949
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
|
|
19847
19950
|
return (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
|
19848
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2
|
|
19951
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2 })));
|
|
19849
19952
|
}
|
|
19850
19953
|
return null;
|
|
19851
19954
|
};
|
|
@@ -19858,10 +19961,8 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
|
|
|
19858
19961
|
React.createElement(Nudge, { nudge: nudge }),
|
|
19859
19962
|
CTA(rec, index),
|
|
19860
19963
|
React.createElement("div", null,
|
|
19861
|
-
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) }),
|
|
19862
|
-
|
|
19863
|
-
React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })),
|
|
19864
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2, includesCtaType: ['AniLinkPopup'], isActive: true })));
|
|
19964
|
+
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) })),
|
|
19965
|
+
React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
|
|
19865
19966
|
}
|
|
19866
19967
|
return null;
|
|
19867
19968
|
};
|
|
@@ -20251,10 +20352,21 @@ const DiyStoryPreview = React.forwardRef(({ data = [], globalConfig, tipText, nu
|
|
|
20251
20352
|
return null;
|
|
20252
20353
|
}, [globalConfig]);
|
|
20253
20354
|
const renderBottom = (rec, index) => {
|
|
20254
|
-
var _a, _b, _c, _d;
|
|
20355
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
20255
20356
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
|
20357
|
+
let cta = null;
|
|
20358
|
+
if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
|
|
20359
|
+
cta = '多商品CTA';
|
|
20360
|
+
}
|
|
20361
|
+
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
|
20362
|
+
cta = '商品CTA';
|
|
20363
|
+
}
|
|
20364
|
+
else {
|
|
20365
|
+
cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
|
|
20366
|
+
}
|
|
20367
|
+
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
|
20256
20368
|
return (React.createElement(React.Fragment, null,
|
|
20257
|
-
((
|
|
20369
|
+
((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.title) && (React.createElement("div", { style: {
|
|
20258
20370
|
background: 'repeating-linear-gradient(0deg, rgba(26, 26, 25, 0.7), hsla(0, 0%, 100%, 0))',
|
|
20259
20371
|
height: '130px',
|
|
20260
20372
|
position: 'absolute',
|
|
@@ -20265,7 +20377,7 @@ const DiyStoryPreview = React.forwardRef(({ data = [], globalConfig, tipText, nu
|
|
|
20265
20377
|
pointerEvents
|
|
20266
20378
|
} })),
|
|
20267
20379
|
React.createElement("div", { style: {
|
|
20268
|
-
marginBottom: `${(
|
|
20380
|
+
marginBottom: `${(_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _g !== void 0 ? _g : 40}px`,
|
|
20269
20381
|
zIndex: 999,
|
|
20270
20382
|
position: 'absolute',
|
|
20271
20383
|
bottom: 0,
|
|
@@ -20274,15 +20386,15 @@ const DiyStoryPreview = React.forwardRef(({ data = [], globalConfig, tipText, nu
|
|
|
20274
20386
|
paddingTop: '20px'
|
|
20275
20387
|
} },
|
|
20276
20388
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { style: {} },
|
|
20277
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, isActive: index === activeIndex }))) : null,
|
|
20389
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, isActive: index === activeIndex, value: value }))) : null,
|
|
20278
20390
|
React.createElement("div", null,
|
|
20279
20391
|
React.createElement(ExpandableText$1
|
|
20280
20392
|
// className='clc-sxp-bottom-text'
|
|
20281
20393
|
, {
|
|
20282
20394
|
// className='clc-sxp-bottom-text'
|
|
20283
|
-
isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (
|
|
20284
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLink'], isActive: index === activeIndex }))),
|
|
20285
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
|
20395
|
+
isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_j = (_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.title) !== null && _j !== void 0 ? _j : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none', padding: '0 20px', fontSize: '12px' }) }),
|
|
20396
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }))),
|
|
20397
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
|
|
20286
20398
|
}
|
|
20287
20399
|
return null;
|
|
20288
20400
|
};
|