pb-sxp-ui 1.3.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +238 -184
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +238 -184
- 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 +238 -184
- 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 -3
- 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 +20 -11
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +20 -11
- package/es/core/components/SxpPageRender/index.js +21 -13
- 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 +53 -35
- 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 +7 -0
- package/es/materials/sxp/HashTag/settingRender.js +6 -0
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
- package/es/materials/sxp/popup/CommodityDetail/index.js +26 -27
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +30 -31
- 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 +6 -0
- package/es/materials/sxp/popup/Iframe/index.d.ts +1 -0
- package/es/materials/sxp/popup/Iframe/index.js +8 -7
- package/lib/core/components/SxpPageRender/Modal/index.js +3 -3
- 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 +20 -11
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +20 -11
- package/lib/core/components/SxpPageRender/index.js +21 -13
- 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 +53 -35
- 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 +7 -0
- package/lib/materials/sxp/HashTag/settingRender.js +6 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.js +26 -27
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +30 -31
- 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 +6 -0
- package/lib/materials/sxp/popup/Iframe/index.d.ts +1 -0
- package/lib/materials/sxp/popup/Iframe/index.js +8 -7
- package/package.json +1 -1
package/dist/pb-ui.js
CHANGED
@@ -236,7 +236,7 @@
|
|
236
236
|
var _a, _b, _c, _d, _e, _f, _g;
|
237
237
|
let userAgent = self.navigator.userAgent;
|
238
238
|
if (!userAgent)
|
239
|
-
return
|
239
|
+
return null;
|
240
240
|
if (/edge\/([\d\.]+)/i.exec(userAgent))
|
241
241
|
return `Edge ${(_a = /edge\/([\d\.]+)/i.exec(userAgent)) === null || _a === void 0 ? void 0 : _a[1]}`;
|
242
242
|
if (/edg\/([\d\.]+)/i.exec(userAgent))
|
@@ -251,13 +251,13 @@
|
|
251
251
|
return `Firefox ${(_f = /firefox\/([\d\.]+)/i.exec(userAgent)) === null || _f === void 0 ? void 0 : _f[1]}`;
|
252
252
|
if (/safari/i.test(userAgent))
|
253
253
|
return `Safari ${(_g = /version\/([\d\.]+)/i.exec(userAgent)) === null || _g === void 0 ? void 0 : _g[1]}`;
|
254
|
-
return
|
254
|
+
return null;
|
255
255
|
}
|
256
256
|
function getSystem() {
|
257
257
|
var _a, _b, _c;
|
258
258
|
let userAgent = self.navigator.userAgent;
|
259
259
|
if (!userAgent)
|
260
|
-
return
|
260
|
+
return null;
|
261
261
|
if (/iphone/i.test(userAgent))
|
262
262
|
return `IOS ${(_a = userAgent.match(/OS\s(.*?)\slike/)) === null || _a === void 0 ? void 0 : _a[1]}`;
|
263
263
|
if (/android/i.test(userAgent))
|
@@ -266,12 +266,12 @@
|
|
266
266
|
return `Windows ${(_c = userAgent.match(/Windows\s(.*?)\;/)) === null || _c === void 0 ? void 0 : _c[1]}`;
|
267
267
|
if (/mac/i.test(userAgent))
|
268
268
|
return `Mac OS`;
|
269
|
-
return
|
269
|
+
return null;
|
270
270
|
}
|
271
271
|
function getDevice$1() {
|
272
272
|
let userAgent = self.navigator.userAgent;
|
273
273
|
if (!userAgent)
|
274
|
-
return
|
274
|
+
return null;
|
275
275
|
if (/iphone/i.test(userAgent))
|
276
276
|
return `iPhone`;
|
277
277
|
if (/android/i.test(userAgent)) {
|
@@ -294,7 +294,7 @@
|
|
294
294
|
return `Windows`;
|
295
295
|
if (/mac/i.test(userAgent))
|
296
296
|
return `Mac`;
|
297
|
-
return
|
297
|
+
return null;
|
298
298
|
}
|
299
299
|
function getCookie(val) {
|
300
300
|
// const expirationDate = new Date();
|
@@ -711,8 +711,8 @@
|
|
711
711
|
}, [bffDataSource]);
|
712
712
|
// 获取推荐视频数据
|
713
713
|
const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
|
714
|
-
var _d, _e, _f, _g, _h, _j, _k;
|
715
|
-
query = Object.assign(Object.assign({ maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize, defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag }, ((query === null || query === void 0 ? void 0 : query.contentFilter) && { contentFilter: `[${query === null || query === void 0 ? void 0 : query.contentFilter}]` })), ((query === null || query === void 0 ? void 0 : query.productFilter) && { productFilter: `[${query === null || query === void 0 ? void 0 : query.productFilter}]` }));
|
714
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
715
|
+
query = Object.assign(Object.assign(Object.assign({ maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize, defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag }, ((query === null || query === void 0 ? void 0 : query.contentFilter) && { contentFilter: `[${query === null || query === void 0 ? void 0 : query.contentFilter}]` })), ((query === null || query === void 0 ? void 0 : query.productFilter) && { productFilter: `[${query === null || query === void 0 ? void 0 : query.productFilter}]` })), { pageNum: query === null || query === void 0 ? void 0 : query.pageNum });
|
716
716
|
if (utmVal) {
|
717
717
|
const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
|
718
718
|
var _a, _b;
|
@@ -721,30 +721,36 @@
|
|
721
721
|
})) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
|
722
722
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
723
723
|
}
|
724
|
-
if (
|
724
|
+
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
725
|
+
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_j = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _j !== void 0 ? _j : 1 });
|
726
|
+
}
|
727
|
+
if (isEditor) {
|
728
|
+
let pageNum = 1;
|
725
729
|
query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1 }), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] }));
|
726
|
-
if (!(query === null || query === void 0 ? void 0 : query.channel))
|
727
|
-
return;
|
730
|
+
if (!(query === null || query === void 0 ? void 0 : query.channel) || isInit.current) {
|
731
|
+
return undefined;
|
732
|
+
}
|
733
|
+
isInit.current = true;
|
728
734
|
let list = [];
|
729
735
|
let result = null;
|
730
|
-
let pageNum = 1;
|
731
736
|
const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
|
732
|
-
var
|
737
|
+
var _r, _s, _t, _u, _v, _w;
|
733
738
|
query.pageNum = pageNum;
|
734
739
|
result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
735
740
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
736
741
|
return undefined;
|
737
742
|
}
|
738
|
-
|
739
|
-
|
740
|
-
|
743
|
+
setLoading(false);
|
744
|
+
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));
|
745
|
+
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 : []);
|
746
|
+
if (isNotNullList) {
|
741
747
|
pageNum = pageNum + 1;
|
742
748
|
yield recurveRecList(query);
|
743
749
|
}
|
744
750
|
});
|
745
751
|
yield recurveRecList(query);
|
746
752
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
|
747
|
-
setCurReqInfo({ rtc: (
|
753
|
+
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 });
|
748
754
|
return Object.assign(Object.assign({}, result.data), { recList: list });
|
749
755
|
}
|
750
756
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
@@ -753,15 +759,20 @@
|
|
753
759
|
}
|
754
760
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag))
|
755
761
|
setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
|
762
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
|
763
|
+
let list = [];
|
764
|
+
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 : []);
|
765
|
+
return Object.assign(Object.assign({}, result.data), { recList: list });
|
766
|
+
}
|
756
767
|
return result === null || result === void 0 ? void 0 : result.data;
|
757
|
-
}), [bffFetch, utmVal, maxSize, defaultSize,
|
758
|
-
const loadVideos = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
759
|
-
var
|
768
|
+
}), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList]);
|
769
|
+
const loadVideos = React.useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
|
770
|
+
var _x, _y, _z, _0;
|
760
771
|
if (rtcList.length <= 0) {
|
761
772
|
return;
|
762
773
|
}
|
763
774
|
const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
|
764
|
-
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((
|
775
|
+
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 })));
|
765
776
|
setRtcList(rtcList.concat(getFilterRecList(data)));
|
766
777
|
setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
|
767
778
|
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
@@ -778,7 +789,7 @@
|
|
778
789
|
};
|
779
790
|
}
|
780
791
|
const sessionID = storeAndLoadFeSessionId();
|
781
|
-
const ef = Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), { sxpDevice: getDevice$1(), sxpSystem: getSystem(), sxpBrowser: getBrowserInfo() });
|
792
|
+
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() }));
|
782
793
|
const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
|
783
794
|
const realEventInfo = Object.entries(ef)
|
784
795
|
.map(([k, v]) => v && { name: k, value: v })
|
@@ -794,24 +805,21 @@
|
|
794
805
|
});
|
795
806
|
}, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
|
796
807
|
const bffFbReport = React.useCallback((_a) => {
|
797
|
-
var _b, _c;
|
808
|
+
var _b, _c, _d;
|
798
809
|
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;
|
799
810
|
if (!enableReportEvent || !enabledMetaConversionApi || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
800
811
|
return;
|
801
812
|
}
|
802
813
|
const fakeUserId = storeAndLoadFeUserId();
|
814
|
+
const urlParams = new URLSearchParams(window.location.search);
|
815
|
+
const fbclid = urlParams.get('fbclid');
|
803
816
|
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/fb/events', {
|
804
817
|
method: 'POST',
|
805
818
|
body: {
|
806
819
|
eventName,
|
807
820
|
actionSource,
|
808
821
|
eventSourceUrl,
|
809
|
-
userData: {
|
810
|
-
externalId: fakeUserId,
|
811
|
-
fbc: `fb.2.${new Date().getTime()}.${getCookie('_fbc')}`,
|
812
|
-
fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}`,
|
813
|
-
client_user_agent: (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent
|
814
|
-
}
|
822
|
+
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 : '' })
|
815
823
|
},
|
816
824
|
type: 'beacon'
|
817
825
|
});
|
@@ -830,17 +838,17 @@
|
|
830
838
|
}), [bffFetch]);
|
831
839
|
// 获取 Tag
|
832
840
|
const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
833
|
-
var
|
841
|
+
var _1, _2, _3, _4, _5;
|
834
842
|
if (!utmVal || !isShowTag)
|
835
843
|
return;
|
836
844
|
try {
|
837
|
-
const val = (
|
845
|
+
const val = (_3 = (_2 = (_1 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _1 === void 0 ? void 0 : _1.filter((val) => {
|
838
846
|
var _a, _b;
|
839
847
|
const key = val.split('=')[0];
|
840
848
|
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);
|
841
|
-
})) === null ||
|
849
|
+
})) === null || _2 === void 0 ? void 0 : _2.join('&')) !== null && _3 !== void 0 ? _3 : '';
|
842
850
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
843
|
-
setTagList((
|
851
|
+
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 : []);
|
844
852
|
}
|
845
853
|
catch (e) {
|
846
854
|
console.log('e', e);
|
@@ -902,8 +910,10 @@
|
|
902
910
|
bffGetTagList();
|
903
911
|
getRecommendVideos()
|
904
912
|
.then((data) => {
|
905
|
-
|
906
|
-
|
913
|
+
if (data) {
|
914
|
+
setRtcList(getFilterRecList(data));
|
915
|
+
setCacheRtcList(getFilterRecList(data));
|
916
|
+
}
|
907
917
|
})
|
908
918
|
.finally(() => {
|
909
919
|
bffEventReport({
|
@@ -913,23 +923,30 @@
|
|
913
923
|
}
|
914
924
|
});
|
915
925
|
setLoading(false);
|
916
|
-
isInit.current = true;
|
917
926
|
});
|
918
927
|
}, [isShowConsent]);
|
919
928
|
React.useEffect(() => {
|
920
|
-
if (!
|
929
|
+
if (!isPreview)
|
921
930
|
return;
|
922
931
|
setLoading(true);
|
923
932
|
bffGetTagList();
|
924
933
|
getRecommendVideos()
|
925
934
|
.then((data) => {
|
926
|
-
|
927
|
-
|
935
|
+
if (data) {
|
936
|
+
setRtcList(getFilterRecList(data));
|
937
|
+
setCacheRtcList(getFilterRecList(data));
|
938
|
+
}
|
928
939
|
})
|
929
940
|
.finally(() => {
|
941
|
+
bffEventReport({
|
942
|
+
eventInfo: {
|
943
|
+
eventSubject: 'apiRequest',
|
944
|
+
eventDescription: 'api request succeed'
|
945
|
+
}
|
946
|
+
});
|
930
947
|
setLoading(false);
|
931
948
|
});
|
932
|
-
}, [
|
949
|
+
}, [getRecommendVideos, bffGetTagList]);
|
933
950
|
const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
|
934
951
|
return (React.createElement(SxpDataSourceContext.Provider, { value: {
|
935
952
|
rtcList,
|
@@ -977,7 +994,8 @@
|
|
977
994
|
setSelectTag,
|
978
995
|
globalConfig,
|
979
996
|
popupCurTimeRef,
|
980
|
-
checkCommodityIndexRef
|
997
|
+
checkCommodityIndexRef,
|
998
|
+
isEditor
|
981
999
|
} }, 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({
|
982
1000
|
rtcList,
|
983
1001
|
mutateLike: bffMutateLike,
|
@@ -1420,7 +1438,7 @@
|
|
1420
1438
|
* @Author: binruan@chatlabs.com
|
1421
1439
|
* @Date: 2024-03-12 10:59:06
|
1422
1440
|
* @LastEditors: binruan@chatlabs.com
|
1423
|
-
* @LastEditTime: 2024-08-
|
1441
|
+
* @LastEditTime: 2024-08-22 17:43:04
|
1424
1442
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
1425
1443
|
*
|
1426
1444
|
*/
|
@@ -8806,13 +8824,13 @@
|
|
8806
8824
|
* @Author: binruan@chatlabs.com
|
8807
8825
|
* @Date: 2023-11-02 18:34:34
|
8808
8826
|
* @LastEditors: binruan@chatlabs.com
|
8809
|
-
* @LastEditTime: 2024-08-
|
8827
|
+
* @LastEditTime: 2024-08-20 18:29:11
|
8810
8828
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
|
8811
8829
|
*
|
8812
8830
|
*/
|
8813
8831
|
const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
8814
8832
|
const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
|
8815
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
8833
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
8816
8834
|
const touchRef = React.useRef(null);
|
8817
8835
|
const fTouchRef = React.useRef(null);
|
8818
8836
|
const touchMoveRef = React.useRef(null);
|
@@ -8937,8 +8955,8 @@
|
|
8937
8955
|
React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
|
8938
8956
|
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' })),
|
8939
8957
|
React.createElement("div", { ref: ref, style: {
|
8940
|
-
height: (isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H) -
|
8941
|
-
((_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),
|
8958
|
+
height: (_x = (isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H) -
|
8959
|
+
((_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,
|
8942
8960
|
overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
|
8943
8961
|
} }, children)))))), modalEleRef.current);
|
8944
8962
|
};
|
@@ -9106,8 +9124,8 @@
|
|
9106
9124
|
var CommodityGroup$1 = React.memo(CommodityGroup);
|
9107
9125
|
|
9108
9126
|
const CommodityDetail$1 = (_a) => {
|
9109
|
-
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
|
9110
|
-
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"]);
|
9127
|
+
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;
|
9128
|
+
var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio, isTel } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio", "isTel"]);
|
9111
9129
|
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
|
9112
9130
|
const { jumpToWeb, productView } = useEventReport();
|
9113
9131
|
const curTimeRef = React.useRef(null);
|
@@ -9227,18 +9245,18 @@
|
|
9227
9245
|
};
|
9228
9246
|
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
9229
9247
|
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
9230
|
-
const iframeUrl =
|
9248
|
+
const iframeUrl = isPost ? (_w = data === null || data === void 0 ? void 0 : data.product) === null || _w === void 0 ? void 0 : _w.remark : (_y = (_x = data === null || data === void 0 ? void 0 : data.video) === null || _x === void 0 ? void 0 : _x.bindProduct) === null || _y === void 0 ? void 0 : _y.remark;
|
9231
9249
|
return (React.createElement(React.Fragment, null,
|
9232
9250
|
React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
|
9233
9251
|
React.createElement("div", { style: { position: 'relative' } },
|
9234
|
-
product && ((
|
9252
|
+
product && ((_z = product === null || product === void 0 ? void 0 : product.homePage) === null || _z === void 0 ? void 0 : _z.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
|
9235
9253
|
clickable: true,
|
9236
9254
|
bulletActiveClass: 'swipe-item-active-bullet',
|
9237
9255
|
clickableClass: getDotsAlign
|
9238
9256
|
}, loop: true, autoplay: {
|
9239
9257
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
9240
9258
|
}, ref: ref },
|
9241
|
-
React.createElement(React.Fragment, null, (
|
9259
|
+
React.createElement(React.Fragment, null, (_0 = product === null || product === void 0 ? void 0 : product.homePage) === null || _0 === void 0 ? void 0 : _0.map((src) => {
|
9242
9260
|
var _a;
|
9243
9261
|
return (React.createElement(SwiperSlide, { key: src },
|
9244
9262
|
React.createElement("div", { style: {
|
@@ -9254,7 +9272,7 @@
|
|
9254
9272
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
9255
9273
|
}, 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 }))));
|
9256
9274
|
})))),
|
9257
|
-
!((
|
9275
|
+
!((_1 = product === null || product === void 0 ? void 0 : product.homePage) === null || _1 === void 0 ? void 0 : _1.length) && (React.createElement("div", { className: css.css({
|
9258
9276
|
height,
|
9259
9277
|
width
|
9260
9278
|
}) },
|
@@ -9262,21 +9280,19 @@
|
|
9262
9280
|
objectFit: 'cover',
|
9263
9281
|
width: '100%',
|
9264
9282
|
height: '100%'
|
9265
|
-
}), src: (
|
9266
|
-
(iframeUrl && iframeIcon
|
9267
|
-
|
9268
|
-
|
9269
|
-
|
9270
|
-
|
9271
|
-
|
9272
|
-
|
9273
|
-
|
9274
|
-
|
9275
|
-
|
9276
|
-
|
9277
|
-
|
9278
|
-
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
|
9279
|
-
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
|
9283
|
+
}), src: (_2 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _2 !== void 0 ? _2 : bottom_image, alt: 'pdp image' }))),
|
9284
|
+
(iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
|
9285
|
+
padding: '5px 10px',
|
9286
|
+
display: 'flex',
|
9287
|
+
alignItems: 'center',
|
9288
|
+
position: 'absolute',
|
9289
|
+
right: '10px',
|
9290
|
+
bottom: '10px',
|
9291
|
+
zIndex: 1,
|
9292
|
+
background: '#fff',
|
9293
|
+
borderRadius: '3px'
|
9294
|
+
}, onClick: () => setShow3DModal(true) },
|
9295
|
+
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } })))),
|
9280
9296
|
renderCommodityGroup(),
|
9281
9297
|
React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
|
9282
9298
|
renderBtn(),
|
@@ -9284,12 +9300,13 @@
|
|
9284
9300
|
React.createElement("div", { style: { paddingBottom: '80px' } }, renderContent({ isPost: false })),
|
9285
9301
|
renderBtn()),
|
9286
9302
|
React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
|
9287
|
-
React.createElement("
|
9288
|
-
|
9289
|
-
|
9290
|
-
|
9291
|
-
|
9292
|
-
|
9303
|
+
React.createElement("div", { style: { height: '100vh' } },
|
9304
|
+
React.createElement("iframe", { src: iframeUrl, style: {
|
9305
|
+
width: '100%',
|
9306
|
+
height: isTel ? `${664 - 40}px` : `calc(100vh - 40px)`,
|
9307
|
+
marginTop: '40px',
|
9308
|
+
border: 'none'
|
9309
|
+
} })))));
|
9293
9310
|
};
|
9294
9311
|
var CommodityDetailComponent = React.memo(CommodityDetail$1);
|
9295
9312
|
|
@@ -9942,8 +9959,8 @@
|
|
9942
9959
|
];
|
9943
9960
|
|
9944
9961
|
const CommodityDetailDiroNew$1 = (_a) => {
|
9945
|
-
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
|
9946
|
-
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"]);
|
9962
|
+
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;
|
9963
|
+
var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup, popupBg, iframeIcon, commodityImgRatio, isTel } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup", "popupBg", "iframeIcon", "commodityImgRatio", "isTel"]);
|
9947
9964
|
React.useState(true);
|
9948
9965
|
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
|
9949
9966
|
const { jumpToWeb, productView } = useEventReport();
|
@@ -10094,17 +10111,17 @@ Made in Italy` })));
|
|
10094
10111
|
};
|
10095
10112
|
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
10096
10113
|
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
10097
|
-
const iframeUrl =
|
10114
|
+
const iframeUrl = isPost ? (_w = data === null || data === void 0 ? void 0 : data.product) === null || _w === void 0 ? void 0 : _w.remark : (_y = (_x = data === null || data === void 0 ? void 0 : data.video) === null || _x === void 0 ? void 0 : _x.bindProduct) === null || _y === void 0 ? void 0 : _y.remark;
|
10098
10115
|
return (React.createElement("div", { className: 'pb-commondityDiroNew' },
|
10099
10116
|
React.createElement("div", Object.assign({ className: css.css(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
|
10100
10117
|
React.createElement("div", { style: { position: 'relative' } },
|
10101
|
-
product && ((
|
10118
|
+
product && ((_z = product === null || product === void 0 ? void 0 : product.homePage) === null || _z === void 0 ? void 0 : _z.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
|
10102
10119
|
clickable: true,
|
10103
10120
|
bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
|
10104
10121
|
clickableClass: getDotsAlign
|
10105
10122
|
}, loop: true, autoplay: {
|
10106
10123
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
10107
|
-
}, ref: ref }, (
|
10124
|
+
}, ref: ref }, (_0 = product === null || product === void 0 ? void 0 : product.homePage) === null || _0 === void 0 ? void 0 : _0.map((src) => {
|
10108
10125
|
var _a;
|
10109
10126
|
return (React.createElement(SwiperSlide, { key: src },
|
10110
10127
|
React.createElement("div", { style: {
|
@@ -10120,7 +10137,7 @@ Made in Italy` })));
|
|
10120
10137
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
10121
10138
|
}, 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 }))));
|
10122
10139
|
}))),
|
10123
|
-
!((
|
10140
|
+
!((_1 = product === null || product === void 0 ? void 0 : product.homePage) === null || _1 === void 0 ? void 0 : _1.length) && (React.createElement("div", { className: css.css({
|
10124
10141
|
height,
|
10125
10142
|
width
|
10126
10143
|
}) },
|
@@ -10128,27 +10145,25 @@ Made in Italy` })));
|
|
10128
10145
|
objectFit: 'cover',
|
10129
10146
|
width: '100%',
|
10130
10147
|
height: '100%'
|
10131
|
-
}), src: (
|
10132
|
-
(iframeUrl && iframeIcon
|
10133
|
-
|
10134
|
-
|
10135
|
-
|
10136
|
-
|
10137
|
-
|
10138
|
-
|
10139
|
-
|
10140
|
-
|
10141
|
-
|
10142
|
-
|
10143
|
-
|
10144
|
-
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
|
10145
|
-
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
|
10148
|
+
}), src: (_2 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _2 !== void 0 ? _2 : bottom_image, alt: 'pdp image' }))),
|
10149
|
+
(iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
|
10150
|
+
padding: '5px 10px',
|
10151
|
+
display: 'flex',
|
10152
|
+
alignItems: 'center',
|
10153
|
+
position: 'absolute',
|
10154
|
+
right: '10px',
|
10155
|
+
bottom: '10px',
|
10156
|
+
zIndex: 1,
|
10157
|
+
background: '#fff',
|
10158
|
+
borderRadius: '3px'
|
10159
|
+
}, onClick: () => setShow3DModal(true) },
|
10160
|
+
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } })))),
|
10146
10161
|
renderCommodityGroup(),
|
10147
10162
|
React.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
10148
10163
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
10149
10164
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
10150
10165
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
|
10151
|
-
__html: setFontForText((
|
10166
|
+
__html: setFontForText((_3 = product === null || product === void 0 ? void 0 : product.title) !== null && _3 !== void 0 ? _3 : 'Large Dior Toujours BagLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
|
10152
10167
|
} }),
|
10153
10168
|
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: {
|
10154
10169
|
__html: setFontForText((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
@@ -10158,21 +10173,22 @@ Made in Italy` })));
|
|
10158
10173
|
__html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
10159
10174
|
} }),
|
10160
10175
|
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: {
|
10161
|
-
__html: setFontForText((
|
10176
|
+
__html: setFontForText((_4 = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _4 !== void 0 ? _4 : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
|
10162
10177
|
} }))),
|
10163
|
-
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (
|
10178
|
+
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_5 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _5 !== void 0 ? _5 : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
|
10164
10179
|
React.createElement("span", { dangerouslySetInnerHTML: {
|
10165
|
-
__html: setFontForText((
|
10180
|
+
__html: setFontForText((_6 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _6 !== void 0 ? _6 : 'Shop now', buttonStyle)
|
10166
10181
|
} }))),
|
10167
10182
|
productInfoText({ isPost }))),
|
10168
10183
|
React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
|
10169
10184
|
React.createElement(Modal$1, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
|
10170
|
-
React.createElement("
|
10171
|
-
|
10172
|
-
|
10173
|
-
|
10174
|
-
|
10175
|
-
|
10185
|
+
React.createElement("div", { style: { height: '100vh' } },
|
10186
|
+
React.createElement("iframe", { src: iframeUrl, style: {
|
10187
|
+
width: '100%',
|
10188
|
+
height: isTel ? `${664 - 40}px` : `calc(100vh - 40px)`,
|
10189
|
+
marginTop: '40px',
|
10190
|
+
border: 'none'
|
10191
|
+
} })))));
|
10176
10192
|
};
|
10177
10193
|
var CommodityDetailDiroNewComponent = React.memo(CommodityDetailDiroNew$1);
|
10178
10194
|
|
@@ -10421,6 +10437,12 @@ Made in Italy` })));
|
|
10421
10437
|
{
|
10422
10438
|
label: '间距',
|
10423
10439
|
type: 'TextSpace'
|
10440
|
+
},
|
10441
|
+
{
|
10442
|
+
label: '价格千分符展示',
|
10443
|
+
type: 'Switch',
|
10444
|
+
name: ['enableFormattedPrice'],
|
10445
|
+
initialValue: true
|
10424
10446
|
}
|
10425
10447
|
]
|
10426
10448
|
}
|
@@ -10573,7 +10595,7 @@ Made in Italy` })));
|
|
10573
10595
|
var Img$1 = React.memo(Img);
|
10574
10596
|
|
10575
10597
|
const CommodityList$1 = (_a) => {
|
10576
|
-
var _b, _c;
|
10598
|
+
var _b, _c, _d;
|
10577
10599
|
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"]);
|
10578
10600
|
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
|
10579
10601
|
const { jumpToWeb } = useEventReport();
|
@@ -10582,16 +10604,20 @@ Made in Italy` })));
|
|
10582
10604
|
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];
|
10583
10605
|
const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
10584
10606
|
const priceText = React.useCallback((product) => {
|
10585
|
-
var _a, _b, _c, _d, _e;
|
10607
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
10608
|
+
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);
|
10586
10609
|
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
10587
|
-
return `${(
|
10588
|
-
|
10589
|
-
|
10610
|
+
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
|
10611
|
+
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
10612
|
+
minimumFractionDigits: 0
|
10613
|
+
})) !== null && _g !== void 0 ? _g : ''
|
10614
|
+
: product === null || product === void 0 ? void 0 : product.price}`;
|
10590
10615
|
}
|
10591
10616
|
else {
|
10592
|
-
|
10617
|
+
const p = 7000;
|
10618
|
+
return `$${isToLocStr ? p.toLocaleString() : p}`;
|
10593
10619
|
}
|
10594
|
-
}, []);
|
10620
|
+
}, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice]);
|
10595
10621
|
const handleClick = lodash.throttle((item, multiCheckIndex) => {
|
10596
10622
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
10597
10623
|
eventSubject: 'clickCta',
|
@@ -10752,15 +10778,16 @@ Made in Italy` })));
|
|
10752
10778
|
|
10753
10779
|
const Iframe$1 = (_a) => {
|
10754
10780
|
var _b, _c;
|
10755
|
-
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"]);
|
10781
|
+
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"]);
|
10756
10782
|
const { popupDetailData } = useSxpDataSource();
|
10757
10783
|
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;
|
10758
|
-
return (React.createElement("div", Object.assign({ className: `${css.css(Object.assign({}, style)
|
10759
|
-
|
10760
|
-
|
10761
|
-
|
10762
|
-
|
10763
|
-
|
10784
|
+
return (React.createElement("div", Object.assign({ className: `${css.css(Object.assign(Object.assign({}, style), { height: isTel ? 664 : window === null || window === void 0 ? void 0 : window.innerHeight }))}` }, props),
|
10785
|
+
React.createElement("iframe", { src: iframeUrl, style: {
|
10786
|
+
width: '100%',
|
10787
|
+
height: 'calc(100% - 50px)',
|
10788
|
+
marginTop: '40px',
|
10789
|
+
border: 'none'
|
10790
|
+
} })));
|
10764
10791
|
};
|
10765
10792
|
var IframeComponent = React.memo(Iframe$1);
|
10766
10793
|
|
@@ -12005,7 +12032,7 @@ Made in Italy` })));
|
|
12005
12032
|
* @Author: binruan@chatlabs.com
|
12006
12033
|
* @Date: 2024-04-07 14:07:12
|
12007
12034
|
* @LastEditors: binruan@chatlabs.com
|
12008
|
-
* @LastEditTime: 2024-08-
|
12035
|
+
* @LastEditTime: 2024-08-22 10:14:36
|
12009
12036
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
|
12010
12037
|
*
|
12011
12038
|
*/
|
@@ -12114,6 +12141,12 @@ Made in Italy` })));
|
|
12114
12141
|
{
|
12115
12142
|
label: '间距',
|
12116
12143
|
type: 'TextSpace'
|
12144
|
+
},
|
12145
|
+
{
|
12146
|
+
label: '价格千分符展示',
|
12147
|
+
type: 'Switch',
|
12148
|
+
name: ['enableFormattedPrice'],
|
12149
|
+
initialValue: true
|
12117
12150
|
}
|
12118
12151
|
]
|
12119
12152
|
}
|
@@ -13534,6 +13567,7 @@ Made in Italy` })));
|
|
13534
13567
|
};
|
13535
13568
|
|
13536
13569
|
const WaterfallFlowItem$1 = (props) => {
|
13570
|
+
var _a;
|
13537
13571
|
const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
|
13538
13572
|
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
13539
13573
|
const [showVideo, setShowVideo] = React.useState(false);
|
@@ -13587,16 +13621,19 @@ Made in Italy` })));
|
|
13587
13621
|
}
|
13588
13622
|
}, [top, showBorder]);
|
13589
13623
|
const priceText = React.useMemo(() => {
|
13590
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13591
|
-
|
13592
|
-
|
13593
|
-
|
13594
|
-
|
13624
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
13625
|
+
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);
|
13626
|
+
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)) {
|
13627
|
+
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
|
13628
|
+
? (_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', {
|
13629
|
+
minimumFractionDigits: 0
|
13630
|
+
})) !== null && _l !== void 0 ? _l : ''
|
13631
|
+
: (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
|
13595
13632
|
}
|
13596
13633
|
else {
|
13597
13634
|
return null;
|
13598
13635
|
}
|
13599
|
-
}, [rec]);
|
13636
|
+
}, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
|
13600
13637
|
React.useEffect(() => {
|
13601
13638
|
if (imgDom.current === null || src === '') {
|
13602
13639
|
return;
|
@@ -13760,10 +13797,14 @@ Made in Italy` })));
|
|
13760
13797
|
}, [unitWidth, rowsNum, list]); /* 增加getStyleList依赖项会导致在admin预览编辑时无限刷新 */
|
13761
13798
|
/** 初始化请求数据 */
|
13762
13799
|
React.useEffect(() => {
|
13763
|
-
var _a, _b
|
13800
|
+
var _a, _b;
|
13764
13801
|
setIsLoadingData(true);
|
13765
13802
|
waterFallData &&
|
13766
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(
|
13803
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
13804
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
|
13805
|
+
defaultSize: hashTagSize,
|
13806
|
+
maxSize: hashTagSize
|
13807
|
+
}).then((res) => {
|
13767
13808
|
var _a, _b;
|
13768
13809
|
setData(res);
|
13769
13810
|
setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
|
@@ -13772,7 +13813,7 @@ Made in Italy` })));
|
|
13772
13813
|
if (isOpenHashTag) {
|
13773
13814
|
const res = previewData;
|
13774
13815
|
setData(res);
|
13775
|
-
setList((
|
13816
|
+
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 : []);
|
13776
13817
|
setIsLoadingData(false);
|
13777
13818
|
}
|
13778
13819
|
}, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
|
@@ -13798,10 +13839,11 @@ Made in Italy` })));
|
|
13798
13839
|
};
|
13799
13840
|
}, [onResize]);
|
13800
13841
|
React.useCallback(() => {
|
13801
|
-
var _a, _b, _c, _d;
|
13802
13842
|
setIsLoadingData(true);
|
13803
13843
|
waterFallData &&
|
13804
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(
|
13844
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
13845
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag
|
13846
|
+
}).then((res) => {
|
13805
13847
|
var _a, _b;
|
13806
13848
|
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 : []));
|
13807
13849
|
setIsLoadingData(false);
|
@@ -13875,6 +13917,7 @@ Made in Italy` })));
|
|
13875
13917
|
var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
|
13876
13918
|
|
13877
13919
|
const WaterfallFlowItem = (props) => {
|
13920
|
+
var _a;
|
13878
13921
|
const { rec, index, list, reportTagsView, textStyles, space } = props;
|
13879
13922
|
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
13880
13923
|
const [showVideo, setShowVideo] = React.useState(false);
|
@@ -13903,16 +13946,19 @@ Made in Italy` })));
|
|
13903
13946
|
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;
|
13904
13947
|
}, [rec]);
|
13905
13948
|
const priceText = React.useMemo(() => {
|
13906
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13907
|
-
|
13908
|
-
|
13909
|
-
|
13910
|
-
|
13949
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
13950
|
+
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);
|
13951
|
+
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)) {
|
13952
|
+
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
|
13953
|
+
? (_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', {
|
13954
|
+
minimumFractionDigits: 0
|
13955
|
+
})) !== null && _l !== void 0 ? _l : ''
|
13956
|
+
: (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
|
13911
13957
|
}
|
13912
13958
|
else {
|
13913
13959
|
return null;
|
13914
13960
|
}
|
13915
|
-
}, [rec]);
|
13961
|
+
}, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
|
13916
13962
|
// useEffect(() => {
|
13917
13963
|
// if (imgDom.current === null || src === '') {
|
13918
13964
|
// return;
|
@@ -14012,22 +14058,27 @@ Made in Italy` })));
|
|
14012
14058
|
const containerRef = React.useRef(null);
|
14013
14059
|
const [isLoadMore, setIsLoadMore] = React.useState(false);
|
14014
14060
|
React.useCallback(() => {
|
14015
|
-
var _a, _b, _c, _d;
|
14016
14061
|
if (isLoadMore)
|
14017
14062
|
return;
|
14018
14063
|
setIsLoadMore(true);
|
14019
14064
|
waterFallData &&
|
14020
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(
|
14065
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
14066
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag
|
14067
|
+
}).then((res) => {
|
14021
14068
|
var _a;
|
14022
14069
|
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 : []));
|
14023
14070
|
setIsLoadMore(false);
|
14024
14071
|
}));
|
14025
14072
|
}, [waterFallData, getRecommendVideos, list, isLoadMore]);
|
14026
14073
|
React.useEffect(() => {
|
14027
|
-
var _a, _b
|
14074
|
+
var _a, _b;
|
14028
14075
|
setIsLoadingData(true);
|
14029
14076
|
waterFallData &&
|
14030
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(
|
14077
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
14078
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
|
14079
|
+
defaultSize: hashTagSize,
|
14080
|
+
maxSize: hashTagSize
|
14081
|
+
}).then((res) => {
|
14031
14082
|
var _a, _b;
|
14032
14083
|
setData(res);
|
14033
14084
|
setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
|
@@ -14036,7 +14087,7 @@ Made in Italy` })));
|
|
14036
14087
|
if (isOpenHashTag) {
|
14037
14088
|
const res = previewData;
|
14038
14089
|
setData(res);
|
14039
|
-
setList((
|
14090
|
+
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 : []);
|
14040
14091
|
setIsLoadingData(false);
|
14041
14092
|
}
|
14042
14093
|
}, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
|
@@ -14202,7 +14253,7 @@ Made in Italy` })));
|
|
14202
14253
|
* @Author: binruan@chatlabs.com
|
14203
14254
|
* @Date: 2024-01-15 19:03:09
|
14204
14255
|
* @LastEditors: binruan@chatlabs.com
|
14205
|
-
* @LastEditTime: 2024-
|
14256
|
+
* @LastEditTime: 2024-08-22 10:15:23
|
14206
14257
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\index.tsx
|
14207
14258
|
*
|
14208
14259
|
*/
|
@@ -15835,7 +15886,7 @@ Made in Italy` })));
|
|
15835
15886
|
* @Author: binruan@chatlabs.com
|
15836
15887
|
* @Date: 2023-12-26 16:11:34
|
15837
15888
|
* @LastEditors: binruan@chatlabs.com
|
15838
|
-
* @LastEditTime: 2024-
|
15889
|
+
* @LastEditTime: 2024-08-21 15:46:07
|
15839
15890
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
|
15840
15891
|
*
|
15841
15892
|
*/
|
@@ -15855,44 +15906,38 @@ Made in Italy` })));
|
|
15855
15906
|
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;
|
15856
15907
|
}
|
15857
15908
|
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
15858
|
-
const renderComp = React.
|
15859
|
-
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
|
15909
|
+
const renderComp = React.useCallback(() => {
|
15910
|
+
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;
|
15860
15911
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
15861
15912
|
return null;
|
15862
|
-
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) ;
|
15863
|
-
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) ;
|
15864
|
-
else {
|
15865
|
-
(_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;
|
15866
|
-
}
|
15867
15913
|
//如果includesCtaType有值,则只渲染includesCtaType包含的cta类型组件,用于在页面某处只显示某一组件
|
15868
|
-
if (includesCtaType && !(includesCtaType === null || includesCtaType === void 0 ? void 0 : includesCtaType.includes((
|
15914
|
+
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)))
|
15869
15915
|
return;
|
15870
15916
|
//默认不渲染category为cta类型的组件,该类型的组件只用于某一处
|
15871
|
-
if (!includesCtaType && ((
|
15917
|
+
if (!includesCtaType && ((_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.category) === 'cta')
|
15872
15918
|
return;
|
15873
|
-
if ((((
|
15874
|
-
(((
|
15875
|
-
(((
|
15876
|
-
(((
|
15877
|
-
(((
|
15878
|
-
(((
|
15919
|
+
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)) ||
|
15920
|
+
(((_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)) ||
|
15921
|
+
(((_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)) ||
|
15922
|
+
(((_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)) ||
|
15923
|
+
(((_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)) ||
|
15924
|
+
(((_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))) {
|
15879
15925
|
//
|
15880
15926
|
return null;
|
15881
15927
|
}
|
15882
15928
|
if (value && resolver) {
|
15883
|
-
const t = resolver[(
|
15929
|
+
const t = resolver[(_t = value === null || value === void 0 ? void 0 : value.item) === null || _t === void 0 ? void 0 : _t.type];
|
15884
15930
|
const Component = withBindDataSource(t);
|
15885
|
-
const defaulSetting = (
|
15886
|
-
const isExternalLink = ((
|
15887
|
-
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (
|
15931
|
+
const defaulSetting = (_u = t === null || t === void 0 ? void 0 : t.extend) === null || _u === void 0 ? void 0 : _u.defaulSetting;
|
15932
|
+
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';
|
15933
|
+
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 })));
|
15888
15934
|
}
|
15889
15935
|
else {
|
15890
15936
|
return null;
|
15891
15937
|
}
|
15892
15938
|
}, [rec, resolver, tempMap, schema, value === null || value === void 0 ? void 0 : value.id, isActive]);
|
15893
|
-
return React.createElement(React.Fragment, null, renderComp);
|
15939
|
+
return React.createElement(React.Fragment, null, renderComp());
|
15894
15940
|
};
|
15895
|
-
var RenderCard$1 = React.memo(RenderCard);
|
15896
15941
|
|
15897
15942
|
/*
|
15898
15943
|
* @Author: binruan@chatlabs.com
|
@@ -15977,7 +16022,7 @@ Made in Italy` })));
|
|
15977
16022
|
* @Author: binruan@chatlabs.com
|
15978
16023
|
* @Date: 2024-01-15 19:03:09
|
15979
16024
|
* @LastEditors: binruan@chatlabs.com
|
15980
|
-
* @LastEditTime: 2024-08-
|
16025
|
+
* @LastEditTime: 2024-08-22 17:50:06
|
15981
16026
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
15982
16027
|
*
|
15983
16028
|
*/
|
@@ -15994,7 +16039,7 @@ Made in Italy` })));
|
|
15994
16039
|
const [isShowMore, setIsShowMore] = React.useState(false);
|
15995
16040
|
const [isReload, setIsReload] = React.useState(new Date().getTime());
|
15996
16041
|
const skipLinkRef = React.useRef(false);
|
15997
|
-
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
|
16042
|
+
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor } = useSxpDataSource();
|
15998
16043
|
const { backMainFeed, productView, jumpToWeb } = useEventReport();
|
15999
16044
|
const isShowFingerTip = React.useMemo(() => {
|
16000
16045
|
return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
|
@@ -16024,6 +16069,8 @@ Made in Italy` })));
|
|
16024
16069
|
}, [data.length, bffFbReport, h5EnterLink]);
|
16025
16070
|
React.useEffect(() => {
|
16026
16071
|
var _a;
|
16072
|
+
if (!ctaType || (ctaType === null || ctaType === void 0 ? void 0 : ctaType.length) < 1)
|
16073
|
+
return;
|
16027
16074
|
const index = (data === null || data === void 0 ? void 0 : data.findIndex((item) => {
|
16028
16075
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
16029
16076
|
const ctaType0 = ctaType === null || ctaType === void 0 ? void 0 : ctaType[0];
|
@@ -16037,8 +16084,9 @@ Made in Italy` })));
|
|
16037
16084
|
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));
|
16038
16085
|
}
|
16039
16086
|
})) || 0;
|
16040
|
-
(
|
16041
|
-
|
16087
|
+
if (index !== -1)
|
16088
|
+
(_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
|
16089
|
+
}, [data, ctaType, swiperRef]);
|
16042
16090
|
React.useEffect(() => {
|
16043
16091
|
const item = data === null || data === void 0 ? void 0 : data[activeIndex];
|
16044
16092
|
const visibleChange = () => {
|
@@ -16140,7 +16188,7 @@ Made in Italy` })));
|
|
16140
16188
|
}, [globalConfig, containerHeight, tagHeight]);
|
16141
16189
|
const visList = React.useMemo(() => {
|
16142
16190
|
var _a;
|
16143
|
-
const list = activeIndex === 0 && !waterFallData
|
16191
|
+
const list = activeIndex === 0 && !waterFallData && !isEditor
|
16144
16192
|
? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
|
16145
16193
|
: data === null || data === void 0 ? void 0 : data.map((item, index) => {
|
16146
16194
|
if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
|
@@ -16150,8 +16198,8 @@ Made in Italy` })));
|
|
16150
16198
|
return null;
|
16151
16199
|
}
|
16152
16200
|
});
|
16153
|
-
return !waterFallData ? list.concat([{ loading: true }]) : list;
|
16154
|
-
}, [data, activeIndex, waterFallData]);
|
16201
|
+
return !waterFallData && !isEditor ? list.concat([{ loading: true }]) : list;
|
16202
|
+
}, [data, activeIndex, waterFallData, isEditor]);
|
16155
16203
|
const renderLogo = React.useMemo(() => {
|
16156
16204
|
var _a, _b, _c, _d;
|
16157
16205
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
@@ -16225,12 +16273,12 @@ Made in Italy` })));
|
|
16225
16273
|
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` } },
|
16226
16274
|
React.createElement(Nudge, { nudge: nudge }),
|
16227
16275
|
(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' },
|
16228
|
-
React.createElement(RenderCard
|
16276
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
16229
16277
|
React.createElement("div", null,
|
16230
16278
|
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 }),
|
16231
|
-
React.createElement(RenderCard
|
16279
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
|
16232
16280
|
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 }))),
|
16233
|
-
React.createElement(RenderCard
|
16281
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
16234
16282
|
}
|
16235
16283
|
return null;
|
16236
16284
|
}, [
|
@@ -16314,7 +16362,6 @@ Made in Italy` })));
|
|
16314
16362
|
};
|
16315
16363
|
const handleScrollEvent = (swiper) => {
|
16316
16364
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
16317
|
-
viewTime.current = new Date();
|
16318
16365
|
const item = data[swiper.previousIndex];
|
16319
16366
|
if (!item)
|
16320
16367
|
return;
|
@@ -16355,6 +16402,7 @@ Made in Italy` })));
|
|
16355
16402
|
eventName: 'ProductView'
|
16356
16403
|
});
|
16357
16404
|
}
|
16405
|
+
viewTime.current = new Date();
|
16358
16406
|
};
|
16359
16407
|
const handleReportProductView = (item) => {
|
16360
16408
|
var _a, _b, _c;
|
@@ -16364,8 +16412,12 @@ Made in Italy` })));
|
|
16364
16412
|
};
|
16365
16413
|
React.useEffect(() => {
|
16366
16414
|
const item = data[activeIndex];
|
16367
|
-
if (openHashtag)
|
16415
|
+
if (openHashtag) {
|
16368
16416
|
handleReportProductView(item);
|
16417
|
+
}
|
16418
|
+
else {
|
16419
|
+
viewTime.current = new Date();
|
16420
|
+
}
|
16369
16421
|
}, [openHashtag, data, activeIndex]);
|
16370
16422
|
const handleViewImageStartEvent = (activeIndex) => {
|
16371
16423
|
var _a, _b, _c, _d, _e, _f;
|
@@ -16400,6 +16452,7 @@ Made in Italy` })));
|
|
16400
16452
|
position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
|
16401
16453
|
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',
|
16402
16454
|
zIndex: 999,
|
16455
|
+
transform: 'translate3d(0px,0px,0px)',
|
16403
16456
|
[(_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,
|
16404
16457
|
[(_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
|
16405
16458
|
}, 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 })));
|
@@ -16418,10 +16471,10 @@ Made in Italy` })));
|
|
16418
16471
|
alignItems: 'center'
|
16419
16472
|
} },
|
16420
16473
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
|
16421
|
-
renderContent(rec, index),
|
16422
|
-
renderBottom(rec, index),
|
16423
16474
|
renderLikeButton(rec, index, !(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
|
16424
|
-
renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))
|
16475
|
+
renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
16476
|
+
renderBottom(rec, index),
|
16477
|
+
renderContent(rec, index)))))));
|
16425
16478
|
});
|
16426
16479
|
}, [
|
16427
16480
|
containerWidth,
|
@@ -16457,9 +16510,9 @@ Made in Italy` })));
|
|
16457
16510
|
return;
|
16458
16511
|
// 处理上滑下滑事件
|
16459
16512
|
handleScrollEvent(swiper);
|
16460
|
-
if (waterFallData)
|
16513
|
+
if (waterFallData || isEditor)
|
16461
16514
|
return;
|
16462
|
-
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) +
|
16515
|
+
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
|
16463
16516
|
if (!isLoadMore) {
|
16464
16517
|
setIsLoadMore(true);
|
16465
16518
|
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(Math.ceil(activeIndex / 10) + 1).then(() => {
|
@@ -16765,7 +16818,7 @@ Made in Italy` })));
|
|
16765
16818
|
const CTA = (rec, index) => {
|
16766
16819
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
|
16767
16820
|
return (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
16768
|
-
React.createElement(RenderCard
|
16821
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1 })));
|
16769
16822
|
}
|
16770
16823
|
return null;
|
16771
16824
|
};
|
@@ -16955,7 +17008,7 @@ Made in Italy` })));
|
|
16955
17008
|
* @Author: binruan@chatlabs.com
|
16956
17009
|
* @Date: 2023-12-26 10:38:53
|
16957
17010
|
* @LastEditors: binruan@chatlabs.com
|
16958
|
-
* @LastEditTime: 2024-
|
17011
|
+
* @LastEditTime: 2024-08-22 11:32:23
|
16959
17012
|
* @FilePath: \pb-sxp-ui\src\core\context\EditorDataProvider.tsx
|
16960
17013
|
*
|
16961
17014
|
*/
|
@@ -16985,7 +17038,8 @@ Made in Italy` })));
|
|
16985
17038
|
setOpenHashtag,
|
16986
17039
|
openConsent,
|
16987
17040
|
setOpenConsent,
|
16988
|
-
sxpFontLinks: data === null || data === void 0 ? void 0 : data.sxpFontLinks
|
17041
|
+
sxpFontLinks: data === null || data === void 0 ? void 0 : data.sxpFontLinks,
|
17042
|
+
utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter
|
16989
17043
|
} }, children));
|
16990
17044
|
};
|
16991
17045
|
function useEditorDataProvider() {
|