pb-sxp-ui 1.19.14 → 1.19.15

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 CHANGED
@@ -10,7 +10,6 @@ var qs = require('qs');
10
10
  var EventEmitter = require('eventemitter3');
11
11
  var css = require('@emotion/css');
12
12
  var ReactDOM = require('react-dom');
13
- var fundebug = require('fundebug-javascript');
14
13
 
15
14
  function _interopNamespaceDefault(e) {
16
15
  var n = Object.create(null);
@@ -19001,8 +19000,6 @@ const NavBack = ({ data, minusHeight, tagHeight, onClick }) => {
19001
19000
  };
19002
19001
  var NavBack$1 = React.memo(NavBack);
19003
19002
 
19004
- if (fundebug)
19005
- fundebug.apikey = '522a79b0a6242a8ad683cc045ec9e65bbac3a0f620561ac49d39eaad4f303618';
19006
19003
  const useVisibleHeight = () => {
19007
19004
  var _a, _b;
19008
19005
  const [visibleHeight, setVisibleHeight] = React.useState(0);
@@ -19070,7 +19067,9 @@ const useVisibleHeight = () => {
19070
19067
  fillAvailableInPx: getFillAvailableInPx()
19071
19068
  };
19072
19069
  console.log(systemInfo, 'fundebug-init--------------------->systemInfo');
19073
- fundebug.notify('Collect_Info', 'init', { metaData: { systemInfo, otherInfo: {} } });
19070
+ if ('fundebug' in window) {
19071
+ window === null || window === void 0 ? void 0 : window.fundebug.notify('Collect_Info', 'init', { metaData: { systemInfo, otherInfo: {} } });
19072
+ }
19074
19073
  const updateHeight = React.useCallback(() => {
19075
19074
  var _a, _b, _c;
19076
19075
  const systemInfo = {
@@ -19080,7 +19079,7 @@ const useVisibleHeight = () => {
19080
19079
  screenHeight: window.screen.height,
19081
19080
  bodyHeight: (_b = document === null || document === void 0 ? void 0 : document.body) === null || _b === void 0 ? void 0 : _b.clientHeight,
19082
19081
  agent: navigator.userAgent,
19083
- version: '1.19.14',
19082
+ version: '1.19.15',
19084
19083
  safeArea: getHeightWithSafeArea(),
19085
19084
  dvh: dvhToPx(100),
19086
19085
  dvhInPx: getDvhInPx(),
@@ -19088,7 +19087,9 @@ const useVisibleHeight = () => {
19088
19087
  fillAvailableInPx: getFillAvailableInPx()
19089
19088
  };
19090
19089
  console.log(systemInfo, 'fundebug-resize--------------------->systemInfo');
19091
- fundebug.notify('Collect_Info', 'resize', { metaData: { systemInfo, otherInfo: {} } });
19090
+ if ('fundebug' in window) {
19091
+ window === null || window === void 0 ? void 0 : window.fundebug.notify('Collect_Info', 'resize', { metaData: { systemInfo, otherInfo: {} } });
19092
+ }
19092
19093
  const height = ((_c = document === null || document === void 0 ? void 0 : document.documentElement) === null || _c === void 0 ? void 0 : _c.clientHeight) || (window === null || window === void 0 ? void 0 : window.innerHeight);
19093
19094
  setVisibleHeight(height);
19094
19095
  }, [getHeightWithSafeArea, dvhToPx, getDvhInPx, getVhInPx, getFillAvailableInPx]);
@@ -19332,9 +19333,22 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19332
19333
  const numericValue = parseInt(value) || 0;
19333
19334
  return numericValue;
19334
19335
  };
19336
+ const getDvhInPx = () => {
19337
+ const detector = document.createElement('div');
19338
+ detector.style.position = 'fixed';
19339
+ detector.style.bottom = `${getHeightWithSafeArea()}px`;
19340
+ detector.style.left = '0';
19341
+ detector.style.height = '100dvh';
19342
+ detector.style.visibility = 'hidden';
19343
+ detector.style.zIndex = '-1';
19344
+ document.body.appendChild(detector);
19345
+ const dvhInPx = detector.clientHeight;
19346
+ document.body.removeChild(detector);
19347
+ return dvhInPx;
19348
+ };
19335
19349
  const height = React.useMemo(() => {
19336
- return visibleHeight - minusHeight - tagHeight - getHeightWithSafeArea();
19337
- }, [minusHeight, visibleHeight, tagHeight, getHeightWithSafeArea, containerHeight]);
19350
+ return getDvhInPx() - minusHeight - tagHeight - getHeightWithSafeArea();
19351
+ }, [minusHeight, visibleHeight, tagHeight, getHeightWithSafeArea, containerHeight, getDvhInPx]);
19338
19352
  const visList = React.useMemo(() => {
19339
19353
  var _a;
19340
19354
  const list = activeIndex === 0 && !waterFallData && !isEditor && !isDiyH5