pb-sxp-ui 1.10.7 → 1.10.9
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 +11 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -32
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +4 -4
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +11 -32
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +4 -4
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
- package/es/core/components/SxpPageRender/WaterFall/index.js +1 -2
- package/es/core/context/SxpDataSourceProvider.js +3 -16
- package/es/materials/sxp/MultiPosts/settingRender.d.ts +4 -0
- package/es/materials/sxp/MultiPosts/settingRender.js +3 -2
- package/es/materials/sxp/template/components/EventProvider.js +1 -1
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
- package/lib/core/components/SxpPageRender/WaterFall/index.js +1 -2
- package/lib/core/context/SxpDataSourceProvider.js +3 -16
- package/lib/materials/sxp/MultiPosts/settingRender.d.ts +4 -0
- package/lib/materials/sxp/MultiPosts/settingRender.js +3 -2
- package/lib/materials/sxp/template/components/EventProvider.js +1 -1
- package/package.json +1 -1
@@ -85,7 +85,7 @@ const WaterfallFlowItem = (props) => {
|
|
85
85
|
const imgLoad = useCallback((img) => {
|
86
86
|
setTimeout(() => {
|
87
87
|
var _a;
|
88
|
-
const height = (_a = pictRef === null || pictRef === void 0 ? void 0 : pictRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight;
|
88
|
+
const height = (img === null || img === void 0 ? void 0 : img.clientHeight) || ((_a = pictRef === null || pictRef === void 0 ? void 0 : pictRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight);
|
89
89
|
sizeChange(height + 56 + space, index);
|
90
90
|
}, 0);
|
91
91
|
}, [space, sizeChange, index, unitWidth, pictRef]);
|
@@ -11,7 +11,6 @@ const WaterFall = (props) => {
|
|
11
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
|
-
const ref = useRef(null);
|
15
14
|
const modalEleRef = useRef(null);
|
16
15
|
const [viewTime, setViewTime] = useState();
|
17
16
|
useEffect(() => {
|
@@ -98,6 +97,6 @@ const WaterFall = (props) => {
|
|
98
97
|
display: openHashtag ? 'block' : 'none'
|
99
98
|
} },
|
100
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 }),
|
101
|
-
(props === null || props === void 0 ? void 0 : props.openFixedSize) === true || (props === null || props === void 0 ? void 0 : props.openFixedSize) === undefined ? (React.createElement(List, Object.assign({ reportTagsView: reportTagsView }, props))) : (React.createElement(WaterfallList, Object.assign({ reportTagsView: reportTagsView }, props)))), modalEleRef.current);
|
100
|
+
(props === null || props === void 0 ? void 0 : props.openFixedSize) === true || (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);
|
102
101
|
};
|
103
102
|
export default memo(WaterFall);
|
@@ -220,7 +220,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
220
220
|
userInfo = {};
|
221
221
|
}
|
222
222
|
const sessionID = storeAndLoadFeSessionId();
|
223
|
-
const ef = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, { playbookType }), eventInfo), (getDevice() && { sxpDevice: getDevice() })), (getSystem() && { sxpSystem: getSystem() })), (getBrowserInfo() && { sxpBrowser: getBrowserInfo() })), (
|
223
|
+
const ef = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, { playbookType }), (layoutVariantId && reportLayId && { layoutVariantId })), eventInfo), (getDevice() && { sxpDevice: getDevice() })), (getSystem() && { sxpSystem: getSystem() })), (getBrowserInfo() && { sxpBrowser: getBrowserInfo() })), ((eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.position) && channel && { position: Number(eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.position) + 1 + '' }));
|
224
224
|
const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
|
225
225
|
const realEventInfo = Object.entries(ef)
|
226
226
|
.map(([k, v]) => v && { name: k, value: v })
|
@@ -443,23 +443,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
443
443
|
const item = list === null || list === void 0 ? void 0 : list[0];
|
444
444
|
const traceInfo = ((_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.traceInfo) || ((_l = item === null || item === void 0 ? void 0 : item.product) === null || _l === void 0 ? void 0 : _l.traceInfo) || '';
|
445
445
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
446
|
-
eventInfo: {
|
447
|
-
eventSubject: 'multiPostClick',
|
448
|
-
eventDescription: 'multiPostClick',
|
449
|
-
traceInfo,
|
450
|
-
branchfeed: channel
|
451
|
-
}
|
446
|
+
eventInfo: Object.assign({ eventSubject: 'multiPostClick', eventDescription: 'multiPostClick', traceInfo, branchfeed: channel }, (layId && { layoutVariantId: layId }))
|
452
447
|
});
|
453
448
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
454
|
-
eventInfo: {
|
455
|
-
eventSubject: 'endMultiPost',
|
456
|
-
eventDescription: 'endMultiPost',
|
457
|
-
contentFormat: 'image',
|
458
|
-
position: '0',
|
459
|
-
traceInfo,
|
460
|
-
nextStep: 'multipostClick',
|
461
|
-
timeOnSite: Math.floor((new Date() - (multiPostTimeRef === null || multiPostTimeRef === void 0 ? void 0 : multiPostTimeRef.current)) / 1000) + ''
|
462
|
-
}
|
449
|
+
eventInfo: Object.assign({ eventSubject: 'endMultiPost', eventDescription: 'endMultiPost', contentFormat: 'image', position: '0', traceInfo, nextStep: 'multipostClick', timeOnSite: Math.floor((new Date() - (multiPostTimeRef === null || multiPostTimeRef === void 0 ? void 0 : multiPostTimeRef.current)) / 1000) + '' }, (layId && { layoutVariantId: layId }))
|
463
450
|
});
|
464
451
|
}
|
465
452
|
}
|
@@ -4,6 +4,7 @@ declare const _default: ({
|
|
4
4
|
label: string;
|
5
5
|
type: string;
|
6
6
|
name: string[];
|
7
|
+
text: string;
|
7
8
|
child?: undefined;
|
8
9
|
} | {
|
9
10
|
type: string;
|
@@ -18,6 +19,7 @@ declare const _default: ({
|
|
18
19
|
text: string;
|
19
20
|
})[];
|
20
21
|
name?: undefined;
|
22
|
+
text?: undefined;
|
21
23
|
} | {
|
22
24
|
type: string;
|
23
25
|
label: string;
|
@@ -38,6 +40,7 @@ declare const _default: ({
|
|
38
40
|
initialValue?: undefined;
|
39
41
|
})[];
|
40
42
|
name?: undefined;
|
43
|
+
text?: undefined;
|
41
44
|
} | {
|
42
45
|
type: string;
|
43
46
|
label: string;
|
@@ -58,6 +61,7 @@ declare const _default: ({
|
|
58
61
|
options?: undefined;
|
59
62
|
})[];
|
60
63
|
name?: undefined;
|
64
|
+
text?: undefined;
|
61
65
|
})[];
|
62
66
|
} | {
|
63
67
|
title: string;
|
@@ -5,7 +5,8 @@ export default [
|
|
5
5
|
{
|
6
6
|
label: '背景图',
|
7
7
|
type: 'Upload',
|
8
|
-
name: ['props', 'bgImgUrl']
|
8
|
+
name: ['props', 'bgImgUrl'],
|
9
|
+
text: '建议尺寸:720 * 1280'
|
9
10
|
},
|
10
11
|
{
|
11
12
|
type: 'Group',
|
@@ -78,7 +79,7 @@ export default [
|
|
78
79
|
]
|
79
80
|
},
|
80
81
|
{
|
81
|
-
title: '按钮设置',
|
82
|
+
title: '按钮设置 (建议尺寸:500 * 500)',
|
82
83
|
child: [
|
83
84
|
{
|
84
85
|
type: 'Group',
|
@@ -18,7 +18,7 @@ const EventProvider = (_a) => {
|
|
18
18
|
eventSubject: 'clickCta',
|
19
19
|
eventDescription: 'User clicked the CTA'
|
20
20
|
}, rec, item, index);
|
21
|
-
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(multItem && multiCheckIndex
|
21
|
+
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(multItem && multiCheckIndex !== undefined && multiCheckIndex >= 0
|
22
22
|
? Object.assign(Object.assign({}, rec), { video: Object.assign(Object.assign({}, rec === null || rec === void 0 ? void 0 : rec.video), { bindProduct: multItem }), index, multiCheckIndex }) : Object.assign(Object.assign({}, rec), { index }));
|
23
23
|
setElement(ref === null || ref === void 0 ? void 0 : ref.current);
|
24
24
|
if (isExternalLink) {
|
@@ -87,7 +87,7 @@ const WaterfallFlowItem = (props) => {
|
|
87
87
|
const imgLoad = (0, react_1.useCallback)((img) => {
|
88
88
|
setTimeout(() => {
|
89
89
|
var _a;
|
90
|
-
const height = (_a = pictRef === null || pictRef === void 0 ? void 0 : pictRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight;
|
90
|
+
const height = (img === null || img === void 0 ? void 0 : img.clientHeight) || ((_a = pictRef === null || pictRef === void 0 ? void 0 : pictRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight);
|
91
91
|
sizeChange(height + 56 + space, index);
|
92
92
|
}, 0);
|
93
93
|
}, [space, sizeChange, index, unitWidth, pictRef]);
|
@@ -14,7 +14,6 @@ const WaterFall = (props) => {
|
|
14
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
|
-
const ref = (0, react_1.useRef)(null);
|
18
17
|
const modalEleRef = (0, react_1.useRef)(null);
|
19
18
|
const [viewTime, setViewTime] = (0, react_1.useState)();
|
20
19
|
(0, react_1.useEffect)(() => {
|
@@ -101,6 +100,6 @@ const WaterFall = (props) => {
|
|
101
100
|
display: openHashtag ? 'block' : 'none'
|
102
101
|
} },
|
103
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 }),
|
104
|
-
(props === null || props === void 0 ? void 0 : props.openFixedSize) === true || (props === null || props === void 0 ? void 0 : props.openFixedSize) === undefined ? (react_1.default.createElement(List_1.default, Object.assign({ reportTagsView: reportTagsView }, props))) : (react_1.default.createElement(WaterfallList_1.default, Object.assign({ reportTagsView: reportTagsView }, props)))), modalEleRef.current);
|
103
|
+
(props === null || props === void 0 ? void 0 : props.openFixedSize) === true || (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);
|
105
104
|
};
|
106
105
|
exports.default = (0, react_1.memo)(WaterFall);
|
@@ -223,7 +223,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
223
223
|
userInfo = {};
|
224
224
|
}
|
225
225
|
const sessionID = (0, sessionStore_1.storeAndLoadFeSessionId)();
|
226
|
-
const ef = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, { playbookType }), eventInfo), ((0, tool_1.getDevice)() && { sxpDevice: (0, tool_1.getDevice)() })), ((0, tool_1.getSystem)() && { sxpSystem: (0, tool_1.getSystem)() })), ((0, tool_1.getBrowserInfo)() && { sxpBrowser: (0, tool_1.getBrowserInfo)() })), (
|
226
|
+
const ef = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, { playbookType }), (layoutVariantId && reportLayId && { layoutVariantId })), eventInfo), ((0, tool_1.getDevice)() && { sxpDevice: (0, tool_1.getDevice)() })), ((0, tool_1.getSystem)() && { sxpSystem: (0, tool_1.getSystem)() })), ((0, tool_1.getBrowserInfo)() && { sxpBrowser: (0, tool_1.getBrowserInfo)() })), ((eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.position) && channel && { position: Number(eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.position) + 1 + '' }));
|
227
227
|
const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
|
228
228
|
const realEventInfo = Object.entries(ef)
|
229
229
|
.map(([k, v]) => v && { name: k, value: v })
|
@@ -446,23 +446,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
446
446
|
const item = list === null || list === void 0 ? void 0 : list[0];
|
447
447
|
const traceInfo = ((_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.traceInfo) || ((_l = item === null || item === void 0 ? void 0 : item.product) === null || _l === void 0 ? void 0 : _l.traceInfo) || '';
|
448
448
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
449
|
-
eventInfo: {
|
450
|
-
eventSubject: 'multiPostClick',
|
451
|
-
eventDescription: 'multiPostClick',
|
452
|
-
traceInfo,
|
453
|
-
branchfeed: channel
|
454
|
-
}
|
449
|
+
eventInfo: Object.assign({ eventSubject: 'multiPostClick', eventDescription: 'multiPostClick', traceInfo, branchfeed: channel }, (layId && { layoutVariantId: layId }))
|
455
450
|
});
|
456
451
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
457
|
-
eventInfo: {
|
458
|
-
eventSubject: 'endMultiPost',
|
459
|
-
eventDescription: 'endMultiPost',
|
460
|
-
contentFormat: 'image',
|
461
|
-
position: '0',
|
462
|
-
traceInfo,
|
463
|
-
nextStep: 'multipostClick',
|
464
|
-
timeOnSite: Math.floor((new Date() - (multiPostTimeRef === null || multiPostTimeRef === void 0 ? void 0 : multiPostTimeRef.current)) / 1000) + ''
|
465
|
-
}
|
452
|
+
eventInfo: Object.assign({ eventSubject: 'endMultiPost', eventDescription: 'endMultiPost', contentFormat: 'image', position: '0', traceInfo, nextStep: 'multipostClick', timeOnSite: Math.floor((new Date() - (multiPostTimeRef === null || multiPostTimeRef === void 0 ? void 0 : multiPostTimeRef.current)) / 1000) + '' }, (layId && { layoutVariantId: layId }))
|
466
453
|
});
|
467
454
|
}
|
468
455
|
}
|
@@ -4,6 +4,7 @@ declare const _default: ({
|
|
4
4
|
label: string;
|
5
5
|
type: string;
|
6
6
|
name: string[];
|
7
|
+
text: string;
|
7
8
|
child?: undefined;
|
8
9
|
} | {
|
9
10
|
type: string;
|
@@ -18,6 +19,7 @@ declare const _default: ({
|
|
18
19
|
text: string;
|
19
20
|
})[];
|
20
21
|
name?: undefined;
|
22
|
+
text?: undefined;
|
21
23
|
} | {
|
22
24
|
type: string;
|
23
25
|
label: string;
|
@@ -38,6 +40,7 @@ declare const _default: ({
|
|
38
40
|
initialValue?: undefined;
|
39
41
|
})[];
|
40
42
|
name?: undefined;
|
43
|
+
text?: undefined;
|
41
44
|
} | {
|
42
45
|
type: string;
|
43
46
|
label: string;
|
@@ -58,6 +61,7 @@ declare const _default: ({
|
|
58
61
|
options?: undefined;
|
59
62
|
})[];
|
60
63
|
name?: undefined;
|
64
|
+
text?: undefined;
|
61
65
|
})[];
|
62
66
|
} | {
|
63
67
|
title: string;
|
@@ -7,7 +7,8 @@ exports.default = [
|
|
7
7
|
{
|
8
8
|
label: '背景图',
|
9
9
|
type: 'Upload',
|
10
|
-
name: ['props', 'bgImgUrl']
|
10
|
+
name: ['props', 'bgImgUrl'],
|
11
|
+
text: '建议尺寸:720 * 1280'
|
11
12
|
},
|
12
13
|
{
|
13
14
|
type: 'Group',
|
@@ -80,7 +81,7 @@ exports.default = [
|
|
80
81
|
]
|
81
82
|
},
|
82
83
|
{
|
83
|
-
title: '按钮设置',
|
84
|
+
title: '按钮设置 (建议尺寸:500 * 500)',
|
84
85
|
child: [
|
85
86
|
{
|
86
87
|
type: 'Group',
|
@@ -20,7 +20,7 @@ const EventProvider = (_a) => {
|
|
20
20
|
eventSubject: 'clickCta',
|
21
21
|
eventDescription: 'User clicked the CTA'
|
22
22
|
}, rec, item, index);
|
23
|
-
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(multItem && multiCheckIndex
|
23
|
+
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(multItem && multiCheckIndex !== undefined && multiCheckIndex >= 0
|
24
24
|
? Object.assign(Object.assign({}, rec), { video: Object.assign(Object.assign({}, rec === null || rec === void 0 ? void 0 : rec.video), { bindProduct: multItem }), index, multiCheckIndex }) : Object.assign(Object.assign({}, rec), { index }));
|
25
25
|
setElement(ref === null || ref === void 0 ? void 0 : ref.current);
|
26
26
|
if (isExternalLink) {
|