pb-sxp-ui 1.12.0 → 1.12.2
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 +14 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -12
- 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 +14 -12
- 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/SxpPageCore/index.js +1 -1
- package/es/core/components/SxpPageRender/index.d.ts +1 -0
- package/es/core/components/SxpPageRender/index.js +9 -3
- package/es/core/context/SxpDataSourceProvider.js +4 -7
- package/lib/core/components/SxpPageCore/index.js +1 -1
- package/lib/core/components/SxpPageRender/index.d.ts +1 -0
- package/lib/core/components/SxpPageRender/index.js +9 -3
- package/lib/core/context/SxpDataSourceProvider.js +4 -7
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -1028,7 +1028,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1028
1028
|
});
|
1029
1029
|
}, [bffEventReport, isFromHashtag]);
|
1030
1030
|
const h5EnterLink = React.useCallback(() => {
|
1031
|
-
var _a, _b
|
1031
|
+
var _a, _b;
|
1032
1032
|
const queryString = location.search.slice(1);
|
1033
1033
|
const params = qs.parse(queryString.replace(/\+/g, '%2B'));
|
1034
1034
|
for (const key in params) {
|
@@ -1036,10 +1036,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1036
1036
|
}
|
1037
1037
|
const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
|
1038
1038
|
const time = new Date();
|
1039
|
-
|
1040
|
-
if (!((_c = defaultGlobalConfig === null || defaultGlobalConfig === void 0 ? void 0 : defaultGlobalConfig.session) === null || _c === void 0 ? void 0 : _c.enable) || !(curTime === null || curTime === void 0 ? void 0 : curTime.current)) {
|
1041
|
-
curTime.current = time;
|
1042
|
-
}
|
1039
|
+
curTime.current = time;
|
1043
1040
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
1044
1041
|
eventInfo: {
|
1045
1042
|
eventSubject: 'h5LinkEnterFeed',
|
@@ -1051,12 +1048,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1051
1048
|
utmContent: getVal('utm_content'),
|
1052
1049
|
enterTime: Math.floor(time / 1000) + '',
|
1053
1050
|
requestId: null,
|
1054
|
-
enterUrl: (
|
1051
|
+
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 : '',
|
1055
1052
|
clSource: getVal('cl_source')
|
1056
1053
|
},
|
1057
1054
|
reportLayId: false
|
1058
1055
|
});
|
1059
|
-
}, [bffEventReport
|
1056
|
+
}, [bffEventReport]);
|
1060
1057
|
React.useEffect(() => {
|
1061
1058
|
if (!isShowConsent)
|
1062
1059
|
h5EnterLink();
|
@@ -17989,11 +17986,11 @@ var NavBack$1 = React.memo(NavBack);
|
|
17989
17986
|
* @Author: binruan@chatlabs.com
|
17990
17987
|
* @Date: 2024-03-20 10:27:31
|
17991
17988
|
* @LastEditors: binruan@chatlabs.com
|
17992
|
-
* @LastEditTime: 2024-12-
|
17989
|
+
* @LastEditTime: 2024-12-18 10:24:20
|
17993
17990
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
17994
17991
|
*
|
17995
17992
|
*/
|
17996
|
-
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, hashTagRightMargin, tagList = [],
|
17993
|
+
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, hashTagRightMargin, tagList = [], defaultData }) => {
|
17997
17994
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
17998
17995
|
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
|
17999
17996
|
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
|
@@ -18023,12 +18020,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18023
18020
|
}
|
18024
18021
|
}, [data === null || data === void 0 ? void 0 : data.length]);
|
18025
18022
|
const handleH5EnterLink = React.useCallback(() => {
|
18023
|
+
var _a, _b, _c;
|
18024
|
+
const defaultGlobalConfig = (_b = (_a = defaultData === null || defaultData === void 0 ? void 0 : defaultData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf) === null || _b === void 0 ? void 0 : _b.globalConfig;
|
18025
|
+
if (!((_c = defaultGlobalConfig === null || defaultGlobalConfig === void 0 ? void 0 : defaultGlobalConfig.session) === null || _c === void 0 ? void 0 : _c.enable)) {
|
18026
|
+
refreshFeSessionId();
|
18027
|
+
}
|
18026
18028
|
h5EnterLink === null || h5EnterLink === void 0 ? void 0 : h5EnterLink();
|
18027
18029
|
if (data.length > 0) {
|
18028
18030
|
const now = new Date();
|
18029
18031
|
viewTime.current = now;
|
18030
18032
|
}
|
18031
|
-
}, [data.length, h5EnterLink]);
|
18033
|
+
}, [data.length, h5EnterLink, defaultData]);
|
18032
18034
|
React.useEffect(() => {
|
18033
18035
|
var _a;
|
18034
18036
|
if (!ctaType || (ctaType === null || ctaType === void 0 ? void 0 : ctaType.length) < 1)
|
@@ -18098,7 +18100,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18098
18100
|
handleReportProductView(item);
|
18099
18101
|
}
|
18100
18102
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.playbook) !== 'organic menu' || activeIndex !== 0 || channel) {
|
18101
|
-
const isExpire = refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(
|
18103
|
+
const isExpire = refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
|
18102
18104
|
if (!isExpire)
|
18103
18105
|
handleSessionCompleted();
|
18104
18106
|
}
|
@@ -19074,7 +19076,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
|
|
19074
19076
|
React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, data: data, dataList: dataList, onUpdateSchema: (d) => setSchema(d), onUpdateChannel: (d) => setChannel(d), render: ({ rtcList, tagList, pageData }) => {
|
19075
19077
|
var _a;
|
19076
19078
|
return (React.createElement(React.Fragment, null,
|
19077
|
-
React.createElement(SxpPageRender, Object.assign({}, (_a = pageData === null || pageData === void 0 ? void 0 : pageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER })),
|
19079
|
+
React.createElement(SxpPageRender, Object.assign({ defaultData: data }, (_a = pageData === null || pageData === void 0 ? void 0 : pageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER })),
|
19078
19080
|
React.createElement(Popup, null)));
|
19079
19081
|
} })));
|
19080
19082
|
};
|