pb-sxp-ui 1.7.6 → 1.7.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 +14 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -5
- 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 +14 -4
- 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/components/SxpPageRender/PictureGroup/index.js +1 -1
- package/es/core/components/SxpPageRender/VideoWidget/index.js +1 -1
- package/es/core/context/SxpDataSourceProvider.js +13 -2
- package/lib/core/components/SxpPageRender/PictureGroup/index.js +1 -1
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +1 -1
- package/lib/core/context/SxpDataSourceProvider.js +13 -2
- package/package.json +1 -1
package/dist/pb-ui.js
CHANGED
@@ -697,8 +697,12 @@
|
|
697
697
|
// 事件上报优化
|
698
698
|
// Beacon API 用于发送异步和非阻塞请求到服务器。这类请求不需要响应。
|
699
699
|
if (options.type === 'beacon' && navigator.sendBeacon) {
|
700
|
+
const query = qs.stringify(Object.assign(Object.assign({}, bffDataSource.headers), { 'x-user-id': fakeUserId }));
|
701
|
+
if (query) {
|
702
|
+
path = (options === null || options === void 0 ? void 0 : options.query) ? `${path}&${query}` : `${path}?${query}`;
|
703
|
+
}
|
700
704
|
return navigator.sendBeacon(`${url}/api/v1${path}`, new Blob([
|
701
|
-
JSON.stringify(Object.assign(
|
705
|
+
JSON.stringify(Object.assign({}, options.body))
|
702
706
|
], { type: 'application/json;charset=UTF-8' }));
|
703
707
|
}
|
704
708
|
return window
|
@@ -820,7 +824,7 @@
|
|
820
824
|
!((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _a === void 0 ? void 0 : _a[eventName])) {
|
821
825
|
return;
|
822
826
|
}
|
823
|
-
let jsonParams =
|
827
|
+
let jsonParams = lodash.cloneDeep((_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _b === void 0 ? void 0 : _b[eventName]);
|
824
828
|
const urlParams = new URLSearchParams(window.location.search);
|
825
829
|
const fbclid = urlParams === null || urlParams === void 0 ? void 0 : urlParams.get('fbclid');
|
826
830
|
const fix_par = {
|
@@ -849,10 +853,16 @@
|
|
849
853
|
const matches = value === null || value === void 0 ? void 0 : value.match(regex);
|
850
854
|
if (matches) {
|
851
855
|
matches.forEach((match) => {
|
856
|
+
var _a;
|
852
857
|
const prop = match.substring(2, match.length - 2);
|
853
858
|
try {
|
854
859
|
let replaceValue = new Function('fix_par', 'product', `return ${prop}`)(fix_par, product);
|
855
860
|
if (replaceValue) {
|
861
|
+
if (prop.indexOf('currency') &&
|
862
|
+
(replaceValue === null || replaceValue === void 0 ? void 0 : replaceValue.indexOf('-')) !== -1 &&
|
863
|
+
typeof replaceValue === 'string') {
|
864
|
+
replaceValue = (_a = replaceValue === null || replaceValue === void 0 ? void 0 : replaceValue.split('-')) === null || _a === void 0 ? void 0 : _a[0];
|
865
|
+
}
|
856
866
|
obj[key] = replaceValue;
|
857
867
|
}
|
858
868
|
else {
|
@@ -15739,7 +15749,7 @@ Made in Italy` })));
|
|
15739
15749
|
position: index + '',
|
15740
15750
|
contentFormat: 'video',
|
15741
15751
|
traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo,
|
15742
|
-
loadTime: (
|
15752
|
+
loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + ''
|
15743
15753
|
}
|
15744
15754
|
});
|
15745
15755
|
setIsFirstPlay(false);
|
@@ -16126,7 +16136,7 @@ Made in Italy` })));
|
|
16126
16136
|
const showFirstImageFn = React.useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
|
16127
16137
|
if (!isLoad) {
|
16128
16138
|
setImgInfo({
|
16129
|
-
loadTime:
|
16139
|
+
loadTime: new Date() - initTime + ''
|
16130
16140
|
});
|
16131
16141
|
setIsLoad(true);
|
16132
16142
|
}
|