@douyinfe/semi-ui 2.1.4 → 2.2.0-beta.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.
Files changed (133) hide show
  1. package/_base/_story/a11y.jsx +1302 -0
  2. package/_base/_story/a11y.scss +49 -0
  3. package/_base/_story/index.stories.js +3 -1
  4. package/_utils/index.ts +9 -4
  5. package/button/Button.tsx +1 -0
  6. package/cascader/__test__/cascader.test.js +221 -0
  7. package/cascader/_story/cascader.stories.js +138 -0
  8. package/cascader/index.tsx +37 -21
  9. package/cascader/item.tsx +4 -2
  10. package/checkbox/checkbox.tsx +2 -0
  11. package/checkbox/checkboxGroup.tsx +3 -2
  12. package/datePicker/__test__/datePicker.test.js +85 -2
  13. package/datePicker/_story/datePicker.stories.js +29 -1
  14. package/datePicker/_story/v2/YearButton.jsx +17 -0
  15. package/datePicker/_story/v2/index.js +1 -0
  16. package/datePicker/monthsGrid.tsx +12 -1
  17. package/datePicker/navigation.tsx +55 -29
  18. package/descriptions/__test__/descriptions.test.js +27 -1
  19. package/descriptions/_story/descriptions.stories.js +52 -2
  20. package/descriptions/item.tsx +1 -1
  21. package/dist/css/semi.css +56 -32
  22. package/dist/css/semi.min.css +1 -1
  23. package/dist/umd/semi-ui.js +854 -258
  24. package/dist/umd/semi-ui.js.map +1 -1
  25. package/dist/umd/semi-ui.min.js +1 -1
  26. package/dist/umd/semi-ui.min.js.map +1 -1
  27. package/empty/index.tsx +2 -2
  28. package/form/_story/form.stories.js +0 -67
  29. package/form/hoc/withField.tsx +1 -1
  30. package/gulpfile.js +2 -1
  31. package/lib/cjs/_base/base.css +2 -2
  32. package/lib/cjs/_utils/index.d.ts +1 -0
  33. package/lib/cjs/_utils/index.js +12 -5
  34. package/lib/cjs/button/Button.d.ts +1 -0
  35. package/lib/cjs/cascader/index.d.ts +7 -0
  36. package/lib/cjs/cascader/index.js +35 -22
  37. package/lib/cjs/cascader/item.d.ts +2 -0
  38. package/lib/cjs/cascader/item.js +4 -2
  39. package/lib/cjs/checkbox/checkbox.js +3 -1
  40. package/lib/cjs/checkbox/checkboxGroup.d.ts +1 -0
  41. package/lib/cjs/checkbox/checkboxGroup.js +3 -1
  42. package/lib/cjs/datePicker/monthsGrid.d.ts +1 -0
  43. package/lib/cjs/datePicker/monthsGrid.js +6 -0
  44. package/lib/cjs/datePicker/navigation.js +47 -7
  45. package/lib/cjs/descriptions/item.js +1 -1
  46. package/lib/cjs/empty/index.d.ts +2 -2
  47. package/lib/cjs/empty/index.js +19 -18
  48. package/lib/cjs/form/baseForm.d.ts +6 -0
  49. package/lib/cjs/form/field.d.ts +6 -0
  50. package/lib/cjs/form/hoc/withField.js +3 -1
  51. package/lib/cjs/locale/source/es.d.ts +7 -0
  52. package/lib/cjs/locale/source/es.js +168 -0
  53. package/lib/cjs/modal/Modal.d.ts +2 -2
  54. package/lib/cjs/modal/Modal.js +2 -2
  55. package/lib/cjs/modal/confirm.d.ts +10 -10
  56. package/lib/cjs/navigation/index.d.ts +2 -2
  57. package/lib/cjs/pagination/index.js +9 -4
  58. package/lib/cjs/rating/item.js +1 -1
  59. package/lib/cjs/select/index.d.ts +10 -0
  60. package/lib/cjs/select/index.js +15 -9
  61. package/lib/cjs/timeline/item.d.ts +5 -2
  62. package/lib/cjs/timeline/item.js +13 -7
  63. package/lib/cjs/tree/treeNode.js +0 -2
  64. package/lib/cjs/upload/fileCard.d.ts +2 -0
  65. package/lib/cjs/upload/fileCard.js +70 -45
  66. package/lib/cjs/upload/index.d.ts +23 -2
  67. package/lib/cjs/upload/index.js +133 -25
  68. package/lib/cjs/upload/interface.d.ts +3 -0
  69. package/lib/es/_base/base.css +2 -2
  70. package/lib/es/_utils/index.d.ts +1 -0
  71. package/lib/es/_utils/index.js +12 -5
  72. package/lib/es/button/Button.d.ts +1 -0
  73. package/lib/es/cascader/index.d.ts +7 -0
  74. package/lib/es/cascader/index.js +34 -25
  75. package/lib/es/cascader/item.d.ts +2 -0
  76. package/lib/es/cascader/item.js +4 -2
  77. package/lib/es/checkbox/checkbox.js +3 -1
  78. package/lib/es/checkbox/checkboxGroup.d.ts +1 -0
  79. package/lib/es/checkbox/checkboxGroup.js +3 -1
  80. package/lib/es/datePicker/monthsGrid.d.ts +1 -0
  81. package/lib/es/datePicker/monthsGrid.js +6 -0
  82. package/lib/es/datePicker/navigation.js +48 -8
  83. package/lib/es/descriptions/item.js +1 -1
  84. package/lib/es/empty/index.d.ts +2 -2
  85. package/lib/es/empty/index.js +19 -18
  86. package/lib/es/form/baseForm.d.ts +6 -0
  87. package/lib/es/form/field.d.ts +6 -0
  88. package/lib/es/form/hoc/withField.js +3 -1
  89. package/lib/es/locale/source/es.d.ts +7 -0
  90. package/lib/es/locale/source/es.js +157 -0
  91. package/lib/es/modal/Modal.d.ts +2 -2
  92. package/lib/es/modal/Modal.js +2 -2
  93. package/lib/es/modal/confirm.d.ts +10 -10
  94. package/lib/es/navigation/index.d.ts +2 -2
  95. package/lib/es/pagination/index.js +8 -4
  96. package/lib/es/rating/item.js +1 -1
  97. package/lib/es/select/index.d.ts +10 -0
  98. package/lib/es/select/index.js +19 -9
  99. package/lib/es/timeline/item.d.ts +5 -2
  100. package/lib/es/timeline/item.js +12 -7
  101. package/lib/es/tree/treeNode.js +0 -2
  102. package/lib/es/upload/fileCard.d.ts +2 -0
  103. package/lib/es/upload/fileCard.js +69 -44
  104. package/lib/es/upload/index.d.ts +23 -2
  105. package/lib/es/upload/index.js +133 -24
  106. package/lib/es/upload/interface.d.ts +3 -0
  107. package/locale/source/es.ts +160 -0
  108. package/modal/Modal.tsx +4 -4
  109. package/navigation/__test__/navigation.test.js +4 -4
  110. package/navigation/_story/AutoOpen/index.js +1 -1
  111. package/navigation/_story/WithChildren/index.js +1 -1
  112. package/navigation/_story/navigation.stories.js +1 -1
  113. package/navigation/_story/navigation.stories.tsx +4 -4
  114. package/navigation/index.tsx +2 -2
  115. package/package.json +17 -9
  116. package/pagination/_story/pagination.stories.js +11 -0
  117. package/pagination/index.tsx +9 -4
  118. package/popover/Arrow.tsx +1 -1
  119. package/radio/_story/radio.stories.js +12 -1
  120. package/rating/item.tsx +1 -1
  121. package/select/_story/select.stories.js +39 -14
  122. package/select/index.tsx +21 -7
  123. package/table/_story/DynamicFilters/index.js +13 -16
  124. package/timeline/__test__/timeline.test.js +17 -1
  125. package/timeline/_story/timeline.stories.js +70 -6
  126. package/timeline/item.tsx +11 -6
  127. package/tooltip/_story/tooltip.stories.js +1 -1
  128. package/tree/_story/tree.stories.js +2 -2
  129. package/tree/treeNode.tsx +0 -2
  130. package/upload/__test__/upload.test.js +50 -1
  131. package/upload/fileCard.tsx +110 -95
  132. package/upload/index.tsx +147 -53
  133. package/upload/interface.ts +3 -0
@@ -5993,9 +5993,9 @@ var Iterators = __webpack_require__("m/wn");
5993
5993
 
5994
5994
  var returnThis = function () { return this; };
5995
5995
 
5996
- module.exports = function (IteratorConstructor, NAME, next) {
5996
+ module.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
5997
5997
  var TO_STRING_TAG = NAME + ' Iterator';
5998
- IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
5998
+ IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
5999
5999
  setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
6000
6000
  Iterators[TO_STRING_TAG] = returnThis;
6001
6001
  return IteratorConstructor;
@@ -7235,6 +7235,16 @@ module.exports = copyTextToClipboard;
7235
7235
  module.exports.default = copyTextToClipboard;
7236
7236
 
7237
7237
 
7238
+ /***/ }),
7239
+
7240
+ /***/ "HR5x":
7241
+ /***/ (function(module, exports, __webpack_require__) {
7242
+
7243
+ var parent = __webpack_require__("vut1");
7244
+
7245
+ module.exports = parent;
7246
+
7247
+
7238
7248
  /***/ }),
7239
7249
 
7240
7250
  /***/ "HUEr":
