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.js CHANGED
@@ -764,9 +764,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
764
764
  }
765
765
  else if (utmVal) {
766
766
  const val = (_k = (_j = (_h = splitUrlParams(utmVal)) === null || _h === void 0 ? void 0 : _h.filter((val) => {
767
- var _a, _b;
768
767
  const key = val.split('=')[0];
769
- 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);
768
+ return key;
770
769
  })) === null || _j === void 0 ? void 0 : _j.join('&')) !== null && _k !== void 0 ? _k : '';
771
770
  if (val)
772
771
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
@@ -807,7 +806,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
807
806
  if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
808
807
  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 });
809
808
  }
810
- const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', { method: 'POST', body: query }));
809
+ const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct', { method: 'POST', body: query }));
811
810
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
812
811
  return undefined;
813
812
  }
@@ -1084,6 +1083,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
1084
1083
  if (!isShowConsent)
1085
1084
  h5EnterLink();
1086
1085
  }, [isShowConsent]);
1086
+ console.log(data, '111');
1087
1087
  useEffect(() => {
1088
1088
  if (isShowConsent || isPreview)
1089
1089
  return;
@@ -19064,7 +19064,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19064
19064
  React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig }),
19065
19065
  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 } })))))));
19066
19066
  };
19067
- var SxpPageRender$1 = memo(SxpPageRender);
19067
+ var index$2 = memo(SxpPageRender);
19068
19068
 
19069
19069
  const PictureGroup$2 = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
19070
19070
  return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
@@ -19428,7 +19428,7 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
19428
19428
  return renderView(rec, index);
19429
19429
  })));
19430
19430
  };
19431
- var index$2 = memo(DiyPortalPreview);
19431
+ var index$1 = memo(DiyPortalPreview);
19432
19432
 
19433
19433
  const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index, swiperRef, data = [], loopPlay }) => {
19434
19434
  const { isActive } = useSwiperSlide();
@@ -19669,16 +19669,10 @@ var VideoWidget$1 = memo(VideoWidget);
19669
19669
  * @Author: binruan@chatlabs.com
19670
19670
  * @Date: 2025-03-25 13:54:27
19671
19671
  * @LastEditors: binruan@chatlabs.com
19672
- * @LastEditTime: 2025-03-26 22:40:52
19672
+ * @LastEditTime: 2025-03-27 17:20:34
19673
19673
  * @FilePath: \pb-sxp-ui\src\core\components\DiyStoryPreview\index.tsx
19674
19674
  *
19675
19675
  */
19676
- const RESOLVER$1 = {};
19677
- Object.values(_materials_).forEach((v) => {
19678
- RESOLVER$1[v.extend.type] = v;
19679
- });
19680
- const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
19681
- const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
19682
19676
  const recData = {
19683
19677
  position: 0,
19684
19678
  isCollected: false,
@@ -19857,7 +19851,14 @@ const recData = {
19857
19851
  ]
19858
19852
  }
19859
19853
  };
19860
- const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain, tagList = [], scenes, onActiveChange, activeIndex, loopPlay = false }) => {
19854
+ const RESOLVER$1 = {};
19855
+ Object.values(_materials_).forEach((v) => {
19856
+ RESOLVER$1[v.extend.type] = v;
19857
+ });
19858
+ const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
19859
+ const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
19860
+ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain, tagList = [], scenes, onActiveChange, activeIndex, loopPlay = false, pointerEvents = 'none' }) => {
19861
+ const [loopPlaySwiper, setLooPlaySwiper] = useState(loopPlay);
19861
19862
  const swiperRef = useRef(null);
19862
19863
  useMemo(() => {
19863
19864
  let minusHeight = 0;
@@ -19883,10 +19884,10 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
19883
19884
  const renderContent = (rec, index) => {
19884
19885
  const isVideo = isVideoUrl(rec === null || rec === void 0 ? void 0 : rec.mediaUrl);
19885
19886
  if (isVideo) {
19886
- 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: loopPlay }));
19887
+ 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 }));
19887
19888
  }
19888
19889
  else {
19889
- 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: loopPlay }));
19890
+ 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 }));
19890
19891
  }
19891
19892
  };
19892
19893
  useMemo(() => {
@@ -19919,7 +19920,7 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
19919
19920
  width: '100%',
19920
19921
  willChange: 'transform',
19921
19922
  zIndex: 2,
19922
- pointerEvents: 'none'
19923
+ pointerEvents
19923
19924
  } })),
