@douyinfe/semi-ui 2.50.1 → 2.51.0

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.
@@ -25343,7 +25343,7 @@ class AutoCompleteFoundation extends foundation {
25343
25343
  let renderSelectedItem = this._getRenderSelectedItem();
25344
25344
  const options = this._generateList(data);
25345
25345
  // Get the option whose value match from options
25346
- let selectedOption = options.filter(option => renderSelectedItem(option) === selectedValue);
25346
+ let selectedOption = options.length ? options.filter(option => renderSelectedItem(option) === selectedValue) : [];
25347
25347
  const canMatchInData = selectedOption.length;
25348
25348
  const selectedOptionIndex = options.findIndex(option => renderSelectedItem(option) === selectedValue);
25349
25349
  let inputValue = '';
@@ -25373,9 +25373,12 @@ class AutoCompleteFoundation extends foundation {
25373
25373
  data,
25374
25374
  defaultActiveFirstOption
25375
25375
  } = this.getProps();
25376
- let renderSelectedItem = this._getRenderSelectedItem();
25377
- const options = this._generateList(data);
25378
- const selectedOptionIndex = options.findIndex(option => renderSelectedItem(option) === searchValue);
25376
+ let selectedOptionIndex = -1;
25377
+ if (searchValue) {
25378
+ let renderSelectedItem = this._getRenderSelectedItem();
25379
+ const options = this._generateList(data);
25380
+ selectedOptionIndex = options.findIndex(option => renderSelectedItem(option) === searchValue);
25381
+ }
25379
25382
  if (selectedOptionIndex === -1 && defaultActiveFirstOption) {
25380
25383
  if (focusIndex !== 0) {
25381
25384
  this._adapter.updateFocusIndex(0);
@@ -25397,7 +25400,9 @@ class AutoCompleteFoundation extends foundation {
25397
25400
  renderSelectedItem
25398
25401
  } = this.getProps();
25399
25402
  if (typeof renderSelectedItem === 'undefined') {
25400
- renderSelectedItem = option => option.value;
25403
+ renderSelectedItem = option => {
25404
+ return option === null || option === void 0 ? void 0 : option.value;
25405
+ };
25401
25406
  } else if (renderSelectedItem && typeof renderSelectedItem === 'function') {
25402
25407
  // do nothing
25403
25408
  }
@@ -36284,9 +36289,6 @@ Carousel.defaultProps = {
36284
36289
  trigger: 'click'
36285
36290
  };
36286
36291
  /* harmony default export */ const carousel_0 = (Carousel);
36287
- // EXTERNAL MODULE: ../../node_modules/lodash/flatten.js
36288
- var lodash_flatten = __webpack_require__("1xil");
36289
- var flatten_default = /*#__PURE__*/__webpack_require__.n(lodash_flatten);
36290
36292
  // EXTERNAL MODULE: ../../node_modules/lodash/isSet.js
36291
36293
  var isSet = __webpack_require__("/iLo");
36292
36294
  var isSet_default = /*#__PURE__*/__webpack_require__.n(isSet);
@@ -36964,11 +36966,11 @@ const cascader_constants_strings = {
36964
36966
  };
36965
36967
  const cascader_constants_numbers = {};
36966
36968
 
36969
+ const constants_VALUE_SPLIT = '_SEMI_CASCADER_SPLIT_';
36967
36970
  ;// CONCATENATED MODULE: ../semi-foundation/cascader/util.ts
36968
36971
 
36969
36972
 
36970
36973
 
36971
-
36972
36974
  function util_getPosition(level, index) {
36973
36975
  return `${level}-${index}`;
36974
36976
  }
@@ -36991,7 +36993,7 @@ function util_traverseDataNodes(treeNodes, callback) {
36991
36993
  let item = null;
36992
36994
  // Process node if is not root
36993
36995
  if (node) {
36994
- const key = parent ? util_getPosition(parent.key, ind) : `${ind}`;
36996
+ const key = parent ? `${parent.key}${constants_VALUE_SPLIT}${node.value}` : node.value;
36995
36997
  item = {
36996
36998
  data: Object.assign({}, node),
36997
36999
  ind,
@@ -37012,6 +37014,22 @@ function util_traverseDataNodes(treeNodes, callback) {
37012
37014
  };
37013
37015
  processNode(null);
37014
37016
  }
37017
+ function getKeysByValuePath(valuePath) {
37018
+ if (valuePath === null || valuePath === void 0 ? void 0 : valuePath.length) {
37019
+ if (Array.isArray(valuePath[0])) {
37020
+ return valuePath.map(item => getKeyByValuePath(item));
37021
+ } else {
37022
+ return [getKeyByValuePath(valuePath)];
37023
+ }
37024
+ }
37025
+ return [];
37026
+ }
37027
+ function getKeyByValuePath(valuePath) {
37028
+ return valuePath.join(constants_VALUE_SPLIT);
37029
+ }
37030
+ function getValuePathByKey(key) {
37031
+ return key.split(VALUE_SPLIT);
37032
+ }
37015
37033
  function util_convertDataToEntities(dataNodes) {
37016
37034
  const keyEntities = {};
37017
37035
  util_traverseDataNodes(dataNodes, data => {
@@ -37030,11 +37048,6 @@ function util_convertDataToEntities(dataNodes) {
37030
37048
  });
37031
37049
  return keyEntities;
37032
37050
  }
37033
- function util_findKeysForValues(value, keyEntities) {
37034
- const valuePath = util_normalizedArr(value);
37035
- const res = Object.values(keyEntities).filter(item => isEqual_default()(item.valuePath, valuePath)).map(item => item.key);
37036
- return res;
37037
- }
37038
37051
  function calcMergeType(autoMergeValue, leafOnly) {
37039
37052
  let mergeType;
37040
37053
  if (leafOnly) {
@@ -37062,6 +37075,7 @@ function calcMergeType(autoMergeValue, leafOnly) {
37062
37075
 
37063
37076
 
37064
37077
 
37078
+
37065
37079
  class CascaderFoundation extends foundation {
37066
37080
  constructor(adapter) {
37067
37081
  super(Object.assign({}, adapter));
@@ -37269,12 +37283,13 @@ class CascaderFoundation extends foundation {
37269
37283
  const loadingKeys = this._adapter.getLoadingKeyRefValue();
37270
37284
  const filterable = this._isFilterable();
37271
37285
  const loadingActive = [...activeKeys].filter(i => loadingKeys.has(i));
37272
- const valuePath = onChangeWithObject ? util_normalizedArr(value).map(i => i.value) : util_normalizedArr(value);
37273
- const selectedKeys = util_findKeysForValues(valuePath, keyEntities);
37286
+ const normalizedValue = util_normalizedArr(value);
37287
+ const valuePath = onChangeWithObject && isObject_default()(normalizedValue[0]) ? normalizedValue.map(i => i.value) : normalizedValue;
37288
+ const selectedKeys = getKeysByValuePath(valuePath);
37274
37289
  let updateStates = {};
37275
- if (selectedKeys.length) {
37276
- const selectedKey = selectedKeys[0];
37277
- const selectedItem = keyEntities[selectedKey];
37290
+ const selectedKey = selectedKeys.length > 0 ? selectedKeys[0] : undefined;
37291
+ const selectedItem = selectedKey ? keyEntities[selectedKey] : undefined;
37292
+ if (selectedItem) {
37278
37293
  /**
37279
37294
  * When changeOnSelect is turned on, or the target option is a leaf option,
37280
37295
  * the option is considered to be selected, even if the option is disabled
@@ -37734,10 +37749,9 @@ class CascaderFoundation extends foundation {
37734
37749
  } = this.getStates();
37735
37750
  const values = [];
37736
37751
  keys.forEach(key => {
37737
- if (!isEmpty_default()(keyEntities) && !isEmpty_default()(keyEntities[key])) {
37738
- const valueItem = keyEntities[key].data.value;
37739
- values.push(valueItem);
37740
- }
37752
+ var _a, _b;
37753
+ const valueItem = (_b = (_a = keyEntities[key]) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.value;
37754
+ valueItem !== undefined && values.push(valueItem);
37741
37755
  });
37742
37756
  const formatValue = values.length === 1 ? values[0] : values;
37743
37757
  this._adapter.notifySelect(formatValue);
@@ -47584,7 +47598,7 @@ class Cascader extends BaseComponent {
47584
47598
  } = this.state;
47585
47599
  this.handleTagRemove(null, keyEntities[key].valuePath);
47586
47600
  };
47587
- this.renderTagItem = (value, idx, type) => {
47601
+ this.renderTagItem = (nodeKey, idx) => {
47588
47602
  const {
47589
47603
  keyEntities,
47590
47604
  disabledKeys
@@ -47596,9 +47610,8 @@ class Cascader extends BaseComponent {
47596
47610
  displayRender,
47597
47611
  disableStrictly
47598
47612
  } = this.props;
47599
- const nodeKey = type === cascader_constants_strings.IS_VALUE ? util_findKeysForValues(value, keyEntities)[0] : value;
47600
47613
  const isDsiabled = disabled || keyEntities[nodeKey].data.disabled || disableStrictly && disabledKeys.has(nodeKey);
47601
- if (!isEmpty_default()(keyEntities) && !isEmpty_default()(keyEntities[nodeKey])) {
47614
+ if (keyEntities[nodeKey]) {
47602
47615
  const tagCls = classnames_default()(`${cascader_prefixcls}-selection-tag`, {
47603
47616
  [`${cascader_prefixcls}-selection-tag-disabled`]: isDsiabled
47604
47617
  });
@@ -47725,7 +47738,7 @@ class Cascader extends BaseComponent {
47725
47738
  const hiddenTag = [];
47726
47739
  [...realKeys].forEach((checkedKey, idx) => {
47727
47740
  const notExceedMaxTagCount = !isNumber_default()(maxTagCount) || maxTagCount >= idx + 1;
47728
- const item = this.renderTagItem(checkedKey, idx, cascader_constants_strings.IS_KEY);
47741
+ const item = this.renderTagItem(checkedKey, idx);
47729
47742
  if (notExceedMaxTagCount) {
47730
47743
  displayTag.push(item);
47731
47744
  } else {
@@ -47768,7 +47781,7 @@ class Cascader extends BaseComponent {
47768
47781
  const searchable = Boolean(filterTreeNode);
47769
47782
  if (!searchable) {
47770
47783
  if (multiple) {
47771
- if (isEmpty_default()(checkedKeys)) {
47784
+ if (checkedKeys.size === 0) {
47772
47785
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
47773
47786
  className: `${cascader_prefixcls}-selection-placeholder`
47774
47787
  }, placeholder);
@@ -48235,27 +48248,23 @@ class Cascader extends BaseComponent {
48235
48248
  return firstInProps || treeDataHasChange;
48236
48249
  };
48237
48250
  const getRealKeys = (realValue, keyEntities) => {
48238
- // normallizedValue is used to save the value in two-dimensional array format
48239
- let normallizedValue = [];
48251
+ // normalizedValue is used to save the value in two-dimensional array format
48252
+ let normalizedValue = [];
48240
48253
  if (Array.isArray(realValue)) {
48241
- normallizedValue = Array.isArray(realValue[0]) ? realValue : [realValue];
48254
+ normalizedValue = Array.isArray(realValue[0]) ? realValue : [realValue];
48242
48255
  } else {
48243
48256
  if (realValue !== undefined) {
48244
- normallizedValue = [[realValue]];
48257
+ normalizedValue = [[realValue]];
48245
48258
  }
48246
48259
  }
48247
48260
  // formatValuePath is used to save value of valuePath
48248
48261
  const formatValuePath = [];
48249
- normallizedValue.forEach(valueItem => {
48250
- const formatItem = onChangeWithObject ? valueItem.map(i => i === null || i === void 0 ? void 0 : i.value) : valueItem;
48251
- formatValuePath.push(formatItem);
48262
+ normalizedValue.forEach(valueItem => {
48263
+ const formatItem = onChangeWithObject && isObject_default()(valueItem[0]) ? valueItem.map(i => i === null || i === void 0 ? void 0 : i.value) : valueItem;
48264
+ formatItem.length > 0 && formatValuePath.push(formatItem);
48252
48265
  });
48253
48266
  // formatKeys is used to save key of value
48254
- const formatKeys = [];
48255
- formatValuePath.forEach(v => {
48256
- const formatKeyItem = util_findKeysForValues(v, keyEntities);
48257
- !isEmpty_default()(formatKeyItem) && formatKeys.push(formatKeyItem);
48258
- });
48267
+ const formatKeys = formatValuePath.map(v => getKeyByValuePath(v));
48259
48268
  return formatKeys;
48260
48269
  };
48261
48270
  const needUpdateTreeData = needUpdate('treeData') || needUpdateData();
@@ -48285,7 +48294,7 @@ class Cascader extends BaseComponent {
48285
48294
  if (isSet_default()(realKeys)) {
48286
48295
  realKeys = [...realKeys];
48287
48296
  }
48288
- const calRes = calcCheckedKeys(flatten_default()(realKeys), keyEntities);
48297
+ const calRes = calcCheckedKeys(realKeys, keyEntities);
48289
48298
  const checkedKeys = new Set(calRes.checkedKeys);
48290
48299
  const halfCheckedKeys = new Set(calRes.halfCheckedKeys);
48291
48300
  // disableStrictly
@@ -48309,7 +48318,7 @@ class Cascader extends BaseComponent {
48309
48318
  }
48310
48319
  componentDidUpdate(prevProps) {
48311
48320
  let isOptionsChanged = false;
48312
- if (!isEqual_default()(prevProps.treeData, this.props.treeData)) {
48321
+ if (!isEqual_default()(prevProps.treeData, this.props.treeData) && !this.props.multiple) {
48313
48322
  isOptionsChanged = true;
48314
48323
  this.foundation.collectOptions();
48315
48324
  }
@@ -48333,24 +48342,17 @@ class Cascader extends BaseComponent {
48333
48342
  resolvedCheckedKeys
48334
48343
  } = this.state;
48335
48344
  const tagInputcls = classnames_default()(`${cascader_prefixcls}-tagInput-wrapper`);
48336
- const tagValue = [];
48337
48345
  const realKeys = this.mergeType === cascader_constants_strings.NONE_MERGE_TYPE ? checkedKeys : resolvedCheckedKeys;
48338
- [...realKeys].forEach(checkedKey => {
48339
- if (!isEmpty_default()(keyEntities[checkedKey])) {
48340
- tagValue.push(keyEntities[checkedKey].valuePath);
48341
- }
48342
- });
48343
48346
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(tagInput_0, {
48344
48347
  className: tagInputcls,
48345
48348
  ref: this.inputRef,
48346
48349
  disabled: disabled,
48347
48350
  size: size,
48348
- // TODO Modify logic, not modify type
48349
- value: tagValue,
48351
+ value: [...realKeys],
48350
48352
  showRestTagsPopover: showRestTagsPopover,
48351
48353
  restTagsPopoverProps: restTagsPopoverProps,
48352
48354
  maxTagCount: maxTagCount,
48353
- renderTagItem: (value, index) => this.renderTagItem(value, index, cascader_constants_strings.IS_VALUE),
48355
+ renderTagItem: (value, index) => this.renderTagItem(value, index),
48354
48356
  inputValue: inputValue,
48355
48357
  onInputChange: this.handleInputChange,
48356
48358
  // TODO Modify logic, not modify type
@@ -62753,7 +62755,7 @@ class DropdownItem extends BaseComponent {
62753
62755
  ref: ref => forwardRef(ref),
62754
62756
  className: itemclass,
62755
62757
  style: style
62756
- }), tick, iconContent, children);
62758
+ }, this.getDataAttr(this.props)), tick, iconContent, children);
62757
62759
  }
62758
62760
  }
62759
62761
  DropdownItem.propTypes = {
@@ -64316,15 +64318,21 @@ class TextAreaFoundation extends foundation {
64316
64318
  maxLength,
64317
64319
  getValueLength
64318
64320
  } = this._adapter.getProps();
64319
- if (isNumber_default()(maxLength) && maxLength >= 0 && isFunction_default()(getValueLength) && isString_default()(value)) {
64320
- const valueLength = getValueLength(value);
64321
- if (valueLength > maxLength) {
64322
- console.warn('[Semi TextArea] The input character is truncated because the input length exceeds the maximum length limit');
64323
- const truncatedValue = this.handleTruncateValue(value, maxLength);
64324
- return truncatedValue;
64321
+ if (isNumber_default()(maxLength) && maxLength >= 0 && isString_default()(value)) {
64322
+ if (isFunction_default()(getValueLength)) {
64323
+ const valueLength = getValueLength(value);
64324
+ if (valueLength > maxLength) {
64325
+ console.warn('[Semi TextArea] The input character is truncated because the input length exceeds the maximum length limit');
64326
+ const truncatedValue = this.handleTruncateValue(value, maxLength);
64327
+ return truncatedValue;
64328
+ }
64325
64329
  } else {
64326
- return value;
64330
+ if (value.length > maxLength) {
64331
+ console.warn('[Semi TextArea] The input character is truncated because the input length exceeds the maximum length limit');
64332
+ return value.slice(0, maxLength);
64333
+ }
64327
64334
  }
64335
+ return value;
64328
64336
  }
64329
64337
  return undefined;
64330
64338
  }
@@ -64364,8 +64372,28 @@ class TextAreaFoundation extends foundation {
64364
64372
  const {
64365
64373
  value
64366
64374
  } = this.getStates();
64375
+ const {
64376
+ maxLength
64377
+ } = this.getProps();
64378
+ let realValue = value;
64379
+ if (maxLength) {
64380
+ // 如果设置了 maxLength,在中文输输入过程中,如果点击外部触发 blur,则拼音字符的所有内容会回显,
64381
+ // 该表现不符合 maxLength 规定,因此需要在 blur 的时候二次确认
64382
+ // 详情见 https://github.com/DouyinFE/semi-design/issues/2005
64383
+ // If maxLength is set, during the Chinese input process, if you click outside to trigger blur,
64384
+ // all the contents of the Pinyin characters will be echoed.
64385
+ // This behavior does not meet the maxLength requirement, so we need to confirm twice when blurring。
64386
+ // For details, see https://github.com/DouyinFE/semi-design/issues/2005
64387
+ realValue = this.handleVisibleMaxLength(value);
64388
+ if (realValue !== value) {
64389
+ if (!this._isControlledComponent()) {
64390
+ this._adapter.setValue(realValue);
64391
+ }
64392
+ this._adapter.notifyChange(realValue, e);
64393
+ }
64394
+ }
64367
64395
  this._adapter.toggleFocusing(false);
64368
- this._adapter.notifyBlur(value, e);
64396
+ this._adapter.notifyBlur(realValue, e);
64369
64397
  }
64370
64398
  handleKeyDown(e) {
64371
64399
  this._adapter.notifyKeyDown(e);
@@ -79372,7 +79400,8 @@ class TableFoundation extends foundation {
79372
79400
  }
79373
79401
  return true;
79374
79402
  } else {
79375
- return false;
79403
+ const isAllSelected = allKeys.every(rowKey => selectedRowKeysSet.has(rowKey));
79404
+ return isAllSelected || false;
79376
79405
  }
79377
79406
  }
79378
79407
  /**
@@ -99052,6 +99081,9 @@ ArrayFieldComponent.contextType = FormUpdaterContext;
99052
99081
  const image_constants_cssClasses = {
99053
99082
  PREFIX: `${BASE_CLASS_PREFIX}-image`
99054
99083
  };
99084
+ const image_constants_numbers = {
99085
+ DEFAULT_Z_INDEX: 1070
99086
+ };
99055
99087
 
99056
99088
  ;// CONCATENATED MODULE: ../semi-icons/lib/es/icons/IconUploadError.js
99057
99089
 
@@ -99131,7 +99163,8 @@ const previewHeader_Header = /*#__PURE__*/(0,external_root_React_commonjs2_react
99131
99163
  onClose,
99132
99164
  titleStyle,
99133
99165
  className,
99134
- renderHeader
99166
+ renderHeader,
99167
+ closable
99135
99168
  } = _ref;
99136
99169
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PreviewContext.Consumer, null, _ref2 => {
99137
99170
  let {
@@ -99148,7 +99181,7 @@ const previewHeader_Header = /*#__PURE__*/(0,external_root_React_commonjs2_react
99148
99181
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("section", {
99149
99182
  className: `${previewHeader_prefixCls}-title`,
99150
99183
  style: titleStyle
99151
- }, renderHeader ? renderHeader(title) : title), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("section", {
99184
+ }, renderHeader ? renderHeader(title) : title), closable && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("section", {
99152
99185
  className: `${previewHeader_prefixCls}-close`,
99153
99186
  onMouseUp: onClose
99154
99187
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(IconClose, null)));
@@ -99414,11 +99447,13 @@ class previewFooter_Footer extends BaseComponent {
99414
99447
  // 根据 props 中的 showTooltip 决定是否使用 Tooltip 包一层
99415
99448
  this.getFinalIconElement = (element, content, key) => {
99416
99449
  const {
99417
- showTooltip
99450
+ showTooltip,
99451
+ zIndex
99418
99452
  } = this.props;
99419
99453
  return showTooltip ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Tooltip, {
99420
99454
  content: content,
99421
- key: `tooltip-${key}`
99455
+ key: `tooltip-${key}`,
99456
+ zIndex: zIndex + 1
99422
99457
  }, element) : element;
99423
99458
  };
99424
99459
  this.getLocalTextByKey = key => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(LocaleConsumer, {
@@ -100766,6 +100801,7 @@ class PreviewInner extends BaseComponent {
100766
100801
  render() {
100767
100802
  const {
100768
100803
  getPopupContainer,
100804
+ closable,
100769
100805
  zIndex,
100770
100806
  visible,
100771
100807
  className,
@@ -100812,13 +100848,10 @@ class PreviewInner extends BaseComponent {
100812
100848
  const total = imgSrc.length;
100813
100849
  const showPrev = total !== 1 && (infinite || currentIndex !== 0);
100814
100850
  const showNext = total !== 1 && (infinite || currentIndex !== total - 1);
100815
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(_portal, {
100851
+ return visible && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(_portal, {
100816
100852
  getPopupContainer: getPopupContainer,
100817
100853
  style: wrapperStyle
100818
- }, visible &&
100819
- /*#__PURE__*/
100820
- // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events,jsx-a11y/no-static-element-interactions
100821
- external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
100854
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
100822
100855
  className: previewWrapperCls,
100823
100856
  style: style,
100824
100857
  onMouseDown: this.handleMouseDown,
@@ -100829,7 +100862,8 @@ class PreviewInner extends BaseComponent {
100829
100862
  ref: this.headerRef,
100830
100863
  className: classnames_default()(hideViewerCls),
100831
100864
  onClose: this.handlePreviewClose,
100832
- renderHeader: renderHeader
100865
+ renderHeader: renderHeader,
100866
+ closable: closable
100833
100867
  }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PreviewImage, {
100834
100868
  src: imgSrc[currentIndex],
100835
100869
  onZoom: this.handleZoomImage,
@@ -100872,6 +100906,7 @@ class PreviewInner extends BaseComponent {
100872
100906
  ratio: ratio,
100873
100907
  prevTip: prevTip,
100874
100908
  nextTip: nextTip,
100909
+ zIndex: zIndex,
100875
100910
  zoomInTip: zoomInTip,
100876
100911
  zoomOutTip: zoomOutTip,
100877
100912
  rotateTip: rotateTip,
@@ -100942,7 +100977,7 @@ PreviewInner.defaultProps = {
100942
100977
  lazyLoad: false,
100943
100978
  preLoad: true,
100944
100979
  preLoadGap: 2,
100945
- zIndex: 1000,
100980
+ zIndex: image_constants_numbers.DEFAULT_Z_INDEX,
100946
100981
  maskClosable: true,
100947
100982
  viewerVisibleDelay: 10000,
100948
100983
  maxZoom: 5,
@@ -101022,6 +101057,7 @@ var image_image = __webpack_require__("cHRk");
101022
101057
 
101023
101058
 
101024
101059
 
101060
+
101025
101061
  var image_rest = undefined && undefined.__rest || function (s, e) {
101026
101062
  var t = {};
101027
101063
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
@@ -101193,7 +101229,10 @@ class image_Image extends BaseComponent {
101193
101229
  const canPreview = loadStatus === "success" && preview && !this.isInGroup();
101194
101230
  const showPreviewCursor = preview && loadStatus === "success";
101195
101231
  const previewSrc = isObject_default()(preview) ? (_a = preview.src) !== null && _a !== void 0 ? _a : src : src;
101196
- const previewProps = isObject_default()(preview) ? preview : {};
101232
+ const previewProps = isObject_default()(preview) && canPreview ? Object.assign(Object.assign({}, omit_default()(preview, ['className', 'style', 'previewCls', 'previewStyle'])), {
101233
+ className: preview === null || preview === void 0 ? void 0 : preview.previewCls,
101234
+ style: preview === null || preview === void 0 ? void 0 : preview.previewStyle
101235
+ }) : {};
101197
101236
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
101198
101237
  style: outerStyle,
101199
101238
  className: outerCls,
@@ -101236,6 +101275,7 @@ image_Image.propTypes = {
101236
101275
  preview: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).object]),
101237
101276
  onLoad: (prop_types_default()).func,
101238
101277
  onError: (prop_types_default()).func,
101278
+ onClick: (prop_types_default()).func,
101239
101279
  crossOrigin: (prop_types_default()).string,
101240
101280
  imageID: (prop_types_default()).number
101241
101281
  };
@@ -101283,6 +101323,7 @@ class PreviewFoundation extends foundation {
101283
101323
  ;// CONCATENATED MODULE: ./image/preview.tsx
101284
101324
 
101285
101325
 
101326
+
101286
101327
  var preview_rest = undefined && undefined.__rest || function (s, e) {
101287
101328
  var t = {};
101288
101329
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
@@ -101428,6 +101469,10 @@ class Preview extends BaseComponent {
101428
101469
  setDownloadName
101429
101470
  } = _a,
101430
101471
  restProps = preview_rest(_a, ["src", "className", "style", "lazyLoad", "setDownloadName"]);
101472
+ const previewInnerProps = Object.assign(Object.assign({}, omit_default()(restProps, ['previewCls', 'previewStyle'])), {
101473
+ className: restProps === null || restProps === void 0 ? void 0 : restProps.previewCls,
101474
+ style: restProps === null || restProps === void 0 ? void 0 : restProps.previewStyle
101475
+ });
101431
101476
  const {
101432
101477
  currentIndex,
101433
101478
  visible
@@ -101456,7 +101501,7 @@ class Preview extends BaseComponent {
101456
101501
  id: this.previewGroupId,
101457
101502
  style: style,
101458
101503
  className: classnames_default()(`${preview_prefixCls}-preview-group`, className)
101459
- }, newChildren), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PreviewInner, Object.assign({}, restProps, {
101504
+ }, newChildren), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PreviewInner, Object.assign({}, previewInnerProps, {
101460
101505
  ref: this.previewRef,
101461
101506
  src: finalSrcList,
101462
101507
  currentIndex: currentIndex,
@@ -101490,6 +101535,8 @@ Preview.propTypes = {
101490
101535
  lazyLoadMargin: (prop_types_default()).string,
101491
101536
  preLoad: (prop_types_default()).bool,
101492
101537
  preLoadGap: (prop_types_default()).number,
101538
+ previewCls: (prop_types_default()).string,
101539
+ previewStyle: (prop_types_default()).object,
101493
101540
  disableDownload: (prop_types_default()).bool,
101494
101541
  zIndex: (prop_types_default()).number,
101495
101542
  renderHeader: (prop_types_default()).func,
@@ -101509,7 +101556,8 @@ Preview.propTypes = {
101509
101556
  Preview.defaultProps = {
101510
101557
  src: [],
101511
101558
  lazyLoad: true,
101512
- lazyLoadMargin: "0px 100px 100px 0px"
101559
+ lazyLoadMargin: "0px 100px 100px 0px",
101560
+ closable: true
101513
101561
  };
101514
101562
  ;// CONCATENATED MODULE: ./index.ts
101515
101563