@@ -8412,12 +8422,12 @@ var $AggregateError = function AggregateError(errors, message /* , options */) {
8412
8422
  var isInstance = isPrototypeOf(AggregateErrorPrototype, this);
8413
8423
  var that;
8414
8424
  if (setPrototypeOf) {
8415
- that = setPrototypeOf(new Error(undefined), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype);
8425
+ that = setPrototypeOf(new Error(), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype);
8416
8426
  } else {
8417
8427
  that = isInstance ? this : create(AggregateErrorPrototype);
8418
8428
  createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');
8419
8429
  }
8420
- createNonEnumerableProperty(that, 'message', normalizeStringArgument(message, ''));
8430
+ if (message !== undefined) createNonEnumerableProperty(that, 'message', normalizeStringArgument(message));
8421
8431
  if (ERROR_STACK_INSTALLABLE) createNonEnumerableProperty(that, 'stack', clearErrorStack(that.stack, 1));
8422
8432
  installErrorCause(that, options);
8423
8433
  var errorsArray = [];
@@ -8427,7 +8437,7 @@ var $AggregateError = function AggregateError(errors, message /* , options */) {
8427
8437
  };
8428
8438
 
8429
8439
  if (setPrototypeOf) setPrototypeOf($AggregateError, Error);
8430
- else copyConstructorProperties($AggregateError, Error);
8440
+ else copyConstructorProperties($AggregateError, Error, { name: true });
8431
8441
 
8432
8442
  var AggregateErrorPrototype = $AggregateError.prototype = create(Error.prototype, {
8433
8443
  constructor: createPropertyDescriptor(1, $AggregateError),
@@ -11339,7 +11349,7 @@ var store = __webpack_require__("yULr");
11339
11349
  (module.exports = function (key, value) {
11340
11350
  return store[key] || (store[key] = value !== undefined ? value : {});
11341
11351
  })('versions', []).push({
11342
- version: '3.19.2',
11352
+ version: '3.20.0',
11343
11353
  mode: IS_PURE ? 'pure' : 'global',
11344
11354
  copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
11345
11355
  });
@@ -12350,23 +12360,16 @@ module.exports = function (it) {
12350
12360
  /***/ (function(module, exports, __webpack_require__) {
12351
12361
 
12352
12362
  var uncurryThis = __webpack_require__("XQ/X");
12353
- var arraySlice = __webpack_require__("PtsP");
12354
12363
 
12355
12364
  var replace = uncurryThis(''.replace);
12356
- var split = uncurryThis(''.split);
12357
- var join = uncurryThis([].join);
12358
12365
 
12359
12366
  var TEST = (function (arg) { return String(Error(arg).stack); })('zxcasd');
12360
12367
  var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
12361
12368
  var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
12362
- var IS_FIREFOX_OR_SAFARI_STACK = /@[^\n]*\n/.test(TEST) && !/zxcasd/.test(TEST);
12363
12369
 
12364
12370
  module.exports = function (stack, dropEntries) {
12365
- if (typeof stack != 'string') return stack;
12366
- if (IS_V8_OR_CHAKRA_STACK) {
12371
+ if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string') {
12367
12372
  while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
12368
- } else if (IS_FIREFOX_OR_SAFARI_STACK) {
12369
- return join(arraySlice(split(stack, '\n'), dropEntries), '\n');
12370
12373
  } return stack;
12371
12374
  };
12372
12375
 
@@ -12661,25 +12664,14 @@ module.exports = Symbol;
12661
12664
  function _typeof(obj) {
12662
12665
  "@babel/helpers - typeof";
12663
12666
 
12664
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
12665
- module.exports = _typeof = function _typeof(obj) {
12666
- return typeof obj;
12667
- };
12668
-
12669
- module.exports["default"] = module.exports, module.exports.__esModule = true;
12670
- } else {
12671
- module.exports = _typeof = function _typeof(obj) {
12672
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
12673
- };
12674
-
12675
- module.exports["default"] = module.exports, module.exports.__esModule = true;
12676
- }
12677
-
12678
- return _typeof(obj);
12667
+ return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
12668
+ return typeof obj;
12669
+ } : function (obj) {
12670
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
12671
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
12679
12672
  }
12680
12673
 
12681
- module.exports = _typeof;
12682
- module.exports["default"] = module.exports, module.exports.__esModule = true;
12674
+ module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
12683
12675
 
12684
12676
  /***/ }),
12685
12677
 
@@ -13763,7 +13755,7 @@ const getHighLightTextHTML = _ref => {
13763
13755
  const markEle = option.highlightTag || 'mark';
13764
13756
  const highlightClassName = option.highlightClassName || '';
13765
13757
  const highlightStyle = option.highlightStyle || {};
13766
- return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(chunks).call(chunks, chunk => {
13758
+ return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(chunks).call(chunks, (chunk, index) => {
13767
13759
  const {
13768
13760
  end,
13769
13761
  start,
@@ -13774,7 +13766,8 @@ const getHighLightTextHTML = _ref => {
13774
13766
  if (highlight) {
13775
13767
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(markEle, {
13776
13768
  style: highlightStyle,
13777
- className: highlightClassName
13769
+ className: highlightClassName,
13770
+ key: text + index
13778
13771
  }, text);
13779
13772
  } else {
13780
13773
  return text;
@@ -13807,11 +13800,17 @@ const registerMediaQuery = (media, _ref2) => {
13807
13800
  }
13808
13801
 
13809
13802
  callInInit && handlerMediaChange(mediaQueryList);
13810
- mediaQueryList.addEventListener('change', handlerMediaChange);
13811
- return () => mediaQueryList.removeEventListener('change', handlerMediaChange);
13803
+
13804
+ if (Object.prototype.hasOwnProperty.call(mediaQueryList, 'addEventListener')) {
13805
+ mediaQueryList.addEventListener('change', handlerMediaChange);
13806
+ return () => mediaQueryList.removeEventListener('change', handlerMediaChange);
13807
+ }
13808
+
13809
+ mediaQueryList.addListener(handlerMediaChange);
13810
+ return () => mediaQueryList.removeListener(handlerMediaChange);
13812
13811
  }
13813
13812
 
13814
- return null;
13813
+ return () => undefined;
13815
13814
  };
13816
13815
  /**
13817
13816
  * Determine whether the incoming element is a built-in icon
@@ -18403,13 +18402,15 @@ var ownKeys = __webpack_require__("pDLF");
18403
18402
  var getOwnPropertyDescriptorModule = __webpack_require__("c9aA");
18404
18403
  var definePropertyModule = __webpack_require__("JliG");
18405
18404
 
18406
- module.exports = function (target, source) {
18405
+ module.exports = function (target, source, exceptions) {
18407
18406
  var keys = ownKeys(source);
18408
18407
  var defineProperty = definePropertyModule.f;
18409
18408
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
18410
18409
  for (var i = 0; i < keys.length; i++) {
18411
18410
  var key = keys[i];
18412
- if (!hasOwn(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
18411
+ if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
18412
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
18413
+ }
18413
18414
  }
18414
18415
  };
18415
18416
 
@@ -18798,7 +18799,7 @@ var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params
18798
18799
  if (!step.done) {
18799
18800
  step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
18800
18801
  } return step;
18801
- });
18802
+ }, true);
18802
18803
 
18803
18804
  var URLSearchParamsState = function (init) {
18804
18805
  this.entries = [];
@@ -19183,7 +19184,7 @@ var V8_VERSION = __webpack_require__("Qb90");
19183
19184
  var SPECIES = wellKnownSymbol('species');
19184
19185
  var PROMISE = 'Promise';
19185
19186
 
19186
- var getInternalState = InternalStateModule.get;
19187
+ var getInternalState = InternalStateModule.getterFor(PROMISE);
19187
19188
  var setInternalState = InternalStateModule.set;
19188
19189
  var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
19189
19190
  var NativePromisePrototype = NativePromise && NativePromise.prototype;
@@ -20786,7 +20787,10 @@ var toIndexedObject = __webpack_require__("VcbD");
20786
20787
  var addToUnscopables = __webpack_require__("Uh/D");
20787
20788
  var Iterators = __webpack_require__("m/wn");
20788
20789
  var InternalStateModule = __webpack_require__("WRdu");
20790
+ var defineProperty = __webpack_require__("JliG").f;
20789
20791
  var defineIterator = __webpack_require__("kYm/");
20792
+ var IS_PURE = __webpack_require__("Vl7J");
20793
+ var DESCRIPTORS = __webpack_require__("5Jdw");
20790
20794
 
20791
20795
  var ARRAY_ITERATOR = 'Array Iterator';
20792
20796
  var setInternalState = InternalStateModule.set;
@@ -20828,13 +20832,18 @@ module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
20828
20832
  // argumentsList[@@iterator] is %ArrayProto_values%
20829
20833
  // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
20830
20834
  // https://tc39.es/ecma262/#sec-createmappedargumentsobject
20831
- Iterators.Arguments = Iterators.Array;
20835
+ var values = Iterators.Arguments = Iterators.Array;
20832
20836
 
20833
20837
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
20834
20838
  addToUnscopables('keys');
20835
20839
  addToUnscopables('values');
20836
20840
  addToUnscopables('entries');
20837
20841
 
20842
+ // V8 ~ Chrome 45- bug
20843
+ if (!IS_PURE && DESCRIPTORS && values.name !== 'values') try {
20844
+ defineProperty(values, 'name', { value: 'values' });
20845
+ } catch (error) { /* empty */ }
20846
+
20838
20847
 
20839
20848
  /***/ }),
20840
20849
 
@@ -21269,7 +21278,7 @@ var constructorRegExp = /^\s*(?:class|function)\b/;
21269
21278
  var exec = uncurryThis(constructorRegExp.exec);
21270
21279
  var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
21271
21280
 
21272
- var isConstructorModern = function (argument) {
21281
+ var isConstructorModern = function isConstructor(argument) {
21273
21282
  if (!isCallable(argument)) return false;
21274
21283
  try {
21275
21284
  construct(noop, empty, argument);
@@ -21279,16 +21288,25 @@ var isConstructorModern = function (argument) {
21279
21288
  }
21280
21289
  };
21281
21290
 
21282
- var isConstructorLegacy = function (argument) {
21291
+ var isConstructorLegacy = function isConstructor(argument) {
21283
21292
  if (!isCallable(argument)) return false;
21284
21293
  switch (classof(argument)) {
21285
21294
  case 'AsyncFunction':
21286
21295
  case 'GeneratorFunction':
21287
21296
  case 'AsyncGeneratorFunction': return false;
21297
+ }
21298
+ try {
21288
21299
  // we can't check .prototype since constructors produced by .bind haven't it
21289
- } return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
21300
+ // `Function#toString` throws on some built-it function in some legacy engines
21301
+ // (for example, `DOMQuad` and similar in FF41-)
21302
+ return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
21303
+ } catch (error) {
21304
+ return true;
21305
+ }
21290
21306
  };
21291
21307
 
21308
+ isConstructorLegacy.sham = true;
21309
+
21292
21310
  // `IsConstructor` abstract operation
21293
21311
  // https://tc39.es/ecma262/#sec-isconstructor
21294
21312
  module.exports = !construct || fails(function () {
@@ -28594,6 +28612,64 @@ function IconCopy_SvgComponent(props) {
28594
28612
 
28595
28613
  const IconCopy_IconComponent = convertIcon(IconCopy_SvgComponent, 'copy');
28596
28614
  /* harmony default export */ var IconCopy = (IconCopy_IconComponent);
28615
+ // CONCATENATED MODULE: ../semi-icons/lib/es/icons/IconDoubleChevronLeft.js
28616
+
28617
+
28618
+
28619
+
28620
+ function IconDoubleChevronLeft_SvgComponent(props) {
28621
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("svg", assign_default()({
28622
+ viewBox: "0 0 24 24",
28623
+ fill: "none",
28624
+ xmlns: "http://www.w3.org/2000/svg",
28625
+ width: "1em",
28626
+ height: "1em",
28627
+ focusable: false,
28628
+ "aria-hidden": true
28629
+ }, props), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("path", {
28630
+ fillRule: "evenodd",
28631
+ clipRule: "evenodd",
28632
+ d: "M12.6185 4.39653C13.1272 4.92524 13.1272 5.78245 12.6185 6.31116L7.14483 12L12.6185 17.6888C13.1272 18.2176 13.1272 19.0748 12.6185 19.6035C12.1098 20.1322 11.285 20.1322 10.7763 19.6035L4.38153 12.9573C3.87282 12.4286 3.87282 11.5714 4.38153 11.0427L10.7763 4.39653C11.285 3.86782 12.1098 3.86782 12.6185 4.39653Z",
28633
+ fill: "currentColor"
28634
+ }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("path", {
28635
+ fillRule: "evenodd",
28636
+ clipRule: "evenodd",
28637
+ d: "M19.6185 4.39653C20.1272 4.92524 20.1272 5.78245 19.6185 6.31116L14.1448 12L19.6185 17.6888C20.1272 18.2176 20.1272 19.0748 19.6185 19.6035C19.1098 20.1322 18.285 20.1322 17.7763 19.6035L11.3815 12.9573C10.8728 12.4286 10.8728 11.5714 11.3815 11.0427L17.7763 4.39653C18.285 3.86782 19.1098 3.86782 19.6185 4.39653Z",
28638
+ fill: "currentColor"
28639
+ }));
28640
+ }
28641
+
28642
+ const IconDoubleChevronLeft_IconComponent = convertIcon(IconDoubleChevronLeft_SvgComponent, 'double_chevron_left');
28643
+ /* harmony default export */ var IconDoubleChevronLeft = (IconDoubleChevronLeft_IconComponent);
28644
+ // CONCATENATED MODULE: ../semi-icons/lib/es/icons/IconDoubleChevronRight.js
28645
+
28646
+
28647
+
28648
+
28649
+ function IconDoubleChevronRight_SvgComponent(props) {
28650
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("svg", assign_default()({
28651
+ viewBox: "0 0 24 24",
28652
+ fill: "none",
28653
+ xmlns: "http://www.w3.org/2000/svg",
28654
+ width: "1em",
28655
+ height: "1em",
28656
+ focusable: false,
28657
+ "aria-hidden": true
28658
+ }, props), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("path", {
28659
+ fillRule: "evenodd",
28660
+ clipRule: "evenodd",
28661
+ d: "M4.38153 4.39653C4.89024 3.86782 5.71502 3.86782 6.22373 4.39653L12.6185 11.0427C13.1272 11.5714 13.1272 12.4286 12.6185 12.9573L6.22373 19.6035C5.71502 20.1322 4.89024 20.1322 4.38153 19.6035C3.87282 19.0748 3.87282 18.2176 4.38153 17.6888L9.85517 12L4.38153 6.31116C3.87282 5.78245 3.87282 4.92524 4.38153 4.39653Z",
28662
+ fill: "currentColor"
28663
+ }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("path", {
28664
+ fillRule: "evenodd",
28665
+ clipRule: "evenodd",
28666
+ d: "M11.3815 4.39653C11.8902 3.86782 12.715 3.86782 13.2237 4.39653L19.6185 11.0427C20.1272 11.5714 20.1272 12.4286 19.6185 12.9573L13.2237 19.6035C12.715 20.1322 11.8902 20.1322 11.3815 19.6035C10.8728 19.0748 10.8728 18.2176 11.3815 17.6888L16.8552 12L11.3815 6.31116C10.8728 5.78245 10.8728 4.92524 11.3815 4.39653Z",
28667
+ fill: "currentColor"
28668
+ }));
28669
+ }
28670
+
28671
+ const IconDoubleChevronRight_IconComponent = convertIcon(IconDoubleChevronRight_SvgComponent, 'double_chevron_right');
28672
+ /* harmony default export */ var IconDoubleChevronRight = (IconDoubleChevronRight_IconComponent);
28597
28673
  // CONCATENATED MODULE: ../semi-icons/lib/es/icons/IconEyeClosedSolid.js
28598
28674
 
28599
28675
 
@@ -29521,6 +29597,8 @@ const IconUpload_IconComponent = convertIcon(IconUpload_SvgComponent, 'upload');
29521
29597
 
29522
29598
 
29523
29599
 
29600
+
29601
+
29524
29602
 
29525
29603
 
29526
29604
 
@@ -42596,6 +42674,10 @@ cardGroup_CardGroup.defaultProps = {
42596
42674
  spacing: 16
42597
42675
  };
42598
42676
  /* harmony default export */ var cardGroup = (cardGroup_CardGroup);
42677
+ // EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/lodash/flatten.js
42678
+ var lodash_flatten = __webpack_require__("1xil");
42679
+ var flatten_default = /*#__PURE__*/__webpack_require__.n(lodash_flatten);
42680
+
42599
42681
  // EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/@babel/runtime-corejs3/core-js-stable/promise.js
42600
42682
  var promise = __webpack_require__("kNzS");
42601
42683
  var promise_default = /*#__PURE__*/__webpack_require__.n(promise);
@@ -42657,7 +42739,6 @@ var object_entries_default = /*#__PURE__*/__webpack_require__.n(object_entries);
42657
42739
 
42658
42740
 
42659
42741
 
42660
-
42661
42742
 
42662
42743
 
42663
42744
  const DRAG_OFFSET = 0.45;
@@ -43137,7 +43218,7 @@ function normalizedArr(val) {
43137
43218
  }
43138
43219
  function normalizeKeyList(keyList, keyEntities) {
43139
43220
  let leafOnly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
43140
- let res = [];
43221
+ const res = [];
43141
43222
  const keyListSet = new set_default.a(keyList);
43142
43223
 
43143
43224
  if (!leafOnly) {
@@ -43157,9 +43238,11 @@ function normalizeKeyList(keyList, keyEntities) {
43157
43238
  res.push(key);
43158
43239
  });
43159
43240
  } else {
43160
- var _context8;
43161
-
43162
- res = filter_default()(_context8 = from_default()(keyList)).call(_context8, key => keyEntities[key] && !treeUtil_isValid(keyEntities[key].children));
43241
+ for_each_default()(keyList).call(keyList, key => {
43242
+ if (keyEntities[key] && !treeUtil_isValid(keyEntities[key].children)) {
43243
+ res.push(key);
43244
+ }
43245
+ });
43163
43246
  }
43164
43247
 
43165
43248
  return res;
@@ -43168,9 +43251,9 @@ function getMotionKeys(eventKey, expandedKeys, keyEntities) {
43168
43251
  const res = [];
43169
43252
 
43170
43253
  const getChild = itemKey => {
43171
- var _context9;
43254
+ var _context8;
43172
43255
 
43173
- keyEntities[itemKey].children && for_each_default()(_context9 = keyEntities[itemKey].children).call(_context9, item => {
43256
+ keyEntities[itemKey].children && for_each_default()(_context8 = keyEntities[itemKey].children).call(_context8, item => {
43174
43257
  const {
43175
43258
  key
43176
43259
  } = item;
@@ -43286,7 +43369,7 @@ function calcCheckedKeysForUnchecked(key, keyEntities, checkedKeys, halfCheckedK
43286
43369
  };
43287
43370
  }
43288
43371
  function filterTreeData(info) {
43289
- var _context10, _context11;
43372
+ var _context9, _context10;
43290
43373
 
43291
43374
  const {
43292
43375
  showFilteredOnly,
@@ -43298,7 +43381,7 @@ function filterTreeData(info) {
43298
43381
  prevExpandedKeys
43299
43382
  } = info;
43300
43383
  let filteredOptsKeys = [];
43301
- filteredOptsKeys = map_default()(_context10 = filter_default()(_context11 = values_default()(keyEntities)).call(_context11, item => treeUtil_filter(inputValue, item.data, filterTreeNode, filterProps))).call(_context10, item => item.key);
43384
+ filteredOptsKeys = map_default()(_context9 = filter_default()(_context10 = values_default()(keyEntities)).call(_context10, item => treeUtil_filter(inputValue, item.data, filterTreeNode, filterProps))).call(_context9, item => item.key);
43302
43385
  let expandedOptsKeys = findAncestorKeys(filteredOptsKeys, keyEntities, false);
43303
43386
 
43304
43387
  if (prevExpandedKeys.length) {
@@ -43339,9 +43422,9 @@ function updateKeys(keySet, keyEntities) {
43339
43422
  return filter_default()(keyArr).call(keyArr, key => key in keyEntities);
43340
43423
  }
43341
43424
  function calcDisabledKeys(keyEntities) {
43342
- var _context12;
43425
+ var _context11;
43343
43426
 
43344
- const disabledKeys = filter_default()(_context12 = keys_default()(keyEntities)).call(_context12, key => keyEntities[key].data.disabled);
43427
+ const disabledKeys = filter_default()(_context11 = keys_default()(keyEntities)).call(_context11, key => keyEntities[key].data.disabled);
43345
43428
 
43346
43429
  const {
43347
43430
  checkedKeys
@@ -43376,6 +43459,27 @@ function calcDropActualPosition(pos, relativeDropPos) {
43376
43459
 
43377
43460
  return relativeDropPos + Number(posArr[posArr.length - 1]);
43378
43461
  }
43462
+ // CONCATENATED MODULE: ../semi-foundation/cascader/constants.ts
43463
+
43464
+ const cascader_constants_cssClasses = {
43465
+ PREFIX: "".concat(BASE_CLASS_PREFIX, "-cascader"),
43466
+ PREFIX_OPTION: "".concat(BASE_CLASS_PREFIX, "-cascader-option")
43467
+ };
43468
+ const cascader_constants_strings = {
43469
+ SIZE_SET: ['small', 'large', 'default'],
43470
+ VALIDATE_STATUS: ['default', 'error', 'warning'],
43471
+ IS_KEY: 'isKey',
43472
+ IS_VALUE: 'isValue',
43473
+ SHOW_NEXT_BY_CLICK: 'click',
43474
+ SHOW_NEXT_BY_HOVER: 'hover',
43475
+
43476
+ /* Merge Type */
43477
+ LEAF_ONLY_MERGE_TYPE: 'leafOnly',
43478
+ AUTO_MERGE_VALUE_MERGE_TYPE: 'autoMergeValue',
43479
+ NONE_MERGE_TYPE: 'none'
43480
+ };
43481
+ const cascader_constants_numbers = {};
43482
+
43379
43483
  // CONCATENATED MODULE: ../semi-foundation/cascader/util.ts
43380
43484
 
43381
43485
 
@@ -43388,6 +43492,7 @@ function calcDropActualPosition(pos, relativeDropPos) {
43388
43492
 
43389
43493
 
43390
43494
 
43495
+
43391
43496
  function util_getPosition(level, index) {
43392
43497
  var _context;
43393
43498
 
@@ -43468,6 +43573,19 @@ function util_findKeysForValues(value, keyEntities) {
43468
43573
 
43469
43574
  return res;
43470
43575
  }
43576
+ function calcMergeType(autoMergeValue, leafOnly) {
43577
+ let mergeType;
43578
+
43579
+ if (leafOnly) {
43580
+ mergeType = cascader_constants_strings.LEAF_ONLY_MERGE_TYPE;
43581
+ } else if (autoMergeValue) {
43582
+ mergeType = cascader_constants_strings.AUTO_MERGE_VALUE_MERGE_TYPE;
43583
+ } else {
43584
+ mergeType = cascader_constants_strings.NONE_MERGE_TYPE;
43585
+ }
43586
+
43587
+ return mergeType;
43588
+ }
43471
43589
  // CONCATENATED MODULE: ../semi-foundation/cascader/foundation.ts
43472
43590
 
43473
43591
 
@@ -43491,6 +43609,7 @@ function util_findKeysForValues(value, keyEntities) {
43491
43609
 
43492
43610
 
43493
43611
 
43612
+
43494
43613
 
43495
43614
 
43496
43615
  // eslint-disable-next-line max-len
@@ -44006,10 +44125,12 @@ class foundation_CascaderFoundation extends foundation {
44006
44125
  }
44007
44126
 
44008
44127
  _defaultRenderText(path, displayRender) {
44128
+ const separator = this.getProp('separator');
44129
+
44009
44130
  if (displayRender && typeof displayRender === 'function') {
44010
44131
  return displayRender(path);
44011
44132
  } else {
44012
- return path.join(' / ');
44133
+ return path.join(separator);
44013
44134
  }
44014
44135
  }
44015
44136
 
@@ -44083,7 +44204,8 @@ class foundation_CascaderFoundation extends foundation {
44083
44204
  const {
44084
44205
  changeOnSelect: allowChange,
44085
44206
  filterLeafOnly,
44086
- multiple
44207
+ multiple,
44208
+ enableLeafClick
44087
44209
  } = this.getProps();
44088
44210
  const {
44089
44211
  keyEntities,
@@ -44117,6 +44239,10 @@ class foundation_CascaderFoundation extends foundation {
44117
44239
  this._adapter.updateStates({
44118
44240
  activeKeys: new set_default.a(activeKeys)
44119
44241
  });
44242
+
44243
+ if (isLeaf && enableLeafClick) {
44244
+ this.onItemCheckboxClick(item);
44245
+ }
44120
44246
  } else {
44121
44247
  this._adapter.notifySelect(data.value);
44122
44248
 
@@ -44166,12 +44292,13 @@ class foundation_CascaderFoundation extends foundation {
44166
44292
  const {
44167
44293
  checkedKeys,
44168
44294
  keyEntities,
44169
- mergedCheckedKeys
44295
+ resolvedCheckedKeys
44170
44296
  } = this.getStates();
44171
44297
  const {
44172
44298
  autoMergeValue,
44173
44299
  max,
44174
- disableStrictly
44300
+ disableStrictly,
44301
+ leafOnly
44175
44302
  } = this.getProps(); // prev checked status
44176
44303
 
44177
44304
  const prevCheckedStatus = checkedKeys.has(key); // next checked status
@@ -44182,16 +44309,19 @@ class foundation_CascaderFoundation extends foundation {
44182
44309
  checkedKeys: curCheckedKeys,
44183
44310
  halfCheckedKeys: curHalfCheckedKeys
44184
44311
  } = disableStrictly ? this.calcNonDisabedCheckedKeys(key, curCheckedStatus) : this.calcCheckedKeys(key, curCheckedStatus);
44185
- const curMergedCheckedKeys = new set_default.a(normalizeKeyList(curCheckedKeys, keyEntities));
44186
- const curRealCheckedKeys = autoMergeValue ? curMergedCheckedKeys : curCheckedKeys;
44312
+ const mergeType = calcMergeType(autoMergeValue, leafOnly);
44313
+ const isLeafOnlyMerge = mergeType === cascader_constants_strings.LEAF_ONLY_MERGE_TYPE;
44314
+ const isNoneMerge = mergeType === cascader_constants_strings.NONE_MERGE_TYPE;
44315
+ const curResolvedCheckedKeys = new set_default.a(normalizeKeyList(curCheckedKeys, keyEntities, isLeafOnlyMerge));
44316
+ const curRealCheckedKeys = isNoneMerge ? curCheckedKeys : curResolvedCheckedKeys;
44187
44317
 
44188
44318
  if (isNumber_default()(max)) {
44189
- if (autoMergeValue) {
44319
+ if (!isNoneMerge) {
44190
44320
  // When it exceeds max, the quantity is allowed to be reduced, and no further increase is allowed
44191
- if (mergedCheckedKeys.size < curMergedCheckedKeys.size && curMergedCheckedKeys.size > max) {
44321
+ if (resolvedCheckedKeys.size < curResolvedCheckedKeys.size && curResolvedCheckedKeys.size > max) {
44192
44322
  const checkedEntities = [];
44193
44323
 
44194
- for_each_default()(curMergedCheckedKeys).call(curMergedCheckedKeys, itemKey => {
44324
+ for_each_default()(curResolvedCheckedKeys).call(curResolvedCheckedKeys, itemKey => {
44195
44325
  checkedEntities.push(keyEntities[itemKey]);
44196
44326
  });
44197
44327
 
@@ -44219,7 +44349,7 @@ class foundation_CascaderFoundation extends foundation {
44219
44349
  this._adapter.updateStates({
44220
44350
  checkedKeys: curCheckedKeys,
44221
44351
  halfCheckedKeys: curHalfCheckedKeys,
44222
- mergedCheckedKeys: curMergedCheckedKeys
44352
+ resolvedCheckedKeys: curResolvedCheckedKeys
44223
44353
  });
44224
44354
  } // The click event during multiple selection will definitely cause the checked state of node to change,
44225
44355
  // so there is no need to judge the value to change.
@@ -44382,7 +44512,7 @@ class foundation_CascaderFoundation extends foundation {
44382
44512
  newState.halfCheckedKeys = new set_default.a([]);
44383
44513
  newState.selectedKeys = new set_default.a([]);
44384
44514
  newState.activeKeys = new set_default.a([]);
44385
- newState.mergedCheckedKeys = new set_default.a([]);
44515
+ newState.resolvedCheckedKeys = new set_default.a([]);
44386
44516
 
44387
44517
  this._adapter.notifyChange([]);
44388
44518
  } else {
@@ -44507,22 +44637,6 @@ class foundation_CascaderFoundation extends foundation {
44507
44637
  }
44508
44638
 
44509
44639
  }
44510
- // CONCATENATED MODULE: ../semi-foundation/cascader/constants.ts
44511
-
44512
- const cascader_constants_cssClasses = {
44513
- PREFIX: "".concat(BASE_CLASS_PREFIX, "-cascader"),
44514
- PREFIX_OPTION: "".concat(BASE_CLASS_PREFIX, "-cascader-option")
44515
- };
44516
- const cascader_constants_strings = {
44517
- SIZE_SET: ['small', 'large', 'default'],
44518
- VALIDATE_STATUS: ['default', 'error', 'warning'],
44519
- IS_KEY: 'isKey',
44520
- IS_VALUE: 'isValue',
44521
- SHOW_NEXT_BY_CLICK: 'click',
44522
- SHOW_NEXT_BY_HOVER: 'hover'
44523
- };
44524
- const cascader_constants_numbers = {};
44525
-
44526
44640
  // EXTERNAL MODULE: ../semi-foundation/cascader/cascader.scss
44527
44641
  var cascader = __webpack_require__("7u0x");
44528
44642
 
@@ -44824,7 +44938,8 @@ class checkbox_Checkbox extends baseComponent_BaseComponent {
44824
44938
  onMouseEnter,
44825
44939
  onMouseLeave,
44826
44940
  extra,
44827
- value
44941
+ value,
44942
+ id
44828
44943
  } = this.props;
44829
44944
  const {
44830
44945
  checked
@@ -44882,6 +44997,7 @@ class checkbox_Checkbox extends baseComponent_BaseComponent {
44882
44997
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
44883
44998
  style: style,
44884
44999
  className: wrapper,
45000
+ id: id,
44885
45001
  onMouseEnter: onMouseEnter,
44886
45002
  onMouseLeave: onMouseLeave,
44887
45003
  onClick: this.handleChange
@@ -45081,6 +45197,7 @@ class checkboxGroup_CheckboxGroup extends baseComponent_BaseComponent {
45081
45197
  prefixCls,
45082
45198
  direction,
45083
45199
  className,
45200
+ id,
45084
45201
  style,
45085
45202
  type
45086
45203
  } = this.props;
@@ -45132,7 +45249,8 @@ class checkboxGroup_CheckboxGroup extends baseComponent_BaseComponent {
45132
45249
 
45133
45250
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
45134
45251
  className: prefixClsDisplay,
45135
- style: style
45252
+ style: style,
45253
+ id: id
45136
45254
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Context.Provider, {
45137
45255
  value: {
45138
45256
  checkboxGroup: {
@@ -45302,7 +45420,8 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
45302
45420
  this.highlight = searchText => {
45303
45421
  const content = [];
45304
45422
  const {
45305
- keyword
45423
+ keyword,
45424
+ separator
45306
45425
  } = this.props;
45307
45426
 
45308
45427
  for_each_default()(searchText).call(searchText, (item, idx) => {
@@ -45326,7 +45445,7 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
45326
45445
  }
45327
45446
 
45328
45447
  if (idx !== searchText.length - 1) {
45329
- content.push(' / ');
45448
+ content.push(separator);
45330
45449
  }
45331
45450
  });
45332
45451
 
@@ -45498,6 +45617,7 @@ item_Item.propTypes = {
45498
45617
  checkedKeys: prop_types_default.a.object,
45499
45618
  halfCheckedKeys: prop_types_default.a.object,
45500
45619
  onItemCheckboxClick: prop_types_default.a.func,
45620
+ separator: prop_types_default.a.string,
45501
45621
  keyword: prop_types_default.a.string
45502
45622
  };
45503
45623
  item_Item.defaultProps = {
@@ -46407,6 +46527,7 @@ tagInput_TagInput.defaultProps = {
46407
46527
 
46408
46528
 
46409
46529
 
46530
+
46410
46531
 
46411
46532
 
46412
46533
  const cascader_prefixcls = cascader_constants_cssClasses.PREFIX;
@@ -46500,6 +46621,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
46500
46621
  dropdownStyle,
46501
46622
  loadData,
46502
46623
  emptyContent,
46624
+ separator,
46503
46625
  topSlot,
46504
46626
  bottomSlot,
46505
46627
  showNext,
@@ -46515,6 +46637,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
46515
46637
  }, topSlot, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(item_Item, {
46516
46638
  activeKeys: activeKeys,
46517
46639
  selectedKeys: selectedKeys,
46640
+ separator: separator,
46518
46641
  loadedKeys: loadedKeys,
46519
46642
  loadingKeys: loadingKeys,
46520
46643
  onItemClick: this.handleItemClick,
@@ -46564,9 +46687,9 @@ class cascader_Cascader extends baseComponent_BaseComponent {
46564
46687
  } = this.props;
46565
46688
  const {
46566
46689
  checkedKeys,
46567
- mergedCheckedKeys
46690
+ resolvedCheckedKeys
46568
46691
  } = this.state;
46569
- const realKeys = autoMergeValue ? mergedCheckedKeys : checkedKeys;
46692
+ const realKeys = this.mergeType === cascader_constants_strings.NONE_MERGE_TYPE ? checkedKeys : resolvedCheckedKeys;
46570
46693
  const displayTag = [];
46571
46694
  const hiddenTag = [];
46572
46695
 
@@ -46656,20 +46779,23 @@ class cascader_Cascader extends baseComponent_BaseComponent {
46656
46779
  const {
46657
46780
  disabled,
46658
46781
  triggerRender,
46659
- multiple,
46660
- autoMergeValue
46782
+ multiple
46661
46783
  } = this.props;
46662
46784
  const {
46663
46785
  selectedKeys,
46664
46786
  inputValue,
46665
46787
  inputPlaceHolder,
46666
- mergedCheckedKeys,
46788
+ resolvedCheckedKeys,
46667
46789
  checkedKeys
46668
46790
  } = this.state;
46669
46791
  let realValue;
46670
46792
 
46671
46793
  if (multiple) {
46672
- realValue = autoMergeValue ? mergedCheckedKeys : checkedKeys;
46794
+ if (this.mergeType === cascader_constants_strings.NONE_MERGE_TYPE) {
46795
+ realValue = checkedKeys;
46796
+ } else {
46797
+ realValue = resolvedCheckedKeys;
46798
+ }
46673
46799
  } else {
46674
46800
  realValue = [...selectedKeys][0];
46675
46801
  }
@@ -46849,8 +46975,8 @@ class cascader_Cascader extends baseComponent_BaseComponent {
46849
46975
  /* Key of half checked node, when multiple */
46850
46976
  halfCheckedKeys: new set_default.a([]),
46851
46977
 
46852
- /* Auto merged checkedKeys, when multiple */
46853
- mergedCheckedKeys: new set_default.a([]),
46978
+ /* Auto merged checkedKeys or leaf checkedKeys, when multiple */
46979
+ resolvedCheckedKeys: new set_default.a([]),
46854
46980
 
46855
46981
  /* Keys of loaded item */
46856
46982
  loadedKeys: new set_default.a(),
@@ -46863,6 +46989,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
46863
46989
  };
46864
46990
  this.options = {};
46865
46991
  this.isEmpty = false;
46992
+ this.mergeType = calcMergeType(props.autoMergeValue, props.leafOnly);
46866
46993
  this.inputRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
46867
46994
  this.triggerRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
46868
46995
  this.optionsRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
@@ -47005,7 +47132,9 @@ class cascader_Cascader extends baseComponent_BaseComponent {
47005
47132
  multiple,
47006
47133
  value,
47007
47134
  defaultValue,
47008
- onChangeWithObject
47135
+ onChangeWithObject,
47136
+ leafOnly,
47137
+ autoMergeValue
47009
47138
  } = props;
47010
47139
  const {
47011
47140
  prevProps
@@ -47070,24 +47199,19 @@ class cascader_Cascader extends baseComponent_BaseComponent {
47070
47199
  realKeys = formatKeys;
47071
47200
  }
47072
47201
 
47073
- let checkedKeys = new set_default.a([]);
47074
- let halfCheckedKeys = new set_default.a([]);
47075
-
47076
- for_each_default()(realKeys).call(realKeys, v => {
47077
- const calRes = calcCheckedKeys(v, keyEntities);
47078
- checkedKeys = new set_default.a([...checkedKeys, ...calRes.checkedKeys]);
47079
- halfCheckedKeys = new set_default.a([...halfCheckedKeys, ...calRes.halfCheckedKeys]);
47080
- }); // disableStrictly
47081
-
47202
+ const calRes = calcCheckedKeys(flatten_default()(realKeys), keyEntities);
47203
+ const checkedKeys = new set_default.a(calRes.checkedKeys);
47204
+ const halfCheckedKeys = new set_default.a(calRes.halfCheckedKeys); // disableStrictly
47082
47205
 
47083
47206
  if (props.disableStrictly) {
47084
47207
  newState.disabledKeys = calcDisabledKeys(keyEntities);
47085
47208
  }
47086
47209
 
47210
+ const isLeafOnlyMerge = calcMergeType(autoMergeValue, leafOnly) === cascader_constants_strings.LEAF_ONLY_MERGE_TYPE;
47087
47211
  newState.prevProps = props;
47088
47212
  newState.checkedKeys = checkedKeys;
47089
47213
  newState.halfCheckedKeys = halfCheckedKeys;
47090
- newState.mergedCheckedKeys = new set_default.a(normalizeKeyList(checkedKeys, keyEntities));
47214
+ newState.resolvedCheckedKeys = new set_default.a(normalizeKeyList(checkedKeys, keyEntities, isLeafOnlyMerge));
47091
47215
  }
47092
47216
  }
47093
47217
 
@@ -47121,7 +47245,6 @@ class cascader_Cascader extends baseComponent_BaseComponent {
47121
47245
  const {
47122
47246
  size,
47123
47247
  disabled,
47124
- autoMergeValue,
47125
47248
  placeholder,
47126
47249
  maxTagCount,
47127
47250
  showRestTagsPopover,
@@ -47131,11 +47254,11 @@ class cascader_Cascader extends baseComponent_BaseComponent {
47131
47254
  inputValue,
47132
47255
  checkedKeys,
47133
47256
  keyEntities,
47134
- mergedCheckedKeys
47257
+ resolvedCheckedKeys
47135
47258
  } = this.state;
47136
47259
  const tagInputcls = classnames_default()("".concat(cascader_prefixcls, "-tagInput-wrapper"));
47137
47260
  const tagValue = [];
47138
- const realKeys = autoMergeValue ? mergedCheckedKeys : checkedKeys;
47261
+ const realKeys = this.mergeType === cascader_constants_strings.NONE_MERGE_TYPE ? checkedKeys : resolvedCheckedKeys;
47139
47262
 
47140
47263
  for_each_default()(_context3 = [...realKeys]).call(_context3, checkedKey => {
47141
47264
  if (!isEmpty_default()(keyEntities[checkedKey])) {
@@ -47285,14 +47408,18 @@ cascader_Cascader.propTypes = {
47285
47408
  showRestTagsPopover: prop_types_default.a.bool,
47286
47409
  restTagsPopoverProps: prop_types_default.a.object,
47287
47410
  max: prop_types_default.a.number,
47411
+ separator: prop_types_default.a.string,
47288
47412
  onExceed: prop_types_default.a.func,
47289
47413
  onClear: prop_types_default.a.func,
47290
47414
  loadData: prop_types_default.a.func,
47291
47415
  onLoad: prop_types_default.a.func,
47292
47416
  loadedKeys: prop_types_default.a.array,
47293
- disableStrictly: prop_types_default.a.bool
47417
+ disableStrictly: prop_types_default.a.bool,
47418
+ leafOnly: prop_types_default.a.bool,
47419
+ enableLeafClick: prop_types_default.a.bool
47294
47420
  };
47295
47421
  cascader_Cascader.defaultProps = {
47422
+ leafOnly: false,
47296
47423
  arrowIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronDown, null),
47297
47424
  stopPropagation: true,
47298
47425
  motion: true,
@@ -47309,6 +47436,7 @@ cascader_Cascader.defaultProps = {
47309
47436
  filterLeafOnly: true,
47310
47437
  showRestTagsPopover: false,
47311
47438
  restTagsPopoverProps: {},
47439
+ separator: ' / ',
47312
47440
  size: 'default',
47313
47441
  treeNodeFilterProp: 'label',
47314
47442
  displayProp: 'label',
@@ -47317,7 +47445,8 @@ cascader_Cascader.defaultProps = {
47317
47445
  onExceed: noop_default.a,
47318
47446
  onClear: noop_default.a,
47319
47447
  onDropdownVisibleChange: noop_default.a,
47320
- onListScroll: noop_default.a
47448
+ onListScroll: noop_default.a,
47449
+ enableLeafClick: false
47321
47450
  };
47322
47451
  /* harmony default export */ var cascader_0 = (cascader_Cascader);
47323
47452
  // CONCATENATED MODULE: ../semi-foundation/collapse/constants.ts
@@ -48270,7 +48399,7 @@ var patterns = {
48270
48399
  timezone: /([Z+-].*)$/,
48271
48400
  timezoneZ: /^(Z)$/,
48272
48401
  timezoneHH: /^([+-])(\d{2})$/,
48273
- timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
48402
+ timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/,
48274
48403
  }
48275
48404
 
48276
48405
  // Parse various time zone offset formats to an offset in milliseconds
@@ -48388,12 +48517,15 @@ function validateTimezone(hours, minutes) {
48388
48517
  return true
48389
48518
  }
48390
48519
 
48520
+ var validIANATimezoneCache = {}
48391
48521
  function isValidTimezoneIANAString(timeZoneString) {
48522
+ if (validIANATimezoneCache[timeZoneString]) return true
48392
48523
  try {
48393
- Intl.DateTimeFormat(undefined, {timeZone: timeZoneString});
48394
- return true;
48524
+ Intl.DateTimeFormat(undefined, { timeZone: timeZoneString })
48525
+ validIANATimezoneCache[timeZoneString] = true
48526
+ return true
48395
48527
  } catch (error) {
48396
- return false;
48528
+ return false
48397
48529
  }
48398
48530
  }
48399
48531
 
@@ -49404,10 +49536,23 @@ function esm_format_format(dirtyDate, dirtyFormatStr, dirtyOptions) {
49404
49536
  var matches = formatStr.match(tzFormattingTokensRegExp)
49405
49537
  if (matches) {
49406
49538
  var date = toDate_toDate(dirtyDate, options)
49539
+ // Work through each match and replace the tz token in the format string with the quoted
49540
+ // formatted time zone so the remaining tokens can be filled in by date-fns#format.
49407
49541
  formatStr = matches.reduce(function (result, token) {
49408
- return token[0] === "'"
49409
- ? result
49410
- : result.replace(token, "'" + esm_format_formatters[token[0]](date, token, null, options) + "'")
49542
+ if (token[0] === "'") {
49543
+ return result // This is a quoted portion, matched only to ensure we don't match inside it
49544
+ }
49545
+ var pos = result.indexOf(token)
49546
+ var precededByQuotedSection = result[pos - 1] === "'"
49547
+ var replaced = result.replace(
49548
+ token,
49549
+ "'" + esm_format_formatters[token[0]](date, token, null, options) + "'"
49550
+ )
49551
+ // If the replacement results in two adjoining quoted strings, the back to back quotes
49552
+ // are removed so it doesn't look like an escaped quote.
49553
+ return precededByQuotedSection
49554
+ ? replaced.substring(0, pos - 1) + replaced.substring(pos + 1)
49555
+ : replaced
49411
49556
  }, formatStr)
49412
49557
  }
49413
49558
 
@@ -52055,7 +52200,9 @@ function compatiableParse(value, formatToken, baseDate, locale) {
52055
52200
  result = new Date(Date.parse(value));
52056
52201
  }
52057
52202
 
52058
- if (!isValid(result)) {
52203
+ const yearInvalid = isValid(result) && String(result.getFullYear()).length > 4;
52204
+
52205
+ if (!isValid(result) || yearInvalid) {
52059
52206
  result = null;
52060
52207
  }
52061
52208
  }
@@ -54565,11 +54712,99 @@ class monthsGridFoundation_MonthsGridFoundation extends foundation {
54565
54712
 
54566
54713
 
54567
54714
  destroy() {}
54715
+ /**
54716
+ * sync change another panel month when change months from the else yam panel
54717
+ * call it when
54718
+ * - current change panel targe date month is same with another panel date
54719
+ *
54720
+ * @example
54721
+ * - panelType=right, target=new Date('2022-09-01') and left panel is in '2022-09' => call it, left panel minus one month to '2022-08'
54722
+ * - panelType=left, target=new Date('2021-12-01') and right panel is in '2021-12' => call it, right panel add one month to '2021-01'
54723
+ */
54724
+
54725
+
54726
+ handleSyncChangeMonths(options) {
54727
+ const {
54728
+ panelType,
54729
+ target
54730
+ } = options;
54731
+
54732
+ const {
54733
+ type
54734
+ } = this._adapter.getProps();
54735
+
54736
+ const {
54737
+ monthLeft,
54738
+ monthRight
54739
+ } = this._adapter.getStates();
54740
+
54741
+ if (this.isRangeType(type)) {
54742
+ if (panelType === 'right' && differenceInCalendarMonths(target, monthLeft.pickerDate) === 0) {
54743
+ this.handleYearOrMonthChange('prevMonth', 'left', 1, true);
54744
+ } else if (panelType === 'left' && differenceInCalendarMonths(monthRight.pickerDate, target) === 0) {
54745
+ this.handleYearOrMonthChange('nextMonth', 'right', 1, true);
54746
+ }
54747
+ }
54748
+ }
54749
+ /**
54750
+ * Get the target date based on the panel type and switch type
54751
+ */
54752
+
54753
+
54754
+ getTargetChangeDate(options) {
54755
+ const {
54756
+ panelType,
54757
+ switchType
54758
+ } = options;
54759
+
54760
+ const {
54761
+ monthRight,
54762
+ monthLeft
54763
+ } = this._adapter.getStates();
54764
+
54765
+ const currentDate = panelType === 'left' ? monthLeft.pickerDate : monthRight.pickerDate;
54766
+ let target;
54767
+
54768
+ switch (switchType) {
54769
+ case 'prevMonth':
54770
+ target = addMonths(currentDate, -1);
54771
+ break;
54772
+
54773
+ case 'nextMonth':
54774
+ target = addMonths(currentDate, 1);
54775
+ break;
54776
+
54777
+ case 'prevYear':
54778
+ target = addYears(currentDate, -1);
54779
+ break;
54780
+
54781
+ case 'nextYear':
54782
+ target = addYears(currentDate, 1);
54783
+ break;
54784
+ }
54785
+
54786
+ return target;
54787
+ }
54788
+ /**
54789
+ * Change month by yam panel
54790
+ */
54791
+
54568
54792
 
54569
54793
  toMonth(panelType, target) {
54794
+ const {
54795
+ type
54796
+ } = this._adapter.getProps();
54797
+
54570
54798
  const diff = this._getDiff('month', target, panelType);
54571
54799
 
54572
54800
  this.handleYearOrMonthChange(diff < 0 ? 'prevMonth' : 'nextMonth', panelType, Math.abs(diff), false);
54801
+
54802
+ if (this.isRangeType(type)) {
54803
+ this.handleSyncChangeMonths({
54804
+ panelType,
54805
+ target
54806
+ });
54807
+ }
54573
54808
  }
54574
54809
 
54575
54810
  toYear(panelType, target) {
@@ -54591,34 +54826,51 @@ class monthsGridFoundation_MonthsGridFoundation extends foundation {
54591
54826
  return typeof realType === 'string' && /range/i.test(realType);
54592
54827
  }
54593
54828
 
54594
- handleSwitchMonth(switchType, panelType) {
54829
+ handleSwitchMonthOrYear(switchType, panelType) {
54595
54830
  const {
54596
54831
  type,
54597
54832
  syncSwitchMonth
54598
54833
  } = this.getProps();
54834
+ const rangeType = this.isRangeType(type); // range type and syncSwitchMonth, we should change panels at same time
54599
54835
 
54600
- if (this.isRangeType(type) && syncSwitchMonth) {
54836
+ if (rangeType && syncSwitchMonth) {
54601
54837
  this.handleYearOrMonthChange(switchType, 'left', 1, true);
54602
54838
  this.handleYearOrMonthChange(switchType, 'right', 1, true);
54603
54839
  } else {
54604
54840
  this.handleYearOrMonthChange(switchType, panelType);
54841
+ /**
54842
+ * default behavior (v2.2.0)
54843
+ * In order to prevent the two panels from being the same month, this will confuse the user when selecting the range
54844
+ * https://github.com/DouyinFE/semi-design/issues/260
54845
+ */
54846
+
54847
+ if (rangeType) {
54848
+ const target = this.getTargetChangeDate({
54849
+ panelType,
54850
+ switchType
54851
+ });
54852
+ this.handleSyncChangeMonths({
54853
+ panelType,
54854
+ target
54855
+ });
54856
+ }
54605
54857
  }
54606
54858
  }
54607
54859
 
54608
54860
  prevMonth(panelType) {
54609
- this.handleSwitchMonth('prevMonth', panelType);
54861
+ this.handleSwitchMonthOrYear('prevMonth', panelType);
54610
54862
  }
54611
54863
 
54612
54864
  nextMonth(panelType) {
54613
- this.handleSwitchMonth('nextMonth', panelType);
54865
+ this.handleSwitchMonthOrYear('nextMonth', panelType);
54614
54866
  }
54615
54867
 
54616
54868
  prevYear(panelType) {
54617
- this.handleYearOrMonthChange('prevYear', panelType);
54869
+ this.handleSwitchMonthOrYear('prevYear', panelType);
54618
54870
  }
54619
54871
 
54620
54872
  nextYear(panelType) {
54621
- this.handleYearOrMonthChange('nextYear', panelType);
54873
+ this.handleSwitchMonthOrYear('nextYear', panelType);
54622
54874
  }
54623
54875
  /**
54624
54876
  * Calculate the year and month difference
@@ -55275,6 +55527,34 @@ class monthsGridFoundation_MonthsGridFoundation extends foundation {
55275
55527
  isYearPickerOpen: false
55276
55528
  });
55277
55529
  }
55530
+ /**
55531
+ * Get year and month panel open type
55532
+ *
55533
+ * It is useful info to set minHeight of weeks.
55534
+ * - When yam open type is 'left' or 'right', weeks minHeight should be set
55535
+ * If the minHeight is not set, the change of the number of weeks will cause the scrollList to be unstable
55536
+ */
55537
+
55538
+
55539
+ getYAMOpenType() {
55540
+ const {
55541
+ monthLeft,
55542
+ monthRight
55543
+ } = this._adapter.getStates();
55544
+
55545
+ const leftYearPickerOpen = monthLeft.isYearPickerOpen;
55546
+ const rightYearPickerOpen = monthRight.isYearPickerOpen;
55547
+
55548
+ if (leftYearPickerOpen && rightYearPickerOpen) {
55549
+ return 'both';
55550
+ } else if (leftYearPickerOpen) {
55551
+ return 'left';
55552
+ } else if (rightYearPickerOpen) {
55553
+ return 'right';
55554
+ } else {
55555
+ return 'none';
55556
+ }
55557
+ }
55278
55558
 
55279
55559
  }
55280
55560
  // CONCATENATED MODULE: ./datePicker/navigation.tsx
@@ -55300,6 +55580,8 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
55300
55580
  onMonthClick,
55301
55581
  onNextMonth,
55302
55582
  onPrevMonth,
55583
+ onPrevYear,
55584
+ onNextYear,
55303
55585
  density,
55304
55586
  shouldBimonthSwitch,
55305
55587
  panelType
@@ -55307,37 +55589,75 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
55307
55589
  const btnTheme = 'borderless';
55308
55590
  const iconBtnSize = density === 'compact' ? 'default' : 'large';
55309
55591
  const btnNoHorizontalPadding = true;
55310
- const buttonSize = density === 'compact' ? 'small' : 'default'; // Enable dual-panel synchronous switching, and the current panel is the left panel
55592
+ const buttonSize = density === 'compact' ? 'small' : 'default';
55593
+ const isLeftPanel = panelType === datePicker_constants_strings.PANEL_TYPE_LEFT;
55594
+ const isRightPanel = panelType === datePicker_constants_strings.PANEL_TYPE_RIGHT; // syncSwitchMonth and the current panel is the left
55595
+
55596
+ const hiddenLeftPanelRightButtons = shouldBimonthSwitch && isLeftPanel; // syncSwitchMonth and the current panel is the right
55597
+
55598
+ const hiddenRightPanelLeftButtons = shouldBimonthSwitch && isRightPanel; // `visibility: hidden` will keep the icon in position
55599
+
55600
+ const leftButtonStyle = {};
55601
+ const rightButtonStyle = {};
55311
55602
 
55312
- const bimonthSwitchWithLeftPanel = shouldBimonthSwitch && panelType === datePicker_constants_strings.PANEL_TYPE_LEFT; // Enable dual-panel synchronous switching, and the current panel is the right panel
55603
+ if (hiddenRightPanelLeftButtons) {
55604
+ leftButtonStyle.visibility = 'hidden';
55605
+ }
55606
+
55607
+ if (hiddenLeftPanelRightButtons) {
55608
+ rightButtonStyle.visibility = 'hidden';
55609
+ }
55313
55610
 
55314
- const bimonthSwitchWithRightPanel = shouldBimonthSwitch && panelType === datePicker_constants_strings.PANEL_TYPE_RIGHT;
55315
55611
  const ref = forwardRef || this.navRef;
55316
55612
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
55317
55613
  className: navigation_prefixCls,
55318
55614
  ref: ref
55319
- }, !bimonthSwitchWithRightPanel && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
55615
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
55616
+ key: "double-chevron-left",
55617
+ icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconDoubleChevronLeft, {
55618
+ size: iconBtnSize
55619
+ }),
55620
+ size: buttonSize,
55621
+ theme: btnTheme,
55622
+ noHorizontalPadding: btnNoHorizontalPadding,
55623
+ onClick: onPrevYear,
55624
+ style: leftButtonStyle
55625
+ }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
55626
+ key: "chevron-left",
55320
55627
  icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
55321
55628
  size: iconBtnSize
55322
55629
  }),
55323
55630
  size: buttonSize,
55324
55631
  onClick: onPrevMonth,
55325
55632
  theme: btnTheme,
55326
- noHorizontalPadding: btnNoHorizontalPadding
55633
+ noHorizontalPadding: btnNoHorizontalPadding,
55634
+ style: leftButtonStyle
55327
55635
  }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
55328
55636
  className: "".concat(navigation_prefixCls, "-month")
55329
55637
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(button_0, {
55330
55638
  onClick: onMonthClick,
55331
55639
  theme: btnTheme,
55332
55640
  size: buttonSize
55333
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", null, monthText))), !bimonthSwitchWithLeftPanel && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
55641
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", null, monthText))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
55642
+ key: "chevron-right",
55334
55643
  icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronRight, {
55335
55644
  size: iconBtnSize
55336
55645
  }),
55337
55646
  size: buttonSize,
55338
55647
  onClick: onNextMonth,
55339
55648
  theme: btnTheme,
55340
- noHorizontalPadding: btnNoHorizontalPadding
55649
+ noHorizontalPadding: btnNoHorizontalPadding,
55650
+ style: rightButtonStyle
55651
+ }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
55652
+ key: "double-chevron-right",
55653
+ icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconDoubleChevronRight, {
55654
+ size: iconBtnSize
55655
+ }),
55656
+ size: buttonSize,
55657
+ theme: btnTheme,
55658
+ noHorizontalPadding: btnNoHorizontalPadding,
55659
+ onClick: onNextYear,
55660
+ style: rightButtonStyle
55341
55661
  }));
55342
55662
  }
55343
55663
 
@@ -58024,6 +58344,10 @@ class monthsGrid_MonthsGrid extends baseComponent_BaseComponent {
58024
58344
  });
58025
58345
  };
58026
58346
 
58347
+ this.getYAMOpenType = () => {
58348
+ return this.foundation.getYAMOpenType();
58349
+ };
58350
+
58027
58351
  let nowDate = is_array_default()(props.defaultPickerValue) ? props.defaultPickerValue[0] : props.defaultPickerValue;
58028
58352
  const validFormat = props.format || getDefaultFormatTokenByType(props.type);
58029
58353
 
@@ -58515,9 +58839,11 @@ class monthsGrid_MonthsGrid extends baseComponent_BaseComponent {
58515
58839
  content = 'year month';
58516
58840
  }
58517
58841
 
58842
+ const yearOpenType = this.getYAMOpenType();
58518
58843
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
58519
58844
  className: monthGridCls,
58520
58845
  "x-type": type,
58846
+ "x-panel-yearandmonth-open-type": yearOpenType,
58521
58847
  ref: current => this.cacheRefCurrent('monthGrid', current)
58522
58848
  }, content);
58523
58849
  }
@@ -59465,7 +59791,7 @@ class descriptions_item_Item extends external_root_React_commonjs2_react_commonj
59465
59791
  className: "".concat(item_prefixCls, "-item")
59466
59792
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
59467
59793
  className: keyCls
59468
- }, "".concat(itemKey, ":")), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
59794
+ }, itemKey, ":"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
59469
59795
  className: valCls
59470
59796
  }, typeof children === 'function' ? children() : children))) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("tr", {
59471
59797
  className: className,
@@ -59587,6 +59913,25 @@ const empty_prefixCls = empty_constants_cssClasses.PREFIX;
59587
59913
  class empty_Empty extends baseComponent_BaseComponent {
59588
59914
  constructor(props) {
59589
59915
  super(props);
59916
+
59917
+ this.observe = mutationsList => {
59918
+ for (const mutation of mutationsList) {
59919
+ if (mutation.type === 'attributes' && mutation.attributeName === 'theme-mode') {
59920
+ this.updateMode();
59921
+ }
59922
+ }
59923
+ };
59924
+
59925
+ this.updateMode = () => {
59926
+ const val = this.body.getAttribute('theme-mode');
59927
+
59928
+ if (val !== this.state.mode) {
59929
+ this.setState({
59930
+ mode: val
59931
+ });
59932
+ }
59933
+ };
59934
+
59590
59935
  this.state = {
59591
59936
  mode: null
59592
59937
  };
@@ -59610,24 +59955,6 @@ class empty_Empty extends baseComponent_BaseComponent {
59610
59955
  this.observer && this.observer.disconnect();
59611
59956
  }
59612
59957
 
59613
- observe(mutationsList) {
59614
- for (const mutation of mutationsList) {
59615
- if (mutation.type === 'attributes' && mutation.attributeName === 'theme-mode') {
59616
- this.updateMode();
59617
- }
59618
- }
59619
- }
59620
-
59621
- updateMode() {
59622
- const val = this.body.getAttribute('theme-mode');
59623
-
59624
- if (val !== this.state.mode) {
59625
- this.setState({
59626
- mode: val
59627
- });
59628
- }
59629
- }
59630
-
59631
59958
  render() {
59632
59959
  var _context;
59633
59960
 
@@ -60752,8 +61079,8 @@ Modal_Modal.propTypes = {
60752
61079
  closable: prop_types_default.a.bool,
60753
61080
  centered: prop_types_default.a.bool,
60754
61081
  visible: prop_types_default.a.bool,
60755
- width: prop_types_default.a.number,
60756
- height: prop_types_default.a.number,
61082
+ width: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]),
61083
+ height: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.number]),
60757
61084
  confirmLoading: prop_types_default.a.bool,
60758
61085
  cancelLoading: prop_types_default.a.bool,
60759
61086
  okText: prop_types_default.a.string,
@@ -71464,17 +71791,20 @@ class foundation_SelectFoundation extends foundation {
71464
71791
  }
71465
71792
 
71466
71793
  _removeInternalKey(option) {
71467
- delete option._parentGroup;
71468
- delete option._show;
71469
- delete option._selected;
71470
- delete option._scrollIndex;
71794
+ // eslint-disable-next-line
71795
+ let newOption = assign_default()({}, option);
71796
+
71797
+ delete newOption._parentGroup;
71798
+ delete newOption._show;
71799
+ delete newOption._selected;
71800
+ delete newOption._scrollIndex;
71471
71801
 
71472
- if ('_keyInOptionList' in option) {
71473
- option.key = option._keyInOptionList;
71474
- delete option._keyInOptionList;
71802
+ if ('_keyInOptionList' in newOption) {
71803
+ newOption.key = newOption._keyInOptionList;
71804
+ delete newOption._keyInOptionList;
71475
71805
  }
71476
71806
 
71477
- return option;
71807
+ return newOption;
71478
71808
  }
71479
71809
 
71480
71810
  _notifySelect(value, option) {
@@ -72292,39 +72622,44 @@ class select_Select extends baseComponent_BaseComponent {
72292
72622
  const {
72293
72623
  size,
72294
72624
  multiple,
72295
- disabled
72625
+ disabled,
72626
+ inputProps
72296
72627
  } = this.props;
72628
+
72629
+ const inputPropsCls = get_default()(inputProps, 'className');
72630
+
72297
72631
  const inputcls = classnames_default()("".concat(select_prefixcls, "-input"), {
72298
72632
  ["".concat(select_prefixcls, "-input-single")]: !multiple,
72299
72633
  ["".concat(select_prefixcls, "-input-multiple")]: multiple
72300
- });
72634
+ }, inputPropsCls);
72301
72635
  const {
72302
72636
  inputValue
72303
72637
  } = this.state;
72304
- const inputProps = {
72638
+
72639
+ const selectInputProps = assign_default()({
72305
72640
  value: inputValue,
72306
72641
  disabled,
72307
72642
  className: inputcls,
72308
72643
  onChange: this.handleInputChange
72309
- };
72644
+ }, inputProps);
72645
+
72310
72646
  let style = {}; // Multiple choice mode
72311
72647
 
72312
72648
  if (multiple) {
72313
72649
  style = {
72314
72650
  width: inputValue ? "".concat(inputValue.length * 16, "px") : '2px'
72315
72651
  };
72316
- inputProps.style = style;
72652
+ selectInputProps.style = style;
72317
72653
  }
72318
72654
 
72319
72655
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(input_0, assign_default()({
72320
72656
  ref: this.inputRef,
72321
- size: size
72322
- }, inputProps, {
72657
+ size: size,
72323
72658
  onFocus: e => {
72324
72659
  // prevent event bubbling which will fire trigger onFocus event
72325
72660
  e.stopPropagation(); // e.nativeEvent.stopImmediatePropagation();
72326
72661
  }
72327
- }));
72662
+ }, selectInputProps));
72328
72663
  }
72329
72664
 
72330
72665
  close() {
@@ -72654,7 +72989,9 @@ class select_Select extends baseComponent_BaseComponent {
72654
72989
  key: value
72655
72990
  }), content);
72656
72991
  } else {
72657
- return content;
72992
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_["Fragment"], {
72993
+ key: value
72994
+ }, content);
72658
72995
  }
72659
72996
  });
72660
72997
 
@@ -72768,6 +73105,7 @@ class select_Select extends baseComponent_BaseComponent {
72768
73105
  multiple,
72769
73106
  filter,
72770
73107
  style,
73108
+ id,
72771
73109
  size,
72772
73110
  className,
72773
73111
  validateStatus,
@@ -72841,6 +73179,7 @@ class select_Select extends baseComponent_BaseComponent {
72841
73179
  ref: ref => this.triggerRef.current = ref,
72842
73180
  onClick: e => this.foundation.handleClick(e),
72843
73181
  style: style,
73182
+ id: id,
72844
73183
  tabIndex: tabIndex,
72845
73184
  onMouseEnter: this.onMouseEnter,
72846
73185
  onMouseLeave: this.onMouseLeave,
@@ -72926,6 +73265,7 @@ select_Select.propTypes = {
72926
73265
  dropdownStyle: prop_types_default.a.object,
72927
73266
  outerTopSlot: prop_types_default.a.node,
72928
73267
  innerTopSlot: prop_types_default.a.node,
73268
+ inputProps: prop_types_default.a.object,
72929
73269
  outerBottomSlot: prop_types_default.a.node,
72930
73270
  innerBottomSlot: prop_types_default.a.node,
72931
73271
  optionList: prop_types_default.a.array,
@@ -73033,6 +73373,7 @@ select_Select.defaultProps = {
73033
73373
 
73034
73374
 
73035
73375
 
73376
+
73036
73377
  const pagination_prefixCls = pagination_constants_cssClasses.PREFIX;
73037
73378
  const {
73038
73379
  Option: pagination_Option
@@ -73058,6 +73399,7 @@ class pagination_Pagination extends baseComponent_BaseComponent {
73058
73399
  this.foundation = new pagination_foundation(this.adapter);
73059
73400
  this.renderDefaultPage = bind_default()(_context = this.renderDefaultPage).call(_context, this);
73060
73401
  this.renderSmallPage = bind_default()(_context2 = this.renderSmallPage).call(_context2, this);
73402
+ Object(warning["a" /* default */])(Boolean(props.showSizeChanger && props.hideOnSinglePage), '[Semi Pagination] You should not use showSizeChanger and hideOnSinglePage in ths same time. At this time, hideOnSinglePage no longer takes effect, otherwise there may be a problem that the switch entry disappears');
73061
73403
  }
73062
73404
 
73063
73405
  get adapter() {
@@ -73351,7 +73693,8 @@ class pagination_Pagination extends baseComponent_BaseComponent {
73351
73693
  className,
73352
73694
  style,
73353
73695
  hideOnSinglePage,
73354
- hoverShowPageSelect
73696
+ hoverShowPageSelect,
73697
+ showSizeChanger
73355
73698
  } = this.props;
73356
73699
  const paginationCls = classnames_default()("".concat(pagination_prefixCls, "-small"), pagination_prefixCls, className);
73357
73700
  const {
@@ -73361,7 +73704,7 @@ class pagination_Pagination extends baseComponent_BaseComponent {
73361
73704
  } = this.state;
73362
73705
  const totalPageNum = Math.ceil(total / pageSize);
73363
73706
 
73364
- if (totalPageNum < 2 && hideOnSinglePage) {
73707
+ if (totalPageNum < 2 && hideOnSinglePage && !showSizeChanger) {
73365
73708
  return null;
73366
73709
  }
73367
73710
 
@@ -73390,13 +73733,14 @@ class pagination_Pagination extends baseComponent_BaseComponent {
73390
73733
  showTotal,
73391
73734
  className,
73392
73735
  style,
73393
- hideOnSinglePage
73736
+ hideOnSinglePage,
73737
+ showSizeChanger
73394
73738
  } = this.props;
73395
73739
  const paginationCls = classnames_default()(className, "".concat(pagination_prefixCls));
73396
73740
  const showTotalCls = "".concat(pagination_prefixCls, "-total");
73397
73741
  const totalPageNum = Math.ceil(total / pageSize);
73398
73742
 
73399
- if (totalPageNum < 2 && hideOnSinglePage) {
73743
+ if (totalPageNum < 2 && hideOnSinglePage && !showSizeChanger) {
73400
73744
  return null;
73401
73745
  }
73402
73746
 
@@ -74807,7 +75151,7 @@ class rating_item_Item extends external_root_React_commonjs2_react_commonjs_reac
74807
75151
  height: size,
74808
75152
  fontSize: size
74809
75153
  } : {};
74810
- const iconSize = size === 'small' ? 'default' : 'extra-large';
75154
+ const iconSize = isCustomSize ? 'inherit' : size === 'small' ? 'default' : 'extra-large';
74811
75155
  const content = character ? character : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconStar, {
74812
75156
  size: iconSize
74813
75157
  });
@@ -86761,6 +87105,7 @@ const timeline_constants_strings = {
86761
87105
 
86762
87106
 
86763
87107
 
87108
+
86764
87109
  const timeline_item_prefixCls = timeline_constants_cssClasses.ITEM;
86765
87110
  class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_react_["PureComponent"] {
86766
87111
  render() {
@@ -86774,7 +87119,8 @@ class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_re
86774
87119
  type,
86775
87120
  style,
86776
87121
  time,
86777
- extra
87122
+ extra,
87123
+ onClick
86778
87124
  } = this.props;
86779
87125
  const itemCls = classnames_default()(timeline_item_prefixCls, className);
86780
87126
  const dotCls = classnames_default()({
@@ -86789,16 +87135,17 @@ class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_re
86789
87135
  } : null;
86790
87136
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", {
86791
87137
  className: itemCls,
86792
- style: style
87138
+ style: style,
87139
+ onClick: onClick
86793
87140
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
86794
87141
  className: "".concat(timeline_item_prefixCls, "-tail")
86795
87142
  }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({
86796
87143
  className: dotCls
86797
87144
  }, dotStyle), dot), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
86798
87145
  className: "".concat(timeline_item_prefixCls, "-content")
86799
- }, children, extra ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
87146
+ }, children, extra && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
86800
87147
  className: "".concat(timeline_item_prefixCls, "-content-extra")
86801
- }, extra) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
87148
+ }, extra), time && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
86802
87149
  className: "".concat(timeline_item_prefixCls, "-content-time")
86803
87150
  }, time)));
86804
87151
  }
@@ -86806,17 +87153,19 @@ class timeline_item_Item extends external_root_React_commonjs2_react_commonjs_re
86806
87153
  }
86807
87154
  timeline_item_Item.propTypes = {
86808
87155
  color: prop_types_default.a.string,
86809
- time: prop_types_default.a.string,
87156
+ time: prop_types_default.a.node,
86810
87157
  type: prop_types_default.a.oneOf(timeline_constants_strings.ITEM_TYPE),
86811
87158
  dot: prop_types_default.a.node,
86812
87159
  extra: prop_types_default.a.node,
86813
87160
  position: prop_types_default.a.oneOf(timeline_constants_strings.ITEM_POS),
86814
87161
  className: prop_types_default.a.string,
86815
- style: prop_types_default.a.object
87162
+ style: prop_types_default.a.object,
87163
+ onClick: prop_types_default.a.func
86816
87164
  };
86817
87165
  timeline_item_Item.defaultProps = {
86818
87166
  type: 'default',
86819
- time: ''
87167
+ time: '',
87168
+ onClick: noop_default.a
86820
87169
  };
86821
87170
  // CONCATENATED MODULE: ./timeline/index.tsx
86822
87171
 
@@ -89937,8 +90286,6 @@ class treeNode_TreeNode extends external_root_React_commonjs2_react_commonjs_rea
89937
90286
  const {
89938
90287
  onNodeRightClick
89939
90288
  } = this.context;
89940
- e.stopPropagation();
89941
- e.nativeEvent.stopImmediatePropagation();
89942
90289
  onNodeRightClick(e, this.props);
89943
90290
  };
89944
90291
 
@@ -93968,6 +94315,113 @@ class foundation_UploadFoundation extends foundation {
93968
94315
  this.startUpload(currentFiles);
93969
94316
  }
93970
94317
  });
94318
+ } // 插入多个文件到指定位置
94319
+ // Insert files to the specified location
94320
+
94321
+
94322
+ insertFileToList(files, index) {
94323
+ const {
94324
+ limit,
94325
+ transformFile,
94326
+ accept,
94327
+ uploadTrigger
94328
+ } = this.getProps();
94329
+ const {
94330
+ fileList
94331
+ } = this.getStates();
94332
+ const unAcceptFileList = []; // 当次选中的文件
94333
+ // current selected file
94334
+
94335
+ let currentFileList = from_default()(files);
94336
+
94337
+ if (typeof accept !== 'undefined') {
94338
+ currentFileList = filter_default()(currentFileList).call(currentFileList, item => {
94339
+ const isValid = this.checkFileFormat(accept, item);
94340
+
94341
+ if (!isValid) {
94342
+ unAcceptFileList.push(item);
94343
+ }
94344
+
94345
+ return isValid;
94346
+ });
94347
+
94348
+ if (unAcceptFileList.length !== 0) {
94349
+ this._adapter.notifyAcceptInvalid(unAcceptFileList);
94350
+ }
94351
+
94352
+ if (currentFileList.length === 0) {
94353
+ return;
94354
+ }
94355
+ }
94356
+
94357
+ currentFileList = map_default()(currentFileList).call(currentFileList, file => {
94358
+ if (!file.uid) {
94359
+ file.uid = getUuidv4();
94360
+ }
94361
+
94362
+ if (this.checkFileSize(file)) {
94363
+ file._sizeInvalid = true;
94364
+ file.status = FILE_STATUS_VALID_FAIL;
94365
+
94366
+ this._adapter.notifySizeError(file, fileList);
94367
+ }
94368
+
94369
+ if (transformFile) {
94370
+ file = transformFile(file);
94371
+ }
94372
+
94373
+ return file;
94374
+ });
94375
+ const total = fileList.length + currentFileList.length;
94376
+
94377
+ if (typeof limit !== 'undefined') {
94378
+ // 判断是否超出限制
94379
+ // Determine whether the limit is exceeded
94380
+ if (total > limit) {
94381
+ if (limit === 1) {
94382
+ // 使用最后面的文件对当前文件进行替换
94383
+ // Use the last file to replace the current file
94384
+ currentFileList = slice_default()(currentFileList).call(currentFileList, -1);
94385
+
94386
+ this._adapter.notifyFileSelect(currentFileList);
94387
+
94388
+ this._adapter.resetInput();
94389
+
94390
+ this.replaceFileList(currentFileList);
94391
+ return;
94392
+ } // 如果超出了限制,则计算还能添加几个文件,将剩余的文件继续上传
94393
+ // If the limit is exceeded, several files can be added to the calculation, and the remaining files will continue to be uploaded
94394
+
94395
+
94396
+ const restNum = limit - fileList.length;
94397
+ currentFileList = slice_default()(currentFileList).call(currentFileList, 0, restNum);
94398
+
94399
+ this._adapter.notifyExceed(currentFileList);
94400
+ }
94401
+ }
94402
+
94403
+ const fileItemList = map_default()(currentFileList).call(currentFileList, file => this.buildFileItem(file, uploadTrigger));
94404
+
94405
+ const newFileList = slice_default()(fileList).call(fileList);
94406
+
94407
+ if (typeof index !== 'undefined') {
94408
+ splice_default()(newFileList).call(newFileList, index, 0, ...fileItemList);
94409
+ } else {
94410
+ newFileList.push(...fileItemList);
94411
+ }
94412
+
94413
+ this._adapter.notifyFileSelect(currentFileList);
94414
+
94415
+ this._adapter.notifyChange({
94416
+ fileList: newFileList,
94417
+ currentFile: null
94418
+ });
94419
+
94420
+ this._adapter.updateFileList(newFileList, () => {
94421
+ if (uploadTrigger === foundation_TRIGGER_AUTO) {
94422
+ this.startUpload(fileItemList);
94423
+ }
94424
+ });
93971
94425
  }
93972
94426
 
93973
94427
  manualUpload() {
@@ -94837,16 +95291,23 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
94837
95291
  status,
94838
95292
  disabled,
94839
95293
  style,
94840
- onPreviewClick
95294
+ onPreviewClick,
95295
+ showPicInfo,
95296
+ renderPicInfo,
95297
+ renderThumbnail,
95298
+ name,
95299
+ index
94841
95300
  } = this.props;
95301
+ const showProgress = status === upload_constants_strings.FILE_STATUS_UPLOADING && percent !== 100;
95302
+ const showRetry = status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL && this.props.showRetry;
95303
+ const showReplace = status === upload_constants_strings.FILE_STATUS_SUCCESS && this.props.showReplace;
94842
95304
  const filePicCardCls = classnames_default()({
94843
95305
  ["".concat(fileCard_prefixCls, "-picture-file-card")]: true,
94844
95306
  ["".concat(fileCard_prefixCls, "-picture-file-card-disabled")]: disabled,
94845
- ["".concat(fileCard_prefixCls, "-picture-file-card-show-pointer")]: typeof onPreviewClick !== 'undefined'
95307
+ ["".concat(fileCard_prefixCls, "-picture-file-card-show-pointer")]: typeof onPreviewClick !== 'undefined',
95308
+ ["".concat(fileCard_prefixCls, "-picture-file-card-error")]: status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL,
95309
+ ["".concat(fileCard_prefixCls, "-picture-file-card-uploading")]: showProgress
94846
95310
  });
94847
- const showProgress = status === upload_constants_strings.FILE_STATUS_UPLOADING && percent !== 100;
94848
- const showRetry = status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL && this.props.showRetry;
94849
- const showReplace = status === upload_constants_strings.FILE_STATUS_SUCCESS && this.props.showReplace;
94850
95311
  const closeCls = "".concat(fileCard_prefixCls, "-picture-file-card-close");
94851
95312
  const retry = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
94852
95313
  className: "".concat(fileCard_prefixCls, "-picture-file-card-retry"),
@@ -94866,47 +95327,38 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
94866
95327
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(ReplaceSvg, {
94867
95328
  className: "".concat(fileCard_prefixCls, "-picture-file-card-icon-replace")
94868
95329
  })));
95330
+ const picInfo = typeof renderPicInfo === 'function' ? renderPicInfo(this.props) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
95331
+ className: "".concat(fileCard_prefixCls, "-picture-file-card-pic-info")
95332
+ }, index + 1);
95333
+ const thumbnail = typeof renderThumbnail === 'function' ? renderThumbnail(this.props) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("img", {
95334
+ src: url,
95335
+ alt: "picture of ".concat(name)
95336
+ });
94869
95337
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
94870
95338
  className: filePicCardCls,
94871
95339
  style: style,
94872
95340
  onClick: onPreviewClick
94873
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("img", {
94874
- src: url
94875
- }), showProgress ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(progress_0, {
95341
+ }, thumbnail, showProgress ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(progress_0, {
94876
95342
  percent: percent,
94877
95343
  type: "circle",
94878
95344
  size: "small",
94879
95345
  orbitStroke: '#FFF'
94880
- }) : null, showRetry ? retry : null, showReplace && replace, disabled ? null : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
94881
- className: closeCls,
94882
- onClick: e => this.onRemove(e)
95346
+ }) : null, showRetry ? retry : null, showReplace && replace, showPicInfo && picInfo, !disabled && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
95347
+ className: closeCls
94883
95348
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, {
94884
- size: "extra-small"
95349
+ size: "extra-small",
95350
+ onClick: e => this.onRemove(e)
94885
95351
  })), this.renderPicValidateMsg());
94886
95352
  }
94887
95353
 
94888
- onRemove(e) {
94889
- e.stopPropagation();
94890
- this.props.onRemove(this.props, e);
94891
- }
94892
-
94893
- onReplace(e) {
94894
- e.stopPropagation();
94895
- this.props.onReplace(this.props, e);
94896
- }
94897
-
94898
- onRetry(e) {
94899
- e.stopPropagation();
94900
- this.props.onRetry(this.props, e);
94901
- }
94902
-
94903
- render() {
95354
+ renderFile(locale) {
94904
95355
  const {
94905
95356
  name,
94906
95357
  size,
94907
95358
  percent,
94908
95359
  url,
94909
- listType,
95360
+ showRetry: propsShowRetry,
95361
+ showReplace: propsShowReplace,
94910
95362
  preview,
94911
95363
  previewFile,
94912
95364
  status,
@@ -94927,15 +95379,8 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
94927
95379
  const replaceCls = "".concat(fileCard_prefixCls, "-file-card-replace");
94928
95380
  const showProgress = !(percent === 100 || typeof percent === 'undefined') && status === upload_constants_strings.FILE_STATUS_UPLOADING; // only show retry when upload fail & showRetry is true, no need to show during validate fail
94929
95381
 
94930
- const showRetry = status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL && this.props.showRetry;
94931
- const showReplace = status === upload_constants_strings.FILE_STATUS_SUCCESS && this.props.showReplace;
94932
-
94933
- if (listType === upload_constants_strings.FILE_LIST_PIC) {
94934
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
94935
- componentName: "Upload"
94936
- }, locale => this.renderPic(locale));
94937
- }
94938
-
95382
+ const showRetry = status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL && propsShowRetry;
95383
+ const showReplace = status === upload_constants_strings.FILE_STATUS_SUCCESS && propsShowReplace;
94939
95384
  const fileSize = this.transSize(size);
94940
95385
  let previewContent = preview ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("img", {
94941
95386
  src: url
@@ -94947,9 +95392,7 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
94947
95392
  previewContent = previewFile(this.props);
94948
95393
  }
94949
95394
 
94950
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
94951
- componentName: "Upload"
94952
- }, locale => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
95395
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
94953
95396
  className: fileCardCls,
94954
95397
  style: style,
94955
95398
  onClick: onPreviewClick
@@ -94994,7 +95437,42 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
94994
95437
  theme: "borderless",
94995
95438
  size: "small",
94996
95439
  className: closeCls
94997
- })));
95440
+ }));
95441
+ }
95442
+
95443
+ onRemove(e) {
95444
+ e.stopPropagation();
95445
+ this.props.onRemove(this.props, e);
95446
+ }
95447
+
95448
+ onReplace(e) {
95449
+ e.stopPropagation();
95450
+ this.props.onReplace(this.props, e);
95451
+ }
95452
+
95453
+ onRetry(e) {
95454
+ e.stopPropagation();
95455
+ this.props.onRetry(this.props, e);
95456
+ }
95457
+
95458
+ render() {
95459
+ const {
95460
+ listType
95461
+ } = this.props;
95462
+
95463
+ if (listType === upload_constants_strings.FILE_LIST_PIC) {
95464
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
95465
+ componentName: "Upload"
95466
+ }, locale => this.renderPic(locale));
95467
+ }
95468
+
95469
+ if (listType === upload_constants_strings.FILE_LIST_DEFAULT) {
95470
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
95471
+ componentName: "Upload"
95472
+ }, locale => this.renderFile(locale));
95473
+ }
95474
+
95475
+ return null;
94998
95476
  }
