pb-sxp-ui 1.10.7 → 1.10.8
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 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -28
- 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 +6 -28
- 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/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/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
|
}
|
@@ -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
|
}
|