shineout 3.5.1-beta.5 → 3.5.1

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
@@ -500,5 +500,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
500
500
  // 此文件由脚本自动生成,请勿直接修改。
501
501
  // This file was generated automatically by a script. Please do not modify it directly.
502
502
  var _default = exports.default = {
503
- version: '3.5.1-beta.5'
503
+ version: '3.5.1'
504
504
  };
package/dist/shineout.js CHANGED
@@ -12002,7 +12002,7 @@ var handleStyle = function handleStyle(style) {
12002
12002
  };
12003
12003
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12004
12004
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12005
- /* harmony default export */ var version = ('3.5.1-beta.5');
12005
+ /* harmony default export */ var version = ('3.5.1');
12006
12006
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12007
12007
 
12008
12008
 
@@ -36554,6 +36554,7 @@ var useFilter = function useFilter(props) {
36554
36554
 
36555
36555
 
36556
36556
 
36557
+
36557
36558
  function use_tree_toArray(value) {
36558
36559
  if (!value) return [];
36559
36560
  if (!Array.isArray(value)) return [value];
@@ -36602,6 +36603,10 @@ var useTree = function useTree(props) {
36602
36603
  unmatch = props.unmatch,
36603
36604
  isControlled = props.isControlled,
36604
36605
  onExpandProp = props.onExpand;
36606
+ var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
36607
+ _useState2 = slicedToArray_default()(_useState, 2),
36608
+ inited = _useState2[0],
36609
+ setInited = _useState2[1];
36605
36610
  var _useInputAble = useInputAble({
36606
36611
  value: expandedProp,
36607
36612
  defaultValue: defaultExpanded,
@@ -36727,10 +36732,12 @@ var useTree = function useTree(props) {
36727
36732
  if (oroginData) {
36728
36733
  return oroginData;
36729
36734
  }
36730
- if (!unmatch) return null;
36735
+ // if (!unmatch) return null;
36736
+ // if (!unmatch) return { IS_NOT_MATCHED_VALUE: true, value: null};
36737
+ // return { IS_NOT_MATCHED_VALUE: true, value: !unmatch ? null : id };
36731
36738
  return {
36732
36739
  IS_NOT_MATCHED_VALUE: true,
36733
- value: id
36740
+ value: !unmatch ? null : id
36734
36741
  };
36735
36742
  };
36736
36743
  var getDataByValues = function getDataByValues(values) {
@@ -36767,7 +36774,6 @@ var useTree = function useTree(props) {
36767
36774
  console.error("There is already a key \"".concat(id, "\" exists. The key must be unique."));
36768
36775
  continue;
36769
36776
  }
36770
-
36771
36777
  // 制作 data mapping
36772
36778
  context.dataMap.set(id, item);
36773
36779
  var _isDisabled = !!disabled;
@@ -36945,6 +36951,9 @@ var useTree = function useTree(props) {
36945
36951
  if (props.datum) return;
36946
36952
  setValue(value);
36947
36953
  }, [value]);
36954
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
36955
+ setInited(true);
36956
+ }, []);
36948
36957
  var datum = use_latest_obj({
36949
36958
  get: get,
36950
36959
  set: set,
@@ -36969,6 +36978,7 @@ var useTree = function useTree(props) {
36969
36978
  updateMap: context.updateMap
36970
36979
  });
36971
36980
  return {
36981
+ inited: inited,
36972
36982
  datum: props.datum || datum,
36973
36983
  expanded: expanded,
36974
36984
  onExpand: onExpand
@@ -38666,7 +38676,7 @@ var result_Result = function Result(props) {
38666
38676
  };
38667
38677
  var empty = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
38668
38678
  return isEmptyResult();
38669
- }, [props.value]);
38679
+ }, [props.value, props.data, getDataByValues]);
38670
38680
  var basePlaceholder = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
38671
38681
  return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
38672
38682
  className: classnames_default()(styles.placeholder, styles.ellipsis),
@@ -38921,7 +38931,7 @@ var result_Result = function Result(props) {
38921
38931
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
38922
38932
  handleResetMore();
38923
38933
  }, [valueProp, data]);
38924
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
38934
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
38925
38935
  // datum.getDataByValues(value); 需要等待 useTree useEffect 执行完毕 才能获取到
38926
38936
  render();
38927
38937
  }, [data]);
@@ -66408,7 +66418,7 @@ var upload_interface = __webpack_require__(8821);
66408
66418
 
66409
66419
 
66410
66420
  /* harmony default export */ var src_0 = ({
66411
- version: '3.5.1-beta.5'
66421
+ version: '3.5.1'
66412
66422
  });
66413
66423
  }();
66414
66424
  /******/ return __webpack_exports__;