@douyinfe/semi-ui 2.5.0 → 2.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.
@@ -26895,7 +26895,9 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
26895
26895
  } = _ref;
26896
26896
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({
26897
26897
  className: classnames_default()(className, animateCls),
26898
- style: assign_default()(assign_default()(assign_default()({}, animateStyle), {
26898
+ style: assign_default()(assign_default()(assign_default()({
26899
+ visibility: 'visible'
26900
+ }, animateStyle), {
26899
26901
  transformOrigin
26900
26902
  }), style)
26901
26903
  }, portalEventSet, animateEvents, {
@@ -26907,7 +26909,9 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
26907
26909
  className: className
26908
26910
  }, portalEventSet, {
26909
26911
  "x-placement": placement,
26910
- style: style
26912
+ style: assign_default()({
26913
+ visibility: motion ? undefined : 'visible'
26914
+ }, style)
26911
26915
  }), content, icon);
26912
26916
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(_portal, {
26913
26917
  getPopupContainer: this.props.getPopupContainer,
@@ -101249,7 +101253,7 @@ class foundation_FormFoundation extends foundation {
101249
101253
  } // update formState value
101250
101254
 
101251
101255
 
101252
- updateStateValue(field, value, opts) {
101256
+ updateStateValue(field, value, opts, callback) {
101253
101257
  const notNotify = opts && opts.notNotify;
101254
101258
  const notUpdate = opts && opts.notUpdate;
101255
101259
  const fieldAllowEmpty = opts && opts.fieldAllowEmpty;
@@ -101281,7 +101285,7 @@ class foundation_FormFoundation extends foundation {
101281
101285
  }
101282
101286
 
101283
101287
  if (!notUpdate) {
101284
- this._adapter.forceUpdate();
101288
+ this._adapter.forceUpdate(callback);
101285
101289
  }
101286
101290
  } // get touched from formState
101287
101291
 
@@ -101295,7 +101299,7 @@ class foundation_FormFoundation extends foundation {
101295
101299
  } // update formState touched
101296
101300
 
101297
101301
 
101298
- updateStateTouched(field, isTouched, opts) {
101302
+ updateStateTouched(field, isTouched, opts, callback) {
101299
101303
  const notNotify = opts && opts.notNotify;
101300
101304
  const notUpdate = opts && opts.notUpdate;
101301
101305
  object_set(this.data.touched, field, isTouched);
@@ -101305,7 +101309,7 @@ class foundation_FormFoundation extends foundation {
101305
101309
  }
101306
101310
 
101307
101311
  if (!notUpdate) {
101308
- this._adapter.forceUpdate();
101312
+ this._adapter.forceUpdate(callback);
101309
101313
  }
101310
101314
  } // get error from formState
101311
101315
 
@@ -101319,7 +101323,7 @@ class foundation_FormFoundation extends foundation {
101319
101323
  } // update formState error
101320
101324
 
101321
101325
 
101322
- updateStateError(field, error, opts) {
101326
+ updateStateError(field, error, opts, callback) {
101323
101327
  const notNotify = opts && opts.notNotify;
101324
101328
  const notUpdate = opts && opts.notUpdate;
101325
101329
  object_set(this.data.errors, field, error); // The setError caused by centralized validation does not need to trigger notify, otherwise it will be called too frequently, as many times as there are fields
@@ -101330,7 +101334,7 @@ class foundation_FormFoundation extends foundation {
101330
101334
  }
101331
101335
 
101332
101336
  if (!notUpdate) {
101333
- this._adapter.forceUpdate();
101337
+ this._adapter.forceUpdate(callback);
101334
101338
  }
101335
101339
  } // For internal use in the FormApi Operating Field
101336
101340
 
@@ -101349,22 +101353,21 @@ class foundation_FormFoundation extends foundation {
101349
101353
  // At this time, first modify formState directly, then find out the subordinate fields and drive them to update
101350
101354
  // Eg: peoples: [0, 2, 3]. Each value of the peoples array corresponds to an Input Field
101351
101355
  // When the user directly calls formA pi.set Value ('peoples', [2,3])
101352
- this.updateStateValue(field, newValue, opts);
101353
-
101354
- let nestedFields = this._getNestedField(field);
101355
-
101356
- if (nestedFields.size) {
101357
- for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101358
- let fieldPath = fieldStaff.field;
101359
- let newFieldVal = object_get(instance_values_default()(this.data), fieldPath);
101360
- let nestedBatchUpdateOpts = {
101361
- notNotify: true,
101362
- notUpdate: true
101363
- };
101364
- fieldStaff.fieldApi.setValue(newFieldVal, nestedBatchUpdateOpts);
101365
- });
101366
- } // If the reset happens to be, then update the updateKey corresponding to ArrayField to render it again
101367
-
101356
+ this.updateStateValue(field, newValue, opts, () => {
101357
+ let nestedFields = this._getNestedField(field);
101358
+
101359
+ if (nestedFields.size) {
101360
+ for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101361
+ let fieldPath = fieldStaff.field;
101362
+ let newFieldVal = object_get(instance_values_default()(this.data), fieldPath);
101363
+ let nestedBatchUpdateOpts = {
101364
+ notNotify: true,
101365
+ notUpdate: true
101366
+ };
101367
+ fieldStaff.fieldApi.setValue(newFieldVal, nestedBatchUpdateOpts);
101368
+ });
101369
+ }
101370
+ }); // If the reset happens to be, then update the updateKey corresponding to ArrayField to render it again
101368
101371
 
101369
101372
  if (this.getArrayField(field)) {
101370
101373
  this.updateArrayField(field, {
@@ -101382,21 +101385,21 @@ class foundation_FormFoundation extends foundation {
101382
101385
  if (fieldApi) {
101383
101386
  fieldApi.setError(newError, opts);
101384
101387
  } else {
101385
- this.updateStateError(field, newError, opts);
101386
-
101387
- let nestedFields = this._getNestedField(field);
101388
-
101389
- if (nestedFields.size) {
101390
- for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101391
- let fieldPath = fieldStaff.field;
101392
- let newFieldError = object_get(this.data.errors, fieldPath);
101393
- let nestedBatchUpdateOpts = {
101394
- notNotify: true,
101395
- notUpdate: true
101396
- };
101397
- fieldStaff.fieldApi.setError(newFieldError, nestedBatchUpdateOpts);
101398
- });
101399
- }
101388
+ this.updateStateError(field, newError, opts, () => {
101389
+ let nestedFields = this._getNestedField(field);
101390
+
101391
+ if (nestedFields.size) {
101392
+ for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101393
+ let fieldPath = fieldStaff.field;
101394
+ let newFieldError = object_get(this.data.errors, fieldPath);
101395
+ let nestedBatchUpdateOpts = {
101396
+ notNotify: true,
101397
+ notUpdate: true
101398
+ };
101399
+ fieldStaff.fieldApi.setError(newFieldError, nestedBatchUpdateOpts);
101400
+ });
101401
+ }
101402
+ });
101400
101403
 
101401
101404
  if (this.getArrayField(field)) {
101402
101405
  this.updateArrayField(field, {
@@ -101412,21 +101415,21 @@ class foundation_FormFoundation extends foundation {
101412
101415
  if (fieldApi) {
101413
101416
  fieldApi.setTouched(isTouched, opts);
101414
101417
  } else {
101415
- this.updateStateTouched(field, isTouched, opts);
101416
-
101417
- let nestedFields = this._getNestedField(field);
101418
-
101419
- if (nestedFields.size) {
101420
- for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101421
- let fieldPath = fieldStaff.field;
101422
- let newFieldTouch = object_get(this.data.touched, fieldPath);
101423
- let nestedBatchUpdateOpts = {
101424
- notNotify: true,
101425
- notUpdate: true
101426
- };
101427
- fieldStaff.fieldApi.setTouched(newFieldTouch, nestedBatchUpdateOpts);
101428
- });
101429
- }
101418
+ this.updateStateTouched(field, isTouched, opts, () => {
101419
+ let nestedFields = this._getNestedField(field);
101420
+
101421
+ if (nestedFields.size) {
101422
+ for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101423
+ let fieldPath = fieldStaff.field;
101424
+ let newFieldTouch = object_get(this.data.touched, fieldPath);
101425
+ let nestedBatchUpdateOpts = {
101426
+ notNotify: true,
101427
+ notUpdate: true
101428
+ };
101429
+ fieldStaff.fieldApi.setTouched(newFieldTouch, nestedBatchUpdateOpts);
101430
+ });
101431
+ }
101432
+ });
101430
101433
 
101431
101434
  if (this.getArrayField(field)) {
101432
101435
  this.updateArrayField(field, {
@@ -102784,8 +102787,8 @@ class baseForm_Form extends baseComponent_BaseComponent {
102784
102787
  notifySubmitFail: (errors, values) => {
102785
102788
  this.props.onSubmitFail(errors, values);
102786
102789
  },
102787
- forceUpdate: () => {
102788
- this.forceUpdate();
102790
+ forceUpdate: callback => {
102791
+ this.forceUpdate(callback);
102789
102792
  },
102790
102793
  notifyChange: formState => {
102791
102794
  this.props.onChange(formState);