@douyinfe/semi-ui 2.31.0-beta.0 → 2.31.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.
- package/dist/umd/semi-ui.js +112 -68
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/carousel/index.d.ts +1 -0
- package/lib/cjs/carousel/index.js +17 -1
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/image/previewInner.d.ts +1 -2
- package/lib/cjs/image/previewInner.js +5 -6
- package/lib/cjs/popconfirm/index.js +10 -1
- package/lib/cjs/select/index.d.ts +2 -2
- package/lib/cjs/select/index.js +3 -7
- package/lib/cjs/select/virtualRow.js +3 -2
- package/lib/cjs/table/ColumnSelection.d.ts +4 -3
- package/lib/cjs/table/Table.d.ts +9 -1
- package/lib/cjs/table/Table.js +23 -7
- package/lib/cjs/treeSelect/index.d.ts +1 -1
- package/lib/cjs/treeSelect/index.js +18 -18
- package/lib/es/carousel/index.d.ts +1 -0
- package/lib/es/carousel/index.js +16 -2
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/image/previewInner.d.ts +1 -2
- package/lib/es/image/previewInner.js +5 -6
- package/lib/es/popconfirm/index.js +10 -1
- package/lib/es/select/index.d.ts +2 -2
- package/lib/es/select/index.js +3 -6
- package/lib/es/select/virtualRow.js +3 -2
- package/lib/es/table/ColumnSelection.d.ts +4 -3
- package/lib/es/table/Table.d.ts +9 -1
- package/lib/es/table/Table.js +23 -7
- package/lib/es/treeSelect/index.d.ts +1 -1
- package/lib/es/treeSelect/index.js +17 -18
- package/package.json +8 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -37442,6 +37442,11 @@ class foundation_CarouselFoundation extends foundation {
|
|
|
37442
37442
|
constructor(adapter) {
|
|
37443
37443
|
super(Object.assign({}, adapter));
|
|
37444
37444
|
this._interval = null;
|
|
37445
|
+
this._forcePlay = false;
|
|
37446
|
+
}
|
|
37447
|
+
|
|
37448
|
+
setForcePlay(forcePlay) {
|
|
37449
|
+
this._forcePlay = forcePlay;
|
|
37445
37450
|
}
|
|
37446
37451
|
|
|
37447
37452
|
play(interval) {
|
|
@@ -37559,7 +37564,7 @@ class foundation_CarouselFoundation extends foundation {
|
|
|
37559
37564
|
} = this.getProps();
|
|
37560
37565
|
const autoPlayType = typeof autoPlay;
|
|
37561
37566
|
|
|
37562
|
-
if (autoPlayType === 'boolean'
|
|
37567
|
+
if (autoPlayType === 'boolean') {
|
|
37563
37568
|
return carousel_constants_numbers.DEFAULT_INTERVAL + speed;
|
|
37564
37569
|
}
|
|
37565
37570
|
|
|
@@ -37578,9 +37583,9 @@ class foundation_CarouselFoundation extends foundation {
|
|
|
37578
37583
|
const {
|
|
37579
37584
|
autoPlay
|
|
37580
37585
|
} = this.getProps();
|
|
37581
|
-
const autoPlayType = typeof autoPlay;
|
|
37586
|
+
const autoPlayType = typeof autoPlay; // when user manually call the play function, force play
|
|
37582
37587
|
|
|
37583
|
-
if (autoPlayType === 'boolean' && autoPlay || isObject_default()(autoPlay)) {
|
|
37588
|
+
if (autoPlayType === 'boolean' && autoPlay || isObject_default()(autoPlay) || this._forcePlay) {
|
|
37584
37589
|
this.play(this.getSwitchingTime());
|
|
37585
37590
|
}
|
|
37586
37591
|
}
|
|
@@ -37839,6 +37844,7 @@ var carousel = __webpack_require__("HzcD");
|
|
|
37839
37844
|
// CONCATENATED MODULE: ./carousel/index.tsx
|
|
37840
37845
|
|
|
37841
37846
|
|
|
37847
|
+
|
|
37842
37848
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
37843
37849
|
|
|
37844
37850
|
|
|
@@ -37856,10 +37862,12 @@ class carousel_Carousel extends baseComponent_BaseComponent {
|
|
|
37856
37862
|
super(props);
|
|
37857
37863
|
|
|
37858
37864
|
this.play = () => {
|
|
37865
|
+
this.foundation.setForcePlay(true);
|
|
37859
37866
|
return this.foundation.handleAutoPlay();
|
|
37860
37867
|
};
|
|
37861
37868
|
|
|
37862
37869
|
this.stop = () => {
|
|
37870
|
+
this.foundation.setForcePlay(false);
|
|
37863
37871
|
return this.foundation.stop();
|
|
37864
37872
|
};
|
|
37865
37873
|
|
|
@@ -37886,7 +37894,7 @@ class carousel_Carousel extends baseComponent_BaseComponent {
|
|
|
37886
37894
|
autoPlay
|
|
37887
37895
|
} = this.props;
|
|
37888
37896
|
|
|
37889
|
-
if (typeof autoPlay
|
|
37897
|
+
if (autoPlay === true || typeof autoPlay === 'object' && autoPlay.hoverToPause) {
|
|
37890
37898
|
this.foundation.stop();
|
|
37891
37899
|
}
|
|
37892
37900
|
};
|
|
@@ -38066,6 +38074,17 @@ class carousel_Carousel extends baseComponent_BaseComponent {
|
|
|
38066
38074
|
this.handleAutoPlay();
|
|
38067
38075
|
}
|
|
38068
38076
|
|
|
38077
|
+
componentDidUpdate(prevProps, prevState, snapshot) {
|
|
38078
|
+
const prevChildrenKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(prevProps.children).map(child => /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(child) ? child.key : null);
|
|
38079
|
+
const nowChildrenKeys = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(this.props.children).map(child => /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(child) ? child.key : null);
|
|
38080
|
+
|
|
38081
|
+
if (!isEqual_default()(prevChildrenKeys, nowChildrenKeys)) {
|
|
38082
|
+
this.setState({
|
|
38083
|
+
children: this.getChildren()
|
|
38084
|
+
});
|
|
38085
|
+
}
|
|
38086
|
+
}
|
|
38087
|
+
|
|
38069
38088
|
componentWillUnmount() {
|
|
38070
38089
|
this.foundation.destroy();
|
|
38071
38090
|
}
|
|
@@ -70831,7 +70850,7 @@ class foundation_SelectFoundation extends foundation {
|
|
|
70831
70850
|
|
|
70832
70851
|
this._adapter.once('popoverClose', () => {
|
|
70833
70852
|
if (isFilterable) {
|
|
70834
|
-
this.clearInput();
|
|
70853
|
+
this.clearInput(e);
|
|
70835
70854
|
}
|
|
70836
70855
|
|
|
70837
70856
|
if (closeCb) {
|
|
@@ -70949,7 +70968,7 @@ class foundation_SelectFoundation extends foundation {
|
|
|
70949
70968
|
|
|
70950
70969
|
if (this._isFilterable()) {
|
|
70951
70970
|
if (autoClearSearchValue) {
|
|
70952
|
-
this.clearInput();
|
|
70971
|
+
this.clearInput(event);
|
|
70953
70972
|
}
|
|
70954
70973
|
|
|
70955
70974
|
this.focusInput();
|
|
@@ -70969,7 +70988,7 @@ class foundation_SelectFoundation extends foundation {
|
|
|
70969
70988
|
if (this._isFilterable()) {
|
|
70970
70989
|
// When filter active,if autoClearSearchValue is true,reset input after select
|
|
70971
70990
|
if (autoClearSearchValue) {
|
|
70972
|
-
this.clearInput(); // At the same time, the filtering of options is also cleared, in order to show all candidates
|
|
70991
|
+
this.clearInput(event); // At the same time, the filtering of options is also cleared, in order to show all candidates
|
|
70973
70992
|
|
|
70974
70993
|
const sugInput = '';
|
|
70975
70994
|
options = this._filterOption(options, sugInput);
|
|
@@ -71059,9 +71078,10 @@ class foundation_SelectFoundation extends foundation {
|
|
|
71059
71078
|
|
|
71060
71079
|
this._notifyChange(selections);
|
|
71061
71080
|
}
|
|
71062
|
-
}
|
|
71081
|
+
} // The reason why event input is optional is that clearInput may be manually called by the user through ref
|
|
71063
71082
|
|
|
71064
|
-
|
|
71083
|
+
|
|
71084
|
+
clearInput(event) {
|
|
71065
71085
|
const {
|
|
71066
71086
|
inputValue
|
|
71067
71087
|
} = this.getStates(); // only when input is not null, select should notifySearch and updateOptions
|
|
@@ -71069,7 +71089,7 @@ class foundation_SelectFoundation extends foundation {
|
|
|
71069
71089
|
if (inputValue !== '') {
|
|
71070
71090
|
this._adapter.updateInputValue('');
|
|
71071
71091
|
|
|
71072
|
-
this._adapter.notifySearch(''); // reset options filter
|
|
71092
|
+
this._adapter.notifySearch('', event); // reset options filter
|
|
71073
71093
|
|
|
71074
71094
|
|
|
71075
71095
|
const {
|
|
@@ -71096,7 +71116,7 @@ class foundation_SelectFoundation extends foundation {
|
|
|
71096
71116
|
this._adapter.setIsFocusInContainer(false);
|
|
71097
71117
|
}
|
|
71098
71118
|
|
|
71099
|
-
handleInputChange(sugInput) {
|
|
71119
|
+
handleInputChange(sugInput, event) {
|
|
71100
71120
|
// Input is a controlled component, so the value needs to be updated
|
|
71101
71121
|
this._adapter.updateInputValue(sugInput);
|
|
71102
71122
|
|
|
@@ -71120,7 +71140,7 @@ class foundation_SelectFoundation extends foundation {
|
|
|
71120
71140
|
|
|
71121
71141
|
this._adapter.updateOptions(optionsAfterFilter);
|
|
71122
71142
|
|
|
71123
|
-
this._adapter.notifySearch(sugInput); // In multi-select mode, the drop-down box is repositioned each time you enter, because it may cause a line break as the input changes
|
|
71143
|
+
this._adapter.notifySearch(sugInput, event); // In multi-select mode, the drop-down box is repositioned each time you enter, because it may cause a line break as the input changes
|
|
71124
71144
|
|
|
71125
71145
|
|
|
71126
71146
|
if (this._isMultiple()) {
|
|
@@ -71396,7 +71416,7 @@ class foundation_SelectFoundation extends foundation {
|
|
|
71396
71416
|
}
|
|
71397
71417
|
} else {
|
|
71398
71418
|
// there are no focusable elements inside the container, tab to next element and trigger blur
|
|
71399
|
-
this.close();
|
|
71419
|
+
this.close(event);
|
|
71400
71420
|
|
|
71401
71421
|
this._notifyBlur(event);
|
|
71402
71422
|
}
|
|
@@ -71422,7 +71442,7 @@ class foundation_SelectFoundation extends foundation {
|
|
|
71422
71442
|
// focus in the last element in container, focus back to trigger and close panel
|
|
71423
71443
|
this._focusTrigger();
|
|
71424
71444
|
|
|
71425
|
-
this.close();
|
|
71445
|
+
this.close(event);
|
|
71426
71446
|
handlePrevent(event);
|
|
71427
71447
|
}
|
|
71428
71448
|
}
|
|
@@ -71434,7 +71454,7 @@ class foundation_SelectFoundation extends foundation {
|
|
|
71434
71454
|
|
|
71435
71455
|
if (!isFocusInContainer) {
|
|
71436
71456
|
// focus in trigger, close the panel, shift tab to previe element and trigger blur
|
|
71437
|
-
this.close();
|
|
71457
|
+
this.close(event);
|
|
71438
71458
|
|
|
71439
71459
|
this._notifyBlur(event);
|
|
71440
71460
|
} else if (activeElement === focusableElements[0]) {
|
|
@@ -71477,7 +71497,7 @@ class foundation_SelectFoundation extends foundation {
|
|
|
71477
71497
|
this.onSelect(selectedOption, focusIndex, event);
|
|
71478
71498
|
}
|
|
71479
71499
|
} else {
|
|
71480
|
-
this.close();
|
|
71500
|
+
this.close(event);
|
|
71481
71501
|
}
|
|
71482
71502
|
}
|
|
71483
71503
|
}
|
|
@@ -71656,7 +71676,7 @@ class foundation_SelectFoundation extends foundation {
|
|
|
71656
71676
|
} = this.getProps();
|
|
71657
71677
|
|
|
71658
71678
|
if (filter) {
|
|
71659
|
-
this.clearInput();
|
|
71679
|
+
this.clearInput(e);
|
|
71660
71680
|
}
|
|
71661
71681
|
|
|
71662
71682
|
this.clearSelected(); // prevent this click open dropdown
|
|
@@ -72098,10 +72118,11 @@ const VirtualRow = _ref => {
|
|
|
72098
72118
|
style
|
|
72099
72119
|
} = _ref;
|
|
72100
72120
|
const {
|
|
72101
|
-
visibleOptions
|
|
72121
|
+
visibleOptions,
|
|
72122
|
+
renderOption
|
|
72102
72123
|
} = data;
|
|
72103
72124
|
const option = visibleOptions[index];
|
|
72104
|
-
return
|
|
72125
|
+
return renderOption(option, index, style);
|
|
72105
72126
|
};
|
|
72106
72127
|
|
|
72107
72128
|
/* harmony default export */ var virtualRow = (VirtualRow);
|
|
@@ -72373,7 +72394,6 @@ var select_select = __webpack_require__("1d3+");
|
|
|
72373
72394
|
|
|
72374
72395
|
|
|
72375
72396
|
|
|
72376
|
-
|
|
72377
72397
|
|
|
72378
72398
|
|
|
72379
72399
|
const select_prefixcls = select_constants_cssClasses.PREFIX;
|
|
@@ -72387,7 +72407,7 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
72387
72407
|
current: node
|
|
72388
72408
|
};
|
|
72389
72409
|
|
|
72390
|
-
this.handleInputChange = value => this.foundation.handleInputChange(value);
|
|
72410
|
+
this.handleInputChange = (value, event) => this.foundation.handleInputChange(value, event);
|
|
72391
72411
|
|
|
72392
72412
|
this.getTagItem = (item, i, renderSelectedItem) => {
|
|
72393
72413
|
const {
|
|
@@ -72474,8 +72494,6 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
72474
72494
|
this.onKeyPress = this.onKeyPress.bind(this);
|
|
72475
72495
|
this.eventManager = new Event_Event();
|
|
72476
72496
|
this.foundation = new foundation_SelectFoundation(this.adapter);
|
|
72477
|
-
Object(warning["a" /* default */])('optionLabelProp' in this.props, '[Semi Select] \'optionLabelProp\' has already been deprecated, please use \'renderSelectedItem\' instead.');
|
|
72478
|
-
Object(warning["a" /* default */])('labelInValue' in this.props, '[Semi Select] \'labelInValue\' has already been deprecated, please use \'onChangeWithObject\' instead.');
|
|
72479
72497
|
}
|
|
72480
72498
|
|
|
72481
72499
|
get adapter() {
|
|
@@ -72644,8 +72662,8 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
72644
72662
|
notifyDropdownVisibleChange: visible => {
|
|
72645
72663
|
this.props.onDropdownVisibleChange(visible);
|
|
72646
72664
|
},
|
|
72647
|
-
notifySearch: input => {
|
|
72648
|
-
this.props.onSearch(input);
|
|
72665
|
+
notifySearch: (input, event) => {
|
|
72666
|
+
this.props.onSearch(input, event);
|
|
72649
72667
|
},
|
|
72650
72668
|
notifyCreate: input => {
|
|
72651
72669
|
this.props.onCreate(input);
|
|
@@ -74535,7 +74553,16 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
|
|
|
74535
74553
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(popover_0, Object.assign({
|
|
74536
74554
|
ref: this.popoverRef
|
|
74537
74555
|
}, attrs, {
|
|
74538
|
-
content
|
|
74556
|
+
// A arrow function needs to be passed here, otherwise the content will not be updated after the Popconfirm state is updated
|
|
74557
|
+
// Popover is a PureComponent, same props will not trigger update
|
|
74558
|
+
content: _ref2 => {
|
|
74559
|
+
let {
|
|
74560
|
+
initialFocusRef
|
|
74561
|
+
} = _ref2;
|
|
74562
|
+
return this.renderConfirmPopCard({
|
|
74563
|
+
initialFocusRef
|
|
74564
|
+
});
|
|
74565
|
+
},
|
|
74539
74566
|
visible: visible,
|
|
74540
74567
|
position: position
|
|
74541
74568
|
}, popProps), children);
|
|
@@ -81141,12 +81168,14 @@ class foundation_TableFoundation extends foundation {
|
|
|
81141
81168
|
} = this._adapter.getStates();
|
|
81142
81169
|
|
|
81143
81170
|
const filteredSortedDataSource = this.getFilteredSortedDataSource(dataSource, queries);
|
|
81171
|
+
const allDataDisabledRowKeys = this.getAllDisabledRowKeys(filteredSortedDataSource);
|
|
81144
81172
|
const pageData = this.getCurrentPageData(filteredSortedDataSource);
|
|
81145
81173
|
this.setAdapterPageData(pageData);
|
|
81146
81174
|
this.initExpandedRowKeys(pageData);
|
|
81147
81175
|
this.initSelectedRowKeys(pageData); // cache dataSource after mount, and then calculate it on demand
|
|
81148
81176
|
|
|
81149
81177
|
this.setCachedFilteredSortedDataSource(filteredSortedDataSource);
|
|
81178
|
+
this.setAllDisabledRowKeys(allDataDisabledRowKeys);
|
|
81150
81179
|
}
|
|
81151
81180
|
|
|
81152
81181
|
initExpandedRowKeys() {
|
|
@@ -81508,6 +81537,10 @@ class foundation_TableFoundation extends foundation {
|
|
|
81508
81537
|
|
|
81509
81538
|
destroy() {}
|
|
81510
81539
|
|
|
81540
|
+
setAllDisabledRowKeys(disabledRowKeys) {
|
|
81541
|
+
this._adapter.setAllDisabledRowKeys(disabledRowKeys);
|
|
81542
|
+
}
|
|
81543
|
+
|
|
81511
81544
|
handleClick(e) {}
|
|
81512
81545
|
|
|
81513
81546
|
handleMouseEnter(e) {}
|
|
@@ -81766,8 +81799,11 @@ class foundation_TableFoundation extends foundation {
|
|
|
81766
81799
|
const selectedRowKeysSet = this._getSelectedRowKeysSet();
|
|
81767
81800
|
|
|
81768
81801
|
let allRowKeys = [...this._adapter.getCachedFilteredSortedRowKeys()];
|
|
81769
|
-
|
|
81770
|
-
const
|
|
81802
|
+
|
|
81803
|
+
const disabledRowKeys = this._adapter.getAllDisabledRowKeys();
|
|
81804
|
+
|
|
81805
|
+
const disabledRowKeysSet = this._adapter.getAllDisabledRowKeysSet();
|
|
81806
|
+
|
|
81771
81807
|
let changedRowKeys; // Select all, if not disabled && not in selectedRowKeys
|
|
81772
81808
|
|
|
81773
81809
|
if (selected) {
|
|
@@ -82141,7 +82177,9 @@ class foundation_TableFoundation extends foundation {
|
|
|
82141
82177
|
handleClickFilterOrSorter(queries) {
|
|
82142
82178
|
const dataSource = [...this.getProp('dataSource')];
|
|
82143
82179
|
const sortedDataSource = this.getFilteredSortedDataSource(dataSource, queries);
|
|
82180
|
+
const allDataDisabledRowKeys = this.getAllDisabledRowKeys(sortedDataSource);
|
|
82144
82181
|
this.setCachedFilteredSortedDataSource(sortedDataSource);
|
|
82182
|
+
this.setAllDisabledRowKeys(allDataDisabledRowKeys);
|
|
82145
82183
|
const pageData = this.getCurrentPageData(sortedDataSource);
|
|
82146
82184
|
this.setAdapterPageData(pageData);
|
|
82147
82185
|
}
|
|
@@ -85906,7 +85944,7 @@ class Table_Table extends baseComponent_BaseComponent {
|
|
|
85906
85944
|
let inHeader = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
85907
85945
|
const {
|
|
85908
85946
|
rowSelection,
|
|
85909
|
-
|
|
85947
|
+
allDisabledRowKeysSet
|
|
85910
85948
|
} = _this.state;
|
|
85911
85949
|
|
|
85912
85950
|
if (rowSelection && typeof rowSelection === 'object') {
|
|
@@ -85923,7 +85961,7 @@ class Table_Table extends baseComponent_BaseComponent {
|
|
|
85923
85961
|
const allRowKeys = _this.cachedFilteredSortedRowKeys;
|
|
85924
85962
|
const allRowKeysSet = _this.cachedFilteredSortedRowKeysSet;
|
|
85925
85963
|
|
|
85926
|
-
const allIsSelected = _this.foundation.allIsSelected(selectedRowKeysSet,
|
|
85964
|
+
const allIsSelected = _this.foundation.allIsSelected(selectedRowKeysSet, allDisabledRowKeysSet, allRowKeys);
|
|
85927
85965
|
|
|
85928
85966
|
const hasRowSelected = _this.foundation.hasRowSelected(selectedRowKeys, allRowKeysSet);
|
|
85929
85967
|
|
|
@@ -85933,8 +85971,8 @@ class Table_Table extends baseComponent_BaseComponent {
|
|
|
85933
85971
|
key: columnKey,
|
|
85934
85972
|
selected: allIsSelected,
|
|
85935
85973
|
indeterminate: hasRowSelected && !allIsSelected,
|
|
85936
|
-
onChange: (
|
|
85937
|
-
_this.toggleSelectAllRow(
|
|
85974
|
+
onChange: (selected, e) => {
|
|
85975
|
+
_this.toggleSelectAllRow(selected, e);
|
|
85938
85976
|
}
|
|
85939
85977
|
});
|
|
85940
85978
|
} else {
|
|
@@ -86137,8 +86175,8 @@ class Table_Table extends baseComponent_BaseComponent {
|
|
|
86137
86175
|
this.foundation.handleSelectRow(realKey, selected, e);
|
|
86138
86176
|
};
|
|
86139
86177
|
|
|
86140
|
-
this.toggleSelectAllRow = (
|
|
86141
|
-
this.foundation.handleSelectAllRow(
|
|
86178
|
+
this.toggleSelectAllRow = (selected, e) => {
|
|
86179
|
+
this.foundation.handleSelectAllRow(selected, e);
|
|
86142
86180
|
};
|
|
86143
86181
|
/**
|
|
86144
86182
|
* render pagination
|
|
@@ -86456,6 +86494,8 @@ class Table_Table extends baseComponent_BaseComponent {
|
|
|
86456
86494
|
allRowKeys: [],
|
|
86457
86495
|
disabledRowKeys: [],
|
|
86458
86496
|
disabledRowKeysSet: new Set(),
|
|
86497
|
+
allDisabledRowKeys: [],
|
|
86498
|
+
allDisabledRowKeysSet: new Set(),
|
|
86459
86499
|
headWidths: [],
|
|
86460
86500
|
bodyHasScrollBar: false,
|
|
86461
86501
|
prePropRowSelection: undefined,
|
|
@@ -86560,11 +86600,20 @@ class Table_Table extends baseComponent_BaseComponent {
|
|
|
86560
86600
|
this.cachedFilteredSortedRowKeys = filteredSortedRowKeys;
|
|
86561
86601
|
this.cachedFilteredSortedRowKeysSet = new Set(filteredSortedRowKeys);
|
|
86562
86602
|
},
|
|
86603
|
+
setAllDisabledRowKeys: allDisabledRowKeys => {
|
|
86604
|
+
const allDisabledRowKeysSet = new Set(allDisabledRowKeys);
|
|
86605
|
+
this.setState({
|
|
86606
|
+
allDisabledRowKeys,
|
|
86607
|
+
allDisabledRowKeysSet
|
|
86608
|
+
});
|
|
86609
|
+
},
|
|
86563
86610
|
getCurrentPage: () => get_default()(this.state, 'pagination.currentPage', 1),
|
|
86564
86611
|
getCurrentPageSize: () => get_default()(this.state, 'pagination.pageSize', table_constants_numbers.DEFAULT_PAGE_SIZE),
|
|
86565
86612
|
getCachedFilteredSortedDataSource: () => this.cachedFilteredSortedDataSource,
|
|
86566
86613
|
getCachedFilteredSortedRowKeys: () => this.cachedFilteredSortedRowKeys,
|
|
86567
86614
|
getCachedFilteredSortedRowKeysSet: () => this.cachedFilteredSortedRowKeysSet,
|
|
86615
|
+
getAllDisabledRowKeys: () => this.state.allDisabledRowKeys,
|
|
86616
|
+
getAllDisabledRowKeysSet: () => this.state.allDisabledRowKeysSet,
|
|
86568
86617
|
notifyFilterDropdownVisibleChange: (visible, dataIndex) => this._invokeColumnFn(dataIndex, 'onFilterDropdownVisibleChange', visible),
|
|
86569
86618
|
notifyChange: function () {
|
|
86570
86619
|
return _this2.props.onChange(...arguments);
|
|
@@ -86768,8 +86817,11 @@ class Table_Table extends baseComponent_BaseComponent {
|
|
|
86768
86817
|
childrenRecordName,
|
|
86769
86818
|
rowKey
|
|
86770
86819
|
});
|
|
86820
|
+
const disabledRowKeysSet = new Set(disabledRowKeys);
|
|
86771
86821
|
willUpdateStates.disabledRowKeys = disabledRowKeys;
|
|
86772
|
-
willUpdateStates.disabledRowKeysSet =
|
|
86822
|
+
willUpdateStates.disabledRowKeysSet = disabledRowKeysSet;
|
|
86823
|
+
willUpdateStates.allDisabledRowKeys = disabledRowKeys;
|
|
86824
|
+
willUpdateStates.allDisabledRowKeysSet = disabledRowKeysSet;
|
|
86773
86825
|
}
|
|
86774
86826
|
|
|
86775
86827
|
willUpdateStates.rowSelection = newSelectionStates;
|
|
@@ -86873,7 +86925,9 @@ class Table_Table extends baseComponent_BaseComponent {
|
|
|
86873
86925
|
// Temporarily use _dataSource=[...dataSource] for processing
|
|
86874
86926
|
const _dataSource = [...dataSource];
|
|
86875
86927
|
const filteredSortedDataSource = this.foundation.getFilteredSortedDataSource(_dataSource, stateQueries);
|
|
86928
|
+
const allDataDisabledRowKeys = this.foundation.getAllDisabledRowKeys(filteredSortedDataSource);
|
|
86876
86929
|
this.foundation.setCachedFilteredSortedDataSource(filteredSortedDataSource);
|
|
86930
|
+
this.foundation.setAllDisabledRowKeys(allDataDisabledRowKeys);
|
|
86877
86931
|
states.dataSource = filteredSortedDataSource;
|
|
86878
86932
|
|
|
86879
86933
|
if (this.props.groupBy) {
|
|
@@ -94207,6 +94261,7 @@ var treeSelect = __webpack_require__("uw59");
|
|
|
94207
94261
|
|
|
94208
94262
|
|
|
94209
94263
|
|
|
94264
|
+
|
|
94210
94265
|
|
|
94211
94266
|
|
|
94212
94267
|
const treeSelect_prefixcls = treeSelect_constants_cssClasses.PREFIX;
|
|
@@ -94941,8 +94996,11 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
94941
94996
|
};
|
|
94942
94997
|
|
|
94943
94998
|
this.itemKey = (index, data) => {
|
|
94944
|
-
|
|
94945
|
-
|
|
94999
|
+
const {
|
|
95000
|
+
visibleOptions
|
|
95001
|
+
} = data; // Find the item at the specified index.
|
|
95002
|
+
|
|
95003
|
+
const item = visibleOptions[index]; // Return a value that uniquely identifies this item.
|
|
94946
95004
|
|
|
94947
95005
|
return item.key;
|
|
94948
95006
|
};
|
|
@@ -94976,23 +95034,18 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
94976
95034
|
});
|
|
94977
95035
|
}
|
|
94978
95036
|
|
|
94979
|
-
const
|
|
94980
|
-
|
|
94981
|
-
|
|
94982
|
-
style,
|
|
94983
|
-
data
|
|
94984
|
-
} = _ref;
|
|
94985
|
-
return this.renderTreeNode(data[index], index, style);
|
|
95037
|
+
const data = {
|
|
95038
|
+
visibleOptions: flattenNodes,
|
|
95039
|
+
renderOption: this.renderTreeNode
|
|
94986
95040
|
};
|
|
94987
|
-
|
|
94988
95041
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(autoSizer_AutoSizer, {
|
|
94989
95042
|
defaultHeight: virtualize.height,
|
|
94990
95043
|
defaultWidth: virtualize.width
|
|
94991
|
-
},
|
|
95044
|
+
}, _ref => {
|
|
94992
95045
|
let {
|
|
94993
95046
|
height,
|
|
94994
95047
|
width
|
|
94995
|
-
} =
|
|
95048
|
+
} = _ref;
|
|
94996
95049
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(FixedSizeList, {
|
|
94997
95050
|
itemCount: flattenNodes.length,
|
|
94998
95051
|
itemSize: virtualize.itemSize,
|
|
@@ -95000,12 +95053,12 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
95000
95053
|
width: width,
|
|
95001
95054
|
// @ts-ignore avoid strict check of itemKey
|
|
95002
95055
|
itemKey: this.itemKey,
|
|
95003
|
-
itemData:
|
|
95056
|
+
itemData: data,
|
|
95004
95057
|
className: `${prefixTree}-virtual-list`,
|
|
95005
95058
|
style: {
|
|
95006
95059
|
direction
|
|
95007
95060
|
}
|
|
95008
|
-
},
|
|
95061
|
+
}, virtualRow);
|
|
95009
95062
|
});
|
|
95010
95063
|
};
|
|
95011
95064
|
|
|
@@ -95315,11 +95368,11 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
95315
95368
|
};
|
|
95316
95369
|
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, super.adapter), filterAdapter), treeSelectAdapter), treeAdapter), {
|
|
95317
95370
|
updateLoadKeys: (data, resolve) => {
|
|
95318
|
-
this.setState(
|
|
95371
|
+
this.setState(_ref2 => {
|
|
95319
95372
|
let {
|
|
95320
95373
|
loadedKeys,
|
|
95321
95374
|
loadingKeys
|
|
95322
|
-
} =
|
|
95375
|
+
} = _ref2;
|
|
95323
95376
|
return this.foundation.handleNodeLoad(loadedKeys, loadingKeys, data, resolve);
|
|
95324
95377
|
});
|
|
95325
95378
|
},
|
|
@@ -95356,11 +95409,11 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
95356
95409
|
notifyChangeWithObject: (node, e) => {
|
|
95357
95410
|
this.props.onChange && this.props.onChange(node, e);
|
|
95358
95411
|
},
|
|
95359
|
-
notifyExpand: (expandedKeys,
|
|
95412
|
+
notifyExpand: (expandedKeys, _ref3) => {
|
|
95360
95413
|
let {
|
|
95361
95414
|
expanded: bool,
|
|
95362
95415
|
node
|
|
95363
|
-
} =
|
|
95416
|
+
} = _ref3;
|
|
95364
95417
|
this.props.onExpand && this.props.onExpand([...expandedKeys], {
|
|
95365
95418
|
expanded: bool,
|
|
95366
95419
|
node
|
|
@@ -102325,11 +102378,9 @@ class previewImageFoundation_PreviewImageFoundation extends foundation {
|
|
|
102325
102378
|
|
|
102326
102379
|
this.handleWindowResize = () => {
|
|
102327
102380
|
const {
|
|
102381
|
+
ratio,
|
|
102328
102382
|
setRatio
|
|
102329
102383
|
} = this.getProps();
|
|
102330
|
-
const {
|
|
102331
|
-
ratio
|
|
102332
|
-
} = this.getProps();
|
|
102333
102384
|
|
|
102334
102385
|
const {
|
|
102335
102386
|
originImageWidth,
|
|
@@ -103299,12 +103350,6 @@ class previewInnerFoundation_PreviewInnerFoundation extends foundation {
|
|
|
103299
103350
|
this._adapter.enabledBodyScroll();
|
|
103300
103351
|
}
|
|
103301
103352
|
|
|
103302
|
-
handleRatio(type) {
|
|
103303
|
-
this.setState({
|
|
103304
|
-
ratio: type
|
|
103305
|
-
});
|
|
103306
|
-
}
|
|
103307
|
-
|
|
103308
103353
|
}
|
|
103309
103354
|
// CONCATENATED MODULE: ./image/previewInner.tsx
|
|
103310
103355
|
|
|
@@ -103392,10 +103437,6 @@ class previewInner_PreviewInner extends baseComponent_BaseComponent {
|
|
|
103392
103437
|
this.foundation.handleMouseDown(e);
|
|
103393
103438
|
};
|
|
103394
103439
|
|
|
103395
|
-
this.handleRatio = type => {
|
|
103396
|
-
this.foundation.handleRatio(type);
|
|
103397
|
-
};
|
|
103398
|
-
|
|
103399
103440
|
this.state = {
|
|
103400
103441
|
imgSrc: [],
|
|
103401
103442
|
imgLoadStatus: new Map(),
|
|
@@ -103546,7 +103587,10 @@ class previewInner_PreviewInner extends baseComponent_BaseComponent {
|
|
|
103546
103587
|
}
|
|
103547
103588
|
|
|
103548
103589
|
if ("currentIndex" in props && props.currentIndex !== state.currentIndex) {
|
|
103549
|
-
willUpdateStates.currentIndex = props.currentIndex;
|
|
103590
|
+
willUpdateStates.currentIndex = props.currentIndex; // ratio will set to adaptation when change picture,
|
|
103591
|
+
// attention: If the ratio is controlled, the ratio should not change as the index changes
|
|
103592
|
+
|
|
103593
|
+
willUpdateStates.ratio = 'adaptation';
|
|
103550
103594
|
}
|
|
103551
103595
|
|
|
103552
103596
|
return willUpdateStates;
|
|
@@ -103668,7 +103712,7 @@ class previewInner_PreviewInner extends baseComponent_BaseComponent {
|
|
|
103668
103712
|
src: imgSrc[currentIndex],
|
|
103669
103713
|
onZoom: this.handleZoomImage,
|
|
103670
103714
|
disableDownload: disableDownload,
|
|
103671
|
-
setRatio: this.
|
|
103715
|
+
setRatio: this.handleAdjustRatio,
|
|
103672
103716
|
zoom: zoom,
|
|
103673
103717
|
ratio: ratio,
|
|
103674
103718
|
zoomStep: zoomStep,
|