pb-sxp-ui 14.0.2 → 14.0.3
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 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -7
- 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 -7
- 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/context/SxpDataSourceProvider.js +12 -8
- package/lib/core/context/SxpDataSourceProvider.js +12 -8
- package/package.json +1 -1
package/dist/pb-ui.js
CHANGED
@@ -742,8 +742,10 @@
|
|
742
742
|
}
|
743
743
|
setLoading(false);
|
744
744
|
list = list.concat((_y = (_x = (_w = (_v = result === null || result === void 0 ? void 0 : result.data) === null || _v === void 0 ? void 0 : _v.recList) === null || _w === void 0 ? void 0 : _w.filter) === null || _x === void 0 ? void 0 : _x.call(_w, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _y !== void 0 ? _y : []);
|
745
|
-
|
746
|
-
|
745
|
+
if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
|
746
|
+
setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
|
747
|
+
setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
|
748
|
+
}
|
747
749
|
const isNotNullList = (_0 = (_z = result === null || result === void 0 ? void 0 : result.data) === null || _z === void 0 ? void 0 : _z.recList) === null || _0 === void 0 ? void 0 : _0.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
748
750
|
if (isNotNullList) {
|
749
751
|
pageNum = pageNum + 1;
|
@@ -753,7 +755,7 @@
|
|
753
755
|
yield recurveRecList(query);
|
754
756
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
|
755
757
|
setCurReqInfo({ rtc: (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.rtc, requestId: (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.requestId });
|
756
|
-
return Object.assign(Object.assign({}, result.data), { recList: list });
|
758
|
+
return Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list });
|
757
759
|
}
|
758
760
|
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
759
761
|
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_o = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _o !== void 0 ? _o : 1 });
|
@@ -808,7 +810,7 @@
|
|
808
810
|
return expire;
|
809
811
|
}, [data]);
|
810
812
|
const bffEventReport = React.useCallback(({ userInfo, eventInfo, reportLayId = true }) => {
|
811
|
-
var _a;
|
813
|
+
var _a, _b;
|
812
814
|
// 关闭 BFF 事件上报
|
813
815
|
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
814
816
|
return;
|
@@ -821,7 +823,9 @@
|
|
821
823
|
};
|
822
824
|
}
|
823
825
|
const sessionID = storeAndLoadFeSessionId();
|
824
|
-
const
|
826
|
+
const urlParams = new URLSearchParams((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.search);
|
827
|
+
const cl_source = urlParams === null || urlParams === void 0 ? void 0 : urlParams.get('cl_source');
|
828
|
+
const ef = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, { playbookType }), (layoutVariantId && reportLayId && { layoutVariantId })), eventInfo), ((eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.position) && channel && { position: Number(eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.position) + 1 + '' })), (cl_source && { cl_source }));
|
825
829
|
const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
|
826
830
|
const realEventInfo = Object.entries(ef)
|
827
831
|
.map(([k, v]) => v && { name: k, value: v })
|
@@ -830,7 +834,7 @@
|
|
830
834
|
console.log('userInfo:', userInfo);
|
831
835
|
console.log('eventInfo:', ef);
|
832
836
|
console.log('========= 结束 =========');
|
833
|
-
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/event/report/CLD/${(
|
837
|
+
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/event/report/CLD/${(_b = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _b === void 0 ? void 0 : _b['x-app-id']}/${eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.eventSubject}`, {
|
834
838
|
method: 'POST',
|
835
839
|
body: { userInfo: realUserInfo, eventInfo: realEventInfo },
|
836
840
|
type: 'beacon'
|
@@ -853,7 +857,7 @@
|
|
853
857
|
!((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _a === void 0 ? void 0 : _a[eventName])) {
|
854
858
|
return;
|
855
859
|
}
|
856
|
-
|
860
|
+
const jsonParams = lodash.cloneDeep((_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _b === void 0 ? void 0 : _b[eventName]);
|
857
861
|
const urlParams = new URLSearchParams(window.location.search);
|
858
862
|
const fbclid = urlParams === null || urlParams === void 0 ? void 0 : urlParams.get('fbclid');
|
859
863
|
const fix_par = {
|