pb-sxp-ui 1.1.1 → 1.1.2

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
@@ -13639,23 +13639,23 @@ var ToggleButton$1 = React.memo(ToggleButton);
13639
13639
  * @Author: binruan@chatlabs.com
13640
13640
  * @Date: 2024-01-15 19:03:09
13641
13641
  * @LastEditors: binruan@chatlabs.com
13642
- * @LastEditTime: 2024-03-13 10:53:56
13642
+ * @LastEditTime: 2024-07-11 18:19:29
13643
13643
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FingerSwipeTip\index.tsx
13644
13644
  *
13645
13645
  */
13646
- const FingerSwipeTip = ({ imageUrl, style }) => {
13646
+ const FingerSwipeTip = ({ imageUrl, style, duration = 2000 }) => {
13647
13647
  const [show, setShow] = React.useState(true);
13648
13648
  useEditor();
13649
13649
  React.useEffect(() => {
13650
13650
  setTimeout(() => {
13651
13651
  setShow(false);
13652
- }, 2000);
13652
+ }, duration);
13653
13653
  }, []);
13654
13654
  const FINGER_SWIPE_ICON = useIconLink('/pb_static/finger-swipe-tip.29dc3a48a3c746c906ea..png');
13655
13655
  const animationCls = React.useMemo(() => {
13656
13656
  return show ? 'pb-fadeIn' : 'pb-fadeOut';
13657
13657
  }, [show]);
13658
- return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
13658
+ return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: Object.assign(Object.assign({}, style), { animationDuration: `${duration / 1000}s` }) },
13659
13659
  React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON, alt: 'finger swiper' })));
13660
13660
  };
13661
13661
 
@@ -14382,7 +14382,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
14382
14382
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
14383
14383
  top: minusHeight
14384
14384
  } }),
14385
- isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` } })) : null,
14385
+ isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
14386
14386
  React.createElement(Swiper, { style: {
14387
14387
  marginTop: tagHeight
14388
14388
  }, ref: swiperRef, onSlideChange: () => {
@@ -14941,3 +14941,4 @@ exports.core = index$2;
14941
14941
  exports.default = Pagebuilder;
14942
14942
  exports.materials = _materials_;
14943
14943
  exports.useEditorDataProvider = useEditorDataProvider;
14944
+ //# sourceMappingURL=index.cjs.map