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/pb-ui.js CHANGED
@@ -779,9 +779,8 @@
779
779
  }
780
780
  else if (utmVal) {
781
781
  const val = (_k = (_j = (_h = splitUrlParams(utmVal)) === null || _h === void 0 ? void 0 : _h.filter((val) => {
782
- var _a, _b;
783
782
  const key = val.split('=')[0];
784
- 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);
783
+ return key;
785
784
  })) === null || _j === void 0 ? void 0 : _j.join('&')) !== null && _k !== void 0 ? _k : '';
786
785
  if (val)
787
786
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
@@ -822,7 +821,7 @@
822
821
  if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
823
822
  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 });
824
823
  }
825
- const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', { method: 'POST', body: query }));
824
+ const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct', { method: 'POST', body: query }));
826
825
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
827
826
  return undefined;
828
827
  }
@@ -1099,6 +1098,7 @@
1099
1098
  if (!isShowConsent)
1100
1099
  h5EnterLink();
1101
1100
  }, [isShowConsent]);
1101
+ console.log(data, '111');
1102
1102
  React.useEffect(() => {
1103
1103
  if (isShowConsent || isPreview)
1104
1104
  return;
@@ -19079,7 +19079,7 @@ Made in Italy` })));
19079
19079
  React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig }),
19080
19080
  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 } })))))));
19081
19081
  };
19082
- var SxpPageRender$1 = React.memo(SxpPageRender);
19082
+ var index$2 = React.memo(SxpPageRender);
19083
19083
 
19084
19084
  const PictureGroup$2 = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
19085
19085
  return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
@@ -19443,7 +19443,7 @@ Made in Italy` })));
19443
19443
  return renderView(rec, index);
19444
19444
  })));
19445
19445
  };
19446
- var index$2 = React.memo(DiyPortalPreview);
19446
+ var index$1 = React.memo(DiyPortalPreview);
19447
19447
 
19448
19448
  const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index, swiperRef, data = [], loopPlay }) => {
19449
19449
  const { isActive } = useSwiperSlide();
@@ -19684,16 +19684,10 @@ Made in Italy` })));
19684
19684
  * @Author: binruan@chatlabs.com
19685
19685
  * @Date: 2025-03-25 13:54:27
19686
19686
  * @LastEditors: binruan@chatlabs.com
19687
- * @LastEditTime: 2025-03-26 22:40:52
19687
+ * @LastEditTime: 2025-03-27 17:20:34
19688
19688
  * @FilePath: \pb-sxp-ui\src\core\components\DiyStoryPreview\index.tsx
19689
19689
  *
19690
19690
  */
19691
- const RESOLVER$1 = {};
19692
- Object.values(_materials_).forEach((v) => {
19693
- RESOLVER$1[v.extend.type] = v;
19694
- });
19695
- const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
19696
- const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
19697
19691
  const recData = {
19698
19692
  position: 0,
19699
19693
  isCollected: false,
@@ -19872,7 +19866,14 @@ Made in Italy` })));
19872
19866
  ]
19873
19867
  }
19874
19868
  };
19875
- const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain, tagList = [], scenes, onActiveChange, activeIndex, loopPlay = false }) => {
19869
+ const RESOLVER$1 = {};
19870
+ Object.values(_materials_).forEach((v) => {
19871
+ RESOLVER$1[v.extend.type] = v;
19872
+ });
19873
+ const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
19874
+ const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
19875
+ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain, tagList = [], scenes, onActiveChange, activeIndex, loopPlay = false, pointerEvents = 'none' }) => {
19876
+ const [loopPlaySwiper, setLooPlaySwiper] = React.useState(loopPlay);
19876
19877
  const swiperRef = React.useRef(null);
19877
19878
  React.useMemo(() => {
19878
19879
  let minusHeight = 0;
@@ -19898,10 +19899,10 @@ Made in Italy` })));
19898
19899
  const renderContent = (rec, index) => {
19899
19900
  const isVideo = isVideoUrl(rec === null || rec === void 0 ? void 0 : rec.mediaUrl);
19900
19901
  if (isVideo) {
19901
- 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 }));
19902
+ 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 }));
19902
19903
  }
19903
19904
  else {
19904
- 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 }));
19905
+ 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 }));
19905
19906
  }
19906
19907
  };
19907
19908
  React.useMemo(() => {
@@ -19934,7 +19935,7 @@ Made in Italy` })));
19934
19935
  width: '100%',
19935
19936
  willChange: 'transform',
19936
19937
  zIndex: 2,
19937
- pointerEvents: 'none'
19938
+ pointerEvents
19938
19939
  } })),
