acud 0.0.62 → 0.0.63

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/acud.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! acud v0.0.62 */
1
+ /*! acud v0.0.63 */
2
2
  (function webpackUniversalModuleDefinition(root, factory) {
3
3
  if(typeof exports === 'object' && typeof module === 'object')
4
4
  module.exports = factory(require("react"), require("react-dom"));
@@ -41344,7 +41344,7 @@ function getDisabledCompatibleChildren(element, prefixCls) {
41344
41344
  }
41345
41345
 
41346
41346
  var Tooltip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function (props, ref) {
41347
- var _classNames2;
41347
+ var _classNames;
41348
41348
 
41349
41349
  var _React$useContext = react__WEBPACK_IMPORTED_MODULE_3__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_9__["ConfigContext"]),
41350
41350
  getContextPopupContainer = _React$useContext.getPopupContainer,
@@ -41431,7 +41431,6 @@ var Tooltip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](func
41431
41431
  };
41432
41432
 
41433
41433
  var customizePrefixCls = props.prefixCls,
41434
- openClassName = props.openClassName,
41435
41434
  getPopupContainer = props.getPopupContainer,
41436
41435
  getTooltipContainer = props.getTooltipContainer,
41437
41436
  overlayClassName = props.overlayClassName,
@@ -41447,9 +41446,7 @@ var Tooltip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](func
41447
41446
  }
41448
41447
 
41449
41448
  var child = getDisabledCompatibleChildren(Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_8__["isValidElement"])(children) ? children : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", null, children), prefixCls);
41450
- var childProps = child.props;
41451
- var childCls = classnames__WEBPACK_IMPORTED_MODULE_6___default()(childProps.className, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])({}, openClassName || "".concat(prefixCls, "-open"), true));
41452
- var customOverlayClassName = classnames__WEBPACK_IMPORTED_MODULE_6___default()(overlayClassName, (_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(_classNames2, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(_classNames2, "".concat(prefixCls, "-").concat(color), color && PresetColorRegex.test(color)), _classNames2));
41449
+ var customOverlayClassName = classnames__WEBPACK_IMPORTED_MODULE_6___default()(overlayClassName, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(_classNames, "".concat(prefixCls, "-").concat(color), color && PresetColorRegex.test(color)), _classNames));
41453
41450
  var formattedOverlayInnerStyle = overlayInnerStyle;
41454
41451
  var arrowContentStyle;
41455
41452
 
@@ -41481,9 +41478,7 @@ var Tooltip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](func
41481
41478
  motionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_10__["getTransitionName"])(rootPrefixCls, 'zoom-big-fast', props.transitionName),
41482
41479
  motionDeadline: 1000
41483
41480
  }
41484
- }), tempVisible ? Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_8__["cloneElement"])(child, {
41485
- className: childCls
41486
- }) : child);
41481
+ }), child);
41487
41482
  });
41488
41483
  Tooltip.displayName = 'Tooltip';
