pb-sxp-ui 1.15.13-alpha.2 → 1.15.13-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +33 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +31 -32
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +6 -6
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +6 -6
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +33 -34
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +6 -6
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/DiyStoryPreview/index.d.ts +1 -0
- package/es/core/components/DiyStoryPreview/index.js +20 -13
- package/es/core/components/SxpPageCore/index.d.ts +1 -0
- package/es/core/components/SxpPageCore/index.js +3 -3
- package/es/core/context/SxpDataSourceProvider.js +3 -3
- package/lib/core/components/DiyStoryPreview/index.d.ts +1 -0
- package/lib/core/components/DiyStoryPreview/index.js +19 -12
- package/lib/core/components/SxpPageCore/index.d.ts +1 -0
- package/lib/core/components/SxpPageCore/index.js +3 -3
- package/lib/core/context/SxpDataSourceProvider.js +3 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -786,9 +786,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
786
786
|
}
|
787
787
|
else if (utmVal) {
|
788
788
|
const val = (_k = (_j = (_h = splitUrlParams(utmVal)) === null || _h === void 0 ? void 0 : _h.filter((val) => {
|
789
|
-
var _a, _b;
|
790
789
|
const key = val.split('=')[0];
|
791
|
-
return
|
790
|
+
return key;
|
792
791
|
})) === null || _j === void 0 ? void 0 : _j.join('&')) !== null && _k !== void 0 ? _k : '';
|
793
792
|
if (val)
|
794
793
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
@@ -829,7 +828,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
829
828
|
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
830
829
|
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_o = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _o !== void 0 ? _o : 1 });
|
831
830
|
}
|
832
|
-
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('
|
831
|
+
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct', { method: 'POST', body: query }));
|
833
832
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
834
833
|
return undefined;
|
835
834
|
}
|
@@ -1106,6 +1105,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1106
1105
|
if (!isShowConsent)
|
1107
1106
|
h5EnterLink();
|
1108
1107
|
}, [isShowConsent]);
|
1108
|
+
console.log(data, '111');
|
1109
1109
|
React.useEffect(() => {
|
1110
1110
|
if (isShowConsent || isPreview)
|
1111
1111
|
return;
|
@@ -19086,7 +19086,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
19086
19086
|
React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig }),
|
19087
19087
|
openMultiPosts && (React.createElement(MultiPosts$2, Object.assign({}, (_x = (_w = (_v = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.item) === null || _x === void 0 ? void 0 : _x.props, (_0 = (_z = (_y = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.item) === null || _0 === void 0 ? void 0 : _0.event, { style: { position: 'fixed', top: 0, left: 0, right: 0 } })))))));
|
19088
19088
|
};
|
19089
|
-
var
|
19089
|
+
var index$2 = React.memo(SxpPageRender);
|
19090
19090
|
|
19091
19091
|
const PictureGroup$2 = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
|
19092
19092
|
return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
|
@@ -19450,7 +19450,7 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
|
|
19450
19450
|
return renderView(rec, index);
|
19451
19451
|
})));
|
19452
19452
|
};
|
19453
|
-
var index$
|
19453
|
+
var index$1 = React.memo(DiyPortalPreview);
|
19454
19454
|
|
19455
19455
|
const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index, swiperRef, data = [], loopPlay }) => {
|
19456
19456
|
const { isActive } = useSwiperSlide();
|
@@ -19691,16 +19691,10 @@ var VideoWidget$1 = React.memo(VideoWidget);
|
|
19691
19691
|
* @Author: binruan@chatlabs.com
|
19692
19692
|
* @Date: 2025-03-25 13:54:27
|
19693
19693
|
* @LastEditors: binruan@chatlabs.com
|
19694
|
-
* @LastEditTime: 2025-03-
|
19694
|
+
* @LastEditTime: 2025-03-27 17:20:34
|
19695
19695
|
* @FilePath: \pb-sxp-ui\src\core\components\DiyStoryPreview\index.tsx
|
19696
19696
|
*
|
19697
19697
|
*/
|
19698
|
-
const RESOLVER$1 = {};
|
19699
|
-
Object.values(_materials_).forEach((v) => {
|
19700
|
-
RESOLVER$1[v.extend.type] = v;
|
19701
|
-
});
|
19702
|
-
const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
|
19703
|
-
const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
|
19704
19698
|
const recData = {
|
19705
19699
|
position: 0,
|
19706
19700
|
isCollected: false,
|
@@ -19879,7 +19873,14 @@ const recData = {
|
|
19879
19873
|
]
|
19880
19874
|
}
|
19881
19875
|
};
|
19882
|
-
const
|
19876
|
+
const RESOLVER$1 = {};
|
19877
|
+
Object.values(_materials_).forEach((v) => {
|
19878
|
+
RESOLVER$1[v.extend.type] = v;
|
19879
|
+
});
|
19880
|
+
const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
|
19881
|
+
const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
|
19882
|
+
const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain, tagList = [], scenes, onActiveChange, activeIndex, loopPlay = false, pointerEvents = 'none' }) => {
|
19883
|
+
const [loopPlaySwiper, setLooPlaySwiper] = React.useState(loopPlay);
|
19883
19884
|
const swiperRef = React.useRef(null);
|
19884
19885
|
React.useMemo(() => {
|
19885
19886
|
let minusHeight = 0;
|
@@ -19905,10 +19906,10 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
19905
19906
|
const renderContent = (rec, index) => {
|
19906
19907
|
const isVideo = isVideoUrl(rec === null || rec === void 0 ? void 0 : rec.mediaUrl);
|
19907
19908
|
if (isVideo) {
|
19908
|
-
return (React.createElement(VideoWidget$1, { rec: rec, index: index, muted: true, width: containerWidth, data: scenes !== null && scenes !== void 0 ? scenes : [], height: containerHeight, activeIndex: index, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, swiperRef: swiperRef, loopPlay:
|
19909
|
+
return (React.createElement(VideoWidget$1, { rec: rec, index: index, muted: true, width: containerWidth, data: scenes !== null && scenes !== void 0 ? scenes : [], height: containerHeight, activeIndex: index, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, swiperRef: swiperRef, loopPlay: loopPlaySwiper }));
|
19909
19910
|
}
|
19910
19911
|
else {
|
19911
|
-
return (React.createElement(PictureGroup$1, { key: rec.itemId, imgUrls: [rec === null || rec === void 0 ? void 0 : rec.mediaUrl], width: containerWidth, height: containerHeight, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost, data: scenes !== null && scenes !== void 0 ? scenes : [], swiperRef: swiperRef, loopPlay:
|
19912
|
+
return (React.createElement(PictureGroup$1, { key: rec.itemId, imgUrls: [rec === null || rec === void 0 ? void 0 : rec.mediaUrl], width: containerWidth, height: containerHeight, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost, data: scenes !== null && scenes !== void 0 ? scenes : [], swiperRef: swiperRef, loopPlay: loopPlaySwiper }));
|
19912
19913
|
}
|
19913
19914
|
};
|
19914
19915
|
React.useMemo(() => {
|
@@ -19941,7 +19942,7 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
19941
19942
|
width: '100%',
|
19942
19943
|
willChange: 'transform',
|
19943
19944
|
zIndex: 2,
|
19944
|
-
pointerEvents
|
19945
|
+
pointerEvents
|
19945
19946
|
} })),
|
19946
19947
|
React.createElement("div", { style: {
|
19947
19948
|
marginBottom: `${(_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _g !== void 0 ? _g : 40}px`,
|
@@ -20053,15 +20054,21 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
20053
20054
|
}, [loopPlay]);
|
20054
20055
|
return (React.createElement("div", { id: 'sxp-render',
|
20055
20056
|
// className={style['clc-sxp-container']}
|
20056
|
-
style: { height: containerHeight, position: 'relative', pointerEvents
|
20057
|
-
React.createElement(Swiper, { ref: swiperRef, allowTouchMove:
|
20057
|
+
style: { height: containerHeight, position: 'relative', pointerEvents } },
|
20058
|
+
React.createElement(Swiper, { ref: swiperRef, allowTouchMove: pointerEvents !== 'none', onSlideChange: () => {
|
20059
|
+
setLooPlaySwiper(false);
|
20060
|
+
swiperRef.current.swiper.allowTouchMove = false;
|
20061
|
+
setTimeout(() => {
|
20062
|
+
swiperRef.current.swiper.allowTouchMove = true;
|
20063
|
+
}, 500);
|
20064
|
+
}, onActiveIndexChange: (swiper) => {
|
20058
20065
|
// setActiveIndex(swiper.activeIndex);
|
20059
20066
|
onActiveChange === null || onActiveChange === void 0 ? void 0 : onActiveChange(swiper.activeIndex);
|
20060
20067
|
}, direction: 'vertical', style: { overflow: 'hidden', height: containerHeight }, height: containerHeight }, scenes === null || scenes === void 0 ? void 0 : scenes.map((rec, index) => {
|
20061
20068
|
return renderView(rec, index);
|
20062
20069
|
}))));
|
20063
20070
|
};
|
20064
|
-
var
|
20071
|
+
var DiyStoryPreview$1 = React.memo(DiyStoryPreview);
|
20065
20072
|
|
20066
20073
|
/*
|
20067
20074
|
* @Author: binruan@chatlabs.com
|
@@ -20159,17 +20166,9 @@ const Popup = () => {
|
|
20159
20166
|
|
20160
20167
|
/*
|
20161
20168
|
* @Author: binruan@chatlabs.com
|
20162
|
-
* @Date: 2024-
|
20163
|
-
* @LastEditors: binruan@chatlabs.com
|
20164
|
-
* @LastEditTime: 2025-02-24 15:47:44
|
20165
|
-
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
20166
|
-
*
|
20167
|
-
*/
|
20168
|
-
/*
|
20169
|
-
* @Author: binruan@chatlabs.com
|
20170
|
-
* @Date: 2023-11-24 15:58:00
|
20169
|
+
* @Date: 2024-03-20 10:27:31
|
20171
20170
|
* @LastEditors: binruan@chatlabs.com
|
20172
|
-
* @LastEditTime:
|
20171
|
+
* @LastEditTime: 2025-03-27 17:17:56
|
20173
20172
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
|
20174
20173
|
*
|
20175
20174
|
*/
|
@@ -20177,7 +20176,7 @@ const RESOLVER = {};
|
|
20177
20176
|
Object.values(_materials_).forEach((v) => {
|
20178
20177
|
RESOLVER[v.extend.type] = v;
|
20179
20178
|
});
|
20180
|
-
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList }) => {
|
20179
|
+
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList, pointerEvents }) => {
|
20181
20180
|
var _a, _b, _c, _d, _e, _f;
|
20182
20181
|
const utmVal = React.useMemo(() => {
|
20183
20182
|
var _a;
|
@@ -20190,7 +20189,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
|
|
20190
20189
|
React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, data: data, dataList: dataList, onUpdateSchema: (d) => setSchema(d), onUpdateChannel: (d) => setChannel(d), render: ({ rtcList, tagList, pageData }) => {
|
20191
20190
|
var _a;
|
20192
20191
|
return (React.createElement(React.Fragment, null,
|
20193
|
-
React.createElement(
|
20192
|
+
React.createElement(DiyStoryPreview$1, Object.assign({ defaultData: data }, (_a = pageData === null || pageData === void 0 ? void 0 : pageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, scenes: rtcList, resolver: RESOLVER, containerHeight: window === null || window === void 0 ? void 0 : window.innerHeight, pointerEvents: pointerEvents })),
|
20194
20193
|
React.createElement(Popup, null)));
|
20195
20194
|
} })));
|
20196
20195
|
};
|
@@ -20204,13 +20203,13 @@ var index = React.memo(SxpPageCore);
|
|
20204
20203
|
* @FilePath: \pb-sxp-ui\src\index.ts
|
20205
20204
|
*/
|
20206
20205
|
|
20207
|
-
exports.DiyPortalPreview = index$
|
20208
|
-
exports.DiyStoryPreview =
|
20206
|
+
exports.DiyPortalPreview = index$1;
|
20207
|
+
exports.DiyStoryPreview = DiyStoryPreview$1;
|
20209
20208
|
exports.EditorDataProvider = EditorDataProvider;
|
20210
20209
|
exports.Modal = Modal$1;
|
20211
20210
|
exports.SxpDataSourceProvider = SxpDataSourceProvider$1;
|
20212
20211
|
exports.SxpPageCore = index;
|
20213
|
-
exports.SxpPageRender =
|
20212
|
+
exports.SxpPageRender = index$2;
|
20214
20213
|
exports.core = index$3;
|
20215
20214
|
exports.default = Pagebuilder;
|
20216
20215
|
exports.materials = _materials_;
|