@douyinfe/semi-ui 2.31.1 → 2.31.2
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 +45 -10
- 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/_utils/index.d.ts +2 -4
- package/lib/cjs/_utils/index.js +5 -5
- package/lib/cjs/navigation/Item.js +4 -2
- package/lib/cjs/navigation/nav-context.d.ts +2 -0
- package/lib/cjs/table/ResizableTable.js +1 -1
- package/lib/cjs/table/utils.d.ts +1 -0
- package/lib/cjs/table/utils.js +31 -1
- package/lib/es/_utils/index.d.ts +2 -4
- package/lib/es/_utils/index.js +5 -5
- package/lib/es/navigation/Item.js +4 -2
- package/lib/es/navigation/nav-context.d.ts +2 -0
- package/lib/es/table/ResizableTable.js +2 -2
- package/lib/es/table/utils.d.ts +1 -0
- package/lib/es/table/utils.js +27 -0
- package/package.json +8 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -7916,11 +7916,9 @@ function stopPropagation(e, noImmediate) {
|
|
|
7916
7916
|
}
|
|
7917
7917
|
}
|
|
7918
7918
|
/**
|
|
7919
|
-
*
|
|
7920
|
-
* @param {any} value
|
|
7921
|
-
* @param {Function} customizer
|
|
7922
|
-
* @returns {any}
|
|
7923
7919
|
* use in Table, Form, Navigation
|
|
7920
|
+
*
|
|
7921
|
+
* skip clone function and react element
|
|
7924
7922
|
*/
|
|
7925
7923
|
|
|
7926
7924
|
function cloneDeep(value, customizer) {
|
|
@@ -7935,7 +7933,9 @@ function cloneDeep(value, customizer) {
|
|
|
7935
7933
|
|
|
7936
7934
|
if (Object.prototype.toString.call(v) === '[object Error]') {
|
|
7937
7935
|
return v;
|
|
7938
|
-
}
|
|
7936
|
+
} // it is tricky
|
|
7937
|
+
// when array length beyond max length, array.length will be 0
|
|
7938
|
+
|
|
7939
7939
|
|
|
7940
7940
|
if (Array.isArray(v) && v.length === 0) {
|
|
7941
7941
|
const keys = Object.keys(v);
|
|
@@ -65245,12 +65245,14 @@ class Item_NavItem extends baseComponent_BaseComponent {
|
|
|
65245
65245
|
tooltipHideDelay,
|
|
65246
65246
|
tooltipShowDelay
|
|
65247
65247
|
} = this.props;
|
|
65248
|
+
const hideDelay = tooltipHideDelay !== null && tooltipHideDelay !== void 0 ? tooltipHideDelay : this.context.tooltipHideDelay;
|
|
65249
|
+
const showDelay = tooltipShowDelay !== null && tooltipShowDelay !== void 0 ? tooltipShowDelay : this.context.tooltipShowDelay;
|
|
65248
65250
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(tooltip_Tooltip, {
|
|
65249
65251
|
content: text,
|
|
65250
65252
|
position: "right",
|
|
65251
65253
|
trigger: 'hover',
|
|
65252
|
-
mouseEnterDelay:
|
|
65253
|
-
mouseLeaveDelay:
|
|
65254
|
+
mouseEnterDelay: showDelay,
|
|
65255
|
+
mouseLeaveDelay: hideDelay
|
|
65254
65256
|
}, node);
|
|
65255
65257
|
};
|
|
65256
65258
|
|
|
@@ -70608,7 +70610,8 @@ class foundation_SelectFoundation extends foundation {
|
|
|
70608
70610
|
handleValueChange(value) {
|
|
70609
70611
|
const {
|
|
70610
70612
|
allowCreate,
|
|
70611
|
-
autoClearSearchValue
|
|
70613
|
+
autoClearSearchValue,
|
|
70614
|
+
remote
|
|
70612
70615
|
} = this.getProps();
|
|
70613
70616
|
const {
|
|
70614
70617
|
inputValue
|
|
@@ -70628,7 +70631,7 @@ class foundation_SelectFoundation extends foundation {
|
|
|
70628
70631
|
|
|
70629
70632
|
this._adapter.rePositionDropdown();
|
|
70630
70633
|
|
|
70631
|
-
if (this._isFilterable() && !autoClearSearchValue && inputValue) {
|
|
70634
|
+
if (this._isFilterable() && !autoClearSearchValue && inputValue && !remote) {
|
|
70632
70635
|
originalOptions = this._filterOption(originalOptions, inputValue);
|
|
70633
70636
|
}
|
|
70634
70637
|
|
|
@@ -80419,6 +80422,11 @@ function mergeColumns() {
|
|
|
80419
80422
|
const finalColumns = [];
|
|
80420
80423
|
const clone = deep ? utils_cloneDeep : clone_default.a;
|
|
80421
80424
|
|
|
80425
|
+
if (deep) {
|
|
80426
|
+
const logger = new utils_Logger('[@douyinfe/semi-ui Table]');
|
|
80427
|
+
logger.warn('Should not deep merge columns from foundation since columns may have react elements. Merge columns deep from semi-ui');
|
|
80428
|
+
}
|
|
80429
|
+
|
|
80422
80430
|
map_default()(newColumns, newColumn => {
|
|
80423
80431
|
newColumn = Object.assign({}, newColumn);
|
|
80424
80432
|
const key = getColumnKey(newColumn, keyPropNames);
|
|
@@ -83497,6 +83505,10 @@ class bodyFoundation_TableBodyFoundation extends foundation {
|
|
|
83497
83505
|
|
|
83498
83506
|
|
|
83499
83507
|
|
|
83508
|
+
|
|
83509
|
+
|
|
83510
|
+
|
|
83511
|
+
|
|
83500
83512
|
let scrollbarVerticalSize, scrollbarHorizontalSize; // Measure scrollbar width for padding body during modal show/hide
|
|
83501
83513
|
|
|
83502
83514
|
const scrollbarMeasure = {
|
|
@@ -83600,6 +83612,29 @@ function mergeComponents(components, virtualized) {
|
|
|
83600
83612
|
}, components);
|
|
83601
83613
|
}
|
|
83602
83614
|
const utils_logger = new utils_Logger('[@douyinfe/semi-ui Table]');
|
|
83615
|
+
function utils_mergeColumns() {
|
|
83616
|
+
let oldColumns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
83617
|
+
let newColumns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
83618
|
+
let keyPropNames = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
83619
|
+
let deep = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
83620
|
+
const finalColumns = [];
|
|
83621
|
+
const clone = deep ? _utils["a" /* cloneDeep */] : clone_default.a;
|
|
83622
|
+
|
|
83623
|
+
map_default()(newColumns, newColumn => {
|
|
83624
|
+
newColumn = Object.assign({}, newColumn);
|
|
83625
|
+
const key = getColumnKey(newColumn, keyPropNames);
|
|
83626
|
+
|
|
83627
|
+
const oldColumn = key != null && find_default()(oldColumns, item => getColumnKey(item, keyPropNames) === key);
|
|
83628
|
+
|
|
83629
|
+
if (oldColumn) {
|
|
83630
|
+
finalColumns.push(clone(Object.assign(Object.assign({}, oldColumn), newColumn)));
|
|
83631
|
+
} else {
|
|
83632
|
+
finalColumns.push(clone(newColumn));
|
|
83633
|
+
}
|
|
83634
|
+
});
|
|
83635
|
+
|
|
83636
|
+
return finalColumns;
|
|
83637
|
+
}
|
|
83603
83638
|
|
|
83604
83639
|
// EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/lodash/stubTrue.js
|
|
83605
83640
|
var stubTrue = __webpack_require__("LF7v");
|
|
@@ -87425,7 +87460,7 @@ const ResizableTable = function () {
|
|
|
87425
87460
|
// If there is a resize value, the width does not use the default value fix#1072
|
|
87426
87461
|
const _newColumns = withResizeWidth(columns, newColumns);
|
|
87427
87462
|
|
|
87428
|
-
setColumns(
|
|
87463
|
+
setColumns(utils_mergeColumns(columns, _newColumns));
|
|
87429
87464
|
}, [propColumns, props.expandedRowRender, props.hideExpandedColumn, props.rowSelection]);
|
|
87430
87465
|
const components = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useMemo"])(() => merge_default()({
|
|
87431
87466
|
header: {
|