41489
41484
  Tooltip.defaultProps = {
@@ -84848,7 +84843,16 @@ var Schema = /*#__PURE__*/function () {
84848
84843
  if (rule.asyncValidator) {
84849
84844
  res = rule.asyncValidator(rule, data.value, cb, data.source, options);
84850
84845
  } else if (rule.validator) {
84851
- res = rule.validator(rule, data.value, cb, data.source, options);
84846
+ try {
84847
+ res = rule.validator(rule, data.value, cb, data.source, options);
84848
+ } catch (error) {
84849
+ console.error == null ? void 0 : console.error(error); // rethrow to report error
84850
+
84851
+ setTimeout(function () {
84852
+ throw error;
84853
+ }, 0);
84854
+ cb(error.message);
84855
+ }
84852
84856
 
84853
84857
  if (res === true) {
84854
84858
  cb();
@@ -85241,8 +85245,8 @@ function getClientPosition(elem) {
85241
85245
  // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确
85242
85246
  // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin
85243
85247
 
85244
- x = box.left;
85245
- y = box.top; // In IE, most of the time, 2 extra pixels are added to the top and left
85248
+ x = Math.floor(box.left);
85249
+ y = Math.floor(box.top); // In IE, most of the time, 2 extra pixels are added to the top and left
85246
85250
  // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and
85247
85251
  // IE6 standards mode, this border can be overridden by setting the
85248
85252
  // document element's border to zero -- thus, we cannot rely on the
@@ -85649,7 +85653,7 @@ function getWH(elem, name, ex) {
85649
85653
  }
85650
85654
 
85651
85655
  var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];
85652
- var borderBoxValue = name === 'width' ? elem.getBoundingClientRect().width : elem.getBoundingClientRect().height;
85656
+ var borderBoxValue = name === 'width' ? Math.floor(elem.getBoundingClientRect().width) : Math.floor(elem.getBoundingClientRect().height);
85653
85657
  var isBorderBox = isBorderBoxFn(elem);
85654
85658
  var cssBoxValue = 0;
85655
85659
 
@@ -110401,7 +110405,7 @@ module.exports = toString;
110401
110405
  /***/ (function(module, exports) {
110402
110406
 
110403
110407
  //! moment.js
110404
- //! version : 2.29.1
110408
+ //! version : 2.29.3
110405
110409
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
110406
110410
  //! license : MIT
110407
110411
  //! momentjs.com
@@ -110478,8 +110482,9 @@ module.exports = toString;
110478
110482
 
110479
110483
  function map(arr, fn) {
110480
110484
  var res = [],
110481
- i;
110482
- for (i = 0; i < arr.length; ++i) {
110485
+ i,
110486
+ arrLen = arr.length;
110487
+ for (i = 0; i < arrLen; ++i) {
110483
110488
  res.push(fn(arr[i], i));
110484
110489
  }
110485
110490
  return res;
@@ -110608,7 +110613,10 @@ module.exports = toString;
110608
110613
  updateInProgress = false;
110609
110614
 
110610
110615
  function copyConfig(to, from) {
110611
- var i, prop, val;
110616
+ var i,
110617
+ prop,
110618
+ val,
110619
+ momentPropertiesLen = momentProperties.length;
110612
110620
 
110613
110621
  if (!isUndefined(from._isAMomentObject)) {
110614
110622
  to._isAMomentObject = from._isAMomentObject;
@@ -110641,8 +110649,8 @@ module.exports = toString;
110641
110649
  to._locale = from._locale;
110642
110650
  }
110643
110651
 
110644
- if (momentProperties.length > 0) {
110645
- for (i = 0; i < momentProperties.length; i++) {
110652
+ if (momentPropertiesLen > 0) {
110653
+ for (i = 0; i < momentPropertiesLen; i++) {
110646
110654
  prop = momentProperties[i];
110647
110655
  val = from[prop];
110648
110656
  if (!isUndefined(val)) {
@@ -110697,8 +110705,9 @@ module.exports = toString;
110697
110705
  var args = [],
110698
110706
  arg,
110699
110707
  i,
110700
- key;
110701
- for (i = 0; i < arguments.length; i++) {
110708
+ key,
110709
+ argLen = arguments.length;
110710
+ for (i = 0; i < argLen; i++) {
110702
110711
  arg = '';
110703
110712
  if (typeof arguments[i] === 'object') {
110704
110713
  arg += '\n[' + i + '] ';
@@ -110848,7 +110857,8 @@ module.exports = toString;
110848
110857
  );
110849
110858
  }
110850
110859
 
110851
- var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
110860
+ var formattingTokens =
110861
+ /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
110852
110862
  localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
110853
110863
  formatFunctions = {},
110854
110864
  formatTokenFunctions = {};
@@ -111152,8 +111162,9 @@ module.exports = toString;
111152
111162
  if (typeof units === 'object') {
111153
111163
  units = normalizeObjectUnits(units);
111154
111164
  var prioritized = getPrioritizedUnits(units),
111155
- i;
111156
- for (i = 0; i < prioritized.length; i++) {
111165
+ i,
111166
+ prioritizedLen = prioritized.length;
111167
+ for (i = 0; i < prioritizedLen; i++) {
111157
111168
  this[prioritized[i].unit](units[prioritized[i].unit]);
111158
111169
  }
111159
111170
  } else {
@@ -111183,7 +111194,8 @@ module.exports = toString;
111183
111194
  matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
111184
111195
  // any word (or two) characters or numbers including two/three word month in arabic.
111185
111196
  // includes scottish gaelic two word and hyphenated months
111186
- matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
111197
+ matchWord =
111198
+ /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
111187
111199
  regexes;
111188
111200
 
111189
111201
  regexes = {};
@@ -111209,15 +111221,12 @@ module.exports = toString;
111209
111221
  return regexEscape(
111210
111222
  s
111211
111223
  .replace('\\', '')
111212
- .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (
111213
- matched,
111214
- p1,
111215
- p2,
111216
- p3,
111217
- p4
111218
- ) {
111219
- return p1 || p2 || p3 || p4;
111220
- })
111224
+ .replace(
111225
+ /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
111226
+ function (matched, p1, p2, p3, p4) {
111227
+ return p1 || p2 || p3 || p4;
111228
+ }
111229
+ )
111221
111230
  );
111222
111231
  }
111223
111232
 
@@ -111229,7 +111238,8 @@ module.exports = toString;
111229
111238
 
111230
111239
  function addParseToken(token, callback) {
111231
111240
  var i,
111232
- func = callback;
111241
+ func = callback,
111242
+ tokenLen;
111233
111243
  if (typeof token === 'string') {
111234
111244
  token = [token];
111235
111245
  }
@@ -111238,7 +111248,8 @@ module.exports = toString;
111238
111248
  array[callback] = toInt(input);
111239
111249
  };
111240
111250
  }
111241
- for (i = 0; i < token.length; i++) {
111251
+ tokenLen = token.length;
111252
+ for (i = 0; i < tokenLen; i++) {
111242
111253
  tokens[token[i]] = func;
111243
111254
  }
111244
111255
  }
@@ -111349,12 +111360,12 @@ module.exports = toString;
111349
111360
 
111350
111361
  // LOCALES
111351
111362
 
111352
- var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
111353
- '_'
111354
- ),
111355
- defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split(
111356
- '_'
111357
- ),
111363
+ var defaultLocaleMonths =
111364
+ 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
111365
+ '_'
111366
+ ),
111367
+ defaultLocaleMonthsShort =
111368
+ 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
111358
111369
  MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
111359
111370
  defaultMonthsShortRegex = matchWord,
111360
111371
  defaultMonthsRegex = matchWord;
@@ -111796,14 +111807,12 @@ module.exports = toString;
111796
111807
  addRegexToken('W', match1to2);
111797
111808
  addRegexToken('WW', match1to2, match2);
111798
111809
 
111799
- addWeekParseToken(['w', 'ww', 'W', 'WW'], function (
111800
- input,
111801
- week,
111802
- config,
111803
- token
111804
- ) {
111805
- week[token.substr(0, 1)] = toInt(input);
111806
- });
111810
+ addWeekParseToken(
111811
+ ['w', 'ww', 'W', 'WW'],
111812
+ function (input, week, config, token) {
111813
+ week[token.substr(0, 1)] = toInt(input);
111814
+ }
111815
+ );
111807
111816
 
111808
111817
  // HELPERS
111809
111818
 
@@ -111928,9 +111937,8 @@ module.exports = toString;
111928
111937
  return ws.slice(n, 7).concat(ws.slice(0, n));
111929
111938
  }
111930
111939
 
111931
- var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
111932
- '_'
111933
- ),
111940
+ var defaultLocaleWeekdays =
111941
+ 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
111934
111942
  defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
111935
111943
  defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
111936
111944
  defaultWeekdaysRegex = matchWord,
@@ -112478,6 +112486,11 @@ module.exports = toString;
112478
112486
  return globalLocale;
112479
112487
  }
112480
112488
 
112489
+ function isLocaleNameSane(name) {
112490
+ // Prevent names that look like filesystem paths, i.e contain '/' or '\'
112491
+ return name.match('^[^/\\\\]*$') != null;
112492
+ }
112493
+
112481
112494
  function loadLocale(name) {
112482
112495
  var oldLocale = null,
112483
112496
  aliasedRequire;
@@ -112486,7 +112499,8 @@ module.exports = toString;
112486
112499
  locales[name] === undefined &&
112487
112500
  typeof module !== 'undefined' &&
112488
112501
  module &&
112489
- module.exports
112502
+ module.exports &&
112503
+ isLocaleNameSane(name)
112490
112504
  ) {
112491
112505
  try {
112492
112506
  oldLocale = globalLocale._abbr;
@@ -112703,8 +112717,10 @@ module.exports = toString;
112703
112717
 
112704
112718
  // iso 8601 regex
112705
112719
  // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
112706
- var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
112707
- basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
112720
+ var extendedIsoRegex =
112721
+ /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
112722
+ basicIsoRegex =
112723
+ /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
112708
112724
  tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
112709
112725
  isoDates = [
112710
112726
  ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
@@ -112735,7 +112751,8 @@ module.exports = toString;
112735
112751
  ],
112736
112752
  aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
112737
112753
  // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
112738
- rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
112754
+ rfc2822 =
112755
+ /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
112739
112756
  obsOffsets = {
112740
112757
  UT: 0,
112741
112758
  GMT: 0,
@@ -112758,12 +112775,13 @@ module.exports = toString;
112758
112775
  allowTime,
112759
112776
  dateFormat,
112760
112777
  timeFormat,
112761
- tzFormat;
112778
+ tzFormat,
112779
+ isoDatesLen = isoDates.length,
112780
+ isoTimesLen = isoTimes.length;
112762
112781
 
112763
112782
  if (match) {
112764
112783
  getParsingFlags(config).iso = true;
112765
-
112766
- for (i = 0, l = isoDates.length; i < l; i++) {
112784
+ for (i = 0, l = isoDatesLen; i < l; i++) {
112767
112785
  if (isoDates[i][1].exec(match[1])) {
112768
112786
  dateFormat = isoDates[i][0];
112769
112787
  allowTime = isoDates[i][2] !== false;
@@ -112775,7 +112793,7 @@ module.exports = toString;
112775
112793
  return;
112776
112794
  }
112777
112795
  if (match[3]) {
112778
- for (i = 0, l = isoTimes.length; i < l; i++) {
112796
+ for (i = 0, l = isoTimesLen; i < l; i++) {
112779
112797
  if (isoTimes[i][1].exec(match[3])) {
112780
112798
  // match[2] should be 'T' or space
112781
112799
  timeFormat = (match[2] || ' ') + isoTimes[i][0];
@@ -113155,12 +113173,13 @@ module.exports = toString;
113155
113173
  skipped,
113156
113174
  stringLength = string.length,
113157
113175
  totalParsedInputLength = 0,
113158
- era;
113176
+ era,
113177
+ tokenLen;
113159
113178
 
113160
113179
  tokens =
113161
113180
  expandFormat(config._f, config._locale).match(formattingTokens) || [];
113162
-
113163
- for (i = 0; i < tokens.length; i++) {
113181
+ tokenLen = tokens.length;
113182
+ for (i = 0; i < tokenLen; i++) {
113164
113183
  token = tokens[i];
113165
113184
  parsedInput = (string.match(getParseRegexForToken(token, config)) ||
113166
113185
  [])[0];
@@ -113255,15 +113274,16 @@ module.exports = toString;
113255
113274
  i,
113256
113275
  currentScore,
113257
113276
  validFormatFound,
113258
- bestFormatIsValid = false;
113277
+ bestFormatIsValid = false,
113278
+ configfLen = config._f.length;
113259
113279
 
113260
- if (config._f.length === 0) {
113280
+ if (configfLen === 0) {
113261
113281
  getParsingFlags(config).invalidFormat = true;
113262
113282
  config._d = new Date(NaN);
113263
113283
  return;
113264
113284
  }
113265
113285
 
113266
- for (i = 0; i < config._f.length; i++) {
113286
+ for (i = 0; i < configfLen; i++) {
113267
113287
  currentScore = 0;
113268
113288
  validFormatFound = false;
113269
113289
  tempConfig = copyConfig({}, config);
@@ -113504,7 +113524,8 @@ module.exports = toString;
113504
113524
  function isDurationValid(m) {
113505
113525
  var key,
113506
113526
  unitHasDecimal = false,
113507
- i;
113527
+ i,
113528
+ orderLen = ordering.length;
113508
113529
  for (key in m) {
113509
113530
  if (
113510
113531
  hasOwnProp(m, key) &&
@@ -113517,7 +113538,7 @@ module.exports = toString;
113517
113538
  }
113518
113539
  }
113519
113540
 
113520
- for (i = 0; i < ordering.length; ++i) {
113541
+ for (i = 0; i < orderLen; ++i) {
113521
113542
  if (m[ordering[i]]) {
113522
113543
  if (unitHasDecimal) {
113523
113544
  return false; // only allow non-integers for smallest unit
@@ -113842,7 +113863,8 @@ module.exports = toString;
113842
113863
  // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
113843
113864
  // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
113844
113865
  // and further modified to allow for strings containing both week and day
113845
- isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
113866
+ isoRegex =
113867
+ /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
113846
113868
 
113847
113869
  function createDuration(input, key) {
113848
113870
  var duration = input,
@@ -114063,9 +114085,10 @@ module.exports = toString;
114063
114085
  'ms',
114064
114086
  ],
114065
114087
  i,
114066
- property;
114088
+ property,
114089
+ propertyLen = properties.length;
114067
114090
 
114068
- for (i = 0; i < properties.length; i += 1) {
114091
+ for (i = 0; i < propertyLen; i += 1) {
114069
114092
  property = properties[i];
114070
114093
  propertyTest = propertyTest || hasOwnProp(input, property);
114071
114094
  }
@@ -114688,19 +114711,17 @@ module.exports = toString;
114688
114711
  addRegexToken('NNNN', matchEraName);
114689
114712
  addRegexToken('NNNNN', matchEraNarrow);
114690
114713
 
114691
- addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (
114692
- input,
114693
- array,
114694
- config,
114695
- token
114696
- ) {
114697
- var era = config._locale.erasParse(input, token, config._strict);
114698
- if (era) {
114699
- getParsingFlags(config).era = era;
114700
- } else {
114701
- getParsingFlags(config).invalidEra = input;
114714
+ addParseToken(
114715
+ ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],
114716
+ function (input, array, config, token) {
114717
+ var era = config._locale.erasParse(input, token, config._strict);
114718
+ if (era) {
114719
+ getParsingFlags(config).era = era;
114720
+ } else {
114721
+ getParsingFlags(config).invalidEra = input;
114722
+ }
114702
114723
  }
114703
- });
114724
+ );
114704
114725
 
114705
114726
  addRegexToken('y', matchUnsigned);
114706
114727
  addRegexToken('yy', matchUnsigned);
@@ -114992,14 +115013,12 @@ module.exports = toString;
114992
115013
  addRegexToken('GGGGG', match1to6, match6);
114993
115014
  addRegexToken('ggggg', match1to6, match6);
114994
115015
 
114995
- addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (
114996
- input,
114997
- week,
114998
- config,
114999
- token
115000
- ) {
115001
- week[token.substr(0, 2)] = toInt(input);
115002
- });
115016
+ addWeekParseToken(
115017
+ ['gggg', 'ggggg', 'GGGG', 'GGGGG'],
115018
+ function (input, week, config, token) {
115019
+ week[token.substr(0, 2)] = toInt(input);
115020
+ }
115021
+ );
115003
115022
 
115004
115023
  addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
115005
115024
  week[token] = hooks.parseTwoDigitYear(input);
@@ -116022,7 +116041,7 @@ module.exports = toString;
116022
116041
 
116023
116042
  //! moment.js
116024
116043
 
116025
- hooks.version = '2.29.1';
116044
+ hooks.version = '2.29.3';
116026
116045
 
116027
116046
  setHookCallback(createLocal);
116028
116047
 
@@ -116484,6 +116503,8 @@ __webpack_require__.r(__webpack_exports__);
116484
116503
  }
116485
116504
 
116486
116505
  function trigger(force) {
116506
+ cancelTrigger();
116507
+
116487
116508
  if (!calledRef.current || force === true) {
116488
116509
  if (callback() === false) {
116489
116510
  // Not delay since callback cancelled self
@@ -116491,12 +116512,10 @@ __webpack_require__.r(__webpack_exports__);
116491
116512
  }
116492
116513
 
116493
116514
  calledRef.current = true;
116494
- cancelTrigger();
116495
116515
  timeoutRef.current = window.setTimeout(function () {
116496
116516
  calledRef.current = false;
116497
116517
  }, buffer);
116498
116518
  } else {
116499
- cancelTrigger();
116500
116519
  timeoutRef.current = window.setTimeout(function () {
116501
116520
  calledRef.current = false;
116502
116521
  trigger();
@@ -116925,31 +116944,45 @@ var CollapsePanel = /*#__PURE__*/function (_React$Component) {
116925
116944
  extra = _this$props2.extra,
116926
116945
  collapsible = _this$props2.collapsible;
116927
116946
  var disabled = collapsible === 'disabled';
116928
- var headerCls = classnames__WEBPACK_IMPORTED_MODULE_7___default()("".concat(prefixCls, "-header"), (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_classNames, headerClass, headerClass), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_classNames, "".concat(prefixCls, "-header-collapsible-only"), collapsible === 'header'), _classNames));
116947
+ var collapsibleHeader = collapsible === 'header';
116948
+ var headerCls = classnames__WEBPACK_IMPORTED_MODULE_7___default()("".concat(prefixCls, "-header"), (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_classNames, headerClass, headerClass), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_classNames, "".concat(prefixCls, "-header-collapsible-only"), collapsibleHeader), _classNames));
116929
116949
  var itemCls = classnames__WEBPACK_IMPORTED_MODULE_7___default()((_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_classNames2, "".concat(prefixCls, "-item"), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_classNames2, "".concat(prefixCls, "-item-active"), isActive), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_classNames2, "".concat(prefixCls, "-item-disabled"), disabled), _classNames2), className);
116930
116950
  var icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("i", {
116931
116951
  className: "arrow"
116932
116952
  });
116953
+ /** header 节点属性 */
116954
+
116955
+ var headerProps = {
116956
+ className: headerCls,
116957
+ 'aria-expanded': isActive,
116958
+ onKeyPress: this.handleKeyPress
116959
+ };
116933
116960
 
116934
116961
  if (showArrow && typeof expandIcon === 'function') {
116935
116962
  icon = expandIcon(this.props);
116936
116963
  }
116937
116964
 
116965
+ if (collapsibleHeader) {
116966
+ icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", {
116967
+ style: {
116968
+ cursor: 'pointer'
116969
+ },
116970
+ onClick: function onClick() {
116971
+ return _this2.handleItemClick();
116972
+ }
116973
+ }, icon);
116974
+ } else {
116975
+ headerProps.onClick = this.handleItemClick;
116976
+ headerProps.role = accordion ? 'tab' : 'button';
116977
+ headerProps.tabIndex = disabled ? -1 : 0;
116978
+ }
116979
+
116938
116980
  var ifExtraExist = extra !== null && extra !== undefined && typeof extra !== 'boolean';
116939
116981
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", {
116940
116982
  className: itemCls,
116941
116983
  style: style,
116942
116984
  id: id
116943
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", {
116944
- className: headerCls,
116945
- onClick: function onClick() {
116946
- return collapsible !== 'header' && _this2.handleItemClick();
116947
- },
116948
- role: accordion ? 'tab' : 'button',
116949
- tabIndex: disabled ? -1 : 0,
116950
- "aria-expanded": isActive,
116951
- onKeyPress: this.handleKeyPress
116952
- }, showArrow && icon, collapsible === 'header' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", {
116985
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", headerProps, showArrow && icon, collapsibleHeader ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", {
116953
116986
  onClick: this.handleItemClick,
116954
116987
  className: "".concat(prefixCls, "-header-text")
116955
116988
  }, header) : header, ifExtraExist && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", {
@@ -119356,7 +119389,9 @@ var Context = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createContext"]({
119356
119389
  registerField: warningFunc,
119357
119390
  useSubscribe: warningFunc,
119358
119391
  setInitialValues: warningFunc,
119392
+ destroyForm: warningFunc,
119359
119393
  setCallbacks: warningFunc,
119394
+ registerWatch: warningFunc,
119360
119395
  getFields: warningFunc,
119361
119396
  setValidateMessages: warningFunc,
119362
119397
  setPreserve: warningFunc,
@@ -119428,7 +119463,8 @@ var Form = function Form(_ref, ref) {
119428
119463
  setInitialValues = _formInstance$getInte.setInitialValues,
119429
119464
  setCallbacks = _formInstance$getInte.setCallbacks,
119430
119465
  setValidateMessages = _formInstance$getInte.setValidateMessages,
119431
- setPreserve = _formInstance$getInte.setPreserve; // Pass ref with form instance
119466
+ setPreserve = _formInstance$getInte.setPreserve,
119467
+ destroyForm = _formInstance$getInte.destroyForm; // Pass ref with form instance
119432
119468
 
119433
119469
 
119434
119470
  react__WEBPACK_IMPORTED_MODULE_4__["useImperativeHandle"](ref, function () {
@@ -119472,15 +119508,21 @@ var Form = function Form(_ref, ref) {
119472
119508
 
119473
119509
  if (!mountRef.current) {
119474
119510
  mountRef.current = true;
119475
- } // Prepare children by `children` type
119511
+ }
119476
119512
 
119513
+ react__WEBPACK_IMPORTED_MODULE_4__["useEffect"](function () {
119514
+ return destroyForm;
119515
+ }, // eslint-disable-next-line react-hooks/exhaustive-deps
119516
+ []); // Prepare children by `children` type
119477
119517
 
119478
- var childrenNode = children;
119518
+ var childrenNode;
119479
119519
  var childrenRenderProps = typeof children === 'function';
119480
119520
 
119481
119521
  if (childrenRenderProps) {
119482
119522
  var values = formInstance.getFieldsValue(true);
119483
119523
  childrenNode = children(values, formInstance);
119524
+ } else {
119525
+ childrenNode = children;
119484
119526
  } // Not use subscribe when using render props
119485
119527
 
119486
119528
 
@@ -119811,7 +119853,7 @@ var ListContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createContext
119811
119853
  /*!************************************************!*\
119812
119854
  !*** ./node_modules/rc-field-form/es/index.js ***!
119813
119855
  \************************************************/
119814
- /*! exports provided: Field, List, useForm, FormProvider, FieldContext, ListContext, default */
119856
+ /*! exports provided: Field, List, useForm, FormProvider, FieldContext, ListContext, useWatch, default */
119815
119857
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
119816
119858
 
119817
119859
  "use strict";
@@ -119837,6 +119879,10 @@ __webpack_require__.r(__webpack_exports__);
119837
119879
  /* harmony import */ var _ListContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ListContext */ "./node_modules/rc-field-form/es/ListContext.js");
119838
119880
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListContext", function() { return _ListContext__WEBPACK_IMPORTED_MODULE_7__["default"]; });
119839
119881
 
119882
+ /* harmony import */ var _useWatch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./useWatch */ "./node_modules/rc-field-form/es/useWatch.js");
119883
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useWatch", function() { return _useWatch__WEBPACK_IMPORTED_MODULE_8__["default"]; });
119884
+
119885
+
119840
119886
 
119841
119887
 
119842
119888
 
@@ -119851,6 +119897,7 @@ RefForm.FormProvider = _FormContext__WEBPACK_IMPORTED_MODULE_5__["FormProvider"]
119851
119897
  RefForm.Field = _Field__WEBPACK_IMPORTED_MODULE_1__["default"];
119852
119898
  RefForm.List = _List__WEBPACK_IMPORTED_MODULE_2__["default"];
119853
119899
  RefForm.useForm = _useForm__WEBPACK_IMPORTED_MODULE_3__["default"];
119900
+ RefForm.useWatch = _useWatch__WEBPACK_IMPORTED_MODULE_8__["default"];
119854
119901
 
119855
119902
  /* harmony default export */ __webpack_exports__["default"] = (RefForm);
119856
119903
 
@@ -119941,6 +119988,7 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
119941
119988
  setFieldsValue: _this.setFieldsValue,
119942
119989
  validateFields: _this.validateFields,
119943
119990
  submit: _this.submit,
119991
+ _init: true,
119944
119992
  getInternalHooks: _this.getInternalHooks
119945
119993
  };
119946
119994
  };
@@ -119954,11 +120002,13 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
119954
120002
  registerField: _this.registerField,
119955
120003
  useSubscribe: _this.useSubscribe,
119956
120004
  setInitialValues: _this.setInitialValues,
120005
+ destroyForm: _this.destroyForm,
119957
120006
  setCallbacks: _this.setCallbacks,
119958
120007
  setValidateMessages: _this.setValidateMessages,
119959
120008
  getFields: _this.getFields,
119960
120009
  setPreserve: _this.setPreserve,
119961
- getInitialValue: _this.getInitialValue
120010
+ getInitialValue: _this.getInitialValue,
120011
+ registerWatch: _this.registerWatch
119962
120012
  };
119963
120013
  }
119964
120014
 
@@ -119970,16 +120020,44 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
119970
120020
  _this.subscribable = subscribable;
119971
120021
  };
119972
120022
 
120023
+ this.prevWithoutPreserves = null;
120024
+
119973
120025
  this.setInitialValues = function (initialValues, init) {
119974
120026
  _this.initialValues = initialValues || {};
119975
120027
 
119976
120028
  if (init) {
119977
- _this.store = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValues"])({}, _this.store, initialValues);
120029
+ var _this$prevWithoutPres;
120030
+
120031
+ var nextStore = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValues"])({}, initialValues, _this.store); // We will take consider prev form unmount fields.
120032
+ // When the field is not `preserve`, we need fill this with initialValues instead of store.
120033
+ // eslint-disable-next-line array-callback-return
120034
+
120035
+ (_this$prevWithoutPres = _this.prevWithoutPreserves) === null || _this$prevWithoutPres === void 0 ? void 0 : _this$prevWithoutPres.map(function (_ref) {
120036
+ var namePath = _ref.key;
120037
+ nextStore = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValue"])(nextStore, namePath, Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["getValue"])(initialValues, namePath));
120038
+ });
120039
+ _this.prevWithoutPreserves = null;
120040
+
120041
+ _this.updateStore(nextStore);
119978
120042
  }
119979
120043
  };
119980
120044
 
120045
+ this.destroyForm = function () {
120046
+ var prevWithoutPreserves = new _utils_NameMap__WEBPACK_IMPORTED_MODULE_10__["default"]();
120047
+
120048
+ _this.getFieldEntities(true).forEach(function (entity) {
120049
+ if (!entity.isPreserve()) {
120050
+ prevWithoutPreserves.set(entity.getNamePath(), true);
120051
+ }
120052
+ });
120053
+
120054
+ _this.prevWithoutPreserves = prevWithoutPreserves;
120055
+ };
120056
+
119981
120057
  this.getInitialValue = function (namePath) {
119982
- return Object(_utils_cloneDeep__WEBPACK_IMPORTED_MODULE_13__["default"])(Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["getValue"])(_this.initialValues, namePath));
120058
+ var initValue = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["getValue"])(_this.initialValues, namePath); // Not cloneDeep when without `namePath`
120059
+
120060
+ return namePath.length ? Object(_utils_cloneDeep__WEBPACK_IMPORTED_MODULE_13__["default"])(initValue) : initValue;
119983
120061
  };
119984
120062
 
119985
120063
  this.setCallbacks = function (callbacks) {
@@ -119994,6 +120072,31 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
119994
120072
  _this.preserve = preserve;
119995
120073
  };
119996
120074
 
120075
+ this.watchList = [];
120076
+
120077
+ this.registerWatch = function (callback) {
120078
+ _this.watchList.push(callback);
120079
+
120080
+ return function () {
120081
+ _this.watchList = _this.watchList.filter(function (fn) {
120082
+ return fn !== callback;
120083
+ });
120084
+ };
120085
+ };
120086
+
120087
+ this.notifyWatch = function () {
120088
+ var namePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
120089
+
120090
+ // No need to cost perf when nothing need to watch
120091
+ if (_this.watchList.length) {
120092
+ var values = _this.getFieldsValue();
120093
+
120094
+ _this.watchList.forEach(function (callback) {
120095
+ callback(values, namePath);
120096
+ });
120097
+ }
120098
+ };
120099
+
119997
120100
  this.timeoutId = null;
119998
120101
 
119999
120102
  this.warningUnhooked = function () {
@@ -120008,6 +120111,10 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120008
120111
  }
120009
120112
  };
120010
120113
 
120114
+ this.updateStore = function (nextStore) {
120115
+ _this.store = nextStore;
120116
+ };
120117
+
120011
120118
  this.getFieldEntities = function () {
120012
120119
  var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
120013
120120
 
@@ -120190,8 +120297,8 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120190
120297
  return entities.some(isFieldTouched);
120191
120298
  };
120192
120299
 
120193
- var namePathListEntities = map.map(function (_ref) {
120194
- var value = _ref.value;
120300
+ var namePathListEntities = map.map(function (_ref2) {
120301
+ var value = _ref2.value;
120195
120302
  return value;
120196
120303
  });
120197
120304
  return isAllFieldsTouched ? namePathListEntities.every(isNamePathListTouched) : namePathListEntities.some(isNamePathListTouched);
@@ -120271,7 +120378,7 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120271
120378
 
120272
120379
 
120273
120380
  if (!info.skipExist || originValue === undefined) {
120274
- _this.store = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValue"])(_this.store, namePath, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__["default"])(records)[0].value);
120381
+ _this.updateStore(Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValue"])(_this.store, namePath, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__["default"])(records)[0].value));
120275
120382
  }
120276
120383
  }
120277
120384
  }
@@ -120309,7 +120416,7 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120309
120416
  var prevStore = _this.store;
120310
120417
 
120311
120418
  if (!nameList) {
120312
- _this.store = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValues"])({}, _this.initialValues);
120419
+ _this.updateStore(Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValues"])({}, _this.initialValues));
120313
120420
 
120314
120421
  _this.resetWithFieldInitialValue();
120315
120422
 
@@ -120317,6 +120424,8 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120317
120424
  type: 'reset'
120318
120425
  });
120319
120426
 
120427
+ _this.notifyWatch();
120428
+
120320
120429
  return;
120321
120430
  } // Reset by `nameList`
120322
120431
 
@@ -120325,7 +120434,7 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120325
120434
  namePathList.forEach(function (namePath) {
120326
120435
  var initialValue = _this.getInitialValue(namePath);
120327
120436
 
120328
- _this.store = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValue"])(_this.store, namePath, initialValue);
120437
+ _this.updateStore(Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValue"])(_this.store, namePath, initialValue));
120329
120438
  });
120330
120439
 
120331
120440
  _this.resetWithFieldInitialValue({
@@ -120335,21 +120444,25 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120335
120444
  _this.notifyObservers(prevStore, namePathList, {
120336
120445
  type: 'reset'
120337
120446
  });
120447
+
120448
+ _this.notifyWatch(namePathList);
120338
120449
  };
120339
120450
 
120340
120451
  this.setFields = function (fields) {
120341
120452
  _this.warningUnhooked();
120342
120453
 
120343
120454
  var prevStore = _this.store;
120455
+ var namePathList = [];
120344
120456
  fields.forEach(function (fieldData) {
120345
120457
  var name = fieldData.name,
120346
120458
  errors = fieldData.errors,
120347
120459
  data = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(fieldData, _excluded);
120348
120460
 
120349
- var namePath = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["getNamePath"])(name); // Value
120461
+ var namePath = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["getNamePath"])(name);
120462
+ namePathList.push(namePath); // Value
120350
120463
 
120351
120464
  if ('value' in data) {
120352
- _this.store = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValue"])(_this.store, namePath, data.value);
120465
+ _this.updateStore(Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValue"])(_this.store, namePath, data.value));
120353
120466
  }
120354
120467
 
120355
120468
  _this.notifyObservers(prevStore, [namePath], {
@@ -120357,6 +120470,8 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120357
120470
  data: fieldData
120358
120471
  });
120359
120472
  });
120473
+
120474
+ _this.notifyWatch(namePathList);
120360
120475
  };
120361
120476
 
120362
120477
  this.getFields = function () {
@@ -120387,13 +120502,17 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120387
120502
  var prevValue = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["getValue"])(_this.store, namePath);
120388
120503
 
120389
120504
  if (prevValue === undefined) {
120390
- _this.store = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValue"])(_this.store, namePath, initialValue);
120505
+ _this.updateStore(Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValue"])(_this.store, namePath, initialValue));
120391
120506
  }
120392
120507
  }
120393
120508
  };
120394
120509
 
120395
120510
  this.registerField = function (entity) {
120396
- _this.fieldEntities.push(entity); // Set initial values
120511
+ _this.fieldEntities.push(entity);
120512
+
120513
+ var namePath = entity.getNamePath();
120514
+
120515
+ _this.notifyWatch([namePath]); // Set initial values
120397
120516
 
120398
120517
 
120399
120518
  if (entity.props.initialValue !== undefined) {
@@ -120420,7 +120539,6 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120420
120539
  var mergedPreserve = preserve !== undefined ? preserve : _this.preserve;
120421
120540
 
120422
120541
  if (mergedPreserve === false && (!isListField || subNamePath.length > 1)) {
120423
- var namePath = entity.getNamePath();
120424
120542
  var defaultValue = isListField ? undefined : _this.getInitialValue(namePath);
120425
120543
 
120426
120544
  if (namePath.length && _this.getFieldValue(namePath) !== defaultValue && _this.fieldEntities.every(function (field) {
@@ -120429,7 +120547,9 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120429
120547
  );
120430
120548
  })) {
120431
120549
  var _prevStore = _this.store;
120432
- _this.store = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValue"])(_prevStore, namePath, defaultValue, true); // Notify that field is unmount
120550
+
120551
+ _this.updateStore(Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValue"])(_prevStore, namePath, defaultValue, true)); // Notify that field is unmount
120552
+
120433
120553
 
120434
120554
  _this.notifyObservers(_prevStore, [namePath], {
120435
120555
  type: 'remove'
@@ -120439,6 +120559,8 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120439
120559
  _this.triggerDependenciesUpdate(_prevStore, namePath);
120440
120560
  }
120441
120561
  }
120562
+
120563
+ _this.notifyWatch([namePath]);
120442
120564
  };
120443
120565
  };
120444
120566
 
@@ -120477,8 +120599,8 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120477
120599
  store: _this.getFieldsValue(true)
120478
120600
  });
120479
120601
 
120480
- _this.getFieldEntities().forEach(function (_ref2) {
120481
- var onStoreChange = _ref2.onStoreChange;
120602
+ _this.getFieldEntities().forEach(function (_ref3) {
120603
+ var onStoreChange = _ref3.onStoreChange;
120482
120604
  onStoreChange(prevStore, namePathList, mergedInfo);
120483
120605
  });
120484
120606
  } else {
@@ -120504,12 +120626,15 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120504
120626
  this.updateValue = function (name, value) {
120505
120627
  var namePath = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["getNamePath"])(name);
120506
120628
  var prevStore = _this.store;
120507
- _this.store = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValue"])(_this.store, namePath, value);
120629
+
120630
+ _this.updateStore(Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValue"])(_this.store, namePath, value));
120508
120631
 
120509
120632
  _this.notifyObservers(prevStore, [namePath], {
120510
120633
  type: 'valueUpdate',
120511
120634
  source: 'internal'
120512
- }); // Dependencies update
120635
+ });
120636
+
120637
+ _this.notifyWatch([namePath]); // Dependencies update
120513
120638
 
120514
120639
 
120515
120640
  var childrenFields = _this.triggerDependenciesUpdate(prevStore, namePath); // trigger callback function
@@ -120531,13 +120656,17 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120531
120656
  var prevStore = _this.store;
120532
120657
 
120533
120658
  if (store) {
120534
- _this.store = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValues"])(_this.store, store);
120659
+ var nextStore = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["setValues"])(_this.store, store);
120660
+
120661
+ _this.updateStore(nextStore);
120535
120662
  }
120536
120663
 
120537
120664
  _this.notifyObservers(prevStore, null, {
120538
120665
  type: 'valueUpdate',
120539
120666
  source: 'external'
120540
120667
  });
120668
+
120669
+ _this.notifyWatch();
120541
120670
  };
120542
120671
 
120543
120672
  this.getDependencyChildrenFields = function (rootNamePath) {
@@ -120592,9 +120721,9 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120592
120721
 
120593
120722
  if (filedErrors) {
120594
120723
  var cache = new _utils_NameMap__WEBPACK_IMPORTED_MODULE_10__["default"]();
120595
- filedErrors.forEach(function (_ref3) {
120596
- var name = _ref3.name,
120597
- errors = _ref3.errors;
120724
+ filedErrors.forEach(function (_ref4) {
120725
+ var name = _ref4.name,
120726
+ errors = _ref4.errors;
120598
120727
  cache.set(name, errors);
120599
120728
  });
120600
120729
  fields.forEach(function (field) {
@@ -120603,8 +120732,8 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120603
120732
  });
120604
120733
  }
120605
120734
 
120606
- var changedFields = fields.filter(function (_ref4) {
120607
- var fieldName = _ref4.name;
120735
+ var changedFields = fields.filter(function (_ref5) {
120736
+ var fieldName = _ref5.name;
120608
120737
  return Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_12__["containsNamePath"])(namePathList, fieldName);
120609
120738
  });
120610
120739
  onFieldsChange(changedFields, fields);
@@ -120663,9 +120792,9 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120663
120792
  }).catch(function (ruleErrors) {
120664
120793
  var mergedErrors = [];
120665
120794
  var mergedWarnings = [];
120666
- ruleErrors.forEach(function (_ref5) {
120667
- var warningOnly = _ref5.rule.warningOnly,
120668
- errors = _ref5.errors;
120795
+ ruleErrors.forEach(function (_ref6) {
120796
+ var warningOnly = _ref6.rule.warningOnly,
120797
+ errors = _ref6.errors;
120669
120798
 
120670
120799
  if (warningOnly) {
120671
120800
  mergedWarnings.push.apply(mergedWarnings, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__["default"])(errors));
@@ -120697,8 +120826,8 @@ var FormStore = /*#__PURE__*/Object(_babel_runtime_helpers_esm_createClass__WEBP
120697
120826
  summaryPromise.catch(function (results) {
120698
120827
  return results;
120699
120828
  }).then(function (results) {
120700
- var resultNamePathList = results.map(function (_ref6) {
120701
- var name = _ref6.name;
120829
+ var resultNamePathList = results.map(function (_ref7) {
120830
+ var name = _ref7.name;
120702
120831
  return name;
120703
120832
  });
120704
120833
 
@@ -120785,6 +120914,84 @@ function useForm(form) {
120785
120914
 
120786
120915
  /***/ }),
120787
120916
 
120917
+ /***/ "./node_modules/rc-field-form/es/useWatch.js":
120918
+ /*!***************************************************!*\
120919
+ !*** ./node_modules/rc-field-form/es/useWatch.js ***!
120920
+ \***************************************************/
120921
+ /*! exports provided: default */
120922
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
120923
+
120924
+ "use strict";
120925
+ __webpack_require__.r(__webpack_exports__);
120926
+ /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
120927
+ /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! . */ "./node_modules/rc-field-form/es/index.js");
120928
+ /* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-util/es/warning */ "./node_modules/rc-util/es/warning.js");
120929
+ /* harmony import */ var _FieldContext__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FieldContext */ "./node_modules/rc-field-form/es/FieldContext.js");
120930
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react");
120931
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
120932
+ /* harmony import */ var _utils_valueUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/valueUtil */ "./node_modules/rc-field-form/es/utils/valueUtil.js");
120933
+
120934
+
120935
+
120936
+
120937
+
120938
+
120939
+
120940
+ function useWatch() {
120941
+ var dependencies = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
120942
+ var form = arguments.length > 1 ? arguments[1] : undefined;
120943
+
120944
+ var _useState = Object(react__WEBPACK_IMPORTED_MODULE_4__["useState"])(),
120945
+ _useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_useState, 2),
120946
+ value = _useState2[0],
120947
+ setValue = _useState2[1];
120948
+
120949
+ var valueCacheRef = Object(react__WEBPACK_IMPORTED_MODULE_4__["useRef"])();
120950
+ valueCacheRef.current = value;
120951
+ var fieldContext = Object(react__WEBPACK_IMPORTED_MODULE_4__["useContext"])(___WEBPACK_IMPORTED_MODULE_1__["FieldContext"]);
120952
+ var formInstance = form || fieldContext;
120953
+ var isValidForm = formInstance && formInstance._init; // Warning if not exist form instance
120954
+
120955
+ if (true) {
120956
+ Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_2__["default"])(isValidForm, 'useWatch requires a form instance since it can not auto detect from context.');
120957
+ }
120958
+
120959
+ var namePath = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_5__["getNamePath"])(dependencies);
120960
+ var namePathRef = Object(react__WEBPACK_IMPORTED_MODULE_4__["useRef"])(namePath);
120961
+ namePathRef.current = namePath;
120962
+ Object(react__WEBPACK_IMPORTED_MODULE_4__["useEffect"])(function () {
120963
+ // Skip if not exist form instance
120964
+ if (!isValidForm) {
120965
+ return;
120966
+ }
120967
+
120968
+ var getFieldsValue = formInstance.getFieldsValue,
120969
+ getInternalHooks = formInstance.getInternalHooks;
120970
+
120971
+ var _getInternalHooks = getInternalHooks(_FieldContext__WEBPACK_IMPORTED_MODULE_3__["HOOK_MARK"]),
120972
+ registerWatch = _getInternalHooks.registerWatch;
120973
+
120974
+ var cancelRegister = registerWatch(function (store) {
120975
+ var newValue = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_5__["getValue"])(store, namePathRef.current);
120976
+
120977
+ if (valueCacheRef.current !== newValue) {
120978
+ setValue(newValue);
120979
+ }
120980
+ }); // TODO: We can improve this perf in future
120981
+
120982
+ var initialValue = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_5__["getValue"])(getFieldsValue(), namePathRef.current);
120983
+ setValue(initialValue);
120984
+ return cancelRegister;
120985
+ }, // We do not need re-register since namePath content is the same
120986
+ // eslint-disable-next-line react-hooks/exhaustive-deps
120987
+ []);
120988
+ return value;
120989
+ }
120990
+
120991
+ /* harmony default export */ __webpack_exports__["default"] = (useWatch);
120992
+
120993
+ /***/ }),
120994
+
120788
120995
  /***/ "./node_modules/rc-field-form/es/utils/NameMap.js":
120789
120996
  /*!********************************************************!*\
120790
120997
  !*** ./node_modules/rc-field-form/es/utils/NameMap.js ***!
@@ -121115,6 +121322,8 @@ function replaceMessage(template, kv) {
121115
121322
  });
121116
121323
  }
121117
121324
 
121325
+ var CODE_LOGIC_ERROR = 'CODE_LOGIC_ERROR';
121326
+
121118
121327
  function validateRule(_x, _x2, _x3, _x4, _x5) {
121119
121328
  return _validateRule.apply(this, arguments);
121120
121329
  }
@@ -121126,7 +121335,7 @@ function validateRule(_x, _x2, _x3, _x4, _x5) {
121126
121335
 
121127
121336
  function _validateRule() {
121128
121337
  _validateRule = Object(_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_4__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.mark(function _callee2(name, value, rule, options, messageVariables) {
121129
- var cloneRule, subRuleField, validator, messages, result, subResults, kv, fillVariableResult;
121338
+ var cloneRule, originValidator, subRuleField, validator, messages, result, subResults, kv, fillVariableResult;
121130
121339
  return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_2___default.a.wrap(function _callee2$(_context2) {
121131
121340
  while (1) {
121132
121341
  switch (_context2.prev = _context2.next) {
@@ -121135,7 +121344,21 @@ function _validateRule() {
121135
121344
  // https://github.com/react-component/field-form/issues/316
121136
121345
  // https://github.com/react-component/field-form/issues/313
121137
121346
 
121138
- delete cloneRule.ruleIndex; // We should special handle array validate
121347
+ delete cloneRule.ruleIndex;
121348
+
121349
+ if (cloneRule.validator) {
121350
+ originValidator = cloneRule.validator;
121351
+
121352
+ cloneRule.validator = function () {
121353
+ try {
121354
+ return originValidator.apply(void 0, arguments);
121355
+ } catch (error) {
121356
+ console.error(error);
121357
+ return Promise.reject(CODE_LOGIC_ERROR);
121358
+ }
121359
+ };
121360
+ } // We should special handle array validate
121361
+
121139
121362
 
121140
121363
  subRuleField = null;
121141
121364
 
@@ -121148,52 +121371,49 @@ function _validateRule() {
121148
121371
  messages = Object(_valueUtil__WEBPACK_IMPORTED_MODULE_9__["setValues"])({}, _messages__WEBPACK_IMPORTED_MODULE_8__["defaultValidateMessages"], options.validateMessages);
121149
121372
  validator.messages(messages);
121150
121373
  result = [];
121151
- _context2.prev = 8;
121152
- _context2.next = 11;
121374
+ _context2.prev = 9;
121375
+ _context2.next = 12;
121153
121376
  return Promise.resolve(validator.validate(Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])({}, name, value), Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_3__["default"])({}, options)));
121154
121377
 
121155
- case 11:
121156
- _context2.next = 16;
121378
+ case 12:
121379
+ _context2.next = 17;
121157
121380
  break;
121158
121381
 
121159
- case 13:
121160
- _context2.prev = 13;
121161
- _context2.t0 = _context2["catch"](8);
121382
+ case 14:
121383
+ _context2.prev = 14;
121384
+ _context2.t0 = _context2["catch"](9);
121162
121385
 
121163
121386
  if (_context2.t0.errors) {
121164
121387
  result = _context2.t0.errors.map(function (_ref4, index) {
121165
121388
  var message = _ref4.message;
121166
- return (// Wrap ReactNode with `key`
121167
-
121168
- /*#__PURE__*/
121169
- react__WEBPACK_IMPORTED_MODULE_6__["isValidElement"](message) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["cloneElement"](message, {
121170
- key: "error_".concat(index)
121171
- }) : message
121172
- );
121389
+ var mergedMessage = message === CODE_LOGIC_ERROR ? messages.default : message;
121390
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["isValidElement"](mergedMessage) ?
121391
+ /*#__PURE__*/
121392
+ // Wrap ReactNode with `key`
121393
+ react__WEBPACK_IMPORTED_MODULE_6__["cloneElement"](mergedMessage, {
121394
+ key: "error_".concat(index)
121395
+ }) : mergedMessage;
121173
121396
  });
121174
- } else {
121175
- console.error(_context2.t0);
121176
- result = [messages.default];
121177
121397
  }
121178
121398
 
121179
- case 16:
121399
+ case 17:
121180
121400
  if (!(!result.length && subRuleField)) {
121181
- _context2.next = 21;
121401
+ _context2.next = 22;
121182
121402
  break;
121183
121403
  }
121184
121404
 
121185
- _context2.next = 19;
121405
+ _context2.next = 20;
121186
121406
  return Promise.all(value.map(function (subValue, i) {
121187
121407
  return validateRule("".concat(name, ".").concat(i), subValue, subRuleField, options, messageVariables);
121188
121408
  }));
121189
121409
 
121190
- case 19:
121410
+ case 20:
121191
121411
  subResults = _context2.sent;
121192
121412
  return _context2.abrupt("return", subResults.reduce(function (prev, errors) {
121193
121413
  return [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(prev), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(errors));
121194
121414
  }, []));
121195
121415
 
121196
- case 21:
121416
+ case 22:
121197
121417
  // Replace message with variables
121198
121418
  kv = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_3__["default"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_3__["default"])({}, rule), {}, {
121199
121419
  name: name,
@@ -121208,12 +121428,12 @@ function _validateRule() {
121208
121428
  });
121209
121429
  return _context2.abrupt("return", fillVariableResult);
121210
121430
 
121211
- case 24:
121431
+ case 25:
121212
121432
  case "end":
121213
121433
  return _context2.stop();
121214
121434
  }
121215
121435
  }
121216
- }, _callee2, null, [[8, 13]]);
121436
+ }, _callee2, null, [[9, 14]]);
121217
121437
  }));
121218
121438
  return _validateRule.apply(this, arguments);
121219
121439
  }
@@ -123638,7 +123858,12 @@ function Overflow(props, ref) {
123638
123858
  }
123639
123859
 
123640
123860
  for (var i = 0; i < len; i += 1) {
123641
- var currentItemWidth = getItemWidth(i); // Break since data not ready
123861
+ var currentItemWidth = getItemWidth(i); // Fully will always render
123862
+
123863
+ if (fullySSR) {
123864
+ currentItemWidth = currentItemWidth || 0;
123865
+ } // Break since data not ready
123866
+
123642
123867
 
123643
123868
  if (currentItemWidth === undefined) {
123644
123869
  updateDisplayCount(i - 1, true);
@@ -127585,11 +127810,16 @@ var RefNodeList = function RefNodeList(props, ref) {
127585
127810
  var _React$useState9 = react__WEBPACK_IMPORTED_MODULE_3__["useState"](null),
127586
127811
  _React$useState10 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_React$useState9, 2),
127587
127812
  motionType = _React$useState10[0],
127588
- setMotionType = _React$useState10[1];
127813
+ setMotionType = _React$useState10[1]; // When motion end but data change, this will makes data back to previous one
127814
+
127815
+
127816
+ var dataRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](data);
127817
+ dataRef.current = data;
127589
127818
 
127590
127819
  function onMotionEnd() {
127591
- setPrevData(data);
127592
- setTransitionData(data);
127820
+ var latestData = dataRef.current;
127821
+ setPrevData(latestData);
127822
+ setTransitionData(latestData);
127593
127823
  setTransitionRange([]);
127594
127824
  setMotionType(null);
127595
127825
  onListChangeEnd();
@@ -128150,24 +128380,56 @@ var Tree = /*#__PURE__*/function (_React$Component) {
128150
128380
  _this.currentMouseOverDroppableNodeKey = null;
128151
128381
  };
128152
128382
 
128383
+ _this.triggerExpandActionExpand = function (e, treeNode) {
128384
+ var _this$state5 = _this.state,
128385
+ expandedKeys = _this$state5.expandedKeys,
128386
+ flattenNodes = _this$state5.flattenNodes;
128387
+ var expanded = treeNode.expanded,
128388
+ key = treeNode.key;
128389
+ var node = flattenNodes.filter(function (nodeItem) {
128390
+ return nodeItem.key === key;
128391
+ })[0];
128392
+ var eventNode = Object(_utils_treeUtil__WEBPACK_IMPORTED_MODULE_17__["convertNodePropsToEventData"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_3__["default"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_3__["default"])({}, Object(_utils_treeUtil__WEBPACK_IMPORTED_MODULE_17__["getTreeNodeProps"])(key, _this.getTreeNodeRequiredProps())), {}, {
128393
+ data: node.data
128394
+ }));
128395
+
128396
+ _this.setExpandedKeys(expanded ? Object(_util__WEBPACK_IMPORTED_MODULE_16__["arrDel"])(expandedKeys, key) : Object(_util__WEBPACK_IMPORTED_MODULE_16__["arrAdd"])(expandedKeys, key));
128397
+
128398
+ _this.onNodeExpand(e, eventNode);
128399
+ };
128400
+
128153
128401
  _this.onNodeClick = function (e, treeNode) {
128154
- var onClick = _this.props.onClick;
128402
+ var _this$props3 = _this.props,
128403
+ onClick = _this$props3.onClick,
128404
+ expandAction = _this$props3.expandAction;
128405
+
128406
+ if (expandAction === 'click') {
128407
+ _this.triggerExpandActionExpand(e, treeNode);
128408
+ }
128409
+
128155
128410
  onClick === null || onClick === void 0 ? void 0 : onClick(e, treeNode);
128156
128411
  };
128157
128412
 
128158
128413
  _this.onNodeDoubleClick = function (e, treeNode) {
128159
- var onDoubleClick = _this.props.onDoubleClick;
128414
+ var _this$props4 = _this.props,
128415
+ onDoubleClick = _this$props4.onDoubleClick,
128416
+ expandAction = _this$props4.expandAction;
128417
+
128418
+ if (expandAction === 'doubleClick') {
128419
+ _this.triggerExpandActionExpand(e, treeNode);
128420
+ }
128421
+
128160
128422
  onDoubleClick === null || onDoubleClick === void 0 ? void 0 : onDoubleClick(e, treeNode);
128161
128423
  };
128162
128424
 
128163
128425
  _this.onNodeSelect = function (e, treeNode) {
128164
128426
  var selectedKeys = _this.state.selectedKeys;
128165
- var _this$state5 = _this.state,
128166
- keyEntities = _this$state5.keyEntities,
128167
- fieldNames = _this$state5.fieldNames;
128168
- var _this$props3 = _this.props,
128169
- onSelect = _this$props3.onSelect,
128170
- multiple = _this$props3.multiple;
128427
+ var _this$state6 = _this.state,
128428
+ keyEntities = _this$state6.keyEntities,
128429
+ fieldNames = _this$state6.fieldNames;
128430
+ var _this$props5 = _this.props,
128431
+ onSelect = _this$props5.onSelect,
128432
+ multiple = _this$props5.multiple;
128171
128433
  var selected = treeNode.selected;
128172
128434
  var key = treeNode[fieldNames.key];
128173
128435
  var targetSelected = !selected; // Update selected keys
@@ -128203,13 +128465,13 @@ var Tree = /*#__PURE__*/function (_React$Component) {
128203
128465
  };
128204
128466
 
128205
128467
  _this.onNodeCheck = function (e, treeNode, checked) {
128206
- var _this$state6 = _this.state,
128207
- keyEntities = _this$state6.keyEntities,
128208
- oriCheckedKeys = _this$state6.checkedKeys,
128209
- oriHalfCheckedKeys = _this$state6.halfCheckedKeys;
128210
- var _this$props4 = _this.props,
128211
- checkStrictly = _this$props4.checkStrictly,
128212
- onCheck = _this$props4.onCheck;
128468
+ var _this$state7 = _this.state,
128469
+ keyEntities = _this$state7.keyEntities,
128470
+ oriCheckedKeys = _this$state7.checkedKeys,
128471
+ oriHalfCheckedKeys = _this$state7.halfCheckedKeys;
128472
+ var _this$props6 = _this.props,
128473
+ checkStrictly = _this$props6.checkStrictly,
128474
+ onCheck = _this$props6.onCheck;
128213
128475
  var key = treeNode.key; // Prepare trigger arguments
128214
128476
 
128215
128477
  var checkedObj;
@@ -128295,9 +128557,9 @@ var Tree = /*#__PURE__*/function (_React$Component) {
128295
128557
  loadedKeys = _ref$loadedKeys === void 0 ? [] : _ref$loadedKeys,
128296
128558
  _ref$loadingKeys = _ref.loadingKeys,
128297
128559
  loadingKeys = _ref$loadingKeys === void 0 ? [] : _ref$loadingKeys;
128298
- var _this$props5 = _this.props,
128299
- loadData = _this$props5.loadData,
128300
- onLoad = _this$props5.onLoad;
128560
+ var _this$props7 = _this.props,
128561
+ loadData = _this$props7.loadData,
128562
+ onLoad = _this$props7.onLoad;
128301
128563
 
128302
128564
  if (!loadData || loadedKeys.indexOf(key) !== -1 || loadingKeys.indexOf(key) !== -1) {
128303
128565
  return null;
@@ -128418,16 +128680,16 @@ var Tree = /*#__PURE__*/function (_React$Component) {
128418
128680
  };
128419
128681
 
128420
128682
  _this.getTreeNodeRequiredProps = function () {
128421
- var _this$state7 = _this.state,
128422
- expandedKeys = _this$state7.expandedKeys,
128423
- selectedKeys = _this$state7.selectedKeys,
128424
- loadedKeys = _this$state7.loadedKeys,
128425
- loadingKeys = _this$state7.loadingKeys,
128426
- checkedKeys = _this$state7.checkedKeys,
128427
- halfCheckedKeys = _this$state7.halfCheckedKeys,
128428
- dragOverNodeKey = _this$state7.dragOverNodeKey,
128429
- dropPosition = _this$state7.dropPosition,
128430
- keyEntities = _this$state7.keyEntities;
128683
+ var _this$state8 = _this.state,
128684
+ expandedKeys = _this$state8.expandedKeys,
128685
+ selectedKeys = _this$state8.selectedKeys,
128686
+ loadedKeys = _this$state8.loadedKeys,
128687
+ loadingKeys = _this$state8.loadingKeys,
128688
+ checkedKeys = _this$state8.checkedKeys,
128689
+ halfCheckedKeys = _this$state8.halfCheckedKeys,
128690
+ dragOverNodeKey = _this$state8.dragOverNodeKey,
128691
+ dropPosition = _this$state8.dropPosition,
128692
+ keyEntities = _this$state8.keyEntities;
128431
128693
  return {
128432
128694
  expandedKeys: expandedKeys || [],
128433
128695
  selectedKeys: selectedKeys || [],
@@ -128442,9 +128704,9 @@ var Tree = /*#__PURE__*/function (_React$Component) {
128442
128704
  };
128443
128705
 
128444
128706
  _this.setExpandedKeys = function (expandedKeys) {
128445
- var _this$state8 = _this.state,
128446
- treeData = _this$state8.treeData,
128447
- fieldNames = _this$state8.fieldNames;
128707
+ var _this$state9 = _this.state,
128708
+ treeData = _this$state9.treeData,
128709
+ fieldNames = _this$state9.fieldNames;
128448
128710
  var flattenNodes = Object(_utils_treeUtil__WEBPACK_IMPORTED_MODULE_17__["flattenTreeData"])(treeData, expandedKeys, fieldNames);
128449
128711
 
128450
128712
  _this.setUncontrolledState({
@@ -128455,12 +128717,12 @@ var Tree = /*#__PURE__*/function (_React$Component) {
128455
128717
 
128456
128718
  _this.onNodeExpand = function (e, treeNode) {
128457
128719
  var expandedKeys = _this.state.expandedKeys;
128458
- var _this$state9 = _this.state,
128459
- listChanging = _this$state9.listChanging,
128460
- fieldNames = _this$state9.fieldNames;
128461
- var _this$props6 = _this.props,
128462
- onExpand = _this$props6.onExpand,
128463
- loadData = _this$props6.loadData;
128720
+ var _this$state10 = _this.state,
128721
+ listChanging = _this$state10.listChanging,
128722
+ fieldNames = _this$state10.fieldNames;
128723
+ var _this$props8 = _this.props,
128724
+ onExpand = _this$props8.onExpand,
128725
+ loadData = _this$props8.loadData;
128464
128726
  var expanded = treeNode.expanded;
128465
128727
  var key = treeNode[fieldNames.key]; // Do nothing when motion is in progress
128466
128728
 
@@ -128544,9 +128806,9 @@ var Tree = /*#__PURE__*/function (_React$Component) {
128544
128806
  };
128545
128807
 
128546
128808
  _this.getActiveItem = function () {
128547
- var _this$state10 = _this.state,
128548
- activeKey = _this$state10.activeKey,
128549
- flattenNodes = _this$state10.flattenNodes;
128809
+ var _this$state11 = _this.state,
128810
+ activeKey = _this$state11.activeKey,
128811
+ flattenNodes = _this$state11.flattenNodes;
128550
128812
 
128551
128813
  if (activeKey === null) {
128552
128814
  return null;
@@ -128559,9 +128821,9 @@ var Tree = /*#__PURE__*/function (_React$Component) {
128559
128821
  };
128560
128822
 
128561
128823
  _this.offsetActiveKey = function (offset) {
128562
- var _this$state11 = _this.state,
128563
- flattenNodes = _this$state11.flattenNodes,
128564
- activeKey = _this$state11.activeKey;
128824
+ var _this$state12 = _this.state,
128825
+ flattenNodes = _this$state12.flattenNodes,
128826
+ activeKey = _this$state12.activeKey;
128565
128827
  var index = flattenNodes.findIndex(function (_ref3) {
128566
128828
  var key = _ref3.key;
128567
128829
  return key === activeKey;
@@ -128584,14 +128846,14 @@ var Tree = /*#__PURE__*/function (_React$Component) {
128584
128846
  };
128585
128847
 
128586
128848
  _this.onKeyDown = function (event) {
128587
- var _this$state12 = _this.state,
128588
- activeKey = _this$state12.activeKey,
128589
- expandedKeys = _this$state12.expandedKeys,
128590
- checkedKeys = _this$state12.checkedKeys;
128591
- var _this$props7 = _this.props,
128592
- onKeyDown = _this$props7.onKeyDown,
128593
- checkable = _this$props7.checkable,
128594
- selectable = _this$props7.selectable; // >>>>>>>>>> Direction
128849
+ var _this$state13 = _this.state,
128850
+ activeKey = _this$state13.activeKey,
128851
+ expandedKeys = _this$state13.expandedKeys,
128852
+ checkedKeys = _this$state13.checkedKeys;
128853
+ var _this$props9 = _this.props,
128854
+ onKeyDown = _this$props9.onKeyDown,
128855
+ checkable = _this$props9.checkable,
128856
+ selectable = _this$props9.selectable; // >>>>>>>>>> Direction
128595
128857
 
128596
128858
  switch (event.which) {
128597
128859
  case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_11__["default"].UP:
@@ -128751,47 +129013,47 @@ var Tree = /*#__PURE__*/function (_React$Component) {
128751
129013
  value: function render() {
128752
129014
  var _classNames;
128753
129015
 
128754
- var _this$state13 = this.state,
128755
- focused = _this$state13.focused,
128756
- flattenNodes = _this$state13.flattenNodes,
128757
- keyEntities = _this$state13.keyEntities,
128758
- draggingNodeKey = _this$state13.draggingNodeKey,
128759
- activeKey = _this$state13.activeKey,
128760
- dropLevelOffset = _this$state13.dropLevelOffset,
128761
- dropContainerKey = _this$state13.dropContainerKey,
128762
- dropTargetKey = _this$state13.dropTargetKey,
128763
- dropPosition = _this$state13.dropPosition,
128764
- dragOverNodeKey = _this$state13.dragOverNodeKey,
128765
- indent = _this$state13.indent;
128766
- var _this$props8 = this.props,
128767
- prefixCls = _this$props8.prefixCls,
128768
- className = _this$props8.className,
128769
- style = _this$props8.style,
128770
- showLine = _this$props8.showLine,
128771
- focusable = _this$props8.focusable,
128772
- _this$props8$tabIndex = _this$props8.tabIndex,
128773
- tabIndex = _this$props8$tabIndex === void 0 ? 0 : _this$props8$tabIndex,
128774
- selectable = _this$props8.selectable,
128775
- showIcon = _this$props8.showIcon,
128776
- icon = _this$props8.icon,
128777
- switcherIcon = _this$props8.switcherIcon,
128778
- draggable = _this$props8.draggable,
128779
- checkable = _this$props8.checkable,
128780
- checkStrictly = _this$props8.checkStrictly,
128781
- disabled = _this$props8.disabled,
128782
- motion = _this$props8.motion,
128783
- loadData = _this$props8.loadData,
128784
- filterTreeNode = _this$props8.filterTreeNode,
128785
- height = _this$props8.height,
128786
- itemHeight = _this$props8.itemHeight,
128787
- virtual = _this$props8.virtual,
128788
- titleRender = _this$props8.titleRender,
128789
- dropIndicatorRender = _this$props8.dropIndicatorRender,
128790
- onContextMenu = _this$props8.onContextMenu,
128791
- onScroll = _this$props8.onScroll,
128792
- direction = _this$props8.direction,
128793
- rootClassName = _this$props8.rootClassName,
128794
- rootStyle = _this$props8.rootStyle;
129016
+ var _this$state14 = this.state,
129017
+ focused = _this$state14.focused,
129018
+ flattenNodes = _this$state14.flattenNodes,
129019
+ keyEntities = _this$state14.keyEntities,
129020
+ draggingNodeKey = _this$state14.draggingNodeKey,
129021
+ activeKey = _this$state14.activeKey,
129022
+ dropLevelOffset = _this$state14.dropLevelOffset,
129023
+ dropContainerKey = _this$state14.dropContainerKey,
129024
+ dropTargetKey = _this$state14.dropTargetKey,
129025
+ dropPosition = _this$state14.dropPosition,
129026
+ dragOverNodeKey = _this$state14.dragOverNodeKey,
129027
+ indent = _this$state14.indent;
129028
+ var _this$props10 = this.props,
129029
+ prefixCls = _this$props10.prefixCls,
129030
+ className = _this$props10.className,
129031
+ style = _this$props10.style,
129032
+ showLine = _this$props10.showLine,
129033
+ focusable = _this$props10.focusable,
129034
+ _this$props10$tabInde = _this$props10.tabIndex,
129035
+ tabIndex = _this$props10$tabInde === void 0 ? 0 : _this$props10$tabInde,
129036
+ selectable = _this$props10.selectable,
129037
+ showIcon = _this$props10.showIcon,
129038
+ icon = _this$props10.icon,
129039
+ switcherIcon = _this$props10.switcherIcon,
129040
+ draggable = _this$props10.draggable,
129041
+ checkable = _this$props10.checkable,
129042
+ checkStrictly = _this$props10.checkStrictly,
129043
+ disabled = _this$props10.disabled,
129044
+ motion = _this$props10.motion,
129045
+ loadData = _this$props10.loadData,
129046
+ filterTreeNode = _this$props10.filterTreeNode,
129047
+ height = _this$props10.height,
129048
+ itemHeight = _this$props10.itemHeight,
129049
+ virtual = _this$props10.virtual,
129050
+ titleRender = _this$props10.titleRender,
129051
+ dropIndicatorRender = _this$props10.dropIndicatorRender,
129052
+ onContextMenu = _this$props10.onContextMenu,
129053
+ onScroll = _this$props10.onScroll,
129054
+ direction = _this$props10.direction,
129055
+ rootClassName = _this$props10.rootClassName,
129056
+ rootStyle = _this$props10.rootStyle;
128795
129057
  var domProps = Object(rc_util_es_pickAttrs__WEBPACK_IMPORTED_MODULE_13__["default"])(this.props, {
128796
129058
  aria: true,
128797
129059
  data: true
@@ -129024,7 +129286,8 @@ Tree.defaultProps = {
129024
129286
  dropIndicatorRender: _DropIndicator__WEBPACK_IMPORTED_MODULE_21__["default"],
129025
129287
  allowDrop: function allowDrop() {
129026
129288
  return true;
129027
- }
129289
+ },
129290
+ expandAction: false
129028
129291
  };
129029
129292
  Tree.TreeNode = _TreeNode__WEBPACK_IMPORTED_MODULE_19__["default"];
129030
129293
  /* harmony default export */ __webpack_exports__["default"] = (Tree);
@@ -130846,12 +131109,14 @@ __webpack_require__.r(__webpack_exports__);
130846
131109
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
130847
131110
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
130848
131111
  /* harmony import */ var rc_align__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-align */ "./node_modules/rc-align/es/index.js");
130849
- /* harmony import */ var rc_motion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-motion */ "./node_modules/rc-motion/es/index.js");
130850
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
130851
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__);
130852
- /* harmony import */ var _useVisibleStatus__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./useVisibleStatus */ "./node_modules/rc-trigger/es/Popup/useVisibleStatus.js");
130853
- /* harmony import */ var _utils_legacyUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/legacyUtil */ "./node_modules/rc-trigger/es/utils/legacyUtil.js");
130854
- /* harmony import */ var _useStretchStyle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./useStretchStyle */ "./node_modules/rc-trigger/es/Popup/useStretchStyle.js");
131112
+ /* harmony import */ var rc_util_es_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/hooks/useLayoutEffect */ "./node_modules/rc-util/es/hooks/useLayoutEffect.js");
131113
+ /* harmony import */ var rc_motion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-motion */ "./node_modules/rc-motion/es/index.js");
131114
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
131115
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__);
131116
+ /* harmony import */ var _useVisibleStatus__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./useVisibleStatus */ "./node_modules/rc-trigger/es/Popup/useVisibleStatus.js");
131117
+ /* harmony import */ var _utils_legacyUtil__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/legacyUtil */ "./node_modules/rc-trigger/es/utils/legacyUtil.js");
131118
+ /* harmony import */ var _useStretchStyle__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./useStretchStyle */ "./node_modules/rc-trigger/es/Popup/useStretchStyle.js");
131119
+
130855
131120
 
130856
131121
 
130857
131122
 
@@ -130891,7 +131156,7 @@ var PopupInner = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](f
130891
131156
  setAlignedClassName = _useState2[1]; // ======================= Measure ========================
130892
131157
 
130893
131158
 
130894
- var _useStretchStyle = Object(_useStretchStyle__WEBPACK_IMPORTED_MODULE_9__["default"])(stretch),
131159
+ var _useStretchStyle = Object(_useStretchStyle__WEBPACK_IMPORTED_MODULE_10__["default"])(stretch),
130895
131160
  _useStretchStyle2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_useStretchStyle, 2),
130896
131161
  stretchStyle = _useStretchStyle2[0],
130897
131162
  measureStretchStyle = _useStretchStyle2[1];
@@ -130903,13 +131168,32 @@ var PopupInner = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](f
130903
131168
  } // ======================== Status ========================
130904
131169
 
130905
131170
 
130906
- var _useVisibleStatus = Object(_useVisibleStatus__WEBPACK_IMPORTED_MODULE_7__["default"])(visible, doMeasure),
131171
+ var _useVisibleStatus = Object(_useVisibleStatus__WEBPACK_IMPORTED_MODULE_8__["default"])(visible, doMeasure),
130907
131172
  _useVisibleStatus2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_useVisibleStatus, 2),
130908
131173
  status = _useVisibleStatus2[0],
130909
131174
  goNextStatus = _useVisibleStatus2[1]; // ======================== Aligns ========================
130910
131175
 
131176
+ /**
131177
+ * `alignedClassName` may modify `source` size,
131178
+ * which means one time align may not move to the correct position at once.
131179
+ *
131180
+ * We will reset `alignTimes` for each status switch to `alignPre`
131181
+ * and let `rc-align` to align for multiple times to ensure get final stable place.
131182
+ * Currently we mark `alignTimes < 2` repeat align, it will increase if user report for align issue.
131183
+ */
131184
+
131185
+
131186
+ var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(0),
131187
+ _useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_useState3, 2),
131188
+ alignTimes = _useState4[0],
131189
+ setAlignTimes = _useState4[1];
130911
131190
 
130912
- var prepareResolveRef = Object(react__WEBPACK_IMPORTED_MODULE_3__["useRef"])(); // `target` on `rc-align` can accept as a function to get the bind element or a point.
131191
+ var prepareResolveRef = Object(react__WEBPACK_IMPORTED_MODULE_3__["useRef"])();
131192
+ Object(rc_util_es_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_5__["default"])(function () {
131193
+ if (status === 'alignPre') {
131194
+ setAlignTimes(0);
131195
+ }
131196
+ }, [status]); // `target` on `rc-align` can accept as a function to get the bind element or a point.
130913
131197
  // ref: https://www.npmjs.com/package/rc-align
130914
131198
 
130915
131199
  function getAlignTarget() {
@@ -130931,14 +131215,24 @@ var PopupInner = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](f
130931
131215
 
130932
131216
  if (alignedClassName !== nextAlignedClassName) {
130933
131217
  setAlignedClassName(nextAlignedClassName);
131218
+ } // We will retry multi times to make sure that the element has been align in the right position.
131219
+
131220
+
131221
+ setAlignTimes(function (val) {
131222
+ return val + 1;
131223
+ });
131224
+
131225
+ if (status === 'align') {
131226
+ onAlign === null || onAlign === void 0 ? void 0 : onAlign(popupDomNode, matchAlign);
130934
131227
  }
131228
+ } // Delay to go to next status
131229
+
130935
131230
 
131231
+ Object(rc_util_es_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_5__["default"])(function () {
130936
131232
  if (status === 'align') {
130937
131233
  // Repeat until not more align needed
130938
- if (alignedClassName !== nextAlignedClassName) {
130939
- Promise.resolve().then(function () {
130940
- forceAlign();
130941
- });
131234
+ if (alignTimes < 2) {
131235
+ forceAlign();
130942
131236
  } else {
130943
131237
  goNextStatus(function () {
130944
131238
  var _prepareResolveRef$cu;
@@ -130946,13 +131240,10 @@ var PopupInner = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](f
130946
131240
  (_prepareResolveRef$cu = prepareResolveRef.current) === null || _prepareResolveRef$cu === void 0 ? void 0 : _prepareResolveRef$cu.call(prepareResolveRef);
130947
131241
  });
130948
131242
  }
130949
-
130950
- onAlign === null || onAlign === void 0 ? void 0 : onAlign(popupDomNode, matchAlign);
130951
131243
  }
130952
- } // ======================== Motion ========================
130953
-
131244
+ }, [alignTimes]); // ======================== Motion ========================
130954
131245
 
130955
- var motion = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__["default"])({}, Object(_utils_legacyUtil__WEBPACK_IMPORTED_MODULE_8__["getMotion"])(props));
131246
+ var motion = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__["default"])({}, Object(_utils_legacyUtil__WEBPACK_IMPORTED_MODULE_9__["getMotion"])(props));
130956
131247
 
130957
131248
  ['onAppearEnd', 'onEnterEnd', 'onLeaveEnd'].forEach(function (eventName) {
130958
131249
  var originHandler = motion[eventName];
@@ -130988,7 +131279,9 @@ var PopupInner = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](f
130988
131279
  var mergedStyle = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__["default"])({}, stretchStyle), {}, {
130989
131280
  zIndex: zIndex,
130990
131281
  opacity: status === 'motion' || status === 'stable' || !visible ? undefined : 0,
130991
- pointerEvents: status === 'stable' ? undefined : 'none'
131282
+ // Cannot interact with disappearing elements
131283
+ // https://github.com/ant-design/ant-design/issues/35051#issuecomment-1101340714
131284
+ pointerEvents: !visible && status !== 'stable' ? 'none' : undefined
130992
131285
  }, style); // Align status
130993
131286
 
130994
131287
 
@@ -131006,7 +131299,7 @@ var PopupInner = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](f
131006
131299
  }, children);
131007
131300
  }
131008
131301
 
131009
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](rc_motion__WEBPACK_IMPORTED_MODULE_5__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({
131302
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](rc_motion__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({
131010
131303
  visible: visible,
131011
131304
  ref: elementRef,
131012
131305
  leavedClassName: "".concat(prefixCls, "-hidden")
@@ -131018,7 +131311,7 @@ var PopupInner = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](f
131018
131311
  }), function (_ref, motionRef) {
131019
131312
  var motionClassName = _ref.className,
131020
131313
  motionStyle = _ref.style;
131021
- var mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_6___default()(prefixCls, className, alignedClassName, motionClassName);
131314
+ var mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(prefixCls, className, alignedClassName, motionClassName);
131022
131315
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](rc_align__WEBPACK_IMPORTED_MODULE_4__["default"], {
131023
131316
  target: getAlignTarget(),
131024
131317
  key: "popup",
@@ -131196,7 +131489,7 @@ __webpack_require__.r(__webpack_exports__);
131196
131489
 
131197
131490
 
131198
131491
 
131199
- var StatusQueue = ['measure', 'align', null, 'motion'];
131492
+ var StatusQueue = ['measure', 'alignPre', 'align', null, 'motion'];
131200
131493
  /* harmony default export */ __webpack_exports__["default"] = (function (visible, doMeasure) {
131201
131494
  var _useState = Object(rc_util_es_hooks_useState__WEBPACK_IMPORTED_MODULE_5__["default"])(null),
131202
131495
  _useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_useState, 2),
@@ -131375,6 +131668,7 @@ function generateTrigger(PortalComponent) {
131375
131668
 
131376
131669
  var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_6__["default"])(Trigger);
131377
131670
 
131671
+ // ensure `getContainer` will be called only once
131378
131672
  function Trigger(props) {
131379
131673
  var _this;
131380
131674
 
@@ -131383,6 +131677,7 @@ function generateTrigger(PortalComponent) {
131383
131677
  _this = _super.call(this, props);
131384
131678
  _this.popupRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createRef"]();
131385
131679
  _this.triggerRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createRef"]();
131680
+ _this.portalContainer = void 0;
131386
131681
  _this.attachId = void 0;
131387
131682
  _this.clickOutsideHandler = void 0;
131388
131683
  _this.touchOutsideHandler = void 0;
@@ -131684,18 +131979,26 @@ function generateTrigger(PortalComponent) {
131684
131979
  };
131685
131980
 
131686
131981
  _this.getContainer = function () {
131687
- var getDocument = _this.props.getDocument;
131688
- var popupContainer = getDocument(_this.getRootDomNode()).createElement('div'); // Make sure default popup container will never cause scrollbar appearing
131689
- // https://github.com/react-component/trigger/issues/41
131690
-
131691
- popupContainer.style.position = 'absolute';
131692
- popupContainer.style.top = '0';
131693
- popupContainer.style.left = '0';
131694
- popupContainer.style.width = '100%';
131695
-
131696
- _this.attachParent(popupContainer);
131697
-
131698
- return popupContainer;
131982
+ if (!_this.portalContainer) {
131983
+ // In React.StrictMode component will call render multiple time in first mount.
131984
+ // When you want to refactor with FC, useRef will also init multiple time and
131985
+ // point to different useRef instance which will create multiple element
131986
+ // (This multiple render will not trigger effect so you can not clean up this
131987
+ // in effect). But this is safe with class component since it always point to same class instance.
131988
+ var getDocument = _this.props.getDocument;
131989
+ var popupContainer = getDocument(_this.getRootDomNode()).createElement('div'); // Make sure default popup container will never cause scrollbar appearing
131990
+ // https://github.com/react-component/trigger/issues/41
131991
+
131992
+ popupContainer.style.position = 'absolute';
131993
+ popupContainer.style.top = '0';
131994
+ popupContainer.style.left = '0';
131995
+ popupContainer.style.width = '100%';
131996
+ _this.portalContainer = popupContainer;
131997
+ }
131998
+
131999
+ _this.attachParent(_this.portalContainer);
132000
+
132001
+ return _this.portalContainer;
131699
132002
  };
131700
132003
 
131701
132004
  _this.setPoint = function (point) {
@@ -134957,9 +135260,11 @@ function RawList(props, ref) {
134957
135260
  componentRef.current.addEventListener('DOMMouseScroll', onFireFoxScroll);
134958
135261
  componentRef.current.addEventListener('MozMousePixelScroll', onMozMousePixelScroll);
134959
135262
  return function () {
134960
- componentRef.current.removeEventListener('wheel', onRawWheel);
134961
- componentRef.current.removeEventListener('DOMMouseScroll', onFireFoxScroll);
134962
- componentRef.current.removeEventListener('MozMousePixelScroll', onMozMousePixelScroll);
135263
+ if (componentRef.current) {
135264
+ componentRef.current.removeEventListener('wheel', onRawWheel);
135265
+ componentRef.current.removeEventListener('DOMMouseScroll', onFireFoxScroll);
135266
+ componentRef.current.removeEventListener('MozMousePixelScroll', onMozMousePixelScroll);
135267
+ }
134963
135268
  };
134964
135269
  }, [useVirtual]); // ================================= Ref ==================================
134965
135270
 
@@ -135143,16 +135448,19 @@ var ScrollBar = /*#__PURE__*/function (_React$Component) {
135143
135448
  };
135144
135449
 
135145
135450
  _this.removeEvents = function () {
135451
+ var _this$scrollbarRef$cu;
135452
+
135146
135453
  window.removeEventListener('mousemove', _this.onMouseMove);
135147
135454
  window.removeEventListener('mouseup', _this.onMouseUp);
135455
+ (_this$scrollbarRef$cu = _this.scrollbarRef.current) === null || _this$scrollbarRef$cu === void 0 ? void 0 : _this$scrollbarRef$cu.removeEventListener('touchstart', _this.onScrollbarTouchStart);
135148
135456
 
135149
- _this.scrollbarRef.current.removeEventListener('touchstart', _this.onScrollbarTouchStart);
135150
-
135151
- _this.thumbRef.current.removeEventListener('touchstart', _this.onMouseDown);
135457
+ if (_this.thumbRef.current) {
135458
+ _this.thumbRef.current.removeEventListener('touchstart', _this.onMouseDown);
135152
135459
 
135153
- _this.thumbRef.current.removeEventListener('touchmove', _this.onMouseMove);
135460
+ _this.thumbRef.current.removeEventListener('touchmove', _this.onMouseMove);
135154
135461
 
135155
- _this.thumbRef.current.removeEventListener('touchend', _this.onMouseUp);
135462
+ _this.thumbRef.current.removeEventListener('touchend', _this.onMouseUp);
135463
+ }
135156
135464
 
135157
135465
  rc_util_es_raf__WEBPACK_IMPORTED_MODULE_2__["default"].cancel(_this.moveRaf);
135158
135466
  };
@@ -135650,7 +135958,9 @@ function useMobileTouchMove(inVirtual, listRef, callback) {
135650
135958
  }
135651
135959
 
135652
135960
  return function () {
135653
- listRef.current.removeEventListener('touchstart', onTouchStart);
135961
+ var _listRef$current;
135962
+
135963
+ (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.removeEventListener('touchstart', onTouchStart);
135654
135964
  cleanUpEvents();
135655
135965
  clearInterval(intervalRef.current);
135656
135966
  };