pb-sxp-ui 1.7.6 → 1.7.7
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 +9 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -4
- 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 +9 -3
- 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 +8 -1
- 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 +8 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { isEmpty,
|
1
|
+
import { isEmpty, cloneDeep, isEqual, debounce, throttle, get } from 'lodash';
|
2
2
|
import { v4 } from 'uuid';
|
3
3
|
import pako from 'pako';
|
4
4
|
import React, { useContext, useMemo, memo, useEffect, createContext, useState, useRef, useCallback, forwardRef, useImperativeHandle, useLayoutEffect } from 'react';
|
@@ -805,7 +805,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
805
805
|
!((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _a === void 0 ? void 0 : _a[eventName])) {
|
806
806
|
return;
|
807
807
|
}
|
808
|
-
let jsonParams =
|
808
|
+
let jsonParams = cloneDeep((_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _b === void 0 ? void 0 : _b[eventName]);
|
809
809
|
const urlParams = new URLSearchParams(window.location.search);
|
810
810
|
const fbclid = urlParams === null || urlParams === void 0 ? void 0 : urlParams.get('fbclid');
|
811
811
|
const fix_par = {
|
@@ -834,10 +834,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
834
834
|
const matches = value === null || value === void 0 ? void 0 : value.match(regex);
|
835
835
|
if (matches) {
|
836
836
|
matches.forEach((match) => {
|
837
|
+
var _a;
|
837
838
|
const prop = match.substring(2, match.length - 2);
|
838
839
|
try {
|
839
840
|
let replaceValue = new Function('fix_par', 'product', `return ${prop}`)(fix_par, product);
|
840
841
|
if (replaceValue) {
|
842
|
+
if (prop.indexOf('currency') &&
|
843
|
+
(replaceValue === null || replaceValue === void 0 ? void 0 : replaceValue.indexOf('-')) !== -1 &&
|
844
|
+
typeof replaceValue === 'string') {
|
845
|
+
replaceValue = (_a = replaceValue === null || replaceValue === void 0 ? void 0 : replaceValue.split('-')) === null || _a === void 0 ? void 0 : _a[0];
|
846
|
+
}
|
841
847
|
obj[key] = replaceValue;
|
842
848
|
}
|
843
849
|
else {
|
@@ -15724,7 +15730,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
|
|
15724
15730
|
position: index + '',
|
15725
15731
|
contentFormat: 'video',
|
15726
15732
|
traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo,
|
15727
|
-
loadTime: (
|
15733
|
+
loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + ''
|
15728
15734
|
}
|
15729
15735
|
});
|
15730
15736
|
setIsFirstPlay(false);
|
@@ -16111,7 +16117,7 @@ const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onViewImageEndEven
|
|
16111
16117
|
const showFirstImageFn = useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
|
16112
16118
|
if (!isLoad) {
|
16113
16119
|
setImgInfo({
|
16114
|
-
loadTime:
|
16120
|
+
loadTime: new Date() - initTime + ''
|
16115
16121
|
});
|
16116
16122
|
setIsLoad(true);
|
16117
16123
|
}
|