shineout 3.9.6-beta.5 → 3.9.6-beta.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/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.6-beta.5'
525
+ version: '3.9.6-beta.7'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12401,7 +12401,7 @@ var handleStyle = function handleStyle(style) {
12401
12401
  };
12402
12402
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12403
12403
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12404
- /* harmony default export */ var version = ('3.9.6-beta.5');
12404
+ /* harmony default export */ var version = ('3.9.6-beta.7');
12405
12405
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12406
12406
 
12407
12407
 
@@ -30604,7 +30604,14 @@ var isLink = function isLink(el) {
30604
30604
  if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(el)) return false;
30605
30605
  if (!el.type) return false;
30606
30606
  if (el.type === 'a') return true;
30607
- if (el.props && el.props.to) return true;
30607
+ // 只有当是已知的路由组件时才判断 to 属性
30608
+ if (el.props && el.props.to) {
30609
+ var typeName = typeof el.type === 'function' ? el.type.name : '';
30610
+ var displayName = typeof_default()(el.type) === 'object' && el.type !== null ? el.type.displayName : '';
30611
+ // 检查是否为常见的路由链接组件
30612
+ var isRouterComponent = typeName === 'Link' || typeName === 'NavLink' || displayName === 'Link' || displayName === 'NavLink';
30613
+ return isRouterComponent;
30614
+ }
30608
30615
  }
30609
30616
  return false;
30610
30617
  };
@@ -55548,6 +55555,9 @@ input_input_Input.displayName = 'ShineoutInput';
55548
55555
 
55549
55556
 
55550
55557
 
55558
+ // Components that support innerTitle and placeTitle props
55559
+
55560
+ var INNER_TITLE_SUPPORTED_COMPONENTS = ['Input', 'Select', 'Cascader', 'DatePicker', 'Textarea', 'EditableArea'];
55551
55561
  /* harmony default export */ var input_group = (function (props) {
55552
55562
  var _jssStyle$input;
55553
55563
  var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_.useState(false),
@@ -55627,12 +55637,23 @@ input_input_Input.displayName = 'ShineoutInput';
55627
55637
  }, i);
55628
55638
  }
55629
55639
  if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(child)) {
55630
- return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(child, objectSpread2_default()(objectSpread2_default()({}, getProps(child)), {}, {
55640
+ var _child$type;
55641
+ var additionalProps = objectSpread2_default()(objectSpread2_default()({}, getProps(child)), {}, {
55631
55642
  disabled: child.props.disabled || disabled,
55632
- size: child.props.size || size,
55633
- innerTitle: child.props.innerTitle || innerTitle,
55634
- placeTitle: child.props.placeTitle || placeTitle
55635
- }));
55643
+ size: child.props.size || size
55644
+ });
55645
+
55646
+ // Only pass innerTitle and placeTitle to components that support them
55647
+ // Check by displayName to identify form components that accept these props
55648
+ var displayName = (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName;
55649
+ var supportsInnerTitle = displayName && INNER_TITLE_SUPPORTED_COMPONENTS.some(function (name) {
55650
+ return displayName.includes(name);
55651
+ });
55652
+ if (supportsInnerTitle) {
55653
+ additionalProps.innerTitle = child.props.innerTitle || innerTitle;
55654
+ additionalProps.placeTitle = child.props.placeTitle || placeTitle;
55655
+ }
55656
+ return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(child, additionalProps);
55636
55657
  }
55637
55658
  return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
55638
55659
  children: child
@@ -66496,8 +66517,10 @@ var thead_toNum = toNum;
66496
66517
  var handleDragMove = usePersistFn(function (deltaX) {
66497
66518
  props === null || props === void 0 || props.dragCol(context.dragIndex, deltaX);
66498
66519
  });
66499
- var handleDragEnd = usePersistFn(function () {
66500
- props === null || props === void 0 || props.resizeCol(context.dragIndex);
66520
+ var handleDragEnd = usePersistFn(function (deltaX) {
66521
+ if (deltaX !== 0) {
66522
+ props === null || props === void 0 || props.resizeCol(context.dragIndex);
66523
+ }
66501
66524
  context.dragIndex = -1;
66502
66525
  });
66503
66526
  var _useDragMock = use_drag_mock({
@@ -74822,7 +74845,7 @@ var upload_interface = __webpack_require__(8821);
74822
74845
 
74823
74846
 
74824
74847
  /* harmony default export */ var src_0 = ({
74825
- version: '3.9.6-beta.5'
74848
+ version: '3.9.6-beta.7'
74826
74849
  });
74827
74850
  }();
74828
74851
  /******/ return __webpack_exports__;