pb-sxp-ui 1.16.17 → 1.16.18
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 +2 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -3
- 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 +2 -3
- 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 +2 -3
- package/lib/core/context/SxpDataSourceProvider.js +2 -3
- package/package.json +1 -1
@@ -107,7 +107,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
107
107
|
return ((_a = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _a === void 0 ? void 0 : _a['x-app-id']) + storeAndLoadFeUserId();
|
108
108
|
}, [bffDataSource]);
|
109
109
|
const bffFetch = useCallback((path, options, isBota = true) => {
|
110
|
-
var _a;
|
110
|
+
var _a, _b;
|
111
111
|
if (!bffDataSource)
|
112
112
|
return;
|
113
113
|
const url = bffDataSource.url;
|
@@ -122,9 +122,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
122
122
|
const value = val.split('=')[1];
|
123
123
|
params[key] = value;
|
124
124
|
});
|
125
|
-
options.body = Object.assign(Object.assign({}, options.body), { tenant_id: fakeUserId });
|
126
125
|
return window
|
127
|
-
.fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
|
126
|
+
.fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId, tenant_id: (_b = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _b === void 0 ? void 0 : _b['x-app-id'] }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
|
128
127
|
? JSON.stringify({
|
129
128
|
body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
|
130
129
|
})
|
@@ -110,7 +110,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
110
110
|
return ((_a = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _a === void 0 ? void 0 : _a['x-app-id']) + (0, localStore_1.storeAndLoadFeUserId)();
|
111
111
|
}, [bffDataSource]);
|
112
112
|
const bffFetch = (0, react_1.useCallback)((path, options, isBota = true) => {
|
113
|
-
var _a;
|
113
|
+
var _a, _b;
|
114
114
|
if (!bffDataSource)
|
115
115
|
return;
|
116
116
|
const url = bffDataSource.url;
|
@@ -125,9 +125,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
125
125
|
const value = val.split('=')[1];
|
126
126
|
params[key] = value;
|
127
127
|
});
|
128
|
-
options.body = Object.assign(Object.assign({}, options.body), { tenant_id: fakeUserId });
|
129
128
|
return window
|
130
|
-
.fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
|
129
|
+
.fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId, tenant_id: (_b = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _b === void 0 ? void 0 : _b['x-app-id'] }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
|
131
130
|
? JSON.stringify({
|
132
131
|
body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
|
133
132
|
})
|