shineout 3.2.1 → 3.2.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
@@ -476,5 +476,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
476
476
  // 此文件由脚本自动生成,请勿直接修改。
477
477
  // This file was generated automatically by a script. Please do not modify it directly.
478
478
  var _default = exports.default = {
479
- version: '3.2.1'
479
+ version: '3.2.2'
480
480
  };
package/dist/shineout.js CHANGED
@@ -6439,16 +6439,16 @@ __webpack_require__.d(color_namespaceObject, {
6439
6439
  });
6440
6440
 
6441
6441
  // NAMESPACE OBJECT: ./src/utils/flat.ts
6442
- var flat_namespaceObject = {};
6443
- __webpack_require__.r(flat_namespaceObject);
6444
- __webpack_require__.d(flat_namespaceObject, {
6445
- flatten: function() { return flatten; },
6442
+ var utils_flat_namespaceObject = {};
6443
+ __webpack_require__.r(utils_flat_namespaceObject);
6444
+ __webpack_require__.d(utils_flat_namespaceObject, {
6445
+ flatten: function() { return flat_flatten; },
6446
6446
  flattenArray: function() { return flat_flattenArray; },
6447
6447
  getSthByName: function() { return getSthByName; },
6448
- insertPoint: function() { return flat_insertPoint; },
6449
- insertValue: function() { return insertValue; },
6448
+ insertPoint: function() { return utils_flat_insertPoint; },
6449
+ insertValue: function() { return flat_insertValue; },
6450
6450
  removeSthByName: function() { return removeSthByName; },
6451
- spliceValue: function() { return spliceValue; },
6451
+ spliceValue: function() { return flat_spliceValue; },
6452
6452
  unflatten: function() { return unflatten; }
6453
6453
  });
6454
6454
 
@@ -6555,7 +6555,7 @@ __webpack_require__.d(src_utils_namespaceObject, {
6555
6555
  detect: function() { return detect_namespaceObject; },
6556
6556
  doc: function() { return dom_document_namespaceObject; },
6557
6557
  element: function() { return dom_element_namespaceObject; },
6558
- flat: function() { return flat_namespaceObject; },
6558
+ flat: function() { return utils_flat_namespaceObject; },
6559
6559
  func: function() { return utils_func_namespaceObject; },
6560
6560
  hash: function() { return hash_createHash; },
6561
6561
  is: function() { return utils_is_namespaceObject; },
@@ -11960,7 +11960,7 @@ var handleStyle = function handleStyle(style) {
11960
11960
  };
11961
11961
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
11962
11962
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
11963
- /* harmony default export */ var version = ('3.2.1');
11963
+ /* harmony default export */ var version = ('3.2.2');
11964
11964
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
11965
11965
 
11966
11966
 
@@ -19872,7 +19872,10 @@ var menuStyle = {
19872
19872
  display: 'inline-flex'
19873
19873
  },
19874
19874
  titleContent: {
19875
- whiteSpace: 'pre-wrap'
19875
+ whiteSpace: 'pre-wrap',
19876
+ display: 'flex',
19877
+ minWidth: 0,
19878
+ alignItems: 'center'
19876
19879
  // '$wrapperCollpase &': {
19877
19880
  // transition: `opacity ${animationDuration} ${transitionFunc}`,
19878
19881
  // },
@@ -27208,9 +27211,9 @@ function $getKey(gen, d, index) {
27208
27211
  if (typeof gen === 'function') return gen(d, index);
27209
27212
  return index;
27210
27213
  }
27211
- function getKey(gen, d, index) {
27214
+ function getKey(gen, d, index, ignoreError) {
27212
27215
  var key = $getKey(gen, d, index);
27213
- if (typeof key !== 'string' && typeof key !== 'number') {
27216
+ if (typeof key !== 'string' && typeof key !== 'number' && !ignoreError) {
27214
27217
  console.error(new Error("keygen result expect a string or a number, get '".concat(typeof_default()(key), "'")));
27215
27218
  }
27216
27219
  return key;
@@ -27845,7 +27848,7 @@ var horizontalPosition = ['left-bottom', 'left-top', 'right-bottom', 'right-top'
27845
27848
  var verticalPosition = ['bottom-left', 'bottom-right', 'top-left', 'top-right', 'bottom', 'top'];
27846
27849
  var hideStyle = {
27847
27850
  pointerEvents: 'none',
27848
- position: 'absolute',
27851
+ position: 'fixed',
27849
27852
  zIndex: -1000,
27850
27853
  opacity: 0
27851
27854
  };
@@ -32465,7 +32468,6 @@ function removeProtocol(url) {
32465
32468
  short: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
32466
32469
  long: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
32467
32470
  },
32468
- pickerTitle: ['开始时间', '结束时间'],
32469
32471
  timeOfDayValues: ['上午', '下午'],
32470
32472
  ok: '确定',
32471
32473
  cancel: '取消',
@@ -32531,7 +32533,6 @@ function removeProtocol(url) {
32531
32533
  short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
32532
32534
  long: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
32533
32535
  },
32534
- pickerTitle: ['Start Time', 'End Time'],
32535
32536
  timeOfDayValues: ['a.m.', 'p.m.'],
32536
32537
  ok: 'Ok',
32537
32538
  cancel: 'Cancel',
@@ -42771,7 +42772,7 @@ var Modal = function Modal(props) {
42771
42772
  hasMask = true;
42772
42773
  }
42773
42774
  };
42774
- handleMaskVisible();
42775
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(handleMaskVisible, [visible]);
42775
42776
  var updateOrigin = function updateOrigin() {
42776
42777
  // 更新transform-origin
42777
42778
  if (props.position || props.moveable || !props.zoom) return;
@@ -44388,6 +44389,90 @@ var Provider = function Provider(props) {
44388
44389
  })
44389
44390
  });
44390
44391
  };
44392
+ ;// CONCATENATED MODULE: ../hooks/src/utils/flat.ts
44393
+
44394
+
44395
+
44396
+ function flat_insertPoint(name) {
44397
+ var reg = /(\[\d+\])/gi;
44398
+ return name.replace(reg, function (s, m, i) {
44399
+ return s.replace(m, i === 0 ? m : ".".concat(m));
44400
+ });
44401
+ }
44402
+ function flatten(data, skipArray) {
44403
+ if (is_isEmpty(data)) return data;
44404
+ var result = {};
44405
+ function recurse(cur, prop) {
44406
+ if (Object(cur) !== cur || typeof cur === 'function' || cur instanceof Date || cur instanceof Error || skipArray && Array.isArray(cur)) {
44407
+ if (!(cur === undefined && /\[\d+\]$/.test(prop))) {
44408
+ result[prop] = cur;
44409
+ }
44410
+ } else if (Array.isArray(cur)) {
44411
+ if (cur.length === 0) {
44412
+ result[prop] = [];
44413
+ } else {
44414
+ for (var i = 0, l = cur.length; i < l; i++) {
44415
+ recurse(cur[i], prop ? "".concat(prop, "[").concat(i, "]") : "[".concat(i, "]"));
44416
+ }
44417
+ }
44418
+ } else {
44419
+ var empty = true;
44420
+ if (typeof_default()(cur) === 'object') {
44421
+ // eslint-disable-next-line
44422
+ for (var p in cur) {
44423
+ empty = false;
44424
+ recurse(cur[p], prop ? "".concat(prop, ".").concat(p) : p);
44425
+ }
44426
+ if (empty) {
44427
+ result[prop] = {};
44428
+ }
44429
+ }
44430
+ }
44431
+ }
44432
+ recurse(data, '');
44433
+ return result;
44434
+ }
44435
+ function insertValue(obj, name, index, value) {
44436
+ Object.keys(obj).filter(function (n) {
44437
+ return n.indexOf("".concat(name, "[")) === 0;
44438
+ }).sort().reverse().forEach(function (n) {
44439
+ // const reg = new RegExp(`${name}\\[(\\d+)\\]`)
44440
+ var reg = new RegExp("".concat(name.replace(/\[/g, '\\[').replace(/\]/g, '\\]'), "\\[(\\d+)\\]"));
44441
+ var match = reg.exec(n);
44442
+ var i = parseInt(match[1], 10);
44443
+ if (i < index) return;
44444
+ var newName = n.replace(reg, "".concat(name, "[").concat(i + 1, "]"));
44445
+ if (obj[n]) obj[newName] = obj[n];
44446
+ delete obj[n];
44447
+ });
44448
+ var newValue = flatten(defineProperty_default()({}, "".concat(name, "[").concat(index, "]"), value));
44449
+ Object.keys(newValue).forEach(function (k) {
44450
+ if (newValue[k] !== undefined) obj[k] = newValue[k];
44451
+ });
44452
+ }
44453
+ function spliceValue(obj, name, index) {
44454
+ var names = Object.keys(obj).filter(function (n) {
44455
+ return n === name || n.indexOf("".concat(name, "[")) === 0;
44456
+ }).sort();
44457
+ names.forEach(function (n) {
44458
+ if (n === name && !Array.isArray(obj[name])) return;
44459
+ if (n === name && Array.isArray(obj[name])) {
44460
+ obj[name].splice(index, 1);
44461
+ return;
44462
+ }
44463
+ var reg = new RegExp("".concat(name.replace(/\[/g, '\\[').replace(/\]/g, '\\]'), "\\[(\\d+)\\]"));
44464
+ var match = reg.exec(n);
44465
+ var i = parseInt(match[1], 10);
44466
+ if (i < index) return;
44467
+ if (i === index) {
44468
+ delete obj[n];
44469
+ return;
44470
+ }
44471
+ var newName = n.replace(reg, "".concat(name, "[").concat(i - 1, "]"));
44472
+ obj[newName] = obj[n];
44473
+ delete obj[n];
44474
+ });
44475
+ }
44391
44476
  ;// CONCATENATED MODULE: ../hooks/src/components/use-form/use-form.ts
44392
44477
 
44393
44478
 
@@ -44398,6 +44483,7 @@ var Provider = function Provider(props) {
44398
44483
 
44399
44484
 
44400
44485
 
44486
+
44401
44487
  var globalKey = '__global__&&@@';
44402
44488
 
44403
44489
 
@@ -44470,6 +44556,15 @@ var useForm = function useForm(props) {
44470
44556
  update();
44471
44557
  });
44472
44558
  };
44559
+ var updateFieldsets = use_persist_fn(function (name) {
44560
+ var na = "".concat(name, "[");
44561
+ var no = "".concat(name, ".");
44562
+ context.names.forEach(function (key) {
44563
+ if (key.startsWith(na) || key.startsWith(no)) {
44564
+ update(key);
44565
+ }
44566
+ });
44567
+ });
44473
44568
  var handleSubmitError = function handleSubmitError(err) {
44474
44569
  onError === null || onError === void 0 || onError(err);
44475
44570
  if (!props.scrollToError) return;
@@ -44587,6 +44682,14 @@ var useForm = function useForm(props) {
44587
44682
  context.errors[name] = e;
44588
44683
  update(name);
44589
44684
  });
44685
+ var insertError = use_persist_fn(function (name, index, error) {
44686
+ insertValue(context.errors, name, index, error);
44687
+ updateFieldsets(name);
44688
+ });
44689
+ var spliceError = use_persist_fn(function (name, index) {
44690
+ spliceValue(context.errors, name, index);
44691
+ updateFieldsets(name);
44692
+ });
44590
44693
  var submit = use_persist_fn(function () {
44591
44694
  var withValidate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
44592
44695
  if (disabled) return;
@@ -44643,6 +44746,17 @@ var useForm = function useForm(props) {
44643
44746
  other === null || other === void 0 || (_other$onSubmit = other.onSubmit) === null || _other$onSubmit === void 0 || _other$onSubmit.call(other, e);
44644
44747
  };
44645
44748
  };
44749
+ var validateFieldset = function validateFieldset(name) {
44750
+ var na = "".concat(name, "[");
44751
+ var no = "".concat(name, ".");
44752
+ var fields = [];
44753
+ context.names.forEach(function (key) {
44754
+ if (key.startsWith(na) || key.startsWith(no)) {
44755
+ fields.push(key);
44756
+ }
44757
+ });
44758
+ validateFields(fields).catch(function () {});
44759
+ };
44646
44760
  var getDefaultValue = function getDefaultValue() {
44647
44761
  var v = utils_immer_produce(defaultValue, function (draft) {
44648
44762
  Object.keys(context.defaultValues).forEach(function (key) {
@@ -44748,7 +44862,10 @@ var useForm = function useForm(props) {
44748
44862
  setError: setError,
44749
44863
  getErrors: getErrors,
44750
44864
  clearValidate: clearValidate,
44751
- validateFields: validateFields
44865
+ validateFields: validateFields,
44866
+ validateFieldset: validateFieldset,
44867
+ insertError: insertError,
44868
+ spliceError: spliceError
44752
44869
  });
44753
44870
  var formConfig = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
44754
44871
  return {
@@ -45094,7 +45211,8 @@ var useFormFieldSet = function useFormFieldSet(props) {
45094
45211
  ProviderValue: ProviderValue,
45095
45212
  error: error,
45096
45213
  value: value,
45097
- onChange: onChange
45214
+ onChange: onChange,
45215
+ name: name
45098
45216
  };
45099
45217
  };
45100
45218
  /* harmony default export */ var use_form_fieldset = (useFormFieldSet);
@@ -45111,6 +45229,7 @@ var FormFieldSet = function FormFieldSet(props) {
45111
45229
  ids: []
45112
45230
  }),
45113
45231
  context = _React$useRef.current;
45232
+ var formFunc = useFormFunc();
45114
45233
  var getValidateProps = usePersistFn(function () {
45115
45234
  return props;
45116
45235
  });
@@ -45124,16 +45243,16 @@ var FormFieldSet = function FormFieldSet(props) {
45124
45243
  }),
45125
45244
  Provider = _useFormFieldSet.Provider,
45126
45245
  ProviderValue = _useFormFieldSet.ProviderValue,
45127
- value = _useFormFieldSet.value,
45128
45246
  error = _useFormFieldSet.error,
45129
- _onChange = _useFormFieldSet.onChange;
45247
+ _onChange = _useFormFieldSet.onChange,
45248
+ name = _useFormFieldSet.name;
45130
45249
  if (typeof children !== 'function') {
45131
45250
  return /*#__PURE__*/(0,jsx_runtime.jsx)(Provider, {
45132
45251
  value: ProviderValue,
45133
45252
  children: children
45134
45253
  });
45135
45254
  }
45136
- var valueArr = value || [];
45255
+ var valueArr = (formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name)) || [];
45137
45256
  valueArr = Array.isArray(valueArr) ? valueArr : [valueArr];
45138
45257
  var result = [];
45139
45258
  if (valueArr.length === 0 && valueArr && empty) {
@@ -45144,6 +45263,7 @@ var FormFieldSet = function FormFieldSet(props) {
45144
45263
  });
45145
45264
  _onChange(newValue);
45146
45265
  context.ids.push(generateUUID());
45266
+ formFunc === null || formFunc === void 0 || formFunc.insertError(name, 0);
45147
45267
  })
45148
45268
  }, 'empty'));
45149
45269
  }
