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.js
CHANGED
@@ -1006,7 +1006,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1006
1006
|
});
|
1007
1007
|
}, [bffEventReport, isFromHashtag]);
|
1008
1008
|
const h5EnterLink = useCallback(() => {
|
1009
|
-
var _a, _b
|
1009
|
+
var _a, _b;
|
1010
1010
|
const queryString = location.search.slice(1);
|
1011
1011
|
const params = qs.parse(queryString.replace(/\+/g, '%2B'));
|
1012
1012
|
for (const key in params) {
|
@@ -1014,10 +1014,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1014
1014
|
}
|
1015
1015
|
const getVal = (key) => { var _a; return (_a = params[key]) !== null && _a !== void 0 ? _a : ''; };
|
1016
1016
|
const time = new Date();
|
1017
|
-
|
1018
|
-
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)) {
|
1019
|
-
curTime.current = time;
|
1020
|
-
}
|
1017
|
+
curTime.current = time;
|
1021
1018
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
1022
1019
|
eventInfo: {
|
1023
1020
|
eventSubject: 'h5LinkEnterFeed',
|
@@ -1029,12 +1026,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1029
1026
|
utmContent: getVal('utm_content'),
|
1030
1027
|
enterTime: Math.floor(time / 1000) + '',
|
1031
1028
|
requestId: null,
|
1032
|
-
enterUrl: (
|
1029
|
+
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 : '',
|
1033
1030
|
clSource: getVal('cl_source')
|
1034
1031
|
},
|
1035
1032
|
reportLayId: false
|
1036
1033
|
});
|
1037
|
-
}, [bffEventReport
|
1034
|
+
}, [bffEventReport]);
|
1038
1035
|
useEffect(() => {
|
1039
1036
|
if (!isShowConsent)
|
1040
1037
|
h5EnterLink();
|
@@ -17967,11 +17964,11 @@ var NavBack$1 = memo(NavBack);
|
|
17967
17964
|
* @Author: binruan@chatlabs.com
|
17968
17965
|
* @Date: 2024-03-20 10:27:31
|
17969
17966
|
* @LastEditors: binruan@chatlabs.com
|
17970
|
-
* @LastEditTime: 2024-12-
|
17967
|
+
* @LastEditTime: 2024-12-18 10:24:20
|
17971
17968
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
17972
17969
|
*
|
17973
17970
|
*/
|
17974
|
-
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, hashTagRightMargin, tagList = [],
|
17971
|
+
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, hashTagRightMargin, tagList = [], defaultData }) => {
|
17975
17972
|
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;
|
17976
17973
|
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
|
17977
17974
|
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
|
@@ -18001,12 +17998,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18001
17998
|
}
|
18002
17999
|
}, [data === null || data === void 0 ? void 0 : data.length]);
|
18003
18000
|
const handleH5EnterLink = useCallback(() => {
|
18001
|
+
var _a, _b, _c;
|
18002
|
+
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;
|
18003
|
+
if (!((_c = defaultGlobalConfig === null || defaultGlobalConfig === void 0 ? void 0 : defaultGlobalConfig.session) === null || _c === void 0 ? void 0 : _c.enable)) {
|
18004
|
+
refreshFeSessionId();
|
18005
|
+
}
|
18004
18006
|
h5EnterLink === null || h5EnterLink === void 0 ? void 0 : h5EnterLink();
|
18005
18007
|
if (data.length > 0) {
|
18006
18008
|
const now = new Date();
|
18007
18009
|
viewTime.current = now;
|
18008
18010
|
}
|
18009
|
-
}, [data.length, h5EnterLink]);
|
18011
|
+
}, [data.length, h5EnterLink, defaultData]);
|
18010
18012
|
useEffect(() => {
|
18011
18013
|
var _a;
|
18012
18014
|
if (!ctaType || (ctaType === null || ctaType === void 0 ? void 0 : ctaType.length) < 1)
|
@@ -18076,7 +18078,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18076
18078
|
handleReportProductView(item);
|
18077
18079
|
}
|
18078
18080
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.playbook) !== 'organic menu' || activeIndex !== 0 || channel) {
|
18079
|
-
const isExpire = refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(
|
18081
|
+
const isExpire = refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
|
18080
18082
|
if (!isExpire)
|
18081
18083
|
handleSessionCompleted();
|
18082
18084
|
}
|
@@ -19052,7 +19054,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
|
|
19052
19054
|
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 }) => {
|
19053
19055
|
var _a;
|
19054
19056
|
return (React.createElement(React.Fragment, null,
|
19055
|
-
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 })),
|
19057
|
+
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 })),
|
19056
19058
|
React.createElement(Popup, null)));
|
19057
19059
|
} })));
|
19058
19060
|
};
|