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/index.js
CHANGED
@@ -221,7 +221,7 @@ function getBrowserInfo() {
|
|
221
221
|
var _a, _b, _c, _d, _e, _f, _g;
|
222
222
|
let userAgent = self.navigator.userAgent;
|
223
223
|
if (!userAgent)
|
224
|
-
return
|
224
|
+
return null;
|
225
225
|
if (/edge\/([\d\.]+)/i.exec(userAgent))
|
226
226
|
return `Edge ${(_a = /edge\/([\d\.]+)/i.exec(userAgent)) === null || _a === void 0 ? void 0 : _a[1]}`;
|
227
227
|
if (/edg\/([\d\.]+)/i.exec(userAgent))
|
@@ -236,13 +236,13 @@ function getBrowserInfo() {
|
|
236
236
|
return `Firefox ${(_f = /firefox\/([\d\.]+)/i.exec(userAgent)) === null || _f === void 0 ? void 0 : _f[1]}`;
|
237
237
|
if (/safari/i.test(userAgent))
|
238
238
|
return `Safari ${(_g = /version\/([\d\.]+)/i.exec(userAgent)) === null || _g === void 0 ? void 0 : _g[1]}`;
|
239
|
-
return
|
239
|
+
return null;
|
240
240
|
}
|
241
241
|
function getSystem() {
|
242
242
|
var _a, _b, _c;
|
243
243
|
let userAgent = self.navigator.userAgent;
|
244
244
|
if (!userAgent)
|
245
|
-
return
|
245
|
+
return null;
|
246
246
|
if (/iphone/i.test(userAgent))
|
247
247
|
return `IOS ${(_a = userAgent.match(/OS\s(.*?)\slike/)) === null || _a === void 0 ? void 0 : _a[1]}`;
|
248
248
|
if (/android/i.test(userAgent))
|
@@ -251,12 +251,12 @@ function getSystem() {
|
|
251
251
|
return `Windows ${(_c = userAgent.match(/Windows\s(.*?)\;/)) === null || _c === void 0 ? void 0 : _c[1]}`;
|
252
252
|
if (/mac/i.test(userAgent))
|
253
253
|
return `Mac OS`;
|
254
|
-
return
|
254
|
+
return null;
|
255
255
|
}
|
256
256
|
function getDevice$1() {
|
257
257
|
let userAgent = self.navigator.userAgent;
|
258
258
|
if (!userAgent)
|
259
|
-
return
|
259
|
+
return null;
|
260
260
|
if (/iphone/i.test(userAgent))
|
261
261
|
return `iPhone`;
|
262
262
|
if (/android/i.test(userAgent)) {
|
@@ -279,7 +279,7 @@ function getDevice$1() {
|
|
279
279
|
return `Windows`;
|
280
280
|
if (/mac/i.test(userAgent))
|
281
281
|
return `Mac`;
|
282
|
-
return
|
282
|
+
return null;
|
283
283
|
}
|
284
284
|
function getCookie(val) {
|
285
285
|
// const expirationDate = new Date();
|
@@ -696,8 +696,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
696
696
|
}, [bffDataSource]);
|
697
697
|
// 获取推荐视频数据
|
698
698
|
const getRecommendVideos = useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
|
699
|
-
var _d, _e, _f, _g, _h;
|
700
|
-
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}]` }));
|
699
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
700
|
+
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 });
|
701
701
|
if (utmVal) {
|
702
702
|
const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
|
703
703
|
var _a, _b;
|
@@ -706,8 +706,35 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
706
706
|
})) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
|
707
707
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
708
708
|
}
|
709
|
-
if (
|
710
|
-
query = Object.assign(Object.assign(
|
709
|
+
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
710
|
+
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 });
|
711
|
+
}
|
712
|
+
if (isEditor) {
|
713
|
+
let pageNum = 1;
|
714
|
+
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] }));
|
715
|
+
if (!(query === null || query === void 0 ? void 0 : query.channel) || isInit.current)
|
716
|
+
return;
|
717
|
+
isInit.current = true;
|
718
|
+
let list = [];
|
719
|
+
let result = null;
|
720
|
+
const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
|
721
|
+
var _r, _s, _t, _u, _v, _w;
|
722
|
+
query.pageNum = pageNum;
|
723
|
+
result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
724
|
+
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
725
|
+
return undefined;
|
726
|
+
}
|
727
|
+
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));
|
728
|
+
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 : []);
|
729
|
+
if (isNotNullList) {
|
730
|
+
pageNum = pageNum + 1;
|
731
|
+
yield recurveRecList(query);
|
732
|
+
}
|
733
|
+
});
|
734
|
+
yield recurveRecList(query);
|
735
|
+
if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
|
736
|
+
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 });
|
737
|
+
return Object.assign(Object.assign({}, result.data), { recList: list });
|
711
738
|
}
|
712
739
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
713
740
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
@@ -715,15 +742,20 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
715
742
|
}
|
716
743
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag))
|
717
744
|
setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
|
745
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
|
746
|
+
let list = [];
|
747
|
+
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 : []);
|
748
|
+
return Object.assign(Object.assign({}, result.data), { recList: list });
|
749
|
+
}
|
718
750
|
return result === null || result === void 0 ? void 0 : result.data;
|
719
|
-
}), [bffFetch, utmVal, maxSize, defaultSize,
|
720
|
-
const loadVideos = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
721
|
-
var
|
751
|
+
}), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList]);
|
752
|
+
const loadVideos = useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
|
753
|
+
var _x, _y, _z, _0;
|
722
754
|
if (rtcList.length <= 0) {
|
723
755
|
return;
|
724
756
|
}
|
725
757
|
const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
|
726
|
-
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((
|
758
|
+
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 })));
|
727
759
|
setRtcList(rtcList.concat(getFilterRecList(data)));
|
728
760
|
setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
|
729
761
|
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
@@ -740,7 +772,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
740
772
|
};
|
741
773
|
}
|
742
774
|
const sessionID = storeAndLoadFeSessionId();
|
743
|
-
const ef = Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), { sxpDevice: getDevice$1(), sxpSystem: getSystem(), sxpBrowser: getBrowserInfo() });
|
775
|
+
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() }));
|
744
776
|
const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
|
745
777
|
const realEventInfo = Object.entries(ef)
|
746
778
|
.map(([k, v]) => v && { name: k, value: v })
|
@@ -756,24 +788,21 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
756
788
|
});
|
757
789
|
}, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
|
758
790
|
const bffFbReport = useCallback((_a) => {
|
759
|
-
var _b, _c;
|
791
|
+
var _b, _c, _d;
|
760
792
|
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;
|
761
793
|
if (!enableReportEvent || !enabledMetaConversionApi || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
762
794
|
return;
|
763
795
|
}
|
764
796
|
const fakeUserId = storeAndLoadFeUserId();
|
797
|
+
const urlParams = new URLSearchParams(window.location.search);
|
798
|
+
const fbclid = urlParams.get('fbclid');
|
765
799
|
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/fb/events', {
|
766
800
|
method: 'POST',
|
767
801
|
body: {
|
768
802
|
eventName,
|
769
803
|
actionSource,
|
770
804
|
eventSourceUrl,
|
771
|
-
userData: {
|
772
|
-
externalId: fakeUserId,
|
773
|
-
fbc: `fb.2.${new Date().getTime()}.${getCookie('_fbc')}`,
|
774
|
-
fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}`,
|
775
|
-
client_user_agent: (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent
|
776
|
-
}
|
805
|
+
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 : '' })
|
777
806
|
},
|
778
807
|
type: 'beacon'
|
779
808
|
});
|
@@ -792,17 +821,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
792
821
|
}), [bffFetch]);
|
793
822
|
// 获取 Tag
|
794
823
|
const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
795
|
-
var
|
824
|
+
var _1, _2, _3, _4, _5;
|
796
825
|
if (!utmVal || !isShowTag)
|
797
826
|
return;
|
798
827
|
try {
|
799
|
-
const val = (
|
828
|
+
const val = (_3 = (_2 = (_1 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _1 === void 0 ? void 0 : _1.filter((val) => {
|
800
829
|
var _a, _b;
|
801
830
|
const key = val.split('=')[0];
|
802
831
|
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);
|
803
|
-
})) === null ||
|
832
|
+
})) === null || _2 === void 0 ? void 0 : _2.join('&')) !== null && _3 !== void 0 ? _3 : '';
|
804
833
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
805
|
-
setTagList((
|
834
|
+
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 : []);
|
806
835
|
}
|
807
836
|
catch (e) {
|
808
837
|
console.log('e', e);
|
@@ -875,11 +904,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
875
904
|
}
|
876
905
|
});
|
877
906
|
setLoading(false);
|
878
|
-
isInit.current = true;
|
879
907
|
});
|
880
908
|
}, [isShowConsent]);
|
881
909
|
useEffect(() => {
|
882
|
-
if (!
|
910
|
+
if (!isPreview)
|
883
911
|
return;
|
884
912
|
setLoading(true);
|
885
913
|
bffGetTagList();
|
@@ -889,6 +917,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
889
917
|
setCacheRtcList(getFilterRecList(data));
|
890
918
|
})
|
891
919
|
.finally(() => {
|
920
|
+
bffEventReport({
|
921
|
+
eventInfo: {
|
922
|
+
eventSubject: 'apiRequest',
|
923
|
+
eventDescription: 'api request succeed'
|
924
|
+
}
|
925
|
+
});
|
892
926
|
setLoading(false);
|
893
927
|
});
|
894
928
|
}, [getRecommendVideos, bffGetTagList]);
|
@@ -939,7 +973,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
939
973
|
setSelectTag,
|
940
974
|
globalConfig,
|
941
975
|
popupCurTimeRef,
|
942
|
-
checkCommodityIndexRef
|
976
|
+
checkCommodityIndexRef,
|
977
|
+
isEditor
|
943
978
|
} }, 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({
|
944
979
|
rtcList,
|
945
980
|
mutateLike: bffMutateLike,
|
@@ -1094,6 +1129,7 @@ const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSo
|
|
1094
1129
|
});
|
1095
1130
|
typeof window !== 'undefined' &&
|
1096
1131
|
(window.getJointUtmLink = (url) => {
|
1132
|
+
setSlideSkipState();
|
1097
1133
|
if ((url === null || url === void 0 ? void 0 : url.indexOf('?')) !== -1) {
|
1098
1134
|
return url + (utmVal ? '&' + utmVal : '');
|
1099
1135
|
}
|
@@ -1266,6 +1302,11 @@ var settingRender$a = [
|
|
1266
1302
|
type: 'TextAlign',
|
1267
1303
|
name: ['textStyle']
|
1268
1304
|
},
|
1305
|
+
{
|
1306
|
+
label: '标题间距',
|
1307
|
+
type: 'TextSpace',
|
1308
|
+
name: ['textStyle']
|
1309
|
+
},
|
1269
1310
|
{
|
1270
1311
|
label: '表单布局',
|
1271
1312
|
type: 'Radius',
|
@@ -1324,10 +1365,12 @@ var settingRender$a = [
|
|
1324
1365
|
]
|
1325
1366
|
},
|
1326
1367
|
{
|
1368
|
+
label: '提交按钮文本样式',
|
1327
1369
|
type: 'TextStyle',
|
1328
1370
|
name: ['props', 'submitButtonStyle']
|
1329
1371
|
},
|
1330
1372
|
{
|
1373
|
+
label: '提交按钮对齐',
|
1331
1374
|
type: 'TextAlign',
|
1332
1375
|
name: ['props', 'submitButtonStyle']
|
1333
1376
|
},
|
@@ -1335,6 +1378,11 @@ var settingRender$a = [
|
|
1335
1378
|
label: '提交按钮颜色',
|
1336
1379
|
type: 'Color',
|
1337
1380
|
name: ['props', 'submitBgColor']
|
1381
|
+
},
|
1382
|
+
{
|
1383
|
+
label: '提交按钮间距',
|
1384
|
+
type: 'TextSpace',
|
1385
|
+
name: ['props', 'submitButtonStyle']
|
1338
1386
|
}
|
1339
1387
|
// {
|
1340
1388
|
// label: '接收内容接口地址',
|
@@ -1375,7 +1423,7 @@ var settingRender$a = [
|
|
1375
1423
|
*/
|
1376
1424
|
function useEventReport() {
|
1377
1425
|
const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
|
1378
|
-
const jumpToWeb = useCallback((data, product, cta, position) => {
|
1426
|
+
const jumpToWeb = useCallback((data, product, cta, position, traceInfo) => {
|
1379
1427
|
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;
|
1380
1428
|
let fromKName = '';
|
1381
1429
|
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))) {
|
@@ -1408,7 +1456,7 @@ function useEventReport() {
|
|
1408
1456
|
position: position + '',
|
1409
1457
|
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 : '',
|
1410
1458
|
ctatId: (_w = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _w !== void 0 ? _w : '',
|
1411
|
-
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 : ''
|
1459
|
+
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 : ''
|
1412
1460
|
}
|
1413
1461
|
});
|
1414
1462
|
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
@@ -1813,6 +1861,16 @@ var settingRender$9 = [
|
|
1813
1861
|
label: '默认行数',
|
1814
1862
|
type: 'Number',
|
1815
1863
|
name: ['lineClamp']
|
1864
|
+
},
|
1865
|
+
{
|
1866
|
+
label: '间距',
|
1867
|
+
type: 'TextSpace'
|
1868
|
+
},
|
1869
|
+
{
|
1870
|
+
label: '价格千分符展示',
|
1871
|
+
type: 'Switch',
|
1872
|
+
name: ['enableFormattedPrice'],
|
1873
|
+
initialValue: true
|
1816
1874
|
}
|
1817
1875
|
]
|
1818
1876
|
}
|
@@ -1898,6 +1956,11 @@ var settingRender$9 = [
|
|
1898
1956
|
{
|
1899
1957
|
type: 'TextAlign',
|
1900
1958
|
name: ['props', 'buttonStyle']
|
1959
|
+
},
|
1960
|
+
{
|
1961
|
+
label: '间距',
|
1962
|
+
type: 'TextSpace',
|
1963
|
+
name: ['props', 'buttonStyle']
|
1901
1964
|
}
|
1902
1965
|
]
|
1903
1966
|
},
|
@@ -8740,13 +8803,13 @@ SwiperSlide.displayName = 'SwiperSlide';
|
|
8740
8803
|
* @Author: binruan@chatlabs.com
|
8741
8804
|
* @Date: 2023-11-02 18:34:34
|
8742
8805
|
* @LastEditors: binruan@chatlabs.com
|
8743
|
-
* @LastEditTime: 2024-08-
|
8806
|
+
* @LastEditTime: 2024-08-20 18:29:11
|
8744
8807
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
|
8745
8808
|
*
|
8746
8809
|
*/
|
8747
8810
|
const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
8748
8811
|
const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
|
8749
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
8812
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
8750
8813
|
const touchRef = useRef(null);
|
8751
8814
|
const fTouchRef = useRef(null);
|
8752
8815
|
const touchMoveRef = useRef(null);
|
@@ -8871,7 +8934,8 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
8871
8934
|
React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
|
8872
8935
|
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' })),
|
8873
8936
|
React.createElement("div", { ref: ref, style: {
|
8874
|
-
height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H
|
8937
|
+
height: (_x = (isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H) -
|
8938
|
+
((_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,
|
8875
8939
|
overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
|
8876
8940
|
} }, children)))))), modalEleRef.current);
|
8877
8941
|
};
|
@@ -9039,7 +9103,7 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
|
|
9039
9103
|
var CommodityGroup$1 = memo(CommodityGroup);
|
9040
9104
|
|
9041
9105
|
const CommodityDetail$1 = (_a) => {
|
9042
|
-
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;
|
9106
|
+
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;
|
9043
9107
|
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"]);
|
9044
9108
|
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
|
9045
9109
|
const { jumpToWeb, productView } = useEventReport();
|
@@ -9047,6 +9111,7 @@ const CommodityDetail$1 = (_a) => {
|
|
9047
9111
|
const [showModal, setShowModal] = useState(false);
|
9048
9112
|
const [show3DModal, setShow3DModal] = useState(false);
|
9049
9113
|
const [checkCommodityIndex, setCheckCommodityIndex] = useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
|
9114
|
+
const ref = useRef();
|
9050
9115
|
const data = isPost ? rec : popupDetailData;
|
9051
9116
|
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];
|
9052
9117
|
let cta = isPost
|
@@ -9086,17 +9151,20 @@ const CommodityDetail$1 = (_a) => {
|
|
9086
9151
|
};
|
9087
9152
|
}, []);
|
9088
9153
|
const priceText = useMemo(() => {
|
9089
|
-
var _a, _b, _c, _d, _e;
|
9154
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
9155
|
+
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);
|
9090
9156
|
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
9091
|
-
return `${(
|
9092
|
-
|
9093
|
-
|
9157
|
+
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
|
9158
|
+
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
9159
|
+
minimumFractionDigits: 0
|
9160
|
+
})) !== null && _g !== void 0 ? _g : ''
|
9161
|
+
: product === null || product === void 0 ? void 0 : product.price}`;
|
9094
9162
|
}
|
9095
9163
|
else {
|
9096
9164
|
return '$7,000';
|
9097
9165
|
}
|
9098
|
-
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
|
9099
|
-
const width = (isPreview ? 375 : (
|
9166
|
+
}, [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]);
|
9167
|
+
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;
|
9100
9168
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
9101
9169
|
const renderContent = ({ isPost }) => {
|
9102
9170
|
var _a, _b, _c, _d;
|
@@ -9137,6 +9205,10 @@ const CommodityDetail$1 = (_a) => {
|
|
9137
9205
|
popupCurTimeRef.current = new Date();
|
9138
9206
|
setCheckCommodityIndex(index);
|
9139
9207
|
checkCommodityIndexRef.current = index;
|
9208
|
+
if (ref === null || ref === void 0 ? void 0 : ref.current) {
|
9209
|
+
ref.current.swiper.slideTo(0);
|
9210
|
+
ref.current.swiper.autoplay.start();
|
9211
|
+
}
|
9140
9212
|
}, []);
|
9141
9213
|
const renderCommodityGroup = useCallback(() => {
|
9142
9214
|
var _a, _b, _c;
|
@@ -9152,18 +9224,18 @@ const CommodityDetail$1 = (_a) => {
|
|
9152
9224
|
};
|
9153
9225
|
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
9154
9226
|
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
9155
|
-
const iframeUrl = ((
|
9227
|
+
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);
|
9156
9228
|
return (React.createElement(React.Fragment, null,
|
9157
9229
|
React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
|
9158
9230
|
React.createElement("div", { style: { position: 'relative' } },
|
9159
|
-
product && ((
|
9231
|
+
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: {
|
9160
9232
|
clickable: true,
|
9161
9233
|
bulletActiveClass: 'swipe-item-active-bullet',
|
9162
9234
|
clickableClass: getDotsAlign
|
9163
9235
|
}, loop: true, autoplay: {
|
9164
9236
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
9165
|
-
} },
|
9166
|
-
React.createElement(React.Fragment, null, (
|
9237
|
+
}, ref: ref },
|
9238
|
+
React.createElement(React.Fragment, null, (_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.map((src) => {
|
9167
9239
|
var _a;
|
9168
9240
|
return (React.createElement(SwiperSlide, { key: src },
|
9169
9241
|
React.createElement("div", { style: {
|
@@ -9179,7 +9251,7 @@ const CommodityDetail$1 = (_a) => {
|
|
9179
9251
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
9180
9252
|
}, 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 }))));
|
9181
9253
|
})))),
|
9182
|
-
!((
|
9254
|
+
!((_4 = product === null || product === void 0 ? void 0 : product.homePage) === null || _4 === void 0 ? void 0 : _4.length) && (React.createElement("div", { className: css({
|
9183
9255
|
height,
|
9184
9256
|
width
|
9185
9257
|
}) },
|
@@ -9187,21 +9259,20 @@ const CommodityDetail$1 = (_a) => {
|
|
9187
9259
|
objectFit: 'cover',
|
9188
9260
|
width: '100%',
|
9189
9261
|
height: '100%'
|
9190
|
-
}), src: (
|
9191
|
-
(iframeUrl && iframeIcon
|
9192
|
-
|
9193
|
-
|
9194
|
-
|
9195
|
-
|
9196
|
-
|
9197
|
-
|
9198
|
-
|
9199
|
-
|
9200
|
-
|
9201
|
-
|
9202
|
-
|
9203
|
-
|
9204
|
-
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
|
9262
|
+
}), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
|
9263
|
+
(iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
|
9264
|
+
padding: '5px 10px',
|
9265
|
+
display: 'flex',
|
9266
|
+
alignItems: 'center',
|
9267
|
+
position: 'absolute',
|
9268
|
+
right: '10px',
|
9269
|
+
bottom: '10px',
|
9270
|
+
zIndex: 1,
|
9271
|
+
background: '#fff',
|
9272
|
+
borderRadius: '3px'
|
9273
|
+
}, onClick: () => setShow3DModal(true) },
|
9274
|
+
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
|
9275
|
+
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D")))),
|
9205
9276
|
renderCommodityGroup(),
|
9206
9277
|
React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
|
9207
9278
|
renderBtn(),
|
@@ -9333,7 +9404,7 @@ var interactionRender$c = [
|
|
9333
9404
|
* @Author: binruan@chatlabs.com
|
9334
9405
|
* @Date: 2023-10-27 14:06:35
|
9335
9406
|
* @LastEditors: binruan@chatlabs.com
|
9336
|
-
* @LastEditTime: 2024-08-
|
9407
|
+
* @LastEditTime: 2024-08-20 14:01:21
|
9337
9408
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
|
9338
9409
|
*
|
9339
9410
|
*/
|
@@ -9400,6 +9471,11 @@ var settingRender$8 = [
|
|
9400
9471
|
}
|
9401
9472
|
]
|
9402
9473
|
},
|
9474
|
+
{
|
9475
|
+
label: '内容字体间距',
|
9476
|
+
type: 'TextSpace',
|
9477
|
+
name: ['props', 'contentStyle']
|
9478
|
+
},
|
9403
9479
|
{
|
9404
9480
|
type: 'Group',
|
9405
9481
|
label: '提交按钮字体',
|
@@ -9433,6 +9509,11 @@ var settingRender$8 = [
|
|
9433
9509
|
}
|
9434
9510
|
]
|
9435
9511
|
},
|
9512
|
+
{
|
9513
|
+
label: '提交按钮间距',
|
9514
|
+
type: 'TextSpace',
|
9515
|
+
name: ['props', 'submitButtonStyle']
|
9516
|
+
},
|
9436
9517
|
{
|
9437
9518
|
type: 'TextStyle',
|
9438
9519
|
name: ['props', 'submitButtonStyle']
|
@@ -9543,7 +9624,7 @@ const Prompt = createMaterial(PromptComponent, {
|
|
9543
9624
|
* @Author: binruan@chatlabs.com
|
9544
9625
|
* @Date: 2024-03-26 16:50:25
|
9545
9626
|
* @LastEditors: binruan@chatlabs.com
|
9546
|
-
* @LastEditTime: 2024-08-
|
9627
|
+
* @LastEditTime: 2024-08-20 15:50:06
|
9547
9628
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
|
9548
9629
|
*
|
9549
9630
|
*/
|
@@ -9740,6 +9821,16 @@ var settingRender$7 = [
|
|
9740
9821
|
label: '默认行数',
|
9741
9822
|
type: 'Number',
|
9742
9823
|
name: ['lineClamp']
|
9824
|
+
},
|
9825
|
+
{
|
9826
|
+
label: '间距',
|
9827
|
+
type: 'TextSpace'
|
9828
|
+
},
|
9829
|
+
{
|
9830
|
+
label: '价格千分符展示',
|
9831
|
+
type: 'Switch',
|
9832
|
+
name: ['enableFormattedPrice'],
|
9833
|
+
initialValue: true
|
9743
9834
|
}
|
9744
9835
|
]
|
9745
9836
|
}
|
@@ -9825,6 +9916,11 @@ var settingRender$7 = [
|
|
9825
9916
|
{
|
9826
9917
|
type: 'TextAlign',
|
9827
9918
|
name: ['props', 'buttonStyle']
|
9919
|
+
},
|
9920
|
+
{
|
9921
|
+
label: '间距',
|
9922
|
+
type: 'TextSpace',
|
9923
|
+
name: ['props', 'buttonStyle']
|
9828
9924
|
}
|
9829
9925
|
]
|
9830
9926
|
},
|
@@ -9842,7 +9938,7 @@ var settingRender$7 = [
|
|
9842
9938
|
];
|
9843
9939
|
|
9844
9940
|
const CommodityDetailDiroNew$1 = (_a) => {
|
9845
|
-
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;
|
9941
|
+
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;
|
9846
9942
|
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"]);
|
9847
9943
|
useState(true);
|
9848
9944
|
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
|
@@ -9854,6 +9950,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
9854
9950
|
const curTimeRef = useRef(null);
|
9855
9951
|
const [show3DModal, setShow3DModal] = useState(false);
|
9856
9952
|
const [checkCommodityIndex, setCheckCommodityIndex] = useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
|
9953
|
+
const ref = useRef();
|
9857
9954
|
const data = isPost ? rec : popupDetailData;
|
9858
9955
|
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];
|
9859
9956
|
let cta = isPost
|
@@ -9893,17 +9990,20 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
9893
9990
|
};
|
9894
9991
|
}, []);
|
9895
9992
|
const priceText = useMemo(() => {
|
9896
|
-
var _a, _b, _c, _d, _e;
|
9993
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
9994
|
+
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);
|
9897
9995
|
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
9898
|
-
return `${(
|
9899
|
-
|
9900
|
-
|
9996
|
+
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
|
9997
|
+
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
9998
|
+
minimumFractionDigits: 0
|
9999
|
+
})) !== null && _g !== void 0 ? _g : ''
|
10000
|
+
: product === null || product === void 0 ? void 0 : product.price}`;
|
9901
10001
|
}
|
9902
10002
|
else {
|
9903
10003
|
return '£102,300.00';
|
9904
10004
|
}
|
9905
|
-
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
|
9906
|
-
const width = (isPreview ? 375 : (
|
10005
|
+
}, [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]);
|
10006
|
+
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;
|
9907
10007
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
9908
10008
|
// useEffect(() => {
|
9909
10009
|
// console.log(scrollRef?.current?.scrollHeight, window.innerHeight);
|
@@ -9971,6 +10071,10 @@ Made in Italy` })));
|
|
9971
10071
|
popupCurTimeRef.current = new Date();
|
9972
10072
|
setCheckCommodityIndex(index);
|
9973
10073
|
checkCommodityIndexRef.current = index;
|
10074
|
+
if (ref === null || ref === void 0 ? void 0 : ref.current) {
|
10075
|
+
ref.current.swiper.slideTo(0);
|
10076
|
+
ref.current.swiper.autoplay.start();
|
10077
|
+
}
|
9974
10078
|
}, []);
|
9975
10079
|
const renderCommodityGroup = useCallback(() => {
|
9976
10080
|
var _a, _b, _c;
|
@@ -9986,17 +10090,17 @@ Made in Italy` })));
|
|
9986
10090
|
};
|
9987
10091
|
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
9988
10092
|
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
9989
|
-
const iframeUrl = ((
|
10093
|
+
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);
|
9990
10094
|
return (React.createElement("div", { className: 'pb-commondityDiroNew' },
|
9991
10095
|
React.createElement("div", Object.assign({ className: css(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
|
9992
10096
|
React.createElement("div", { style: { position: 'relative' } },
|
9993
|
-
product && ((
|
10097
|
+
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: {
|
9994
10098
|
clickable: true,
|
9995
10099
|
bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
|
9996
10100
|
clickableClass: getDotsAlign
|
9997
10101
|
}, loop: true, autoplay: {
|
9998
10102
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
9999
|
-
} }, (
|
10103
|
+
}, ref: ref }, (_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.map((src) => {
|
10000
10104
|
var _a;
|
10001
10105
|
return (React.createElement(SwiperSlide, { key: src },
|
10002
10106
|
React.createElement("div", { style: {
|
@@ -10012,7 +10116,7 @@ Made in Italy` })));
|
|
10012
10116
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
10013
10117
|
}, 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 }))));
|
10014
10118
|
}))),
|
10015
|
-
!((
|
10119
|
+
!((_4 = product === null || product === void 0 ? void 0 : product.homePage) === null || _4 === void 0 ? void 0 : _4.length) && (React.createElement("div", { className: css({
|
10016
10120
|
height,
|
10017
10121
|
width
|
10018
10122
|
}) },
|
@@ -10020,27 +10124,26 @@ Made in Italy` })));
|
|
10020
10124
|
objectFit: 'cover',
|
10021
10125
|
width: '100%',
|
10022
10126
|
height: '100%'
|
10023
|
-
}), src: (
|
10024
|
-
(iframeUrl && iframeIcon
|
10025
|
-
|
10026
|
-
|
10027
|
-
|
10028
|
-
|
10029
|
-
|
10030
|
-
|
10031
|
-
|
10032
|
-
|
10033
|
-
|
10034
|
-
|
10035
|
-
|
10036
|
-
|
10037
|
-
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
|
10127
|
+
}), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
|
10128
|
+
(iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
|
10129
|
+
padding: '5px 10px',
|
10130
|
+
display: 'flex',
|
10131
|
+
alignItems: 'center',
|
10132
|
+
position: 'absolute',
|
10133
|
+
right: '10px',
|
10134
|
+
bottom: '10px',
|
10135
|
+
zIndex: 1,
|
10136
|
+
background: '#fff',
|
10137
|
+
borderRadius: '3px'
|
10138
|
+
}, onClick: () => setShow3DModal(true) },
|
10139
|
+
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
|
10140
|
+
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D")))),
|
10038
10141
|
renderCommodityGroup(),
|
10039
10142
|
React.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
10040
10143
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
10041
10144
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
10042
10145
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
|
10043
|
-
__html: setFontForText((
|
10146
|
+
__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)
|
10044
10147
|
} }),
|
10045
10148
|
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: {
|
10046
10149
|
__html: setFontForText((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
@@ -10050,11 +10153,11 @@ Made in Italy` })));
|
|
10050
10153
|
__html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
10051
10154
|
} }),
|
10052
10155
|
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: {
|
10053
|
-
__html: setFontForText((
|
10156
|
+
__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)
|
10054
10157
|
} }))),
|
10055
|
-
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (
|
10158
|
+
(!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 },
|
10056
10159
|
React.createElement("span", { dangerouslySetInnerHTML: {
|
10057
|
-
__html: setFontForText((
|
10160
|
+
__html: setFontForText((_9 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _9 !== void 0 ? _9 : 'Shop now', buttonStyle)
|
10058
10161
|
} }))),
|
10059
10162
|
productInfoText({ isPost }))),
|
10060
10163
|
React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
|
@@ -10172,7 +10275,7 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
|
|
10172
10275
|
* @Author: binruan@chatlabs.com
|
10173
10276
|
* @Date: 2024-03-26 16:50:25
|
10174
10277
|
* @LastEditors: binruan@chatlabs.com
|
10175
|
-
* @LastEditTime: 2024-
|
10278
|
+
* @LastEditTime: 2024-08-06 14:09:52
|
10176
10279
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\settingRender.tsx
|
10177
10280
|
*
|
10178
10281
|
*/
|
@@ -10309,6 +10412,16 @@ var settingRender$6 = [
|
|
10309
10412
|
{
|
10310
10413
|
label: '标题对齐',
|
10311
10414
|
type: 'TextAlign'
|
10415
|
+
},
|
10416
|
+
{
|
10417
|
+
label: '间距',
|
10418
|
+
type: 'TextSpace'
|
10419
|
+
},
|
10420
|
+
{
|
10421
|
+
label: '价格千分符展示',
|
10422
|
+
type: 'Switch',
|
10423
|
+
name: ['enableFormattedPrice'],
|
10424
|
+
initialValue: true
|
10312
10425
|
}
|
10313
10426
|
]
|
10314
10427
|
}
|
@@ -10461,7 +10574,7 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle, enableEventRe
|
|
10461
10574
|
var Img$1 = memo(Img);
|
10462
10575
|
|
10463
10576
|
const CommodityList$1 = (_a) => {
|
10464
|
-
var _b, _c;
|
10577
|
+
var _b, _c, _d;
|
10465
10578
|
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"]);
|
10466
10579
|
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
|
10467
10580
|
const { jumpToWeb } = useEventReport();
|
@@ -10470,16 +10583,20 @@ const CommodityList$1 = (_a) => {
|
|
10470
10583
|
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];
|
10471
10584
|
const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
10472
10585
|
const priceText = useCallback((product) => {
|
10473
|
-
var _a, _b, _c, _d, _e;
|
10586
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
10587
|
+
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);
|
10474
10588
|
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
10475
|
-
return `${(
|
10476
|
-
|
10477
|
-
|
10589
|
+
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
|
10590
|
+
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
10591
|
+
minimumFractionDigits: 0
|
10592
|
+
})) !== null && _g !== void 0 ? _g : ''
|
10593
|
+
: product === null || product === void 0 ? void 0 : product.price}`;
|
10478
10594
|
}
|
10479
10595
|
else {
|
10480
|
-
|
10596
|
+
const p = 7000;
|
10597
|
+
return `$${isToLocStr ? p.toLocaleString() : p}`;
|
10481
10598
|
}
|
10482
|
-
}, []);
|
10599
|
+
}, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice]);
|
10483
10600
|
const handleClick = throttle((item, multiCheckIndex) => {
|
10484
10601
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
10485
10602
|
eventSubject: 'clickCta',
|
@@ -10640,15 +10757,16 @@ var settingRender$5 = [
|
|
10640
10757
|
|
10641
10758
|
const Iframe$1 = (_a) => {
|
10642
10759
|
var _b, _c;
|
10643
|
-
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"]);
|
10760
|
+
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"]);
|
10644
10761
|
const { popupDetailData } = useSxpDataSource();
|
10645
10762
|
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;
|
10646
|
-
return (React.createElement("div", Object.assign({ className: `${css(Object.assign({}, style)
|
10647
|
-
|
10648
|
-
|
10649
|
-
|
10650
|
-
|
10651
|
-
|
10763
|
+
return (React.createElement("div", Object.assign({ className: `${css(Object.assign(Object.assign({}, style), { height: isTel ? 664 : '100%' }))}` }, props),
|
10764
|
+
React.createElement("iframe", { src: iframeUrl, style: {
|
10765
|
+
width: '100%',
|
10766
|
+
height: 'calc(100% - 50px)',
|
10767
|
+
marginTop: '40px',
|
10768
|
+
border: 'none'
|
10769
|
+
} })));
|
10652
10770
|
};
|
10653
10771
|
var IframeComponent = memo(Iframe$1);
|
10654
10772
|
|
@@ -11134,7 +11252,7 @@ const Appoint = createMaterial(AppointComponent, {
|
|
11134
11252
|
* @Author: binruan@chatlabs.com
|
11135
11253
|
* @Date: 2024-07-02 14:51:32
|
11136
11254
|
* @LastEditors: binruan@chatlabs.com
|
11137
|
-
* @LastEditTime: 2024-
|
11255
|
+
* @LastEditTime: 2024-08-06 14:51:18
|
11138
11256
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\settingRender.tsx
|
11139
11257
|
*
|
11140
11258
|
*/
|
@@ -11231,6 +11349,11 @@ var linkSettingRender = [
|
|
11231
11349
|
type: 'TextAlign',
|
11232
11350
|
name: ['props', 'customTitle', 'style']
|
11233
11351
|
},
|
11352
|
+
{
|
11353
|
+
label: '间距',
|
11354
|
+
type: 'TextSpace',
|
11355
|
+
name: ['props', 'customTitle', 'style']
|
11356
|
+
},
|
11234
11357
|
{
|
11235
11358
|
label: '上边距',
|
11236
11359
|
type: 'Number',
|
@@ -11888,7 +12011,7 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
|
|
11888
12011
|
* @Author: binruan@chatlabs.com
|
11889
12012
|
* @Date: 2024-04-07 14:07:12
|
11890
12013
|
* @LastEditors: binruan@chatlabs.com
|
11891
|
-
* @LastEditTime: 2024-
|
12014
|
+
* @LastEditTime: 2024-08-22 10:14:36
|
11892
12015
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
|
11893
12016
|
*
|
11894
12017
|
*/
|
@@ -11993,6 +12116,16 @@ var settingRender$3 = [
|
|
11993
12116
|
{
|
11994
12117
|
label: '标题对齐',
|
11995
12118
|
type: 'TextAlign'
|
12119
|
+
},
|
12120
|
+
{
|
12121
|
+
label: '间距',
|
12122
|
+
type: 'TextSpace'
|
12123
|
+
},
|
12124
|
+
{
|
12125
|
+
label: '价格千分符展示',
|
12126
|
+
type: 'Switch',
|
12127
|
+
name: ['enableFormattedPrice'],
|
12128
|
+
initialValue: true
|
11996
12129
|
}
|
11997
12130
|
]
|
11998
12131
|
}
|
@@ -12078,6 +12211,11 @@ var settingRender$3 = [
|
|
12078
12211
|
{
|
12079
12212
|
type: 'TextAlign',
|
12080
12213
|
name: ['props', 'buttonStyle']
|
12214
|
+
},
|
12215
|
+
{
|
12216
|
+
label: '间距',
|
12217
|
+
type: 'TextSpace',
|
12218
|
+
name: ['props', 'buttonStyle']
|
12081
12219
|
}
|
12082
12220
|
]
|
12083
12221
|
},
|
@@ -13408,6 +13546,7 @@ var previewData = {
|
|
13408
13546
|
};
|
13409
13547
|
|
13410
13548
|
const WaterfallFlowItem$1 = (props) => {
|
13549
|
+
var _a;
|
13411
13550
|
const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
|
13412
13551
|
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
13413
13552
|
const [showVideo, setShowVideo] = useState(false);
|
@@ -13461,16 +13600,19 @@ const WaterfallFlowItem$1 = (props) => {
|
|
13461
13600
|
}
|
13462
13601
|
}, [top, showBorder]);
|
13463
13602
|
const priceText = useMemo(() => {
|
13464
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13465
|
-
|
13466
|
-
|
13467
|
-
|
13468
|
-
|
13603
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
13604
|
+
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);
|
13605
|
+
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)) {
|
13606
|
+
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
|
13607
|
+
? (_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', {
|
13608
|
+
minimumFractionDigits: 0
|
13609
|
+
})) !== null && _l !== void 0 ? _l : ''
|
13610
|
+
: (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
|
13469
13611
|
}
|
13470
13612
|
else {
|
13471
13613
|
return null;
|
13472
13614
|
}
|
13473
|
-
}, [rec]);
|
13615
|
+
}, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
|
13474
13616
|
useEffect(() => {
|
13475
13617
|
if (imgDom.current === null || src === '') {
|
13476
13618
|
return;
|
@@ -13517,7 +13659,8 @@ const WaterfallFlowItem$1 = (props) => {
|
|
13517
13659
|
function WaterfallList$1(_a) {
|
13518
13660
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
13519
13661
|
var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
|
13520
|
-
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
13662
|
+
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
|
13663
|
+
const { jumpToWeb } = useEventReport();
|
13521
13664
|
/** 滚动的父元素 */
|
13522
13665
|
const scrollParent = useRef(null);
|
13523
13666
|
/** 向上滚动的距离 */
|
@@ -13633,10 +13776,14 @@ function WaterfallList$1(_a) {
|
|
13633
13776
|
}, [unitWidth, rowsNum, list]); /* 增加getStyleList依赖项会导致在admin预览编辑时无限刷新 */
|
13634
13777
|
/** 初始化请求数据 */
|
13635
13778
|
useEffect(() => {
|
13636
|
-
var _a, _b
|
13779
|
+
var _a, _b;
|
13637
13780
|
setIsLoadingData(true);
|
13638
13781
|
waterFallData &&
|
13639
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(
|
13782
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
13783
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
|
13784
|
+
defaultSize: hashTagSize,
|
13785
|
+
maxSize: hashTagSize
|
13786
|
+
}).then((res) => {
|
13640
13787
|
var _a, _b;
|
13641
13788
|
setData(res);
|
13642
13789
|
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 : []);
|
@@ -13645,7 +13792,7 @@ function WaterfallList$1(_a) {
|
|
13645
13792
|
if (isOpenHashTag) {
|
13646
13793
|
const res = previewData;
|
13647
13794
|
setData(res);
|
13648
|
-
setList((
|
13795
|
+
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 : []);
|
13649
13796
|
setIsLoadingData(false);
|
13650
13797
|
}
|
13651
13798
|
}, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
|
@@ -13671,10 +13818,11 @@ function WaterfallList$1(_a) {
|
|
13671
13818
|
};
|
13672
13819
|
}, [onResize]);
|
13673
13820
|
useCallback(() => {
|
13674
|
-
var _a, _b, _c, _d;
|
13675
13821
|
setIsLoadingData(true);
|
13676
13822
|
waterFallData &&
|
13677
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(
|
13823
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
13824
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag
|
13825
|
+
}).then((res) => {
|
13678
13826
|
var _a, _b;
|
13679
13827
|
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 : []));
|
13680
13828
|
setIsLoadingData(false);
|
@@ -13701,10 +13849,12 @@ function WaterfallList$1(_a) {
|
|
13701
13849
|
};
|
13702
13850
|
}, [onScroll, scrollParent]);
|
13703
13851
|
const handleClickLink = () => {
|
13704
|
-
var _a, _b;
|
13852
|
+
var _a, _b, _c, _d, _e;
|
13705
13853
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
13706
13854
|
reportTagsView();
|
13707
|
-
|
13855
|
+
const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
|
13856
|
+
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);
|
13857
|
+
window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
|
13708
13858
|
}
|
13709
13859
|
};
|
13710
13860
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
@@ -13746,8 +13896,9 @@ function WaterfallList$1(_a) {
|
|
13746
13896
|
var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
|
13747
13897
|
|
13748
13898
|
const WaterfallFlowItem = (props) => {
|
13899
|
+
var _a;
|
13749
13900
|
const { rec, index, list, reportTagsView, textStyles, space } = props;
|
13750
|
-
const { swiperRef, setRtcList, setOpenHashtag,
|
13901
|
+
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
13751
13902
|
const [showVideo, setShowVideo] = useState(false);
|
13752
13903
|
const imgDom = useRef(null);
|
13753
13904
|
const ref = useRef(null);
|
@@ -13774,16 +13925,19 @@ const WaterfallFlowItem = (props) => {
|
|
13774
13925
|
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;
|
13775
13926
|
}, [rec]);
|
13776
13927
|
const priceText = useMemo(() => {
|
13777
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13778
|
-
|
13779
|
-
|
13780
|
-
|
13781
|
-
|
13928
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
13929
|
+
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);
|
13930
|
+
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)) {
|
13931
|
+
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
|
13932
|
+
? (_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', {
|
13933
|
+
minimumFractionDigits: 0
|
13934
|
+
})) !== null && _l !== void 0 ? _l : ''
|
13935
|
+
: (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
|
13782
13936
|
}
|
13783
13937
|
else {
|
13784
13938
|
return null;
|
13785
13939
|
}
|
13786
|
-
}, [rec]);
|
13940
|
+
}, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
|
13787
13941
|
// useEffect(() => {
|
13788
13942
|
// if (imgDom.current === null || src === '') {
|
13789
13943
|
// return;
|
@@ -13875,29 +14029,35 @@ const WaterfallFlowItem = (props) => {
|
|
13875
14029
|
function WaterfallList(_a) {
|
13876
14030
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
13877
14031
|
var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
|
13878
|
-
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
14032
|
+
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
|
14033
|
+
const { jumpToWeb } = useEventReport();
|
13879
14034
|
const [list, setList] = useState();
|
13880
14035
|
const [data, setData] = useState();
|
13881
14036
|
const [isLoadingData, setIsLoadingData] = useState(false);
|
13882
14037
|
const containerRef = useRef(null);
|
13883
14038
|
const [isLoadMore, setIsLoadMore] = useState(false);
|
13884
14039
|
useCallback(() => {
|
13885
|
-
var _a, _b, _c, _d;
|
13886
14040
|
if (isLoadMore)
|
13887
14041
|
return;
|
13888
14042
|
setIsLoadMore(true);
|
13889
14043
|
waterFallData &&
|
13890
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(
|
14044
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
14045
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag
|
14046
|
+
}).then((res) => {
|
13891
14047
|
var _a;
|
13892
14048
|
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 : []));
|
13893
14049
|
setIsLoadMore(false);
|
13894
14050
|
}));
|
13895
14051
|
}, [waterFallData, getRecommendVideos, list, isLoadMore]);
|
13896
14052
|
useEffect(() => {
|
13897
|
-
var _a, _b
|
14053
|
+
var _a, _b;
|
13898
14054
|
setIsLoadingData(true);
|
13899
14055
|
waterFallData &&
|
13900
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(
|
14056
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
14057
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
|
14058
|
+
defaultSize: hashTagSize,
|
14059
|
+
maxSize: hashTagSize
|
14060
|
+
}).then((res) => {
|
13901
14061
|
var _a, _b;
|
13902
14062
|
setData(res);
|
13903
14063
|
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 : []);
|
@@ -13906,7 +14066,7 @@ function WaterfallList(_a) {
|
|
13906
14066
|
if (isOpenHashTag) {
|
13907
14067
|
const res = previewData;
|
13908
14068
|
setData(res);
|
13909
|
-
setList((
|
14069
|
+
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 : []);
|
13910
14070
|
setIsLoadingData(false);
|
13911
14071
|
}
|
13912
14072
|
}, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
|
@@ -13927,10 +14087,12 @@ function WaterfallList(_a) {
|
|
13927
14087
|
// };
|
13928
14088
|
// }, [isLoadingData, containerRef, loadMoreData]);
|
13929
14089
|
const handleClickLink = () => {
|
13930
|
-
var _a, _b;
|
14090
|
+
var _a, _b, _c, _d, _e;
|
13931
14091
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
13932
14092
|
reportTagsView();
|
13933
|
-
|
14093
|
+
const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
|
14094
|
+
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);
|
14095
|
+
window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
|
13934
14096
|
}
|
13935
14097
|
};
|
13936
14098
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
@@ -14070,7 +14232,7 @@ var WaterFall$1 = memo(WaterFall);
|
|
14070
14232
|
* @Author: binruan@chatlabs.com
|
14071
14233
|
* @Date: 2024-01-15 19:03:09
|
14072
14234
|
* @LastEditors: binruan@chatlabs.com
|
14073
|
-
* @LastEditTime: 2024-
|
14235
|
+
* @LastEditTime: 2024-08-22 10:15:23
|
14074
14236
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\index.tsx
|
14075
14237
|
*
|
14076
14238
|
*/
|
@@ -14233,7 +14395,7 @@ const Consent = createMaterial(ConsentComponent, {
|
|
14233
14395
|
* @Author: binruan@chatlabs.com
|
14234
14396
|
* @Date: 2024-07-02 14:51:32
|
14235
14397
|
* @LastEditors: binruan@chatlabs.com
|
14236
|
-
* @LastEditTime: 2024-
|
14398
|
+
* @LastEditTime: 2024-08-06 14:28:34
|
14237
14399
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\settingRender.tsx
|
14238
14400
|
*
|
14239
14401
|
*/
|
@@ -14336,6 +14498,10 @@ var settingRender$1 = [
|
|
14336
14498
|
label: '对齐',
|
14337
14499
|
type: 'TextAlign',
|
14338
14500
|
name: ['props', 'ctaTempStyles', 'ctaTitle']
|
14501
|
+
},
|
14502
|
+
{
|
14503
|
+
type: 'TextSpace',
|
14504
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle']
|
14339
14505
|
}
|
14340
14506
|
]
|
14341
14507
|
}
|
@@ -15699,7 +15865,7 @@ function withBindDataSource(Component) {
|
|
15699
15865
|
* @Author: binruan@chatlabs.com
|
15700
15866
|
* @Date: 2023-12-26 16:11:34
|
15701
15867
|
* @LastEditors: binruan@chatlabs.com
|
15702
|
-
* @LastEditTime: 2024-
|
15868
|
+
* @LastEditTime: 2024-08-21 15:46:07
|
15703
15869
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
|
15704
15870
|
*
|
15705
15871
|
*/
|
@@ -15719,44 +15885,38 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive }
|
|
15719
15885
|
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;
|
15720
15886
|
}
|
15721
15887
|
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
15722
|
-
const renderComp =
|
15723
|
-
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
|
15888
|
+
const renderComp = useCallback(() => {
|
15889
|
+
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;
|
15724
15890
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
15725
15891
|
return null;
|
15726
|
-
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) ;
|
15727
|
-
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) ;
|
15728
|
-
else {
|
15729
|
-
(_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;
|
15730
|
-
}
|
15731
15892
|
//如果includesCtaType有值,则只渲染includesCtaType包含的cta类型组件,用于在页面某处只显示某一组件
|
15732
|
-
if (includesCtaType && !(includesCtaType === null || includesCtaType === void 0 ? void 0 : includesCtaType.includes((
|
15893
|
+
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)))
|
15733
15894
|
return;
|
15734
15895
|
//默认不渲染category为cta类型的组件,该类型的组件只用于某一处
|
15735
|
-
if (!includesCtaType && ((
|
15896
|
+
if (!includesCtaType && ((_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.category) === 'cta')
|
15736
15897
|
return;
|
15737
|
-
if ((((
|
15738
|
-
(((
|
15739
|
-
(((
|
15740
|
-
(((
|
15741
|
-
(((
|
15742
|
-
(((
|
15898
|
+
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)) ||
|
15899
|
+
(((_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)) ||
|
15900
|
+
(((_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)) ||
|
15901
|
+
(((_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)) ||
|
15902
|
+
(((_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)) ||
|
15903
|
+
(((_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))) {
|
15743
15904
|
//
|
15744
15905
|
return null;
|
15745
15906
|
}
|
15746
15907
|
if (value && resolver) {
|
15747
|
-
const t = resolver[(
|
15908
|
+
const t = resolver[(_t = value === null || value === void 0 ? void 0 : value.item) === null || _t === void 0 ? void 0 : _t.type];
|
15748
15909
|
const Component = withBindDataSource(t);
|
15749
|
-
const defaulSetting = (
|
15750
|
-
const isExternalLink = ((
|
15751
|
-
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (
|
15910
|
+
const defaulSetting = (_u = t === null || t === void 0 ? void 0 : t.extend) === null || _u === void 0 ? void 0 : _u.defaulSetting;
|
15911
|
+
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';
|
15912
|
+
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 })));
|
15752
15913
|
}
|
15753
15914
|
else {
|
15754
15915
|
return null;
|
15755
15916
|
}
|
15756
15917
|
}, [rec, resolver, tempMap, schema, value === null || value === void 0 ? void 0 : value.id, isActive]);
|
15757
|
-
return React.createElement(React.Fragment, null, renderComp);
|
15918
|
+
return React.createElement(React.Fragment, null, renderComp());
|
15758
15919
|
};
|
15759
|
-
var RenderCard$1 = memo(RenderCard);
|
15760
15920
|
|
15761
15921
|
/*
|
15762
15922
|
* @Author: binruan@chatlabs.com
|
@@ -15841,7 +16001,7 @@ var Tagbar$1 = memo(Tagbar);
|
|
15841
16001
|
* @Author: binruan@chatlabs.com
|
15842
16002
|
* @Date: 2024-01-15 19:03:09
|
15843
16003
|
* @LastEditors: binruan@chatlabs.com
|
15844
|
-
* @LastEditTime: 2024-08-
|
16004
|
+
* @LastEditTime: 2024-08-22 09:56:51
|
15845
16005
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
15846
16006
|
*
|
15847
16007
|
*/
|
@@ -15858,9 +16018,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15858
16018
|
const [isShowMore, setIsShowMore] = useState(false);
|
15859
16019
|
const [isReload, setIsReload] = useState(new Date().getTime());
|
15860
16020
|
const skipLinkRef = useRef(false);
|
15861
|
-
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
|
15862
|
-
const { backMainFeed } = useEventReport();
|
15863
|
-
const { productView } = useEventReport();
|
16021
|
+
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor } = useSxpDataSource();
|
16022
|
+
const { backMainFeed, productView, jumpToWeb } = useEventReport();
|
15864
16023
|
const isShowFingerTip = useMemo(() => {
|
15865
16024
|
return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
|
15866
16025
|
}, [data, loading, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip]);
|
@@ -15889,6 +16048,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15889
16048
|
}, [data.length, bffFbReport, h5EnterLink]);
|
15890
16049
|
useEffect(() => {
|
15891
16050
|
var _a;
|
16051
|
+
if (!ctaType || (ctaType === null || ctaType === void 0 ? void 0 : ctaType.length) < 1)
|
16052
|
+
return;
|
15892
16053
|
const index = (data === null || data === void 0 ? void 0 : data.findIndex((item) => {
|
15893
16054
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
15894
16055
|
const ctaType0 = ctaType === null || ctaType === void 0 ? void 0 : ctaType[0];
|
@@ -15902,8 +16063,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15902
16063
|
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));
|
15903
16064
|
}
|
15904
16065
|
})) || 0;
|
15905
|
-
(
|
15906
|
-
|
16066
|
+
if (index !== -1)
|
16067
|
+
(_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
|
16068
|
+
}, [data, ctaType, swiperRef]);
|
15907
16069
|
useEffect(() => {
|
15908
16070
|
const item = data === null || data === void 0 ? void 0 : data[activeIndex];
|
15909
16071
|
const visibleChange = () => {
|
@@ -16003,15 +16165,39 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16003
16165
|
const height = useMemo(() => {
|
16004
16166
|
return containerHeight - minusHeight - tagHeight;
|
16005
16167
|
}, [globalConfig, containerHeight, tagHeight]);
|
16168
|
+
const visList = useMemo(() => {
|
16169
|
+
var _a;
|
16170
|
+
const list = activeIndex === 0 && !waterFallData && !isEditor
|
16171
|
+
? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
|
16172
|
+
: data === null || data === void 0 ? void 0 : data.map((item, index) => {
|
16173
|
+
if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
|
16174
|
+
return item;
|
16175
|
+
}
|
16176
|
+
else {
|
16177
|
+
return null;
|
16178
|
+
}
|
16179
|
+
});
|
16180
|
+
return !waterFallData ? list.concat([{ loading: true }]) : list;
|
16181
|
+
}, [data, activeIndex, waterFallData, isEditor]);
|
16006
16182
|
const renderLogo = useMemo(() => {
|
16007
|
-
var _a, _b;
|
16183
|
+
var _a, _b, _c, _d;
|
16008
16184
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
16009
16185
|
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;
|
16010
|
-
|
16186
|
+
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';
|
16187
|
+
const rec = visList[activeIndex];
|
16188
|
+
return (React.createElement("div", Object.assign({ className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } }, (link && {
|
16189
|
+
onClick: () => {
|
16190
|
+
var _a, _b, _c, _d;
|
16191
|
+
if (isExternalLink) {
|
16192
|
+
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));
|
16193
|
+
}
|
16194
|
+
new Function(link)();
|
16195
|
+
}
|
16196
|
+
})),
|
16011
16197
|
React.createElement("img", { src: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl, alt: 'logo' })));
|
16012
16198
|
}
|
16013
16199
|
return null;
|
16014
|
-
}, [globalConfig]);
|
16200
|
+
}, [globalConfig, activeIndex, visList]);
|
16015
16201
|
const renderContent = useCallback((rec, index) => {
|
16016
16202
|
var _a, _b, _c, _d;
|
16017
16203
|
if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
|
@@ -16066,12 +16252,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16066
16252
|
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` } },
|
16067
16253
|
React.createElement(Nudge, { nudge: nudge }),
|
16068
16254
|
(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' },
|
16069
|
-
React.createElement(RenderCard
|
16255
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
16070
16256
|
React.createElement("div", null,
|
16071
16257
|
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 }),
|
16072
|
-
React.createElement(RenderCard
|
16258
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
|
16073
16259
|
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 }))),
|
16074
|
-
React.createElement(RenderCard
|
16260
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
16075
16261
|
}
|
16076
16262
|
return null;
|
16077
16263
|
}, [
|
@@ -16148,7 +16334,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16148
16334
|
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 : ''
|
16149
16335
|
}
|
16150
16336
|
});
|
16151
|
-
setSlideSkipState();
|
16152
16337
|
skipLinkRef.current = true;
|
16153
16338
|
window.location.href = window.getJointUtmLink(link);
|
16154
16339
|
}
|
@@ -16234,20 +16419,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16234
16419
|
});
|
16235
16420
|
}
|
16236
16421
|
};
|
16237
|
-
const visList = useMemo(() => {
|
16238
|
-
var _a;
|
16239
|
-
const list = activeIndex === 0 && !waterFallData
|
16240
|
-
? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
|
16241
|
-
: data === null || data === void 0 ? void 0 : data.map((item, index) => {
|
16242
|
-
if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
|
16243
|
-
return item;
|
16244
|
-
}
|
16245
|
-
else {
|
16246
|
-
return null;
|
16247
|
-
}
|
16248
|
-
});
|
16249
|
-
return !waterFallData ? list.concat([{ loading: true }]) : list;
|
16250
|
-
}, [data, activeIndex, waterFallData]);
|
16251
16422
|
const renderToggleButton = useCallback((visible) => {
|
16252
16423
|
var _a, _b, _c, _d, _e, _f;
|
16253
16424
|
if (!visible)
|
@@ -16256,6 +16427,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16256
16427
|
position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
|
16257
16428
|
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',
|
16258
16429
|
zIndex: 999,
|
16430
|
+
transform: 'translate3d(0px,0px,0px)',
|
16259
16431
|
[(_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,
|
16260
16432
|
[(_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
|
16261
16433
|
}, 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 })));
|
@@ -16274,10 +16446,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16274
16446
|
alignItems: 'center'
|
16275
16447
|
} },
|
16276
16448
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
|
16277
|
-
renderContent(rec, index),
|
16278
|
-
renderBottom(rec, index),
|
16279
16449
|
renderLikeButton(rec, index, !(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
|
16280
|
-
renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))
|
16450
|
+
renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
16451
|
+
renderBottom(rec, index),
|
16452
|
+
renderContent(rec, index)))))));
|
16281
16453
|
});
|
16282
16454
|
}, [
|
16283
16455
|
containerWidth,
|
@@ -16313,9 +16485,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16313
16485
|
return;
|
16314
16486
|
// 处理上滑下滑事件
|
16315
16487
|
handleScrollEvent(swiper);
|
16316
|
-
if (waterFallData)
|
16488
|
+
if (waterFallData || isEditor)
|
16317
16489
|
return;
|
16318
|
-
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) +
|
16490
|
+
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
|
16319
16491
|
if (!isLoadMore) {
|
16320
16492
|
setIsLoadMore(true);
|
16321
16493
|
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(Math.ceil(activeIndex / 10) + 1).then(() => {
|
@@ -16621,7 +16793,7 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
|
|
16621
16793
|
const CTA = (rec, index) => {
|
16622
16794
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
|
16623
16795
|
return (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
16624
|
-
React.createElement(RenderCard
|
16796
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1 })));
|
16625
16797
|
}
|
16626
16798
|
return null;
|
16627
16799
|
};
|
@@ -16811,7 +16983,7 @@ var index = memo(SxpPageCore);
|
|
16811
16983
|
* @Author: binruan@chatlabs.com
|
16812
16984
|
* @Date: 2023-12-26 10:38:53
|
16813
16985
|
* @LastEditors: binruan@chatlabs.com
|
16814
|
-
* @LastEditTime: 2024-
|
16986
|
+
* @LastEditTime: 2024-08-22 11:32:23
|
16815
16987
|
* @FilePath: \pb-sxp-ui\src\core\context\EditorDataProvider.tsx
|
16816
16988
|
*
|
16817
16989
|
*/
|
@@ -16841,7 +17013,8 @@ const EditorDataProvider = ({ children, data }) => {
|
|
16841
17013
|
setOpenHashtag,
|
16842
17014
|
openConsent,
|
16843
17015
|
setOpenConsent,
|
16844
|
-
sxpFontLinks: data === null || data === void 0 ? void 0 : data.sxpFontLinks
|
17016
|
+
sxpFontLinks: data === null || data === void 0 ? void 0 : data.sxpFontLinks,
|
17017
|
+
utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter
|
16845
17018
|
} }, children));
|
16846
17019
|
};
|
16847
17020
|
function useEditorDataProvider() {
|