pb-sxp-ui 1.0.9 → 1.0.11

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
@@ -11692,7 +11692,7 @@ Made in Italy` })));
11692
11692
  * @Author: binruan@chatlabs.com
11693
11693
  * @Date: 2024-01-10 10:58:24
11694
11694
  * @LastEditors: binruan@chatlabs.com
11695
- * @LastEditTime: 2024-04-15 09:58:50
11695
+ * @LastEditTime: 2024-04-15 16:48:54
11696
11696
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
11697
11697
  *
11698
11698
  */
@@ -11719,7 +11719,7 @@ Made in Italy` })));
11719
11719
  if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
11720
11720
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
11721
11721
  }
11722
- reportTagsView(0);
11722
+ reportTagsView(cacheActiveIndex || 0);
11723
11723
  setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
11724
11724
  setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
11725
11725
  setTimeout(() => {
@@ -12465,8 +12465,16 @@ Made in Italy` })));
12465
12465
  };
12466
12466
  var RenderCard$1 = React.memo(RenderCard);
12467
12467
 
12468
+ /*
12469
+ * @Author: binruan@chatlabs.com
12470
+ * @Date: 2024-03-26 10:07:41
12471
+ * @LastEditors: binruan@chatlabs.com
12472
+ * @LastEditTime: 2024-04-15 14:27:18
12473
+ * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Nudge\index.tsx
12474
+ *
12475
+ */
12468
12476
  const Nudge = ({ nudge }) => {
12469
- return (React.createElement("div", { hidden: !(nudge === null || nudge === void 0 ? void 0 : nudge.isOpen), className: 'clc-sxp-bottom-nudge', style: {
12477
+ return (React.createElement(React.Fragment, null, (nudge === null || nudge === void 0 ? void 0 : nudge.isOpen) && (React.createElement("div", { className: 'clc-sxp-bottom-nudge', style: {
12470
12478
  marginBottom: nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom,
12471
12479
  width: nudge === null || nudge === void 0 ? void 0 : nudge.size.width,
12472
12480
  height: nudge === null || nudge === void 0 ? void 0 : nudge.size.height,
@@ -12474,14 +12482,14 @@ Made in Italy` })));
12474
12482
  borderRadius: nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius
12475
12483
  } },
12476
12484
  (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
12477
- React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)));
12485
+ React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)))));
12478
12486
  };
12479
12487
 
12480
12488
  /*
12481
12489
  * @Author: binruan@chatlabs.com
12482
12490
  * @Date: 2024-01-15 19:03:09
12483
12491
  * @LastEditors: binruan@chatlabs.com
12484
- * @LastEditTime: 2024-04-11 18:45:44
12492
+ * @LastEditTime: 2024-04-15 16:41:07
12485
12493
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12486
12494
  *
12487
12495
  */
@@ -12647,12 +12655,12 @@ Made in Italy` })));
12647
12655
  return (React.createElement(PictureGroup$1, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent }));
12648
12656
  }
12649
12657
  if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
12650
- return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, index) => {
12658
+ return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, idx) => {
12651
12659
  var _a, _b, _c, _d, _e, _f, _g, _h;
12652
12660
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
12653
12661
  const Component = withBindDataSource(t);
12654
12662
  const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
12655
- return (React.createElement(Component, Object.assign({ key: index, textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.textStyle), bindDatas: (_e = (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.bindDatas) !== null && _e !== void 0 ? _e : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.props, { event: ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.style), { height: '100%', overflow: 'auto' }), index: index })));
12663
+ return (React.createElement(Component, Object.assign({ key: `${index}${idx}`, textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.textStyle), bindDatas: (_e = (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.bindDatas) !== null && _e !== void 0 ? _e : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.props, { event: ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.style), { height: '100%', overflow: 'auto' }), index: index })));
12656
12664
  });
12657
12665
  }
12658
12666
  return null;
@@ -12666,11 +12674,11 @@ Made in Italy` })));
12666
12674
  React.createElement(Nudge, { nudge: nudge }),
12667
12675
  React.createElement("div", { className: 'clc-sxp-bottom-card' },
12668
12676
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
12669
- React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: descStyle }),
12677
+ React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) }),
12670
12678
  React.createElement(Hashtag$1, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.url) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
12671
12679
  }
12672
12680
  return null;
12673
- }, [descStyle, activeIndex, tempMap, resolver, tipText, nudge, hashTagStyle]);
12681
+ }, [descStyle, activeIndex, tempMap, resolver, tipText, nudge, hashTagStyle, globalConfig]);
12674
12682
  const renderLikeButton = React.useCallback((rec, index) => {
12675
12683
  var _a, _b;
12676
12684
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))