shineout 3.9.11-beta.8 → 3.9.11

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/cjs/index.js CHANGED
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
522
522
  // 此文件由脚本自动生成,请勿直接修改。
523
523
  // This file was generated automatically by a script. Please do not modify it directly.
524
524
  var _default = exports.default = {
525
- version: '3.9.11-beta.8'
525
+ version: '3.9.11'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12402,7 +12402,7 @@ var handleStyle = function handleStyle(style) {
12402
12402
  };
12403
12403
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12404
12404
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12405
- /* harmony default export */ var version = ('3.9.11-beta.8');
12405
+ /* harmony default export */ var version = ('3.9.11');
12406
12406
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12407
12407
 
12408
12408
 
@@ -23207,7 +23207,7 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
23207
23207
  bottom: 0,
23208
23208
  width: '100%',
23209
23209
  height: '100%',
23210
- backgroundColor: src.popoverBackgroundColor,
23210
+ backgroundColor: "var(--popover-background-color, ".concat(src.popoverBackgroundColor, ")"),
23211
23211
  clipPath: "path('".concat(arrowClipPath, "')")
23212
23212
  }
23213
23213
  },
@@ -33729,7 +33729,8 @@ var Popover = function Popover(props) {
33729
33729
  var containerStyle = {
33730
33730
  display: open ? undefined : 'none',
33731
33731
  borderColor: props.border,
33732
- backgroundColor: props.background
33732
+ backgroundColor: props.background,
33733
+ '--popover-background-color': props.background
33733
33734
  };
33734
33735
  if (popupGap) {
33735
33736
  Object.assign(containerStyle, {
@@ -41422,15 +41423,8 @@ var useTree = function useTree(props) {
41422
41423
  if (props.datum) return;
41423
41424
  if (!dataUpdate) return;
41424
41425
  setData(data);
41425
- var nextExpanded = props.expanded || props.defaultExpanded || [];
41426
- if (!defaultExpandAll && !shallowEqual(nextExpanded, expanded)) {
41427
- onExpand(nextExpanded);
41428
- updateExpanded(nextExpanded, true);
41429
- }
41430
- updateInnerCheckStatus();
41431
- }, [props.data]);
41432
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
41433
41426
  if (defaultExpandAll) {
41427
+ // data 变化后 dataMap 已由 setData 填充,直接收集所有可展开节点
41434
41428
  var nextExpanded = [];
41435
41429
  context.dataMap.forEach(function (item, k) {
41436
41430
  if (item[childrenKey]) {
@@ -41439,8 +41433,15 @@ var useTree = function useTree(props) {
41439
41433
  });
41440
41434
  onExpand(nextExpanded);
41441
41435
  updateExpanded(nextExpanded, true);
41436
+ } else {
41437
+ var _nextExpanded = props.expanded || props.defaultExpanded || [];
41438
+ if (!shallowEqual(_nextExpanded, expanded)) {
41439
+ onExpand(_nextExpanded);
41440
+ updateExpanded(_nextExpanded, true);
41441
+ }
41442
41442
  }
41443
- }, [context.dataMap, props.data]);
41443
+ updateInnerCheckStatus();
41444
+ }, [props.data]);
41444
41445
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
41445
41446
  if (props.datum) return;
41446
41447
  setValue(value);
@@ -41626,11 +41627,13 @@ var Scroll = function Scroll(props) {
41626
41627
  };
41627
41628
 
41628
41629
  // 当滚动容器的高度为 0 时,paddingTop 为 0,避免滚动条抖动现象
41630
+ // 优先使用 props.height 计算 paddingTop,避免动画过程中 useResize 读到中间值导致滚动条闪烁
41631
+ var stableHeight = typeof props.height === 'number' ? props.height : height;
41629
41632
  var paddingTop = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
41630
- var maxHeight = Math.max(0, scrollHeight - height);
41633
+ var maxHeight = Math.max(0, scrollHeight - stableHeight);
41631
41634
  if (keepScrollTop) return maxHeight;
41632
41635
  return height === 0 ? 0 : maxHeight;
41633
- }, [scrollHeight, height]);
41636
+ }, [scrollHeight, stableHeight, height]);
41634
41637
  var placeStyle = {
41635
41638
  paddingTop: paddingTop,
41636
41639
  width: scrollWidth,
@@ -56228,7 +56231,8 @@ var useNumberFormat = function useNumberFormat(props) {
56228
56231
  var focusedRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(false);
56229
56232
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
56230
56233
  // 聚焦编辑期间不同步外部值,避免 form 回填 defaultValue 覆盖用户输入
56231
- if (props.value !== inernalInputValue && !focusedRef.current) {
56234
+ // 但当外部值被清空时( clearable 触发),即使聚焦也需要同步
56235
+ if (props.value !== inernalInputValue && (!focusedRef.current || props.value == null || props.value === '')) {
56232
56236
  setInternalInputValue(getStringValue(props.value));
56233
56237
  }
56234
56238
  }, [props.value]);
@@ -58222,6 +58226,7 @@ var TreeVirtual = function TreeVirtual(props) {
58222
58226
  iconClass = props.iconClass,
58223
58227
  leafClass = props.leafClass,
58224
58228
  nodeClass = props.nodeClass,
58229
+ actionOnClick = props.actionOnClick,
58225
58230
  onNodeClick = props.onNodeClick,
58226
58231
  onToggle = props.onToggle,
58227
58232
  onChange = props.onChange;
@@ -58257,6 +58262,7 @@ var TreeVirtual = function TreeVirtual(props) {
58257
58262
  parentClickExpand: parentClickExpand,
58258
58263
  doubleClickExpand: doubleClickExpand,
58259
58264
  expanded: expanded,
58265
+ actionOnClick: actionOnClick,
58260
58266
  onNodeClick: onNodeClick,
58261
58267
  onToggle: onToggle,
58262
58268
  onChange: onChange,
@@ -71536,7 +71542,7 @@ var TreeSelect = function TreeSelect(props0) {
71536
71542
  onTiledFilter === null || onTiledFilter === void 0 || onTiledFilter(trim ? text.trim() : text, from);
71537
71543
  };
71538
71544
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
71539
- if (virtual && expanded) {
71545
+ if (virtual && expanded && expanded.length > 0) {
71540
71546
  setVirtualExpanded(expanded);
71541
71547
  }
71542
71548
  }, [expanded]);
@@ -75551,7 +75557,7 @@ var upload_interface = __webpack_require__(8821);
75551
75557
 
75552
75558
 
75553
75559
  /* harmony default export */ var src_0 = ({
75554
- version: '3.9.11-beta.8'
75560
+ version: '3.9.11'
75555
75561
  });
75556
75562
  }();
75557
75563
  /******/ return __webpack_exports__;