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.js
CHANGED
|
@@ -276,6 +276,42 @@ function splitUrlParams(urlParams) {
|
|
|
276
276
|
});
|
|
277
277
|
return splitList !== null && splitList !== void 0 ? splitList : [];
|
|
278
278
|
}
|
|
279
|
+
function deleteCookie(name, path = '/', domain = '') {
|
|
280
|
+
// 设置过期时间为过去的时间
|
|
281
|
+
const expiration = 'expires=Thu, 01 Jan 1970 00:00:00 GMT';
|
|
282
|
+
const pathPart = path ? `; path=${path}` : '';
|
|
283
|
+
const domainPart = domain ? `; domain=${domain}` : '';
|
|
284
|
+
// 设置Cookie值为空,过期时间设为过去
|
|
285
|
+
document.cookie = `${name}=; ${expiration}${pathPart}${domainPart}`;
|
|
286
|
+
console.log(`已尝试删除Cookie: ${name}`);
|
|
287
|
+
}
|
|
288
|
+
function setCookie(name, value, days = 0, path = '/', domain = '', secure = false, sameSite = 'Lax') {
|
|
289
|
+
let cookieString = `${encodeURIComponent(name)}=${encodeURIComponent(value)}`;
|
|
290
|
+
// 设置过期时间
|
|
291
|
+
if (days) {
|
|
292
|
+
const date = new Date();
|
|
293
|
+
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
|
|
294
|
+
cookieString += `; expires=${date.toUTCString()}`;
|
|
295
|
+
}
|
|
296
|
+
// 设置路径
|
|
297
|
+
if (path) {
|
|
298
|
+
cookieString += `; path=${path}`;
|
|
299
|
+
}
|
|
300
|
+
// 设置域名
|
|
301
|
+
if (domain) {
|
|
302
|
+
cookieString += `; domain=${domain}`;
|
|
303
|
+
}
|
|
304
|
+
// 设置Secure标志
|
|
305
|
+
if (secure) {
|
|
306
|
+
cookieString += '; secure';
|
|
307
|
+
}
|
|
308
|
+
// 设置SameSite属性
|
|
309
|
+
if (sameSite) {
|
|
310
|
+
cookieString += `; samesite=${sameSite}`;
|
|
311
|
+
}
|
|
312
|
+
// 设置Cookie
|
|
313
|
+
document.cookie = cookieString;
|
|
314
|
+
}
|
|
279
315
|
|
|
280
316
|
function unzip(b64Data) {
|
|
281
317
|
const strData = atob(b64Data);
|
|
@@ -713,6 +749,23 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
713
749
|
var _a;
|
|
714
750
|
return ((_a = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _a === void 0 ? void 0 : _a['x-app-id']) + storeAndLoadFeUserId();
|
|
715
751
|
}, [bffDataSource]);
|
|
752
|
+
const getTargetingCookie = () => {
|
|
753
|
+
var _a;
|
|
754
|
+
function getCookie(name) {
|
|
755
|
+
var _a;
|
|
756
|
+
const value = `; ${document.cookie}`;
|
|
757
|
+
const parts = value.split(`; ${name}=`);
|
|
758
|
+
if (parts.length === 2)
|
|
759
|
+
return (_a = parts.pop()) === null || _a === void 0 ? void 0 : _a.split(';').shift();
|
|
760
|
+
return '';
|
|
761
|
+
}
|
|
762
|
+
decodeURIComponent((_a = getCookie('OptanonConsent')) !== null && _a !== void 0 ? _a : '');
|
|
763
|
+
console.log('OptanonConsent:', window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups);
|
|
764
|
+
if (((window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups) && !(window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups.includes('4')))) {
|
|
765
|
+
return true;
|
|
766
|
+
}
|
|
767
|
+
return false;
|
|
768
|
+
};
|
|
716
769
|
// bff API 请求方法
|
|
717
770
|
const bffFetch = useCallback((path, options, isBota = true) => {
|
|
718
771
|
var _a;
|
|
@@ -739,6 +792,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
739
792
|
}, [bffDataSource, fakeUserId]);
|
|
740
793
|
const bffCollectEvent = useCallback((params) => {
|
|
741
794
|
var _a;
|
|
795
|
+
if (getTargetingCookie())
|
|
796
|
+
return Promise.resolve();
|
|
742
797
|
const body = {
|
|
743
798
|
eventName: params === null || params === void 0 ? void 0 : params.eventName,
|
|
744
799
|
eventSource: params === null || params === void 0 ? void 0 : params.eventSource
|
|
@@ -751,36 +806,39 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
751
806
|
}, false);
|
|
752
807
|
}, [bffFetch, bffDataSource]);
|
|
753
808
|
useEffect(() => {
|
|
754
|
-
if (typeof (window
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
// img.onload = function () {
|
|
765
|
-
// 检查是否是目标 URL
|
|
766
|
-
if (value.includes('https://www.facebook.com/privacy_sandbox/pixel/register/trigger/')) {
|
|
767
|
-
// 解析 URL 参数
|
|
768
|
-
const url = new URL(value);
|
|
769
|
-
const params = Object.fromEntries(url.searchParams.entries());
|
|
770
|
-
bffCollectEvent({
|
|
771
|
-
eventName: params === null || params === void 0 ? void 0 : params.ev,
|
|
772
|
-
eventSource: 'Meta Pixel'
|
|
773
|
-
});
|
|
774
|
-
// }
|
|
775
|
-
}
|
|
776
|
-
},
|
|
777
|
-
get() {
|
|
778
|
-
return originalSrcDescriptor.get.call(this);
|
|
809
|
+
// if (typeof (window as any)?.fbq === 'function') {
|
|
810
|
+
const OriginalImage = window.Image;
|
|
811
|
+
window.Image = function () {
|
|
812
|
+
const img = new OriginalImage();
|
|
813
|
+
// 劫持 src 的 setter
|
|
814
|
+
const originalSrcDescriptor = Object.getOwnPropertyDescriptor(HTMLImageElement.prototype, 'src');
|
|
815
|
+
Object.defineProperty(img, 'src', {
|
|
816
|
+
set(value) {
|
|
817
|
+
if (getTargetingCookie() && (value.includes('https://www.facebook.com/privacy_sandbox/pixel/register/trigger/') || value.includes('https://www.facebook.com/tr'))) {
|
|
818
|
+
return;
|
|
779
819
|
}
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
820
|
+
// 继续正常设置 src
|
|
821
|
+
originalSrcDescriptor.set.call(this, value);
|
|
822
|
+
// img.onload = function () {
|
|
823
|
+
// 检查是否是目标 URL
|
|
824
|
+
if (value.includes('https://www.facebook.com/privacy_sandbox/pixel/register/trigger/')) {
|
|
825
|
+
// 解析 URL 参数
|
|
826
|
+
const url = new URL(value);
|
|
827
|
+
const params = Object.fromEntries(url.searchParams.entries());
|
|
828
|
+
bffCollectEvent({
|
|
829
|
+
eventName: params === null || params === void 0 ? void 0 : params.ev,
|
|
830
|
+
eventSource: 'Meta Pixel'
|
|
831
|
+
});
|
|
832
|
+
// }
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
get() {
|
|
836
|
+
return originalSrcDescriptor.get.call(this);
|
|
837
|
+
}
|
|
838
|
+
});
|
|
839
|
+
return img;
|
|
840
|
+
};
|
|
841
|
+
// }
|
|
784
842
|
}, [bffCollectEvent]);
|
|
785
843
|
useEffect(() => {
|
|
786
844
|
// 类型安全声明
|
|
@@ -794,6 +852,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
794
852
|
// 覆盖方法
|
|
795
853
|
navigatorWithBeacon.sendBeacon = function (url, data) {
|
|
796
854
|
const urlString = url instanceof URL ? url.href : url.toString();
|
|
855
|
+
if (getTargetingCookie() && (urlString.includes('https://tr.snapchat.com/p') || urlString.includes('https://analytics.tiktok.com/api/v2/pixel'))) {
|
|
856
|
+
return true;
|
|
857
|
+
}
|
|
797
858
|
const success = originalSendBeacon(url, data);
|
|
798
859
|
function parseBeaconData(data) {
|
|
799
860
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -865,6 +926,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
865
926
|
return _originalFetch.apply(this, arguments_1);
|
|
866
927
|
}
|
|
867
928
|
try {
|
|
929
|
+
if (getTargetingCookie() && (url.includes('https://www.google-analytics.com/g/collect') || url.includes('https://arms-retcode.aliyuncs.com/r.png'))) {
|
|
930
|
+
return Promise.resolve(new Response(''));
|
|
931
|
+
}
|
|
868
932
|
// 1. 先执行原始请求
|
|
869
933
|
const response = _originalFetch.apply(this, arguments_1);
|
|
870
934
|
// 检查是否是 GA4 收集端点
|
|
@@ -918,6 +982,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
918
982
|
};
|
|
919
983
|
XMLHttpRequest.prototype.send = function (body) {
|
|
920
984
|
var _a;
|
|
985
|
+
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'))) {
|
|
986
|
+
return;
|
|
987
|
+
}
|
|
921
988
|
if (this._url && typeof this._url === 'string' && this._url.includes('https://i.giesswein.com/nb-collector')) {
|
|
922
989
|
if (body && typeof body === 'string') {
|
|
923
990
|
try {
|
|
@@ -1070,10 +1137,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
1070
1137
|
}
|
|
1071
1138
|
return expire;
|
|
1072
1139
|
}, [data]);
|
|
1073
|
-
const bffEventReport = useCallback(({ userInfo, eventInfo, reportLayId = true }) => {
|
|
1140
|
+
const bffEventReport = useCallback(({ userInfo, eventInfo, reportLayId = true, isActiveTargetingCookie = true }) => {
|
|
1074
1141
|
var _a, _b;
|
|
1075
1142
|
// 关闭 BFF 事件上报
|
|
1076
|
-
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
|
1143
|
+
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) || (isActiveTargetingCookie && getTargetingCookie())) {
|
|
1077
1144
|
return;
|
|
1078
1145
|
}
|
|
1079
1146
|
// 用户信息都是公共的
|
|
@@ -1179,7 +1246,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
1179
1246
|
}, [fakeUserId]);
|
|
1180
1247
|
const bffFbReport = useCallback(({ eventName, product }) => {
|
|
1181
1248
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1182
|
-
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
|
1249
|
+
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) || getTargetingCookie()) {
|
|
1183
1250
|
return;
|
|
1184
1251
|
}
|
|
1185
1252
|
let isPushState = false;
|
|
@@ -2617,35 +2684,6 @@ var settingRender$e = [
|
|
|
2617
2684
|
}
|
|
2618
2685
|
];
|
|
2619
2686
|
|
|
2620
|
-
/*
|
|
2621
|
-
* @Author: binruan@chatlabs.com
|
|
2622
|
-
* @Date: 2024-07-09 14:35:10
|
|
2623
|
-
* @LastEditors: binruan@chatlabs.com
|
|
2624
|
-
* @LastEditTime: 2024-07-12 17:53:02
|
|
2625
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\interactionRender.tsx
|
|
2626
|
-
*
|
|
2627
|
-
*/
|
|
2628
|
-
/*
|
|
2629
|
-
* @Author: binruan@chatlabs.com
|
|
2630
|
-
* @Date: 2024-07-05 14:08:41
|
|
2631
|
-
* @LastEditors: binruan@chatlabs.com
|
|
2632
|
-
* @LastEditTime: 2024-07-09 14:34:49
|
|
2633
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
|
|
2634
|
-
*
|
|
2635
|
-
*/
|
|
2636
|
-
var interactionRender$g = [
|
|
2637
|
-
{
|
|
2638
|
-
title: '滑动事件',
|
|
2639
|
-
child: [
|
|
2640
|
-
{
|
|
2641
|
-
type: 'Switch',
|
|
2642
|
-
label: '滑动铺满全屏',
|
|
2643
|
-
name: ['isScrollFullScreen']
|
|
2644
|
-
}
|
|
2645
|
-
]
|
|
2646
|
-
}
|
|
2647
|
-
];
|
|
2648
|
-
|
|
2649
2687
|
/**
|
|
2650
2688
|
* SSR Window 4.0.2
|
|
2651
2689
|
* Better handling for window object in SSR environment
|
|
@@ -10224,7 +10262,7 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
|
|
|
10224
10262
|
return (React.createElement(React.Fragment, null, (item === null || item === void 0 ? void 0 : item.bindCta) ? (React.createElement(SwiperSlide, { className: css({
|
|
10225
10263
|
width: '50px',
|
|
10226
10264
|
height: '50px',
|
|
10227
|
-
|
|
10265
|
+
marginRight: '10px'
|
|
10228
10266
|
}), onClick: () => {
|
|
10229
10267
|
handleClick(item, index);
|
|
10230
10268
|
}, key: index },
|
|
@@ -10823,6 +10861,35 @@ const CommodityDetail$1 = (_a) => {
|
|
|
10823
10861
|
};
|
|
10824
10862
|
var CommodityDetailComponent = memo(CommodityDetail$1);
|
|
10825
10863
|
|
|
10864
|
+
/*
|
|
10865
|
+
* @Author: binruan@chatlabs.com
|
|
10866
|
+
* @Date: 2024-07-09 14:35:10
|
|
10867
|
+
* @LastEditors: binruan@chatlabs.com
|
|
10868
|
+
* @LastEditTime: 2024-07-12 17:53:02
|
|
10869
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\interactionRender.tsx
|
|
10870
|
+
*
|
|
10871
|
+
*/
|
|
10872
|
+
/*
|
|
10873
|
+
* @Author: binruan@chatlabs.com
|
|
10874
|
+
* @Date: 2024-07-05 14:08:41
|
|
10875
|
+
* @LastEditors: binruan@chatlabs.com
|
|
10876
|
+
* @LastEditTime: 2024-07-09 14:34:49
|
|
10877
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
|
|
10878
|
+
*
|
|
10879
|
+
*/
|
|
10880
|
+
var interactionRender$g = [
|
|
10881
|
+
{
|
|
10882
|
+
title: '滑动事件',
|
|
10883
|
+
child: [
|
|
10884
|
+
{
|
|
10885
|
+
type: 'Switch',
|
|
10886
|
+
label: '滑动铺满全屏',
|
|
10887
|
+
name: ['isScrollFullScreen']
|
|
10888
|
+
}
|
|
10889
|
+
]
|
|
10890
|
+
}
|
|
10891
|
+
];
|
|
10892
|
+
|
|
10826
10893
|
/*
|
|
10827
10894
|
* @Author: binruan@chatlabs.com
|
|
10828
10895
|
* @Date: 2023-07-28 18:29:57
|
|
@@ -10869,6 +10936,7 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
|
|
|
10869
10936
|
taxInfo: {
|
|
10870
10937
|
color: '#000',
|
|
10871
10938
|
fontSize: 13,
|
|
10939
|
+
textAlign: 'left',
|
|
10872
10940
|
marginBottom: '10px'
|
|
10873
10941
|
}
|
|
10874
10942
|
},
|
|
@@ -11960,7 +12028,7 @@ var settingRender$b = [
|
|
|
11960
12028
|
type: 'Number',
|
|
11961
12029
|
label: '与右侧边距',
|
|
11962
12030
|
addonAfter: 'px',
|
|
11963
|
-
name: ['props', 'commodityPicture', '
|
|
12031
|
+
name: ['props', 'commodityPicture', 'marginRight']
|
|
11964
12032
|
},
|
|
11965
12033
|
{
|
|
11966
12034
|
label: '居中垂直偏移',
|
|
@@ -12246,11 +12314,12 @@ const CommodityList$1 = (_a) => {
|
|
|
12246
12314
|
React.createElement("button", Object.assign({ role: 'button', "aria-label": item === null || item === void 0 ? void 0 : item.title, tabIndex: 0, className: css({
|
|
12247
12315
|
display: 'flex',
|
|
12248
12316
|
alignItems: 'normal',
|
|
12249
|
-
width: '100%'
|
|
12317
|
+
width: '100%',
|
|
12318
|
+
textAlign: 'left'
|
|
12250
12319
|
}) }, props),
|
|
12251
12320
|
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 }),
|
|
12252
12321
|
React.createElement("div", { style: {
|
|
12253
|
-
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.
|
|
12322
|
+
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)`,
|
|
12254
12323
|
display: 'flex',
|
|
12255
12324
|
flexDirection: 'column',
|
|
12256
12325
|
justifyContent: 'space-between'
|
|
@@ -12331,7 +12400,7 @@ const CommodityList = createMaterial(CommodityListComponent, {
|
|
|
12331
12400
|
commodityPicture: {
|
|
12332
12401
|
width: 100,
|
|
12333
12402
|
height: 100,
|
|
12334
|
-
|
|
12403
|
+
marginRight: 10
|
|
12335
12404
|
},
|
|
12336
12405
|
commodityStyles: {
|
|
12337
12406
|
price: {
|
|
@@ -12577,7 +12646,7 @@ var settingRender$8 = [
|
|
|
12577
12646
|
type: 'Number',
|
|
12578
12647
|
label: '与右侧边距',
|
|
12579
12648
|
addonAfter: 'px',
|
|
12580
|
-
name: ['props', 'ctaTempStyles', 'img', '
|
|
12649
|
+
name: ['props', 'ctaTempStyles', 'img', 'marginRight']
|
|
12581
12650
|
},
|
|
12582
12651
|
{
|
|
12583
12652
|
label: '居中垂直偏移',
|
|
@@ -12838,11 +12907,12 @@ const Commodity = createMaterial(CommodityComponent, {
|
|
|
12838
12907
|
borderRadius: 3,
|
|
12839
12908
|
width: 60,
|
|
12840
12909
|
height: 60,
|
|
12841
|
-
|
|
12910
|
+
marginRight: 8
|
|
12842
12911
|
},
|
|
12843
12912
|
title: {
|
|
12844
12913
|
fontSize: 12,
|
|
12845
|
-
color: '#fff'
|
|
12914
|
+
color: '#fff',
|
|
12915
|
+
textAlign: 'left'
|
|
12846
12916
|
},
|
|
12847
12917
|
ctaTitle: {
|
|
12848
12918
|
fontSize: 10,
|
|
@@ -12920,11 +12990,12 @@ const Appoint = createMaterial(AppointComponent, {
|
|
|
12920
12990
|
borderRadius: 3,
|
|
12921
12991
|
width: 30,
|
|
12922
12992
|
height: 30,
|
|
12923
|
-
|
|
12993
|
+
marginRight: 8
|
|
12924
12994
|
},
|
|
12925
12995
|
ctaTitle: {
|
|
12926
12996
|
fontSize: 12,
|
|
12927
12997
|
color: '#fff',
|
|
12998
|
+
textAlign: 'left',
|
|
12928
12999
|
width: 130,
|
|
12929
13000
|
height: 20
|
|
12930
13001
|
}
|
|
@@ -13060,27 +13131,6 @@ var linkSettingRender = [
|
|
|
13060
13131
|
}
|
|
13061
13132
|
];
|
|
13062
13133
|
|
|
13063
|
-
/*
|
|
13064
|
-
* @Author: binruan@chatlabs.com
|
|
13065
|
-
* @Date: 2024-08-09 16:59:38
|
|
13066
|
-
* @LastEditors: binruan@chatlabs.com
|
|
13067
|
-
* @LastEditTime: 2024-09-09 13:59:50
|
|
13068
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
|
|
13069
|
-
*
|
|
13070
|
-
*/
|
|
13071
|
-
var interactionRender$a = [
|
|
13072
|
-
{
|
|
13073
|
-
title: '点击事件',
|
|
13074
|
-
child: [
|
|
13075
|
-
{
|
|
13076
|
-
type: 'link',
|
|
13077
|
-
name: 'onClick',
|
|
13078
|
-
hiddenUrl: true
|
|
13079
|
-
}
|
|
13080
|
-
]
|
|
13081
|
-
}
|
|
13082
|
-
];
|
|
13083
|
-
|
|
13084
13134
|
var styles$8 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one-line-ellipsis":"index-module_one-line-ellipsis__buFw1"};
|
|
13085
13135
|
|
|
13086
13136
|
const Link$1 = (_a) => {
|
|
@@ -13108,6 +13158,27 @@ const Link$1 = (_a) => {
|
|
|
13108
13158
|
};
|
|
13109
13159
|
var LinkComponent = memo(Link$1);
|
|
13110
13160
|
|
|
13161
|
+
/*
|
|
13162
|
+
* @Author: binruan@chatlabs.com
|
|
13163
|
+
* @Date: 2024-08-09 16:59:38
|
|
13164
|
+
* @LastEditors: binruan@chatlabs.com
|
|
13165
|
+
* @LastEditTime: 2024-09-09 13:59:50
|
|
13166
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
|
|
13167
|
+
*
|
|
13168
|
+
*/
|
|
13169
|
+
var interactionRender$a = [
|
|
13170
|
+
{
|
|
13171
|
+
title: '点击事件',
|
|
13172
|
+
child: [
|
|
13173
|
+
{
|
|
13174
|
+
type: 'link',
|
|
13175
|
+
name: 'onClick',
|
|
13176
|
+
hiddenUrl: true
|
|
13177
|
+
}
|
|
13178
|
+
]
|
|
13179
|
+
}
|
|
13180
|
+
];
|
|
13181
|
+
|
|
13111
13182
|
var _a;
|
|
13112
13183
|
const Link = createMaterial(LinkComponent, {
|
|
13113
13184
|
displayName: '普通CTA',
|
|
@@ -13126,17 +13197,19 @@ const Link = createMaterial(LinkComponent, {
|
|
|
13126
13197
|
borderRadius: 3,
|
|
13127
13198
|
width: 60,
|
|
13128
13199
|
height: 60,
|
|
13129
|
-
|
|
13200
|
+
marginRight: 8
|
|
13130
13201
|
},
|
|
13131
13202
|
ctaTitle: {
|
|
13132
13203
|
fontSize: 12,
|
|
13133
13204
|
color: '#fff',
|
|
13205
|
+
textAlign: 'left',
|
|
13134
13206
|
width: 130,
|
|
13135
13207
|
height: 20
|
|
13136
13208
|
}
|
|
13137
13209
|
},
|
|
13138
13210
|
customTitle: {
|
|
13139
13211
|
style: {
|
|
13212
|
+
textAlign: 'left',
|
|
13140
13213
|
textDecoration: 'underline',
|
|
13141
13214
|
fontWeight: 'bold',
|
|
13142
13215
|
width: 130,
|
|
@@ -13226,11 +13299,12 @@ const CommodityDiro = createMaterial(CommodityDiroComponent, {
|
|
|
13226
13299
|
borderRadius: 3,
|
|
13227
13300
|
width: 60,
|
|
13228
13301
|
height: 60,
|
|
13229
|
-
|
|
13302
|
+
marginRight: 8
|
|
13230
13303
|
},
|
|
13231
13304
|
title: {
|
|
13232
13305
|
fontSize: 12,
|
|
13233
|
-
color: '#000'
|
|
13306
|
+
color: '#000',
|
|
13307
|
+
textAlign: 'left'
|
|
13234
13308
|
},
|
|
13235
13309
|
ctaTitle: {
|
|
13236
13310
|
fontSize: 10,
|
|
@@ -13321,17 +13395,19 @@ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
|
|
|
13321
13395
|
borderRadius: 8,
|
|
13322
13396
|
width: 78,
|
|
13323
13397
|
height: 78,
|
|
13324
|
-
|
|
13398
|
+
marginRight: 16
|
|
13325
13399
|
},
|
|
13326
13400
|
title: {
|
|
13327
13401
|
fontSize: 13,
|
|
13328
|
-
color: '#000'
|
|
13402
|
+
color: '#000',
|
|
13403
|
+
textAlign: 'left'
|
|
13329
13404
|
},
|
|
13330
13405
|
ctaTitle: {
|
|
13331
13406
|
textDecoration: 'underline',
|
|
13332
13407
|
fontSize: 14,
|
|
13333
13408
|
fontWeight: 'bold',
|
|
13334
13409
|
color: '#000',
|
|
13410
|
+
textAlign: 'left',
|
|
13335
13411
|
width: 150,
|
|
13336
13412
|
height: 20
|
|
13337
13413
|
}
|
|
@@ -13373,7 +13449,7 @@ const MultiCommodityDiro$1 = (_a) => {
|
|
|
13373
13449
|
const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
|
13374
13450
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
|
13375
13451
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
13376
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0,
|
|
13452
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
|
13377
13453
|
React.createElement(EventProvider$1, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
|
|
13378
13454
|
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 }),
|
|
13379
13455
|
React.createElement("div", { className: css({
|
|
@@ -13419,11 +13495,12 @@ const MultiCommodityDiro = createMaterial(MultiCommodityDiroComponent, {
|
|
|
13419
13495
|
borderRadius: 3,
|
|
13420
13496
|
width: 60,
|
|
13421
13497
|
height: 60,
|
|
13422
|
-
|
|
13498
|
+
marginRight: 8
|
|
13423
13499
|
},
|
|
13424
13500
|
title: {
|
|
13425
13501
|
fontSize: 12,
|
|
13426
|
-
color: '#000'
|
|
13502
|
+
color: '#000',
|
|
13503
|
+
textAlign: 'left'
|
|
13427
13504
|
},
|
|
13428
13505
|
ctaTitle: {
|
|
13429
13506
|
fontSize: 10,
|
|
@@ -13471,7 +13548,7 @@ const MultiCommodity$1 = (_a) => {
|
|
|
13471
13548
|
const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
|
13472
13549
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
|
13473
13550
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
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(Object.assign(Object.assign({}, style), { flexShrink: 0,
|
|
13551
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
|
13475
13552
|
React.createElement(EventProvider$1, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
|
|
13476
13553
|
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 }),
|
|
13477
13554
|
React.createElement("div", { className: css({
|
|
@@ -13517,11 +13594,12 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
|
|
|
13517
13594
|
borderRadius: 3,
|
|
13518
13595
|
width: 60,
|
|
13519
13596
|
height: 60,
|
|
13520
|
-
|
|
13597
|
+
marginRight: 8
|
|
13521
13598
|
},
|
|
13522
13599
|
title: {
|
|
13523
13600
|
fontSize: 12,
|
|
13524
13601
|
color: '#fff',
|
|
13602
|
+
textAlign: 'left'
|
|
13525
13603
|
},
|
|
13526
13604
|
ctaTitle: {
|
|
13527
13605
|
fontSize: 10,
|
|
@@ -13577,7 +13655,7 @@ const MultiCommodityDiroNew$1 = (_a) => {
|
|
|
13577
13655
|
const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
|
13578
13656
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
|
13579
13657
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
13580
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0,
|
|
13658
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
|
13581
13659
|
React.createElement(EventProvider$1, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
|
|
13582
13660
|
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 }),
|
|
13583
13661
|
React.createElement("div", { className: css({
|
|
@@ -13624,17 +13702,19 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
|
|
|
13624
13702
|
borderRadius: 8,
|
|
13625
13703
|
width: 78,
|
|
13626
13704
|
height: 78,
|
|
13627
|
-
|
|
13705
|
+
marginRight: 16
|
|
13628
13706
|
},
|
|
13629
13707
|
title: {
|
|
13630
13708
|
fontSize: 12,
|
|
13631
|
-
color: '#000'
|
|
13709
|
+
color: '#000',
|
|
13710
|
+
textAlign: 'left'
|
|
13632
13711
|
},
|
|
13633
13712
|
ctaTitle: {
|
|
13634
13713
|
textDecoration: 'underline',
|
|
13635
13714
|
fontSize: 12,
|
|
13636
13715
|
fontWeight: 'bold',
|
|
13637
13716
|
color: '#000',
|
|
13717
|
+
textAlign: 'left',
|
|
13638
13718
|
width: 150,
|
|
13639
13719
|
height: 20
|
|
13640
13720
|
}
|
|
@@ -13729,11 +13809,12 @@ const NineCommodity = createMaterial(NineCommodityComponent, {
|
|
|
13729
13809
|
borderRadius: 3,
|
|
13730
13810
|
width: 60,
|
|
13731
13811
|
height: 60,
|
|
13732
|
-
|
|
13812
|
+
marginRight: 8
|
|
13733
13813
|
},
|
|
13734
13814
|
title: {
|
|
13735
13815
|
fontSize: 12,
|
|
13736
|
-
color: '#fff'
|
|
13816
|
+
color: '#fff',
|
|
13817
|
+
textAlign: 'left'
|
|
13737
13818
|
},
|
|
13738
13819
|
ctaTitle: {
|
|
13739
13820
|
fontSize: 10,
|
|
@@ -16653,60 +16734,6 @@ var settingRender$4 = [
|
|
|
16653
16734
|
}
|
|
16654
16735
|
];
|
|
16655
16736
|
|
|
16656
|
-
/*
|
|
16657
|
-
* @Author: binruan@chatlabs.com
|
|
16658
|
-
* @Date: 2024-07-24 14:58:40
|
|
16659
|
-
* @LastEditors: binruan@chatlabs.com
|
|
16660
|
-
* @LastEditTime: 2024-09-09 13:54:35
|
|
16661
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
|
|
16662
|
-
*
|
|
16663
|
-
*/
|
|
16664
|
-
var interactionRender$2 = [
|
|
16665
|
-
{
|
|
16666
|
-
title: '点击事件',
|
|
16667
|
-
child: [
|
|
16668
|
-
{
|
|
16669
|
-
type: 'link',
|
|
16670
|
-
name: 'onClick',
|
|
16671
|
-
hiddenUrl: true
|
|
16672
|
-
}
|
|
16673
|
-
]
|
|
16674
|
-
},
|
|
16675
|
-
{
|
|
16676
|
-
title: '动画效果',
|
|
16677
|
-
child: [
|
|
16678
|
-
{
|
|
16679
|
-
type: 'Select',
|
|
16680
|
-
name: ['animation', 'name'],
|
|
16681
|
-
label: '动画',
|
|
16682
|
-
options: [
|
|
16683
|
-
{
|
|
16684
|
-
label: '默认',
|
|
16685
|
-
value: 1
|
|
16686
|
-
}
|
|
16687
|
-
],
|
|
16688
|
-
fieldProps: {
|
|
16689
|
-
style: {
|
|
16690
|
-
width: '100%'
|
|
16691
|
-
}
|
|
16692
|
-
}
|
|
16693
|
-
},
|
|
16694
|
-
{
|
|
16695
|
-
type: 'Number',
|
|
16696
|
-
label: '动画启动时间',
|
|
16697
|
-
name: ['animation', 'delay'],
|
|
16698
|
-
addonAfter: 'ms'
|
|
16699
|
-
},
|
|
16700
|
-
{
|
|
16701
|
-
type: 'Number',
|
|
16702
|
-
label: '动画持续时间',
|
|
16703
|
-
name: ['animation', 'duration'],
|
|
16704
|
-
addonAfter: 'ms'
|
|
16705
|
-
}
|
|
16706
|
-
]
|
|
16707
|
-
}
|
|
16708
|
-
];
|
|
16709
|
-
|
|
16710
16737
|
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"};
|
|
16711
16738
|
|
|
16712
16739
|
const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
|
@@ -16779,6 +16806,60 @@ const AniLinkPopup$1 = (_a) => {
|
|
|
16779
16806
|
};
|
|
16780
16807
|
var AniLinkPopupComponent = memo(AniLinkPopup$1);
|
|
16781
16808
|
|
|
16809
|
+
/*
|
|
16810
|
+
* @Author: binruan@chatlabs.com
|
|
16811
|
+
* @Date: 2024-07-24 14:58:40
|
|
16812
|
+
* @LastEditors: binruan@chatlabs.com
|
|
16813
|
+
* @LastEditTime: 2024-09-09 13:54:35
|
|
16814
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
|
|
16815
|
+
*
|
|
16816
|
+
*/
|
|
16817
|
+
var interactionRender$2 = [
|
|
16818
|
+
{
|
|
16819
|
+
title: '点击事件',
|
|
16820
|
+
child: [
|
|
16821
|
+
{
|
|
16822
|
+
type: 'link',
|
|
16823
|
+
name: 'onClick',
|
|
16824
|
+
hiddenUrl: true
|
|
16825
|
+
}
|
|
16826
|
+
]
|
|
16827
|
+
},
|
|
16828
|
+
{
|
|
16829
|
+
title: '动画效果',
|
|
16830
|
+
child: [
|
|
16831
|
+
{
|
|
16832
|
+
type: 'Select',
|
|
16833
|
+
name: ['animation', 'name'],
|
|
16834
|
+
label: '动画',
|
|
16835
|
+
options: [
|
|
16836
|
+
{
|
|
16837
|
+
label: '默认',
|
|
16838
|
+
value: 1
|
|
16839
|
+
}
|
|
16840
|
+
],
|
|
16841
|
+
fieldProps: {
|
|
16842
|
+
style: {
|
|
16843
|
+
width: '100%'
|
|
16844
|
+
}
|
|
16845
|
+
}
|
|
16846
|
+
},
|
|
16847
|
+
{
|
|
16848
|
+
type: 'Number',
|
|
16849
|
+
label: '动画启动时间',
|
|
16850
|
+
name: ['animation', 'delay'],
|
|
16851
|
+
addonAfter: 'ms'
|
|
16852
|
+
},
|
|
16853
|
+
{
|
|
16854
|
+
type: 'Number',
|
|
16855
|
+
label: '动画持续时间',
|
|
16856
|
+
name: ['animation', 'duration'],
|
|
16857
|
+
addonAfter: 'ms'
|
|
16858
|
+
}
|
|
16859
|
+
]
|
|
16860
|
+
}
|
|
16861
|
+
];
|
|
16862
|
+
|
|
16782
16863
|
/*
|
|
16783
16864
|
* @Author: binruan@chatlabs.com
|
|
16784
16865
|
* @Date: 2024-07-24 14:58:40
|
|
@@ -16817,6 +16898,7 @@ const AniLinkPopup = createMaterial(AniLinkPopupComponent, {
|
|
|
16817
16898
|
title: {
|
|
16818
16899
|
fontSize: 14,
|
|
16819
16900
|
color: '#000',
|
|
16901
|
+
textAlign: 'left',
|
|
16820
16902
|
lineHeight: 2.6
|
|
16821
16903
|
},
|
|
16822
16904
|
ctaTitle: {
|
|
@@ -17045,7 +17127,7 @@ const Display$1 = (_a) => {
|
|
|
17045
17127
|
React.createElement("span", { style: content === null || content === void 0 ? void 0 : content.style, dangerouslySetInnerHTML: {
|
|
17046
17128
|
__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)
|
|
17047
17129
|
} }),
|
|
17048
|
-
React.createElement("span", { style: Object.assign(Object.assign({}, interaction === null || interaction === void 0 ? void 0 : interaction.style), {
|
|
17130
|
+
React.createElement("span", { style: Object.assign(Object.assign({}, interaction === null || interaction === void 0 ? void 0 : interaction.style), { marginLeft: '5px' }), dangerouslySetInnerHTML: {
|
|
17049
17131
|
__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)
|
|
17050
17132
|
}, onClick: handleClick })),
|
|
17051
17133
|
isShowClose && (React.createElement("button", { "aria-label": 'close', className: 'consentPopupDisplay-close', onClick: handleClickClose },
|
|
@@ -18745,22 +18827,10 @@ function withBindDataSource(Component) {
|
|
|
18745
18827
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
|
|
18746
18828
|
*
|
|
18747
18829
|
*/
|
|
18748
|
-
const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive, isNineProduct }) => {
|
|
18749
|
-
var _a, _b, _c, _d, _e;
|
|
18830
|
+
const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive, value, isNineProduct }) => {
|
|
18750
18831
|
const { schema } = useEditor();
|
|
18751
18832
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
|
18752
18833
|
return null;
|
|
18753
|
-
let cta = null;
|
|
18754
|
-
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) {
|
|
18755
|
-
cta = '多商品CTA';
|
|
18756
|
-
}
|
|
18757
|
-
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
|
18758
|
-
cta = '商品CTA';
|
|
18759
|
-
}
|
|
18760
|
-
else {
|
|
18761
|
-
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;
|
|
18762
|
-
}
|
|
18763
|
-
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
|
18764
18834
|
const renderComp = useMemo(() => {
|
|
18765
18835
|
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;
|
|
18766
18836
|
// 如果includesCtaType有值,则只渲染includesCtaType包含的cta类型组件,用于在页面某处只显示某一组件
|
|
@@ -18788,7 +18858,7 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive,
|
|
|
18788
18858
|
const sbf = style.backdropFilter;
|
|
18789
18859
|
style.backdropFilter = `blur(${sbf !== null && sbf !== void 0 ? sbf : 0}px)`;
|
|
18790
18860
|
}
|
|
18791
|
-
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,
|
|
18861
|
+
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 })));
|
|
18792
18862
|
}
|
|
18793
18863
|
else {
|
|
18794
18864
|
return null;
|
|
@@ -18936,6 +19006,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
18936
19006
|
const skipLinkRef = useRef(false);
|
|
18937
19007
|
const [pageNum, setPageNum] = useState(2);
|
|
18938
19008
|
const videoWidgetRef = useRef(null);
|
|
19009
|
+
const fbcRef = useRef('');
|
|
18939
19010
|
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();
|
|
18940
19011
|
const { backMainFeed, productView, jumpToWeb } = useEventReport();
|
|
18941
19012
|
const isShowFingerTip = useMemo(() => {
|
|
@@ -19211,17 +19282,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
19211
19282
|
index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 2 : 1) &&
|
|
19212
19283
|
((_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));
|
|
19213
19284
|
return (React.createElement(React.Fragment, null,
|
|
19214
|
-
isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, isNineProduct: isNineProduct })),
|
|
19285
|
+
isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value, isNineProduct: isNineProduct })),
|
|
19215
19286
|
((_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' }),
|
|
19216
19287
|
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` } },
|
|
19217
19288
|
React.createElement(Nudge, { nudge: nudge }),
|
|
19218
19289
|
((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' },
|
|
19219
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex }))) : null,
|
|
19220
|
-
React.createElement("div",
|
|
19290
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value }))) : null,
|
|
19291
|
+
React.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
|
|
19221
19292
|
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 }),
|
|
19222
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex }),
|
|
19293
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }),
|
|
19223
19294
|
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) }))),
|
|
19224
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
|
19295
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
|
|
19225
19296
|
}
|
|
19226
19297
|
return null;
|
|
19227
19298
|
}, [
|
|
@@ -19379,6 +19450,35 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
19379
19450
|
viewTime.current = new Date();
|
|
19380
19451
|
}
|
|
19381
19452
|
}, [openHashtag, data, activeIndex]);
|
|
19453
|
+
useEffect(() => {
|
|
19454
|
+
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting))
|
|
19455
|
+
return;
|
|
19456
|
+
window.OptanonWrapper = function () {
|
|
19457
|
+
var _a, _b;
|
|
19458
|
+
const activeGroups = window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups;
|
|
19459
|
+
if (!activeGroups)
|
|
19460
|
+
return;
|
|
19461
|
+
if (activeGroups === null || activeGroups === void 0 ? void 0 : activeGroups.includes('4')) {
|
|
19462
|
+
if (fbcRef.current) {
|
|
19463
|
+
setCookie('_fbc', fbcRef.current, 90);
|
|
19464
|
+
}
|
|
19465
|
+
}
|
|
19466
|
+
else {
|
|
19467
|
+
fbcRef.current = getCookie('_fbc');
|
|
19468
|
+
deleteCookie('_fbc');
|
|
19469
|
+
const item = data[activeIndex];
|
|
19470
|
+
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) || '';
|
|
19471
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
|
19472
|
+
eventInfo: {
|
|
19473
|
+
eventSubject: 'refuseCookie',
|
|
19474
|
+
eventDescription: 'refuseCookie',
|
|
19475
|
+
traceInfo
|
|
19476
|
+
},
|
|
19477
|
+
isActiveTargetingCookie: false
|
|
19478
|
+
});
|
|
19479
|
+
}
|
|
19480
|
+
};
|
|
19481
|
+
}, [globalConfig, bffEventReport, data, activeIndex]);
|
|
19382
19482
|
const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
|
|
19383
19483
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
19384
19484
|
const item = data[activeIndex];
|
|
@@ -19463,68 +19563,71 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
19463
19563
|
isReload,
|
|
19464
19564
|
renderToggleButton
|
|
19465
19565
|
]);
|
|
19466
|
-
return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
|
|
19467
|
-
|
|
19468
|
-
|
|
19469
|
-
|
|
19470
|
-
|
|
19471
|
-
|
|
19472
|
-
|
|
19473
|
-
setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
|
|
19474
|
-
} })),
|
|
19475
|
-
renderLogo,
|
|
19476
|
-
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
|
|
19477
|
-
top: minusHeight
|
|
19478
|
-
} }),
|
|
19479
|
-
((_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() })),
|
|
19480
|
-
((((_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) &&
|
|
19481
|
-
!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: () => {
|
|
19482
|
-
var _a, _b;
|
|
19483
|
-
const item = visList === null || visList === void 0 ? void 0 : visList[activeIndex];
|
|
19484
|
-
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
|
19485
|
-
eventInfo: {
|
|
19486
|
-
eventSubject: 'backMultiPostClick',
|
|
19487
|
-
eventDescription: 'backMultiPostClick',
|
|
19488
|
-
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) || ''
|
|
19566
|
+
return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
|
|
19567
|
+
(data === null || data === void 0 ? void 0 : data.length) < 1 && loading ? (React.createElement("div", { style: { height, width: containerWidth, display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
|
19568
|
+
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` })) },
|
|
19569
|
+
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: () => {
|
|
19570
|
+
const isEq = isEqual(rtcList, cacheRtcList);
|
|
19571
|
+
if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
|
|
19572
|
+
setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
|
|
19489
19573
|
}
|
|
19490
|
-
|
|
19491
|
-
|
|
19492
|
-
|
|
19493
|
-
|
|
19494
|
-
|
|
19495
|
-
|
|
19496
|
-
|
|
19497
|
-
|
|
19498
|
-
|
|
19499
|
-
|
|
19500
|
-
|
|
19501
|
-
|
|
19502
|
-
|
|
19503
|
-
|
|
19504
|
-
|
|
19505
|
-
|
|
19506
|
-
|
|
19507
|
-
|
|
19508
|
-
|
|
19509
|
-
|
|
19510
|
-
|
|
19511
|
-
|
|
19512
|
-
|
|
19513
|
-
|
|
19514
|
-
|
|
19515
|
-
|
|
19516
|
-
|
|
19517
|
-
|
|
19518
|
-
|
|
19574
|
+
setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
|
|
19575
|
+
} })),
|
|
19576
|
+
renderLogo,
|
|
19577
|
+
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
|
|
19578
|
+
top: minusHeight
|
|
19579
|
+
} }),
|
|
19580
|
+
((_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() })),
|
|
19581
|
+
((((_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) &&
|
|
19582
|
+
!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: () => {
|
|
19583
|
+
var _a, _b;
|
|
19584
|
+
const item = visList === null || visList === void 0 ? void 0 : visList[activeIndex];
|
|
19585
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
|
19586
|
+
eventInfo: {
|
|
19587
|
+
eventSubject: 'backMultiPostClick',
|
|
19588
|
+
eventDescription: 'backMultiPostClick',
|
|
19589
|
+
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) || ''
|
|
19590
|
+
}
|
|
19591
|
+
});
|
|
19592
|
+
location === null || location === void 0 ? void 0 : location.reload();
|
|
19593
|
+
} })),
|
|
19594
|
+
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,
|
|
19595
|
+
React.createElement(Swiper, { style: {
|
|
19596
|
+
marginTop: tagHeight
|
|
19597
|
+
}, ref: swiperRef, onSlideChange: () => {
|
|
19598
|
+
swiperRef.current.swiper.allowTouchMove = false;
|
|
19599
|
+
setTimeout(() => {
|
|
19600
|
+
swiperRef.current.swiper.allowTouchMove = true;
|
|
19601
|
+
}, 500);
|
|
19602
|
+
}, onActiveIndexChange: (swiper) => {
|
|
19603
|
+
setActiveIndex(swiper.activeIndex);
|
|
19604
|
+
if (openHashtag)
|
|
19605
|
+
return;
|
|
19606
|
+
// 处理上滑下滑事件
|
|
19607
|
+
handleScrollEvent(swiper);
|
|
19608
|
+
if (waterFallData || isEditor || isDiyH5)
|
|
19609
|
+
return;
|
|
19610
|
+
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
|
|
19611
|
+
if (!isLoadMore) {
|
|
19612
|
+
setIsLoadMore(true);
|
|
19613
|
+
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
|
|
19614
|
+
var _a;
|
|
19615
|
+
setIsLoadMore(false);
|
|
19616
|
+
if (res && ((_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
19617
|
+
setPageNum(pageNum + 1);
|
|
19618
|
+
}
|
|
19619
|
+
});
|
|
19620
|
+
}
|
|
19519
19621
|
}
|
|
19520
|
-
}
|
|
19521
|
-
|
|
19522
|
-
|
|
19523
|
-
|
|
19524
|
-
|
|
19525
|
-
|
|
19526
|
-
|
|
19527
|
-
|
|
19622
|
+
}, direction: 'vertical', height: height },
|
|
19623
|
+
renderView,
|
|
19624
|
+
renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
|
|
19625
|
+
renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))),
|
|
19626
|
+
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)),
|
|
19627
|
+
React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig }),
|
|
19628
|
+
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 } }))))),
|
|
19629
|
+
(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 } },
|
|
19630
|
+
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")))));
|
|
19528
19631
|
};
|
|
19529
19632
|
var SxpPageRender$1 = memo(SxpPageRender);
|
|
19530
19633
|
|
|
@@ -19823,7 +19926,7 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
|
|
|
19823
19926
|
const CTA = (rec, index) => {
|
|
19824
19927
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
|
|
19825
19928
|
return (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
|
19826
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2
|
|
19929
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2 })));
|
|
19827
19930
|
}
|
|
19828
19931
|
return null;
|
|
19829
19932
|
};
|
|
@@ -19836,10 +19939,8 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
|
|
|
19836
19939
|
React.createElement(Nudge, { nudge: nudge }),
|
|
19837
19940
|
CTA(rec, index),
|
|
19838
19941
|
React.createElement("div", null,
|
|
19839
|
-
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' }) }),
|
|
19840
|
-
|
|
19841
|
-
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 })),
|
|
19842
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2, includesCtaType: ['AniLinkPopup'], isActive: true })));
|
|
19942
|
+
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' }) })),
|
|
19943
|
+
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 }))));
|
|
19843
19944
|
}
|
|
19844
19945
|
return null;
|
|
19845
19946
|
};
|
|
@@ -20229,10 +20330,21 @@ const DiyStoryPreview = forwardRef(({ data = [], globalConfig, tipText, nudge, t
|
|
|
20229
20330
|
return null;
|
|
20230
20331
|
}, [globalConfig]);
|
|
20231
20332
|
const renderBottom = (rec, index) => {
|
|
20232
|
-
var _a, _b, _c, _d;
|
|
20333
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
20233
20334
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
|
20335
|
+
let cta = null;
|
|
20336
|
+
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) {
|
|
20337
|
+
cta = '多商品CTA';
|
|
20338
|
+
}
|
|
20339
|
+
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
|
20340
|
+
cta = '商品CTA';
|
|
20341
|
+
}
|
|
20342
|
+
else {
|
|
20343
|
+
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;
|
|
20344
|
+
}
|
|
20345
|
+
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
|
20234
20346
|
return (React.createElement(React.Fragment, null,
|
|
20235
|
-
((
|
|
20347
|
+
((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.title) && (React.createElement("div", { style: {
|
|
20236
20348
|
background: 'repeating-linear-gradient(0deg, rgba(26, 26, 25, 0.7), hsla(0, 0%, 100%, 0))',
|
|
20237
20349
|
height: '130px',
|
|
20238
20350
|
position: 'absolute',
|
|
@@ -20243,7 +20355,7 @@ const DiyStoryPreview = forwardRef(({ data = [], globalConfig, tipText, nudge, t
|
|
|
20243
20355
|
pointerEvents
|
|
20244
20356
|
} })),
|
|
20245
20357
|
React.createElement("div", { style: {
|
|
20246
|
-
marginBottom: `${(
|
|
20358
|
+
marginBottom: `${(_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _g !== void 0 ? _g : 40}px`,
|
|
20247
20359
|
zIndex: 999,
|
|
20248
20360
|
position: 'absolute',
|
|
20249
20361
|
bottom: 0,
|
|
@@ -20252,15 +20364,15 @@ const DiyStoryPreview = forwardRef(({ data = [], globalConfig, tipText, nudge, t
|
|
|
20252
20364
|
paddingTop: '20px'
|
|
20253
20365
|
} },
|
|
20254
20366
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { style: {} },
|
|
20255
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, isActive: index === activeIndex }))) : null,
|
|
20367
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, isActive: index === activeIndex, value: value }))) : null,
|
|
20256
20368
|
React.createElement("div", null,
|
|
20257
20369
|
React.createElement(ExpandableText$1
|
|
20258
20370
|
// className='clc-sxp-bottom-text'
|
|
20259
20371
|
, {
|
|
20260
20372
|
// className='clc-sxp-bottom-text'
|
|
20261
|
-
isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (
|
|
20262
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLink'], isActive: index === activeIndex }))),
|
|
20263
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
|
20373
|
+
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' }) }),
|
|
20374
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }))),
|
|
20375
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
|
|
20264
20376
|
}
|
|
20265
20377
|
return null;
|
|
20266
20378
|
};
|