pb-sxp-ui 1.15.9 → 1.15.11
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 +88 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +88 -65
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +5 -5
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +5 -5
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +88 -65
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +5 -5
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/WaterFall/List.js +3 -3
- package/es/core/components/SxpPageRender/WaterFall/index.js +2 -2
- package/es/materials/sxp/HashTag/index.d.ts +2 -4
- package/es/materials/sxp/HashTag/material.js +2 -1
- package/es/materials/sxp/HashTag/settingRender.js +1 -1
- package/es/materials/sxp/consentPopup/Click/index.js +15 -3
- package/es/materials/sxp/consentPopup/Swipe/index.js +15 -3
- package/lib/core/components/SxpPageRender/WaterFall/List.js +3 -3
- package/lib/core/components/SxpPageRender/WaterFall/index.js +2 -2
- package/lib/materials/sxp/HashTag/index.d.ts +2 -4
- package/lib/materials/sxp/HashTag/material.js +2 -1
- package/lib/materials/sxp/HashTag/settingRender.js +1 -1
- package/lib/materials/sxp/consentPopup/Click/index.js +15 -3
- package/lib/materials/sxp/consentPopup/Swipe/index.js +15 -3
- package/package.json +1 -1
@@ -10,7 +10,7 @@ import { useEventReport } from '../../../../core/hooks/useEventReport';
|
|
10
10
|
import { getPriceText } from '../../../../core/utils/materials';
|
11
11
|
const WaterfallFlowItem = (props) => {
|
12
12
|
var _a;
|
13
|
-
const { rec, index, list, reportTagsView, textStyles, space, openFixedSize } = props;
|
13
|
+
const { rec, index, list, reportTagsView, textStyles, space, openFixedSize, fixedSizeRatio } = props;
|
14
14
|
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = useSxpDataSource();
|
15
15
|
const [showVideo, setShowVideo] = useState(false);
|
16
16
|
const imgDom = useRef(null);
|
@@ -104,11 +104,11 @@ const WaterfallFlowItem = (props) => {
|
|
104
104
|
}, 0);
|
105
105
|
};
|
106
106
|
return (React.createElement("div", { ref: ref, className: 'list-content-listItem', key: index, onClick: handleClickToDetail, style: { marginBottom: space } },
|
107
|
-
React.createElement("div", { className:
|
107
|
+
React.createElement("div", { className: fixedSizeRatio === '1' ? 'list-content-listItem-picture' : 'list-content-listItem-picture1609' },
|
108
108
|
showVideo && (React.createElement("div", { style: { display: 'none' } },
|
109
109
|
React.createElement("video", { ref: videoDom, crossOrigin: 'anonymous', className: 'list-content-listItem-picture-img' }),
|
110
110
|
React.createElement("canvas", { ref: canvasRef }))),
|
111
|
-
React.createElement(FormatImage, { loading: 'lazy', className:
|
111
|
+
React.createElement(FormatImage, { loading: 'lazy', className: fixedSizeRatio === '1' ? 'list-content-listItem-picture-img' : 'list-content-listItem-picture1609-img', ref: imgDom })),
|
112
112
|
React.createElement("div", { className: 'list-content-listItem-info' },
|
113
113
|
React.createElement("div", { className: `${'list-content-listItem-info-title'} ${priceText ? 'list-content-listItem-info-nowrap' : ''}`, style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.title, dangerouslySetInnerHTML: {
|
114
114
|
__html: setFontForText(title, textStyles === null || textStyles === void 0 ? void 0 : textStyles.title)
|
@@ -8,7 +8,7 @@ import List from './List';
|
|
8
8
|
import { useSxpDataSource } from '../../../../core/hooks';
|
9
9
|
import { useEventReport } from '../../../../core/hooks/useEventReport';
|
10
10
|
const WaterFall = (props) => {
|
11
|
-
var _a
|
11
|
+
var _a;
|
12
12
|
const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag, selectTag, bffFbReport } = useSxpDataSource();
|
13
13
|
const { backMainFeed } = useEventReport();
|
14
14
|
const modalEleRef = useRef(null);
|
@@ -97,6 +97,6 @@ const WaterFall = (props) => {
|
|
97
97
|
display: openHashtag ? 'block' : 'none'
|
98
98
|
} },
|
99
99
|
React.createElement(Navbar, { icon: left, styles: { top: '32px' }, textStyle: (_a = props === null || props === void 0 ? void 0 : props.textStyles) === null || _a === void 0 ? void 0 : _a.hashTagTitle, onClose: handleClose }),
|
100
|
-
(
|
100
|
+
(props === null || props === void 0 ? void 0 : props.openFixedSize) || (props === null || props === void 0 ? void 0 : props.openFixedSize) === undefined ? (React.createElement(List, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props))) : (React.createElement(WaterfallList, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props)))), modalEleRef.current);
|
101
101
|
};
|
102
102
|
export default memo(WaterFall);
|
@@ -14,10 +14,8 @@ export interface IHashTagProps {
|
|
14
14
|
};
|
15
15
|
buttonBgStyle: CSSProperties;
|
16
16
|
showBanner?: boolean;
|
17
|
-
openFixedSize?:
|
18
|
-
|
19
|
-
ratio: string;
|
20
|
-
};
|
17
|
+
openFixedSize?: boolean;
|
18
|
+
fixedSizeRatio?: '1' | '2';
|
21
19
|
}
|
22
20
|
declare const _default: React.NamedExoticComponent<IHashTagProps>;
|
23
21
|
export default _default;
|
@@ -6,9 +6,11 @@ import tel from './tel.png';
|
|
6
6
|
import { setFontForText } from '../../../../core/utils/tool';
|
7
7
|
import { useSxpDataSource } from '../../../../core/hooks';
|
8
8
|
import { getUserConsentResult, setUserConsentResult } from '../../../../core/utils/localStore';
|
9
|
+
import { useEditorDataProvider } from '../../../../core/context/EditorDataProvider';
|
9
10
|
const Click = (_a) => {
|
10
11
|
var { isTel, open, content, style, consentPopupCate, acceptButton, rejectButton, showRejectButton } = _a, props = __rest(_a, ["isTel", "open", "content", "style", "consentPopupCate", "acceptButton", "rejectButton", "showRejectButton"]);
|
11
12
|
const { getAccount, accountSonsent } = useSxpDataSource();
|
13
|
+
const { setConsentPopupCate } = useEditorDataProvider();
|
12
14
|
const [consentResult, setConsentResult] = useState(true);
|
13
15
|
const handleGetAccount = () => __awaiter(void 0, void 0, void 0, function* () {
|
14
16
|
const res = yield (getAccount === null || getAccount === void 0 ? void 0 : getAccount());
|
@@ -21,14 +23,24 @@ const Click = (_a) => {
|
|
21
23
|
!consentPopupCate && open && style && !getUserConsentResult() && handleGetAccount();
|
22
24
|
}, []);
|
23
25
|
const handleClickAccept = () => __awaiter(void 0, void 0, void 0, function* () {
|
24
|
-
|
25
|
-
|
26
|
+
if (consentPopupCate) {
|
27
|
+
setConsentPopupCate === null || setConsentPopupCate === void 0 ? void 0 : setConsentPopupCate('');
|
28
|
+
}
|
29
|
+
else {
|
30
|
+
const res = yield (accountSonsent === null || accountSonsent === void 0 ? void 0 : accountSonsent(true));
|
31
|
+
if (!res)
|
32
|
+
return;
|
26
33
|
setConsentResult(true);
|
27
34
|
setUserConsentResult();
|
28
35
|
}
|
29
36
|
});
|
30
37
|
const handleClickReject = () => {
|
31
|
-
|
38
|
+
if (consentPopupCate) {
|
39
|
+
setConsentPopupCate === null || setConsentPopupCate === void 0 ? void 0 : setConsentPopupCate('');
|
40
|
+
}
|
41
|
+
else {
|
42
|
+
history === null || history === void 0 ? void 0 : history.back();
|
43
|
+
}
|
32
44
|
};
|
33
45
|
return (React.createElement(React.Fragment, null, isTel ? (React.createElement("img", { src: tel, style: { objectFit: 'cover', width: '100%', height: '100%' } })) : (React.createElement(React.Fragment, null, visivle && (React.createElement("div", { className: 'consentPopupClick' },
|
34
46
|
React.createElement("div", { className: 'consentPopupClick-container', style: style },
|
@@ -5,11 +5,13 @@ import ConsentDetail from '../../popup/ConsentDetail';
|
|
5
5
|
import tel from './tel.png';
|
6
6
|
import { useSxpDataSource } from '../../../../core/hooks';
|
7
7
|
import { getUserConsentResult, setUserConsentResult } from '../../../../core/utils/localStore';
|
8
|
+
import { useEditorDataProvider } from '../../../../core/context/EditorDataProvider';
|
8
9
|
const Swipe = (_a) => {
|
9
10
|
var { isTel, open, content, style, consentPopupCate, swipeIcon } = _a, props = __rest(_a, ["isTel", "open", "content", "style", "consentPopupCate", "swipeIcon"]);
|
10
11
|
const touchInfo = useRef();
|
11
12
|
const threshold = 50;
|
12
13
|
const { getAccount, accountSonsent } = useSxpDataSource();
|
14
|
+
const { setConsentPopupCate } = useEditorDataProvider();
|
13
15
|
const [consentResult, setConsentResult] = useState(true);
|
14
16
|
const handleGetAccount = () => __awaiter(void 0, void 0, void 0, function* () {
|
15
17
|
const res = yield (getAccount === null || getAccount === void 0 ? void 0 : getAccount());
|
@@ -22,8 +24,13 @@ const Swipe = (_a) => {
|
|
22
24
|
!consentPopupCate && open && style && !getUserConsentResult() && handleGetAccount();
|
23
25
|
}, []);
|
24
26
|
const handleClickAccept = () => __awaiter(void 0, void 0, void 0, function* () {
|
25
|
-
|
26
|
-
|
27
|
+
if (consentPopupCate) {
|
28
|
+
setConsentPopupCate === null || setConsentPopupCate === void 0 ? void 0 : setConsentPopupCate('');
|
29
|
+
}
|
30
|
+
else {
|
31
|
+
const res = yield (accountSonsent === null || accountSonsent === void 0 ? void 0 : accountSonsent(true));
|
32
|
+
if (!res)
|
33
|
+
return;
|
27
34
|
setConsentResult(true);
|
28
35
|
setUserConsentResult();
|
29
36
|
}
|
@@ -50,7 +57,12 @@ const Swipe = (_a) => {
|
|
50
57
|
}
|
51
58
|
touchInfo.current = {};
|
52
59
|
};
|
53
|
-
|
60
|
+
const handleClick = () => {
|
61
|
+
if (consentPopupCate) {
|
62
|
+
setConsentPopupCate === null || setConsentPopupCate === void 0 ? void 0 : setConsentPopupCate('');
|
63
|
+
}
|
64
|
+
};
|
65
|
+
return (React.createElement(React.Fragment, null, isTel ? (React.createElement("img", { src: tel, style: { objectFit: 'cover', width: '100%', height: '100%' } })) : (React.createElement(React.Fragment, null, visivle && (React.createElement("div", { className: 'consentPopupSwipe', onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd, onClick: handleClick },
|
54
66
|
React.createElement("div", { className: 'consentPopupSwipe-container', style: style },
|
55
67
|
React.createElement("div", { className: 'consentPopupSwipe-container-content' },
|
56
68
|
React.createElement(ConsentDetail, { content: content, style: { padding: 0 } })),
|
@@ -12,7 +12,7 @@ const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
|
12
12
|
const materials_1 = require("../../../../core/utils/materials");
|
13
13
|
const WaterfallFlowItem = (props) => {
|
14
14
|
var _a;
|
15
|
-
const { rec, index, list, reportTagsView, textStyles, space, openFixedSize } = props;
|
15
|
+
const { rec, index, list, reportTagsView, textStyles, space, openFixedSize, fixedSizeRatio } = props;
|
16
16
|
const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = (0, hooks_1.useSxpDataSource)();
|
17
17
|
const [showVideo, setShowVideo] = (0, react_1.useState)(false);
|
18
18
|
const imgDom = (0, react_1.useRef)(null);
|
@@ -106,11 +106,11 @@ const WaterfallFlowItem = (props) => {
|
|
106
106
|
}, 0);
|
107
107
|
};
|
108
108
|
return (react_1.default.createElement("div", { ref: ref, className: 'list-content-listItem', key: index, onClick: handleClickToDetail, style: { marginBottom: space } },
|
109
|
-
react_1.default.createElement("div", { className:
|
109
|
+
react_1.default.createElement("div", { className: fixedSizeRatio === '1' ? 'list-content-listItem-picture' : 'list-content-listItem-picture1609' },
|
110
110
|
showVideo && (react_1.default.createElement("div", { style: { display: 'none' } },
|
111
111
|
react_1.default.createElement("video", { ref: videoDom, crossOrigin: 'anonymous', className: 'list-content-listItem-picture-img' }),
|
112
112
|
react_1.default.createElement("canvas", { ref: canvasRef }))),
|
113
|
-
react_1.default.createElement(FormatImage_1.default, { loading: 'lazy', className:
|
113
|
+
react_1.default.createElement(FormatImage_1.default, { loading: 'lazy', className: fixedSizeRatio === '1' ? 'list-content-listItem-picture-img' : 'list-content-listItem-picture1609-img', ref: imgDom })),
|
114
114
|
react_1.default.createElement("div", { className: 'list-content-listItem-info' },
|
115
115
|
react_1.default.createElement("div", { className: `${'list-content-listItem-info-title'} ${priceText ? 'list-content-listItem-info-nowrap' : ''}`, style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.title, dangerouslySetInnerHTML: {
|
116
116
|
__html: (0, tool_1.setFontForText)(title, textStyles === null || textStyles === void 0 ? void 0 : textStyles.title)
|
@@ -11,7 +11,7 @@ const List_1 = tslib_1.__importDefault(require("./List"));
|
|
11
11
|
const hooks_1 = require("../../../../core/hooks");
|
12
12
|
const useEventReport_1 = require("../../../../core/hooks/useEventReport");
|
13
13
|
const WaterFall = (props) => {
|
14
|
-
var _a
|
14
|
+
var _a;
|
15
15
|
const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag, selectTag, bffFbReport } = (0, hooks_1.useSxpDataSource)();
|
16
16
|
const { backMainFeed } = (0, useEventReport_1.useEventReport)();
|
17
17
|
const modalEleRef = (0, react_1.useRef)(null);
|
@@ -100,6 +100,6 @@ const WaterFall = (props) => {
|
|
100
100
|
display: openHashtag ? 'block' : 'none'
|
101
101
|
} },
|
102
102
|
react_1.default.createElement(Navbar_1.default, { icon: left_png_1.default, styles: { top: '32px' }, textStyle: (_a = props === null || props === void 0 ? void 0 : props.textStyles) === null || _a === void 0 ? void 0 : _a.hashTagTitle, onClose: handleClose }),
|
103
|
-
(
|
103
|
+
(props === null || props === void 0 ? void 0 : props.openFixedSize) || (props === null || props === void 0 ? void 0 : props.openFixedSize) === undefined ? (react_1.default.createElement(List_1.default, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props))) : (react_1.default.createElement(WaterfallList_1.default, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props)))), modalEleRef.current);
|
104
104
|
};
|
105
105
|
exports.default = (0, react_1.memo)(WaterFall);
|
@@ -14,10 +14,8 @@ export interface IHashTagProps {
|
|
14
14
|
};
|
15
15
|
buttonBgStyle: CSSProperties;
|
16
16
|
showBanner?: boolean;
|
17
|
-
openFixedSize?:
|
18
|
-
|
19
|
-
ratio: string;
|
20
|
-
};
|
17
|
+
openFixedSize?: boolean;
|
18
|
+
fixedSizeRatio?: '1' | '2';
|
21
19
|
}
|
22
20
|
declare const _default: React.NamedExoticComponent<IHashTagProps>;
|
23
21
|
export default _default;
|
@@ -8,9 +8,11 @@ const tel_png_1 = tslib_1.__importDefault(require("./tel.png"));
|
|
8
8
|
const tool_1 = require("../../../../core/utils/tool");
|
9
9
|
const hooks_1 = require("../../../../core/hooks");
|
10
10
|
const localStore_1 = require("../../../../core/utils/localStore");
|
11
|
+
const EditorDataProvider_1 = require("../../../../core/context/EditorDataProvider");
|
11
12
|
const Click = (_a) => {
|
12
13
|
var { isTel, open, content, style, consentPopupCate, acceptButton, rejectButton, showRejectButton } = _a, props = tslib_1.__rest(_a, ["isTel", "open", "content", "style", "consentPopupCate", "acceptButton", "rejectButton", "showRejectButton"]);
|
13
14
|
const { getAccount, accountSonsent } = (0, hooks_1.useSxpDataSource)();
|
15
|
+
const { setConsentPopupCate } = (0, EditorDataProvider_1.useEditorDataProvider)();
|
14
16
|
const [consentResult, setConsentResult] = (0, react_1.useState)(true);
|
15
17
|
const handleGetAccount = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
16
18
|
const res = yield (getAccount === null || getAccount === void 0 ? void 0 : getAccount());
|
@@ -23,14 +25,24 @@ const Click = (_a) => {
|
|
23
25
|
!consentPopupCate && open && style && !(0, localStore_1.getUserConsentResult)() && handleGetAccount();
|
24
26
|
}, []);
|
25
27
|
const handleClickAccept = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
26
|
-
|
27
|
-
|
28
|
+
if (consentPopupCate) {
|
29
|
+
setConsentPopupCate === null || setConsentPopupCate === void 0 ? void 0 : setConsentPopupCate('');
|
30
|
+
}
|
31
|
+
else {
|
32
|
+
const res = yield (accountSonsent === null || accountSonsent === void 0 ? void 0 : accountSonsent(true));
|
33
|
+
if (!res)
|
34
|
+
return;
|
28
35
|
setConsentResult(true);
|
29
36
|
(0, localStore_1.setUserConsentResult)();
|
30
37
|
}
|
31
38
|
});
|
32
39
|
const handleClickReject = () => {
|
33
|
-
|
40
|
+
if (consentPopupCate) {
|
41
|
+
setConsentPopupCate === null || setConsentPopupCate === void 0 ? void 0 : setConsentPopupCate('');
|
42
|
+
}
|
43
|
+
else {
|
44
|
+
history === null || history === void 0 ? void 0 : history.back();
|
45
|
+
}
|
34
46
|
};
|
35
47
|
return (react_1.default.createElement(react_1.default.Fragment, null, isTel ? (react_1.default.createElement("img", { src: tel_png_1.default, style: { objectFit: 'cover', width: '100%', height: '100%' } })) : (react_1.default.createElement(react_1.default.Fragment, null, visivle && (react_1.default.createElement("div", { className: 'consentPopupClick' },
|
36
48
|
react_1.default.createElement("div", { className: 'consentPopupClick-container', style: style },
|
@@ -7,11 +7,13 @@ const ConsentDetail_1 = tslib_1.__importDefault(require("../../popup/ConsentDeta
|
|
7
7
|
const tel_png_1 = tslib_1.__importDefault(require("./tel.png"));
|
8
8
|
const hooks_1 = require("../../../../core/hooks");
|
9
9
|
const localStore_1 = require("../../../../core/utils/localStore");
|
10
|
+
const EditorDataProvider_1 = require("../../../../core/context/EditorDataProvider");
|
10
11
|
const Swipe = (_a) => {
|
11
12
|
var { isTel, open, content, style, consentPopupCate, swipeIcon } = _a, props = tslib_1.__rest(_a, ["isTel", "open", "content", "style", "consentPopupCate", "swipeIcon"]);
|
12
13
|
const touchInfo = (0, react_1.useRef)();
|
13
14
|
const threshold = 50;
|
14
15
|
const { getAccount, accountSonsent } = (0, hooks_1.useSxpDataSource)();
|
16
|
+
const { setConsentPopupCate } = (0, EditorDataProvider_1.useEditorDataProvider)();
|
15
17
|
const [consentResult, setConsentResult] = (0, react_1.useState)(true);
|
16
18
|
const handleGetAccount = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
17
19
|
const res = yield (getAccount === null || getAccount === void 0 ? void 0 : getAccount());
|
@@ -24,8 +26,13 @@ const Swipe = (_a) => {
|
|
24
26
|
!consentPopupCate && open && style && !(0, localStore_1.getUserConsentResult)() && handleGetAccount();
|
25
27
|
}, []);
|
26
28
|
const handleClickAccept = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
27
|
-
|
28
|
-
|
29
|
+
if (consentPopupCate) {
|
30
|
+
setConsentPopupCate === null || setConsentPopupCate === void 0 ? void 0 : setConsentPopupCate('');
|
31
|
+
}
|
32
|
+
else {
|
33
|
+
const res = yield (accountSonsent === null || accountSonsent === void 0 ? void 0 : accountSonsent(true));
|
34
|
+
if (!res)
|
35
|
+
return;
|
29
36
|
setConsentResult(true);
|
30
37
|
(0, localStore_1.setUserConsentResult)();
|
31
38
|
}
|
@@ -52,7 +59,12 @@ const Swipe = (_a) => {
|
|
52
59
|
}
|
53
60
|
touchInfo.current = {};
|
54
61
|
};
|
55
|
-
|
62
|
+
const handleClick = () => {
|
63
|
+
if (consentPopupCate) {
|
64
|
+
setConsentPopupCate === null || setConsentPopupCate === void 0 ? void 0 : setConsentPopupCate('');
|
65
|
+
}
|
66
|
+
};
|
67
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, isTel ? (react_1.default.createElement("img", { src: tel_png_1.default, style: { objectFit: 'cover', width: '100%', height: '100%' } })) : (react_1.default.createElement(react_1.default.Fragment, null, visivle && (react_1.default.createElement("div", { className: 'consentPopupSwipe', onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd, onClick: handleClick },
|
56
68
|
react_1.default.createElement("div", { className: 'consentPopupSwipe-container', style: style },
|
57
69
|
react_1.default.createElement("div", { className: 'consentPopupSwipe-container-content' },
|
58
70
|
react_1.default.createElement(ConsentDetail_1.default, { content: content, style: { padding: 0 } })),
|