pb-sxp-ui 1.0.9 → 1.0.10

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 CHANGED
@@ -12473,8 +12473,16 @@ const RenderCard = ({ rec, index, tempMap, resolver }) => {
12473
12473
  };
12474
12474
  var RenderCard$1 = React.memo(RenderCard);
12475
12475
 
12476
+ /*
12477
+ * @Author: binruan@chatlabs.com
12478
+ * @Date: 2024-03-26 10:07:41
12479
+ * @LastEditors: binruan@chatlabs.com
12480
+ * @LastEditTime: 2024-04-15 14:27:18
12481
+ * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Nudge\index.tsx
12482
+ *
12483
+ */
12476
12484
  const Nudge = ({ nudge }) => {
12477
- return (React.createElement("div", { hidden: !(nudge === null || nudge === void 0 ? void 0 : nudge.isOpen), className: 'clc-sxp-bottom-nudge', style: {
12485
+ return (React.createElement(React.Fragment, null, (nudge === null || nudge === void 0 ? void 0 : nudge.isOpen) && (React.createElement("div", { className: 'clc-sxp-bottom-nudge', style: {
12478
12486
  marginBottom: nudge === null || nudge === void 0 ? void 0 : nudge.marginBottom,
12479
12487
  width: nudge === null || nudge === void 0 ? void 0 : nudge.size.width,
12480
12488
  height: nudge === null || nudge === void 0 ? void 0 : nudge.size.height,
@@ -12482,7 +12490,7 @@ const Nudge = ({ nudge }) => {
12482
12490
  borderRadius: nudge === null || nudge === void 0 ? void 0 : nudge.borderRadius
12483
12491
  } },
12484
12492
  (nudge === null || nudge === void 0 ? void 0 : nudge.icon) ? React.createElement("img", { src: nudge.icon, style: { height: '100%', objectFit: 'cover' } }) : null,
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)));
12493
+ React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, nudge === null || nudge === void 0 ? void 0 : nudge.content)))));
12486
12494
  };
12487
12495
 
12488
12496
  /*
@@ -12674,11 +12682,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12674
12682
  React.createElement(Nudge, { nudge: nudge }),
12675
12683
  React.createElement("div", { className: 'clc-sxp-bottom-card' },
12676
12684
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
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: descStyle }),
12685
+ 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' }) }),
12678
12686
  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 }))));
12679
12687
  }
12680
12688
  return null;
12681
- }, [descStyle, activeIndex, tempMap, resolver, tipText, nudge, hashTagStyle]);
12689
+ }, [descStyle, activeIndex, tempMap, resolver, tipText, nudge, hashTagStyle, globalConfig]);
12682
12690
  const renderLikeButton = React.useCallback((rec, index) => {
12683
12691
  var _a, _b;
12684
12692
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))