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.cjs +9 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +9 -8
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/index.js +8 -7
- package/lib/core/components/SxpPageRender/index.js +8 -7
- package/package.json +1 -1
@@ -23,7 +23,7 @@ import Tagbar from './Tagbar';
|
|
23
23
|
import { getFeUserId, getSlideSkipState } from '../../../core/utils/localStore';
|
24
24
|
import { isEqual } from 'lodash';
|
25
25
|
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
|
26
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
26
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
27
27
|
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
|
28
28
|
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
|
29
29
|
const { schema } = useEditor();
|
@@ -176,10 +176,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
176
176
|
minusHeight += 56;
|
177
177
|
}
|
178
178
|
return minusHeight;
|
179
|
-
}, []);
|
179
|
+
}, [globalConfig]);
|
180
180
|
const height = useMemo(() => {
|
181
181
|
return containerHeight - minusHeight - tagHeight;
|
182
|
-
}, [
|
182
|
+
}, [minusHeight, containerHeight, tagHeight]);
|
183
183
|
const visList = useMemo(() => {
|
184
184
|
var _a;
|
185
185
|
const list = activeIndex === 0 && !waterFallData && !isEditor
|
@@ -513,14 +513,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
513
513
|
((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _f === void 0 ? void 0 : _f.enable) && (React.createElement("button", { style: {
|
514
514
|
position: 'absolute',
|
515
515
|
[(_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,
|
516
|
-
[(_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']: (
|
516
|
+
[(_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) +
|
517
|
+
((_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),
|
517
518
|
zIndex: 8,
|
518
519
|
border: 'none',
|
519
520
|
padding: 0,
|
520
521
|
background: 'transparent'
|
521
522
|
}, role: 'button', "aria-label": 'back button', onClick: () => history === null || history === void 0 ? void 0 : history.back() },
|
522
|
-
React.createElement("img", { src: (
|
523
|
-
isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((
|
523
|
+
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 : left, alt: 'back button', width: 50, style: { objectFit: 'cover' } }))),
|
524
|
+
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,
|
524
525
|
React.createElement(Swiper, { style: {
|
525
526
|
marginTop: tagHeight
|
526
527
|
}, ref: swiperRef, onSlideChange: () => {
|
@@ -551,6 +552,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
551
552
|
renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
|
552
553
|
renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
553
554
|
renderView),
|
554
|
-
React.createElement(WaterFall, Object.assign({}, (
|
555
|
+
React.createElement(WaterFall, 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))));
|
555
556
|
};
|
556
557
|
export default SxpPageRender;
|
@@ -26,7 +26,7 @@ const Tagbar_1 = tslib_1.__importDefault(require("./Tagbar"));
|
|
26
26
|
const localStore_1 = require("../../../core/utils/localStore");
|
27
27
|
const lodash_1 = require("lodash");
|
28
28
|
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
|
29
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
29
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
30
30
|
const mutedIcon = (0, useIconLink_1.useIconLink)('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
|
31
31
|
const unmutedIcon = (0, useIconLink_1.useIconLink)('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
|
32
32
|
const { schema } = (0, hooks_1.useEditor)();
|
@@ -179,10 +179,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
179
179
|
minusHeight += 56;
|
180
180
|
}
|
181
181
|
return minusHeight;
|
182
|
-
}, []);
|
182
|
+
}, [globalConfig]);
|
183
183
|
const height = (0, react_1.useMemo)(() => {
|
184
184
|
return containerHeight - minusHeight - tagHeight;
|
185
|
-
}, [
|
185
|
+
}, [minusHeight, containerHeight, tagHeight]);
|
186
186
|
const visList = (0, react_1.useMemo)(() => {
|
187
187
|
var _a;
|
188
188
|
const list = activeIndex === 0 && !waterFallData && !isEditor
|
@@ -516,14 +516,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
516
516
|
((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _f === void 0 ? void 0 : _f.enable) && (react_1.default.createElement("button", { style: {
|
517
517
|
position: 'absolute',
|
518
518
|
[(_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,
|
519
|
-
[(_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']: (
|
519
|
+
[(_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) +
|
520
|
+
((_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),
|
520
521
|
zIndex: 8,
|
521
522
|
border: 'none',
|
522
523
|
padding: 0,
|
523
524
|
background: 'transparent'
|
524
525
|
}, role: 'button', "aria-label": 'back button', onClick: () => history === null || history === void 0 ? void 0 : history.back() },
|
525
|
-
react_1.default.createElement("img", { src: (
|
526
|
-
isShowFingerTip ? (react_1.default.createElement(FingerSwipeTip_1.default, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((
|
526
|
+
react_1.default.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 : left_png_1.default, alt: 'back button', width: 50, style: { objectFit: 'cover' } }))),
|
527
|
+
isShowFingerTip ? (react_1.default.createElement(FingerSwipeTip_1.default, { 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,
|
527
528
|
react_1.default.createElement(react_2.Swiper, { style: {
|
528
529
|
marginTop: tagHeight
|
529
530
|
}, ref: swiperRef, onSlideChange: () => {
|
@@ -554,6 +555,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
554
555
|
renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
|
555
556
|
renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
556
557
|
renderView),
|
557
|
-
react_1.default.createElement(WaterFall_1.default, Object.assign({}, (
|
558
|
+
react_1.default.createElement(WaterFall_1.default, 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))));
|
558
559
|
};
|
559
560
|
exports.default = SxpPageRender;
|