pb-sxp-ui 1.6.2 → 1.6.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
@@ -16295,12 +16295,12 @@ var Tagbar$1 = memo(Tagbar);
16295
16295
  * @Author: binruan@chatlabs.com
16296
16296
  * @Date: 2024-01-15 19:03:09
16297
16297
  * @LastEditors: binruan@chatlabs.com
16298
- * @LastEditTime: 2024-10-12 18:38:11
16298
+ * @LastEditTime: 2024-10-15 14:37:11
16299
16299
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
16300
16300
  *
16301
16301
  */
16302
16302
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
16303
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
16303
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
16304
16304
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
16305
16305
  const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
16306
16306
  const { schema } = useEditor();
@@ -16456,10 +16456,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16456
16456
  minusHeight += 56;
16457
16457
  }
16458
16458
  return minusHeight;
16459
- }, []);
16459
+ }, [globalConfig]);
16460
16460
  const height = useMemo(() => {
16461
16461
  return containerHeight - minusHeight - tagHeight;
16462
- }, [globalConfig, containerHeight, tagHeight]);
16462
+ }, [minusHeight, containerHeight, tagHeight]);
16463
16463
  const visList = useMemo(() => {
16464
16464
  var _a;
16465
16465
  const list = activeIndex === 0 && !waterFallData && !isEditor
@@ -16796,14 +16796,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16796
16796
  ((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _f === void 0 ? void 0 : _f.enable) && (React.createElement("button", { style: {
16797
16797
  position: 'absolute',
16798
16798
  [(_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _g === void 0 ? void 0 : _g.xPosit) !== null && _h !== void 0 ? _h : 'left']: (_k = (_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _j === void 0 ? void 0 : _j.x) !== null && _k !== void 0 ? _k : 0,
16799
- [(_m = (_l = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _l === void 0 ? void 0 : _l.yPosit) !== null && _m !== void 0 ? _m : 'top']: (_p = (_o = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _o === void 0 ? void 0 : _o.y) !== null && _p !== void 0 ? _p : 0,
16799
+ [(_m = (_l = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _l === void 0 ? void 0 : _l.yPosit) !== null && _m !== void 0 ? _m : 'top']: (((_o = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _o === void 0 ? void 0 : _o.yPosit) == 'top' ? minusHeight + tagHeight : 0) +
16800
+ ((_q = (_p = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _p === void 0 ? void 0 : _p.y) !== null && _q !== void 0 ? _q : 0),
16800
16801
  zIndex: 8,
16801
16802
  border: 'none',
16802
16803
  padding: 0,
16803
16804
  background: 'transparent'
16804
16805
  }, role: 'button', "aria-label": 'back button', onClick: () => history === null || history === void 0 ? void 0 : history.back() },
16805
- React.createElement("img", { src: (_r = (_q = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _q === void 0 ? void 0 : _q.icon) !== null && _r !== void 0 ? _r : img, alt: 'back button', width: 50, style: { objectFit: 'cover' } }))),
16806
- isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_s = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _s !== void 0 ? _s : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
16806
+ React.createElement("img", { src: (_s = (_r = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _r === void 0 ? void 0 : _r.icon) !== null && _s !== void 0 ? _s : img, alt: 'back button', width: 50, style: { objectFit: 'cover' } }))),
16807
+ isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _t !== void 0 ? _t : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
16807
16808
  React.createElement(Swiper, { style: {
16808
16809
  marginTop: tagHeight
16809
16810
  }, ref: swiperRef, onSlideChange: () => {
@@ -16835,7 +16836,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16835
16836
  renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
16836
16837
  renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
16837
16838
  renderView),
16838
- React.createElement(WaterFall$1, Object.assign({}, (_v = (_u = (_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _t === void 0 ? void 0 : _t[0]) === null || _u === void 0 ? void 0 : _u.item) === null || _v === void 0 ? void 0 : _v.props))));
16839
+ React.createElement(WaterFall$1, Object.assign({}, (_w = (_v = (_u = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _u === void 0 ? void 0 : _u[0]) === null || _v === void 0 ? void 0 : _v.item) === null || _w === void 0 ? void 0 : _w.props))));
16839
16840
  };
16840
16841
 
16841
16842
  const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {