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.
@@ -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
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.16.17",
3
+ "version": "1.16.18",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",