@@ -45165,31 +45285,39 @@ var FormFieldSet = function FormFieldSet(props) {
45165
45285
  index: i,
45166
45286
  error: errorList,
45167
45287
  onChange: function onChange(val) {
45168
- var newValue = form_fieldset_produce(valueArr, function (draft) {
45288
+ var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
45289
+ var newValue = form_fieldset_produce(oldValue, function (draft) {
45169
45290
  draft[i] = val;
45170
45291
  });
45171
45292
  _onChange(newValue);
45293
+ formFunc === null || formFunc === void 0 || formFunc.validateFieldset("".concat(name, "[").concat(i, "]"));
45172
45294
  },
45173
45295
  onInsert: function onInsert(val) {
45174
- var newValue = form_fieldset_produce(valueArr, function (draft) {
45296
+ var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
45297
+ var newValue = form_fieldset_produce(oldValue, function (draft) {
45175
45298
  draft.splice(i, 0, val);
45176
45299
  });
45177
45300
  _onChange(newValue);
45178
45301
  context.ids.splice(i, 0, generateUUID());
45302
+ formFunc === null || formFunc === void 0 || formFunc.insertError(name, i);
45179
45303
  },
45180
45304
  onAppend: function onAppend(val) {
45181
- var newValue = form_fieldset_produce(valueArr, function (draft) {
45305
+ var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
45306
+ var newValue = form_fieldset_produce(oldValue, function (draft) {
45182
45307
  draft.splice(i + 1, 0, val);
45183
45308
  });
45184
45309
  _onChange(newValue);
45185
45310
  context.ids.splice(i + 1, 0, generateUUID());
45311
+ formFunc === null || formFunc === void 0 || formFunc.insertError(name, i + 1);
45186
45312
  },
45187
45313
  onRemove: function onRemove() {
45188
- var newValue = form_fieldset_produce(valueArr, function (draft) {
45314
+ var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
45315
+ var newValue = form_fieldset_produce(oldValue, function (draft) {
45189
45316
  draft.splice(i, 1);
45190
45317
  });
45191
45318
  _onChange(newValue);
45192
45319
  context.ids.splice(i, 1);
45320
+ formFunc === null || formFunc === void 0 || formFunc.spliceError(name, i);
45193
45321
  }
45194
45322
  })
45195
45323
  }, ids[i]));
@@ -47086,7 +47214,7 @@ var useNumberFormat = function useNumberFormat(props) {
47086
47214
  ;// CONCATENATED MODULE: ../base/src/input/input-number.tsx
47087
47215
 
47088
47216
 
47089
- var input_number_excluded = ["jssStyle", "hideArrow"],
47217
+ var input_number_excluded = ["jssStyle", "hideArrow", "numType", "integerLimit", "digits", "min", "max", "step", "allowNull"],
47090
47218
  input_number_excluded2 = ["onMinus", "onPlus"];
47091
47219
 
47092
47220
 
@@ -47101,18 +47229,25 @@ var InputNumber = function InputNumber(props) {
47101
47229
  var commonProps = use_input_common(props);
47102
47230
  var jssStyle = commonProps.jssStyle,
47103
47231
  hideArrow = commonProps.hideArrow,
47232
+ numType = commonProps.numType,
47233
+ integerLimit = commonProps.integerLimit,
47234
+ digits = commonProps.digits,
47235
+ min = commonProps.min,
47236
+ max = commonProps.max,
47237
+ step = commonProps.step,
47238
+ allowNull = commonProps.allowNull,
47104
47239
  restProps = objectWithoutProperties_default()(commonProps, input_number_excluded);
47105
47240
  var inputStyle = jssStyle === null || jssStyle === void 0 || (_jssStyle$input = jssStyle.input) === null || _jssStyle$input === void 0 ? void 0 : _jssStyle$input.call(jssStyle);
47106
47241
  var numberFormatParams = {
47107
47242
  onBlur: restProps.onBlur,
47108
47243
  onFocus: restProps.onFocus,
47109
- digits: restProps.digits,
47110
- integerLimit: restProps.integerLimit,
47111
- numType: restProps.numType,
47112
- min: restProps.min,
47113
- max: restProps.max,
47114
- step: restProps.step,
47115
- allowNull: restProps.allowNull
47244
+ digits: digits,
47245
+ integerLimit: integerLimit,
47246
+ numType: numType,
47247
+ min: min,
47248
+ max: max,
47249
+ step: step,
47250
+ allowNull: allowNull
47116
47251
  };
47117
47252
  var _useInputNumber = use_input_number(objectSpread2_default()({
47118
47253
  value: commonProps.value,
@@ -47122,7 +47257,9 @@ var InputNumber = function InputNumber(props) {
47122
47257
  onMinus = _useInputNumber.onMinus,
47123
47258
  onPlus = _useInputNumber.onPlus,
47124
47259
  numberFormatProps = objectWithoutProperties_default()(_useInputNumber, input_number_excluded2);
47125
- var forwardProps = removeProps(commonProps, objectSpread2_default()({}, numberFormatParams));
47260
+ var forwardProps = removeProps(commonProps, objectSpread2_default()(objectSpread2_default()({}, numberFormatParams), {}, {
47261
+ hideArrow: hideArrow
47262
+ }));
47126
47263
  var addEnd = hideArrow ? null : /*#__PURE__*/(0,jsx_runtime.jsx)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
47127
47264
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
47128
47265
  className: inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.numberStep,
@@ -47263,17 +47400,20 @@ var Scroll = function Scroll(props) {
47263
47400
  isMouseDown: false
47264
47401
  }),
47265
47402
  context = _useRef.current;
47403
+ var _props$scrollHeight = props.scrollHeight,
47404
+ scrollHeight = _props$scrollHeight === void 0 ? 0 : _props$scrollHeight,
47405
+ _props$scrollWidth = props.scrollWidth,
47406
+ scrollWidth = _props$scrollWidth === void 0 ? 0 : _props$scrollWidth,
47407
+ _props$defaultHeight = props.defaultHeight,
47408
+ defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight;
47266
47409
  var _useResize = useResize({
47267
47410
  targetRef: containerRef
47268
47411
  }),
47269
47412
  width = _useResize.width,
47270
- height = _useResize.height;
47413
+ h = _useResize.height;
47414
+ var height = h || defaultHeight;
47271
47415
  var config = useConfig();
47272
47416
  var isRtl = config.direction === 'rtl';
47273
- var _props$scrollHeight = props.scrollHeight,
47274
- scrollHeight = _props$scrollHeight === void 0 ? 0 : _props$scrollHeight,
47275
- _props$scrollWidth = props.scrollWidth,
47276
- scrollWidth = _props$scrollWidth === void 0 ? 0 : _props$scrollWidth;
47277
47417
  var scrollerStyle = props.scrollerStyle || {
47278
47418
  height: '100%',
47279
47419
  width: '100%',
@@ -51371,7 +51511,7 @@ var MenuItem = function MenuItem(props) {
51371
51511
  }
51372
51512
  }) : null;
51373
51513
  var item = render_render(props.renderItem, props.dataItem, props.index);
51374
- var link = props.linkKey ? getKey(props.linkKey, props.dataItem, props.index) : undefined;
51514
+ var link = props.linkKey ? getKey(props.linkKey, props.dataItem, props.index, true) : undefined;
51375
51515
  var title = null;
51376
51516
  if (isLink(item)) {
51377
51517
  var mergeClass = classnames_default()(classes === null || classes === void 0 ? void 0 : classes.title, item.props && item.props.className);
@@ -55984,8 +56124,8 @@ var Tr = function Tr(props) {
55984
56124
  };
55985
56125
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
55986
56126
  if (props.setRowHeight && trRef.current) {
55987
- var expandHeight = expandRef.current ? expandRef.current.offsetHeight : 0;
55988
- props.setRowHeight(props.rowIndex, trRef.current.offsetHeight + expandHeight);
56127
+ var expandHeight = expandRef.current ? expandRef.current.getBoundingClientRect().height : 0;
56128
+ props.setRowHeight(props.rowIndex, trRef.current.getBoundingClientRect().height + expandHeight);
55989
56129
  }
55990
56130
  }, [props.expanded, props.rowIndex, props.bodyScrollWidth, props.resizeFlag]);
55991
56131
  var renderTreeExpand = function renderTreeExpand(content) {
@@ -56418,6 +56558,10 @@ var emptyRef = {
56418
56558
  var tfootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
56419
56559
  var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
56420
56560
  var tableRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
56561
+ var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
56562
+ emptyHeight: 0
56563
+ }),
56564
+ context = _useRef.current;
56421
56565
  var virtual = ((_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.length) && props.rowsInView !== 0 && (!!props.virtual || props.fixed === 'both' || props.fixed === 'y' || props.fixed === 'auto');
56422
56566
 
56423
56567
  // 虚拟列表高度另外计算
@@ -56587,6 +56731,9 @@ var emptyRef = {
56587
56731
  if ((_props$data2 = props.data) !== null && _props$data2 !== void 0 && _props$data2.length) return null;
56588
56732
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
56589
56733
  className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.emptyWrapper,
56734
+ ref: function ref(el) {
56735
+ context.emptyHeight = (el === null || el === void 0 ? void 0 : el.clientHeight) || 0;
56736
+ },
56590
56737
  children: props.empty || /*#__PURE__*/(0,jsx_runtime.jsx)(src_empty_empty, {
56591
56738
  jssStyle: props.jssStyle
56592
56739
  })
@@ -56703,6 +56850,7 @@ var emptyRef = {
56703
56850
  scrollWidth: width || 1,
56704
56851
  scrollHeight: virtual ? virtualInfo.scrollHeight : tbodyHeight,
56705
56852
  onScroll: handleVirtualScroll,
56853
+ defaultHeight: context.emptyHeight,
56706
56854
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
56707
56855
  style: {
56708
56856
  width: width,
@@ -61347,13 +61495,13 @@ function fade(color) {
61347
61495
 
61348
61496
 
61349
61497
 
61350
- function flat_insertPoint(name) {
61498
+ function utils_flat_insertPoint(name) {
61351
61499
  var reg = /(\[\d+\])/gi;
61352
61500
  return name.replace(reg, function (s, m, i) {
61353
61501
  return s.replace(m, i === 0 ? m : ".".concat(m));
61354
61502
  });
61355
61503
  }
61356
- function flatten(data, skipArray) {
61504
+ function flat_flatten(data, skipArray) {
61357
61505
  if (utils_is_isEmpty(data)) return data;
61358
61506
  var result = {};
61359
61507
  function recurse(cur, prop) {
@@ -61402,7 +61550,7 @@ function unflatten(rawdata) {
61402
61550
 
61403
61551
  // eslint-disable-next-line
61404
61552
  Object.keys(data).sort().forEach(function (p) {
61405
- var pathWithPoint = flat_insertPoint(p);
61553
+ var pathWithPoint = utils_flat_insertPoint(p);
61406
61554
  cur = result;
61407
61555
  prop = '';
61408
61556
  last = 0;
@@ -61418,7 +61566,7 @@ function unflatten(rawdata) {
61418
61566
  });
61419
61567
  return result[''];
61420
61568
  }
61421
- function insertValue(obj, name, index, value) {
61569
+ function flat_insertValue(obj, name, index, value) {
61422
61570
  Object.keys(obj).filter(function (n) {
61423
61571
  return n.indexOf("".concat(name, "[")) === 0;
61424
61572
  }).sort().reverse().forEach(function (n) {
@@ -61431,12 +61579,12 @@ function insertValue(obj, name, index, value) {
61431
61579
  if (obj[n]) obj[newName] = obj[n];
61432
61580
  delete obj[n];
61433
61581
  });
61434
- var newValue = flatten(defineProperty_default()({}, "".concat(name, "[").concat(index, "]"), value));
61582
+ var newValue = flat_flatten(defineProperty_default()({}, "".concat(name, "[").concat(index, "]"), value));
61435
61583
  Object.keys(newValue).forEach(function (k) {
61436
61584
  if (newValue[k] !== undefined) obj[k] = newValue[k];
61437
61585
  });
61438
61586
  }
61439
- function spliceValue(obj, name, index) {
61587
+ function flat_spliceValue(obj, name, index) {
61440
61588
  var names = Object.keys(obj).filter(function (n) {
61441
61589
  return n === name || n.indexOf("".concat(name, "[")) === 0;
61442
61590
  }).sort();
@@ -61467,7 +61615,7 @@ var isNameWithPath = function isNameWithPath(name, path) {
61467
61615
  var getSthByName = function getSthByName(name, source) {
61468
61616
  if (source[name]) return source[name];
61469
61617
  var result = unflatten(source);
61470
- name = flat_insertPoint(name);
61618
+ name = utils_flat_insertPoint(name);
61471
61619
  name.split('.').forEach(function (n) {
61472
61620
  var match = /^\[(\d+)\]$/.exec(n);
61473
61621
  // eslint-disable-next-line
@@ -61482,7 +61630,7 @@ var getSthByName = function getSthByName(name, source) {
61482
61630
  var removeSthByName = function removeSthByName(name, source) {
61483
61631
  var match = /(.*)\[(\d+)\]$/.exec(name);
61484
61632
  if (match) {
61485
- spliceValue(source, match[1], parseInt(match[2], 10));
61633
+ flat_spliceValue(source, match[1], parseInt(match[2], 10));
61486
61634
  } else {
61487
61635
  Object.keys(source).forEach(function (n) {
61488
61636
  if (isNameWithPath(n, name)) delete source[n];
@@ -61674,7 +61822,7 @@ var objects_deepMerge = function deepMerge() {
61674
61822
  return dest;
61675
61823
  };
61676
61824
  function objects_pathGenerator(raw) {
61677
- var path = flat_insertPoint(raw);
61825
+ var path = utils_flat_insertPoint(raw);
61678
61826
  var reg = /^\[(\d+)\]$/;
61679
61827
  var pathModeValues = objects_objectValues(objects_PATH_MODE);
61680
61828
  var index = 0;
@@ -62900,7 +63048,7 @@ var upload_interface = __webpack_require__(4412);
62900
63048
 
62901
63049
 
62902
63050
  /* harmony default export */ var src_0 = ({
62903
- version: '3.2.1'
63051
+ version: '3.2.2'
62904
63052
  });
62905
63053
  }();
62906
63054
  /******/ return __webpack_exports__;