94999
95477
 
95000
95478
  }
@@ -95017,7 +95495,8 @@ fileCard_FileCard.propTypes = {
95017
95495
  status: prop_types_default.a.string,
95018
95496
  style: prop_types_default.a.object,
95019
95497
  url: prop_types_default.a.string,
95020
- validateMessage: prop_types_default.a.node
95498
+ validateMessage: prop_types_default.a.node,
95499
+ index: prop_types_default.a.number
95021
95500
  };
95022
95501
  fileCard_FileCard.defaultProps = {
95023
95502
  listType: upload_constants_strings.FILE_LIST_DEFAULT,
@@ -95108,6 +95587,23 @@ class upload_Upload extends baseComponent_BaseComponent {
95108
95587
  this.remove = fileItem => {
95109
95588
  this.foundation.handleRemove(fileItem);
95110
95589
  };
95590
+ /**
95591
+ * ref method
95592
+ * insert files at index
95593
+ * @param files Array<CustomFile>
95594
+ * @param index number
95595
+ * @returns
95596
+ */
95597
+
95598
+
95599
+ this.insert = (files, index) => {
95600
+ return this.foundation.insertFileToList(files, index);
95601
+ };
95602
+ /**
95603
+ * ref method
95604
+ * manual upload by user
95605
+ */
95606
+
95111
95607
 
95112
95608
  this.upload = () => {
95113
95609
  const {
@@ -95123,14 +95619,18 @@ class upload_Upload extends baseComponent_BaseComponent {
95123
95619
  name,
95124
95620
  status,
95125
95621
  validateMessage,
95126
- _sizeInvalid
95622
+ _sizeInvalid,
95623
+ uid
95127
95624
  } = file;
95128
95625
  const {
95129
95626
  previewFile,
95130
95627
  listType,
95131
95628
  itemStyle,
95132
95629
  showRetry,
95630
+ showPicInfo,
95631
+ renderPicInfo,
95133
95632
  renderFileItem,
95633
+ renderThumbnail,
95134
95634
  disabled,
95135
95635
  onPreviewClick,
95136
95636
  showReplace
@@ -95151,10 +95651,14 @@ class upload_Upload extends baseComponent_BaseComponent {
95151
95651
  listType,
95152
95652
  onRemove,
95153
95653
  onRetry,
95154
- key: concat_default()(_context = "".concat(name)).call(_context, index),
95654
+ index,
95655
+ key: uid || concat_default()(_context = "".concat(name)).call(_context, index),
95155
95656
  showRetry: typeof file.showRetry !== 'undefined' ? file.showRetry : showRetry,
95156
95657
  style: itemStyle,
95157
95658
  disabled,
95659
+ showPicInfo,
95660
+ renderPicInfo,
95661
+ renderThumbnail,
95158
95662
  showReplace: typeof file.showReplace !== 'undefined' ? file.showReplace : showReplace,
95159
95663
  onReplace,
95160
95664
  onPreviewClick: typeof onPreviewClick !== 'undefined' ? () => this.foundation.handlePreviewClick(file) : undefined
@@ -95176,27 +95680,69 @@ class upload_Upload extends baseComponent_BaseComponent {
95176
95680
  };
95177
95681
 
95178
95682
  this.renderFileList = () => {
95683
+ const {
95684
+ listType
95685
+ } = this.props;
95686
+
95687
+ if (listType === upload_constants_strings.FILE_LIST_PIC) {
95688
+ return this.renderFileListPic();
95689
+ }
95690
+
95691
+ if (listType === upload_constants_strings.FILE_LIST_DEFAULT) {
95692
+ return this.renderFileListDefault();
95693
+ }
95694
+
95695
+ return null;
95696
+ };
95697
+
95698
+ this.renderFileListPic = () => {
95179
95699
  const {
95180
95700
  showUploadList,
95181
- listType,
95182
95701
  limit,
95183
95702
  disabled,
95184
- children
95703
+ children,
95704
+ draggable
95185
95705
  } = this.props;
95186
95706
  const {
95187
- fileList: stateFileList
95707
+ fileList: stateFileList,
95708
+ dragAreaStatus
95188
95709
  } = this.state;
95189
95710
  const fileList = this.props.fileList || stateFileList;
95190
- const isPicType = listType === upload_constants_strings.FILE_LIST_PIC;
95191
- const showAddTriggerInList = isPicType && (limit ? limit > fileList.length : true);
95711
+ const showAddTriggerInList = limit ? limit > fileList.length : true;
95712
+ const dragAreaBaseCls = "".concat(upload_prefixCls, "-drag-area");
95192
95713
  const uploadAddCls = classnames_default()("".concat(upload_prefixCls, "-add"), {
95193
- ["".concat(upload_prefixCls, "-picture-add")]: isPicType,
95714
+ ["".concat(upload_prefixCls, "-picture-add")]: true,
95194
95715
  ["".concat(upload_prefixCls, "-picture-add-disabled")]: disabled
95195
95716
  });
95196
- const addContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
95717
+ const fileListCls = classnames_default()("".concat(upload_prefixCls, "-file-list"), {
95718
+ ["".concat(upload_prefixCls, "-picture-file-list")]: true
95719
+ });
95720
+ const dragAreaCls = classnames_default()({
95721
+ ["".concat(dragAreaBaseCls, "-legal")]: dragAreaStatus === upload_constants_strings.DRAG_AREA_LEGAL,
95722
+ ["".concat(dragAreaBaseCls, "-illegal")]: dragAreaStatus === upload_constants_strings.DRAG_AREA_ILLEGAL
95723
+ });
95724
+ const mainCls = "".concat(upload_prefixCls, "-file-list-main");
95725
+ const addContentProps = {
95197
95726
  className: uploadAddCls,
95198
95727
  onClick: this.onClick
95199
- }, children);
95728
+ };
95729
+ const containerProps = {
95730
+ className: fileListCls
95731
+ };
95732
+ const draggableProps = {
95733
+ onDrop: this.onDrop,
95734
+ onDragOver: this.onDragOver,
95735
+ onDragLeave: this.onDragLeave,
95736
+ onDragEnter: this.onDragEnter
95737
+ };
95738
+
95739
+ if (draggable) {
95740
+ assign_default()(addContentProps, draggableProps, {
95741
+ className: classnames_default()(uploadAddCls, dragAreaCls)
95742
+ });
95743
+ }
95744
+
95745
+ const addContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({}, addContentProps), children);
95200
95746
 
95201
95747
  if (!showUploadList || !fileList.length) {
95202
95748
  if (showAddTriggerInList) {
@@ -95206,18 +95752,39 @@ class upload_Upload extends baseComponent_BaseComponent {
95206
95752
  return null;
95207
95753
  }
95208
95754
 
95209
- const fileListCls = classnames_default()("".concat(upload_prefixCls, "-file-list"), {
95210
- ["".concat(upload_prefixCls, "-picture-file-list")]: isPicType
95211
- });
95755
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
95756
+ componentName: "Upload"
95757
+ }, locale => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({}, containerProps), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
95758
+ className: mainCls
95759
+ }, map_default()(fileList).call(fileList, (file, index) => this.renderFile(file, index, locale)), showAddTriggerInList ? addContent : null)));
95760
+ };
95761
+
95762
+ this.renderFileListDefault = () => {
95763
+ const {
95764
+ showUploadList,
95765
+ limit,
95766
+ disabled
95767
+ } = this.props;
95768
+ const {
95769
+ fileList: stateFileList
95770
+ } = this.state;
95771
+ const fileList = this.props.fileList || stateFileList;
95772
+ const fileListCls = classnames_default()("".concat(upload_prefixCls, "-file-list"));
95212
95773
  const titleCls = "".concat(upload_prefixCls, "-file-list-title");
95213
95774
  const mainCls = "".concat(upload_prefixCls, "-file-list-main");
95214
- const showTitle = limit !== 1 && fileList.length && listType !== upload_constants_strings.FILE_LIST_PIC;
95775
+ const showTitle = limit !== 1 && fileList.length;
95215
95776
  const showClear = this.props.showClear && !disabled;
95777
+ const containerProps = {
95778
+ className: fileListCls
95779
+ };
95780
+
95781
+ if (!showUploadList || !fileList.length) {
95782
+ return null;
95783
+ }
95784
+
95216
95785
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
95217
95786
  componentName: "Upload"
95218
- }, locale => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
95219
- className: fileListCls
95220
- }, showTitle ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
95787
+ }, locale => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({}, containerProps), showTitle ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
95221
95788
  className: titleCls
