pb-sxp-ui 1.15.12-alpha.7 → 1.15.12-alpha.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 +11 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -18
- 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 -18
- 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 +10 -2
- package/lib/core/context/SxpDataSourceProvider.js +10 -2
- package/package.json +1 -2
- package/es/core/utils/cryptojs.d.ts +0 -3
- package/es/core/utils/cryptojs.js +0 -18
- package/lib/core/utils/cryptojs.d.ts +0 -3
- package/lib/core/utils/cryptojs.js +0 -23
package/dist/index.cjs
CHANGED
@@ -746,22 +746,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
746
746
|
// 事件上报优化
|
747
747
|
// Beacon API 用于发送异步和非阻塞请求到服务器。这类请求不需要响应。
|
748
748
|
if (options.type === 'beacon' && navigator.sendBeacon) {
|
749
|
-
return navigator.sendBeacon(`${url}/api/${path}`, new Blob(
|
750
|
-
// [
|
751
|
-
// JSON.stringify({
|
752
|
-
// body: encrypt(
|
753
|
-
// JSON.stringify(
|
754
|
-
// btoa(
|
755
|
-
// encodeURIComponent(
|
756
|
-
// JSON.stringify({ ...options.body, ...bffDataSource.headers, 'x-user-id': fakeUserId })
|
757
|
-
// )
|
758
|
-
// )
|
759
|
-
// ),
|
760
|
-
// 'dcAR82I0b8sgwCku'
|
761
|
-
// )
|
762
|
-
// })
|
763
|
-
// ],
|
764
|
-
[
|
749
|
+
return navigator.sendBeacon(`${url}/api/${path}`, new Blob([
|
765
750
|
JSON.stringify({
|
766
751
|
body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
|
767
752
|
})
|
@@ -944,7 +929,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
944
929
|
bffDataSource
|
945
930
|
]);
|
946
931
|
const bffFbReport = React.useCallback(({ eventName, product }) => {
|
947
|
-
var _a, _b, _c, _d, _e, _f;
|
932
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
948
933
|
if (!enableReportEvent ||
|
949
934
|
!enabledMetaConversionApi ||
|
950
935
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) ||
|
@@ -1008,7 +993,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1008
993
|
}
|
1009
994
|
};
|
1010
995
|
getEventParams(jsonParams);
|
1011
|
-
|
996
|
+
const params = {};
|
997
|
+
const queryString = location.search.slice(1);
|
998
|
+
(_f = splitUrlParams(queryString)) === null || _f === void 0 ? void 0 : _f.map((val) => {
|
999
|
+
const key = val.split('=')[0];
|
1000
|
+
const value = val.split('=')[1];
|
1001
|
+
params[key] = value;
|
1002
|
+
});
|
1003
|
+
const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
|
1004
|
+
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(_g = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _g === void 0 ? void 0 : _g['x-app-id']}/${eventName}${cl_source ? `/${decodeURIComponent(cl_source)}` : ''}`, {
|
1012
1005
|
method: 'POST',
|
1013
1006
|
body: jsonParams,
|
1014
1007
|
type: 'beacon'
|