shineout 3.0.9 → 3.0.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/dist/shineout.js CHANGED
@@ -12019,7 +12019,7 @@ var handleStyle = function handleStyle(style) {
12019
12019
  };
12020
12020
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12021
12021
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12022
- /* harmony default export */ var version = ('3.0.9');
12022
+ /* harmony default export */ var version = ('3.0.11');
12023
12023
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12024
12024
 
12025
12025
 
@@ -17029,6 +17029,7 @@ var datePickerStyle = objectSpread2_default()(objectSpread2_default()({
17029
17029
  resultText: {
17030
17030
  lineHeight: src.lineHeightDynamic,
17031
17031
  position: 'relative',
17032
+ zIndex: 0,
17032
17033
  flex: '1',
17033
17034
  minWidth: 0,
17034
17035
  '&::before': {
@@ -17037,7 +17038,25 @@ var datePickerStyle = objectSpread2_default()(objectSpread2_default()({
17037
17038
  }
17038
17039
  },
17039
17040
  resultTextPadding: {
17041
+ position: 'relative',
17042
+ zIndex: 2,
17043
+ '& > input': {
17044
+ color: 'inherit',
17045
+ padding: '0',
17046
+ border: '0',
17047
+ outline: '0',
17048
+ fontSize: 'inherit',
17049
+ lineHeight: src.lineHeightDynamic,
17050
+ backgroundColor: 'transparent',
17051
+ width: '100%',
17052
+ '&::placeholder': {
17053
+ color: src.datePickerPlaceholderColor
17054
+ }
17055
+ }
17056
+ },
17057
+ resultTextBg: {
17040
17058
  position: 'absolute',
17059
+ zIndex: 1,
17041
17060
  padding: "0 ".concat(src.datePickerResultTextPaddingX),
17042
17061
  left: "calc(-1 * ".concat(src.datePickerResultTextPaddingX, ")"),
17043
17062
  right: "calc(-1 * ".concat(src.datePickerResultTextPaddingX, ")"),
@@ -17059,7 +17078,7 @@ var datePickerStyle = objectSpread2_default()(objectSpread2_default()({
17059
17078
  }
17060
17079
  },
17061
17080
  resultTextActive: {
17062
- '& $resultTextPadding': {
17081
+ '& $resultTextBg': {
17063
17082
  backgroundColor: src.datePickerResultTextActiveBackgroundColor
17064
17083
  }
17065
17084
  },
@@ -30266,12 +30285,13 @@ var Checkbox = function Checkbox(props) {
30266
30285
 
30267
30286
 
30268
30287
  function useInputAble(props) {
30288
+ var _props$value;
30269
30289
  var valuePo = props.value,
30270
30290
  onChange = props.onChange,
30271
30291
  control = props.control,
30272
30292
  beforeChange = props.beforeChange,
30273
30293
  delay = props.delay;
30274
- var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(props.value || props.defaultValue),
30294
+ var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)((_props$value = props.value) !== null && _props$value !== void 0 ? _props$value : props.defaultValue),
30275
30295
  _useState2 = slicedToArray_default()(_useState, 2),
30276
30296
  stateValue = _useState2[0],
30277
30297
  changeStateValue = _useState2[1];
@@ -33666,6 +33686,7 @@ var useFilter = function useFilter(props) {
33666
33686
 
33667
33687
 
33668
33688
 
33689
+
33669
33690
  var MODE = {
33670
33691
  /**
33671
33692
  * 返回全选数据,包含父节点和子节点
@@ -33700,14 +33721,15 @@ var useTree = function useTree(props) {
33700
33721
  mode = props.mode,
33701
33722
  activeProp = props.active,
33702
33723
  expandedProp = props.expanded,
33724
+ _props$dataUpdate = props.dataUpdate,
33725
+ dataUpdate = _props$dataUpdate === void 0 ? true : _props$dataUpdate,
33703
33726
  _props$defaultExpande = props.defaultExpanded,
33704
33727
  defaultExpanded = _props$defaultExpande === void 0 ? [] : _props$defaultExpande,
33705
33728
  defaultExpandAll = props.defaultExpandAll,
33706
33729
  disabledProps = props.disabled,
33707
33730
  unmatch = props.unmatch,
33708
33731
  isControlled = props.isControlled,
33709
- onExpandProp = props.onExpand,
33710
- keepCache = props.keepCache;
33732
+ onExpandProp = props.onExpand;
33711
33733
  var _useInputAble = useInputAble({
33712
33734
  value: expandedProp,
33713
33735
  defaultValue: defaultExpanded,
@@ -33720,6 +33742,7 @@ var useTree = function useTree(props) {
33720
33742
  var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
33721
33743
  pathMap: new Map(),
33722
33744
  dataMap: new Map(),
33745
+ forceUpdateMap: new Map(),
33723
33746
  valueMap: new Map(),
33724
33747
  updateMap: new Map(),
33725
33748
  unmatchedValueMap: new Map(),
@@ -33731,11 +33754,19 @@ var useTree = function useTree(props) {
33731
33754
  }),
33732
33755
  context = _useRef.current;
33733
33756
 
33757
+ // 注册刷新方法
33758
+ var bindUpdate = usePersistFn(function (id, update) {
33759
+ context.forceUpdateMap.set(id, update);
33760
+ });
33761
+ var unBindUpdate = usePersistFn(function (id) {
33762
+ context.forceUpdateMap.delete(id);
33763
+ });
33764
+
33734
33765
  // 注册节点
33735
33766
  var bindNode = function bindNode(id, update) {
33736
33767
  context.updateMap.set(id, update);
33737
33768
  var isActive = activeProp === id;
33738
- var expandeds = expanded || defaultExpanded;
33769
+ var expandeds = expanded;
33739
33770
  if (defaultExpandAll) {
33740
33771
  return {
33741
33772
  active: isActive,
@@ -33820,16 +33851,8 @@ var useTree = function useTree(props) {
33820
33851
  return checked;
33821
33852
  };
33822
33853
  var getDataById = function getDataById(id) {
33823
- if (keepCache) {
33824
- if (!context.valueDataCache) {
33825
- context.valueDataCache = new Map();
33826
- }
33827
- var cache = context.valueDataCache.get(id);
33828
- if (cache !== undefined) return cache;
33829
- }
33830
33854
  var oroginData = context.dataMap.get(id);
33831
33855
  if (oroginData) {
33832
- if (keepCache) context.valueDataCache.set(id, oroginData);
33833
33856
  return oroginData;
33834
33857
  }
33835
33858
  if (!unmatch) return null;
@@ -33844,8 +33867,13 @@ var useTree = function useTree(props) {
33844
33867
  }
33845
33868
  return getDataById(values);
33846
33869
  };
33870
+ var isUnMatched = usePersistFn(function (data) {
33871
+ return isUnMatchedData(data);
33872
+ });
33847
33873
  var setValueMap = function setValueMap(id, checked) {
33848
33874
  context.valueMap.set(id, checked);
33875
+ var update = context.forceUpdateMap.get(id);
33876
+ if (update) update();
33849
33877
  };
33850
33878
  var setUnmatedValue = function setUnmatedValue() {
33851
33879
  context.unmatchedValueMap = new Map();
@@ -34034,14 +34062,17 @@ var useTree = function useTree(props) {
34034
34062
  }
34035
34063
  }, []);
34036
34064
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
34037
- setValue(value);
34065
+ if (props.datum) return;
34066
+ if (!dataUpdate) return;
34038
34067
  setData(data);
34039
34068
  }, [data]);
34069
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
34070
+ if (props.datum) return;
34071
+ setValue(value);
34072
+ }, [value]);
34040
34073
  var datum = use_latest_obj({
34041
34074
  get: get,
34042
34075
  set: set,
34043
- childrenKey: childrenKey,
34044
- data: data,
34045
34076
  getPath: getPath,
34046
34077
  getValue: getValue,
34047
34078
  getChecked: getChecked,
@@ -34052,13 +34083,18 @@ var useTree = function useTree(props) {
34052
34083
  isDisabled: isDisabled,
34053
34084
  bindNode: bindNode,
34054
34085
  getDataById: getDataById,
34086
+ bindUpdate: bindUpdate,
34087
+ unBindUpdate: unBindUpdate,
34088
+ isUnMatched: isUnMatched,
34089
+ childrenKey: childrenKey,
34090
+ data: data,
34055
34091
  pathMap: context.pathMap,
34056
34092
  dataMap: context.dataMap,
34057
34093
  valueMap: context.valueMap,
34058
34094
  updateMap: context.updateMap
34059
34095
  });
34060
34096
  return {
34061
- datum: datum,
34097
+ datum: props.datum || datum,
34062
34098
  expanded: expanded,
34063
34099
  onExpand: onExpand
34064
34100
  };
@@ -34540,9 +34576,9 @@ var Result = function Result(props) {
34540
34576
  var renderItem = function renderItem(info) {
34541
34577
  var dis = info.index === 1 ? disabledRight : disabledLeft;
34542
34578
  var className = classnames_default()(styles === null || styles === void 0 ? void 0 : styles.resultText, info.target && (styles === null || styles === void 0 ? void 0 : styles.placeholder), dis && (styles === null || styles === void 0 ? void 0 : styles.resultTextDisabled), info.index === activeIndex && (styles === null || styles === void 0 ? void 0 : styles.resultTextActive));
34543
- return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
34579
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
34544
34580
  className: className,
34545
- children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
34581
+ children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
34546
34582
  className: styles === null || styles === void 0 ? void 0 : styles.resultTextPadding,
34547
34583
  children: info.inputable ? /*#__PURE__*/(0,jsx_runtime.jsx)(result_Input, {
34548
34584
  onRef: function onRef(el) {
@@ -34577,7 +34613,9 @@ var Result = function Result(props) {
34577
34613
  className: styles === null || styles === void 0 ? void 0 : styles.placeholder,
34578
34614
  children: info.place
34579
34615
  })
34580
- })
34616
+ }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
34617
+ className: styles === null || styles === void 0 ? void 0 : styles.resultTextBg
34618
+ })]
34581
34619
  });
34582
34620
  };
34583
34621
  return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@@ -34626,10 +34664,7 @@ var ResultInput = function ResultInput(props) {
34626
34664
  var bindInputRef = function bindInputRef(ref) {
34627
34665
  inputRef.current = ref;
34628
34666
  };
34629
- var handleBlur = function handleBlur(e) {
34630
- if (e.target.value === inputText) {
34631
- return;
34632
- }
34667
+ var handleBlur = function handleBlur() {
34633
34668
  if (trim) {
34634
34669
  return onInputBlur === null || onInputBlur === void 0 ? void 0 : onInputBlur(inputText === null || inputText === void 0 ? void 0 : inputText.trim());
34635
34670
  }
@@ -35125,7 +35160,6 @@ var More = function More(props) {
35125
35160
  var result_isObject = is_isObject,
35126
35161
  result_isEmpty = is_isEmpty,
35127
35162
  result_isNumber = isNumber,
35128
- result_getKey = getKey,
35129
35163
  result_isUnMatchedData = isUnMatchedData,
35130
35164
  result_isFunc = isFunc,
35131
35165
  result_isArray = isArray;
@@ -35162,7 +35196,7 @@ var result_Result = function Result(props) {
35162
35196
  onRemove = props.onRemove,
35163
35197
  onResultItemClick = props.onResultItemClick,
35164
35198
  data = props.data;
35165
- var value = [null, undefined, ''].includes(valueProp) ? [] : multiple ? valueProp : [valueProp];
35199
+ var value = [null, undefined, ''].includes(valueProp) ? [] : Array.isArray(valueProp) ? valueProp : [valueProp];
35166
35200
  var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(-1),
35167
35201
  _useState2 = slicedToArray_default()(_useState, 2),
35168
35202
  more = _useState2[0],
@@ -35238,20 +35272,9 @@ var result_Result = function Result(props) {
35238
35272
  })
35239
35273
  }, 'input');
35240
35274
  };
35241
- var renderResultItem = function renderResultItem(item, index, nodes) {
35242
- var key;
35243
- if (result_isUnMatchedData(item)) {
35244
- if (result_isFunc(keygen)) {
35245
- key = keygen(item.value, index);
35246
- if (key === undefined) key = index;
35247
- } else {
35248
- key = item.value;
35249
- }
35250
- } else {
35251
- key = result_getKey(keygen, item, index);
35252
- }
35275
+ var renderResultItem = function renderResultItem(item, index, nodes, v) {
35253
35276
  var handleClose = function handleClose() {
35254
- onRemove === null || onRemove === void 0 || onRemove(item, key, index);
35277
+ onRemove === null || onRemove === void 0 || onRemove(item, v);
35255
35278
  };
35256
35279
  var isDisabled;
35257
35280
  if (isFunc(disabled)) {
@@ -35261,7 +35284,7 @@ var result_Result = function Result(props) {
35261
35284
  }
35262
35285
  var resultClassName;
35263
35286
  if (isFunc(props.resultClassName)) {
35264
- resultClassName = props.resultClassName(key);
35287
+ resultClassName = props.resultClassName(result_isUnMatchedData(item) ? item.value : item);
35265
35288
  } else {
35266
35289
  resultClassName = props.resultClassName;
35267
35290
  }
@@ -35271,8 +35294,9 @@ var result_Result = function Result(props) {
35271
35294
  var content = renderResultContent(item, index, nodes);
35272
35295
  if (!content) return null;
35273
35296
  if (renderResultContentProp) {
35297
+ // cascader 不渲染tag
35274
35298
  return renderResultContentProp(objectSpread2_default()({
35275
- key: key,
35299
+ key: index,
35276
35300
  size: size,
35277
35301
  disabled: isDisabled,
35278
35302
  className: classnames_default()(styles.tag, styles.hideTag, resultClassName),
@@ -35298,7 +35322,7 @@ var result_Result = function Result(props) {
35298
35322
  type: disabled === true ? 'dark' : undefined
35299
35323
  })), {}, {
35300
35324
  children: content
35301
- }), key);
35325
+ }), index);
35302
35326
  };
35303
35327
  var renderNbsp = function renderNbsp() {
35304
35328
  return /*#__PURE__*/(0,jsx_runtime.jsx)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
@@ -35329,22 +35353,28 @@ var result_Result = function Result(props) {
35329
35353
  children: content
35330
35354
  }, 'single');
35331
35355
  };
35356
+ var getValueArr = function getValueArr(v) {
35357
+ return (result_isArray(v) ? v : [v]).filter(function (v) {
35358
+ return v !== undefined && v !== null;
35359
+ });
35360
+ };
35332
35361
  var renderMultipleResult = function renderMultipleResult() {
35333
35362
  if (isEmptyResult()) return renderNbsp();
35334
35363
  // [TODO] separator 处理逻辑后续交给 hooks 处理,此处临时处理
35335
- var nextValue = value;
35364
+ var nextValue = getValueArr(value);
35336
35365
  if (separator && isString(valueProp)) {
35337
35366
  nextValue = valueProp.split(separator);
35338
35367
  }
35339
- var values = getDataByValues(nextValue);
35340
- var result = values.map(function (v, i) {
35341
- if (renderResultContentProp && i !== values.length - 1) {
35342
- return [renderResultItem(v, i, values), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
35368
+ var datas = getDataByValues(nextValue);
35369
+ var result = datas.map(function (d, i) {
35370
+ var v = nextValue[i];
35371
+ if (renderResultContentProp && i !== datas.length - 1) {
35372
+ return [renderResultItem(d, i, datas, v), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
35343
35373
  className: classnames_default()(styles.tag, styles.hideTag),
35344
35374
  children: "/"
35345
35375
  }, "separator-".concat(i))];
35346
35376
  }
35347
- return renderResultItem(v, i, values);
35377
+ return renderResultItem(d, i, datas, v);
35348
35378
  });
35349
35379
  return result;
35350
35380
  };
@@ -35750,8 +35780,8 @@ var Cascader = function Cascader(props0) {
35750
35780
  if (!path) return;
35751
35781
  handlePathChange(id, null, path);
35752
35782
  };
35753
- var handleRemove = function handleRemove(item, key, index) {
35754
- var dataKey = isUnMatchedData(item) ? item.value : datum.getKey(item, key, index);
35783
+ var handleRemove = function handleRemove(item, key) {
35784
+ var dataKey = key !== null && key !== void 0 ? key : isUnMatchedData(item) ? item.value : datum.getKey(item);
35755
35785
  var isDisabled = datum.isDisabled(dataKey);
35756
35786
  if (isDisabled) return;
35757
35787
  datum.set(dataKey, 0);
@@ -42502,6 +42532,7 @@ var useAutoSize = function useAutoSize(props) {
42502
42532
  if (!shadowRef.current) return;
42503
42533
  var v = value || '';
42504
42534
  if (shadowRef.current.value !== v) shadowRef.current.value = v;
42535
+ if (shadowRef.current.scrollHeight === 0) return;
42505
42536
  setHeight(shadowRef.current.scrollHeight);
42506
42537
  };
42507
42538
  external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(function () {
@@ -46412,6 +46443,7 @@ var ListOption = function ListOption(props) {
46412
46443
  onHover(index);
46413
46444
  };
46414
46445
  var handleClick = function handleClick() {
46446
+ if (datum.disabledCheck(data)) return;
46415
46447
  if (isChecked && multiple) {
46416
46448
  datum.remove(data);
46417
46449
  } else {
@@ -46652,6 +46684,7 @@ var useTreeContext = function useTreeContext() {
46652
46684
 
46653
46685
 
46654
46686
 
46687
+
46655
46688
  var TreeCheckbox = function TreeCheckbox(props) {
46656
46689
  var jssStyle = props.jssStyle,
46657
46690
  className = props.className,
@@ -46661,7 +46694,8 @@ var TreeCheckbox = function TreeCheckbox(props) {
46661
46694
  var _useTreeContext = useTreeContext(),
46662
46695
  getValue = _useTreeContext.getValue,
46663
46696
  set = _useTreeContext.set,
46664
- getChecked = _useTreeContext.getChecked;
46697
+ getChecked = _useTreeContext.getChecked,
46698
+ unBindUpdate = _useTreeContext.unBindUpdate;
46665
46699
  var handleChange = function handleChange(_, checked) {
46666
46700
  set(id, checked ? 1 : 0);
46667
46701
  if (onChange) {
@@ -46669,6 +46703,11 @@ var TreeCheckbox = function TreeCheckbox(props) {
46669
46703
  }
46670
46704
  };
46671
46705
  var checked = getChecked(id);
46706
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
46707
+ return function () {
46708
+ unBindUpdate(id);
46709
+ };
46710
+ }, []);
46672
46711
  return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_checkbox_checkbox
46673
46712
  //@ts-ignore
46674
46713
  , {
@@ -46716,9 +46755,12 @@ var NodeContent = function NodeContent(props) {
46716
46755
  onToggle = props.onToggle,
46717
46756
  onDragOver = props.onDragOver,
46718
46757
  onNodeClick = props.onNodeClick;
46758
+ var forceUpdate = useRender();
46719
46759
  var _useTreeContext = useTreeContext(),
46720
- isDisabled = _useTreeContext.isDisabled;
46760
+ isDisabled = _useTreeContext.isDisabled,
46761
+ bindUpdate = _useTreeContext.bindUpdate;
46721
46762
  var disabled = isDisabled(id);
46763
+ bindUpdate(id, forceUpdate);
46722
46764
  var contentStyle = (jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.tree()) || {};
46723
46765
  var rootClass = classnames_default()(contentStyle.contentWrapper, defineProperty_default()(defineProperty_default()({}, contentStyle.childnode, data[childrenKey] && data[childrenKey].length > 0), contentStyle.inlineContent, inlineNode));
46724
46766
  var contentClass = classnames_default()(contentStyle.content, isString(contentClassProp) && contentClassProp, isFunc(contentClassProp) && contentClassProp(data));
@@ -47316,7 +47358,7 @@ var Root = function Root(props) {
47316
47358
 
47317
47359
 
47318
47360
 
47319
- var tree_excluded = ["jssStyle", "line", "childrenKey", "data", "value", "mode", "keygen", "expanded", "expandIcons", "iconClass", "leafClass", "nodeClass", "contentClass", "renderItem", "defaultValue", "dataUpdate", "childrenClass", "defaultExpandAll", "defaultExpanded", "parentClickExpand", "doubleClickExpand", "dragImageSelector", "dragImageStyle", "dragSibling", "unmatch", "dragHoverExpand", "active", "disabled", "inlineNode", "highlight", "className", "onClick", "loader", "getDatum", "onDrop", "onExpand", "onChange", "onDragEnd", "onDragLeave", "onDragOver", "onDragStart", "keepCache"];
47361
+ var tree_excluded = ["jssStyle", "line", "childrenKey", "data", "value", "mode", "keygen", "expanded", "expandIcons", "iconClass", "leafClass", "nodeClass", "contentClass", "renderItem", "defaultValue", "dataUpdate", "childrenClass", "defaultExpandAll", "defaultExpanded", "parentClickExpand", "doubleClickExpand", "dragImageSelector", "dragImageStyle", "dragSibling", "unmatch", "dragHoverExpand", "active", "disabled", "inlineNode", "highlight", "className", "onClick", "loader", "getDatum", "onDrop", "onExpand", "onChange", "onDragEnd", "onDragLeave", "onDragOver", "onDragStart", "datum"];
47320
47362
 
47321
47363
 
47322
47364
 
@@ -47370,9 +47412,8 @@ var Tree = function Tree(props) {
47370
47412
  onDragLeave = props.onDragLeave,
47371
47413
  onDragOver = props.onDragOver,
47372
47414
  onDragStart = props.onDragStart,
47373
- keepCache = props.keepCache,
47415
+ propsDatum = props.datum,
47374
47416
  rest = objectWithoutProperties_default()(props, tree_excluded);
47375
- var prevData = usePrevious(data);
47376
47417
  var _useTree = use_tree({
47377
47418
  mode: mode,
47378
47419
  value: value,
@@ -47389,7 +47430,7 @@ var Tree = function Tree(props) {
47389
47430
  childrenKey: childrenKey,
47390
47431
  keygen: keygen,
47391
47432
  onExpand: onExpandProp,
47392
- keepCache: keepCache
47433
+ datum: propsDatum
47393
47434
  }),
47394
47435
  datum = _useTree.datum,
47395
47436
  expanded = _useTree.expanded,
@@ -47490,16 +47531,6 @@ var Tree = function Tree(props) {
47490
47531
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
47491
47532
  handleUpdateExpanded(expanded);
47492
47533
  }, [expanded]);
47493
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
47494
- if (!prevData) return;
47495
- if (prevData !== data && dataUpdate) {
47496
- datum.setData(data);
47497
- }
47498
- }, [data]);
47499
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
47500
- if (!value) return;
47501
- datum.setValue(value);
47502
- }, [value]);
47503
47534
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
47504
47535
  if (getDatum) getDatum(datum);
47505
47536
  }, []);
@@ -48051,8 +48082,6 @@ function Select(props0) {
48051
48082
  _useState4 = slicedToArray_default()(_useState3, 2),
48052
48083
  focused = _useState4[0],
48053
48084
  setFocused = _useState4[1];
48054
- var isPreventBlur = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
48055
- var blurEvent = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
48056
48085
  var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
48057
48086
  var optionListRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
48058
48087
  var _useFilter = use_filter({
@@ -48081,14 +48110,6 @@ function Select(props0) {
48081
48110
  rawData = _useFilter.rawData;
48082
48111
  var onCollapse = usePersistFn(function (collapse) {
48083
48112
  onCollapseProp === null || onCollapseProp === void 0 || onCollapseProp(collapse);
48084
- if (isPreventBlur.current) {
48085
- isPreventBlur.current = false;
48086
- return;
48087
- }
48088
- if (blurEvent.current && !collapse) {
48089
- blurEvent.current();
48090
- blurEvent.current = null;
48091
- }
48092
48113
  onClearCreatedData();
48093
48114
  });
48094
48115
  var renderMoreIcon = function renderMoreIcon() {
@@ -48272,12 +48293,12 @@ function Select(props0) {
48272
48293
  if (!onCreate) return;
48273
48294
  if (multiple && !text) return;
48274
48295
  // 防止点击 option 后触发 blur 事件,先把要做的事情存起来,后面再看要不要执行
48275
- blurEvent.current = function () {
48276
- if (createdData) {
48277
- handleChange(createdData);
48296
+ if (createdData) {
48297
+ if (!datum.check(createdData)) {
48298
+ datum.add(createdData);
48278
48299
  }
48279
48300
  onClearCreatedData();
48280
- };
48301
+ }
48281
48302
  };
48282
48303
  var handleFilter = function handleFilter(text, from) {
48283
48304
  var hideCreate = onCreate && hideCreateOption;
@@ -48294,7 +48315,6 @@ function Select(props0) {
48294
48315
  onFilter === null || onFilter === void 0 || onFilter(trim ? text.trim() : text, from);
48295
48316
  };
48296
48317
  var handleOptionClick = function handleOptionClick() {
48297
- isPreventBlur.current = true;
48298
48318
  if (multiple) return;
48299
48319
  // 单选结束后需要清除创建项
48300
48320
  onClearCreatedData();
@@ -53101,19 +53121,52 @@ var useTableLayout = function useTableLayout(props) {
53101
53121
  var getColgroup = use_persist_fn(function (fromDrag) {
53102
53122
  var _props$data, _target$current;
53103
53123
  var target = props !== null && props !== void 0 && (_props$data = props.data) !== null && _props$data !== void 0 && _props$data.length ? tbodyRef : theadRef;
53104
- var group = (_target$current = target.current) === null || _target$current === void 0 ? void 0 : _target$current.querySelector('colgroup');
53105
- if (!group) return;
53106
- var cols = group.querySelectorAll('col');
53124
+ var tr = (_target$current = target.current) === null || _target$current === void 0 ? void 0 : _target$current.querySelector('tr');
53125
+ if (!tr) return;
53126
+ var items = tr.children;
53107
53127
  var newCols = [];
53108
53128
  var sum = 0;
53109
- for (var i = 0, count = cols.length; i < count; i++) {
53110
- var _cols$i$getBoundingCl = cols[i].getBoundingClientRect(),
53111
- width = _cols$i$getBoundingCl.width;
53129
+ var _loop = function _loop() {
53130
+ var _items$i$getBoundingC = items[i].getBoundingClientRect(),
53131
+ width = _items$i$getBoundingC.width;
53112
53132
  sum += width;
53113
- newCols.push(width);
53133
+ var colspan = items[i].getAttribute('colspan');
53134
+ var dfWidth = props.columns.slice(i, i + (colspan ? parseInt(colspan, 10) : 1)).map(function (v) {
53135
+ return v.width;
53136
+ });
53137
+ var tempcols = [];
53138
+ var emptyNum = dfWidth.filter(function (v) {
53139
+ return v === undefined;
53140
+ }).length;
53141
+ if (dfWidth.length === 1) {
53142
+ // colspan = 1
53143
+ tempcols = [width];
53144
+ } else if (emptyNum === 0) {
53145
+ // 都有宽度按照比例分
53146
+ var all = dfWidth.reduce(function (a, b) {
53147
+ return a + b;
53148
+ }, 0);
53149
+ tempcols = dfWidth.map(function (v) {
53150
+ return v / all * width;
53151
+ });
53152
+ } else {
53153
+ // 多余的平分
53154
+ var _all = dfWidth.reduce(function (a, b) {
53155
+ return (a || 0) + (b || 0);
53156
+ }, 0);
53157
+ var rest = width - _all;
53158
+ var agv = rest > 0 ? rest / emptyNum : 0;
53159
+ tempcols = dfWidth.map(function (v) {
53160
+ return v ? v : agv;
53161
+ });
53162
+ }
53163
+ newCols = [].concat(toConsumableArray_default()(newCols), toConsumableArray_default()(tempcols));
53164
+ };
53165
+ for (var i = 0, count = items.length; i < count; i++) {
53166
+ _loop();
53114
53167
  }
53115
53168
  if (fromDrag && props.columnResizable) {
53116
- var widthArr = [].concat(newCols);
53169
+ var widthArr = toConsumableArray_default()(newCols);
53117
53170
  if (typeof props.width === 'number') {
53118
53171
  var maxWidth = Math.max(context.clientWidth, props.width + deltaXSum);
53119
53172
 
@@ -57110,13 +57163,17 @@ src_tree_tree_0.displayName = 'ShineoutTree';
57110
57163
  /* harmony default export */ var src_tree_0 = (src_tree_tree_0);
57111
57164
  ;// CONCATENATED MODULE: ../hooks/src/components/use-treeselect/use-treeselect.ts
57112
57165
 
57166
+
57167
+
57168
+
57113
57169
  var useTreeSelect = function useTreeSelect(props) {
57114
57170
  var valueProp = props.value,
57115
57171
  defaultValue = props.defaultValue,
57116
57172
  control = props.control,
57117
57173
  beforeChange = props.beforeChange,
57118
57174
  onChangeProp = props.onChange,
57119
- filterSameChange = props.filterSameChange;
57175
+ filterSameChange = props.filterSameChange,
57176
+ multiple = props.multiple;
57120
57177
  var _useInputAble = useInputAble({
57121
57178
  value: valueProp,
57122
57179
  control: control,
@@ -57127,9 +57184,27 @@ var useTreeSelect = function useTreeSelect(props) {
57127
57184
  }),
57128
57185
  value = _useInputAble.value,
57129
57186
  onChange = _useInputAble.onChange;
57187
+ var valueArr = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
57188
+ if (value === undefined || value === null || value === '') return [];
57189
+ return Array.isArray(value) ? value : [value];
57190
+ }, [value, multiple]);
57191
+ var handleChange = use_persist_fn(function (v) {
57192
+ for (var _len = arguments.length, reset = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
57193
+ reset[_key - 1] = arguments[_key];
57194
+ }
57195
+ if (!multiple && isArray(v)) {
57196
+ onChange === null || onChange === void 0 || onChange.apply(void 0, [v[0]].concat(reset));
57197
+ }
57198
+ if (multiple && !isArray(v)) {
57199
+ if (v === undefined || v === null) {
57200
+ onChange === null || onChange === void 0 || onChange.apply(void 0, [[]].concat(reset));
57201
+ } else onChange === null || onChange === void 0 || onChange.apply(void 0, [[v]].concat(reset));
57202
+ }
57203
+ onChange === null || onChange === void 0 || onChange.apply(void 0, [v].concat(reset));
57204
+ });
57130
57205
  return {
57131
- value: value,
57132
- onChange: onChange
57206
+ value: valueArr,
57207
+ onChange: handleChange
57133
57208
  };
57134
57209
  };
57135
57210
  /* harmony default export */ var use_treeselect = (useTreeSelect);
@@ -57159,7 +57234,6 @@ var tree_select_preventDefault = function preventDefault(e) {
57159
57234
  var TreeSelect = function TreeSelect(props0) {
57160
57235
  var _jssStyle$treeSelect;
57161
57236
  var props = use_with_form_config(props0);
57162
- var render = useRender();
57163
57237
  var _useConfig = useConfig(),
57164
57238
  locale = _useConfig.locale;
57165
57239
  var jssStyle = props.jssStyle,
@@ -57167,9 +57241,11 @@ var TreeSelect = function TreeSelect(props0) {
57167
57241
  size = props.size,
57168
57242
  valueProp = props.value,
57169
57243
  defaultValue = props.defaultValue,
57170
- data = props.data,
57244
+ _props$data = props.data,
57245
+ data = _props$data === void 0 ? [] : _props$data,
57171
57246
  multiple = props.multiple,
57172
- mode = props.mode,
57247
+ _props$mode = props.mode,
57248
+ mode = _props$mode === void 0 ? 1 : _props$mode,
57173
57249
  _props$line = props.line,
57174
57250
  line = _props$line === void 0 ? false : _props$line,
57175
57251
  innerTitle = props.innerTitle,
@@ -57229,9 +57305,12 @@ var TreeSelect = function TreeSelect(props0) {
57229
57305
  width: width
57230
57306
  }, style);
57231
57307
  var showInput = isFunc(props.onAdvancedFilter || onFilterProp);
57232
- var datum = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
57233
57308
  var blurEvent = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
57234
57309
  var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
57310
+ var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
57311
+ cachedMap: new Map()
57312
+ }),
57313
+ context = _useRef.current;
57235
57314
  var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
57236
57315
  _useState2 = slicedToArray_default()(_useState, 2),
57237
57316
  focused = _useState2[0],
@@ -57241,7 +57320,8 @@ var TreeSelect = function TreeSelect(props0) {
57241
57320
  onChange: onChangeProp,
57242
57321
  defaultValue: defaultValue,
57243
57322
  control: 'value' in props,
57244
- filterSameChange: filterSameChange
57323
+ filterSameChange: filterSameChange,
57324
+ multiple: multiple
57245
57325
  }),
57246
57326
  value = _useTreeSelect.value,
57247
57327
  onChange = _useTreeSelect.onChange;
@@ -57272,6 +57352,23 @@ var TreeSelect = function TreeSelect(props0) {
57272
57352
  onFilter = _useFilter.onFilter,
57273
57353
  onClearCreatedData = _useFilter.onClearCreatedData,
57274
57354
  setInputText = _useFilter.setInputText;
57355
+ var controlExpanded = 'expanded' in props || expanded !== null && expanded !== void 0 && expanded.length ? expanded : undefined;
57356
+ var _useTree = use_tree({
57357
+ mode: mode,
57358
+ value: value,
57359
+ data: data,
57360
+ unmatch: unmatch,
57361
+ disabled: disabled,
57362
+ childrenKey: childrenKey,
57363
+ keygen: keygen,
57364
+ onExpand: onExpand,
57365
+ expanded: controlExpanded,
57366
+ defaultExpanded: defaultExpanded,
57367
+ defaultExpandAll: defaultExpandAll,
57368
+ isControlled: controlExpanded !== undefined
57369
+ }),
57370
+ datum = _useTree.datum,
57371
+ onExpandTree = _useTree.onExpand;
57275
57372
  var renderMoreIcon = function renderMoreIcon() {
57276
57373
  return icons_config.treeSelect.More;
57277
57374
  };
@@ -57322,10 +57419,6 @@ var TreeSelect = function TreeSelect(props0) {
57322
57419
  jssStyle: props.jssStyle
57323
57420
  });
57324
57421
  var rootClass = classnames_default()(className, isEmpty && styles.wrapperEmpty, styles === null || styles === void 0 ? void 0 : styles.wrapper, open && (styles === null || styles === void 0 ? void 0 : styles.wrapperOpen), disabled === true && (styles === null || styles === void 0 ? void 0 : styles.wrapperDisabled), !!open && (styles === null || styles === void 0 ? void 0 : styles.wrapperFocus), 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));
57325
- var bindTreeDatum = function bindTreeDatum(treeDatum) {
57326
- datum.current = treeDatum;
57327
- render();
57328
- };
57329
57422
  var getRenderItem = function getRenderItem(data, expanded, active, id) {
57330
57423
  return typeof renderItemProp === 'function' ? renderItemProp(data, expanded, active, id) : data[renderItemProp];
57331
57424
  };
@@ -57381,9 +57474,9 @@ var TreeSelect = function TreeSelect(props0) {
57381
57474
  };
57382
57475
  var handleClear = function handleClear(e) {
57383
57476
  e.stopPropagation();
57384
- if (!datum.current) return;
57385
- datum.current.setValue([]);
57386
- onChange(multiple ? [] : '');
57477
+ if (!datum) return;
57478
+ datum.setValue([]);
57479
+ onChange(multiple ? [] : ['']);
57387
57480
  if (onChangeAddition) {
57388
57481
  onChangeAddition({
57389
57482
  data: multiple ? [] : null
@@ -57391,9 +57484,6 @@ var TreeSelect = function TreeSelect(props0) {
57391
57484
  }
57392
57485
  if (open) closePop();
57393
57486
  };
57394
- var handleExpand = function handleExpand(expands) {
57395
- onExpand === null || onExpand === void 0 || onExpand(expands);
57396
- };
57397
57487
  var renderClearable = function renderClearable() {
57398
57488
  if (!multiple !== undefined && !showArrow) return null;
57399
57489
  var defaultIcon = multiple ? icons_config.treeSelect.More : icons_config.treeSelect.DropdownArrow;
@@ -57423,37 +57513,43 @@ var TreeSelect = function TreeSelect(props0) {
57423
57513
  children: defaultIcon
57424
57514
  });
57425
57515
  };
57516
+ var getDataById = usePersistFn(function (id) {
57517
+ if (!props.noCache) {
57518
+ if (context.cachedMap.has(id)) {
57519
+ return context.cachedMap.get(id);
57520
+ }
57521
+ }
57522
+ if (!datum) return undefined;
57523
+ var origin = datum === null || datum === void 0 ? void 0 : datum.getDataById(id);
57524
+ if (!props.noCache && !(datum !== null && datum !== void 0 && datum.isUnMatched(origin))) {
57525
+ context.cachedMap.set(id, origin);
57526
+ }
57527
+ return origin;
57528
+ });
57426
57529
  var getDataByValues = function getDataByValues(values) {
57427
- if (!datum.current || !values) return [];
57428
- return datum.current.getDataByValues(values);
57530
+ if (!datum || !values) return [];
57531
+ return datum.getDataByValues(values);
57429
57532
  };
57430
57533
  var getDataByValuesRef = function getDataByValuesRef(values) {
57431
- var _datum$current2;
57432
57534
  if (isArray(values)) {
57433
57535
  return values.map(function (id) {
57434
- var _datum$current;
57435
- return (_datum$current = datum.current) === null || _datum$current === void 0 ? void 0 : _datum$current.getDataById(id);
57536
+ return datum === null || datum === void 0 ? void 0 : datum.getDataById(id);
57436
57537
  });
57437
57538
  }
57438
- return (_datum$current2 = datum.current) === null || _datum$current2 === void 0 ? void 0 : _datum$current2.getDataById(values);
57539
+ return datum === null || datum === void 0 ? void 0 : datum.getDataById(values);
57439
57540
  };
57440
57541
  var getValue = function getValue() {
57441
- if (!datum.current) return;
57442
- var nextValue = datum.current.getValue();
57542
+ if (!datum) return;
57543
+ var nextValue = datum.getValue();
57443
57544
  if (multiple) return nextValue;
57444
- return nextValue.length ? nextValue[0] : '';
57445
- };
57446
- var getValueArray = function getValueArray(value) {
57447
- if (!value) return [];
57448
- if (!Array.isArray(value)) return [value];
57449
- return value;
57545
+ if (nextValue.length === 0) return [];
57546
+ return [nextValue[0]];
57450
57547
  };
57451
57548
  var getContentClass = function getContentClass(data) {
57452
- var _datum$current3, _datum$current4;
57453
- if (!datum.current) return '';
57454
- var key = datum.current.getKey(data);
57455
- var isDisabled = (_datum$current3 = datum.current) === null || _datum$current3 === void 0 ? void 0 : _datum$current3.isDisabled(key);
57456
- var isCheck = (_datum$current4 = datum.current) === null || _datum$current4 === void 0 ? void 0 : _datum$current4.getChecked(key);
57549
+ if (!datum) return '';
57550
+ var key = datum.getKey(data);
57551
+ var isDisabled = datum === null || datum === void 0 ? void 0 : datum.isDisabled(key);
57552
+ var isCheck = datum === null || datum === void 0 ? void 0 : datum.getChecked(key);
57457
57553
  if (isDisabled) {
57458
57554
  return classnames_default()(styles.optionDisabled);
57459
57555
  }
@@ -57484,46 +57580,62 @@ var TreeSelect = function TreeSelect(props0) {
57484
57580
  onTiledFilter === null || onTiledFilter === void 0 || onTiledFilter(trim ? text.trim() : text);
57485
57581
  };
57486
57582
  var handleChange = function handleChange(item, id) {
57487
- var _datum$current5;
57488
- if (!datum.current) return;
57489
- if (disabled === true || (_datum$current5 = datum.current) !== null && _datum$current5 !== void 0 && _datum$current5.isDisabled(id)) return;
57490
- var currentData = datum.current.getDataById(id);
57583
+ if (disabled === true || datum !== null && datum !== void 0 && datum.isDisabled(id)) return;
57584
+ var currentData = datum.getDataById(id);
57491
57585
  if (!multiple) {
57492
- datum.current.setValue([]);
57493
- datum.current.set(datum.current.getKey(item), 1);
57586
+ datum.setValue([]);
57587
+ datum.set(datum.getKey(item), 1);
57494
57588
  }
57495
57589
  var nextValue = getValue();
57496
57590
  if (onChange) {
57497
- onChange(nextValue, currentData, id ? (datum.current.getPath(id) || {}).path : undefined);
57591
+ onChange(nextValue, currentData, id ? (datum.getPath(id) || {}).path : undefined);
57498
57592
  }
57499
57593
  if (typeof onChangeAddition === 'function') {
57500
57594
  onChangeAddition({
57501
57595
  data: getDataByValues(nextValue),
57502
- checked: multiple ? datum.current.get(id) : undefined,
57596
+ checked: multiple ? datum.get(id) : undefined,
57503
57597
  current: currentData
57504
57598
  });
57505
57599
  }
57506
57600
  };
57507
- var handleTreeChange = function handleTreeChange(item, id) {
57601
+ var handleTreeClick = function handleTreeClick(item, id) {
57508
57602
  handleChange(item, id);
57509
- if (!multiple) closePop();
57603
+ closePop();
57510
57604
  };
57511
- var handleRemove = function handleRemove(item, key, index) {
57512
- if (!datum.current) return;
57513
- var dataKey = isUnMatchedData(item) ? item.value : datum.current.getKey(item, key, index);
57514
- var isDisabled = datum.current.isDisabled(dataKey);
57605
+ var handleTreeChange = function handleTreeChange(_value, id) {
57606
+ var item = datum.getDataById(id);
57607
+ handleChange(item, id);
57608
+ };
57609
+ var handleRemove = function handleRemove(item, key) {
57610
+ if (!datum) return;
57611
+ var dataKey = key !== null && key !== void 0 ? key : isUnMatchedData(item) ? item.value : datum.getKey(item);
57612
+ var isDisabled = datum.isDisabled(dataKey);
57515
57613
  if (isDisabled) return;
57516
- datum.current.set(dataKey, 0);
57517
- handleChange(item, datum.current.getKey(item, key, index));
57614
+ datum.set(dataKey, 0);
57615
+ handleChange(item, dataKey);
57518
57616
  };
57519
57617
 
57520
57618
  // innerTitle 模式
57521
57619
  var renderInnerTitle = use_inner_title({
57522
- open: open || !!value,
57620
+ open: open || !!(value && value.length),
57523
57621
  size: size,
57524
57622
  jssStyle: jssStyle,
57525
57623
  innerTitle: innerTitle
57526
57624
  });
57625
+ var getResultByValue = usePersistFn(function (arr) {
57626
+ var result = (Array.isArray(arr) ? arr : [arr]).map(function (id) {
57627
+ return getDataById(id);
57628
+ }).filter(function (item) {
57629
+ return item !== undefined;
57630
+ });
57631
+ return result;
57632
+ });
57633
+ var getResultValue = function getResultValue() {
57634
+ if (!multiple && Array.isArray(value)) {
57635
+ return value[0];
57636
+ }
57637
+ return value;
57638
+ };
57527
57639
  var renderResult = function renderResult() {
57528
57640
  var result = /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
57529
57641
  className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.result),
@@ -57531,13 +57643,11 @@ var TreeSelect = function TreeSelect(props0) {
57531
57643
  trim: trim,
57532
57644
  jssStyle: jssStyle,
57533
57645
  size: size,
57534
- value: value,
57535
- data: tiledData,
57646
+ value: getResultValue(),
57647
+ data: data,
57536
57648
  focus: open,
57537
57649
  keygen: keygen,
57538
- disabled: disabled
57539
- // maxLength={maxLength}
57540
- ,
57650
+ disabled: disabled,
57541
57651
  compressed: compressed,
57542
57652
  compressedBound: compressedBound,
57543
57653
  compressedClassName: compressedClassName,
@@ -57556,7 +57666,7 @@ var TreeSelect = function TreeSelect(props0) {
57556
57666
  onRef: inputRef,
57557
57667
  checkUnMatched: checkUnMatched,
57558
57668
  onClearCreatedData: onClearCreatedData,
57559
- getDataByValues: getDataByValues,
57669
+ getDataByValues: getResultByValue,
57560
57670
  onRemove: handleRemove,
57561
57671
  classes: styles,
57562
57672
  setInputText: setInputText
@@ -57612,14 +57722,13 @@ var TreeSelect = function TreeSelect(props0) {
57612
57722
  if (multiple) {
57613
57723
  treeProps.onChange = handleTreeChange;
57614
57724
  } else {
57615
- treeProps.onClick = handleTreeChange;
57725
+ treeProps.onClick = handleTreeClick;
57616
57726
  treeProps.renderItem = renderActive;
57617
57727
  treeProps.active = value;
57618
57728
  }
57619
57729
  if ('expanded' in props) {
57620
57730
  treeProps.expanded = expanded;
57621
57731
  }
57622
- var nextValue = getValueArray(value);
57623
57732
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
57624
57733
  className: classnames_default()(styles.tree),
57625
57734
  style: {
@@ -57627,30 +57736,28 @@ var TreeSelect = function TreeSelect(props0) {
57627
57736
  },
57628
57737
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(src_tree_tree, objectSpread2_default()(objectSpread2_default()({
57629
57738
  jssStyle: jssStyle,
57630
- getDatum: bindTreeDatum,
57631
57739
  renderItem: renderItem
57632
57740
  }, treeProps), {}, {
57633
- keepCache: !props.noCache,
57634
57741
  line: line,
57635
57742
  mode: mode,
57636
57743
  data: tiledData,
57637
57744
  keygen: keygen,
57638
57745
  unmatch: unmatch,
57639
- value: nextValue,
57746
+ value: value,
57640
57747
  loader: loader,
57641
- expanded: 'expanded' in props || expanded !== null && expanded !== void 0 && expanded.length ? expanded : undefined,
57748
+ onExpand: onExpandTree,
57749
+ expanded: controlExpanded,
57750
+ defaultExpandAll: defaultExpandAll,
57642
57751
  expandIcons: tiledExpandIcons,
57643
57752
  disabled: disabled,
57644
57753
  parentClickExpand: parentClickExpand,
57645
- defaultExpanded: defaultExpanded,
57646
- defaultExpandAll: defaultExpandAll,
57647
57754
  contentClass: getContentClass,
57648
- onExpand: handleExpand
57755
+ datum: datum
57649
57756
  }))
57650
57757
  });
57651
57758
  };
57652
57759
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
57653
- if (getComponentRef && datum.current) {
57760
+ if (getComponentRef && datum) {
57654
57761
  if (isFunc(getComponentRef)) {
57655
57762
  getComponentRef({
57656
57763
  getDataByValues: getDataByValuesRef
@@ -61268,7 +61375,7 @@ var upload_interface = __webpack_require__(4412);
61268
61375
 
61269
61376
 
61270
61377
  /* harmony default export */ var src_0 = ({
61271
- version: '3.0.9'
61378
+ version: '3.0.11'
61272
61379
  });
61273
61380
  }();
61274
61381
  /******/ return __webpack_exports__;