19924
19925
  React.createElement("div", { style: {
19925
19926
  marginBottom: `${(_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _g !== void 0 ? _g : 40}px`,
@@ -20031,15 +20032,21 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
20031
20032
  }, [loopPlay]);
20032
20033
  return (React.createElement("div", { id: 'sxp-render',
20033
20034
  // className={style['clc-sxp-container']}
20034
- style: { height: containerHeight, position: 'relative', pointerEvents: 'none' } },
20035
- React.createElement(Swiper, { ref: swiperRef, allowTouchMove: false, onActiveIndexChange: (swiper) => {
20035
+ style: { height: containerHeight, position: 'relative', pointerEvents } },
20036
+ React.createElement(Swiper, { ref: swiperRef, allowTouchMove: pointerEvents !== 'none', onSlideChange: () => {
20037
+ setLooPlaySwiper(false);
20038
+ swiperRef.current.swiper.allowTouchMove = false;
20039
+ setTimeout(() => {
20040
+ swiperRef.current.swiper.allowTouchMove = true;
20041
+ }, 500);
20042
+ }, onActiveIndexChange: (swiper) => {
20036
20043
  // setActiveIndex(swiper.activeIndex);
20037
20044
  onActiveChange === null || onActiveChange === void 0 ? void 0 : onActiveChange(swiper.activeIndex);
20038
20045
  }, direction: 'vertical', style: { overflow: 'hidden', height: containerHeight }, height: containerHeight }, scenes === null || scenes === void 0 ? void 0 : scenes.map((rec, index) => {
20039
20046
  return renderView(rec, index);
20040
20047
  }))));
20041
20048
  };
20042
- var index$1 = memo(DiyStoryPreview);
20049
+ var DiyStoryPreview$1 = memo(DiyStoryPreview);
20043
20050
 
20044
20051
  /*
20045
20052
  * @Author: binruan@chatlabs.com
@@ -20137,17 +20144,9 @@ const Popup = () => {
20137
20144
 
20138
20145
  /*
20139
20146
  * @Author: binruan@chatlabs.com
20140
- * @Date: 2024-01-15 19:03:09
20141
- * @LastEditors: binruan@chatlabs.com
20142
- * @LastEditTime: 2025-02-24 15:47:44
20143
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
20144
- *
20145
- */
20146
- /*
20147
- * @Author: binruan@chatlabs.com
20148
- * @Date: 2023-11-24 15:58:00
20147
+ * @Date: 2024-03-20 10:27:31
20149
20148
  * @LastEditors: binruan@chatlabs.com
20150
- * @LastEditTime: 2023-12-26 10:24:42
20149
+ * @LastEditTime: 2025-03-27 17:17:56
20151
20150
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
20152
20151
  *
20153
20152
  */
@@ -20155,7 +20154,7 @@ const RESOLVER = {};
20155
20154
  Object.values(_materials_).forEach((v) => {
20156
20155
  RESOLVER[v.extend.type] = v;
20157
20156
  });
20158
- const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList }) => {
20157
+ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList, pointerEvents }) => {
20159
20158
  var _a, _b, _c, _d, _e, _f;
20160
20159
  const utmVal = useMemo(() => {
20161
20160
  var _a;
@@ -20168,7 +20167,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
20168
20167
  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 }) => {
20169
20168
  var _a;
20170
20169
  return (React.createElement(React.Fragment, null,
20171
- React.createElement(SxpPageRender$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, data: rtcList, resolver: RESOLVER })),
20170
+ 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 })),
20172
20171
  React.createElement(Popup, null)));
20173
20172
  } })));
20174
20173
  };
@@ -20182,5 +20181,5 @@ var index = memo(SxpPageCore);
20182
20181
  * @FilePath: \pb-sxp-ui\src\index.ts
20183
20182
  */
20184
20183
 
20185
- export { index$2 as DiyPortalPreview, index$1 as DiyStoryPreview, EditorDataProvider, Modal$1 as Modal, SxpDataSourceProvider$1 as SxpDataSourceProvider, index as SxpPageCore, SxpPageRender$1 as SxpPageRender, index$3 as core, Pagebuilder as default, _materials_ as materials, useEditorDataProvider };
20184
+ export { index$1 as DiyPortalPreview, DiyStoryPreview$1 as DiyStoryPreview, EditorDataProvider, Modal$1 as Modal, SxpDataSourceProvider$1 as SxpDataSourceProvider, index as SxpPageCore, index$2 as SxpPageRender, index$3 as core, Pagebuilder as default, _materials_ as materials, useEditorDataProvider };
20186
20185
  //# sourceMappingURL=index.js.map