pb-sxp-ui 1.3.1 → 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 +190 -146
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +190 -146
- 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 +190 -146
- 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 +14 -10
- 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 +43 -31
- 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.js +13 -14
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +13 -14
- 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 +14 -10
- 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 +43 -31
- 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.js +13 -14
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +13 -14
- 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/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, _j, _k;
|
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,30 +706,34 @@ 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(
|
711
|
-
|
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)
|
712
716
|
return;
|
717
|
+
isInit.current = true;
|
713
718
|
let list = [];
|
714
719
|
let result = null;
|
715
|
-
let pageNum = 1;
|
716
720
|
const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
|
717
|
-
var
|
721
|
+
var _r, _s, _t, _u, _v, _w;
|
718
722
|
query.pageNum = pageNum;
|
719
723
|
result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
720
724
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
721
725
|
return undefined;
|
722
726
|
}
|
723
|
-
const
|
724
|
-
list = list.concat((
|
725
|
-
if (
|
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) {
|
726
730
|
pageNum = pageNum + 1;
|
727
731
|
yield recurveRecList(query);
|
728
732
|
}
|
729
733
|
});
|
730
734
|
yield recurveRecList(query);
|
731
735
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
|
732
|
-
setCurReqInfo({ rtc: (
|
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 });
|
733
737
|
return Object.assign(Object.assign({}, result.data), { recList: list });
|
734
738
|
}
|
735
739
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
@@ -738,15 +742,20 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
738
742
|
}
|
739
743
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag))
|
740
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
|
+
}
|
741
750
|
return result === null || result === void 0 ? void 0 : result.data;
|
742
|
-
}), [bffFetch, utmVal, maxSize, defaultSize,
|
743
|
-
const loadVideos = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
744
|
-
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;
|
745
754
|
if (rtcList.length <= 0) {
|
746
755
|
return;
|
747
756
|
}
|
748
757
|
const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
|
749
|
-
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 })));
|
750
759
|
setRtcList(rtcList.concat(getFilterRecList(data)));
|
751
760
|
setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
|
752
761
|
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
@@ -763,7 +772,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
763
772
|
};
|
764
773
|
}
|
765
774
|
const sessionID = storeAndLoadFeSessionId();
|
766
|
-
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() }));
|
767
776
|
const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
|
768
777
|
const realEventInfo = Object.entries(ef)
|
769
778
|
.map(([k, v]) => v && { name: k, value: v })
|
@@ -779,24 +788,21 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
779
788
|
});
|
780
789
|
}, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
|
781
790
|
const bffFbReport = useCallback((_a) => {
|
782
|
-
var _b, _c;
|
791
|
+
var _b, _c, _d;
|
783
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;
|
784
793
|
if (!enableReportEvent || !enabledMetaConversionApi || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
785
794
|
return;
|
786
795
|
}
|
787
796
|
const fakeUserId = storeAndLoadFeUserId();
|
797
|
+
const urlParams = new URLSearchParams(window.location.search);
|
798
|
+
const fbclid = urlParams.get('fbclid');
|
788
799
|
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/fb/events', {
|
789
800
|
method: 'POST',
|
790
801
|
body: {
|
791
802
|
eventName,
|
792
803
|
actionSource,
|
793
804
|
eventSourceUrl,
|
794
|
-
userData: {
|
795
|
-
externalId: fakeUserId,
|
796
|
-
fbc: `fb.2.${new Date().getTime()}.${getCookie('_fbc')}`,
|
797
|
-
fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}`,
|
798
|
-
client_user_agent: (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent
|
799
|
-
}
|
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 : '' })
|
800
806
|
},
|
801
807
|
type: 'beacon'
|
802
808
|
});
|
@@ -815,17 +821,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
815
821
|
}), [bffFetch]);
|
816
822
|
// 获取 Tag
|
817
823
|
const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
818
|
-
var
|
824
|
+
var _1, _2, _3, _4, _5;
|
819
825
|
if (!utmVal || !isShowTag)
|
820
826
|
return;
|
821
827
|
try {
|
822
|
-
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) => {
|
823
829
|
var _a, _b;
|
824
830
|
const key = val.split('=')[0];
|
825
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);
|
826
|
-
})) === null ||
|
832
|
+
})) === null || _2 === void 0 ? void 0 : _2.join('&')) !== null && _3 !== void 0 ? _3 : '';
|
827
833
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
828
|
-
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 : []);
|
829
835
|
}
|
830
836
|
catch (e) {
|
831
837
|
console.log('e', e);
|
@@ -898,11 +904,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
898
904
|
}
|
899
905
|
});
|
900
906
|
setLoading(false);
|
901
|
-
isInit.current = true;
|
902
907
|
});
|
903
908
|
}, [isShowConsent]);
|
904
909
|
useEffect(() => {
|
905
|
-
if (!
|
910
|
+
if (!isPreview)
|
906
911
|
return;
|
907
912
|
setLoading(true);
|
908
913
|
bffGetTagList();
|
@@ -912,9 +917,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
912
917
|
setCacheRtcList(getFilterRecList(data));
|
913
918
|
})
|
914
919
|
.finally(() => {
|
920
|
+
bffEventReport({
|
921
|
+
eventInfo: {
|
922
|
+
eventSubject: 'apiRequest',
|
923
|
+
eventDescription: 'api request succeed'
|
924
|
+
}
|
925
|
+
});
|
915
926
|
setLoading(false);
|
916
927
|
});
|
917
|
-
}, [
|
928
|
+
}, [getRecommendVideos, bffGetTagList]);
|
918
929
|
const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
|
919
930
|
return (React.createElement(SxpDataSourceContext.Provider, { value: {
|
920
931
|
rtcList,
|
@@ -962,7 +973,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
962
973
|
setSelectTag,
|
963
974
|
globalConfig,
|
964
975
|
popupCurTimeRef,
|
965
|
-
checkCommodityIndexRef
|
976
|
+
checkCommodityIndexRef,
|
977
|
+
isEditor
|
966
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({
|
967
979
|
rtcList,
|
968
980
|
mutateLike: bffMutateLike,
|
@@ -8791,13 +8803,13 @@ SwiperSlide.displayName = 'SwiperSlide';
|
|
8791
8803
|
* @Author: binruan@chatlabs.com
|
8792
8804
|
* @Date: 2023-11-02 18:34:34
|
8793
8805
|
* @LastEditors: binruan@chatlabs.com
|
8794
|
-
* @LastEditTime: 2024-08-
|
8806
|
+
* @LastEditTime: 2024-08-20 18:29:11
|
8795
8807
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
|
8796
8808
|
*
|
8797
8809
|
*/
|
8798
8810
|
const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
8799
8811
|
const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
|
8800
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
8812
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
8801
8813
|
const touchRef = useRef(null);
|
8802
8814
|
const fTouchRef = useRef(null);
|
8803
8815
|
const touchMoveRef = useRef(null);
|
@@ -8922,8 +8934,8 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
8922
8934
|
React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
|
8923
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' })),
|
8924
8936
|
React.createElement("div", { ref: ref, style: {
|
8925
|
-
height: (isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H) -
|
8926
|
-
((_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),
|
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,
|
8927
8939
|
overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
|
8928
8940
|
} }, children)))))), modalEleRef.current);
|
8929
8941
|
};
|
@@ -9248,20 +9260,19 @@ const CommodityDetail$1 = (_a) => {
|
|
9248
9260
|
width: '100%',
|
9249
9261
|
height: '100%'
|
9250
9262
|
}), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
|
9251
|
-
(iframeUrl && iframeIcon
|
9252
|
-
|
9253
|
-
|
9254
|
-
|
9255
|
-
|
9256
|
-
|
9257
|
-
|
9258
|
-
|
9259
|
-
|
9260
|
-
|
9261
|
-
|
9262
|
-
|
9263
|
-
|
9264
|
-
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
|
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")))),
|
9265
9276
|
renderCommodityGroup(),
|
9266
9277
|
React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
|
9267
9278
|
renderBtn(),
|
@@ -10114,20 +10125,19 @@ Made in Italy` })));
|
|
10114
10125
|
width: '100%',
|
10115
10126
|
height: '100%'
|
10116
10127
|
}), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
|
10117
|
-
(iframeUrl && iframeIcon
|
10118
|
-
|
10119
|
-
|
10120
|
-
|
10121
|
-
|
10122
|
-
|
10123
|
-
|
10124
|
-
|
10125
|
-
|
10126
|
-
|
10127
|
-
|
10128
|
-
|
10129
|
-
|
10130
|
-
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
|
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")))),
|
10131
10141
|
renderCommodityGroup(),
|
10132
10142
|
React.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
10133
10143
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
@@ -10406,6 +10416,12 @@ var settingRender$6 = [
|
|
10406
10416
|
{
|
10407
10417
|
label: '间距',
|
10408
10418
|
type: 'TextSpace'
|
10419
|
+
},
|
10420
|
+
{
|
10421
|
+
label: '价格千分符展示',
|
10422
|
+
type: 'Switch',
|
10423
|
+
name: ['enableFormattedPrice'],
|
10424
|
+
initialValue: true
|
10409
10425
|
}
|
10410
10426
|
]
|
10411
10427
|
}
|
@@ -10558,7 +10574,7 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle, enableEventRe
|
|
10558
10574
|
var Img$1 = memo(Img);
|
10559
10575
|
|
10560
10576
|
const CommodityList$1 = (_a) => {
|
10561
|
-
var _b, _c;
|
10577
|
+
var _b, _c, _d;
|
10562
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"]);
|
10563
10579
|
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
|
10564
10580
|
const { jumpToWeb } = useEventReport();
|
@@ -10567,16 +10583,20 @@ const CommodityList$1 = (_a) => {
|
|
10567
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];
|
10568
10584
|
const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
10569
10585
|
const priceText = useCallback((product) => {
|
10570
|
-
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);
|
10571
10588
|
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
10572
|
-
return `${(
|
10573
|
-
|
10574
|
-
|
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}`;
|
10575
10594
|
}
|
10576
10595
|
else {
|
10577
|
-
|
10596
|
+
const p = 7000;
|
10597
|
+
return `$${isToLocStr ? p.toLocaleString() : p}`;
|
10578
10598
|
}
|
10579
|
-
}, []);
|
10599
|
+
}, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice]);
|
10580
10600
|
const handleClick = throttle((item, multiCheckIndex) => {
|
10581
10601
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
10582
10602
|
eventSubject: 'clickCta',
|
@@ -10737,15 +10757,16 @@ var settingRender$5 = [
|
|
10737
10757
|
|
10738
10758
|
const Iframe$1 = (_a) => {
|
10739
10759
|
var _b, _c;
|
10740
|
-
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"]);
|
10741
10761
|
const { popupDetailData } = useSxpDataSource();
|
10742
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;
|
10743
|
-
return (React.createElement("div", Object.assign({ className: `${css(Object.assign({}, style)
|
10744
|
-
|
10745
|
-
|
10746
|
-
|
10747
|
-
|
10748
|
-
|
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
|
+
} })));
|
10749
10770
|
};
|
10750
10771
|
var IframeComponent = memo(Iframe$1);
|
10751
10772
|
|
@@ -11990,7 +12011,7 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
|
|
11990
12011
|
* @Author: binruan@chatlabs.com
|
11991
12012
|
* @Date: 2024-04-07 14:07:12
|
11992
12013
|
* @LastEditors: binruan@chatlabs.com
|
11993
|
-
* @LastEditTime: 2024-08-
|
12014
|
+
* @LastEditTime: 2024-08-22 10:14:36
|
11994
12015
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
|
11995
12016
|
*
|
11996
12017
|
*/
|
@@ -12099,6 +12120,12 @@ var settingRender$3 = [
|
|
12099
12120
|
{
|
12100
12121
|
label: '间距',
|
12101
12122
|
type: 'TextSpace'
|
12123
|
+
},
|
12124
|
+
{
|
12125
|
+
label: '价格千分符展示',
|
12126
|
+
type: 'Switch',
|
12127
|
+
name: ['enableFormattedPrice'],
|
12128
|
+
initialValue: true
|
12102
12129
|
}
|
12103
12130
|
]
|
12104
12131
|
}
|
@@ -13519,6 +13546,7 @@ var previewData = {
|
|
13519
13546
|
};
|
13520
13547
|
|
13521
13548
|
const WaterfallFlowItem$1 = (props) => {
|
13549
|
+
var _a;
|
13522
13550
|
const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
|
13523
13551
|
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
13524
13552
|
const [showVideo, setShowVideo] = useState(false);
|
@@ -13572,16 +13600,19 @@ const WaterfallFlowItem$1 = (props) => {
|
|
13572
13600
|
}
|
13573
13601
|
}, [top, showBorder]);
|
13574
13602
|
const priceText = useMemo(() => {
|
13575
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13576
|
-
|
13577
|
-
|
13578
|
-
|
13579
|
-
|
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}`;
|
13580
13611
|
}
|
13581
13612
|
else {
|
13582
13613
|
return null;
|
13583
13614
|
}
|
13584
|
-
}, [rec]);
|
13615
|
+
}, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
|
13585
13616
|
useEffect(() => {
|
13586
13617
|
if (imgDom.current === null || src === '') {
|
13587
13618
|
return;
|
@@ -13745,10 +13776,14 @@ function WaterfallList$1(_a) {
|
|
13745
13776
|
}, [unitWidth, rowsNum, list]); /* 增加getStyleList依赖项会导致在admin预览编辑时无限刷新 */
|
13746
13777
|
/** 初始化请求数据 */
|
13747
13778
|
useEffect(() => {
|
13748
|
-
var _a, _b
|
13779
|
+
var _a, _b;
|
13749
13780
|
setIsLoadingData(true);
|
13750
13781
|
waterFallData &&
|
13751
|
-
(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) => {
|
13752
13787
|
var _a, _b;
|
13753
13788
|
setData(res);
|
13754
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 : []);
|
@@ -13757,7 +13792,7 @@ function WaterfallList$1(_a) {
|
|
13757
13792
|
if (isOpenHashTag) {
|
13758
13793
|
const res = previewData;
|
13759
13794
|
setData(res);
|
13760
|
-
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 : []);
|
13761
13796
|
setIsLoadingData(false);
|
13762
13797
|
}
|
13763
13798
|
}, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
|
@@ -13783,10 +13818,11 @@ function WaterfallList$1(_a) {
|
|
13783
13818
|
};
|
13784
13819
|
}, [onResize]);
|
13785
13820
|
useCallback(() => {
|
13786
|
-
var _a, _b, _c, _d;
|
13787
13821
|
setIsLoadingData(true);
|
13788
13822
|
waterFallData &&
|
13789
|
-
(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) => {
|
13790
13826
|
var _a, _b;
|
13791
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 : []));
|
13792
13828
|
setIsLoadingData(false);
|
@@ -13860,6 +13896,7 @@ function WaterfallList$1(_a) {
|
|
13860
13896
|
var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
|
13861
13897
|
|
13862
13898
|
const WaterfallFlowItem = (props) => {
|
13899
|
+
var _a;
|
13863
13900
|
const { rec, index, list, reportTagsView, textStyles, space } = props;
|
13864
13901
|
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
13865
13902
|
const [showVideo, setShowVideo] = useState(false);
|
@@ -13888,16 +13925,19 @@ const WaterfallFlowItem = (props) => {
|
|
13888
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;
|
13889
13926
|
}, [rec]);
|
13890
13927
|
const priceText = useMemo(() => {
|
13891
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13892
|
-
|
13893
|
-
|
13894
|
-
|
13895
|
-
|
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}`;
|
13896
13936
|
}
|
13897
13937
|
else {
|
13898
13938
|
return null;
|
13899
13939
|
}
|
13900
|
-
}, [rec]);
|
13940
|
+
}, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
|
13901
13941
|
// useEffect(() => {
|
13902
13942
|
// if (imgDom.current === null || src === '') {
|
13903
13943
|
// return;
|
@@ -13997,22 +14037,27 @@ function WaterfallList(_a) {
|
|
13997
14037
|
const containerRef = useRef(null);
|
13998
14038
|
const [isLoadMore, setIsLoadMore] = useState(false);
|
13999
14039
|
useCallback(() => {
|
14000
|
-
var _a, _b, _c, _d;
|
14001
14040
|
if (isLoadMore)
|
14002
14041
|
return;
|
14003
14042
|
setIsLoadMore(true);
|
14004
14043
|
waterFallData &&
|
14005
|
-
(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) => {
|
14006
14047
|
var _a;
|
14007
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 : []));
|
14008
14049
|
setIsLoadMore(false);
|
14009
14050
|
}));
|
14010
14051
|
}, [waterFallData, getRecommendVideos, list, isLoadMore]);
|
14011
14052
|
useEffect(() => {
|
14012
|
-
var _a, _b
|
14053
|
+
var _a, _b;
|
14013
14054
|
setIsLoadingData(true);
|
14014
14055
|
waterFallData &&
|
14015
|
-
(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) => {
|
14016
14061
|
var _a, _b;
|
14017
14062
|
setData(res);
|
14018
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 : []);
|
@@ -14021,7 +14066,7 @@ function WaterfallList(_a) {
|
|
14021
14066
|
if (isOpenHashTag) {
|
14022
14067
|
const res = previewData;
|
14023
14068
|
setData(res);
|
14024
|
-
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 : []);
|
14025
14070
|
setIsLoadingData(false);
|
14026
14071
|
}
|
14027
14072
|
}, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
|
@@ -14187,7 +14232,7 @@ var WaterFall$1 = memo(WaterFall);
|
|
14187
14232
|
* @Author: binruan@chatlabs.com
|
14188
14233
|
* @Date: 2024-01-15 19:03:09
|
14189
14234
|
* @LastEditors: binruan@chatlabs.com
|
14190
|
-
* @LastEditTime: 2024-
|
14235
|
+
* @LastEditTime: 2024-08-22 10:15:23
|
14191
14236
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\index.tsx
|
14192
14237
|
*
|
14193
14238
|
*/
|
@@ -15820,7 +15865,7 @@ function withBindDataSource(Component) {
|
|
15820
15865
|
* @Author: binruan@chatlabs.com
|
15821
15866
|
* @Date: 2023-12-26 16:11:34
|
15822
15867
|
* @LastEditors: binruan@chatlabs.com
|
15823
|
-
* @LastEditTime: 2024-
|
15868
|
+
* @LastEditTime: 2024-08-21 15:46:07
|
15824
15869
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
|
15825
15870
|
*
|
15826
15871
|
*/
|
@@ -15840,44 +15885,38 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive }
|
|
15840
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;
|
15841
15886
|
}
|
15842
15887
|
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
15843
|
-
const renderComp =
|
15844
|
-
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;
|
15845
15890
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
15846
15891
|
return null;
|
15847
|
-
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) ;
|
15848
|
-
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) ;
|
15849
|
-
else {
|
15850
|
-
(_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;
|
15851
|
-
}
|
15852
15892
|
//如果includesCtaType有值,则只渲染includesCtaType包含的cta类型组件,用于在页面某处只显示某一组件
|
15853
|
-
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)))
|
15854
15894
|
return;
|
15855
15895
|
//默认不渲染category为cta类型的组件,该类型的组件只用于某一处
|
15856
|
-
if (!includesCtaType && ((
|
15896
|
+
if (!includesCtaType && ((_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.category) === 'cta')
|
15857
15897
|
return;
|
15858
|
-
if ((((
|
15859
|
-
(((
|
15860
|
-
(((
|
15861
|
-
(((
|
15862
|
-
(((
|
15863
|
-
(((
|
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))) {
|
15864
15904
|
//
|
15865
15905
|
return null;
|
15866
15906
|
}
|
15867
15907
|
if (value && resolver) {
|
15868
|
-
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];
|
15869
15909
|
const Component = withBindDataSource(t);
|
15870
|
-
const defaulSetting = (
|
15871
|
-
const isExternalLink = ((
|
15872
|
-
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 })));
|
15873
15913
|
}
|
15874
15914
|
else {
|
15875
15915
|
return null;
|
15876
15916
|
}
|
15877
15917
|
}, [rec, resolver, tempMap, schema, value === null || value === void 0 ? void 0 : value.id, isActive]);
|
15878
|
-
return React.createElement(React.Fragment, null, renderComp);
|
15918
|
+
return React.createElement(React.Fragment, null, renderComp());
|
15879
15919
|
};
|
15880
|
-
var RenderCard$1 = memo(RenderCard);
|
15881
15920
|
|
15882
15921
|
/*
|
15883
15922
|
* @Author: binruan@chatlabs.com
|
@@ -15962,7 +16001,7 @@ var Tagbar$1 = memo(Tagbar);
|
|
15962
16001
|
* @Author: binruan@chatlabs.com
|
15963
16002
|
* @Date: 2024-01-15 19:03:09
|
15964
16003
|
* @LastEditors: binruan@chatlabs.com
|
15965
|
-
* @LastEditTime: 2024-08-
|
16004
|
+
* @LastEditTime: 2024-08-22 09:56:51
|
15966
16005
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
15967
16006
|
*
|
15968
16007
|
*/
|
@@ -15979,7 +16018,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15979
16018
|
const [isShowMore, setIsShowMore] = useState(false);
|
15980
16019
|
const [isReload, setIsReload] = useState(new Date().getTime());
|
15981
16020
|
const skipLinkRef = useRef(false);
|
15982
|
-
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
|
16021
|
+
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor } = useSxpDataSource();
|
15983
16022
|
const { backMainFeed, productView, jumpToWeb } = useEventReport();
|
15984
16023
|
const isShowFingerTip = useMemo(() => {
|
15985
16024
|
return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
|
@@ -16009,6 +16048,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16009
16048
|
}, [data.length, bffFbReport, h5EnterLink]);
|
16010
16049
|
useEffect(() => {
|
16011
16050
|
var _a;
|
16051
|
+
if (!ctaType || (ctaType === null || ctaType === void 0 ? void 0 : ctaType.length) < 1)
|
16052
|
+
return;
|
16012
16053
|
const index = (data === null || data === void 0 ? void 0 : data.findIndex((item) => {
|
16013
16054
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
16014
16055
|
const ctaType0 = ctaType === null || ctaType === void 0 ? void 0 : ctaType[0];
|
@@ -16022,8 +16063,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16022
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));
|
16023
16064
|
}
|
16024
16065
|
})) || 0;
|
16025
|
-
(
|
16026
|
-
|
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]);
|
16027
16069
|
useEffect(() => {
|
16028
16070
|
const item = data === null || data === void 0 ? void 0 : data[activeIndex];
|
16029
16071
|
const visibleChange = () => {
|
@@ -16125,7 +16167,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16125
16167
|
}, [globalConfig, containerHeight, tagHeight]);
|
16126
16168
|
const visList = useMemo(() => {
|
16127
16169
|
var _a;
|
16128
|
-
const list = activeIndex === 0 && !waterFallData
|
16170
|
+
const list = activeIndex === 0 && !waterFallData && !isEditor
|
16129
16171
|
? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
|
16130
16172
|
: data === null || data === void 0 ? void 0 : data.map((item, index) => {
|
16131
16173
|
if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
|
@@ -16136,7 +16178,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16136
16178
|
}
|
16137
16179
|
});
|
16138
16180
|
return !waterFallData ? list.concat([{ loading: true }]) : list;
|
16139
|
-
}, [data, activeIndex, waterFallData]);
|
16181
|
+
}, [data, activeIndex, waterFallData, isEditor]);
|
16140
16182
|
const renderLogo = useMemo(() => {
|
16141
16183
|
var _a, _b, _c, _d;
|
16142
16184
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
@@ -16210,12 +16252,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16210
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` } },
|
16211
16253
|
React.createElement(Nudge, { nudge: nudge }),
|
16212
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' },
|
16213
|
-
React.createElement(RenderCard
|
16255
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
16214
16256
|
React.createElement("div", null,
|
16215
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 }),
|
16216
|
-
React.createElement(RenderCard
|
16258
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
|
16217
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 }))),
|
16218
|
-
React.createElement(RenderCard
|
16260
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
16219
16261
|
}
|
16220
16262
|
return null;
|
16221
16263
|
}, [
|
@@ -16385,6 +16427,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16385
16427
|
position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
|
16386
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',
|
16387
16429
|
zIndex: 999,
|
16430
|
+
transform: 'translate3d(0px,0px,0px)',
|
16388
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,
|
16389
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
|
16390
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 })));
|
@@ -16403,10 +16446,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16403
16446
|
alignItems: 'center'
|
16404
16447
|
} },
|
16405
16448
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
|
16406
|
-
renderContent(rec, index),
|
16407
|
-
renderBottom(rec, index),
|
16408
16449
|
renderLikeButton(rec, index, !(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
|
16409
|
-
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)))))));
|
16410
16453
|
});
|
16411
16454
|
}, [
|
16412
16455
|
containerWidth,
|
@@ -16442,9 +16485,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16442
16485
|
return;
|
16443
16486
|
// 处理上滑下滑事件
|
16444
16487
|
handleScrollEvent(swiper);
|
16445
|
-
if (waterFallData)
|
16488
|
+
if (waterFallData || isEditor)
|
16446
16489
|
return;
|
16447
|
-
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)) {
|
16448
16491
|
if (!isLoadMore) {
|
16449
16492
|
setIsLoadMore(true);
|
16450
16493
|
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(Math.ceil(activeIndex / 10) + 1).then(() => {
|
@@ -16750,7 +16793,7 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
|
|
16750
16793
|
const CTA = (rec, index) => {
|
16751
16794
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
|
16752
16795
|
return (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
16753
|
-
React.createElement(RenderCard
|
16796
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1 })));
|
16754
16797
|
}
|
16755
16798
|
return null;
|
16756
16799
|
};
|
@@ -16940,7 +16983,7 @@ var index = memo(SxpPageCore);
|
|
16940
16983
|
* @Author: binruan@chatlabs.com
|
16941
16984
|
* @Date: 2023-12-26 10:38:53
|
16942
16985
|
* @LastEditors: binruan@chatlabs.com
|
16943
|
-
* @LastEditTime: 2024-
|
16986
|
+
* @LastEditTime: 2024-08-22 11:32:23
|
16944
16987
|
* @FilePath: \pb-sxp-ui\src\core\context\EditorDataProvider.tsx
|
16945
16988
|
*
|
16946
16989
|
*/
|
@@ -16970,7 +17013,8 @@ const EditorDataProvider = ({ children, data }) => {
|
|
16970
17013
|
setOpenHashtag,
|
16971
17014
|
openConsent,
|
16972
17015
|
setOpenConsent,
|
16973
|
-
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
|
16974
17018
|
} }, children));
|
16975
17019
|
};
|
16976
17020
|
function useEditorDataProvider() {
|