pb-sxp-ui 1.7.7 → 1.7.9
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 +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +6 -2
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/context/SxpDataSourceProvider.js +6 -2
- package/lib/core/context/SxpDataSourceProvider.js +6 -2
- package/package.json +1 -1
|
@@ -81,8 +81,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
81
81
|
path = `${path}?${queryString}`;
|
|
82
82
|
}
|
|
83
83
|
if (options.type === 'beacon' && navigator.sendBeacon) {
|
|
84
|
+
const query = qs.stringify(Object.assign(Object.assign({}, bffDataSource.headers), { 'x-user-id': fakeUserId }));
|
|
85
|
+
if (query) {
|
|
86
|
+
path = (options === null || options === void 0 ? void 0 : options.query) ? `${path}&${query}` : `${path}?${query}`;
|
|
87
|
+
}
|
|
84
88
|
return navigator.sendBeacon(`${url}/api/v1${path}`, new Blob([
|
|
85
|
-
JSON.stringify(Object.assign(
|
|
89
|
+
JSON.stringify(Object.assign({}, options.body))
|
|
86
90
|
], { type: 'application/json;charset=UTF-8' }));
|
|
87
91
|
}
|
|
88
92
|
return window
|
|
@@ -232,7 +236,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
232
236
|
try {
|
|
233
237
|
let replaceValue = new Function('fix_par', 'product', `return ${prop}`)(fix_par, product);
|
|
234
238
|
if (replaceValue) {
|
|
235
|
-
if (prop.indexOf('currency') &&
|
|
239
|
+
if ((prop === null || prop === void 0 ? void 0 : prop.indexOf('currency')) !== -1 &&
|
|
236
240
|
(replaceValue === null || replaceValue === void 0 ? void 0 : replaceValue.indexOf('-')) !== -1 &&
|
|
237
241
|
typeof replaceValue === 'string') {
|
|
238
242
|
replaceValue = (_a = replaceValue === null || replaceValue === void 0 ? void 0 : replaceValue.split('-')) === null || _a === void 0 ? void 0 : _a[0];
|
|
@@ -84,8 +84,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
84
84
|
path = `${path}?${queryString}`;
|
|
85
85
|
}
|
|
86
86
|
if (options.type === 'beacon' && navigator.sendBeacon) {
|
|
87
|
+
const query = qs_1.default.stringify(Object.assign(Object.assign({}, bffDataSource.headers), { 'x-user-id': fakeUserId }));
|
|
88
|
+
if (query) {
|
|
89
|
+
path = (options === null || options === void 0 ? void 0 : options.query) ? `${path}&${query}` : `${path}?${query}`;
|
|
90
|
+
}
|
|
87
91
|
return navigator.sendBeacon(`${url}/api/v1${path}`, new Blob([
|
|
88
|
-
JSON.stringify(Object.assign(
|
|
92
|
+
JSON.stringify(Object.assign({}, options.body))
|
|
89
93
|
], { type: 'application/json;charset=UTF-8' }));
|
|
90
94
|
}
|
|
91
95
|
return window
|
|
@@ -235,7 +239,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
235
239
|
try {
|
|
236
240
|
let replaceValue = new Function('fix_par', 'product', `return ${prop}`)(fix_par, product);
|
|
237
241
|
if (replaceValue) {
|
|
238
|
-
if (prop.indexOf('currency') &&
|
|
242
|
+
if ((prop === null || prop === void 0 ? void 0 : prop.indexOf('currency')) !== -1 &&
|
|
239
243
|
(replaceValue === null || replaceValue === void 0 ? void 0 : replaceValue.indexOf('-')) !== -1 &&
|
|
240
244
|
typeof replaceValue === 'string') {
|
|
241
245
|
replaceValue = (_a = replaceValue === null || replaceValue === void 0 ? void 0 : replaceValue.split('-')) === null || _a === void 0 ? void 0 : _a[0];
|