pb-sxp-ui 1.3.0 → 1.3.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 +371 -198
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +371 -198
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +371 -198
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/Modal/index.js +3 -2
- package/es/core/components/SxpPageRender/RenderCard.d.ts +3 -3
- package/es/core/components/SxpPageRender/RenderCard.js +17 -27
- package/es/core/components/SxpPageRender/WaterFall/List.js +28 -15
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +27 -14
- package/es/core/components/SxpPageRender/index.js +41 -29
- package/es/core/context/EditorContext.js +2 -0
- package/es/core/context/EditorDataProvider.d.ts +3 -0
- package/es/core/context/EditorDataProvider.js +2 -1
- package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.js +58 -23
- package/es/core/hooks/useEventReport.d.ts +1 -1
- package/es/core/hooks/useEventReport.js +2 -2
- package/es/core/utils/tool.d.ts +3 -3
- package/es/core/utils/tool.js +6 -6
- package/es/materials/sxp/HashTag/index.d.ts +3 -1
- package/es/materials/sxp/HashTag/settingRender.d.ts +13 -7
- package/es/materials/sxp/HashTag/settingRender.js +15 -0
- package/es/materials/sxp/cta/AniLink/settingRender.d.ts +5 -0
- package/es/materials/sxp/cta/AniLink/settingRender.js +4 -0
- package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +8 -5
- package/es/materials/sxp/popup/AppointForm/settingRender.js +12 -0
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +3 -1
- package/es/materials/sxp/popup/CommodityDetail/index.js +34 -27
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +15 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +3 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +37 -30
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +13 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +15 -0
- package/es/materials/sxp/popup/CommodityList/index.d.ts +3 -1
- package/es/materials/sxp/popup/CommodityList/index.js +11 -7
- package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +7 -0
- package/es/materials/sxp/popup/CommodityList/settingRender.js +10 -0
- package/es/materials/sxp/popup/Iframe/index.d.ts +1 -0
- package/es/materials/sxp/popup/Iframe/index.js +8 -7
- package/es/materials/sxp/popup/Prompt/settingRender.js +10 -0
- package/es/materials/sxp/template/Link/settingRender.js +5 -0
- package/lib/core/components/SxpPageRender/Modal/index.js +3 -2
- package/lib/core/components/SxpPageRender/RenderCard.d.ts +3 -3
- package/lib/core/components/SxpPageRender/RenderCard.js +16 -26
- package/lib/core/components/SxpPageRender/WaterFall/List.js +28 -15
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +27 -14
- package/lib/core/components/SxpPageRender/index.js +40 -28
- package/lib/core/context/EditorContext.js +2 -0
- package/lib/core/context/EditorDataProvider.d.ts +3 -0
- package/lib/core/context/EditorDataProvider.js +2 -1
- package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.js +58 -23
- package/lib/core/hooks/useEventReport.d.ts +1 -1
- package/lib/core/hooks/useEventReport.js +2 -2
- package/lib/core/utils/tool.d.ts +3 -3
- package/lib/core/utils/tool.js +6 -6
- package/lib/materials/sxp/HashTag/index.d.ts +3 -1
- package/lib/materials/sxp/HashTag/settingRender.d.ts +13 -7
- package/lib/materials/sxp/HashTag/settingRender.js +15 -0
- package/lib/materials/sxp/cta/AniLink/settingRender.d.ts +5 -0
- package/lib/materials/sxp/cta/AniLink/settingRender.js +4 -0
- package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +8 -5
- package/lib/materials/sxp/popup/AppointForm/settingRender.js +12 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +3 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.js +34 -27
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +15 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +3 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +37 -30
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +13 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +15 -0
- package/lib/materials/sxp/popup/CommodityList/index.d.ts +3 -1
- package/lib/materials/sxp/popup/CommodityList/index.js +11 -7
- package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +7 -0
- package/lib/materials/sxp/popup/CommodityList/settingRender.js +10 -0
- package/lib/materials/sxp/popup/Iframe/index.d.ts +1 -0
- package/lib/materials/sxp/popup/Iframe/index.js +8 -7
- package/lib/materials/sxp/popup/Prompt/settingRender.js +10 -0
- package/lib/materials/sxp/template/Link/settingRender.js +5 -0
- package/package.json +1 -1
package/dist/pb-ui.js
CHANGED
@@ -236,7 +236,7 @@
|
|
236
236
|
var _a, _b, _c, _d, _e, _f, _g;
|
237
237
|
let userAgent = self.navigator.userAgent;
|
238
238
|
if (!userAgent)
|
239
|
-
return
|
239
|
+
return null;
|
240
240
|
if (/edge\/([\d\.]+)/i.exec(userAgent))
|
241
241
|
return `Edge ${(_a = /edge\/([\d\.]+)/i.exec(userAgent)) === null || _a === void 0 ? void 0 : _a[1]}`;
|
242
242
|
if (/edg\/([\d\.]+)/i.exec(userAgent))
|
@@ -251,13 +251,13 @@
|
|
251
251
|
return `Firefox ${(_f = /firefox\/([\d\.]+)/i.exec(userAgent)) === null || _f === void 0 ? void 0 : _f[1]}`;
|
252
252
|
if (/safari/i.test(userAgent))
|
253
253
|
return `Safari ${(_g = /version\/([\d\.]+)/i.exec(userAgent)) === null || _g === void 0 ? void 0 : _g[1]}`;
|
254
|
-
return
|
254
|
+
return null;
|
255
255
|
}
|
256
256
|
function getSystem() {
|
257
257
|
var _a, _b, _c;
|
258
258
|
let userAgent = self.navigator.userAgent;
|
259
259
|
if (!userAgent)
|
260
|
-
return
|
260
|
+
return null;
|
261
261
|
if (/iphone/i.test(userAgent))
|
262
262
|
return `IOS ${(_a = userAgent.match(/OS\s(.*?)\slike/)) === null || _a === void 0 ? void 0 : _a[1]}`;
|
263
263
|
if (/android/i.test(userAgent))
|
@@ -266,12 +266,12 @@
|
|
266
266
|
return `Windows ${(_c = userAgent.match(/Windows\s(.*?)\;/)) === null || _c === void 0 ? void 0 : _c[1]}`;
|
267
267
|
if (/mac/i.test(userAgent))
|
268
268
|
return `Mac OS`;
|
269
|
-
return
|
269
|
+
return null;
|
270
270
|
}
|
271
271
|
function getDevice$1() {
|
272
272
|
let userAgent = self.navigator.userAgent;
|
273
273
|
if (!userAgent)
|
274
|
-
return
|
274
|
+
return null;
|
275
275
|
if (/iphone/i.test(userAgent))
|
276
276
|
return `iPhone`;
|
277
277
|
if (/android/i.test(userAgent)) {
|
@@ -294,7 +294,7 @@
|
|
294
294
|
return `Windows`;
|
295
295
|
if (/mac/i.test(userAgent))
|
296
296
|
return `Mac`;
|
297
|
-
return
|
297
|
+
return null;
|
298
298
|
}
|
299
299
|
function getCookie(val) {
|
300
300
|
// const expirationDate = new Date();
|
@@ -711,8 +711,8 @@
|
|
711
711
|
}, [bffDataSource]);
|
712
712
|
// 获取推荐视频数据
|
713
713
|
const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
|
714
|
-
var _d, _e, _f, _g, _h;
|
715
|
-
query = Object.assign(Object.assign({ maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize, defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag }, ((query === null || query === void 0 ? void 0 : query.contentFilter) && { contentFilter: `[${query === null || query === void 0 ? void 0 : query.contentFilter}]` })), ((query === null || query === void 0 ? void 0 : query.productFilter) && { productFilter: `[${query === null || query === void 0 ? void 0 : query.productFilter}]` }));
|
714
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
715
|
+
query = Object.assign(Object.assign(Object.assign({ maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize, defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag }, ((query === null || query === void 0 ? void 0 : query.contentFilter) && { contentFilter: `[${query === null || query === void 0 ? void 0 : query.contentFilter}]` })), ((query === null || query === void 0 ? void 0 : query.productFilter) && { productFilter: `[${query === null || query === void 0 ? void 0 : query.productFilter}]` })), { pageNum: query === null || query === void 0 ? void 0 : query.pageNum });
|
716
716
|
if (utmVal) {
|
717
717
|
const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
|
718
718
|
var _a, _b;
|
@@ -721,8 +721,35 @@
|
|
721
721
|
})) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
|
722
722
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
723
723
|
}
|
724
|
-
if (
|
725
|
-
query = Object.assign(Object.assign(
|
724
|
+
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
725
|
+
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_j = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _j !== void 0 ? _j : 1 });
|
726
|
+
}
|
727
|
+
if (isEditor) {
|
728
|
+
let pageNum = 1;
|
729
|
+
query = Object.assign(Object.assign({}, query), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] }));
|
730
|
+
if (!(query === null || query === void 0 ? void 0 : query.channel) || isInit.current)
|
731
|
+
return;
|
732
|
+
isInit.current = true;
|
733
|
+
let list = [];
|
734
|
+
let result = null;
|
735
|
+
const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
|
736
|
+
var _r, _s, _t, _u, _v, _w;
|
737
|
+
query.pageNum = pageNum;
|
738
|
+
result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
739
|
+
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
740
|
+
return undefined;
|
741
|
+
}
|
742
|
+
const isNotNullList = (_s = (_r = result === null || result === void 0 ? void 0 : result.data) === null || _r === void 0 ? void 0 : _r.recList) === null || _s === void 0 ? void 0 : _s.every((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
743
|
+
list = list.concat((_w = (_v = (_u = (_t = result === null || result === void 0 ? void 0 : result.data) === null || _t === void 0 ? void 0 : _t.recList) === null || _u === void 0 ? void 0 : _u.filter) === null || _v === void 0 ? void 0 : _v.call(_u, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _w !== void 0 ? _w : []);
|
744
|
+
if (isNotNullList) {
|
745
|
+
pageNum = pageNum + 1;
|
746
|
+
yield recurveRecList(query);
|
747
|
+
}
|
748
|
+
});
|
749
|
+
yield recurveRecList(query);
|
750
|
+
if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
|
751
|
+
setCurReqInfo({ rtc: (_k = result === null || result === void 0 ? void 0 : result.data) === null || _k === void 0 ? void 0 : _k.rtc, requestId: (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.requestId });
|
752
|
+
return Object.assign(Object.assign({}, result.data), { recList: list });
|
726
753
|
}
|
727
754
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
728
755
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
@@ -730,15 +757,20 @@
|
|
730
757
|
}
|
731
758
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag))
|
732
759
|
setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
|
760
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
|
761
|
+
let list = [];
|
762
|
+
list = list.concat((_q = (_p = (_o = (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.recList) === null || _o === void 0 ? void 0 : _o.filter) === null || _p === void 0 ? void 0 : _p.call(_o, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _q !== void 0 ? _q : []);
|
763
|
+
return Object.assign(Object.assign({}, result.data), { recList: list });
|
764
|
+
}
|
733
765
|
return result === null || result === void 0 ? void 0 : result.data;
|
734
|
-
}), [bffFetch, utmVal, maxSize, defaultSize,
|
735
|
-
const loadVideos = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
736
|
-
var
|
766
|
+
}), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList]);
|
767
|
+
const loadVideos = React.useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
|
768
|
+
var _x, _y, _z, _0;
|
737
769
|
if (rtcList.length <= 0) {
|
738
770
|
return;
|
739
771
|
}
|
740
772
|
const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
|
741
|
-
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((
|
773
|
+
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_x = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _x === void 0 ? void 0 : _x.itemId) && { productFilter: (_y = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _y === void 0 ? void 0 : _y.itemId })), (((_z = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _z === void 0 ? void 0 : _z.itemId) && { contentFilter: (_0 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _0 === void 0 ? void 0 : _0.itemId })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
|
742
774
|
setRtcList(rtcList.concat(getFilterRecList(data)));
|
743
775
|
setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
|
744
776
|
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
@@ -755,7 +787,7 @@
|
|
755
787
|
};
|
756
788
|
}
|
757
789
|
const sessionID = storeAndLoadFeSessionId();
|
758
|
-
const ef = Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), { sxpDevice: getDevice$1(), sxpSystem: getSystem(), sxpBrowser: getBrowserInfo() });
|
790
|
+
const ef = Object.assign(Object.assign(Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), (getDevice$1() && { sxpDevice: getDevice$1() })), (getSystem() && { sxpSystem: getSystem() })), (getBrowserInfo() && { sxpBrowser: getBrowserInfo() }));
|
759
791
|
const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
|
760
792
|
const realEventInfo = Object.entries(ef)
|
761
793
|
.map(([k, v]) => v && { name: k, value: v })
|
@@ -771,24 +803,21 @@
|
|
771
803
|
});
|
772
804
|
}, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
|
773
805
|
const bffFbReport = React.useCallback((_a) => {
|
774
|
-
var _b, _c;
|
806
|
+
var _b, _c, _d;
|
775
807
|
var { eventName, actionSource = 'website', eventSourceUrl = (_b = window === null || window === void 0 ? void 0 : window.location) === null || _b === void 0 ? void 0 : _b.href, externalId } = _a;
|
776
808
|
if (!enableReportEvent || !enabledMetaConversionApi || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
777
809
|
return;
|
778
810
|
}
|
779
811
|
const fakeUserId = storeAndLoadFeUserId();
|
812
|
+
const urlParams = new URLSearchParams(window.location.search);
|
813
|
+
const fbclid = urlParams.get('fbclid');
|
780
814
|
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/fb/events', {
|
781
815
|
method: 'POST',
|
782
816
|
body: {
|
783
817
|
eventName,
|
784
818
|
actionSource,
|
785
819
|
eventSourceUrl,
|
786
|
-
userData: {
|
787
|
-
externalId: fakeUserId,
|
788
|
-
fbc: `fb.2.${new Date().getTime()}.${getCookie('_fbc')}`,
|
789
|
-
fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}`,
|
790
|
-
client_user_agent: (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent
|
791
|
-
}
|
820
|
+
userData: Object.assign(Object.assign(Object.assign({ externalId: fakeUserId }, (fbclid && { fbc: `fb.2.${new Date().getTime()}.${fbclid}` })), (getCookie('_fbp') && { fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}` })), { client_user_agent: (_d = (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent) !== null && _d !== void 0 ? _d : '' })
|
792
821
|
},
|
793
822
|
type: 'beacon'
|
794
823
|
});
|
@@ -807,17 +836,17 @@
|
|
807
836
|
}), [bffFetch]);
|
808
837
|
// 获取 Tag
|
809
838
|
const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
810
|
-
var
|
839
|
+
var _1, _2, _3, _4, _5;
|
811
840
|
if (!utmVal || !isShowTag)
|
812
841
|
return;
|
813
842
|
try {
|
814
|
-
const val = (
|
843
|
+
const val = (_3 = (_2 = (_1 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _1 === void 0 ? void 0 : _1.filter((val) => {
|
815
844
|
var _a, _b;
|
816
845
|
const key = val.split('=')[0];
|
817
846
|
return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
818
|
-
})) === null ||
|
847
|
+
})) === null || _2 === void 0 ? void 0 : _2.join('&')) !== null && _3 !== void 0 ? _3 : '';
|
819
848
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
820
|
-
setTagList((
|
849
|
+
setTagList((_5 = (_4 = result === null || result === void 0 ? void 0 : result.data) === null || _4 === void 0 ? void 0 : _4.tags) !== null && _5 !== void 0 ? _5 : []);
|
821
850
|
}
|
822
851
|
catch (e) {
|
823
852
|
console.log('e', e);
|
@@ -890,11 +919,10 @@
|
|
890
919
|
}
|
891
920
|
});
|
892
921
|
setLoading(false);
|
893
|
-
isInit.current = true;
|
894
922
|
});
|
895
923
|
}, [isShowConsent]);
|
896
924
|
React.useEffect(() => {
|
897
|
-
if (!
|
925
|
+
if (!isPreview)
|
898
926
|
return;
|
899
927
|
setLoading(true);
|
900
928
|
bffGetTagList();
|
@@ -904,6 +932,12 @@
|
|
904
932
|
setCacheRtcList(getFilterRecList(data));
|
905
933
|
})
|
906
934
|
.finally(() => {
|
935
|
+
bffEventReport({
|
936
|
+
eventInfo: {
|
937
|
+
eventSubject: 'apiRequest',
|
938
|
+
eventDescription: 'api request succeed'
|
939
|
+
}
|
940
|
+
});
|
907
941
|
setLoading(false);
|
908
942
|
});
|
909
943
|
}, [getRecommendVideos, bffGetTagList]);
|
@@ -954,7 +988,8 @@
|
|
954
988
|
setSelectTag,
|
955
989
|
globalConfig,
|
956
990
|
popupCurTimeRef,
|
957
|
-
checkCommodityIndexRef
|
991
|
+
checkCommodityIndexRef,
|
992
|
+
isEditor
|
958
993
|
} }, isShowConsent ? (React.createElement(Consent$3, Object.assign({}, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props))) : (render({
|
959
994
|
rtcList,
|
960
995
|
mutateLike: bffMutateLike,
|
@@ -1109,6 +1144,7 @@
|
|
1109
1144
|
});
|
1110
1145
|
typeof window !== 'undefined' &&
|
1111
1146
|
(window.getJointUtmLink = (url) => {
|
1147
|
+
setSlideSkipState();
|
1112
1148
|
if ((url === null || url === void 0 ? void 0 : url.indexOf('?')) !== -1) {
|
1113
1149
|
return url + (utmVal ? '&' + utmVal : '');
|
1114
1150
|
}
|
@@ -1281,6 +1317,11 @@
|
|
1281
1317
|
type: 'TextAlign',
|
1282
1318
|
name: ['textStyle']
|
1283
1319
|
},
|
1320
|
+
{
|
1321
|
+
label: '标题间距',
|
1322
|
+
type: 'TextSpace',
|
1323
|
+
name: ['textStyle']
|
1324
|
+
},
|
1284
1325
|
{
|
1285
1326
|
label: '表单布局',
|
1286
1327
|
type: 'Radius',
|
@@ -1339,10 +1380,12 @@
|
|
1339
1380
|
]
|
1340
1381
|
},
|
1341
1382
|
{
|
1383
|
+
label: '提交按钮文本样式',
|
1342
1384
|
type: 'TextStyle',
|
1343
1385
|
name: ['props', 'submitButtonStyle']
|
1344
1386
|
},
|
1345
1387
|
{
|
1388
|
+
label: '提交按钮对齐',
|
1346
1389
|
type: 'TextAlign',
|
1347
1390
|
name: ['props', 'submitButtonStyle']
|
1348
1391
|
},
|
@@ -1350,6 +1393,11 @@
|
|
1350
1393
|
label: '提交按钮颜色',
|
1351
1394
|
type: 'Color',
|
1352
1395
|
name: ['props', 'submitBgColor']
|
1396
|
+
},
|
1397
|
+
{
|
1398
|
+
label: '提交按钮间距',
|
1399
|
+
type: 'TextSpace',
|
1400
|
+
name: ['props', 'submitButtonStyle']
|
1353
1401
|
}
|
1354
1402
|
// {
|
1355
1403
|
// label: '接收内容接口地址',
|
@@ -1390,7 +1438,7 @@
|
|
1390
1438
|
*/
|
1391
1439
|
function useEventReport() {
|
1392
1440
|
const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
|
1393
|
-
const jumpToWeb = React.useCallback((data, product, cta, position) => {
|
1441
|
+
const jumpToWeb = React.useCallback((data, product, cta, position, traceInfo) => {
|
1394
1442
|
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, _4, _5, _6, _7, _8, _9;
|
1395
1443
|
let fromKName = '';
|
1396
1444
|
if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
|
@@ -1423,7 +1471,7 @@
|
|
1423
1471
|
position: position + '',
|
1424
1472
|
contentId: (_v = (_u = data === null || data === void 0 ? void 0 : data.video) === null || _u === void 0 ? void 0 : _u.itemId) !== null && _v !== void 0 ? _v : '',
|
1425
1473
|
ctatId: (_w = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _w !== void 0 ? _w : '',
|
1426
|
-
traceInfo: (_9 = (_6 = (_4 = (_0 = (_x = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _x !== void 0 ? _x : (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProduct) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : (_3 = (_2 = (_1 = data === null || data === void 0 ? void 0 : data.video) === null || _1 === void 0 ? void 0 : _1.bindProducts) === null || _2 === void 0 ? void 0 : _2[0]) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_5 = data === null || data === void 0 ? void 0 : data.product) === null || _5 === void 0 ? void 0 : _5.traceInfo) !== null && _6 !== void 0 ? _6 : (_8 = (_7 = data === null || data === void 0 ? void 0 : data.video) === null || _7 === void 0 ? void 0 : _7.bindCta) === null || _8 === void 0 ? void 0 : _8.traceInfo) !== null && _9 !== void 0 ? _9 : ''
|
1474
|
+
traceInfo: (_9 = (_6 = (_4 = (_0 = (_x = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _x !== void 0 ? _x : (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProduct) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : (_3 = (_2 = (_1 = data === null || data === void 0 ? void 0 : data.video) === null || _1 === void 0 ? void 0 : _1.bindProducts) === null || _2 === void 0 ? void 0 : _2[0]) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_5 = data === null || data === void 0 ? void 0 : data.product) === null || _5 === void 0 ? void 0 : _5.traceInfo) !== null && _6 !== void 0 ? _6 : (_8 = (_7 = data === null || data === void 0 ? void 0 : data.video) === null || _7 === void 0 ? void 0 : _7.bindCta) === null || _8 === void 0 ? void 0 : _8.traceInfo) !== null && _9 !== void 0 ? _9 : ''
|
1427
1475
|
}
|
1428
1476
|
});
|
1429
1477
|
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
@@ -1828,6 +1876,16 @@
|
|
1828
1876
|
label: '默认行数',
|
1829
1877
|
type: 'Number',
|
1830
1878
|
name: ['lineClamp']
|
1879
|
+
},
|
1880
|
+
{
|
1881
|
+
label: '间距',
|
1882
|
+
type: 'TextSpace'
|
1883
|
+
},
|
1884
|
+
{
|
1885
|
+
label: '价格千分符展示',
|
1886
|
+
type: 'Switch',
|
1887
|
+
name: ['enableFormattedPrice'],
|
1888
|
+
initialValue: true
|
1831
1889
|
}
|
1832
1890
|
]
|
1833
1891
|
}
|
@@ -1913,6 +1971,11 @@
|
|
1913
1971
|
{
|
1914
1972
|
type: 'TextAlign',
|
1915
1973
|
name: ['props', 'buttonStyle']
|
1974
|
+
},
|
1975
|
+
{
|
1976
|
+
label: '间距',
|
1977
|
+
type: 'TextSpace',
|
1978
|
+
name: ['props', 'buttonStyle']
|
1916
1979
|
}
|
1917
1980
|
]
|
1918
1981
|
},
|
@@ -8755,13 +8818,13 @@
|
|
8755
8818
|
* @Author: binruan@chatlabs.com
|
8756
8819
|
* @Date: 2023-11-02 18:34:34
|
8757
8820
|
* @LastEditors: binruan@chatlabs.com
|
8758
|
-
* @LastEditTime: 2024-08-
|
8821
|
+
* @LastEditTime: 2024-08-20 18:29:11
|
8759
8822
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
|
8760
8823
|
*
|
8761
8824
|
*/
|
8762
8825
|
const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
8763
8826
|
const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
|
8764
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
8827
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
8765
8828
|
const touchRef = React.useRef(null);
|
8766
8829
|
const fTouchRef = React.useRef(null);
|
8767
8830
|
const touchMoveRef = React.useRef(null);
|
@@ -8886,7 +8949,8 @@
|
|
8886
8949
|
React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
|
8887
8950
|
React.createElement("img", { src: (_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _t !== void 0 ? _t : closeIcon$1, alt: 'close', className: 'modal-icon' })),
|
8888
8951
|
React.createElement("div", { ref: ref, style: {
|
8889
|
-
height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H
|
8952
|
+
height: (_x = (isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H) -
|
8953
|
+
((_w = (_v = (_u = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _u === void 0 ? void 0 : _u.props) === null || _v === void 0 ? void 0 : _v.popupBg) === null || _w === void 0 ? void 0 : _w.bottomMargin)) !== null && _x !== void 0 ? _x : 0,
|
8890
8954
|
overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
|
8891
8955
|
} }, children)))))), modalEleRef.current);
|
8892
8956
|
};
|
@@ -9054,7 +9118,7 @@
|
|
9054
9118
|
var CommodityGroup$1 = React.memo(CommodityGroup);
|
9055
9119
|
|
9056
9120
|
const CommodityDetail$1 = (_a) => {
|
9057
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
|
9121
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
9058
9122
|
var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio"]);
|
9059
9123
|
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
|
9060
9124
|
const { jumpToWeb, productView } = useEventReport();
|
@@ -9062,6 +9126,7 @@
|
|
9062
9126
|
const [showModal, setShowModal] = React.useState(false);
|
9063
9127
|
const [show3DModal, setShow3DModal] = React.useState(false);
|
9064
9128
|
const [checkCommodityIndex, setCheckCommodityIndex] = React.useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
|
9129
|
+
const ref = React.useRef();
|
9065
9130
|
const data = isPost ? rec : popupDetailData;
|
9066
9131
|
let product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_d = (_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct) !== null && _d !== void 0 ? _d : (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.bindProducts) === null || _f === void 0 ? void 0 : _f[0];
|
9067
9132
|
let cta = isPost
|
@@ -9101,17 +9166,20 @@
|
|
9101
9166
|
};
|
9102
9167
|
}, []);
|
9103
9168
|
const priceText = React.useMemo(() => {
|
9104
|
-
var _a, _b, _c, _d, _e;
|
9169
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
9170
|
+
const isToLocStr = ((_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
|
9105
9171
|
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
9106
|
-
return `${(
|
9107
|
-
|
9108
|
-
|
9172
|
+
return `${(_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.currency) === null || _c === void 0 ? void 0 : _c.split('-')[1]) === null || _d === void 0 ? void 0 : _d.toUpperCase()) !== null && _e !== void 0 ? _e : ''}${isToLocStr
|
9173
|
+
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
9174
|
+
minimumFractionDigits: 0
|
9175
|
+
})) !== null && _g !== void 0 ? _g : ''
|
9176
|
+
: product === null || product === void 0 ? void 0 : product.price}`;
|
9109
9177
|
}
|
9110
9178
|
else {
|
9111
9179
|
return '$7,000';
|
9112
9180
|
}
|
9113
|
-
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
|
9114
|
-
const width = (isPreview ? 375 : (
|
9181
|
+
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency, (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice]);
|
9182
|
+
const width = (isPreview ? 375 : (_u = style === null || style === void 0 ? void 0 : style.width) !== null && _u !== void 0 ? _u : window.innerWidth) - ((_v = popupBg === null || popupBg === void 0 ? void 0 : popupBg.horizontalMargin) !== null && _v !== void 0 ? _v : 0) * 2;
|
9115
9183
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
9116
9184
|
const renderContent = ({ isPost }) => {
|
9117
9185
|
var _a, _b, _c, _d;
|
@@ -9152,6 +9220,10 @@
|
|
9152
9220
|
popupCurTimeRef.current = new Date();
|
9153
9221
|
setCheckCommodityIndex(index);
|
9154
9222
|
checkCommodityIndexRef.current = index;
|
9223
|
+
if (ref === null || ref === void 0 ? void 0 : ref.current) {
|
9224
|
+
ref.current.swiper.slideTo(0);
|
9225
|
+
ref.current.swiper.autoplay.start();
|
9226
|
+
}
|
9155
9227
|
}, []);
|
9156
9228
|
const renderCommodityGroup = React.useCallback(() => {
|
9157
9229
|
var _a, _b, _c;
|
@@ -9167,18 +9239,18 @@
|
|
9167
9239
|
};
|
9168
9240
|
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
9169
9241
|
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
9170
|
-
const iframeUrl = ((
|
9242
|
+
const iframeUrl = ((_x = (_w = data === null || data === void 0 ? void 0 : data.video) === null || _w === void 0 ? void 0 : _w.bindProduct) === null || _x === void 0 ? void 0 : _x.remark) || ((_0 = (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProducts) === null || _z === void 0 ? void 0 : _z[0]) === null || _0 === void 0 ? void 0 : _0.remark) || ((_1 = data === null || data === void 0 ? void 0 : data.product) === null || _1 === void 0 ? void 0 : _1.remark);
|
9171
9243
|
return (React.createElement(React.Fragment, null,
|
9172
9244
|
React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
|
9173
9245
|
React.createElement("div", { style: { position: 'relative' } },
|
9174
|
-
product && ((
|
9246
|
+
product && ((_2 = product === null || product === void 0 ? void 0 : product.homePage) === null || _2 === void 0 ? void 0 : _2.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
|
9175
9247
|
clickable: true,
|
9176
9248
|
bulletActiveClass: 'swipe-item-active-bullet',
|
9177
9249
|
clickableClass: getDotsAlign
|
9178
9250
|
}, loop: true, autoplay: {
|
9179
9251
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
9180
|
-
} },
|
9181
|
-
React.createElement(React.Fragment, null, (
|
9252
|
+
}, ref: ref },
|
9253
|
+
React.createElement(React.Fragment, null, (_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.map((src) => {
|
9182
9254
|
var _a;
|
9183
9255
|
return (React.createElement(SwiperSlide, { key: src },
|
9184
9256
|
React.createElement("div", { style: {
|
@@ -9194,7 +9266,7 @@
|
|
9194
9266
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
9195
9267
|
}, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
|
9196
9268
|
})))),
|
9197
|
-
!((
|
9269
|
+
!((_4 = product === null || product === void 0 ? void 0 : product.homePage) === null || _4 === void 0 ? void 0 : _4.length) && (React.createElement("div", { className: css.css({
|
9198
9270
|
height,
|
9199
9271
|
width
|
9200
9272
|
}) },
|
@@ -9202,21 +9274,20 @@
|
|
9202
9274
|
objectFit: 'cover',
|
9203
9275
|
width: '100%',
|
9204
9276
|
height: '100%'
|
9205
|
-
}), src: (
|
9206
|
-
(iframeUrl && iframeIcon
|
9207
|
-
|
9208
|
-
|
9209
|
-
|
9210
|
-
|
9211
|
-
|
9212
|
-
|
9213
|
-
|
9214
|
-
|
9215
|
-
|
9216
|
-
|
9217
|
-
|
9218
|
-
|
9219
|
-
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
|
9277
|
+
}), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
|
9278
|
+
(iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
|
9279
|
+
padding: '5px 10px',
|
9280
|
+
display: 'flex',
|
9281
|
+
alignItems: 'center',
|
9282
|
+
position: 'absolute',
|
9283
|
+
right: '10px',
|
9284
|
+
bottom: '10px',
|
9285
|
+
zIndex: 1,
|
9286
|
+
background: '#fff',
|
9287
|
+
borderRadius: '3px'
|
9288
|
+
}, onClick: () => setShow3DModal(true) },
|
9289
|
+
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
|
9290
|
+
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D")))),
|
9220
9291
|
renderCommodityGroup(),
|
9221
9292
|
React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
|
9222
9293
|
renderBtn(),
|
@@ -9348,7 +9419,7 @@
|
|
9348
9419
|
* @Author: binruan@chatlabs.com
|
9349
9420
|
* @Date: 2023-10-27 14:06:35
|
9350
9421
|
* @LastEditors: binruan@chatlabs.com
|
9351
|
-
* @LastEditTime: 2024-08-
|
9422
|
+
* @LastEditTime: 2024-08-20 14:01:21
|
9352
9423
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
|
9353
9424
|
*
|
9354
9425
|
*/
|
@@ -9415,6 +9486,11 @@
|
|
9415
9486
|
}
|
9416
9487
|
]
|
9417
9488
|
},
|
9489
|
+
{
|
9490
|
+
label: '内容字体间距',
|
9491
|
+
type: 'TextSpace',
|
9492
|
+
name: ['props', 'contentStyle']
|
9493
|
+
},
|
9418
9494
|
{
|
9419
9495
|
type: 'Group',
|
9420
9496
|
label: '提交按钮字体',
|
@@ -9448,6 +9524,11 @@
|
|
9448
9524
|
}
|
9449
9525
|
]
|
9450
9526
|
},
|
9527
|
+
{
|
9528
|
+
label: '提交按钮间距',
|
9529
|
+
type: 'TextSpace',
|
9530
|
+
name: ['props', 'submitButtonStyle']
|
9531
|
+
},
|
9451
9532
|
{
|
9452
9533
|
type: 'TextStyle',
|
9453
9534
|
name: ['props', 'submitButtonStyle']
|
@@ -9558,7 +9639,7 @@
|
|
9558
9639
|
* @Author: binruan@chatlabs.com
|
9559
9640
|
* @Date: 2024-03-26 16:50:25
|
9560
9641
|
* @LastEditors: binruan@chatlabs.com
|
9561
|
-
* @LastEditTime: 2024-08-
|
9642
|
+
* @LastEditTime: 2024-08-20 15:50:06
|
9562
9643
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
|
9563
9644
|
*
|
9564
9645
|
*/
|
@@ -9755,6 +9836,16 @@
|
|
9755
9836
|
label: '默认行数',
|
9756
9837
|
type: 'Number',
|
9757
9838
|
name: ['lineClamp']
|
9839
|
+
},
|
9840
|
+
{
|
9841
|
+
label: '间距',
|
9842
|
+
type: 'TextSpace'
|
9843
|
+
},
|
9844
|
+
{
|
9845
|
+
label: '价格千分符展示',
|
9846
|
+
type: 'Switch',
|
9847
|
+
name: ['enableFormattedPrice'],
|
9848
|
+
initialValue: true
|
9758
9849
|
}
|
9759
9850
|
]
|
9760
9851
|
}
|
@@ -9840,6 +9931,11 @@
|
|
9840
9931
|
{
|
9841
9932
|
type: 'TextAlign',
|
9842
9933
|
name: ['props', 'buttonStyle']
|
9934
|
+
},
|
9935
|
+
{
|
9936
|
+
label: '间距',
|
9937
|
+
type: 'TextSpace',
|
9938
|
+
name: ['props', 'buttonStyle']
|
9843
9939
|
}
|
9844
9940
|
]
|
9845
9941
|
},
|
@@ -9857,7 +9953,7 @@
|
|
9857
9953
|
];
|
9858
9954
|
|
9859
9955
|
const CommodityDetailDiroNew$1 = (_a) => {
|
9860
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
|
9956
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
|
9861
9957
|
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio"]);
|
9862
9958
|
React.useState(true);
|
9863
9959
|
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
|
@@ -9869,6 +9965,7 @@
|
|
9869
9965
|
const curTimeRef = React.useRef(null);
|
9870
9966
|
const [show3DModal, setShow3DModal] = React.useState(false);
|
9871
9967
|
const [checkCommodityIndex, setCheckCommodityIndex] = React.useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
|
9968
|
+
const ref = React.useRef();
|
9872
9969
|
const data = isPost ? rec : popupDetailData;
|
9873
9970
|
let product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_d = (_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct) !== null && _d !== void 0 ? _d : (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.bindProducts) === null || _f === void 0 ? void 0 : _f[0];
|
9874
9971
|
let cta = isPost
|
@@ -9908,17 +10005,20 @@
|
|
9908
10005
|
};
|
9909
10006
|
}, []);
|
9910
10007
|
const priceText = React.useMemo(() => {
|
9911
|
-
var _a, _b, _c, _d, _e;
|
10008
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
10009
|
+
const isToLocStr = ((_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
|
9912
10010
|
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
9913
|
-
return `${(
|
9914
|
-
|
9915
|
-
|
10011
|
+
return `${(_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.currency) === null || _c === void 0 ? void 0 : _c.split('-')[1]) === null || _d === void 0 ? void 0 : _d.toUpperCase()) !== null && _e !== void 0 ? _e : ''}${isToLocStr
|
10012
|
+
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
10013
|
+
minimumFractionDigits: 0
|
10014
|
+
})) !== null && _g !== void 0 ? _g : ''
|
10015
|
+
: product === null || product === void 0 ? void 0 : product.price}`;
|
9916
10016
|
}
|
9917
10017
|
else {
|
9918
10018
|
return '£102,300.00';
|
9919
10019
|
}
|
9920
|
-
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
|
9921
|
-
const width = (isPreview ? 375 : (
|
10020
|
+
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency, (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice]);
|
10021
|
+
const width = (isPreview ? 375 : (_u = style === null || style === void 0 ? void 0 : style.width) !== null && _u !== void 0 ? _u : window.innerWidth) - ((_v = popupBg === null || popupBg === void 0 ? void 0 : popupBg.horizontalMargin) !== null && _v !== void 0 ? _v : 0) * 2;
|
9922
10022
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
9923
10023
|
// useEffect(() => {
|
9924
10024
|
// console.log(scrollRef?.current?.scrollHeight, window.innerHeight);
|
@@ -9986,6 +10086,10 @@ Made in Italy` })));
|
|
9986
10086
|
popupCurTimeRef.current = new Date();
|
9987
10087
|
setCheckCommodityIndex(index);
|
9988
10088
|
checkCommodityIndexRef.current = index;
|
10089
|
+
if (ref === null || ref === void 0 ? void 0 : ref.current) {
|
10090
|
+
ref.current.swiper.slideTo(0);
|
10091
|
+
ref.current.swiper.autoplay.start();
|
10092
|
+
}
|
9989
10093
|
}, []);
|
9990
10094
|
const renderCommodityGroup = React.useCallback(() => {
|
9991
10095
|
var _a, _b, _c;
|
@@ -10001,17 +10105,17 @@ Made in Italy` })));
|
|
10001
10105
|
};
|
10002
10106
|
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
10003
10107
|
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
10004
|
-
const iframeUrl = ((
|
10108
|
+
const iframeUrl = ((_x = (_w = data === null || data === void 0 ? void 0 : data.video) === null || _w === void 0 ? void 0 : _w.bindProduct) === null || _x === void 0 ? void 0 : _x.remark) || ((_0 = (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProducts) === null || _z === void 0 ? void 0 : _z[0]) === null || _0 === void 0 ? void 0 : _0.remark) || ((_1 = data === null || data === void 0 ? void 0 : data.product) === null || _1 === void 0 ? void 0 : _1.remark);
|
10005
10109
|
return (React.createElement("div", { className: 'pb-commondityDiroNew' },
|
10006
10110
|
React.createElement("div", Object.assign({ className: css.css(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
|
10007
10111
|
React.createElement("div", { style: { position: 'relative' } },
|
10008
|
-
product && ((
|
10112
|
+
product && ((_2 = product === null || product === void 0 ? void 0 : product.homePage) === null || _2 === void 0 ? void 0 : _2.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
|
10009
10113
|
clickable: true,
|
10010
10114
|
bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
|
10011
10115
|
clickableClass: getDotsAlign
|
10012
10116
|
}, loop: true, autoplay: {
|
10013
10117
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
10014
|
-
} }, (
|
10118
|
+
}, ref: ref }, (_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.map((src) => {
|
10015
10119
|
var _a;
|
10016
10120
|
return (React.createElement(SwiperSlide, { key: src },
|
10017
10121
|
React.createElement("div", { style: {
|
@@ -10027,7 +10131,7 @@ Made in Italy` })));
|
|
10027
10131
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
10028
10132
|
}, src: (_a = src !== null && src !== void 0 ? src : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _a !== void 0 ? _a : bottom_image }))));
|
10029
10133
|
}))),
|
10030
|
-
!((
|
10134
|
+
!((_4 = product === null || product === void 0 ? void 0 : product.homePage) === null || _4 === void 0 ? void 0 : _4.length) && (React.createElement("div", { className: css.css({
|
10031
10135
|
height,
|
10032
10136
|
width
|
10033
10137
|
}) },
|
@@ -10035,27 +10139,26 @@ Made in Italy` })));
|
|
10035
10139
|
objectFit: 'cover',
|
10036
10140
|
width: '100%',
|
10037
10141
|
height: '100%'
|
10038
|
-
}), src: (
|
10039
|
-
(iframeUrl && iframeIcon
|
10040
|
-
|
10041
|
-
|
10042
|
-
|
10043
|
-
|
10044
|
-
|
10045
|
-
|
10046
|
-
|
10047
|
-
|
10048
|
-
|
10049
|
-
|
10050
|
-
|
10051
|
-
|
10052
|
-
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
|
10142
|
+
}), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
|
10143
|
+
(iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
|
10144
|
+
padding: '5px 10px',
|
10145
|
+
display: 'flex',
|
10146
|
+
alignItems: 'center',
|
10147
|
+
position: 'absolute',
|
10148
|
+
right: '10px',
|
10149
|
+
bottom: '10px',
|
10150
|
+
zIndex: 1,
|
10151
|
+
background: '#fff',
|
10152
|
+
borderRadius: '3px'
|
10153
|
+
}, onClick: () => setShow3DModal(true) },
|
10154
|
+
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
|
10155
|
+
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D")))),
|
10053
10156
|
renderCommodityGroup(),
|
10054
10157
|
React.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
10055
10158
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
10056
10159
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
10057
10160
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
|
10058
|
-
__html: setFontForText((
|
10161
|
+
__html: setFontForText((_6 = product === null || product === void 0 ? void 0 : product.title) !== null && _6 !== void 0 ? _6 : 'Large Dior Toujours BagLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
|
10059
10162
|
} }),
|
10060
10163
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection), dangerouslySetInnerHTML: {
|
10061
10164
|
__html: setFontForText((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
@@ -10065,11 +10168,11 @@ Made in Italy` })));
|
|
10065
10168
|
__html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
10066
10169
|
} }),
|
10067
10170
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo), dangerouslySetInnerHTML: {
|
10068
|
-
__html: setFontForText((
|
10171
|
+
__html: setFontForText((_7 = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _7 !== void 0 ? _7 : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
|
10069
10172
|
} }))),
|
10070
|
-
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (
|
10173
|
+
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_8 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _8 !== void 0 ? _8 : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
|
10071
10174
|
React.createElement("span", { dangerouslySetInnerHTML: {
|
10072
|
-
__html: setFontForText((
|
10175
|
+
__html: setFontForText((_9 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _9 !== void 0 ? _9 : 'Shop now', buttonStyle)
|
10073
10176
|
} }))),
|
10074
10177
|
productInfoText({ isPost }))),
|
10075
10178
|
React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
|
@@ -10187,7 +10290,7 @@ Made in Italy` })));
|
|
10187
10290
|
* @Author: binruan@chatlabs.com
|
10188
10291
|
* @Date: 2024-03-26 16:50:25
|
10189
10292
|
* @LastEditors: binruan@chatlabs.com
|
10190
|
-
* @LastEditTime: 2024-
|
10293
|
+
* @LastEditTime: 2024-08-06 14:09:52
|
10191
10294
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\settingRender.tsx
|
10192
10295
|
*
|
10193
10296
|
*/
|
@@ -10324,6 +10427,16 @@ Made in Italy` })));
|
|
10324
10427
|
{
|
10325
10428
|
label: '标题对齐',
|
10326
10429
|
type: 'TextAlign'
|
10430
|
+
},
|
10431
|
+
{
|
10432
|
+
label: '间距',
|
10433
|
+
type: 'TextSpace'
|
10434
|
+
},
|
10435
|
+
{
|
10436
|
+
label: '价格千分符展示',
|
10437
|
+
type: 'Switch',
|
10438
|
+
name: ['enableFormattedPrice'],
|
10439
|
+
initialValue: true
|
10327
10440
|
}
|
10328
10441
|
]
|
10329
10442
|
}
|
@@ -10476,7 +10589,7 @@ Made in Italy` })));
|
|
10476
10589
|
var Img$1 = React.memo(Img);
|
10477
10590
|
|
10478
10591
|
const CommodityList$1 = (_a) => {
|
10479
|
-
var _b, _c;
|
10592
|
+
var _b, _c, _d;
|
10480
10593
|
var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, translateY = 0, commodityPicture, isExternalLink, onClick } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "translateY", "commodityPicture", "isExternalLink", "onClick"]);
|
10481
10594
|
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
|
10482
10595
|
const { jumpToWeb } = useEventReport();
|
@@ -10485,16 +10598,20 @@ Made in Italy` })));
|
|
10485
10598
|
const product = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [null, null, null, null];
|
10486
10599
|
const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
10487
10600
|
const priceText = React.useCallback((product) => {
|
10488
|
-
var _a, _b, _c, _d, _e;
|
10601
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
10602
|
+
const isToLocStr = ((_a = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
|
10489
10603
|
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
10490
|
-
return `${(
|
10491
|
-
|
10492
|
-
|
10604
|
+
return `${(_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.currency) === null || _c === void 0 ? void 0 : _c.split('-')[1]) === null || _d === void 0 ? void 0 : _d.toUpperCase()) !== null && _e !== void 0 ? _e : ''}${isToLocStr
|
10605
|
+
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
10606
|
+
minimumFractionDigits: 0
|
10607
|
+
})) !== null && _g !== void 0 ? _g : ''
|
10608
|
+
: product === null || product === void 0 ? void 0 : product.price}`;
|
10493
10609
|
}
|
10494
10610
|
else {
|
10495
|
-
|
10611
|
+
const p = 7000;
|
10612
|
+
return `$${isToLocStr ? p.toLocaleString() : p}`;
|
10496
10613
|
}
|
10497
|
-
}, []);
|
10614
|
+
}, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice]);
|
10498
10615
|
const handleClick = lodash.throttle((item, multiCheckIndex) => {
|
10499
10616
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
10500
10617
|
eventSubject: 'clickCta',
|
@@ -10655,15 +10772,16 @@ Made in Italy` })));
|
|
10655
10772
|
|
10656
10773
|
const Iframe$1 = (_a) => {
|
10657
10774
|
var _b, _c;
|
10658
|
-
var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle, contentStyle } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle", "contentStyle"]);
|
10775
|
+
var { content, btnText, style, icon, isPopup, isExternalLink, onClose, onClick, submitButtonStyle, contentStyle, isTel } = _a, props = __rest(_a, ["content", "btnText", "style", "icon", "isPopup", "isExternalLink", "onClose", "onClick", "submitButtonStyle", "contentStyle", "isTel"]);
|
10659
10776
|
const { popupDetailData } = useSxpDataSource();
|
10660
10777
|
const iframeUrl = (_c = (_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.video) === null || _b === void 0 ? void 0 : _b.bindCta) === null || _c === void 0 ? void 0 : _c.remark;
|
10661
|
-
return (React.createElement("div", Object.assign({ className: `${css.css(Object.assign({}, style)
|
10662
|
-
|
10663
|
-
|
10664
|
-
|
10665
|
-
|
10666
|
-
|
10778
|
+
return (React.createElement("div", Object.assign({ className: `${css.css(Object.assign(Object.assign({}, style), { height: isTel ? 664 : '100%' }))}` }, props),
|
10779
|
+
React.createElement("iframe", { src: iframeUrl, style: {
|
10780
|
+
width: '100%',
|
10781
|
+
height: 'calc(100% - 50px)',
|
10782
|
+
marginTop: '40px',
|
10783
|
+
border: 'none'
|
10784
|
+
} })));
|
10667
10785
|
};
|
10668
10786
|
var IframeComponent = React.memo(Iframe$1);
|
10669
10787
|
|
@@ -11149,7 +11267,7 @@ Made in Italy` })));
|
|
11149
11267
|
* @Author: binruan@chatlabs.com
|
11150
11268
|
* @Date: 2024-07-02 14:51:32
|
11151
11269
|
* @LastEditors: binruan@chatlabs.com
|
11152
|
-
* @LastEditTime: 2024-
|
11270
|
+
* @LastEditTime: 2024-08-06 14:51:18
|
11153
11271
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\settingRender.tsx
|
11154
11272
|
*
|
11155
11273
|
*/
|
@@ -11246,6 +11364,11 @@ Made in Italy` })));
|
|
11246
11364
|
type: 'TextAlign',
|
11247
11365
|
name: ['props', 'customTitle', 'style']
|
11248
11366
|
},
|
11367
|
+
{
|
11368
|
+
label: '间距',
|
11369
|
+
type: 'TextSpace',
|
11370
|
+
name: ['props', 'customTitle', 'style']
|
11371
|
+
},
|
11249
11372
|
{
|
11250
11373
|
label: '上边距',
|
11251
11374
|
type: 'Number',
|
@@ -11903,7 +12026,7 @@ Made in Italy` })));
|
|
11903
12026
|
* @Author: binruan@chatlabs.com
|
11904
12027
|
* @Date: 2024-04-07 14:07:12
|
11905
12028
|
* @LastEditors: binruan@chatlabs.com
|
11906
|
-
* @LastEditTime: 2024-
|
12029
|
+
* @LastEditTime: 2024-08-22 10:14:36
|
11907
12030
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
|
11908
12031
|
*
|
11909
12032
|
*/
|
@@ -12008,6 +12131,16 @@ Made in Italy` })));
|
|
12008
12131
|
{
|
12009
12132
|
label: '标题对齐',
|
12010
12133
|
type: 'TextAlign'
|
12134
|
+
},
|
12135
|
+
{
|
12136
|
+
label: '间距',
|
12137
|
+
type: 'TextSpace'
|
12138
|
+
},
|
12139
|
+
{
|
12140
|
+
label: '价格千分符展示',
|
12141
|
+
type: 'Switch',
|
12142
|
+
name: ['enableFormattedPrice'],
|
12143
|
+
initialValue: true
|
12011
12144
|
}
|
12012
12145
|
]
|
12013
12146
|
}
|
@@ -12093,6 +12226,11 @@ Made in Italy` })));
|
|
12093
12226
|
{
|
12094
12227
|
type: 'TextAlign',
|
12095
12228
|
name: ['props', 'buttonStyle']
|
12229
|
+
},
|
12230
|
+
{
|
12231
|
+
label: '间距',
|
12232
|
+
type: 'TextSpace',
|
12233
|
+
name: ['props', 'buttonStyle']
|
12096
12234
|
}
|
12097
12235
|
]
|
12098
12236
|
},
|
@@ -13423,6 +13561,7 @@ Made in Italy` })));
|
|
13423
13561
|
};
|
13424
13562
|
|
13425
13563
|
const WaterfallFlowItem$1 = (props) => {
|
13564
|
+
var _a;
|
13426
13565
|
const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
|
13427
13566
|
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
13428
13567
|
const [showVideo, setShowVideo] = React.useState(false);
|
@@ -13476,16 +13615,19 @@ Made in Italy` })));
|
|
13476
13615
|
}
|
13477
13616
|
}, [top, showBorder]);
|
13478
13617
|
const priceText = React.useMemo(() => {
|
13479
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13480
|
-
|
13481
|
-
|
13482
|
-
|
13483
|
-
|
13618
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
13619
|
+
const isToLocStr = ((_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
|
13620
|
+
if (((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.currency) && ((_d = rec === null || rec === void 0 ? void 0 : rec.product) === null || _d === void 0 ? void 0 : _d.price)) {
|
13621
|
+
return `${(_h = (_g = (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.product) === null || _e === void 0 ? void 0 : _e.currency) === null || _f === void 0 ? void 0 : _f.split('-')[1]) === null || _g === void 0 ? void 0 : _g.toUpperCase()) !== null && _h !== void 0 ? _h : ''}${isToLocStr
|
13622
|
+
? (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.product) === null || _j === void 0 ? void 0 : _j.price) === null || _k === void 0 ? void 0 : _k.toLocaleString('zh', {
|
13623
|
+
minimumFractionDigits: 0
|
13624
|
+
})) !== null && _l !== void 0 ? _l : ''
|
13625
|
+
: (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
|
13484
13626
|
}
|
13485
13627
|
else {
|
13486
13628
|
return null;
|
13487
13629
|
}
|
13488
|
-
}, [rec]);
|
13630
|
+
}, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
|
13489
13631
|
React.useEffect(() => {
|
13490
13632
|
if (imgDom.current === null || src === '') {
|
13491
13633
|
return;
|
@@ -13532,7 +13674,8 @@ Made in Italy` })));
|
|
13532
13674
|
function WaterfallList$1(_a) {
|
13533
13675
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
13534
13676
|
var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
|
13535
|
-
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
13677
|
+
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
|
13678
|
+
const { jumpToWeb } = useEventReport();
|
13536
13679
|
/** 滚动的父元素 */
|
13537
13680
|
const scrollParent = React.useRef(null);
|
13538
13681
|
/** 向上滚动的距离 */
|
@@ -13648,10 +13791,14 @@ Made in Italy` })));
|
|
13648
13791
|
}, [unitWidth, rowsNum, list]); /* 增加getStyleList依赖项会导致在admin预览编辑时无限刷新 */
|
13649
13792
|
/** 初始化请求数据 */
|
13650
13793
|
React.useEffect(() => {
|
13651
|
-
var _a, _b
|
13794
|
+
var _a, _b;
|
13652
13795
|
setIsLoadingData(true);
|
13653
13796
|
waterFallData &&
|
13654
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(
|
13797
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
13798
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
|
13799
|
+
defaultSize: hashTagSize,
|
13800
|
+
maxSize: hashTagSize
|
13801
|
+
}).then((res) => {
|
13655
13802
|
var _a, _b;
|
13656
13803
|
setData(res);
|
13657
13804
|
setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
|
@@ -13660,7 +13807,7 @@ Made in Italy` })));
|
|
13660
13807
|
if (isOpenHashTag) {
|
13661
13808
|
const res = previewData;
|
13662
13809
|
setData(res);
|
13663
|
-
setList((
|
13810
|
+
setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
|
13664
13811
|
setIsLoadingData(false);
|
13665
13812
|
}
|
13666
13813
|
}, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
|
@@ -13686,10 +13833,11 @@ Made in Italy` })));
|
|
13686
13833
|
};
|
13687
13834
|
}, [onResize]);
|
13688
13835
|
React.useCallback(() => {
|
13689
|
-
var _a, _b, _c, _d;
|
13690
13836
|
setIsLoadingData(true);
|
13691
13837
|
waterFallData &&
|
13692
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(
|
13838
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
13839
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag
|
13840
|
+
}).then((res) => {
|
13693
13841
|
var _a, _b;
|
13694
13842
|
setList(list === null || list === void 0 ? void 0 : list.concat((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => !(item === null || item === void 0 ? void 0 : item.video))) !== null && _b !== void 0 ? _b : []));
|
13695
13843
|
setIsLoadingData(false);
|
@@ -13716,10 +13864,12 @@ Made in Italy` })));
|
|
13716
13864
|
};
|
13717
13865
|
}, [onScroll, scrollParent]);
|
13718
13866
|
const handleClickLink = () => {
|
13719
|
-
var _a, _b;
|
13867
|
+
var _a, _b, _c, _d, _e;
|
13720
13868
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
13721
13869
|
reportTagsView();
|
13722
|
-
|
13870
|
+
const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
|
13871
|
+
jumpToWeb(rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
|
13872
|
+
window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
|
13723
13873
|
}
|
13724
13874
|
};
|
13725
13875
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
@@ -13761,8 +13911,9 @@ Made in Italy` })));
|
|
13761
13911
|
var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
|
13762
13912
|
|
13763
13913
|
const WaterfallFlowItem = (props) => {
|
13914
|
+
var _a;
|
13764
13915
|
const { rec, index, list, reportTagsView, textStyles, space } = props;
|
13765
|
-
const { swiperRef, setRtcList, setOpenHashtag,
|
13916
|
+
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
13766
13917
|
const [showVideo, setShowVideo] = React.useState(false);
|
13767
13918
|
const imgDom = React.useRef(null);
|
13768
13919
|
const ref = React.useRef(null);
|
@@ -13789,16 +13940,19 @@ Made in Italy` })));
|
|
13789
13940
|
return ((_a = rec === null || rec === void 0 ? void 0 : rec.product) === null || _a === void 0 ? void 0 : _a.title) || ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) || null;
|
13790
13941
|
}, [rec]);
|
13791
13942
|
const priceText = React.useMemo(() => {
|
13792
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13793
|
-
|
13794
|
-
|
13795
|
-
|
13796
|
-
|
13943
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
13944
|
+
const isToLocStr = ((_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice) === undefined || ((_b = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _b === void 0 ? void 0 : _b.enableFormattedPrice);
|
13945
|
+
if (((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.currency) && ((_d = rec === null || rec === void 0 ? void 0 : rec.product) === null || _d === void 0 ? void 0 : _d.price)) {
|
13946
|
+
return `${(_h = (_g = (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.product) === null || _e === void 0 ? void 0 : _e.currency) === null || _f === void 0 ? void 0 : _f.split('-')[1]) === null || _g === void 0 ? void 0 : _g.toUpperCase()) !== null && _h !== void 0 ? _h : ''}${isToLocStr
|
13947
|
+
? (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.product) === null || _j === void 0 ? void 0 : _j.price) === null || _k === void 0 ? void 0 : _k.toLocaleString('zh', {
|
13948
|
+
minimumFractionDigits: 0
|
13949
|
+
})) !== null && _l !== void 0 ? _l : ''
|
13950
|
+
: (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
|
13797
13951
|
}
|
13798
13952
|
else {
|
13799
13953
|
return null;
|
13800
13954
|
}
|
13801
|
-
}, [rec]);
|
13955
|
+
}, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
|
13802
13956
|
// useEffect(() => {
|
13803
13957
|
// if (imgDom.current === null || src === '') {
|
13804
13958
|
// return;
|
@@ -13890,29 +14044,35 @@ Made in Italy` })));
|
|
13890
14044
|
function WaterfallList(_a) {
|
13891
14045
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
13892
14046
|
var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
|
13893
|
-
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
14047
|
+
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
|
14048
|
+
const { jumpToWeb } = useEventReport();
|
13894
14049
|
const [list, setList] = React.useState();
|
13895
14050
|
const [data, setData] = React.useState();
|
13896
14051
|
const [isLoadingData, setIsLoadingData] = React.useState(false);
|
13897
14052
|
const containerRef = React.useRef(null);
|
13898
14053
|
const [isLoadMore, setIsLoadMore] = React.useState(false);
|
13899
14054
|
React.useCallback(() => {
|
13900
|
-
var _a, _b, _c, _d;
|
13901
14055
|
if (isLoadMore)
|
13902
14056
|
return;
|
13903
14057
|
setIsLoadMore(true);
|
13904
14058
|
waterFallData &&
|
13905
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(
|
14059
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
14060
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag
|
14061
|
+
}).then((res) => {
|
13906
14062
|
var _a;
|
13907
14063
|
setList(list === null || list === void 0 ? void 0 : list.concat((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []));
|
13908
14064
|
setIsLoadMore(false);
|
13909
14065
|
}));
|
13910
14066
|
}, [waterFallData, getRecommendVideos, list, isLoadMore]);
|
13911
14067
|
React.useEffect(() => {
|
13912
|
-
var _a, _b
|
14068
|
+
var _a, _b;
|
13913
14069
|
setIsLoadingData(true);
|
13914
14070
|
waterFallData &&
|
13915
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(
|
14071
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
14072
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
|
14073
|
+
defaultSize: hashTagSize,
|
14074
|
+
maxSize: hashTagSize
|
14075
|
+
}).then((res) => {
|
13916
14076
|
var _a, _b;
|
13917
14077
|
setData(res);
|
13918
14078
|
setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
|
@@ -13921,7 +14081,7 @@ Made in Italy` })));
|
|
13921
14081
|
if (isOpenHashTag) {
|
13922
14082
|
const res = previewData;
|
13923
14083
|
setData(res);
|
13924
|
-
setList((
|
14084
|
+
setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
|
13925
14085
|
setIsLoadingData(false);
|
13926
14086
|
}
|
13927
14087
|
}, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
|
@@ -13942,10 +14102,12 @@ Made in Italy` })));
|
|
13942
14102
|
// };
|
13943
14103
|
// }, [isLoadingData, containerRef, loadMoreData]);
|
13944
14104
|
const handleClickLink = () => {
|
13945
|
-
var _a, _b;
|
14105
|
+
var _a, _b, _c, _d, _e;
|
13946
14106
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
13947
14107
|
reportTagsView();
|
13948
|
-
|
14108
|
+
const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
|
14109
|
+
jumpToWeb(rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
|
14110
|
+
window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
|
13949
14111
|
}
|
13950
14112
|
};
|
13951
14113
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
@@ -14085,7 +14247,7 @@ Made in Italy` })));
|
|
14085
14247
|
* @Author: binruan@chatlabs.com
|
14086
14248
|
* @Date: 2024-01-15 19:03:09
|
14087
14249
|
* @LastEditors: binruan@chatlabs.com
|
14088
|
-
* @LastEditTime: 2024-
|
14250
|
+
* @LastEditTime: 2024-08-22 10:15:23
|
14089
14251
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\index.tsx
|
14090
14252
|
*
|
14091
14253
|
*/
|
@@ -14248,7 +14410,7 @@ Made in Italy` })));
|
|
14248
14410
|
* @Author: binruan@chatlabs.com
|
14249
14411
|
* @Date: 2024-07-02 14:51:32
|
14250
14412
|
* @LastEditors: binruan@chatlabs.com
|
14251
|
-
* @LastEditTime: 2024-
|
14413
|
+
* @LastEditTime: 2024-08-06 14:28:34
|
14252
14414
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\settingRender.tsx
|
14253
14415
|
*
|
14254
14416
|
*/
|
@@ -14351,6 +14513,10 @@ Made in Italy` })));
|
|
14351
14513
|
label: '对齐',
|
14352
14514
|
type: 'TextAlign',
|
14353
14515
|
name: ['props', 'ctaTempStyles', 'ctaTitle']
|
14516
|
+
},
|
14517
|
+
{
|
14518
|
+
type: 'TextSpace',
|
14519
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle']
|
14354
14520
|
}
|
14355
14521
|
]
|
14356
14522
|
}
|
@@ -15714,7 +15880,7 @@ Made in Italy` })));
|
|
15714
15880
|
* @Author: binruan@chatlabs.com
|
15715
15881
|
* @Date: 2023-12-26 16:11:34
|
15716
15882
|
* @LastEditors: binruan@chatlabs.com
|
15717
|
-
* @LastEditTime: 2024-
|
15883
|
+
* @LastEditTime: 2024-08-21 15:46:07
|
15718
15884
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
|
15719
15885
|
*
|
15720
15886
|
*/
|
@@ -15734,44 +15900,38 @@ Made in Italy` })));
|
|
15734
15900
|
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;
|
15735
15901
|
}
|
15736
15902
|
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
15737
|
-
const renderComp = React.
|
15738
|
-
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
|
15903
|
+
const renderComp = React.useCallback(() => {
|
15904
|
+
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;
|
15739
15905
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
15740
15906
|
return null;
|
15741
|
-
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) ;
|
15742
|
-
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) ;
|
15743
|
-
else {
|
15744
|
-
(_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;
|
15745
|
-
}
|
15746
15907
|
//如果includesCtaType有值,则只渲染includesCtaType包含的cta类型组件,用于在页面某处只显示某一组件
|
15747
|
-
if (includesCtaType && !(includesCtaType === null || includesCtaType === void 0 ? void 0 : includesCtaType.includes((
|
15908
|
+
if (includesCtaType && !(includesCtaType === null || includesCtaType === void 0 ? void 0 : includesCtaType.includes((_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type)))
|
15748
15909
|
return;
|
15749
15910
|
//默认不渲染category为cta类型的组件,该类型的组件只用于某一处
|
15750
|
-
if (!includesCtaType && ((
|
15911
|
+
if (!includesCtaType && ((_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.category) === 'cta')
|
15751
15912
|
return;
|
15752
|
-
if ((((
|
15753
|
-
(((
|
15754
|
-
(((
|
15755
|
-
(((
|
15756
|
-
(((
|
15757
|
-
(((
|
15913
|
+
if ((((_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.type) === 'CommodityDiro' && !((_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindProduct)) ||
|
15914
|
+
(((_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.type) === 'Commodity' && !((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct)) ||
|
15915
|
+
(((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.type) === 'CommodityDiroNew' && !((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.bindProduct)) ||
|
15916
|
+
(((_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.type) === 'MultiCommodity' && !((_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.bindProducts) === null || _l === void 0 ? void 0 : _l.length)) ||
|
15917
|
+
(((_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.type) === 'MultiCommodityDiro' && !((_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.bindProducts) === null || _p === void 0 ? void 0 : _p.length)) ||
|
15918
|
+
(((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.type) === 'MultiCommodityDiroNew' && !((_s = (_r = rec === null || rec === void 0 ? void 0 : rec.video) === null || _r === void 0 ? void 0 : _r.bindProducts) === null || _s === void 0 ? void 0 : _s.length))) {
|
15758
15919
|
//
|
15759
15920
|
return null;
|
15760
15921
|
}
|
15761
15922
|
if (value && resolver) {
|
15762
|
-
const t = resolver[(
|
15923
|
+
const t = resolver[(_t = value === null || value === void 0 ? void 0 : value.item) === null || _t === void 0 ? void 0 : _t.type];
|
15763
15924
|
const Component = withBindDataSource(t);
|
15764
|
-
const defaulSetting = (
|
15765
|
-
const isExternalLink = ((
|
15766
|
-
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (
|
15925
|
+
const defaulSetting = (_u = t === null || t === void 0 ? void 0 : t.extend) === null || _u === void 0 ? void 0 : _u.defaulSetting;
|
15926
|
+
const isExternalLink = ((_x = (_w = (_v = value === null || value === void 0 ? void 0 : value.item) === null || _v === void 0 ? void 0 : _v.event) === null || _w === void 0 ? void 0 : _w.onClick) === null || _x === void 0 ? void 0 : _x.linkType) === 'externalLink';
|
15927
|
+
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.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 })));
|
15767
15928
|
}
|
15768
15929
|
else {
|
15769
15930
|
return null;
|
15770
15931
|
}
|
15771
15932
|
}, [rec, resolver, tempMap, schema, value === null || value === void 0 ? void 0 : value.id, isActive]);
|
15772
|
-
return React.createElement(React.Fragment, null, renderComp);
|
15933
|
+
return React.createElement(React.Fragment, null, renderComp());
|
15773
15934
|
};
|
15774
|
-
var RenderCard$1 = React.memo(RenderCard);
|
15775
15935
|
|
15776
15936
|
/*
|
15777
15937
|
* @Author: binruan@chatlabs.com
|
@@ -15856,7 +16016,7 @@ Made in Italy` })));
|
|
15856
16016
|
* @Author: binruan@chatlabs.com
|
15857
16017
|
* @Date: 2024-01-15 19:03:09
|
15858
16018
|
* @LastEditors: binruan@chatlabs.com
|
15859
|
-
* @LastEditTime: 2024-08-
|
16019
|
+
* @LastEditTime: 2024-08-22 09:56:51
|
15860
16020
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
15861
16021
|
*
|
15862
16022
|
*/
|
@@ -15873,9 +16033,8 @@ Made in Italy` })));
|
|
15873
16033
|
const [isShowMore, setIsShowMore] = React.useState(false);
|
15874
16034
|
const [isReload, setIsReload] = React.useState(new Date().getTime());
|
15875
16035
|
const skipLinkRef = React.useRef(false);
|
15876
|
-
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
|
15877
|
-
const { backMainFeed } = useEventReport();
|
15878
|
-
const { productView } = useEventReport();
|
16036
|
+
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor } = useSxpDataSource();
|
16037
|
+
const { backMainFeed, productView, jumpToWeb } = useEventReport();
|
15879
16038
|
const isShowFingerTip = React.useMemo(() => {
|
15880
16039
|
return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
|
15881
16040
|
}, [data, loading, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip]);
|
@@ -15904,6 +16063,8 @@ Made in Italy` })));
|
|
15904
16063
|
}, [data.length, bffFbReport, h5EnterLink]);
|
15905
16064
|
React.useEffect(() => {
|
15906
16065
|
var _a;
|
16066
|
+
if (!ctaType || (ctaType === null || ctaType === void 0 ? void 0 : ctaType.length) < 1)
|
16067
|
+
return;
|
15907
16068
|
const index = (data === null || data === void 0 ? void 0 : data.findIndex((item) => {
|
15908
16069
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
15909
16070
|
const ctaType0 = ctaType === null || ctaType === void 0 ? void 0 : ctaType[0];
|
@@ -15917,8 +16078,9 @@ Made in Italy` })));
|
|
15917
16078
|
return ((_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.bindCta) === null || _f === void 0 ? void 0 : _f.itemId) === ctaType0 && (((_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.url) || ((_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.imgUrls) === null || _j === void 0 ? void 0 : _j.length));
|
15918
16079
|
}
|
15919
16080
|
})) || 0;
|
15920
|
-
(
|
15921
|
-
|
16081
|
+
if (index !== -1)
|
16082
|
+
(_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
|
16083
|
+
}, [data, ctaType, swiperRef]);
|
15922
16084
|
React.useEffect(() => {
|
15923
16085
|
const item = data === null || data === void 0 ? void 0 : data[activeIndex];
|
15924
16086
|
const visibleChange = () => {
|
@@ -16018,15 +16180,39 @@ Made in Italy` })));
|
|
16018
16180
|
const height = React.useMemo(() => {
|
16019
16181
|
return containerHeight - minusHeight - tagHeight;
|
16020
16182
|
}, [globalConfig, containerHeight, tagHeight]);
|
16183
|
+
const visList = React.useMemo(() => {
|
16184
|
+
var _a;
|
16185
|
+
const list = activeIndex === 0 && !waterFallData && !isEditor
|
16186
|
+
? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
|
16187
|
+
: data === null || data === void 0 ? void 0 : data.map((item, index) => {
|
16188
|
+
if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
|
16189
|
+
return item;
|
16190
|
+
}
|
16191
|
+
else {
|
16192
|
+
return null;
|
16193
|
+
}
|
16194
|
+
});
|
16195
|
+
return !waterFallData ? list.concat([{ loading: true }]) : list;
|
16196
|
+
}, [data, activeIndex, waterFallData, isEditor]);
|
16021
16197
|
const renderLogo = React.useMemo(() => {
|
16022
|
-
var _a, _b;
|
16198
|
+
var _a, _b, _c, _d;
|
16023
16199
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
16024
16200
|
const link = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoBar) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.value;
|
16025
|
-
|
16201
|
+
const isExternalLink = ((_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoBar) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
|
16202
|
+
const rec = visList[activeIndex];
|
16203
|
+
return (React.createElement("div", Object.assign({ className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } }, (link && {
|
16204
|
+
onClick: () => {
|
16205
|
+
var _a, _b, _c, _d;
|
16206
|
+
if (isExternalLink) {
|
16207
|
+
jumpToWeb(rec, (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindCta, activeIndex, ((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.traceInfo) || ((_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo));
|
16208
|
+
}
|
16209
|
+
new Function(link)();
|
16210
|
+
}
|
16211
|
+
})),
|
16026
16212
|
React.createElement("img", { src: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl, alt: 'logo' })));
|
16027
16213
|
}
|
16028
16214
|
return null;
|
16029
|
-
}, [globalConfig]);
|
16215
|
+
}, [globalConfig, activeIndex, visList]);
|
16030
16216
|
const renderContent = React.useCallback((rec, index) => {
|
16031
16217
|
var _a, _b, _c, _d;
|
16032
16218
|
if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
|
@@ -16081,12 +16267,12 @@ Made in Italy` })));
|
|
16081
16267
|
React.createElement("div", { className: 'clc-sxp-bottom', style: { paddingBottom: `${(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _b !== void 0 ? _b : 40}px` } },
|
16082
16268
|
React.createElement(Nudge, { nudge: nudge }),
|
16083
16269
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
16084
|
-
React.createElement(RenderCard
|
16270
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
16085
16271
|
React.createElement("div", null,
|
16086
16272
|
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.title) !== null && _d !== void 0 ? _d : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
|
16087
|
-
React.createElement(RenderCard
|
16273
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
|
16088
16274
|
React.createElement(Hashtag$1, { index: activeIndex, tags: (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.hashTags) !== null && _f !== void 0 ? _f : [], itemId: (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId, itemType: ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))),
|
16089
|
-
React.createElement(RenderCard
|
16275
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
16090
16276
|
}
|
16091
16277
|
return null;
|
16092
16278
|
}, [
|
@@ -16163,7 +16349,6 @@ Made in Italy` })));
|
|
16163
16349
|
traceInfo: (_u = (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : (_t = item === null || item === void 0 ? void 0 : item.product) === null || _t === void 0 ? void 0 : _t.traceInfo) !== null && _u !== void 0 ? _u : ''
|
16164
16350
|
}
|
16165
16351
|
});
|
16166
|
-
setSlideSkipState();
|
16167
16352
|
skipLinkRef.current = true;
|
16168
16353
|
window.location.href = window.getJointUtmLink(link);
|
16169
16354
|
}
|
@@ -16249,20 +16434,6 @@ Made in Italy` })));
|
|
16249
16434
|
});
|
16250
16435
|
}
|
16251
16436
|
};
|
16252
|
-
const visList = React.useMemo(() => {
|
16253
|
-
var _a;
|
16254
|
-
const list = activeIndex === 0 && !waterFallData
|
16255
|
-
? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
|
16256
|
-
: data === null || data === void 0 ? void 0 : data.map((item, index) => {
|
16257
|
-
if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
|
16258
|
-
return item;
|
16259
|
-
}
|
16260
|
-
else {
|
16261
|
-
return null;
|
16262
|
-
}
|
16263
|
-
});
|
16264
|
-
return !waterFallData ? list.concat([{ loading: true }]) : list;
|
16265
|
-
}, [data, activeIndex, waterFallData]);
|
16266
16437
|
const renderToggleButton = React.useCallback((visible) => {
|
16267
16438
|
var _a, _b, _c, _d, _e, _f;
|
16268
16439
|
if (!visible)
|
@@ -16271,6 +16442,7 @@ Made in Italy` })));
|
|
16271
16442
|
position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
|
16272
16443
|
visibility: ((_b = (_a = visList === null || visList === void 0 ? void 0 : visList[activeIndex]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.url) ? 'visible' : 'hidden',
|
16273
16444
|
zIndex: 999,
|
16445
|
+
transform: 'translate3d(0px,0px,0px)',
|
16274
16446
|
[(_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _c !== void 0 ? _c : 'right']: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _d !== void 0 ? _d : 0,
|
16275
16447
|
[(_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _e !== void 0 ? _e : 'bottom']: (_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _f !== void 0 ? _f : 23
|
16276
16448
|
}, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted })));
|
@@ -16289,10 +16461,10 @@ Made in Italy` })));
|
|
16289
16461
|
alignItems: 'center'
|
16290
16462
|
} },
|
16291
16463
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
|
16292
|
-
renderContent(rec, index),
|
16293
|
-
renderBottom(rec, index),
|
16294
16464
|
renderLikeButton(rec, index, !(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
|
16295
|
-
renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))
|
16465
|
+
renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
16466
|
+
renderBottom(rec, index),
|
16467
|
+
renderContent(rec, index)))))));
|
16296
16468
|
});
|
16297
16469
|
}, [
|
16298
16470
|
containerWidth,
|
@@ -16328,9 +16500,9 @@ Made in Italy` })));
|
|
16328
16500
|
return;
|
16329
16501
|
// 处理上滑下滑事件
|
16330
16502
|
handleScrollEvent(swiper);
|
16331
|
-
if (waterFallData)
|
16503
|
+
if (waterFallData || isEditor)
|
16332
16504
|
return;
|
16333
|
-
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) +
|
16505
|
+
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
|
16334
16506
|
if (!isLoadMore) {
|
16335
16507
|
setIsLoadMore(true);
|
16336
16508
|
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(Math.ceil(activeIndex / 10) + 1).then(() => {
|
@@ -16636,7 +16808,7 @@ Made in Italy` })));
|
|
16636
16808
|
const CTA = (rec, index) => {
|
16637
16809
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
|
16638
16810
|
return (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
16639
|
-
React.createElement(RenderCard
|
16811
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1 })));
|
16640
16812
|
}
|
16641
16813
|
return null;
|
16642
16814
|
};
|
@@ -16826,7 +16998,7 @@ Made in Italy` })));
|
|
16826
16998
|
* @Author: binruan@chatlabs.com
|
16827
16999
|
* @Date: 2023-12-26 10:38:53
|
16828
17000
|
* @LastEditors: binruan@chatlabs.com
|
16829
|
-
* @LastEditTime: 2024-
|
17001
|
+
* @LastEditTime: 2024-08-22 11:32:23
|
16830
17002
|
* @FilePath: \pb-sxp-ui\src\core\context\EditorDataProvider.tsx
|
16831
17003
|
*
|
16832
17004
|
*/
|
@@ -16856,7 +17028,8 @@ Made in Italy` })));
|
|
16856
17028
|
setOpenHashtag,
|
16857
17029
|
openConsent,
|
16858
17030
|
setOpenConsent,
|
16859
|
-
sxpFontLinks: data === null || data === void 0 ? void 0 : data.sxpFontLinks
|
17031
|
+
sxpFontLinks: data === null || data === void 0 ? void 0 : data.sxpFontLinks,
|
17032
|
+
utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter
|
16860
17033
|
} }, children));
|
16861
17034
|
};
|
16862
17035
|
function useEditorDataProvider() {
|