shineout 3.8.9 → 3.8.10-beta.2

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.8.9'
525
+ version: '3.8.10-beta.2'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12398,7 +12398,7 @@ var handleStyle = function handleStyle(style) {
12398
12398
  };
12399
12399
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12400
12400
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12401
- /* harmony default export */ var version = ('3.8.9');
12401
+ /* harmony default export */ var version = ('3.8.10-beta.2');
12402
12402
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12403
12403
 
12404
12404
 
@@ -42340,7 +42340,7 @@ var result_Result = function Result(props) {
42340
42340
  handleResultItemClick(e, item);
42341
42341
  };
42342
42342
  var content = renderResultContent(item, index, nodes);
42343
- if (!content) return null;
42343
+ if (!content && content !== 0) return null;
42344
42344
  if (renderResultContentProp) {
42345
42345
  // cascader 不渲染tag
42346
42346
  return renderResultContentProp(objectSpread2_default()({
@@ -49136,7 +49136,7 @@ var useDescriptions = function useDescriptions(props) {
49136
49136
 
49137
49137
 
49138
49138
  var Descriptions = function Descriptions(props) {
49139
- var _jssStyleProps$descri, _renderItem$;
49139
+ var _jssStyleProps$descri;
49140
49140
  var className = props.className,
49141
49141
  jssStyleProps = props.jssStyle,
49142
49142
  style = props.style,
@@ -49164,6 +49164,11 @@ var Descriptions = function Descriptions(props) {
49164
49164
  labelStyle: labelStyle
49165
49165
  }),
49166
49166
  renderItem = _useDescriptions.renderItem;
49167
+ var longestItem = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
49168
+ return renderItem.reduce(function (prev, curr) {
49169
+ return prev.length >= curr.length ? prev : curr;
49170
+ }, []);
49171
+ }, [renderItem]);
49167
49172
  var jssStyle = (jssStyleProps === null || jssStyleProps === void 0 || (_jssStyleProps$descri = jssStyleProps.descriptions) === null || _jssStyleProps$descri === void 0 ? void 0 : _jssStyleProps$descri.call(jssStyleProps)) || {};
49168
49173
  var Header = function Header() {
49169
49174
  if (!title && !extra) return null;
@@ -49260,7 +49265,7 @@ var Descriptions = function Descriptions(props) {
49260
49265
  cellPadding: 0,
49261
49266
  cellSpacing: 0,
49262
49267
  children: [layout === 'inlineHorizontal' && typeof column === 'number' && column > 1 && /*#__PURE__*/(0,jsx_runtime.jsx)("colgroup", {
49263
- children: (_renderItem$ = renderItem[0]) === null || _renderItem$ === void 0 ? void 0 : _renderItem$.map(function (_, index, arr) {
49268
+ children: longestItem === null || longestItem === void 0 ? void 0 : longestItem.map(function (_, index, arr) {
49264
49269
  return /*#__PURE__*/(0,jsx_runtime.jsx)("col", {
49265
49270
  style: {
49266
49271
  width: "".concat(1 / arr.length * 100, "%")
@@ -55539,6 +55544,9 @@ var ListOption = function ListOption(props) {
55539
55544
 
55540
55545
 
55541
55546
 
55547
+ var list_defaultRenderItem = function defaultRenderItem(d) {
55548
+ return d;
55549
+ };
55542
55550
  var list_List = function List(props) {
55543
55551
  var _jssStyle$select;
55544
55552
  var jssStyle = props.jssStyle,
@@ -55558,9 +55566,7 @@ var list_List = function List(props) {
55558
55566
  optionListRef = props.optionListRef,
55559
55567
  isAnimationFinish = props.isAnimationFinish,
55560
55568
  _props$renderItem = props.renderItem,
55561
- renderItemProp = _props$renderItem === void 0 ? function (d) {
55562
- return d;
55563
- } : _props$renderItem,
55569
+ renderItemProp = _props$renderItem === void 0 ? list_defaultRenderItem : _props$renderItem,
55564
55570
  closePop = props.closePop,
55565
55571
  onControlTypeChange = props.onControlTypeChange,
55566
55572
  onOptionClick = props.onOptionClick;
@@ -57687,9 +57693,7 @@ function Select(props0) {
57687
57693
  autoAdapt = props.autoAdapt,
57688
57694
  groupBy = props.groupBy,
57689
57695
  _props$renderItem = props.renderItem,
57690
- renderItemProp = _props$renderItem === void 0 ? function (d) {
57691
- return d;
57692
- } : _props$renderItem,
57696
+ renderItemProp = _props$renderItem === void 0 ? list_defaultRenderItem : _props$renderItem,
57693
57697
  renderResultProp = props.renderResult,
57694
57698
  renderUnmatched = props.renderUnmatched,
57695
57699
  resultClassName = props.resultClassName,
@@ -57910,7 +57914,8 @@ function Select(props0) {
57910
57914
  });
57911
57915
  var rootClass = classnames_default()(className, styles === null || styles === void 0 ? void 0 : styles.rootClass, styles === null || styles === void 0 ? void 0 : styles.wrapper, isEmpty && styles.wrapperEmpty, open && (styles === null || styles === void 0 ? void 0 : styles.wrapperOpen), open && trigger === 'hover' && (styles === null || styles === void 0 ? void 0 : styles.triggerHover), disabled === true && (styles === null || styles === void 0 ? void 0 : styles.wrapperDisabled), disabled !== true && focused && (styles === null || styles === void 0 ? void 0 : styles.wrapperFocus), innerTitle && (styles === null || styles === void 0 ? void 0 : styles.wrapperInnerTitle), size === 'small' && (styles === null || styles === void 0 ? void 0 : styles.wrapperSmall), size === 'large' && (styles === null || styles === void 0 ? void 0 : styles.wrapperLarge), (!!props.error || props.status === 'error') && (styles === null || styles === void 0 ? void 0 : styles.wrapperError), clearable && (styles === null || styles === void 0 ? void 0 : styles.clearable), !border && (styles === null || styles === void 0 ? void 0 : styles.wrapperNoBorder), !!underline && (styles === null || styles === void 0 ? void 0 : styles.wrapperUnderline), defineProperty_default()({}, styles === null || styles === void 0 ? void 0 : styles.multiple, multiple));
57912
57916
  var getRenderItem = function getRenderItem(data, index) {
57913
- return typeof renderItemProp === 'function' ? renderItemProp(data, index) : (data === null || data === void 0 ? void 0 : data[renderItemProp]) || '';
57917
+ var _data$renderItemProp;
57918
+ return typeof renderItemProp === 'function' ? renderItemProp(data, index) : (_data$renderItemProp = data === null || data === void 0 ? void 0 : data[renderItemProp]) !== null && _data$renderItemProp !== void 0 ? _data$renderItemProp : '';
57914
57919
  };
57915
57920
  var renderItem = getRenderItem;
57916
57921
  var handleFocus = usePersistFn(function (e) {
@@ -73394,7 +73399,7 @@ var upload_interface = __webpack_require__(8821);
73394
73399
 
73395
73400
 
73396
73401
  /* harmony default export */ var src_0 = ({
73397
- version: '3.8.9'
73402
+ version: '3.8.10-beta.2'
73398
73403
  });
73399
73404
  }();
73400
73405
  /******/ return __webpack_exports__;