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 +6 -5
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -0
- package/dist/index.min.cjs +2 -1
- package/dist/index.min.cjs.map +1 -0
- package/dist/index.min.js +2 -1
- package/dist/index.min.js.map +1 -0
- package/dist/pb-ui.js +6 -5
- package/dist/pb-ui.js.map +1 -0
- package/dist/pb-ui.min.js +2 -1
- package/dist/pb-ui.min.js.map +1 -0
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +1 -0
- package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
- package/es/core/components/SxpPageRender/VideoWidget/index.js +6 -2
- package/es/core/components/SxpPageRender/index.d.ts +1 -0
- package/es/core/components/SxpPageRender/index.js +1 -1
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +1 -0
- package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +6 -2
- package/lib/core/components/SxpPageRender/index.d.ts +1 -0
- package/lib/core/components/SxpPageRender/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -13617,23 +13617,23 @@ var ToggleButton$1 = memo(ToggleButton);
|
|
13617
13617
|
* @Author: binruan@chatlabs.com
|
13618
13618
|
* @Date: 2024-01-15 19:03:09
|
13619
13619
|
* @LastEditors: binruan@chatlabs.com
|
13620
|
-
* @LastEditTime: 2024-
|
13620
|
+
* @LastEditTime: 2024-07-11 18:19:29
|
13621
13621
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FingerSwipeTip\index.tsx
|
13622
13622
|
*
|
13623
13623
|
*/
|
13624
|
-
const FingerSwipeTip = ({ imageUrl, style }) => {
|
13624
|
+
const FingerSwipeTip = ({ imageUrl, style, duration = 2000 }) => {
|
13625
13625
|
const [show, setShow] = useState(true);
|
13626
13626
|
useEditor();
|
13627
13627
|
useEffect(() => {
|
13628
13628
|
setTimeout(() => {
|
13629
13629
|
setShow(false);
|
13630
|
-
},
|
13630
|
+
}, duration);
|
13631
13631
|
}, []);
|
13632
13632
|
const FINGER_SWIPE_ICON = useIconLink('/pb_static/finger-swipe-tip.29dc3a48a3c746c906ea..png');
|
13633
13633
|
const animationCls = useMemo(() => {
|
13634
13634
|
return show ? 'pb-fadeIn' : 'pb-fadeOut';
|
13635
13635
|
}, [show]);
|
13636
|
-
return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
|
13636
|
+
return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: Object.assign(Object.assign({}, style), { animationDuration: `${duration / 1000}s` }) },
|
13637
13637
|
React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON, alt: 'finger swiper' })));
|
13638
13638
|
};
|
13639
13639
|
|
@@ -14360,7 +14360,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
14360
14360
|
React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
|
14361
14361
|
top: minusHeight
|
14362
14362
|
} }),
|
14363
|
-
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,
|
14363
|
+
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,
|
14364
14364
|
React.createElement(Swiper, { style: {
|
14365
14365
|
marginTop: tagHeight
|
14366
14366
|
}, ref: swiperRef, onSlideChange: () => {
|
@@ -14910,3 +14910,4 @@ function useEditorDataProvider() {
|
|
14910
14910
|
*/
|
14911
14911
|
|
14912
14912
|
export { index$1 as DiyPortalPreview, EditorDataProvider, Modal$1 as Modal, SxpDataSourceProvider$1 as SxpDataSourceProvider, index as SxpPageCore, SxpPageRender, index$2 as core, Pagebuilder as default, _materials_ as materials, useEditorDataProvider };
|
14913
|
+
//# sourceMappingURL=index.js.map
|