95222
95789
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
95223
95790
  className: "".concat(titleCls, "-choosen")
@@ -95226,7 +95793,7 @@ class upload_Upload extends baseComponent_BaseComponent {
95226
95793
  className: "".concat(titleCls, "-clear")
95227
95794
  }, locale.clear) : null) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
95228
95795
  className: mainCls
95229
- }, map_default()(fileList).call(fileList, (file, index) => this.renderFile(file, index, locale)), showAddTriggerInList ? addContent : null)));
95796
+ }, map_default()(fileList).call(fileList, (file, index) => this.renderFile(file, index, locale)))));
95230
95797
  };
95231
95798
 
95232
95799
  this.onDrop = e => {
@@ -95246,6 +95813,28 @@ class upload_Upload extends baseComponent_BaseComponent {
95246
95813
  this.foundation.handleDragEnter(e);
95247
95814
  };
95248
95815
 
95816
+ this.renderAddContent = () => {
95817
+ const {
95818
+ draggable,
95819
+ children,
95820
+ listType
95821
+ } = this.props;
95822
+ const uploadAddCls = classnames_default()("".concat(upload_prefixCls, "-add"));
95823
+
95824
+ if (listType === upload_constants_strings.FILE_LIST_PIC) {
95825
+ return null;
95826
+ }
95827
+
95828
+ if (draggable) {
95829
+ return this.renderDragArea();
95830
+ }
95831
+
95832
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
95833
+ className: uploadAddCls,
95834
+ onClick: this.onClick
95835
+ }, children);
95836
+ };
95837
+
95249
95838
  this.renderDragArea = () => {
95250
95839
  const {
95251
95840
  dragAreaStatus
@@ -95432,7 +96021,6 @@ class upload_Upload extends baseComponent_BaseComponent {
95432
96021
  ["".concat(upload_prefixCls, "-warning")]: validateStatus === 'warning',
95433
96022
  ["".concat(upload_prefixCls, "-success")]: validateStatus === 'success'
95434
96023
  }, className);
95435
- const uploadAddCls = classnames_default()("".concat(upload_prefixCls, "-add"));
95436
96024
  const inputCls = classnames_default()("".concat(upload_prefixCls, "-hidden-input"));
95437
96025
  const inputReplaceCls = classnames_default()("".concat(upload_prefixCls, "-hidden-input-replace"));
95438
96026
  const promptCls = classnames_default()("".concat(upload_prefixCls, "-prompt"));
@@ -95441,10 +96029,6 @@ class upload_Upload extends baseComponent_BaseComponent {
95441
96029
  directory: 'directory',
95442
96030
  webkitdirectory: 'webkitdirectory'
95443
96031
  } : {};
95444
- const addContent = listType !== upload_constants_strings.FILE_LIST_PIC ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
95445
- className: uploadAddCls,
95446
- onClick: this.onClick
95447
- }, children) : null;
95448
96032
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
95449
96033
  className: uploadCls,