19939
19940
  React.createElement("div", { style: {
19940
19941
  marginBottom: `${(_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _g !== void 0 ? _g : 40}px`,
@@ -20046,15 +20047,21 @@ Made in Italy` })));
20046
20047
  }, [loopPlay]);
20047
20048
  return (React.createElement("div", { id: 'sxp-render',
20048
20049
  // className={style['clc-sxp-container']}
20049
- style: { height: containerHeight, position: 'relative', pointerEvents: 'none' } },
20050
- React.createElement(Swiper, { ref: swiperRef, allowTouchMove: false, onActiveIndexChange: (swiper) => {
20050
+ style: { height: containerHeight, position: 'relative', pointerEvents } },
20051
+ React.createElement(Swiper, { ref: swiperRef, allowTouchMove: pointerEvents !== 'none', onSlideChange: () => {
20052
+ setLooPlaySwiper(false);
20053
+ swiperRef.current.swiper.allowTouchMove = false;
20054
+ setTimeout(() => {
20055
+ swiperRef.current.swiper.allowTouchMove = true;
20056
+ }, 500);
20057
+ }, onActiveIndexChange: (swiper) => {
20051
20058
  // setActiveIndex(swiper.activeIndex);
20052
20059
  onActiveChange === null || onActiveChange === void 0 ? void 0 : onActiveChange(swiper.activeIndex);
20053
20060
  }, direction: 'vertical', style: { overflow: 'hidden', height: containerHeight }, height: containerHeight }, scenes === null || scenes === void 0 ? void 0 : scenes.map((rec, index) => {
20054
20061
  return renderView(rec, index);
20055
20062
  }))));
20056
20063
  };
20057
- var index$1 = React.memo(DiyStoryPreview);
20064
+ var DiyStoryPreview$1 = React.memo(DiyStoryPreview);
20058
20065
 
20059
20066
  /*
20060
20067
  * @Author: binruan@chatlabs.com
@@ -20152,17 +20159,9 @@ Made in Italy` })));
20152
20159
 
20153
20160
  /*
20154
20161
  * @Author: binruan@chatlabs.com
20155
- * @Date: 2024-01-15 19:03:09
20156
- * @LastEditors: binruan@chatlabs.com
20157
- * @LastEditTime: 2025-02-24 15:47:44
20158
- * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
20159
- *
20160
- */
20161
- /*
20162
- * @Author: binruan@chatlabs.com
20163
- * @Date: 2023-11-24 15:58:00
20162
+ * @Date: 2024-03-20 10:27:31
20164
20163
  * @LastEditors: binruan@chatlabs.com
20165
- * @LastEditTime: 2023-12-26 10:24:42
20164
+ * @LastEditTime: 2025-03-27 17:17:56
20166
20165
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
20167
20166
  *
20168
20167
  */
@@ -20170,7 +20169,7 @@ Made in Italy` })));
20170
20169
  Object.values(_materials_).forEach((v) => {
20171
20170
  RESOLVER[v.extend.type] = v;
20172
20171
  });
20173
- const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList }) => {
20172
+ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList, pointerEvents }) => {
20174
20173
  var _a, _b, _c, _d, _e, _f;
20175
20174
  const utmVal = React.useMemo(() => {
20176
20175
  var _a;
@@ -20183,7 +20182,7 @@ Made in Italy` })));
20183
20182
  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 }) => {
20184
20183
  var _a;
20185
20184
  return (React.createElement(React.Fragment, null,
20186
- 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 })),
20185
+ 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 })),
20187
20186
  React.createElement(Popup, null)));
20188
20187
  } })));
20189
20188
  };
@@ -20197,13 +20196,13 @@ Made in Italy` })));
20197
20196
  * @FilePath: \pb-sxp-ui\src\index.ts
20198
20197
  */
20199
20198
 
20200
- exports.DiyPortalPreview = index$2;
20201
- exports.DiyStoryPreview = index$1;
20199
+ exports.DiyPortalPreview = index$1;
20200
+ exports.DiyStoryPreview = DiyStoryPreview$1;
20202
20201
  exports.EditorDataProvider = EditorDataProvider;
20203
20202
  exports.Modal = Modal$1;
20204
20203
  exports.SxpDataSourceProvider = SxpDataSourceProvider$1;
20205
20204
  exports.SxpPageCore = index;
20206
- exports.SxpPageRender = SxpPageRender$1;
20205
+ exports.SxpPageRender = index$2;
20207
20206
  exports.core = index$3;
20208
20207
  exports.default = Pagebuilder;
20209
20208
  exports.materials = _materials_;