pb-sxp-ui 1.9.4 → 1.9.7
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 +21 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -12
- 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 +21 -12
- 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/context/SxpDataSourceProvider.d.ts +2 -2
- package/es/core/context/SxpDataSourceProvider.js +13 -4
- package/es/materials/sxp/template/Appoint/index.js +1 -1
- package/es/materials/sxp/template/Commodity/index.js +1 -1
- package/es/materials/sxp/template/CommodityDiro/index.js +1 -1
- package/es/materials/sxp/template/CommodityDiroNew/index.js +1 -1
- package/es/materials/sxp/template/Link/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodity/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +1 -1
- package/lib/core/context/SxpDataSourceProvider.d.ts +2 -2
- package/lib/core/context/SxpDataSourceProvider.js +13 -4
- package/lib/materials/sxp/template/Appoint/index.js +1 -1
- package/lib/materials/sxp/template/Commodity/index.js +1 -1
- package/lib/materials/sxp/template/CommodityDiro/index.js +1 -1
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +1 -1
- package/lib/materials/sxp/template/Link/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodity/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -721,7 +721,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
721
721
|
// 获取推荐视频数据
|
722
722
|
const getRecommendVideos = useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
|
723
723
|
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
724
|
-
query =
|
724
|
+
query = {
|
725
|
+
maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize,
|
726
|
+
defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : defaultSize,
|
727
|
+
hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
|
728
|
+
traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo,
|
729
|
+
themeTag: query === null || query === void 0 ? void 0 : query.themeTag,
|
730
|
+
pageNum: query === null || query === void 0 ? void 0 : query.pageNum,
|
731
|
+
contentFilter: query === null || query === void 0 ? void 0 : query.contentFilter,
|
732
|
+
productFilter: query === null || query === void 0 ? void 0 : query.productFilter
|
733
|
+
};
|
725
734
|
if (utmVal) {
|
726
735
|
const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
|
727
736
|
var _a, _b;
|
@@ -742,7 +751,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
742
751
|
const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
|
743
752
|
var _t, _u, _v, _w, _x, _y;
|
744
753
|
query.pageNum = pageNum;
|
745
|
-
result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: '
|
754
|
+
result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'POST', body: query }));
|
746
755
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
747
756
|
return undefined;
|
748
757
|
}
|
@@ -764,7 +773,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
764
773
|
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
765
774
|
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_l = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _l !== void 0 ? _l : 1 });
|
766
775
|
}
|
767
|
-
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: '
|
776
|
+
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'POST', body: query }));
|
768
777
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
769
778
|
return undefined;
|
770
779
|
}
|
@@ -787,7 +796,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
787
796
|
return;
|
788
797
|
}
|
789
798
|
const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
|
790
|
-
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_z = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _z === void 0 ? void 0 : _z.itemId) && { productFilter: (_0 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _0 === void 0 ? void 0 : _0.itemId })), (((_1 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _1 === void 0 ? void 0 : _1.itemId) && { contentFilter: (_2 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _2 === void 0 ? void 0 : _2.itemId })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
|
799
|
+
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_z = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _z === void 0 ? void 0 : _z.itemId) && { productFilter: [(_0 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _0 === void 0 ? void 0 : _0.itemId] })), (((_1 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _1 === void 0 ? void 0 : _1.itemId) && { contentFilter: [(_2 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _2 === void 0 ? void 0 : _2.itemId] })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
|
791
800
|
setRtcList(rtcList.concat(getFilterRecList(data)));
|
792
801
|
setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
|
793
802
|
return data;
|
@@ -12297,7 +12306,7 @@ const Commodity$1 = (_a) => {
|
|
12297
12306
|
const { sxpParameter } = useSxpDataSource();
|
12298
12307
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
12299
12308
|
const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
|
12300
|
-
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData,
|
12309
|
+
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(style), index: index }, props),
|
12301
12310
|
React.createElement(Img$1, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
12302
12311
|
React.createElement("div", { className: css({
|
12303
12312
|
color: '#fff',
|
@@ -12391,7 +12400,7 @@ const Appoint$1 = (_a) => {
|
|
12391
12400
|
const { sxpParameter } = useSxpDataSource();
|
12392
12401
|
const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
|
12393
12402
|
const src = (_d = (_c = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image;
|
12394
|
-
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData,
|
12403
|
+
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), index: index }, props),
|
12395
12404
|
React.createElement(Img$1, { src: src, rec: recData, item: (_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) !== null && _f !== void 0 ? _f : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
12396
12405
|
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
|
12397
12406
|
__html: setFontForText((_g = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _g !== void 0 ? _g : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
|
@@ -12575,7 +12584,7 @@ const Link$1 = (_a) => {
|
|
12575
12584
|
const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
|
12576
12585
|
(_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
|
12577
12586
|
const src = (_e = (_d = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
|
12578
|
-
return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData,
|
12587
|
+
return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)) }, props, { jumpLink: (_f = cta === null || cta === void 0 ? void 0 : cta.link) !== null && _f !== void 0 ? _f : '' }),
|
12579
12588
|
React.createElement(Img$1, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
12580
12589
|
React.createElement("div", { className: css({
|
12581
12590
|
display: 'flex',
|
@@ -12690,7 +12699,7 @@ const CommodityDiro$1 = (_a) => {
|
|
12690
12699
|
const { sxpParameter } = useSxpDataSource();
|
12691
12700
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
12692
12701
|
const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
|
12693
|
-
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData,
|
12702
|
+
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(style), index: index }, props),
|
12694
12703
|
React.createElement(Img$1, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
12695
12704
|
React.createElement("div", { className: css({
|
12696
12705
|
color: '#fff',
|
@@ -12786,7 +12795,7 @@ const CommodityDiroNew$1 = (_a) => {
|
|
12786
12795
|
const { sxpParameter } = useSxpDataSource();
|
12787
12796
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
12788
12797
|
const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
|
12789
|
-
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData,
|
12798
|
+
return (React.createElement(EventProvider$1, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(style), index: index }, props),
|
12790
12799
|
React.createElement(Img$1, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
12791
12800
|
React.createElement("div", { className: css({
|
12792
12801
|
color: '#fff',
|
@@ -12885,7 +12894,7 @@ const MultiCommodityDiro$1 = (_a) => {
|
|
12885
12894
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
12886
12895
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
12887
12896
|
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
12888
|
-
React.createElement(EventProvider$1, Object.assign({ rec: recData, multiCheckIndex: itemIndex }, props),
|
12897
|
+
React.createElement(EventProvider$1, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex }, props),
|
12889
12898
|
React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: itemIndex, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
12890
12899
|
React.createElement("div", { className: css({
|
12891
12900
|
color: '#000',
|
@@ -12984,7 +12993,7 @@ const MultiCommodity$1 = (_a) => {
|
|
12984
12993
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
12985
12994
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
12986
12995
|
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
12987
|
-
React.createElement(EventProvider$1, Object.assign({ rec: recData, multiCheckIndex: itemIndex }, props),
|
12996
|
+
React.createElement(EventProvider$1, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex }, props),
|
12988
12997
|
React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: itemIndex, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
12989
12998
|
React.createElement("div", { className: css({
|
12990
12999
|
color: '#fff',
|
@@ -13091,7 +13100,7 @@ const MultiCommodityDiroNew$1 = (_a) => {
|
|
13091
13100
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
13092
13101
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13093
13102
|
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
13094
|
-
React.createElement(EventProvider$1, Object.assign({ rec: recData, multiCheckIndex: itemIndex }, props),
|
13103
|
+
React.createElement(EventProvider$1, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex }, props),
|
13095
13104
|
React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: itemIndex, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
13096
13105
|
React.createElement("div", { className: css({
|
13097
13106
|
color: '#fff',
|