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/pb-ui.js CHANGED
@@ -820,7 +820,7 @@
820
820
  !((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _a === void 0 ? void 0 : _a[eventName])) {
821
821
  return;
822
822
  }
823
- let jsonParams = JSON.parse(JSON.stringify((_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _b === void 0 ? void 0 : _b[eventName]));
823
+ let jsonParams = lodash.cloneDeep((_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _b === void 0 ? void 0 : _b[eventName]);
824
824
  const urlParams = new URLSearchParams(window.location.search);
825
825
  const fbclid = urlParams === null || urlParams === void 0 ? void 0 : urlParams.get('fbclid');
826
826
  const fix_par = {
@@ -849,10 +849,16 @@
849
849
  const matches = value === null || value === void 0 ? void 0 : value.match(regex);
850
850
  if (matches) {
851
851
  matches.forEach((match) => {
852
+ var _a;
852
853
  const prop = match.substring(2, match.length - 2);
853
854
  try {
854
855
  let replaceValue = new Function('fix_par', 'product', `return ${prop}`)(fix_par, product);
855
856
  if (replaceValue) {
857
+ if (prop.indexOf('currency') &&
858
+ (replaceValue === null || replaceValue === void 0 ? void 0 : replaceValue.indexOf('-')) !== -1 &&
859
+ typeof replaceValue === 'string') {
860
+ replaceValue = (_a = replaceValue === null || replaceValue === void 0 ? void 0 : replaceValue.split('-')) === null || _a === void 0 ? void 0 : _a[0];
861
+ }
856
862
  obj[key] = replaceValue;
857
863
  }
858
864
  else {
@@ -15739,7 +15745,7 @@ Made in Italy` })));
15739
15745
  position: index + '',
15740
15746
  contentFormat: 'video',
15741
15747
  traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo,
15742
- loadTime: ((loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current)).toFixed(2) + ''
15748
+ loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + ''
15743
15749
  }
15744
15750
  });
15745
15751
  setIsFirstPlay(false);
@@ -16126,7 +16132,7 @@ Made in Italy` })));
16126
16132
  const showFirstImageFn = React.useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
16127
16133
  if (!isLoad) {
16128
16134
  setImgInfo({
16129
- loadTime: (new Date() - initTime).toFixed(2) + ''
16135
+ loadTime: new Date() - initTime + ''
16130
16136
  });
16131
16137
  setIsLoad(true);
16132
16138
  }