pb-sxp-ui 1.3.0 → 1.3.1
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 +207 -78
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +207 -78
- 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 +207 -78
- 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/WaterFall/List.js +8 -4
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +7 -3
- package/es/core/components/SxpPageRender/index.js +29 -21
- package/es/core/context/EditorContext.js +2 -0
- package/es/core/context/SxpDataSourceProvider.js +33 -10
- package/es/core/hooks/useEventReport.d.ts +1 -1
- package/es/core/hooks/useEventReport.js +2 -2
- package/es/materials/sxp/HashTag/settingRender.d.ts +6 -7
- package/es/materials/sxp/HashTag/settingRender.js +9 -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 +21 -13
- 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 +24 -16
- 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/settingRender.js +4 -0
- 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/WaterFall/List.js +8 -4
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +7 -3
- package/lib/core/components/SxpPageRender/index.js +28 -20
- package/lib/core/context/EditorContext.js +2 -0
- package/lib/core/context/SxpDataSourceProvider.js +33 -10
- package/lib/core/hooks/useEventReport.d.ts +1 -1
- package/lib/core/hooks/useEventReport.js +2 -2
- package/lib/materials/sxp/HashTag/settingRender.d.ts +6 -7
- package/lib/materials/sxp/HashTag/settingRender.js +9 -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 +21 -13
- 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 +24 -16
- 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/settingRender.js +4 -0
- 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
@@ -718,7 +718,7 @@ 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;
|
721
|
+
var _d, _e, _f, _g, _h, _j, _k;
|
722
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}]` }));
|
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) => {
|
@@ -729,7 +729,30 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
729
729
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
730
730
|
}
|
731
731
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) || isEditor) {
|
732
|
-
query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1
|
732
|
+
query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1 }), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] }));
|
733
|
+
if (!(query === null || query === void 0 ? void 0 : query.channel))
|
734
|
+
return;
|
735
|
+
let list = [];
|
736
|
+
let result = null;
|
737
|
+
let pageNum = 1;
|
738
|
+
const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
|
739
|
+
var _l, _m, _o, _p;
|
740
|
+
query.pageNum = pageNum;
|
741
|
+
result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
742
|
+
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
743
|
+
return undefined;
|
744
|
+
}
|
745
|
+
const rec = (_m = (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.recList) === null || _m === void 0 ? void 0 : _m[0];
|
746
|
+
list = list.concat((_p = (_o = result === null || result === void 0 ? void 0 : result.data) === null || _o === void 0 ? void 0 : _o.recList) !== null && _p !== void 0 ? _p : []);
|
747
|
+
if ((rec === null || rec === void 0 ? void 0 : rec.product) || (rec === null || rec === void 0 ? void 0 : rec.video)) {
|
748
|
+
pageNum = pageNum + 1;
|
749
|
+
yield recurveRecList(query);
|
750
|
+
}
|
751
|
+
});
|
752
|
+
yield recurveRecList(query);
|
753
|
+
if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
|
754
|
+
setCurReqInfo({ rtc: (_j = result === null || result === void 0 ? void 0 : result.data) === null || _j === void 0 ? void 0 : _j.rtc, requestId: (_k = result === null || result === void 0 ? void 0 : result.data) === null || _k === void 0 ? void 0 : _k.requestId });
|
755
|
+
return Object.assign(Object.assign({}, result.data), { recList: list });
|
733
756
|
}
|
734
757
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
735
758
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
@@ -740,12 +763,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
740
763
|
return result === null || result === void 0 ? void 0 : result.data;
|
741
764
|
}), [bffFetch, utmVal, maxSize, defaultSize, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview, channelQueryList, isEditor]);
|
742
765
|
const loadVideos = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
743
|
-
var
|
766
|
+
var _q, _r, _s, _t;
|
744
767
|
if (rtcList.length <= 0) {
|
745
768
|
return;
|
746
769
|
}
|
747
770
|
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 }, (((
|
771
|
+
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_q = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _q === void 0 ? void 0 : _q.itemId) && { productFilter: (_r = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _r === void 0 ? void 0 : _r.itemId })), (((_s = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _s === void 0 ? void 0 : _s.itemId) && { contentFilter: (_t = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _t === void 0 ? void 0 : _t.itemId })), { themeTag: themeTag.current }));
|
749
772
|
setRtcList(rtcList.concat(getFilterRecList(data)));
|
750
773
|
setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
|
751
774
|
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
@@ -814,17 +837,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
814
837
|
}), [bffFetch]);
|
815
838
|
// 获取 Tag
|
816
839
|
const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
817
|
-
var
|
840
|
+
var _u, _v, _w, _x, _y;
|
818
841
|
if (!utmVal || !isShowTag)
|
819
842
|
return;
|
820
843
|
try {
|
821
|
-
const val = (
|
844
|
+
const val = (_w = (_v = (_u = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _u === void 0 ? void 0 : _u.filter((val) => {
|
822
845
|
var _a, _b;
|
823
846
|
const key = val.split('=')[0];
|
824
847
|
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 ||
|
848
|
+
})) === null || _v === void 0 ? void 0 : _v.join('&')) !== null && _w !== void 0 ? _w : '';
|
826
849
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
827
|
-
setTagList((
|
850
|
+
setTagList((_y = (_x = result === null || result === void 0 ? void 0 : result.data) === null || _x === void 0 ? void 0 : _x.tags) !== null && _y !== void 0 ? _y : []);
|
828
851
|
}
|
829
852
|
catch (e) {
|
830
853
|
console.log('e', e);
|
@@ -901,7 +924,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
901
924
|
});
|
902
925
|
}, [isShowConsent]);
|
903
926
|
React.useEffect(() => {
|
904
|
-
if (!isInit.current)
|
927
|
+
if (!isInit.current && !isEditor)
|
905
928
|
return;
|
906
929
|
setLoading(true);
|
907
930
|
bffGetTagList();
|
@@ -913,7 +936,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
913
936
|
.finally(() => {
|
914
937
|
setLoading(false);
|
915
938
|
});
|
916
|
-
}, [
|
939
|
+
}, [bffGetTagList, isEditor, getRecommendVideos]);
|
917
940
|
const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
|
918
941
|
return (React.createElement(SxpDataSourceContext.Provider, { value: {
|
919
942
|
rtcList,
|
@@ -1116,6 +1139,7 @@ const EditorCore = React.forwardRef(({ children, resolver, isSsr, schema, enable
|
|
1116
1139
|
});
|
1117
1140
|
typeof window !== 'undefined' &&
|
1118
1141
|
(window.getJointUtmLink = (url) => {
|
1142
|
+
setSlideSkipState();
|
1119
1143
|
if ((url === null || url === void 0 ? void 0 : url.indexOf('?')) !== -1) {
|
1120
1144
|
return url + (utmVal ? '&' + utmVal : '');
|
1121
1145
|
}
|
@@ -1288,6 +1312,11 @@ var settingRender$a = [
|
|
1288
1312
|
type: 'TextAlign',
|
1289
1313
|
name: ['textStyle']
|
1290
1314
|
},
|
1315
|
+
{
|
1316
|
+
label: '标题间距',
|
1317
|
+
type: 'TextSpace',
|
1318
|
+
name: ['textStyle']
|
1319
|
+
},
|
1291
1320
|
{
|
1292
1321
|
label: '表单布局',
|
1293
1322
|
type: 'Radius',
|
@@ -1346,10 +1375,12 @@ var settingRender$a = [
|
|
1346
1375
|
]
|
1347
1376
|
},
|
1348
1377
|
{
|
1378
|
+
label: '提交按钮文本样式',
|
1349
1379
|
type: 'TextStyle',
|
1350
1380
|
name: ['props', 'submitButtonStyle']
|
1351
1381
|
},
|
1352
1382
|
{
|
1383
|
+
label: '提交按钮对齐',
|
1353
1384
|
type: 'TextAlign',
|
1354
1385
|
name: ['props', 'submitButtonStyle']
|
1355
1386
|
},
|
@@ -1357,6 +1388,11 @@ var settingRender$a = [
|
|
1357
1388
|
label: '提交按钮颜色',
|
1358
1389
|
type: 'Color',
|
1359
1390
|
name: ['props', 'submitBgColor']
|
1391
|
+
},
|
1392
|
+
{
|
1393
|
+
label: '提交按钮间距',
|
1394
|
+
type: 'TextSpace',
|
1395
|
+
name: ['props', 'submitButtonStyle']
|
1360
1396
|
}
|
1361
1397
|
// {
|
1362
1398
|
// label: '接收内容接口地址',
|
@@ -1397,7 +1433,7 @@ var settingRender$a = [
|
|
1397
1433
|
*/
|
1398
1434
|
function useEventReport() {
|
1399
1435
|
const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
|
1400
|
-
const jumpToWeb = React.useCallback((data, product, cta, position) => {
|
1436
|
+
const jumpToWeb = React.useCallback((data, product, cta, position, traceInfo) => {
|
1401
1437
|
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
1438
|
let fromKName = '';
|
1403
1439
|
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 +1466,7 @@ function useEventReport() {
|
|
1430
1466
|
position: position + '',
|
1431
1467
|
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
1468
|
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 : ''
|
1469
|
+
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
1470
|
}
|
1435
1471
|
});
|
1436
1472
|
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
@@ -1835,6 +1871,16 @@ var settingRender$9 = [
|
|
1835
1871
|
label: '默认行数',
|
1836
1872
|
type: 'Number',
|
1837
1873
|
name: ['lineClamp']
|
1874
|
+
},
|
1875
|
+
{
|
1876
|
+
label: '间距',
|
1877
|
+
type: 'TextSpace'
|
1878
|
+
},
|
1879
|
+
{
|
1880
|
+
label: '价格千分符展示',
|
1881
|
+
type: 'Switch',
|
1882
|
+
name: ['enableFormattedPrice'],
|
1883
|
+
initialValue: true
|
1838
1884
|
}
|
1839
1885
|
]
|
1840
1886
|
}
|
@@ -1920,6 +1966,11 @@ var settingRender$9 = [
|
|
1920
1966
|
{
|
1921
1967
|
type: 'TextAlign',
|
1922
1968
|
name: ['props', 'buttonStyle']
|
1969
|
+
},
|
1970
|
+
{
|
1971
|
+
label: '间距',
|
1972
|
+
type: 'TextSpace',
|
1973
|
+
name: ['props', 'buttonStyle']
|
1923
1974
|
}
|
1924
1975
|
]
|
1925
1976
|
},
|
@@ -8762,13 +8813,13 @@ SwiperSlide.displayName = 'SwiperSlide';
|
|
8762
8813
|
* @Author: binruan@chatlabs.com
|
8763
8814
|
* @Date: 2023-11-02 18:34:34
|
8764
8815
|
* @LastEditors: binruan@chatlabs.com
|
8765
|
-
* @LastEditTime: 2024-08-
|
8816
|
+
* @LastEditTime: 2024-08-16 17:58:56
|
8766
8817
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
|
8767
8818
|
*
|
8768
8819
|
*/
|
8769
8820
|
const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
8770
8821
|
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;
|
8822
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
8772
8823
|
const touchRef = React.useRef(null);
|
8773
8824
|
const fTouchRef = React.useRef(null);
|
8774
8825
|
const touchMoveRef = React.useRef(null);
|
@@ -8893,7 +8944,8 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
|
|
8893
8944
|
React.createElement("div", { onClick: onClose, className: 'modal-icon-wrapper' },
|
8894
8945
|
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
8946
|
React.createElement("div", { ref: ref, style: {
|
8896
|
-
height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H
|
8947
|
+
height: (isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H) -
|
8948
|
+
((_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),
|
8897
8949
|
overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
|
8898
8950
|
} }, children)))))), modalEleRef.current);
|
8899
8951
|
};
|
@@ -9061,7 +9113,7 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
|
|
9061
9113
|
var CommodityGroup$1 = React.memo(CommodityGroup);
|
9062
9114
|
|
9063
9115
|
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;
|
9116
|
+
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
9117
|
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
9118
|
const { sxpParameter, popupDetailData, isPreview, bffFbReport, popupCurTimeRef, checkCommodityIndexRef } = useSxpDataSource();
|
9067
9119
|
const { jumpToWeb, productView } = useEventReport();
|
@@ -9069,6 +9121,7 @@ const CommodityDetail$1 = (_a) => {
|
|
9069
9121
|
const [showModal, setShowModal] = React.useState(false);
|
9070
9122
|
const [show3DModal, setShow3DModal] = React.useState(false);
|
9071
9123
|
const [checkCommodityIndex, setCheckCommodityIndex] = React.useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
|
9124
|
+
const ref = React.useRef();
|
9072
9125
|
const data = isPost ? rec : popupDetailData;
|
9073
9126
|
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
9127
|
let cta = isPost
|
@@ -9108,17 +9161,20 @@ const CommodityDetail$1 = (_a) => {
|
|
9108
9161
|
};
|
9109
9162
|
}, []);
|
9110
9163
|
const priceText = React.useMemo(() => {
|
9111
|
-
var _a, _b, _c, _d, _e;
|
9164
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
9165
|
+
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
9166
|
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
9113
|
-
return `${(
|
9114
|
-
|
9115
|
-
|
9167
|
+
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
|
9168
|
+
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
9169
|
+
minimumFractionDigits: 0
|
9170
|
+
})) !== null && _g !== void 0 ? _g : ''
|
9171
|
+
: product === null || product === void 0 ? void 0 : product.price}`;
|
9116
9172
|
}
|
9117
9173
|
else {
|
9118
9174
|
return '$7,000';
|
9119
9175
|
}
|
9120
|
-
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
|
9121
|
-
const width = (isPreview ? 375 : (
|
9176
|
+
}, [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]);
|
9177
|
+
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
9178
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
9123
9179
|
const renderContent = ({ isPost }) => {
|
9124
9180
|
var _a, _b, _c, _d;
|
@@ -9159,6 +9215,10 @@ const CommodityDetail$1 = (_a) => {
|
|
9159
9215
|
popupCurTimeRef.current = new Date();
|
9160
9216
|
setCheckCommodityIndex(index);
|
9161
9217
|
checkCommodityIndexRef.current = index;
|
9218
|
+
if (ref === null || ref === void 0 ? void 0 : ref.current) {
|
9219
|
+
ref.current.swiper.slideTo(0);
|
9220
|
+
ref.current.swiper.autoplay.start();
|
9221
|
+
}
|
9162
9222
|
}, []);
|
9163
9223
|
const renderCommodityGroup = React.useCallback(() => {
|
9164
9224
|
var _a, _b, _c;
|
@@ -9174,18 +9234,18 @@ const CommodityDetail$1 = (_a) => {
|
|
9174
9234
|
};
|
9175
9235
|
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
9176
9236
|
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
9177
|
-
const iframeUrl = ((
|
9237
|
+
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
9238
|
return (React.createElement(React.Fragment, null,
|
9179
9239
|
React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
|
9180
9240
|
React.createElement("div", { style: { position: 'relative' } },
|
9181
|
-
product && ((
|
9241
|
+
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
9242
|
clickable: true,
|
9183
9243
|
bulletActiveClass: 'swipe-item-active-bullet',
|
9184
9244
|
clickableClass: getDotsAlign
|
9185
9245
|
}, loop: true, autoplay: {
|
9186
9246
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
9187
|
-
} },
|
9188
|
-
React.createElement(React.Fragment, null, (
|
9247
|
+
}, ref: ref },
|
9248
|
+
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
9249
|
var _a;
|
9190
9250
|
return (React.createElement(SwiperSlide, { key: src },
|
9191
9251
|
React.createElement("div", { style: {
|
@@ -9201,7 +9261,7 @@ const CommodityDetail$1 = (_a) => {
|
|
9201
9261
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
9202
9262
|
}, 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
9263
|
})))),
|
9204
|
-
!((
|
9264
|
+
!((_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
9265
|
height,
|
9206
9266
|
width
|
9207
9267
|
}) },
|
@@ -9209,7 +9269,7 @@ const CommodityDetail$1 = (_a) => {
|
|
9209
9269
|
objectFit: 'cover',
|
9210
9270
|
width: '100%',
|
9211
9271
|
height: '100%'
|
9212
|
-
}), src: (
|
9272
|
+
}), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
|
9213
9273
|
(iframeUrl && iframeIcon) ||
|
9214
9274
|
(!product && iframeIcon && (React.createElement("div", { style: {
|
9215
9275
|
padding: '5px 10px',
|
@@ -9355,7 +9415,7 @@ var interactionRender$c = [
|
|
9355
9415
|
* @Author: binruan@chatlabs.com
|
9356
9416
|
* @Date: 2023-10-27 14:06:35
|
9357
9417
|
* @LastEditors: binruan@chatlabs.com
|
9358
|
-
* @LastEditTime: 2024-08-
|
9418
|
+
* @LastEditTime: 2024-08-20 14:01:21
|
9359
9419
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\Prompt\settingRender.tsx
|
9360
9420
|
*
|
9361
9421
|
*/
|
@@ -9422,6 +9482,11 @@ var settingRender$8 = [
|
|
9422
9482
|
}
|
9423
9483
|
]
|
9424
9484
|
},
|
9485
|
+
{
|
9486
|
+
label: '内容字体间距',
|
9487
|
+
type: 'TextSpace',
|
9488
|
+
name: ['props', 'contentStyle']
|
9489
|
+
},
|
9425
9490
|
{
|
9426
9491
|
type: 'Group',
|
9427
9492
|
label: '提交按钮字体',
|
@@ -9455,6 +9520,11 @@ var settingRender$8 = [
|
|
9455
9520
|
}
|
9456
9521
|
]
|
9457
9522
|
},
|
9523
|
+
{
|
9524
|
+
label: '提交按钮间距',
|
9525
|
+
type: 'TextSpace',
|
9526
|
+
name: ['props', 'submitButtonStyle']
|
9527
|
+
},
|
9458
9528
|
{
|
9459
9529
|
type: 'TextStyle',
|
9460
9530
|
name: ['props', 'submitButtonStyle']
|
@@ -9565,7 +9635,7 @@ const Prompt = createMaterial(PromptComponent, {
|
|
9565
9635
|
* @Author: binruan@chatlabs.com
|
9566
9636
|
* @Date: 2024-03-26 16:50:25
|
9567
9637
|
* @LastEditors: binruan@chatlabs.com
|
9568
|
-
* @LastEditTime: 2024-08-
|
9638
|
+
* @LastEditTime: 2024-08-20 15:50:06
|
9569
9639
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
|
9570
9640
|
*
|
9571
9641
|
*/
|
@@ -9762,6 +9832,16 @@ var settingRender$7 = [
|
|
9762
9832
|
label: '默认行数',
|
9763
9833
|
type: 'Number',
|
9764
9834
|
name: ['lineClamp']
|
9835
|
+
},
|
9836
|
+
{
|
9837
|
+
label: '间距',
|
9838
|
+
type: 'TextSpace'
|
9839
|
+
},
|
9840
|
+
{
|
9841
|
+
label: '价格千分符展示',
|
9842
|
+
type: 'Switch',
|
9843
|
+
name: ['enableFormattedPrice'],
|
9844
|
+
initialValue: true
|
9765
9845
|
}
|
9766
9846
|
]
|
9767
9847
|
}
|
@@ -9847,6 +9927,11 @@ var settingRender$7 = [
|
|
9847
9927
|
{
|
9848
9928
|
type: 'TextAlign',
|
9849
9929
|
name: ['props', 'buttonStyle']
|
9930
|
+
},
|
9931
|
+
{
|
9932
|
+
label: '间距',
|
9933
|
+
type: 'TextSpace',
|
9934
|
+
name: ['props', 'buttonStyle']
|
9850
9935
|
}
|
9851
9936
|
]
|
9852
9937
|
},
|
@@ -9864,7 +9949,7 @@ var settingRender$7 = [
|
|
9864
9949
|
];
|
9865
9950
|
|
9866
9951
|
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;
|
9952
|
+
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
9953
|
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
9954
|
React.useState(true);
|
9870
9955
|
const { sxpParameter, popupCurTimeRef, popupDetailData, isPreview, bffFbReport, checkCommodityIndexRef } = useSxpDataSource();
|
@@ -9876,6 +9961,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
9876
9961
|
const curTimeRef = React.useRef(null);
|
9877
9962
|
const [show3DModal, setShow3DModal] = React.useState(false);
|
9878
9963
|
const [checkCommodityIndex, setCheckCommodityIndex] = React.useState((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
|
9964
|
+
const ref = React.useRef();
|
9879
9965
|
const data = isPost ? rec : popupDetailData;
|
9880
9966
|
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
9967
|
let cta = isPost
|
@@ -9915,17 +10001,20 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
9915
10001
|
};
|
9916
10002
|
}, []);
|
9917
10003
|
const priceText = React.useMemo(() => {
|
9918
|
-
var _a, _b, _c, _d, _e;
|
10004
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
10005
|
+
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
10006
|
if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
|
9920
|
-
return `${(
|
9921
|
-
|
9922
|
-
|
10007
|
+
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
|
10008
|
+
? (_g = (_f = product === null || product === void 0 ? void 0 : product.price) === null || _f === void 0 ? void 0 : _f.toLocaleString('zh', {
|
10009
|
+
minimumFractionDigits: 0
|
10010
|
+
})) !== null && _g !== void 0 ? _g : ''
|
10011
|
+
: product === null || product === void 0 ? void 0 : product.price}`;
|
9923
10012
|
}
|
9924
10013
|
else {
|
9925
10014
|
return '£102,300.00';
|
9926
10015
|
}
|
9927
|
-
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
|
9928
|
-
const width = (isPreview ? 375 : (
|
10016
|
+
}, [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]);
|
10017
|
+
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
10018
|
const height = commodityImgRatio ? width * (commodityImgRatio.h / commodityImgRatio.w) : width;
|
9930
10019
|
// useEffect(() => {
|
9931
10020
|
// console.log(scrollRef?.current?.scrollHeight, window.innerHeight);
|
@@ -9993,6 +10082,10 @@ Made in Italy` })));
|
|
9993
10082
|
popupCurTimeRef.current = new Date();
|
9994
10083
|
setCheckCommodityIndex(index);
|
9995
10084
|
checkCommodityIndexRef.current = index;
|
10085
|
+
if (ref === null || ref === void 0 ? void 0 : ref.current) {
|
10086
|
+
ref.current.swiper.slideTo(0);
|
10087
|
+
ref.current.swiper.autoplay.start();
|
10088
|
+
}
|
9996
10089
|
}, []);
|
9997
10090
|
const renderCommodityGroup = React.useCallback(() => {
|
9998
10091
|
var _a, _b, _c;
|
@@ -10008,17 +10101,17 @@ Made in Italy` })));
|
|
10008
10101
|
};
|
10009
10102
|
return dotsAlignClass === null || dotsAlignClass === void 0 ? void 0 : dotsAlignClass[swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign];
|
10010
10103
|
}, [swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign]);
|
10011
|
-
const iframeUrl = ((
|
10104
|
+
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
10105
|
return (React.createElement("div", { className: 'pb-commondityDiroNew' },
|
10013
10106
|
React.createElement("div", Object.assign({ className: css.css(Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' })) }, props),
|
10014
10107
|
React.createElement("div", { style: { position: 'relative' } },
|
10015
|
-
product && ((
|
10108
|
+
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
10109
|
clickable: true,
|
10017
10110
|
bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
|
10018
10111
|
clickableClass: getDotsAlign
|
10019
10112
|
}, loop: true, autoplay: {
|
10020
10113
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
10021
|
-
} }, (
|
10114
|
+
}, ref: ref }, (_3 = product === null || product === void 0 ? void 0 : product.homePage) === null || _3 === void 0 ? void 0 : _3.map((src) => {
|
10022
10115
|
var _a;
|
10023
10116
|
return (React.createElement(SwiperSlide, { key: src },
|
10024
10117
|
React.createElement("div", { style: {
|
@@ -10034,7 +10127,7 @@ Made in Italy` })));
|
|
10034
10127
|
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
10035
10128
|
}, 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
10129
|
}))),
|
10037
|
-
!((
|
10130
|
+
!((_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
10131
|
height,
|
10039
10132
|
width
|
10040
10133
|
}) },
|
@@ -10042,7 +10135,7 @@ Made in Italy` })));
|
|
10042
10135
|
objectFit: 'cover',
|
10043
10136
|
width: '100%',
|
10044
10137
|
height: '100%'
|
10045
|
-
}), src: (
|
10138
|
+
}), src: (_5 = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _5 !== void 0 ? _5 : bottom_image, alt: 'pdp image' }))),
|
10046
10139
|
(iframeUrl && iframeIcon) ||
|
10047
10140
|
(!product && iframeIcon && (React.createElement("div", { style: {
|
10048
10141
|
padding: '5px 10px',
|
@@ -10062,7 +10155,7 @@ Made in Italy` })));
|
|
10062
10155
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
|
10063
10156
|
React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
|
10064
10157
|
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((
|
10158
|
+
__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
10159
|
} }),
|
10067
10160
|
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
10161
|
__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 +10165,11 @@ Made in Italy` })));
|
|
10072
10165
|
__html: setFontForText(priceText, commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
|
10073
10166
|
} }),
|
10074
10167
|
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((
|
10168
|
+
__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
10169
|
} }))),
|
10077
|
-
(!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { "aria-label": (
|
10170
|
+
(!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
10171
|
React.createElement("span", { dangerouslySetInnerHTML: {
|
10079
|
-
__html: setFontForText((
|
10172
|
+
__html: setFontForText((_9 = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _9 !== void 0 ? _9 : 'Shop now', buttonStyle)
|
10080
10173
|
} }))),
|
10081
10174
|
productInfoText({ isPost }))),
|
10082
10175
|
React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false })),
|
@@ -10194,7 +10287,7 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
|
|
10194
10287
|
* @Author: binruan@chatlabs.com
|
10195
10288
|
* @Date: 2024-03-26 16:50:25
|
10196
10289
|
* @LastEditors: binruan@chatlabs.com
|
10197
|
-
* @LastEditTime: 2024-
|
10290
|
+
* @LastEditTime: 2024-08-06 14:09:52
|
10198
10291
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityList\settingRender.tsx
|
10199
10292
|
*
|
10200
10293
|
*/
|
@@ -10331,6 +10424,10 @@ var settingRender$6 = [
|
|
10331
10424
|
{
|
10332
10425
|
label: '标题对齐',
|
10333
10426
|
type: 'TextAlign'
|
10427
|
+
},
|
10428
|
+
{
|
10429
|
+
label: '间距',
|
10430
|
+
type: 'TextSpace'
|
10334
10431
|
}
|
10335
10432
|
]
|
10336
10433
|
}
|
@@ -11156,7 +11253,7 @@ const Appoint = createMaterial(AppointComponent, {
|
|
11156
11253
|
* @Author: binruan@chatlabs.com
|
11157
11254
|
* @Date: 2024-07-02 14:51:32
|
11158
11255
|
* @LastEditors: binruan@chatlabs.com
|
11159
|
-
* @LastEditTime: 2024-
|
11256
|
+
* @LastEditTime: 2024-08-06 14:51:18
|
11160
11257
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\settingRender.tsx
|
11161
11258
|
*
|
11162
11259
|
*/
|
@@ -11253,6 +11350,11 @@ var linkSettingRender = [
|
|
11253
11350
|
type: 'TextAlign',
|
11254
11351
|
name: ['props', 'customTitle', 'style']
|
11255
11352
|
},
|
11353
|
+
{
|
11354
|
+
label: '间距',
|
11355
|
+
type: 'TextSpace',
|
11356
|
+
name: ['props', 'customTitle', 'style']
|
11357
|
+
},
|
11256
11358
|
{
|
11257
11359
|
label: '上边距',
|
11258
11360
|
type: 'Number',
|
@@ -11910,7 +12012,7 @@ const MultiCommodityDiroNew = createMaterial(MultiCommodityDiroNewComponent, {
|
|
11910
12012
|
* @Author: binruan@chatlabs.com
|
11911
12013
|
* @Date: 2024-04-07 14:07:12
|
11912
12014
|
* @LastEditors: binruan@chatlabs.com
|
11913
|
-
* @LastEditTime: 2024-06
|
12015
|
+
* @LastEditTime: 2024-08-06 14:00:36
|
11914
12016
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\settingRender.tsx
|
11915
12017
|
*
|
11916
12018
|
*/
|
@@ -12015,6 +12117,10 @@ var settingRender$3 = [
|
|
12015
12117
|
{
|
12016
12118
|
label: '标题对齐',
|
12017
12119
|
type: 'TextAlign'
|
12120
|
+
},
|
12121
|
+
{
|
12122
|
+
label: '间距',
|
12123
|
+
type: 'TextSpace'
|
12018
12124
|
}
|
12019
12125
|
]
|
12020
12126
|
}
|
@@ -12100,6 +12206,11 @@ var settingRender$3 = [
|
|
12100
12206
|
{
|
12101
12207
|
type: 'TextAlign',
|
12102
12208
|
name: ['props', 'buttonStyle']
|
12209
|
+
},
|
12210
|
+
{
|
12211
|
+
label: '间距',
|
12212
|
+
type: 'TextSpace',
|
12213
|
+
name: ['props', 'buttonStyle']
|
12103
12214
|
}
|
12104
12215
|
]
|
12105
12216
|
},
|
@@ -13539,7 +13650,8 @@ const WaterfallFlowItem$1 = (props) => {
|
|
13539
13650
|
function WaterfallList$1(_a) {
|
13540
13651
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
13541
13652
|
var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
|
13542
|
-
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
13653
|
+
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
|
13654
|
+
const { jumpToWeb } = useEventReport();
|
13543
13655
|
/** 滚动的父元素 */
|
13544
13656
|
const scrollParent = React.useRef(null);
|
13545
13657
|
/** 向上滚动的距离 */
|
@@ -13723,10 +13835,12 @@ function WaterfallList$1(_a) {
|
|
13723
13835
|
};
|
13724
13836
|
}, [onScroll, scrollParent]);
|
13725
13837
|
const handleClickLink = () => {
|
13726
|
-
var _a, _b;
|
13838
|
+
var _a, _b, _c, _d, _e;
|
13727
13839
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
13728
13840
|
reportTagsView();
|
13729
|
-
|
13841
|
+
const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
|
13842
|
+
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);
|
13843
|
+
window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
|
13730
13844
|
}
|
13731
13845
|
};
|
13732
13846
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
@@ -13769,7 +13883,7 @@ var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
|
|
13769
13883
|
|
13770
13884
|
const WaterfallFlowItem = (props) => {
|
13771
13885
|
const { rec, index, list, reportTagsView, textStyles, space } = props;
|
13772
|
-
const { swiperRef, setRtcList, setOpenHashtag,
|
13886
|
+
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter } = useSxpDataSource();
|
13773
13887
|
const [showVideo, setShowVideo] = React.useState(false);
|
13774
13888
|
const imgDom = React.useRef(null);
|
13775
13889
|
const ref = React.useRef(null);
|
@@ -13897,7 +14011,8 @@ const WaterfallFlowItem = (props) => {
|
|
13897
14011
|
function WaterfallList(_a) {
|
13898
14012
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
13899
14013
|
var { reportTagsView, showBanner } = _a, props = __rest(_a, ["reportTagsView", "showBanner"]);
|
13900
|
-
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
14014
|
+
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = useSxpDataSource();
|
14015
|
+
const { jumpToWeb } = useEventReport();
|
13901
14016
|
const [list, setList] = React.useState();
|
13902
14017
|
const [data, setData] = React.useState();
|
13903
14018
|
const [isLoadingData, setIsLoadingData] = React.useState(false);
|
@@ -13949,10 +14064,12 @@ function WaterfallList(_a) {
|
|
13949
14064
|
// };
|
13950
14065
|
// }, [isLoadingData, containerRef, loadMoreData]);
|
13951
14066
|
const handleClickLink = () => {
|
13952
|
-
var _a, _b;
|
14067
|
+
var _a, _b, _c, _d, _e;
|
13953
14068
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
13954
14069
|
reportTagsView();
|
13955
|
-
|
14070
|
+
const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
|
14071
|
+
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);
|
14072
|
+
window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
|
13956
14073
|
}
|
13957
14074
|
};
|
13958
14075
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
@@ -14255,7 +14372,7 @@ const Consent = createMaterial(ConsentComponent, {
|
|
14255
14372
|
* @Author: binruan@chatlabs.com
|
14256
14373
|
* @Date: 2024-07-02 14:51:32
|
14257
14374
|
* @LastEditors: binruan@chatlabs.com
|
14258
|
-
* @LastEditTime: 2024-
|
14375
|
+
* @LastEditTime: 2024-08-06 14:28:34
|
14259
14376
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\settingRender.tsx
|
14260
14377
|
*
|
14261
14378
|
*/
|
@@ -14358,6 +14475,10 @@ var settingRender$1 = [
|
|
14358
14475
|
label: '对齐',
|
14359
14476
|
type: 'TextAlign',
|
14360
14477
|
name: ['props', 'ctaTempStyles', 'ctaTitle']
|
14478
|
+
},
|
14479
|
+
{
|
14480
|
+
type: 'TextSpace',
|
14481
|
+
name: ['props', 'ctaTempStyles', 'ctaTitle']
|
14361
14482
|
}
|
14362
14483
|
]
|
14363
14484
|
}
|
@@ -15863,7 +15984,7 @@ var Tagbar$1 = React.memo(Tagbar);
|
|
15863
15984
|
* @Author: binruan@chatlabs.com
|
15864
15985
|
* @Date: 2024-01-15 19:03:09
|
15865
15986
|
* @LastEditors: binruan@chatlabs.com
|
15866
|
-
* @LastEditTime: 2024-08-
|
15987
|
+
* @LastEditTime: 2024-08-16 11:47:58
|
15867
15988
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
15868
15989
|
*
|
15869
15990
|
*/
|
@@ -15881,8 +16002,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
15881
16002
|
const [isReload, setIsReload] = React.useState(new Date().getTime());
|
15882
16003
|
const skipLinkRef = React.useRef(false);
|
15883
16004
|
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();
|
16005
|
+
const { backMainFeed, productView, jumpToWeb } = useEventReport();
|
15886
16006
|
const isShowFingerTip = React.useMemo(() => {
|
15887
16007
|
return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
|
15888
16008
|
}, [data, loading, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip]);
|
@@ -16025,15 +16145,39 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16025
16145
|
const height = React.useMemo(() => {
|
16026
16146
|
return containerHeight - minusHeight - tagHeight;
|
16027
16147
|
}, [globalConfig, containerHeight, tagHeight]);
|
16148
|
+
const visList = React.useMemo(() => {
|
16149
|
+
var _a;
|
16150
|
+
const list = activeIndex === 0 && !waterFallData
|
16151
|
+
? [(_a = data === null || data === void 0 ? void 0 : data[0]) !== null && _a !== void 0 ? _a : null]
|
16152
|
+
: data === null || data === void 0 ? void 0 : data.map((item, index) => {
|
16153
|
+
if (activeIndex === index || index - 1 === activeIndex || index + 1 === activeIndex) {
|
16154
|
+
return item;
|
16155
|
+
}
|
16156
|
+
else {
|
16157
|
+
return null;
|
16158
|
+
}
|
16159
|
+
});
|
16160
|
+
return !waterFallData ? list.concat([{ loading: true }]) : list;
|
16161
|
+
}, [data, activeIndex, waterFallData]);
|
16028
16162
|
const renderLogo = React.useMemo(() => {
|
16029
|
-
var _a, _b;
|
16163
|
+
var _a, _b, _c, _d;
|
16030
16164
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
16031
16165
|
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
|
-
|
16166
|
+
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';
|
16167
|
+
const rec = visList[activeIndex];
|
16168
|
+
return (React.createElement("div", Object.assign({ className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } }, (link && {
|
16169
|
+
onClick: () => {
|
16170
|
+
var _a, _b, _c, _d;
|
16171
|
+
if (isExternalLink) {
|
16172
|
+
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));
|
16173
|
+
}
|
16174
|
+
new Function(link)();
|
16175
|
+
}
|
16176
|
+
})),
|
16033
16177
|
React.createElement("img", { src: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl, alt: 'logo' })));
|
16034
16178
|
}
|
16035
16179
|
return null;
|
16036
|
-
}, [globalConfig]);
|
16180
|
+
}, [globalConfig, activeIndex, visList]);
|
16037
16181
|
const renderContent = React.useCallback((rec, index) => {
|
16038
16182
|
var _a, _b, _c, _d;
|
16039
16183
|
if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
|
@@ -16170,7 +16314,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16170
16314
|
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
16315
|
}
|
16172
16316
|
});
|
16173
|
-
setSlideSkipState();
|
16174
16317
|
skipLinkRef.current = true;
|
16175
16318
|
window.location.href = window.getJointUtmLink(link);
|
16176
16319
|
}
|
@@ -16256,20 +16399,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16256
16399
|
});
|
16257
16400
|
}
|
16258
16401
|
};
|
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
16402
|
const renderToggleButton = React.useCallback((visible) => {
|
16274
16403
|
var _a, _b, _c, _d, _e, _f;
|
16275
16404
|
if (!visible)
|