95450
96034
  style: style,
@@ -95470,7 +96054,7 @@ class upload_Upload extends baseComponent_BaseComponent {
95470
96054
  tabIndex: -1,
95471
96055
  className: inputReplaceCls,
95472
96056
  ref: this.replaceInputRef
95473
- }), draggable ? this.renderDragArea() : addContent, prompt ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
96057
+ }), this.renderAddContent(), prompt ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
95474
96058
  className: promptCls
95475
96059
  }, prompt) : null, validateMessage ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
95476
96060
  className: validateMsgCls
@@ -95525,7 +96109,10 @@ upload_Upload.propTypes = {
95525
96109
  prompt: prop_types_default.a.node,
95526
96110
  promptPosition: prop_types_default.a.oneOf(upload_constants_strings.PROMPT_POSITION),
95527
96111
  renderFileItem: prop_types_default.a.func,
96112
+ renderPicInfo: prop_types_default.a.func,
96113
+ renderThumbnail: prop_types_default.a.func,
95528
96114
  showClear: prop_types_default.a.bool,
96115
+ showPicInfo: prop_types_default.a.bool,
95529
96116
  showReplace: prop_types_default.a.bool,
95530
96117
  showRetry: prop_types_default.a.bool,
95531
96118
  showUploadList: prop_types_default.a.bool,
@@ -95559,6 +96146,7 @@ upload_Upload.defaultProps = {
95559
96146
  onSuccess: noop_default.a,
95560
96147
  promptPosition: 'right',
95561
96148
  showClear: true,
96149
+ showPicInfo: false,
95562
96150
  showReplace: false,
95563
96151
  showRetry: true,
95564
96152
  showUploadList: true,
@@ -95688,6 +96276,9 @@ function _defineProperties(target, props) {
95688
96276
  function _createClass(Constructor, protoProps, staticProps) {
95689
96277
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
95690
96278
  if (staticProps) _defineProperties(Constructor, staticProps);
96279
+ Object.defineProperty(Constructor, "prototype", {
96280
+ writable: false
96281
+ });
95691
96282
  return Constructor;
95692
96283
  }
95693
96284
  // EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/@babel/runtime/helpers/typeof.js
@@ -95720,12 +96311,15 @@ function _inherits(subClass, superClass) {
95720
96311
  throw new TypeError("Super expression must either be null or a function");
95721
96312
  }
95722
96313
 
95723
- subClass.prototype = Object.create(superClass && superClass.prototype, {
95724
- constructor: {
95725
- value: subClass,
95726
- writable: true,
95727
- configurable: true
95728
- }
96314
+ Object.defineProperty(subClass, "prototype", {
96315
+ value: Object.create(superClass && superClass.prototype, {
96316
+ constructor: {
96317
+ value: subClass,
96318
+ writable: true,
96319
+ configurable: true
96320
+ }
96321
+ }),
96322
+ writable: false
95729
96323
  });
95730
96324
  if (superClass) _setPrototypeOf(subClass, superClass);
95731
96325
  }
@@ -99980,7 +100574,9 @@ function withField(Component, opts) {
99980
100574
  // Return without injection, eg: <Checkbox> / <Radio> inside CheckboxGroup/RadioGroup
99981
100575
 
99982
100576
  if (!shouldInject) {
99983
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Component, assign_default()({}, rest));
100577
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Component, assign_default()({}, rest, {
100578
+ ref: ref
100579
+ }));
99984
100580
  } // grab formState from context
99985
100581
 
99986
100582
 
@@ -103009,7 +103605,7 @@ exports.f = wellKnownSymbol;
103009
103605
  // TODO: remove from `core-js@4`
103010
103606
  __webpack_require__("/E8B");
103011
103607
 
103012
- var parent = __webpack_require__("vut1");
103608
+ var parent = __webpack_require__("HR5x");
103013
103609
 
103014
103610
  module.exports = parent;
103015
103611