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/index.cjs
CHANGED
@@ -704,8 +704,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
704
704
|
// 事件上报优化
|
705
705
|
// Beacon API 用于发送异步和非阻塞请求到服务器。这类请求不需要响应。
|
706
706
|
if (options.type === 'beacon' && navigator.sendBeacon) {
|
707
|
+
const query = qs.stringify(Object.assign(Object.assign({}, bffDataSource.headers), { 'x-user-id': fakeUserId }));
|
708
|
+
if (query) {
|
709
|
+
path = (options === null || options === void 0 ? void 0 : options.query) ? `${path}&${query}` : `${path}?${query}`;
|
710
|
+
}
|
707
711
|
return navigator.sendBeacon(`${url}/api/v1${path}`, new Blob([
|
708
|
-
JSON.stringify(Object.assign(
|
712
|
+
JSON.stringify(Object.assign({}, options.body))
|
709
713
|
], { type: 'application/json;charset=UTF-8' }));
|
710
714
|
}
|
711
715
|
return window
|
@@ -827,7 +831,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
827
831
|
!((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _a === void 0 ? void 0 : _a[eventName])) {
|
828
832
|
return;
|
829
833
|
}
|
830
|
-
let jsonParams =
|
834
|
+
let jsonParams = lodash.cloneDeep((_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _b === void 0 ? void 0 : _b[eventName]);
|
831
835
|
const urlParams = new URLSearchParams(window.location.search);
|
832
836
|
const fbclid = urlParams === null || urlParams === void 0 ? void 0 : urlParams.get('fbclid');
|
833
837
|
const fix_par = {
|
@@ -856,10 +860,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
856
860
|
const matches = value === null || value === void 0 ? void 0 : value.match(regex);
|
857
861
|
if (matches) {
|
858
862
|
matches.forEach((match) => {
|
863
|
+
var _a;
|
859
864
|
const prop = match.substring(2, match.length - 2);
|
860
865
|
try {
|
861
866
|
let replaceValue = new Function('fix_par', 'product', `return ${prop}`)(fix_par, product);
|
862
867
|
if (replaceValue) {
|
868
|
+
if (prop.indexOf('currency') &&
|
869
|
+
(replaceValue === null || replaceValue === void 0 ? void 0 : replaceValue.indexOf('-')) !== -1 &&
|
870
|
+
typeof replaceValue === 'string') {
|
871
|
+
replaceValue = (_a = replaceValue === null || replaceValue === void 0 ? void 0 : replaceValue.split('-')) === null || _a === void 0 ? void 0 : _a[0];
|
872
|
+
}
|
863
873
|
obj[key] = replaceValue;
|
864
874
|
}
|
865
875
|
else {
|
@@ -15746,7 +15756,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
15746
15756
|
position: index + '',
|
15747
15757
|
contentFormat: 'video',
|
15748
15758
|
traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo,
|
15749
|
-
loadTime: (
|
15759
|
+
loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + ''
|
15750
15760
|
}
|
15751
15761
|
});
|
15752
15762
|
setIsFirstPlay(false);
|
@@ -16133,7 +16143,7 @@ const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
|
|
16133
16143
|
const showFirstImageFn = React.useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
|
16134
16144
|
if (!isLoad) {
|
16135
16145
|
setImgInfo({
|
16136
|
-
loadTime:
|
16146
|
+
loadTime: new Date() - initTime + ''
|
16137
16147
|
});
|
16138
16148
|
setIsLoad(true);
|
16139
16149
|
}
|