pb-sxp-ui 1.0.79 → 1.0.80
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 +30 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -29
- 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 +30 -29
- 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/WaterFall/index.js +1 -1
- package/es/core/components/SxpPageRender/index.js +1 -24
- package/es/core/context/SxpDataSourceProvider.js +24 -0
- package/es/materials/sxp/HashTag/settingRender.d.ts +9 -0
- package/es/materials/sxp/HashTag/settingRender.js +2 -1
- package/lib/core/components/SxpPageRender/WaterFall/index.js +1 -1
- package/lib/core/components/SxpPageRender/index.js +1 -24
- package/lib/core/context/SxpDataSourceProvider.js +24 -0
- package/lib/materials/sxp/HashTag/settingRender.d.ts +9 -0
- package/lib/materials/sxp/HashTag/settingRender.js +2 -1
- package/package.json +1 -1
@@ -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
|
-
(props === null || props === void 0 ? void 0 : props.isWaterfallFlow) ? (React.createElement(
|
100
|
+
(props === null || props === void 0 ? void 0 : props.isWaterfallFlow) === true || (props === null || props === void 0 ? void 0 : props.isWaterfallFlow) === undefined ? (React.createElement(List, Object.assign({ reportTagsView: reportTagsView }, props))) : (React.createElement(WaterfallList, Object.assign({ reportTagsView: reportTagsView }, props)))), modalEleRef.current);
|
101
101
|
};
|
102
102
|
export default memo(WaterFall);
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React, { useMemo, useEffect, useState, useRef, useCallback } from 'react';
|
2
2
|
import { Swiper, SwiperSlide } from 'swiper/react';
|
3
|
-
import qs from 'qs';
|
4
3
|
import ExpandableText from './ExpandableText';
|
5
4
|
import LikeButton from './LikeButton';
|
6
5
|
import VideoWidget from './VideoWidget';
|
@@ -41,37 +40,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
41
40
|
return data.length > 0 && !loading && getFeUserId();
|
42
41
|
}, [data, loading]);
|
43
42
|
const handleH5EnterLink = useCallback(() => {
|
44
|
-
var _a, _b;
|
45
43
|
if (data.length <= 0) {
|
46
44
|
return;
|
47
45
|
}
|
48
46
|
initTime();
|
49
|
-
const queryString = location.search.slice(1);
|
50
|
-
const params = qs.parse(queryString.replace(/\+/g, '%2B'));
|
51
|
-
for (const key in params) {
|
52
|
-
params[key] = params[key].replace(/%2B/g, '+');
|
53
|
-
}
|
54
|
-
const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
|
55
|
-
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
56
|
-
eventInfo: {
|
57
|
-
eventSubject: 'h5LinkEnterFeed',
|
58
|
-
eventDescription: 'User enter h5 link',
|
59
|
-
utmSource: getVal('utm_source'),
|
60
|
-
utmMedium: getVal('utm_medium'),
|
61
|
-
utmCampaign: getVal('utm_campaign'),
|
62
|
-
utmId: getVal('utm_id'),
|
63
|
-
utmContent: getVal('utm_content'),
|
64
|
-
enterTime: `${Date.now()}`,
|
65
|
-
requestId: null,
|
66
|
-
enterUrl: (_b = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.href) !== null && _b !== void 0 ? _b : '',
|
67
|
-
clSource: getVal('cl_sourc')
|
68
|
-
}
|
69
|
-
});
|
70
47
|
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
71
48
|
eventName: 'PageView'
|
72
49
|
});
|
73
50
|
setIsInit(true);
|
74
|
-
}, [
|
51
|
+
}, [data.length, bffFbReport]);
|
75
52
|
const initTime = () => {
|
76
53
|
curTime.current = new Date();
|
77
54
|
viewTime.current = new Date();
|
@@ -196,6 +196,30 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
196
196
|
eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
|
197
197
|
});
|
198
198
|
}, [bffEventReport, isFromHashtag]);
|
199
|
+
useEffect(() => {
|
200
|
+
var _a, _b;
|
201
|
+
const queryString = location.search.slice(1);
|
202
|
+
const params = qs.parse(queryString.replace(/\+/g, '%2B'));
|
203
|
+
for (const key in params) {
|
204
|
+
params[key] = params[key].replace(/%2B/g, '+');
|
205
|
+
}
|
206
|
+
const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
|
207
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
208
|
+
eventInfo: {
|
209
|
+
eventSubject: 'h5LinkEnterFeed',
|
210
|
+
eventDescription: 'User enter h5 link',
|
211
|
+
utmSource: getVal('utm_source'),
|
212
|
+
utmMedium: getVal('utm_medium'),
|
213
|
+
utmCampaign: getVal('utm_campaign'),
|
214
|
+
utmId: getVal('utm_id'),
|
215
|
+
utmContent: getVal('utm_content'),
|
216
|
+
enterTime: `${Date.now()}`,
|
217
|
+
requestId: null,
|
218
|
+
enterUrl: (_b = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.href) !== null && _b !== void 0 ? _b : '',
|
219
|
+
clSource: getVal('cl_sourc')
|
220
|
+
}
|
221
|
+
});
|
222
|
+
}, []);
|
199
223
|
useEffect(() => {
|
200
224
|
setLoading(true);
|
201
225
|
bffGetTagList();
|
@@ -1,14 +1,23 @@
|
|
1
1
|
declare const _default: ({
|
2
|
+
title: string;
|
3
|
+
child: {
|
4
|
+
type: string;
|
5
|
+
label: string;
|
6
|
+
name: string[];
|
7
|
+
}[];
|
8
|
+
} | {
|
2
9
|
title: string;
|
3
10
|
child: ({
|
4
11
|
type: string;
|
5
12
|
label: string;
|
6
13
|
name: string[];
|
7
14
|
addonAfter: string;
|
15
|
+
initialValue?: undefined;
|
8
16
|
} | {
|
9
17
|
type: string;
|
10
18
|
label: string;
|
11
19
|
name: string[];
|
20
|
+
initialValue: boolean;
|
12
21
|
addonAfter?: undefined;
|
13
22
|
})[];
|
14
23
|
} | {
|
@@ -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
|
-
(props === null || props === void 0 ? void 0 : props.isWaterfallFlow) ? (react_1.default.createElement(
|
103
|
+
(props === null || props === void 0 ? void 0 : props.isWaterfallFlow) === true || (props === null || props === void 0 ? void 0 : props.isWaterfallFlow) === 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);
|
104
104
|
};
|
105
105
|
exports.default = (0, react_1.memo)(WaterFall);
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
5
5
|
const react_2 = require("swiper/react");
|
6
|
-
const qs_1 = tslib_1.__importDefault(require("qs"));
|
7
6
|
const ExpandableText_1 = tslib_1.__importDefault(require("./ExpandableText"));
|
8
7
|
const LikeButton_1 = tslib_1.__importDefault(require("./LikeButton"));
|
9
8
|
const VideoWidget_1 = tslib_1.__importDefault(require("./VideoWidget"));
|
@@ -44,37 +43,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
44
43
|
return data.length > 0 && !loading && (0, localStore_1.getFeUserId)();
|
45
44
|
}, [data, loading]);
|
46
45
|
const handleH5EnterLink = (0, react_1.useCallback)(() => {
|
47
|
-
var _a, _b;
|
48
46
|
if (data.length <= 0) {
|
49
47
|
return;
|
50
48
|
}
|
51
49
|
initTime();
|
52
|
-
const queryString = location.search.slice(1);
|
53
|
-
const params = qs_1.default.parse(queryString.replace(/\+/g, '%2B'));
|
54
|
-
for (const key in params) {
|
55
|
-
params[key] = params[key].replace(/%2B/g, '+');
|
56
|
-
}
|
57
|
-
const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
|
58
|
-
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
59
|
-
eventInfo: {
|
60
|
-
eventSubject: 'h5LinkEnterFeed',
|
61
|
-
eventDescription: 'User enter h5 link',
|
62
|
-
utmSource: getVal('utm_source'),
|
63
|
-
utmMedium: getVal('utm_medium'),
|
64
|
-
utmCampaign: getVal('utm_campaign'),
|
65
|
-
utmId: getVal('utm_id'),
|
66
|
-
utmContent: getVal('utm_content'),
|
67
|
-
enterTime: `${Date.now()}`,
|
68
|
-
requestId: null,
|
69
|
-
enterUrl: (_b = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.href) !== null && _b !== void 0 ? _b : '',
|
70
|
-
clSource: getVal('cl_sourc')
|
71
|
-
}
|
72
|
-
});
|
73
50
|
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
74
51
|
eventName: 'PageView'
|
75
52
|
});
|
76
53
|
setIsInit(true);
|
77
|
-
}, [
|
54
|
+
}, [data.length, bffFbReport]);
|
78
55
|
const initTime = () => {
|
79
56
|
curTime.current = new Date();
|
80
57
|
viewTime.current = new Date();
|
@@ -199,6 +199,30 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
199
199
|
eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
|
200
200
|
});
|
201
201
|
}, [bffEventReport, isFromHashtag]);
|
202
|
+
(0, react_1.useEffect)(() => {
|
203
|
+
var _a, _b;
|
204
|
+
const queryString = location.search.slice(1);
|
205
|
+
const params = qs_1.default.parse(queryString.replace(/\+/g, '%2B'));
|
206
|
+
for (const key in params) {
|
207
|
+
params[key] = params[key].replace(/%2B/g, '+');
|
208
|
+
}
|
209
|
+
const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
|
210
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
211
|
+
eventInfo: {
|
212
|
+
eventSubject: 'h5LinkEnterFeed',
|
213
|
+
eventDescription: 'User enter h5 link',
|
214
|
+
utmSource: getVal('utm_source'),
|
215
|
+
utmMedium: getVal('utm_medium'),
|
216
|
+
utmCampaign: getVal('utm_campaign'),
|
217
|
+
utmId: getVal('utm_id'),
|
218
|
+
utmContent: getVal('utm_content'),
|
219
|
+
enterTime: `${Date.now()}`,
|
220
|
+
requestId: null,
|
221
|
+
enterUrl: (_b = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.href) !== null && _b !== void 0 ? _b : '',
|
222
|
+
clSource: getVal('cl_sourc')
|
223
|
+
}
|
224
|
+
});
|
225
|
+
}, []);
|
202
226
|
(0, react_1.useEffect)(() => {
|
203
227
|
setLoading(true);
|
204
228
|
bffGetTagList();
|
@@ -1,14 +1,23 @@
|
|
1
1
|
declare const _default: ({
|
2
|
+
title: string;
|
3
|
+
child: {
|
4
|
+
type: string;
|
5
|
+
label: string;
|
6
|
+
name: string[];
|
7
|
+
}[];
|
8
|
+
} | {
|
2
9
|
title: string;
|
3
10
|
child: ({
|
4
11
|
type: string;
|
5
12
|
label: string;
|
6
13
|
name: string[];
|
7
14
|
addonAfter: string;
|
15
|
+
initialValue?: undefined;
|
8
16
|
} | {
|
9
17
|
type: string;
|
10
18
|
label: string;
|
11
19
|
name: string[];
|
20
|
+
initialValue: boolean;
|
12
21
|
addonAfter?: undefined;
|
13
22
|
})[];
|
14
23
|
} | {
|