pb-sxp-ui 1.15.20-alpha.2 → 1.15.20-alpha.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 +3 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -25
- 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 +7 -28
- 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 +3 -6
- package/lib/core/context/SxpDataSourceProvider.js +3 -6
- package/package.json +1 -1
@@ -8,7 +8,6 @@ import { useIconLink } from '../components/SxpPageRender/useIconLink';
|
|
8
8
|
import SXP_EVENT_BUS, { SXP_EVENT_TYPE } from '../utils/event';
|
9
9
|
import Consent from '../components/Consent';
|
10
10
|
import { getCookie, splitUrlParams } from '../utils/tool';
|
11
|
-
import { encrypt } from '../utils/cryptojs';
|
12
11
|
export const SxpDataSourceContext = createContext({
|
13
12
|
rtcList: [],
|
14
13
|
tagList: []
|
@@ -114,11 +113,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
114
113
|
path = `${path}?${queryString}`;
|
115
114
|
}
|
116
115
|
if (options.type === 'beacon' && navigator.sendBeacon) {
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
type: 'application/json;charset=UTF-8'
|
121
|
-
}));
|
116
|
+
const formData = new FormData();
|
117
|
+
formData.append('data', JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId })));
|
118
|
+
return navigator.sendBeacon(`${url}/api/${path}`, formData);
|
122
119
|
}
|
123
120
|
return window
|
124
121
|
.fetch(`${url}/api/${path}`, {
|
@@ -11,7 +11,6 @@ const useIconLink_1 = require("../components/SxpPageRender/useIconLink");
|
|
11
11
|
const event_1 = tslib_1.__importStar(require("../utils/event"));
|
12
12
|
const Consent_1 = tslib_1.__importDefault(require("../components/Consent"));
|
13
13
|
const tool_1 = require("../utils/tool");
|
14
|
-
const cryptojs_1 = require("../utils/cryptojs");
|
15
14
|
exports.SxpDataSourceContext = (0, react_1.createContext)({
|
16
15
|
rtcList: [],
|
17
16
|
tagList: []
|
@@ -117,11 +116,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
117
116
|
path = `${path}?${queryString}`;
|
118
117
|
}
|
119
118
|
if (options.type === 'beacon' && navigator.sendBeacon) {
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
type: 'application/json;charset=UTF-8'
|
124
|
-
}));
|
119
|
+
const formData = new FormData();
|
120
|
+
formData.append('data', JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId })));
|
121
|
+
return navigator.sendBeacon(`${url}/api/${path}`, formData);
|
125
122
|
}
|
126
123
|
return window
|
127
124
|
.fetch(`${url}/api/${path}`, {
|