pb-sxp-ui 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +371 -198
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +371 -198
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +371 -198
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/Modal/index.js +3 -2
- package/es/core/components/SxpPageRender/RenderCard.d.ts +3 -3
- package/es/core/components/SxpPageRender/RenderCard.js +17 -27
- package/es/core/components/SxpPageRender/WaterFall/List.js +28 -15
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +27 -14
- package/es/core/components/SxpPageRender/index.js +41 -29
- package/es/core/context/EditorContext.js +2 -0
- package/es/core/context/EditorDataProvider.d.ts +3 -0
- package/es/core/context/EditorDataProvider.js +2 -1
- package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.js +58 -23
- package/es/core/hooks/useEventReport.d.ts +1 -1
- package/es/core/hooks/useEventReport.js +2 -2
- package/es/core/utils/tool.d.ts +3 -3
- package/es/core/utils/tool.js +6 -6
- package/es/materials/sxp/HashTag/index.d.ts +3 -1
- package/es/materials/sxp/HashTag/settingRender.d.ts +13 -7
- package/es/materials/sxp/HashTag/settingRender.js +15 -0
- package/es/materials/sxp/cta/AniLink/settingRender.d.ts +5 -0
- package/es/materials/sxp/cta/AniLink/settingRender.js +4 -0
- package/es/materials/sxp/popup/AppointForm/settingRender.d.ts +8 -5
- package/es/materials/sxp/popup/AppointForm/settingRender.js +12 -0
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +3 -1
- package/es/materials/sxp/popup/CommodityDetail/index.js +34 -27
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +15 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +3 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +37 -30
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +13 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +15 -0
- package/es/materials/sxp/popup/CommodityList/index.d.ts +3 -1
- package/es/materials/sxp/popup/CommodityList/index.js +11 -7
- package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +7 -0
- package/es/materials/sxp/popup/CommodityList/settingRender.js +10 -0
- package/es/materials/sxp/popup/Iframe/index.d.ts +1 -0
- package/es/materials/sxp/popup/Iframe/index.js +8 -7
- package/es/materials/sxp/popup/Prompt/settingRender.js +10 -0
- package/es/materials/sxp/template/Link/settingRender.js +5 -0
- package/lib/core/components/SxpPageRender/Modal/index.js +3 -2
- package/lib/core/components/SxpPageRender/RenderCard.d.ts +3 -3
- package/lib/core/components/SxpPageRender/RenderCard.js +16 -26
- package/lib/core/components/SxpPageRender/WaterFall/List.js +28 -15
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +27 -14
- package/lib/core/components/SxpPageRender/index.js +40 -28
- package/lib/core/context/EditorContext.js +2 -0
- package/lib/core/context/EditorDataProvider.d.ts +3 -0
- package/lib/core/context/EditorDataProvider.js +2 -1
- package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.js +58 -23
- package/lib/core/hooks/useEventReport.d.ts +1 -1
- package/lib/core/hooks/useEventReport.js +2 -2
- package/lib/core/utils/tool.d.ts +3 -3
- package/lib/core/utils/tool.js +6 -6
- package/lib/materials/sxp/HashTag/index.d.ts +3 -1
- package/lib/materials/sxp/HashTag/settingRender.d.ts +13 -7
- package/lib/materials/sxp/HashTag/settingRender.js +15 -0
- package/lib/materials/sxp/cta/AniLink/settingRender.d.ts +5 -0
- package/lib/materials/sxp/cta/AniLink/settingRender.js +4 -0
- package/lib/materials/sxp/popup/AppointForm/settingRender.d.ts +8 -5
- package/lib/materials/sxp/popup/AppointForm/settingRender.js +12 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +3 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.js +34 -27
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +15 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +3 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +37 -30
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +13 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +15 -0
- package/lib/materials/sxp/popup/CommodityList/index.d.ts +3 -1
- package/lib/materials/sxp/popup/CommodityList/index.js +11 -7
- package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +7 -0
- package/lib/materials/sxp/popup/CommodityList/settingRender.js +10 -0
- package/lib/materials/sxp/popup/Iframe/index.d.ts +1 -0
- package/lib/materials/sxp/popup/Iframe/index.js +8 -7
- package/lib/materials/sxp/popup/Prompt/settingRender.js +10 -0
- package/lib/materials/sxp/template/Link/settingRender.js +5 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -243,7 +243,7 @@ function getBrowserInfo() {
|
|
243
243
|
var _a, _b, _c, _d, _e, _f, _g;
|
244
244
|
let userAgent = self.navigator.userAgent;
|
245
245
|
if (!userAgent)
|
246
|
-
return
|
246
|
+
return null;
|
247
247
|
if (/edge\/([\d\.]+)/i.exec(userAgent))
|
248
248
|
return `Edge ${(_a = /edge\/([\d\.]+)/i.exec(userAgent)) === null || _a === void 0 ? void 0 : _a[1]}`;
|
249
249
|
if (/edg\/([\d\.]+)/i.exec(userAgent))
|
@@ -258,13 +258,13 @@ function getBrowserInfo() {
|
|
258
258
|
return `Firefox ${(_f = /firefox\/([\d\.]+)/i.exec(userAgent)) === null || _f === void 0 ? void 0 : _f[1]}`;
|
259
259
|
if (/safari/i.test(userAgent))
|
260
260
|
return `Safari ${(_g = /version\/([\d\.]+)/i.exec(userAgent)) === null || _g === void 0 ? void 0 : _g[1]}`;
|
261
|
-
return
|
261
|
+
return null;
|
262
262
|
}
|
263
263
|
function getSystem() {
|
264
264
|
var _a, _b, _c;
|
265
265
|
let userAgent = self.navigator.userAgent;
|
266
266
|
if (!userAgent)
|
267
|
-
return
|
267
|
+
return null;
|
268
268
|
if (/iphone/i.test(userAgent))
|
269
269
|
return `IOS ${(_a = userAgent.match(/OS\s(.*?)\slike/)) === null || _a === void 0 ? void 0 : _a[1]}`;
|
270
270
|
if (/android/i.test(userAgent))
|
@@ -273,12 +273,12 @@ function getSystem() {
|
|
273
273
|
return `Windows ${(_c = userAgent.match(/Windows\s(.*?)\;/)) === null || _c === void 0 ? void 0 : _c[1]}`;
|
274
274
|
if (/mac/i.test(userAgent))
|
275
275
|
return `Mac OS`;
|
276
|
-
return
|
276
|
+
return null;
|
277
277
|
}
|
278
278
|
function getDevice$1() {
|
279
279
|
let userAgent = self.navigator.userAgent;
|
280
280
|
if (!userAgent)
|
281
|
-
return
|
281
|
+
return null;
|
282
282
|
if (/iphone/i.test(userAgent))
|
283
283
|
return `iPhone`;
|
284
284
|
if (/android/i.test(userAgent)) {
|
@@ -301,7 +301,7 @@ function getDevice$1() {
|
|
301
301
|
return `Windows`;
|
302
302
|
if (/mac/i.test(userAgent))
|
303
303
|
return `Mac`;
|
304
|
-
return
|
304
|
+
return null;
|
305
305
|
}
|
306
306
|
function getCookie(val) {
|
307
307
|
// const expirationDate = new Date();
|
@@ -718,8 +718,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
718
718
|
}, [bffDataSource]);
|
719
719
|
// 获取推荐视频数据
|
720
720
|
const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
|
721
|
-
var _d, _e, _f, _g, _h;
|
722
|
-
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}]` }));
|
721
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
722
|
+
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 });
|
723
723
|
if (utmVal) {
|
724
724
|
const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
|
725
725
|
var _a, _b;
|
@@ -728,8 +728,35 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
728
728
|
})) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
|
729
729
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
730
730
|
}
|
731
|
-
if (
|
732
|
-
query = Object.assign(Object.assign(
|
731
|
+
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
732
|
+
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 });
|
733
|
+
}
|
734
|
+
if (isEditor) {
|
735
|
+
let pageNum = 1;
|
736
|
+
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] }));
|
737
|
+
if (!(query === null || query === void 0 ? void 0 : query.channel) || isInit.current)
|
738
|
+
return;
|
739
|
+
isInit.current = true;
|
740
|
+
let list = [];
|
741
|
+
let result = null;
|
742
|
+
const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
|
743
|
+
var _r, _s, _t, _u, _v, _w;
|
744
|
+
query.pageNum = pageNum;
|
745
|
+
result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
746
|
+
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
747
|
+
return undefined;
|
748
|
+
}
|
749
|
+
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));
|
750
|
+
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 : []);
|
751
|
+
if (isNotNullList) {
|
752
|
+
pageNum = pageNum + 1;
|
753
|
+
yield recurveRecList(query);
|
754
|
+
}
|
755
|
+
});
|
756
|
+
yield recurveRecList(query);
|
757
|
+
if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
|
758
|
+
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 });
|
759
|
+
return Object.assign(Object.assign({}, result.data), { recList: list });
|
733
760
|
}
|
734
761
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
735
762
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
@@ -737,15 +764,20 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
737
764
|
}
|
738
765
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag))
|
739
766
|
setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
|
767
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
|
768
|
+
let list = [];
|
769
|
+
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 : []);
|
770
|
+
return Object.assign(Object.assign({}, result.data), { recList: list });
|
771
|
+
}
|
740
772
|
return result === null || result === void 0 ? void 0 : result.data;
|
741
|
-
}), [bffFetch, utmVal, maxSize, defaultSize,
|
742
|
-
const loadVideos = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
743
|
-
var
|
773
|
+
}), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList]);
|
774
|
+
const loadVideos = React.useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
|
775
|
+
var _x, _y, _z, _0;
|
744
776
|
if (rtcList.length <= 0) {
|
745
777
|
return;
|
746
778
|
}
|
747
779
|
const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
|
748
|
-
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((
|
780
|
+
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 })));
|
749
781
|
setRtcList(rtcList.concat(getFilterRecList(data)));
|
750
782
|
setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
|
751
783
|
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
@@ -762,7 +794,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
762
794
|
};
|
763
795
|
}
|
764
796
|
const sessionID = storeAndLoadFeSessionId();
|
765
|
-
const ef = Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), { sxpDevice: getDevice$1(), sxpSystem: getSystem(), sxpBrowser: getBrowserInfo() });
|
797
|
+
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() }));
|
766
798
|
const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
|
767
799
|
const realEventInfo = Object.entries(ef)
|
768
800
|
.map(([k, v]) => v && { name: k, value: v })
|
@@ -778,24 +810,21 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
778
810
|
});
|
779
811
|
}, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
|
780
812
|
const bffFbReport = React.useCallback((_a) => {
|
781
|
-
var _b, _c;
|
813
|
+
var _b, _c, _d;
|
782
814
|
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;
|
783
815
|
if (!enableReportEvent || !enabledMetaConversionApi || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
784
816
|
return;
|
785
817
|
}
|
786
818
|
const fakeUserId = storeAndLoadFeUserId();
|
819
|
+
const urlParams = new URLSearchParams(window.location.search);
|
820
|
+
const fbclid = urlParams.get('fbclid');
|
787
821
|
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/fb/events', {
|
788
822
|
method: 'POST',
|
789
823
|
body: {
|
790
824
|
eventName,
|
791
825
|
actionSource,
|
792
826
|
eventSourceUrl,
|
793
|
-
userData: {
|
794
|
-
externalId: fakeUserId,
|
795
|
-
fbc: `fb.2.${new Date().getTime()}.${getCookie('_fbc')}`,
|
796
|
-
fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}`,
|
797
|
-
client_user_agent: (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent
|
798
|
-
}
|
827
|
+
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 : '' })
|
799
828
|
},
|
800
829
|
type: 'beacon'
|
801
830
|
});
|
@@ -814,17 +843,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
814
843
|
}), [bffFetch]);
|
815
844
|
// 获取 Tag
|
816
845
|
const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
817
|
-
var
|
846
|
+
var _1, _2, _3, _4, _5;
|
818
847
|
if (!utmVal || !isShowTag)
|
819
848
|
return;
|
820
849
|
try {
|
821
|
-
const val = (
|
850
|
+
const val = (_3 = (_2 = (_1 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _1 === void 0 ? void 0 : _1.filter((val) => {
|
822
851
|
var _a, _b;
|
823
852
|
const key = val.split('=')[0];
|
824
853
|
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);
|
825
|
-
})) === null ||
|
854
|
+
})) === null || _2 === void 0 ? void 0 : _2.join('&')) !== null && _3 !== void 0 ? _3 : '';
|
826
855
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
827
|
-
setTagList((
|
856
|
+
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 : []);
|
828
857
|
}
|
829
858
|
catch (e) {
|
830
859
|
console.log('e', e);
|
@@ -897,11 +926,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
897
926
|
}
|
898
927
|
});
|
899
928
|
setLoading(false);
|
900
|
-
isInit.current = true;
|
901
929
|
});
|
902
930
|
}, [isShowConsent]);
|
903
931
|
React.useEffect(() => {
|
904
|
-
if (!
|
932
|
+
if (!isPreview)
|
905
933
|
return;
|
906
934
|
setLoading(true);
|
907
935
|
bffGetTagList();
|
@@ -911,6 +939,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
911
939
|
setCacheRtcList(getFilterRecList(data));
|
912
940
|
})
|
913
941
|
.finally(() => {
|
942
|
+
bffEventReport({
|
943
|
+
eventInfo: {
|
944
|
+
eventSubject: 'apiRequest',
|
945
|
+
eventDescription: 'api request succeed'
|
946
|
+
}
|
947
|
+
});
|
914
948
|
setLoading(false);
|
915
949
|
});
|
916
950
|
}, [getRecommendVideos, bffGetTagList]);
|
@@ -961,7 +995,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
961
995
|
setSelectTag,
|
962
996
|
globalConfig,
|
963
997
|
popupCurTimeRef,
|
964
|
-
checkCommodityIndexRef
|
998
|
+
checkCommodityIndexRef,
|
999
|
+
isEditor
|
965
1000
|
} }, 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({
|
966
1001
|
rtcList,
|
967
1002
|
mutateLike: bffMutateLike,
|
@@ -1116,6 +1151,7 @@ const EditorCore = React.forwardRef(({ children, resolver, isSsr, schema, enable
|
|
1116
1151
|
});
|
1117
1152
|
typeof window !== 'undefined' &&
|
1118
1153
|
(window.getJointUtmLink = (url) => {
|
1154
|
+
setSlideSkipState();
|
1119
1155
|
if ((url === null || url === void 0 ? void 0 : url.indexOf('?')) !== -1) {
|
1120
1156
|
return url + (utmVal ? '&' + utmVal : '');
|
1121
1157
|
}
|
@@ -1288,6 +1324,11 @@ var settingRender$a = [
|
|
1288
1324
|
type: 'TextAlign',
|
1289
1325
|
name: ['textStyle']
|
1290
1326
|
},
|
1327
|
+
{
|
1328
|
+
label: '标题间距',
|
1329
|
+
type: 'TextSpace',
|
1330
|
+
name: ['textStyle']
|
1331
|
+
},
|
1291
1332
|
{
|
1292
1333
|
label: '表单布局',
|
1293
1334
|
type: 'Radius',
|
@@ -1346,10 +1387,12 @@ var settingRender$a = [
|
|
1346
1387
|
]
|
1347
1388
|
},
|
1348
1389
|
{
|
1390
|
+
label: '提交按钮文本样式',
|
1349
1391
|
type: 'TextStyle',
|
1350
1392
|
name: ['props', 'submitButtonStyle']
|
1351
1393
|
},
|
1352
1394
|
{
|
1395
|
+
label: '提交按钮对齐',
|
1353
1396
|
type: 'TextAlign',
|
1354
1397
|
name: ['props', 'submitButtonStyle']
|
1355
1398
|
},
|
@@ -1357,6 +1400,11 @@ var settingRender$a = [
|
|
1357
1400
|
label: '提交按钮颜色',
|
1358
1401
|
type: 'Color',
|
1359
1402
|
name: ['props', 'submitBgColor']
|
1403
|
+
},
|
1404
|
+
{
|
1405
|
+
label: '提交按钮间距',
|
1406
|
+
type: 'TextSpace',
|
1407
|
+
name: ['props', 'submitButtonStyle']
|
1360
1408
|
}
|
1361
1409
|
// {
|
1362
1410
|
// label: '接收内容接口地址',
|
@@ -1397,7 +1445,7 @@ var settingRender$a = [
|
|
1397
1445
|
*/
|
1398
1446
|
function useEventReport() {
|
1399
1447
|
const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
|
1400
|
-
const jumpToWeb = React.useCallback((data, product, cta, position) => {
|
1448
|
+
const jumpToWeb = React.useCallback((data, product, cta, position, traceInfo) => {
|
1401
1449
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
|
1402
1450
|
let fromKName = '';
|
1403
1451
|
if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
|
@@ -1430,7 +1478,7 @@ function useEventReport() {
|
|
1430
1478
|
position: position + '',
|
1431
1479
|
contentId: (_v = (_u = data === null || data === void 0 ? void 0 : data.video) === null || _u === void 0 ? void 0 : _u.itemId) !== null && _v !== void 0 ? _v : '',
|
1432
1480
|
ctatId: (_w = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _w !== void 0 ? _w : '',
|
1433
|
-
traceInfo: (_9 = (_6 = (_4 = (_0 = (_x = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _x !== void 0 ? _x : (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProduct) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : (_3 = (_2 = (_1 = data === null || data === void 0 ? void 0 : data.video) === null || _1 === void 0 ? void 0 : _1.bindProducts) === null || _2 === void 0 ? void 0 : _2[0]) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_5 = data === null || data === void 0 ? void 0 : data.product) === null || _5 === void 0 ? void 0 : _5.traceInfo) !== null && _6 !== void 0 ? _6 : (_8 = (_7 = data === null || data === void 0 ? void 0 : data.video) === null || _7 === void 0 ? void 0 : _7.bindCta) === null || _8 === void 0 ? void 0 : _8.traceInfo) !== null && _9 !== void 0 ? _9 : ''
|
1481
|
+
traceInfo: (_9 = (_6 = (_4 = (_0 = (_x = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _x !== void 0 ? _x : (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProduct) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : (_3 = (_2 = (_1 = data === null || data === void 0 ? void 0 : data.video) === null || _1 === void 0 ? void 0 : _1.bindProducts) === null || _2 === void 0 ? void 0 : _2[0]) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_5 = data === null || data === void 0 ? void 0 : data.product) === null || _5 === void 0 ? void 0 : _5.traceInfo) !== null && _6 !== void 0 ? _6 : (_8 = (_7 = data === null || data === void 0 ? void 0 : data.video) === null || _7 === void 0 ? void 0 : _7.bindCta) === null || _8 === void 0 ? void 0 : _8.traceInfo) !== null && _9 !== void 0 ? _9 : ''
|
1434
1482
|
}
|
1435
1483
|
});
|
1436
1484
|
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
@@ -1835,6 +1883,16 @@ var settingRender$9 = [
|
|
1835
1883
|
label: '默认行数',
|
1836
1884
|
type: 'Number',
|
1837
1885
|
name: ['lineClamp']
|
1886
|
+
},
|
1887
|
+
{
|
1888
|
+
label: '间距',
|
1889
|
+
type: 'TextSpace'
|
1890
|
+
},
|
1891
|
+
{
|
1892
|
+
label: '价格千分符展示',
|
1893
|
+
type: 'Switch',
|
1894
|
+
name: ['enableFormattedPrice'],
|
1895
|
+
initialValue: true
|
1838
1896
|
}
|
1839
1897
|
]
|
1840
1898
|
}
|
@@ -1920,6 +1978,11 @@ var settingRender$9 = [
|
|
1920
1978
|
{
|
1921
1979
|
type: 'TextAlign',
|
1922
1980
|
name: ['props', 'buttonStyle']
|
1981
|
+
},
|
1982
|
+
{
|
1983
|
+
label: '间距',
|
1984
|
+
type: 'TextSpace',
|
1985
|
+
name: ['props', 'buttonStyle']
|
1923
1986
|
}
|
1924
1987
|
]
|
1925
1988
|
},
|
@@ -8762,13 +8825,13 @@ SwiperSlide.displayName = 'SwiperSlide';
|
|
8762
8825
|
* @Author: binruan@chatlabs.com
|
8763
8826
|
* @Date: 2023-11-02 18:34:34
|
8764
8827
|
* @LastEditors: binruan@chatlabs.com
|
8765
|
-
* @LastEditTime: 2024-08-
|
8828
|
+
* @LastEditTime: 2024-08-20 18:29:11
|
8766
8829
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
|
8767
8830
|
*
|
8768
8831
|
*/
|
8769
8832
|
const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
8770
8833
|
const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
|
8771
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
8834
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
8772
8835
|
const touchRef = React.useRef(null);
|
8773
8836
|
const fTouchRef = React.useRef(null);
|
8774
8837
|
const touchMoveRef = React.useRef(null);
|
@@ -8893,7 +8956,8 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
8893
8956
|
React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
|
8894
8957
|
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' })),
|
8895
8958
|
React.createElement("div", { ref: ref, style: {
|
8896
|
-
height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H
|
8959
|
+
height: (_x = (isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H) -
|
8960
|
+
((_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,
|
8897
8961
|
overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
|
8898
8962
|
} }, children)))))), modalEleRef.current);
|
8899
8963
|
};
|
@@ -9061,7 +9125,7 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
|
|
9061
9125
|
var CommodityGroup$1 = React.memo(CommodityGroup);
|
9062
9126
|
|
9063
9127
|
const CommodityDetail$1 = (_a) => {
|
9064
|
-
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;
|
9128
|
+
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;
|
9065
9129
|
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"]);
|
9066
9130
|
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
|
9067
9131
|
const { jumpToWeb, productView } = useEventReport();
|
@@ -9069,6 +9133,7 @@ const CommodityDetail$1 = (_a) => {
|
|
9069
9133
|
const [showModal, setShowModal] = React.useState(false);
|
9070
9134
|
const [show3DModal, setShow3DModal] = React.useState(false);
|
9071
9135
|
const [checkCommodityIndex, setCheckCommodityIndex] = React.useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
|
9136
|
+
const ref = React.useRef();
|
9072
9137
|
const data = isPost ? rec : popupDetailData;
|
9073
9138
|
let product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_d = (_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct) !== null && _d !== void 0 ? _d : (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.bindProducts) === null || _f === void 0 ? void 0 : _f[0];
|
9074
9139
|
let cta = isPost
|
@@ -9108,17 +9173,20 @@ const CommodityDetail$1 = (_a) => {
|
|
9108
9173
|
};
|
9109
9174
|
}, []);
|
9110
9175
|
const priceText = React.useMemo(() => {
|
9111
|
-
var _a, _b, _c, _d, _e;
|
9176
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
9177
|
+
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);
|
9112
9178
|
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
9113
|
-
return `${(
|
9114
|
-
|
9115
|
-
|
9179
|
+
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
|
9180
|
+
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
9181
|
+
minimumFractionDigits: 0
|
9182
|
+
})) !== null && _g !== void 0 ? _g : ''
|
9183
|
+
: product === null || product === void 0 ? void 0 : product.price}`;
|
9116
9184
|
}
|
9117
9185
|
else {
|
9118
9186
|
return '$7,000';
|
9119
9187
|
}
|
9120
|
-
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
|
9121
|
-
const width = (isPreview ? 375 : (
|
9188
|
+
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency, (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice]);
|
9189
|
+
const width = (isPreview ? 375 : (_u = style === null || style === void 0 ? void 0 : style.width) !== null && _u !== void 0 ? _u : window.innerWidth) - ((_v = popupBg === null || popupBg === void 0 ? void 0 : popupBg.horizontalMargin) !== null && _v !== void 0 ? _v : 0) * 2;
|
9122
9190
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
9123
9191
|
const renderContent = ({ isPost }) => {
|
9124
9192
|
var _a, _b, _c, _d;
|
@@ -9159,6 +9227,10 @@ const CommodityDetail$1 = (_a) => {
|
|
9159
9227
|
popupCurTimeRef.current = new Date();
|
9160
9228
|
setCheckCommodityIndex(index);
|
9161
9229
|
checkCommodityIndexRef.current = index;
|
9230
|
+
if (ref === null || ref === void 0 ? void 0 : ref.current) {
|
9231
|
+
ref.current.swiper.slideTo(0);
|
9232
|
+
ref.current.swiper.autoplay.start();
|
9233
|
+
}
|
9162
9234
|
}, []);
|
9163
9235
|
const renderCommodityGroup = React.useCallback(() => {
|
9164
9236
|
var _a, _b, _c;
|
@@ -9174,18 +9246,18 @@ const CommodityDetail$1 = (_a) => {
|
|
9174
9246
|
};
|
9175
9247
|
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
9176
9248
|
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
9177
|
-
const iframeUrl = ((
|
9249
|
+
const iframeUrl = ((_x = (_w = data === null || data === void 0 ? void 0 : data.video) === null || _w === void 0 ? void 0 : _w.bindProduct) === null || _x === void 0 ? void 0 : _x.remark) || ((_0 = (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProducts) === null || _z === void 0 ? void 0 : _z[0]) === null || _0 === void 0 ? void 0 : _0.remark) || ((_1 = data === null || data === void 0 ? void 0 : data.product) === null || _1 === void 0 ? void 0 : _1.remark);
|
9178
9250
|
return (React.createElement(React.Fragment, null,
|
9179
9251
|
React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
|
9180
9252
|
React.createElement("div", { style: { position: 'relative' } },
|
9181
|
-
product && ((
|
9253
|
+
product && ((_2 = product === null || product === void 0 ? void 0 : product.homePage) === null || _2 === void 0 ? void 0 : _2.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
|
9182
9254
|
clickable: true,
|
9183
9255
|
bulletActiveClass: 'swipe-item-active-bullet',
|
9184
9256
|
clickableClass: getDotsAlign
|
9185
9257
|
}, loop: true, autoplay: {
|
9186
9258
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
9187
|
-
} },
|
9188
|
-
React.createElement(React.Fragment, null, (
|
9259
|
+
}, ref: ref },
|
9260
|
+
React.createElement(React.Fragment, null, (_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.map((src) => {
|
9189
9261
|
var _a;
|
9190
9262
|
return (React.createElement(SwiperSlide, { key: src },
|
9191
9263
|
React.createElement("div", { style: {
|
@@ -9201,7 +9273,7 @@ const CommodityDetail$1 = (_a) => {
|
|
9201
9273
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
9202
9274
|
}, 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 }))));
|
9203
9275
|
})))),
|
9204
|
-
!((
|
9276
|
+
!((_4 = product === null || product === void 0 ? void 0 : product.homePage) === null || _4 === void 0 ? void 0 : _4.length) && (React.createElement("div", { className: css.css({
|
9205
9277
|
height,
|
9206
9278
|
width
|
9207
9279
|
}) },
|
@@ -9209,21 +9281,20 @@ const CommodityDetail$1 = (_a) => {
|
|
9209
9281
|
objectFit: 'cover',
|
9210
9282
|
width: '100%',
|
9211
9283
|
height: '100%'
|
9212
|
-
}), src: (
|
9213
|
-
(iframeUrl && iframeIcon
|
9214
|
-
|
9215
|
-
|
9216
|
-
|
9217
|
-
|
9218
|
-
|
9219
|
-
|
9220
|
-
|
9221
|
-
|
9222
|
-
|
9223
|
-
|
9224
|
-
|
9225
|
-
|
9226
|
-
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
|
9284
|
+
}), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
|
9285
|
+
(iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
|
9286
|
+
padding: '5px 10px',
|
9287
|
+
display: 'flex',
|
9288
|
+
alignItems: 'center',
|
9289
|
+
position: 'absolute',
|
9290
|
+
right: '10px',
|
9291
|
+
bottom: '10px',
|
9292
|
+
zIndex: 1,
|
9293
|
+
background: '#fff',
|
9294
|
+
borderRadius: '3px'
|
9295
|
+
}, onClick: () => setShow3DModal(true) },
|
9296
|
+
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
|
9297
|
+
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D")))),
|
9227
9298
|
renderCommodityGroup(),
|
9228
9299
|
React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
|
9229
9300
|
renderBtn(),
|
@@ -9355,7 +9426,7 @@ var interactionRender$c = [
|
|
9355
9426
|
* @Author: binruan@chatlabs.com
|
9356
9427
|
* @Date: 2023-10-27 14:06:35
|
9357
9428
|
* @LastEditors: binruan@chatlabs.com
|
9358
|
-
* @LastEditTime: 2024-08-
|
9429
|
+
* @LastEditTime: 2024-08-20 14:01:21
|
9359
9430
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
|
9360
9431
|
*
|
9361
9432
|
*/
|
@@ -9422,6 +9493,11 @@ var settingRender$8 = [
|
|
9422
9493
|
}
|
9423
9494
|
]
|
9424
9495
|
},
|
9496
|
+
{
|
9497
|
+
label: '内容字体间距',
|
9498
|
+
type: 'TextSpace',
|
9499
|
+
name: ['props', 'contentStyle']
|
9500
|
+
},
|
9425
9501
|
{
|
9426
9502
|
type: 'Group',
|
9427
9503
|
label: '提交按钮字体',
|
@@ -9455,6 +9531,11 @@ var settingRender$8 = [
|
|
9455
9531
|
}
|
9456
9532
|
]
|
9457
9533
|
},
|
9534
|
+
{
|
9535
|
+
label: '提交按钮间距',
|
9536
|
+
type: 'TextSpace',
|
9537
|
+
name: ['props', 'submitButtonStyle']
|
9538
|
+
},
|
9458
9539
|
{
|
9459
9540
|
type: 'TextStyle',
|
9460
9541
|
name: ['props', 'submitButtonStyle']
|
@@ -9565,7 +9646,7 @@ const Prompt = createMaterial(PromptComponent, {
|
|
9565
9646
|
* @Author: binruan@chatlabs.com
|
9566
9647
|
* @Date: 2024-03-26 16:50:25
|
9567
9648
|
* @LastEditors: binruan@chatlabs.com
|
9568
|
-
* @LastEditTime: 2024-08-
|
9649
|
+
* @LastEditTime: 2024-08-20 15:50:06
|
9569
9650
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
|
9570
9651
|
*
|
9571
9652
|
*/
|
@@ -9762,6 +9843,16 @@ var settingRender$7 = [
|
|
9762
9843
|
label: '默认行数',
|
9763
9844
|
type: 'Number',
|
9764
9845
|
name: ['lineClamp']
|
9846
|
+
},
|
9847
|
+
{
|
9848
|
+
label: '间距',
|
9849
|
+
type: 'TextSpace'
|
9850
|
+
},
|
9851
|
+
{
|
9852
|
+
label: '价格千分符展示',
|
9853
|
+
type: 'Switch',
|
9854
|
+
name: ['enableFormattedPrice'],
|
9855
|
+
initialValue: true
|
9765
9856
|
}
|
9766
9857
|
]
|
9767
9858
|
}
|
@@ -9847,6 +9938,11 @@ var settingRender$7 = [
|
|
9847
9938
|
{
|
9848
9939
|
type: 'TextAlign',
|
9849
9940
|
name: ['props', 'buttonStyle']
|
9941
|
+
},
|
9942
|
+
{
|
9943
|
+
label: '间距',
|
9944
|
+
type: 'TextSpace',
|
9945
|
+
name: ['props', 'buttonStyle']
|
9850
9946
|
}
|
9851
9947
|
]
|
9852
9948
|
},
|
@@ -9864,7 +9960,7 @@ var settingRender$7 = [
|
|
9864
9960
|
];
|
9865
9961
|
|
9866
9962
|
const CommodityDetailDiroNew$1 = (_a) => {
|
9867
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
|
9963
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
|
9868
9964
|
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"]);
|
9869
9965
|
React.useState(true);
|
9870
9966
|
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
|
@@ -9876,6 +9972,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
9876
9972
|
const curTimeRef = React.useRef(null);
|
9877
9973
|
const [show3DModal, setShow3DModal] = React.useState(false);
|
9878
9974
|
const [checkCommodityIndex, setCheckCommodityIndex] = React.useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
|
9975
|
+
const ref = React.useRef();
|
9879
9976
|
const data = isPost ? rec : popupDetailData;
|
9880
9977
|
let product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_d = (_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct) !== null && _d !== void 0 ? _d : (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.bindProducts) === null || _f === void 0 ? void 0 : _f[0];
|
9881
9978
|
let cta = isPost
|
@@ -9915,17 +10012,20 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
9915
10012
|
};
|
9916
10013
|
}, []);
|
9917
10014
|
const priceText = React.useMemo(() => {
|
9918
|
-
var _a, _b, _c, _d, _e;
|
10015
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
10016
|
+
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);
|
9919
10017
|
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
9920
|
-
return `${(
|
9921
|
-
|
9922
|
-
|
10018
|
+
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
|
10019
|
+
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
10020
|
+
minimumFractionDigits: 0
|
10021
|
+
})) !== null && _g !== void 0 ? _g : ''
|
10022
|
+
: product === null || product === void 0 ? void 0 : product.price}`;
|
9923
10023
|
}
|
9924
10024
|
else {
|
9925
10025
|
return '£102,300.00';
|
9926
10026
|
}
|
9927
|
-
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
|
9928
|
-
const width = (isPreview ? 375 : (
|
10027
|
+
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency, (_t = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _t === void 0 ? void 0 : _t.enableFormattedPrice]);
|
10028
|
+
const width = (isPreview ? 375 : (_u = style === null || style === void 0 ? void 0 : style.width) !== null && _u !== void 0 ? _u : window.innerWidth) - ((_v = popupBg === null || popupBg === void 0 ? void 0 : popupBg.horizontalMargin) !== null && _v !== void 0 ? _v : 0) * 2;
|
9929
10029
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
9930
10030
|
// useEffect(() => {
|
9931
10031
|
// console.log(scrollRef?.current?.scrollHeight, window.innerHeight);
|
@@ -9993,6 +10093,10 @@ Made in Italy` })));
|
|
9993
10093
|
popupCurTimeRef.current = new Date();
|
9994
10094
|
setCheckCommodityIndex(index);
|
9995
10095
|
checkCommodityIndexRef.current = index;
|
10096
|
+
if (ref === null || ref === void 0 ? void 0 : ref.current) {
|
10097
|
+
ref.current.swiper.slideTo(0);
|
10098
|
+
ref.current.swiper.autoplay.start();
|
10099
|
+
}
|
9996
10100
|
}, []);
|
9997
10101
|
const renderCommodityGroup = React.useCallback(() => {
|
9998
10102
|
var _a, _b, _c;
|
@@ -10008,17 +10112,17 @@ Made in Italy` })));
|
|
10008
10112
|
};
|
10009
10113
|
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
10010
10114
|
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
10011
|
-
const iframeUrl = ((
|
10115
|
+
const iframeUrl = ((_x = (_w = data === null || data === void 0 ? void 0 : data.video) === null || _w === void 0 ? void 0 : _w.bindProduct) === null || _x === void 0 ? void 0 : _x.remark) || ((_0 = (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProducts) === null || _z === void 0 ? void 0 : _z[0]) === null || _0 === void 0 ? void 0 : _0.remark) || ((_1 = data === null || data === void 0 ? void 0 : data.product) === null || _1 === void 0 ? void 0 : _1.remark);
|
10012
10116
|
return (React.createElement("div", { className: 'pb-commondityDiroNew' },
|
10013
10117
|
React.createElement("div", Object.assign({ className: css.css(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
|
10014
10118
|
React.createElement("div", { style: { position: 'relative' } },
|
10015
|
-
product && ((
|
10119
|
+
product && ((_2 = product === null || product === void 0 ? void 0 : product.homePage) === null || _2 === void 0 ? void 0 : _2.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
|
10016
10120
|
clickable: true,
|
10017
10121
|
bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
|
10018
10122
|
clickableClass: getDotsAlign
|
10019
10123
|
}, loop: true, autoplay: {
|
10020
10124
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
10021
|
-
} }, (
|
10125
|
+
}, ref: ref }, (_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.map((src) => {
|
10022
10126
|
var _a;
|
10023
10127
|
return (React.createElement(SwiperSlide, { key: src },
|
10024
10128
|
React.createElement("div", { style: {
|
@@ -10034,7 +10138,7 @@ Made in Italy` })));
|
|
10034
10138
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
10035
10139
|
}, 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 }))));
|
10036
10140
|
}))),
|
10037
|
-
!((
|
10141
|
+
!((_4 = product === null || product === void 0 ? void 0 : product.homePage) === null || _4 === void 0 ? void 0 : _4.length) && (React.createElement("div", { className: css.css({
|
10038
10142
|
height,
|
10039
10143
|
width
|
10040
10144
|
}) },
|
@@ -10042,27 +10146,26 @@ Made in Italy` })));
|
|
10042
10146
|
objectFit: 'cover',
|
10043
10147
|
width: '100%',
|
10044
10148
|
height: '100%'
|
10045
|
-
}), src: (
|
10046
|
-
(iframeUrl && iframeIcon
|
10047
|
-
|
10048
|
-
|
10049
|
-
|
10050
|
-
|
10051
|
-
|
10052
|
-
|
10053
|
-
|
10054
|
-
|
10055
|
-
|
10056
|
-
|
10057
|
-
|
10058
|
-
|
10059
|
-
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D"))))),
|
10149
|
+
}), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
|
10150
|
+
(iframeUrl || !product) && iframeIcon && (React.createElement("div", { style: {
|
10151
|
+
padding: '5px 10px',
|
10152
|
+
display: 'flex',
|
10153
|
+
alignItems: 'center',
|
10154
|
+
position: 'absolute',
|
10155
|
+
right: '10px',
|
10156
|
+
bottom: '10px',
|
10157
|
+
zIndex: 1,
|
10158
|
+
background: '#fff',
|
10159
|
+
borderRadius: '3px'
|
10160
|
+
}, onClick: () => setShow3DModal(true) },
|
10161
|
+
React.createElement("img", { src: iframeIcon, alt: '3d', width: '20px', height: '20px', style: { marginRight: '5px' } }),
|
10162
|
+
React.createElement("span", { style: { fontSize: '12px' } }, "Try in 3D")))),
|
10060
10163
|
renderCommodityGroup(),
|
10061
10164
|
React.createElement("div", { className: 'pb-commondityDiroNew-content' },
|
10062
10165
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
10063
10166
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
10064
10167
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: getStyle(commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title), dangerouslySetInnerHTML: {
|
10065
|
-
__html: setFontForText((
|
10168
|
+
__html: setFontForText((_6 = product === null || product === void 0 ? void 0 : product.title) !== null && _6 !== void 0 ? _6 : 'Large Dior Toujours BagLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
|
10066
10169
|
} }),
|
10067
10170
|
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: {
|
10068
10171
|
__html: setFontForText((product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage CalfskinLarge', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
|
@@ -10072,11 +10175,11 @@ Made in Italy` })));
|
|
10072
10175
|
__html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
10073
10176
|
} }),
|
10074
10177
|
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: {
|
10075
|
-
__html: setFontForText((
|
10178
|
+
__html: setFontForText((_7 = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _7 !== void 0 ? _7 : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
|
10076
10179
|
} }))),
|
10077
|
-
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (
|
10180
|
+
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (_8 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _8 !== void 0 ? _8 : 'Shop now', onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle },
|
10078
10181
|
React.createElement("span", { dangerouslySetInnerHTML: {
|
10079
|
-
__html: setFontForText((
|
10182
|
+
__html: setFontForText((_9 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _9 !== void 0 ? _9 : 'Shop now', buttonStyle)
|
10080
10183
|
} }))),
|
10081
10184
|
productInfoText({ isPost }))),
|
10082
10185
|
React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
|
@@ -10194,7 +10297,7 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
|
|
10194
10297
|
* @Author: binruan@chatlabs.com
|
10195
10298
|
* @Date: 2024-03-26 16:50:25
|
10196
10299
|
* @LastEditors: binruan@chatlabs.com
|
10197
|
-
* @LastEditTime: 2024-
|
10300
|
+
* @LastEditTime: 2024-08-06 14:09:52
|
10198
10301
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\settingRender.tsx
|
10199
10302
|
*
|
10200
10303
|
*/
|
@@ -10331,6 +10434,16 @@ var settingRender$6 = [
|
|
10331
10434
|
{
|
10332
10435
|
label: '标题对齐',
|
10333
10436
|
type: 'TextAlign'
|
10437
|
+
},
|
10438
|
+
{
|
10439
|
+
label: '间距',
|
10440
|
+
type: 'TextSpace'
|
10441
|
+
},
|
10442
|
+
{
|
10443
|
+
label: '价格千分符展示',
|
10444
|
+
type: 'Switch',
|
10445
|
+
name: ['enableFormattedPrice'],
|
10446
|
+
initialValue: true
|
10334
10447
|
}
|
10335
10448
|
]
|
10336
10449
|
}
|
@@ -10483,7 +10596,7 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle, enableEventRe
|
|
10483
10596
|
var Img$1 = React.memo(Img);
|
10484
10597
|
|
10485
10598
|
const CommodityList$1 = (_a) => {
|
10486
|
-
var _b, _c;
|
10599
|
+
var _b, _c, _d;
|
10487
10600
|
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"]);
|
10488
10601
|
const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
|
10489
10602
|
const { jumpToWeb } = useEventReport();
|
@@ -10492,16 +10605,20 @@ const CommodityList$1 = (_a) => {
|
|
10492
10605
|
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];
|
10493
10606
|
const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
10494
10607
|
const priceText = React.useCallback((product) => {
|
10495
|
-
var _a, _b, _c, _d, _e;
|
10608
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
10609
|
+
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);
|
10496
10610
|
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
10497
|
-
return `${(
|
10498
|
-
|
10499
|
-
|
10611
|
+
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
|
10612
|
+
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
10613
|
+
minimumFractionDigits: 0
|
10614
|
+
})) !== null && _g !== void 0 ? _g : ''
|
10615
|
+
: product === null || product === void 0 ? void 0 : product.price}`;
|
10500
10616
|
}
|
10501
10617
|
else {
|
10502
|
-
|
10618
|
+
const p = 7000;
|
10619
|
+
return `$${isToLocStr ? p.toLocaleString() : p}`;
|
10503
10620
|
}
|
10504
|
-
}, []);
|
10621
|
+
}, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice]);
|
10505
10622
|
const handleClick = lodash.throttle((item, multiCheckIndex) => {
|
10506
10623
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
10507
10624
|
eventSubject: 'clickCta',
|
@@ -10662,15 +10779,16 @@ var settingRender$5 = [
|
|
10662
10779
|
|
10663
10780
|
const Iframe$1 = (_a) => {
|
10664
10781
|
var _b, _c;
|
10665
|
-
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"]);
|
10782
|
+
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"]);
|
10666
10783
|
const { popupDetailData } = useSxpDataSource();
|
10667
10784
|
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;
|
10668
|
-
return (React.createElement("div", Object.assign({ className: `${css.css(Object.assign({}, style)
|
10669
|
-
|
10670
|
-
|
10671
|
-
|
10672
|
-
|
10673
|
-
|
10785
|
+
return (React.createElement("div", Object.assign({ className: `${css.css(Object.assign(Object.assign({}, style), { height: isTel ? 664 : '100%' }))}` }, props),
|
10786
|
+
React.createElement("iframe", { src: iframeUrl, style: {
|
10787
|
+
width: '100%',
|
10788
|
+
height: 'calc(100% - 50px)',
|
10789
|
+
marginTop: '40px',
|
10790
|
+
border: 'none'
|
10791
|
+
} })));
|
10674
10792
|
};
|
10675
10793
|
var IframeComponent = React.memo(Iframe$1);
|
10676
10794
|
|
@@ -11156,7 +11274,7 @@ const Appoint = createMaterial(AppointComponent, {
|
|
11156
11274
|
* @Author: binruan@chatlabs.com
|
11157
11275
|
* @Date: 2024-07-02 14:51:32
|
11158
11276
|
* @LastEditors: binruan@chatlabs.com
|
11159
|
-
* @LastEditTime: 2024-
|
11277
|
+
* @LastEditTime: 2024-08-06 14:51:18
|
11160
11278
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\settingRender.tsx
|
11161
11279
|
*
|
11162
11280
|
*/
|
@@ -11253,6 +11371,11 @@ var linkSettingRender = [
|
|
11253
11371
|
type: 'TextAlign',
|
11254
11372
|
name: ['props', 'customTitle', 'style']
|
11255
11373
|
},
|
11374
|
+
{
|
11375
|
+
label: '间距',
|
11376
|
+
type: 'TextSpace',
|
11377
|
+
name: ['props', 'customTitle', 'style']
|
11378
|
+
},
|
11256
11379
|
{
|
11257
11380
|
label: '上边距',
|
11258
11381
|
type: 'Number',
|
@@ -11910,7 +12033,7 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
|
|
11910
12033
|
* @Author: binruan@chatlabs.com
|
11911
12034
|
* @Date: 2024-04-07 14:07:12
|
11912
12035
|
* @LastEditors: binruan@chatlabs.com
|
11913
|
-
* @LastEditTime: 2024-
|
12036
|
+
* @LastEditTime: 2024-08-22 10:14:36
|
11914
12037
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
|
11915
12038
|
*
|
11916
12039
|
*/
|
@@ -12015,6 +12138,16 @@ var settingRender$3 = [
|
|
12015
12138
|
{
|
12016
12139
|
label: '标题对齐',
|
12017
12140
|
type: 'TextAlign'
|
12141
|
+
},
|
12142
|
+
{
|
12143
|
+
label: '间距',
|
12144
|
+
type: 'TextSpace'
|
12145
|
+
},
|
12146
|
+
{
|
12147
|
+
label: '价格千分符展示',
|
12148
|
+
type: 'Switch',
|
12149
|
+
name: ['enableFormattedPrice'],
|
12150
|
+
initialValue: true
|
12018
12151
|
}
|
12019
12152
|
]
|
12020
12153
|
}
|
@@ -12100,6 +12233,11 @@ var settingRender$3 = [
|
|
12100
12233
|
{
|
12101
12234
|
type: 'TextAlign',
|
12102
12235
|
name: ['props', 'buttonStyle']
|
12236
|
+
},
|
12237
|
+
{
|
12238
|
+
label: '间距',
|
12239
|
+
type: 'TextSpace',
|
12240
|
+
name: ['props', 'buttonStyle']
|
12103
12241
|
}
|
12104
12242
|
]
|
12105
12243
|
},
|
@@ -13430,6 +13568,7 @@ var previewData = {
|
|
13430
13568
|
};
|
13431
13569
|
|
13432
13570
|
const WaterfallFlowItem$1 = (props) => {
|
13571
|
+
var _a;
|
13433
13572
|
const { rec, style = {}, sizeChange = () => { }, unitWidth, index, showBorder, list, reportTagsView, textStyles, space } = props;
|
13434
13573
|
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
13435
13574
|
const [showVideo, setShowVideo] = React.useState(false);
|
@@ -13483,16 +13622,19 @@ const WaterfallFlowItem$1 = (props) => {
|
|
13483
13622
|
}
|
13484
13623
|
}, [top, showBorder]);
|
13485
13624
|
const priceText = React.useMemo(() => {
|
13486
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13487
|
-
|
13488
|
-
|
13489
|
-
|
13490
|
-
|
13625
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
13626
|
+
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);
|
13627
|
+
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)) {
|
13628
|
+
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
|
13629
|
+
? (_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', {
|
13630
|
+
minimumFractionDigits: 0
|
13631
|
+
})) !== null && _l !== void 0 ? _l : ''
|
13632
|
+
: (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
|
13491
13633
|
}
|
13492
13634
|
else {
|
13493
13635
|
return null;
|
13494
13636
|
}
|
13495
|
-
}, [rec]);
|
13637
|
+
}, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
|
13496
13638
|
React.useEffect(() => {
|
13497
13639
|
if (imgDom.current === null || src === '') {
|
13498
13640
|
return;
|
@@ -13539,7 +13681,8 @@ const WaterfallFlowItem$1 = (props) => {
|
|
13539
13681
|
function WaterfallList$1(_a) {
|
13540
13682
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
13541
13683
|
var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
|
13542
|
-
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
13684
|
+
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
|
13685
|
+
const { jumpToWeb } = useEventReport();
|
13543
13686
|
/** 滚动的父元素 */
|
13544
13687
|
const scrollParent = React.useRef(null);
|
13545
13688
|
/** 向上滚动的距离 */
|
@@ -13655,10 +13798,14 @@ function WaterfallList$1(_a) {
|
|
13655
13798
|
}, [unitWidth, rowsNum, list]); /* 增加getStyleList依赖项会导致在admin预览编辑时无限刷新 */
|
13656
13799
|
/** 初始化请求数据 */
|
13657
13800
|
React.useEffect(() => {
|
13658
|
-
var _a, _b
|
13801
|
+
var _a, _b;
|
13659
13802
|
setIsLoadingData(true);
|
13660
13803
|
waterFallData &&
|
13661
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(
|
13804
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
13805
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
|
13806
|
+
defaultSize: hashTagSize,
|
13807
|
+
maxSize: hashTagSize
|
13808
|
+
}).then((res) => {
|
13662
13809
|
var _a, _b;
|
13663
13810
|
setData(res);
|
13664
13811
|
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 : []);
|
@@ -13667,7 +13814,7 @@ function WaterfallList$1(_a) {
|
|
13667
13814
|
if (isOpenHashTag) {
|
13668
13815
|
const res = previewData;
|
13669
13816
|
setData(res);
|
13670
|
-
setList((
|
13817
|
+
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 : []);
|
13671
13818
|
setIsLoadingData(false);
|
13672
13819
|
}
|
13673
13820
|
}, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
|
@@ -13693,10 +13840,11 @@ function WaterfallList$1(_a) {
|
|
13693
13840
|
};
|
13694
13841
|
}, [onResize]);
|
13695
13842
|
React.useCallback(() => {
|
13696
|
-
var _a, _b, _c, _d;
|
13697
13843
|
setIsLoadingData(true);
|
13698
13844
|
waterFallData &&
|
13699
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(
|
13845
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
13846
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag
|
13847
|
+
}).then((res) => {
|
13700
13848
|
var _a, _b;
|
13701
13849
|
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 : []));
|
13702
13850
|
setIsLoadingData(false);
|
@@ -13723,10 +13871,12 @@ function WaterfallList$1(_a) {
|
|
13723
13871
|
};
|
13724
13872
|
}, [onScroll, scrollParent]);
|
13725
13873
|
const handleClickLink = () => {
|
13726
|
-
var _a, _b;
|
13874
|
+
var _a, _b, _c, _d, _e;
|
13727
13875
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
13728
13876
|
reportTagsView();
|
13729
|
-
|
13877
|
+
const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
|
13878
|
+
jumpToWeb(rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
|
13879
|
+
window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
|
13730
13880
|
}
|
13731
13881
|
};
|
13732
13882
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
@@ -13768,8 +13918,9 @@ function WaterfallList$1(_a) {
|
|
13768
13918
|
var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
|
13769
13919
|
|
13770
13920
|
const WaterfallFlowItem = (props) => {
|
13921
|
+
var _a;
|
13771
13922
|
const { rec, index, list, reportTagsView, textStyles, space } = props;
|
13772
|
-
const { swiperRef, setRtcList, setOpenHashtag,
|
13923
|
+
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
13773
13924
|
const [showVideo, setShowVideo] = React.useState(false);
|
13774
13925
|
const imgDom = React.useRef(null);
|
13775
13926
|
const ref = React.useRef(null);
|
@@ -13796,16 +13947,19 @@ const WaterfallFlowItem = (props) => {
|
|
13796
13947
|
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;
|
13797
13948
|
}, [rec]);
|
13798
13949
|
const priceText = React.useMemo(() => {
|
13799
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13800
|
-
|
13801
|
-
|
13802
|
-
|
13803
|
-
|
13950
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
13951
|
+
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);
|
13952
|
+
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)) {
|
13953
|
+
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
|
13954
|
+
? (_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', {
|
13955
|
+
minimumFractionDigits: 0
|
13956
|
+
})) !== null && _l !== void 0 ? _l : ''
|
13957
|
+
: (_m = rec === null || rec === void 0 ? void 0 : rec.product) === null || _m === void 0 ? void 0 : _m.price}`;
|
13804
13958
|
}
|
13805
13959
|
else {
|
13806
13960
|
return null;
|
13807
13961
|
}
|
13808
|
-
}, [rec]);
|
13962
|
+
}, [rec, (_a = textStyles === null || textStyles === void 0 ? void 0 : textStyles.price) === null || _a === void 0 ? void 0 : _a.enableFormattedPrice]);
|
13809
13963
|
// useEffect(() => {
|
13810
13964
|
// if (imgDom.current === null || src === '') {
|
13811
13965
|
// return;
|
@@ -13897,29 +14051,35 @@ const WaterfallFlowItem = (props) => {
|
|
13897
14051
|
function WaterfallList(_a) {
|
13898
14052
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
13899
14053
|
var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
|
13900
|
-
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
14054
|
+
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
|
14055
|
+
const { jumpToWeb } = useEventReport();
|
13901
14056
|
const [list, setList] = React.useState();
|
13902
14057
|
const [data, setData] = React.useState();
|
13903
14058
|
const [isLoadingData, setIsLoadingData] = React.useState(false);
|
13904
14059
|
const containerRef = React.useRef(null);
|
13905
14060
|
const [isLoadMore, setIsLoadMore] = React.useState(false);
|
13906
14061
|
React.useCallback(() => {
|
13907
|
-
var _a, _b, _c, _d;
|
13908
14062
|
if (isLoadMore)
|
13909
14063
|
return;
|
13910
14064
|
setIsLoadMore(true);
|
13911
14065
|
waterFallData &&
|
13912
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(
|
14066
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
14067
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag
|
14068
|
+
}).then((res) => {
|
13913
14069
|
var _a;
|
13914
14070
|
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 : []));
|
13915
14071
|
setIsLoadMore(false);
|
13916
14072
|
}));
|
13917
14073
|
}, [waterFallData, getRecommendVideos, list, isLoadMore]);
|
13918
14074
|
React.useEffect(() => {
|
13919
|
-
var _a, _b
|
14075
|
+
var _a, _b;
|
13920
14076
|
setIsLoadingData(true);
|
13921
14077
|
waterFallData &&
|
13922
|
-
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos(
|
14078
|
+
(getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
|
14079
|
+
hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
|
14080
|
+
defaultSize: hashTagSize,
|
14081
|
+
maxSize: hashTagSize
|
14082
|
+
}).then((res) => {
|
13923
14083
|
var _a, _b;
|
13924
14084
|
setData(res);
|
13925
14085
|
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 : []);
|
@@ -13928,7 +14088,7 @@ function WaterfallList(_a) {
|
|
13928
14088
|
if (isOpenHashTag) {
|
13929
14089
|
const res = previewData;
|
13930
14090
|
setData(res);
|
13931
|
-
setList((
|
14091
|
+
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 : []);
|
13932
14092
|
setIsLoadingData(false);
|
13933
14093
|
}
|
13934
14094
|
}, [waterFallData, getRecommendVideos, hashTagSize, isOpenHashTag]);
|
@@ -13949,10 +14109,12 @@ function WaterfallList(_a) {
|
|
13949
14109
|
// };
|
13950
14110
|
// }, [isLoadingData, containerRef, loadMoreData]);
|
13951
14111
|
const handleClickLink = () => {
|
13952
|
-
var _a, _b;
|
14112
|
+
var _a, _b, _c, _d, _e;
|
13953
14113
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
13954
14114
|
reportTagsView();
|
13955
|
-
|
14115
|
+
const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
|
14116
|
+
jumpToWeb(rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
|
14117
|
+
window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
|
13956
14118
|
}
|
13957
14119
|
};
|
13958
14120
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
@@ -14092,7 +14254,7 @@ var WaterFall$1 = React.memo(WaterFall);
|
|
14092
14254
|
* @Author: binruan@chatlabs.com
|
14093
14255
|
* @Date: 2024-01-15 19:03:09
|
14094
14256
|
* @LastEditors: binruan@chatlabs.com
|
14095
|
-
* @LastEditTime: 2024-
|
14257
|
+
* @LastEditTime: 2024-08-22 10:15:23
|
14096
14258
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\index.tsx
|
14097
14259
|
*
|
14098
14260
|
*/
|
@@ -14255,7 +14417,7 @@ const Consent = createMaterial(ConsentComponent, {
|
|
14255
14417
|
* @Author: binruan@chatlabs.com
|
14256
14418
|
* @Date: 2024-07-02 14:51:32
|
14257
14419
|
* @LastEditors: binruan@chatlabs.com
|
14258
|
-
* @LastEditTime: 2024-
|
14420
|
+
* @LastEditTime: 2024-08-06 14:28:34
|
14259
14421
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\settingRender.tsx
|
14260
14422
|
*
|
14261
14423
|
*/
|
@@ -14358,6 +14520,10 @@ var settingRender$1 = [
|
|
14358
14520
|
label: '对齐',
|
14359
14521
|
type: 'TextAlign',
|
14360
14522
|
name: ['props', 'ctaTempStyles', 'ctaTitle']
|
14523
|
+
},
|
14524
|
+
{
|
14525
|
+
type: 'TextSpace',
|
14526
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle']
|
14361
14527
|
}
|
14362
14528
|
]
|
14363
14529
|
}
|
@@ -15721,7 +15887,7 @@ function withBindDataSource(Component) {
|
|
15721
15887
|
* @Author: binruan@chatlabs.com
|
15722
15888
|
* @Date: 2023-12-26 16:11:34
|
15723
15889
|
* @LastEditors: binruan@chatlabs.com
|
15724
|
-
* @LastEditTime: 2024-
|
15890
|
+
* @LastEditTime: 2024-08-21 15:46:07
|
15725
15891
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
|
15726
15892
|
*
|
15727
15893
|
*/
|
@@ -15741,44 +15907,38 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive }
|
|
15741
15907
|
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;
|
15742
15908
|
}
|
15743
15909
|
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
15744
|
-
const renderComp = React.
|
15745
|
-
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
|
15910
|
+
const renderComp = React.useCallback(() => {
|
15911
|
+
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;
|
15746
15912
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
15747
15913
|
return null;
|
15748
|
-
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) ;
|
15749
|
-
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) ;
|
15750
|
-
else {
|
15751
|
-
(_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;
|
15752
|
-
}
|
15753
15914
|
//如果includesCtaType有值,则只渲染includesCtaType包含的cta类型组件,用于在页面某处只显示某一组件
|
15754
|
-
if (includesCtaType && !(includesCtaType === null || includesCtaType === void 0 ? void 0 : includesCtaType.includes((
|
15915
|
+
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)))
|
15755
15916
|
return;
|
15756
15917
|
//默认不渲染category为cta类型的组件,该类型的组件只用于某一处
|
15757
|
-
if (!includesCtaType && ((
|
15918
|
+
if (!includesCtaType && ((_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.category) === 'cta')
|
15758
15919
|
return;
|
15759
|
-
if ((((
|
15760
|
-
(((
|
15761
|
-
(((
|
15762
|
-
(((
|
15763
|
-
(((
|
15764
|
-
(((
|
15920
|
+
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)) ||
|
15921
|
+
(((_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)) ||
|
15922
|
+
(((_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)) ||
|
15923
|
+
(((_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)) ||
|
15924
|
+
(((_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)) ||
|
15925
|
+
(((_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))) {
|
15765
15926
|
//
|
15766
15927
|
return null;
|
15767
15928
|
}
|
15768
15929
|
if (value && resolver) {
|
15769
|
-
const t = resolver[(
|
15930
|
+
const t = resolver[(_t = value === null || value === void 0 ? void 0 : value.item) === null || _t === void 0 ? void 0 : _t.type];
|
15770
15931
|
const Component = withBindDataSource(t);
|
15771
|
-
const defaulSetting = (
|
15772
|
-
const isExternalLink = ((
|
15773
|
-
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (
|
15932
|
+
const defaulSetting = (_u = t === null || t === void 0 ? void 0 : t.extend) === null || _u === void 0 ? void 0 : _u.defaulSetting;
|
15933
|
+
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';
|
15934
|
+
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 })));
|
15774
15935
|
}
|
15775
15936
|
else {
|
15776
15937
|
return null;
|
15777
15938
|
}
|
15778
15939
|
}, [rec, resolver, tempMap, schema, value === null || value === void 0 ? void 0 : value.id, isActive]);
|
15779
|
-
return React.createElement(React.Fragment, null, renderComp);
|
15940
|
+
return React.createElement(React.Fragment, null, renderComp());
|
15780
15941
|
};
|
15781
|
-
var RenderCard$1 = React.memo(RenderCard);
|
15782
15942
|
|
15783
15943
|
/*
|
15784
15944
|
* @Author: binruan@chatlabs.com
|
@@ -15863,7 +16023,7 @@ var Tagbar$1 = React.memo(Tagbar);
|
|
15863
16023
|
* @Author: binruan@chatlabs.com
|
15864
16024
|
* @Date: 2024-01-15 19:03:09
|
15865
16025
|
* @LastEditors: binruan@chatlabs.com
|
15866
|
-
* @LastEditTime: 2024-08-
|
16026
|
+
* @LastEditTime: 2024-08-22 09:56:51
|
15867
16027
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
15868
16028
|
*
|
15869
16029
|
*/
|
@@ -15880,9 +16040,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15880
16040
|
const [isShowMore, setIsShowMore] = React.useState(false);
|
15881
16041
|
const [isReload, setIsReload] = React.useState(new Date().getTime());
|
15882
16042
|
const skipLinkRef = React.useRef(false);
|
15883
|
-
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
|
15884
|
-
const { backMainFeed } = useEventReport();
|
15885
|
-
const { productView } = useEventReport();
|
16043
|
+
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor } = useSxpDataSource();
|
16044
|
+
const { backMainFeed, productView, jumpToWeb } = useEventReport();
|
15886
16045
|
const isShowFingerTip = React.useMemo(() => {
|
15887
16046
|
return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
|
15888
16047
|
}, [data, loading, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip]);
|
@@ -15911,6 +16070,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15911
16070
|
}, [data.length, bffFbReport, h5EnterLink]);
|
15912
16071
|
React.useEffect(() => {
|
15913
16072
|
var _a;
|
16073
|
+
if (!ctaType || (ctaType === null || ctaType === void 0 ? void 0 : ctaType.length) < 1)
|
16074
|
+
return;
|
15914
16075
|
const index = (data === null || data === void 0 ? void 0 : data.findIndex((item) => {
|
15915
16076
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
15916
16077
|
const ctaType0 = ctaType === null || ctaType === void 0 ? void 0 : ctaType[0];
|
@@ -15924,8 +16085,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15924
16085
|
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));
|
15925
16086
|
}
|
15926
16087
|
})) || 0;
|
15927
|
-
(
|
15928
|
-
|
16088
|
+
if (index !== -1)
|
16089
|
+
(_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
|
16090
|
+
}, [data, ctaType, swiperRef]);
|
15929
16091
|
React.useEffect(() => {
|
15930
16092
|
const item = data === null || data === void 0 ? void 0 : data[activeIndex];
|
15931
16093
|
const visibleChange = () => {
|
@@ -16025,15 +16187,39 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16025
16187
|
const height = React.useMemo(() => {
|
16026
16188
|
return containerHeight - minusHeight - tagHeight;
|
16027
16189
|
}, [globalConfig, containerHeight, tagHeight]);
|
16190
|
+
const visList = React.useMemo(() => {
|
16191
|
+
var _a;
|
16192
|
+
const list = activeIndex === 0 && !waterFallData && !isEditor
|
16193
|
+
? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
|
16194
|
+
: data === null || data === void 0 ? void 0 : data.map((item, index) => {
|
16195
|
+
if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
|
16196
|
+
return item;
|
16197
|
+
}
|
16198
|
+
else {
|
16199
|
+
return null;
|
16200
|
+
}
|
16201
|
+
});
|
16202
|
+
return !waterFallData ? list.concat([{ loading: true }]) : list;
|
16203
|
+
}, [data, activeIndex, waterFallData, isEditor]);
|
16028
16204
|
const renderLogo = React.useMemo(() => {
|
16029
|
-
var _a, _b;
|
16205
|
+
var _a, _b, _c, _d;
|
16030
16206
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
16031
16207
|
const link = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoBar) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.value;
|
16032
|
-
|
16208
|
+
const isExternalLink = ((_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoBar) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
|
16209
|
+
const rec = visList[activeIndex];
|
16210
|
+
return (React.createElement("div", Object.assign({ className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } }, (link && {
|
16211
|
+
onClick: () => {
|
16212
|
+
var _a, _b, _c, _d;
|
16213
|
+
if (isExternalLink) {
|
16214
|
+
jumpToWeb(rec, (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindCta, activeIndex, ((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.traceInfo) || ((_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo));
|
16215
|
+
}
|
16216
|
+
new Function(link)();
|
16217
|
+
}
|
16218
|
+
})),
|
16033
16219
|
React.createElement("img", { src: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl, alt: 'logo' })));
|
16034
16220
|
}
|
16035
16221
|
return null;
|
16036
|
-
}, [globalConfig]);
|
16222
|
+
}, [globalConfig, activeIndex, visList]);
|
16037
16223
|
const renderContent = React.useCallback((rec, index) => {
|
16038
16224
|
var _a, _b, _c, _d;
|
16039
16225
|
if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
|
@@ -16088,12 +16274,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16088
16274
|
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` } },
|
16089
16275
|
React.createElement(Nudge, { nudge: nudge }),
|
16090
16276
|
(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' },
|
16091
|
-
React.createElement(RenderCard
|
16277
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
16092
16278
|
React.createElement("div", null,
|
16093
16279
|
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 }),
|
16094
|
-
React.createElement(RenderCard
|
16280
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
|
16095
16281
|
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 }))),
|
16096
|
-
React.createElement(RenderCard
|
16282
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
16097
16283
|
}
|
16098
16284
|
return null;
|
16099
16285
|
}, [
|
@@ -16170,7 +16356,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16170
16356
|
traceInfo: (_u = (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : (_t = item === null || item === void 0 ? void 0 : item.product) === null || _t === void 0 ? void 0 : _t.traceInfo) !== null && _u !== void 0 ? _u : ''
|
16171
16357
|
}
|
16172
16358
|
});
|
16173
|
-
setSlideSkipState();
|
16174
16359
|
skipLinkRef.current = true;
|
16175
16360
|
window.location.href = window.getJointUtmLink(link);
|
16176
16361
|
}
|
@@ -16256,20 +16441,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16256
16441
|
});
|
16257
16442
|
}
|
16258
16443
|
};
|
16259
|
-
const visList = React.useMemo(() => {
|
16260
|
-
var _a;
|
16261
|
-
const list = activeIndex === 0 && !waterFallData
|
16262
|
-
? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
|
16263
|
-
: data === null || data === void 0 ? void 0 : data.map((item, index) => {
|
16264
|
-
if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
|
16265
|
-
return item;
|
16266
|
-
}
|
16267
|
-
else {
|
16268
|
-
return null;
|
16269
|
-
}
|
16270
|
-
});
|
16271
|
-
return !waterFallData ? list.concat([{ loading: true }]) : list;
|
16272
|
-
}, [data, activeIndex, waterFallData]);
|
16273
16444
|
const renderToggleButton = React.useCallback((visible) => {
|
16274
16445
|
var _a, _b, _c, _d, _e, _f;
|
16275
16446
|
if (!visible)
|
@@ -16278,6 +16449,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16278
16449
|
position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
|
16279
16450
|
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',
|
16280
16451
|
zIndex: 999,
|
16452
|
+
transform: 'translate3d(0px,0px,0px)',
|
16281
16453
|
[(_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,
|
16282
16454
|
[(_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
|
16283
16455
|
}, 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 })));
|
@@ -16296,10 +16468,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16296
16468
|
alignItems: 'center'
|
16297
16469
|
} },
|
16298
16470
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
|
16299
|
-
renderContent(rec, index),
|
16300
|
-
renderBottom(rec, index),
|
16301
16471
|
renderLikeButton(rec, index, !(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
|
16302
|
-
renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))
|
16472
|
+
renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
16473
|
+
renderBottom(rec, index),
|
16474
|
+
renderContent(rec, index)))))));
|
16303
16475
|
});
|
16304
16476
|
}, [
|
16305
16477
|
containerWidth,
|
@@ -16335,9 +16507,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16335
16507
|
return;
|
16336
16508
|
// 处理上滑下滑事件
|
16337
16509
|
handleScrollEvent(swiper);
|
16338
|
-
if (waterFallData)
|
16510
|
+
if (waterFallData || isEditor)
|
16339
16511
|
return;
|
16340
|
-
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) +
|
16512
|
+
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
|
16341
16513
|
if (!isLoadMore) {
|
16342
16514
|
setIsLoadMore(true);
|
16343
16515
|
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(Math.ceil(activeIndex / 10) + 1).then(() => {
|
@@ -16643,7 +16815,7 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
|
|
16643
16815
|
const CTA = (rec, index) => {
|
16644
16816
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
|
16645
16817
|
return (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
16646
|
-
React.createElement(RenderCard
|
16818
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1 })));
|
16647
16819
|
}
|
16648
16820
|
return null;
|
16649
16821
|
};
|
@@ -16833,7 +17005,7 @@ var index = React.memo(SxpPageCore);
|
|
16833
17005
|
* @Author: binruan@chatlabs.com
|
16834
17006
|
* @Date: 2023-12-26 10:38:53
|
16835
17007
|
* @LastEditors: binruan@chatlabs.com
|
16836
|
-
* @LastEditTime: 2024-
|
17008
|
+
* @LastEditTime: 2024-08-22 11:32:23
|
16837
17009
|
* @FilePath: \pb-sxp-ui\src\core\context\EditorDataProvider.tsx
|
16838
17010
|
*
|
16839
17011
|
*/
|
@@ -16863,7 +17035,8 @@ const EditorDataProvider = ({ children, data }) => {
|
|
16863
17035
|
setOpenHashtag,
|
16864
17036
|
openConsent,
|
16865
17037
|
setOpenConsent,
|
16866
|
-
sxpFontLinks: data === null || data === void 0 ? void 0 : data.sxpFontLinks
|
17038
|
+
sxpFontLinks: data === null || data === void 0 ? void 0 : data.sxpFontLinks,
|
17039
|
+
utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter
|
16867
17040
|
} }, children));
|
16868
17041
|
};
|
16869
17042
|
function useEditorDataProvider() {
|