@douyinfe/semi-ui 2.1.0-beta.2 → 2.1.0-beta.3
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/css/semi.css +13 -1
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +259 -134
- 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/es/autoComplete/index.d.ts +36 -11
- package/lib/es/button/index.d.ts +0 -1
- package/lib/es/button/index.js +1 -2
- package/lib/es/calendar/dayCalendar.js +1 -1
- package/lib/es/calendar/monthCalendar.js +1 -1
- package/lib/es/calendar/rangeCalendar.js +1 -1
- package/lib/es/calendar/weekCalendar.js +1 -1
- package/lib/es/cascader/index.d.ts +1 -0
- package/lib/es/cascader/index.js +15 -3
- package/lib/es/collapse/index.js +1 -5
- package/lib/es/datePicker/yearAndMonth.d.ts +2 -2
- package/lib/es/datePicker/yearAndMonth.js +1 -1
- package/lib/es/form/baseForm.d.ts +4 -10
- package/lib/es/form/baseForm.js +1 -2
- package/lib/es/form/field.d.ts +4 -22
- package/lib/es/form/field.js +2 -18
- package/lib/es/form/hoc/withField.d.ts +1 -1
- package/lib/es/form/hoc/withField.js +0 -3
- package/lib/es/iconButton/index.d.ts +0 -1
- package/lib/es/iconButton/index.js +0 -1
- package/lib/es/locale/localeConsumer.d.ts +5 -5
- package/lib/es/modal/useModal/HookModal.d.ts +3 -2
- package/lib/es/modal/useModal/index.js +1 -1
- package/lib/es/notification/index.d.ts +1 -1
- package/lib/es/notification/index.js +1 -1
- package/lib/es/popconfirm/index.d.ts +5 -1
- package/lib/es/popconfirm/index.js +10 -4
- package/lib/es/popover/index.d.ts +3 -1
- package/lib/es/popover/index.js +4 -8
- package/lib/es/radio/context.d.ts +1 -1
- package/lib/es/radio/radio.d.ts +2 -2
- package/lib/es/radio/radioGroup.d.ts +4 -4
- package/lib/es/rating/index.d.ts +1 -1
- package/lib/es/resizeObserver/index.js +1 -0
- package/lib/es/scrollList/scrollItem.d.ts +12 -11
- package/lib/es/scrollList/scrollItem.js +8 -8
- package/lib/es/select/index.js +18 -11
- package/lib/es/select/option.js +4 -4
- package/lib/es/select/utils.d.ts +1 -1
- package/lib/es/select/utils.js +12 -8
- package/lib/es/sideSheet/SideSheetContent.d.ts +1 -1
- package/lib/es/sideSheet/index.d.ts +3 -3
- package/lib/es/steps/basicSteps.js +2 -2
- package/lib/es/steps/fillSteps.js +3 -3
- package/lib/es/steps/navSteps.js +2 -2
- package/lib/es/tabs/TabBar.d.ts +5 -3
- package/lib/es/tabs/TabBar.js +12 -4
- package/lib/es/tabs/TabPane.d.ts +2 -1
- package/lib/es/tabs/TabPane.js +3 -2
- package/lib/es/tabs/index.d.ts +3 -1
- package/lib/es/tabs/index.js +85 -16
- package/lib/es/tabs/interface.d.ts +6 -1
- package/lib/es/tagInput/index.d.ts +3 -0
- package/lib/es/tagInput/index.js +6 -1
- package/lib/es/timePicker/Combobox.d.ts +10 -4
- package/lib/es/timePicker/Combobox.js +2 -1
- package/lib/es/timePicker/TimePicker.d.ts +1 -1
- package/lib/es/tooltip/index.d.ts +3 -0
- package/lib/es/tooltip/index.js +3 -0
- package/lib/es/tree/interface.d.ts +2 -2
- package/lib/es/treeSelect/index.d.ts +2 -11
- package/lib/es/treeSelect/index.js +2 -1
- package/lib/es/typography/base.d.ts +1 -1
- package/lib/es/typography/paragraph.d.ts +1 -1
- package/lib/es/typography/text.d.ts +1 -1
- package/lib/es/typography/title.d.ts +1 -1
- package/lib/es/upload/fileCard.d.ts +3 -18
- package/lib/es/upload/index.d.ts +4 -57
- package/lib/es/upload/interface.d.ts +56 -0
- package/lib/es/upload/interface.js +1 -0
- package/package.json +9 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -15172,6 +15172,28 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_faye__;
|
|
|
15172
15172
|
|
|
15173
15173
|
/***/ }),
|
|
15174
15174
|
|
|
15175
|
+
/***/ "ffXp":
|
|
15176
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
15177
|
+
|
|
15178
|
+
"use strict";
|
|
15179
|
+
/* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("r6MD");
|
|
15180
|
+
|
|
15181
|
+
|
|
15182
|
+
const log = function (text) {
|
|
15183
|
+
if (Object(lodash_es__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(process, 'env.NODE_ENV') === 'development') {
|
|
15184
|
+
for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
15185
|
+
rest[_key - 1] = arguments[_key];
|
|
15186
|
+
}
|
|
15187
|
+
|
|
15188
|
+
console.log(text, ...rest);
|
|
15189
|
+
}
|
|
15190
|
+
};
|
|
15191
|
+
|
|
15192
|
+
/* harmony default export */ __webpack_exports__["a"] = (log);
|
|
15193
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("F63i")))
|
|
15194
|
+
|
|
15195
|
+
/***/ }),
|
|
15196
|
+
|
|
15175
15197
|
/***/ "fw2E":
|
|
15176
15198
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
15177
15199
|
|
|
@@ -18230,12 +18252,9 @@ const strings = {
|
|
|
18230
18252
|
var core_js_stable_set = __webpack_require__("ZIXj");
|
|
18231
18253
|
var set_default = /*#__PURE__*/__webpack_require__.n(core_js_stable_set);
|
|
18232
18254
|
|
|
18233
|
-
//
|
|
18234
|
-
|
|
18235
|
-
if (false) { var _len, rest, _key; }
|
|
18236
|
-
};
|
|
18255
|
+
// EXTERNAL MODULE: ../semi-foundation/utils/log.ts
|
|
18256
|
+
var log = __webpack_require__("ffXp");
|
|
18237
18257
|
|
|
18238
|
-
/* harmony default export */ var utils_log = (log);
|
|
18239
18258
|
// CONCATENATED MODULE: /home/runner/work/semi-design/semi-design/node_modules/lodash-es/noop.js
|
|
18240
18259
|
/**
|
|
18241
18260
|
* This method returns `undefined`.
|
|
@@ -18380,7 +18399,7 @@ class foundation_BaseFoundation {
|
|
|
18380
18399
|
rest[_key - 1] = arguments[_key];
|
|
18381
18400
|
}
|
|
18382
18401
|
|
|
18383
|
-
|
|
18402
|
+
Object(log["a" /* default */])(text, ...rest);
|
|
18384
18403
|
}
|
|
18385
18404
|
|
|
18386
18405
|
}
|
|
@@ -18772,7 +18791,7 @@ class baseComponent_BaseComponent extends external_root_React_commonjs2_react_co
|
|
|
18772
18791
|
rest[_key - 1] = arguments[_key];
|
|
18773
18792
|
}
|
|
18774
18793
|
|
|
18775
|
-
return
|
|
18794
|
+
return Object(log["a" /* default */])(text, ...rest);
|
|
18776
18795
|
}
|
|
18777
18796
|
|
|
18778
18797
|
}
|
|
@@ -20419,6 +20438,9 @@ class foundation_Tooltip extends foundation {
|
|
|
20419
20438
|
this._adapter.insertPortal(content, position);
|
|
20420
20439
|
|
|
20421
20440
|
if (trigger === 'custom') {
|
|
20441
|
+
// eslint-disable-next-line
|
|
20442
|
+
this._adapter.registerClickOutsideHandler(() => {});
|
|
20443
|
+
|
|
20422
20444
|
this._togglePortalVisible(true);
|
|
20423
20445
|
}
|
|
20424
20446
|
/**
|
|
@@ -20541,12 +20563,12 @@ class foundation_Tooltip extends foundation {
|
|
|
20541
20563
|
}
|
|
20542
20564
|
|
|
20543
20565
|
_bindEvent() {
|
|
20544
|
-
const
|
|
20566
|
+
const trigger = this.getProp('trigger'); // get trigger type
|
|
20545
20567
|
|
|
20546
20568
|
const {
|
|
20547
20569
|
triggerEventSet,
|
|
20548
20570
|
portalEventSet
|
|
20549
|
-
} = this._generateEvent(
|
|
20571
|
+
} = this._generateEvent(trigger);
|
|
20550
20572
|
|
|
20551
20573
|
this._bindTriggerEvent(triggerEventSet);
|
|
20552
20574
|
|
|
@@ -23659,6 +23681,7 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
|
|
|
23659
23681
|
popupEl = external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.findDOMNode(popupEl);
|
|
23660
23682
|
|
|
23661
23683
|
if (el && !el.contains(e.target) && popupEl && !popupEl.contains(e.target) || this.props.clickTriggerToHide) {
|
|
23684
|
+
this.props.onClickOutSide(e);
|
|
23662
23685
|
cb();
|
|
23663
23686
|
}
|
|
23664
23687
|
};
|
|
@@ -23857,6 +23880,7 @@ tooltip_Tooltip.propTypes = {
|
|
|
23857
23880
|
content: prop_types_default.a.node,
|
|
23858
23881
|
prefixCls: prop_types_default.a.string,
|
|
23859
23882
|
onVisibleChange: prop_types_default.a.func,
|
|
23883
|
+
onClickOutSide: prop_types_default.a.func,
|
|
23860
23884
|
spacing: prop_types_default.a.number,
|
|
23861
23885
|
showArrow: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.node]),
|
|
23862
23886
|
zIndex: prop_types_default.a.number,
|
|
@@ -23882,6 +23906,7 @@ tooltip_Tooltip.defaultProps = {
|
|
|
23882
23906
|
mouseEnterDelay: numbers.MOUSE_ENTER_DELAY,
|
|
23883
23907
|
mouseLeaveDelay: numbers.MOUSE_LEAVE_DELAY,
|
|
23884
23908
|
onVisibleChange: lodash_es_noop,
|
|
23909
|
+
onClickOutSide: lodash_es_noop,
|
|
23885
23910
|
spacing: numbers.SPACING,
|
|
23886
23911
|
showArrow: true,
|
|
23887
23912
|
arrowBounding: numbers.ARROW_BOUNDING
|
|
@@ -24821,7 +24846,9 @@ const Icon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd
|
|
|
24821
24846
|
className: classes,
|
|
24822
24847
|
style: outerStyle
|
|
24823
24848
|
}, restProps), svg);
|
|
24824
|
-
});
|
|
24849
|
+
}); // @ts-ignore used to judge whether it is a semi-icon in semi-ui
|
|
24850
|
+
// custom icon case
|
|
24851
|
+
|
|
24825
24852
|
Icon.elementType = 'Icon';
|
|
24826
24853
|
|
|
24827
24854
|
const convertIcon = (Svg, iconType) => {
|
|
@@ -24829,7 +24856,9 @@ const convertIcon = (Svg, iconType) => {
|
|
|
24829
24856
|
svg: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Svg),
|
|
24830
24857
|
type: iconType,
|
|
24831
24858
|
ref: ref
|
|
24832
|
-
}, props)));
|
|
24859
|
+
}, props))); // @ts-ignore used to judge whether it is a semi-icon in semi-ui
|
|
24860
|
+
// builtin icon case
|
|
24861
|
+
|
|
24833
24862
|
InnerIcon.elementType = 'Icon';
|
|
24834
24863
|
return InnerIcon;
|
|
24835
24864
|
};
|
|
@@ -26156,7 +26185,6 @@ const IconUpload_IconComponent = convertIcon(IconUpload_SvgComponent, 'upload');
|
|
|
26156
26185
|
|
|
26157
26186
|
|
|
26158
26187
|
|
|
26159
|
-
|
|
26160
26188
|
|
|
26161
26189
|
|
|
26162
26190
|
// CONCATENATED MODULE: ../semi-icons/lib/es/index.js
|
|
@@ -26858,17 +26886,11 @@ var popover_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
26858
26886
|
|
|
26859
26887
|
|
|
26860
26888
|
|
|
26889
|
+
|
|
26861
26890
|
const popover_positionSet = popover_constants_strings.POSITION_SET;
|
|
26862
26891
|
const popover_triggerSet = popover_constants_strings.TRIGGER_SET;
|
|
26863
26892
|
|
|
26864
26893
|
class popover_Popover extends external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.PureComponent {
|
|
26865
|
-
constructor(props) {
|
|
26866
|
-
super(props);
|
|
26867
|
-
this.state = {
|
|
26868
|
-
popConfirmVisible: false
|
|
26869
|
-
};
|
|
26870
|
-
}
|
|
26871
|
-
|
|
26872
26894
|
renderPopCard() {
|
|
26873
26895
|
const {
|
|
26874
26896
|
content,
|
|
@@ -26944,6 +26966,7 @@ popover_Popover.propTypes = {
|
|
|
26944
26966
|
trigger: prop_types_default.a.oneOf(popover_triggerSet).isRequired,
|
|
26945
26967
|
contentClassName: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.array]),
|
|
26946
26968
|
onVisibleChange: prop_types_default.a.func,
|
|
26969
|
+
onClickOutSide: prop_types_default.a.func,
|
|
26947
26970
|
style: prop_types_default.a.object,
|
|
26948
26971
|
spacing: prop_types_default.a.number,
|
|
26949
26972
|
zIndex: prop_types_default.a.number,
|
|
@@ -26967,7 +26990,8 @@ popover_Popover.defaultProps = {
|
|
|
26967
26990
|
cancelText: 'No',
|
|
26968
26991
|
okText: 'Yes',
|
|
26969
26992
|
position: 'bottom',
|
|
26970
|
-
prefixCls: popover_constants_cssClasses.PREFIX
|
|
26993
|
+
prefixCls: popover_constants_cssClasses.PREFIX,
|
|
26994
|
+
onClickOutSide: lodash_es_noop
|
|
26971
26995
|
};
|
|
26972
26996
|
/* harmony default export */ var popover_0 = (popover_Popover);
|
|
26973
26997
|
// CONCATENATED MODULE: ./typography/util.tsx
|
|
@@ -31451,14 +31475,14 @@ class option_Option extends external_root_React_commonjs2_react_commonjs_react_a
|
|
|
31451
31475
|
style: style
|
|
31452
31476
|
}, showTick ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
31453
31477
|
className: selectedIconClassName
|
|
31454
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconTick, null)) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
31478
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconTick, null)) : null, Object(isString["a" /* default */])(children) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
31455
31479
|
className: "".concat(prefixCls, "-text")
|
|
31456
31480
|
}, this.renderOptionContent({
|
|
31457
31481
|
children,
|
|
31458
31482
|
config,
|
|
31459
31483
|
inputValue,
|
|
31460
31484
|
prefixCls
|
|
31461
|
-
})));
|
|
31485
|
+
})) : children);
|
|
31462
31486
|
}
|
|
31463
31487
|
|
|
31464
31488
|
}
|
|
@@ -32652,7 +32676,6 @@ iconButton_IconButton.propTypes = {
|
|
|
32652
32676
|
loading: prop_types_default.a.bool,
|
|
32653
32677
|
prefixCls: prop_types_default.a.string,
|
|
32654
32678
|
icon: prop_types_default.a.oneOfType([prop_types_default.a.object, prop_types_default.a.string, prop_types_default.a.node]),
|
|
32655
|
-
iconType: prop_types_default.a.element,
|
|
32656
32679
|
iconSize: prop_types_default.a.oneOf(iconSizes),
|
|
32657
32680
|
noHorizontalPadding: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.string, prop_types_default.a.array]),
|
|
32658
32681
|
children: prop_types_default.a.node,
|
|
@@ -33668,8 +33691,7 @@ class button_Button extends external_root_React_commonjs2_react_commonjs_react_a
|
|
|
33668
33691
|
render() {
|
|
33669
33692
|
const props = assign_default()({}, this.props);
|
|
33670
33693
|
|
|
33671
|
-
const hasIcon = Boolean(props.icon
|
|
33672
|
-
|
|
33694
|
+
const hasIcon = Boolean(props.icon);
|
|
33673
33695
|
const isLoading = Boolean(props.loading);
|
|
33674
33696
|
const isDisabled = Boolean(props.disabled);
|
|
33675
33697
|
|
|
@@ -38409,7 +38431,7 @@ class dayCalendar_DayCalendar extends baseComponent_BaseComponent {
|
|
|
38409
38431
|
},
|
|
38410
38432
|
setParsedEvents: parsedEvents => {
|
|
38411
38433
|
this.setState({
|
|
38412
|
-
parsedEvents
|
|
38434
|
+
parsedEvents: parsedEvents
|
|
38413
38435
|
});
|
|
38414
38436
|
},
|
|
38415
38437
|
cacheEventKeys: cachedKeys => {
|
|
@@ -38731,7 +38753,7 @@ class weekCalendar_WeekCalendar extends baseComponent_BaseComponent {
|
|
|
38731
38753
|
},
|
|
38732
38754
|
setParsedEvents: parsedEvents => {
|
|
38733
38755
|
this.setState({
|
|
38734
|
-
parsedEvents
|
|
38756
|
+
parsedEvents: parsedEvents
|
|
38735
38757
|
});
|
|
38736
38758
|
},
|
|
38737
38759
|
cacheEventKeys: cachedKeys => {
|
|
@@ -39159,7 +39181,7 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
|
|
|
39159
39181
|
},
|
|
39160
39182
|
setParsedEvents: parsedEvents => {
|
|
39161
39183
|
this.setState({
|
|
39162
|
-
parsedEvents
|
|
39184
|
+
parsedEvents: parsedEvents
|
|
39163
39185
|
});
|
|
39164
39186
|
},
|
|
39165
39187
|
setItemLimit: itemLimit => {
|
|
@@ -39472,7 +39494,7 @@ class rangeCalendar_RangeCalendar extends baseComponent_BaseComponent {
|
|
|
39472
39494
|
},
|
|
39473
39495
|
setParsedEvents: parsedEvents => {
|
|
39474
39496
|
this.setState({
|
|
39475
|
-
parsedEvents
|
|
39497
|
+
parsedEvents: parsedEvents
|
|
39476
39498
|
});
|
|
39477
39499
|
},
|
|
39478
39500
|
cacheEventKeys: cachedKeys => {
|
|
@@ -41193,6 +41215,7 @@ function max_max(array) {
|
|
|
41193
41215
|
|
|
41194
41216
|
|
|
41195
41217
|
|
|
41218
|
+
|
|
41196
41219
|
/**
|
|
41197
41220
|
* Part of the utils function implementation process reference
|
|
41198
41221
|
* https://github.com/react-component/tree/blob/master/src/util.tsx
|
|
@@ -41695,7 +41718,9 @@ function normalizeKeyList(keyList, keyEntities) {
|
|
|
41695
41718
|
res.push(key);
|
|
41696
41719
|
});
|
|
41697
41720
|
} else {
|
|
41698
|
-
|
|
41721
|
+
var _context8;
|
|
41722
|
+
|
|
41723
|
+
res = filter_default()(_context8 = from_default()(keyList)).call(_context8, key => keyEntities[key] && !treeUtil_isValid(keyEntities[key].children));
|
|
41699
41724
|
}
|
|
41700
41725
|
|
|
41701
41726
|
return res;
|
|
@@ -41704,9 +41729,9 @@ function getMotionKeys(eventKey, expandedKeys, keyEntities) {
|
|
|
41704
41729
|
const res = [];
|
|
41705
41730
|
|
|
41706
41731
|
const getChild = itemKey => {
|
|
41707
|
-
var
|
|
41732
|
+
var _context9;
|
|
41708
41733
|
|
|
41709
|
-
keyEntities[itemKey].children && for_each_default()(
|
|
41734
|
+
keyEntities[itemKey].children && for_each_default()(_context9 = keyEntities[itemKey].children).call(_context9, item => {
|
|
41710
41735
|
const {
|
|
41711
41736
|
key
|
|
41712
41737
|
} = item;
|
|
@@ -41822,7 +41847,7 @@ function calcCheckedKeysForUnchecked(key, keyEntities, checkedKeys, halfCheckedK
|
|
|
41822
41847
|
};
|
|
41823
41848
|
}
|
|
41824
41849
|
function filterTreeData(info) {
|
|
41825
|
-
var
|
|
41850
|
+
var _context10, _context11;
|
|
41826
41851
|
|
|
41827
41852
|
const {
|
|
41828
41853
|
showFilteredOnly,
|
|
@@ -41834,7 +41859,7 @@ function filterTreeData(info) {
|
|
|
41834
41859
|
prevExpandedKeys
|
|
41835
41860
|
} = info;
|
|
41836
41861
|
let filteredOptsKeys = [];
|
|
41837
|
-
filteredOptsKeys = map_default()(
|
|
41862
|
+
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);
|
|
41838
41863
|
let expandedOptsKeys = findAncestorKeys(filteredOptsKeys, keyEntities, false);
|
|
41839
41864
|
|
|
41840
41865
|
if (prevExpandedKeys.length) {
|
|
@@ -41875,9 +41900,9 @@ function updateKeys(keySet, keyEntities) {
|
|
|
41875
41900
|
return filter_default()(keyArr).call(keyArr, key => key in keyEntities);
|
|
41876
41901
|
}
|
|
41877
41902
|
function calcDisabledKeys(keyEntities) {
|
|
41878
|
-
var
|
|
41903
|
+
var _context12;
|
|
41879
41904
|
|
|
41880
|
-
const disabledKeys = filter_default()(
|
|
41905
|
+
const disabledKeys = filter_default()(_context12 = keys_default()(keyEntities)).call(_context12, key => keyEntities[key].data.disabled);
|
|
41881
41906
|
|
|
41882
41907
|
const {
|
|
41883
41908
|
checkedKeys
|
|
@@ -44361,6 +44386,8 @@ class foundation_TagInputFoundation extends foundation {
|
|
|
44361
44386
|
|
|
44362
44387
|
this._onRemove(newTagList, removedTag, length - 1);
|
|
44363
44388
|
}
|
|
44389
|
+
|
|
44390
|
+
this._adapter.notifyKeyDown(e);
|
|
44364
44391
|
};
|
|
44365
44392
|
}
|
|
44366
44393
|
|
|
@@ -44620,6 +44647,9 @@ class tagInput_TagInput extends baseComponent_BaseComponent {
|
|
|
44620
44647
|
},
|
|
44621
44648
|
notifyTagRemove: (v, idx) => {
|
|
44622
44649
|
this.props.onRemove(v, idx);
|
|
44650
|
+
},
|
|
44651
|
+
notifyKeyDown: e => {
|
|
44652
|
+
this.props.onKeyDown(e);
|
|
44623
44653
|
}
|
|
44624
44654
|
});
|
|
44625
44655
|
}
|
|
@@ -44868,6 +44898,7 @@ tagInput_TagInput.propTypes = {
|
|
|
44868
44898
|
onInputExceed: prop_types_default.a.func,
|
|
44869
44899
|
onAdd: prop_types_default.a.func,
|
|
44870
44900
|
onRemove: prop_types_default.a.func,
|
|
44901
|
+
onKeyDown: prop_types_default.a.func,
|
|
44871
44902
|
size: prop_types_default.a.oneOf(tagInput_constants_strings.SIZE_SET),
|
|
44872
44903
|
validateStatus: prop_types_default.a.oneOf(tagInput_constants_strings.STATUS),
|
|
44873
44904
|
prefix: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.node]),
|
|
@@ -44890,7 +44921,8 @@ tagInput_TagInput.defaultProps = {
|
|
|
44890
44921
|
onExceed: lodash_es_noop,
|
|
44891
44922
|
onInputExceed: lodash_es_noop,
|
|
44892
44923
|
onAdd: lodash_es_noop,
|
|
44893
|
-
onRemove: lodash_es_noop
|
|
44924
|
+
onRemove: lodash_es_noop,
|
|
44925
|
+
onKeyDown: lodash_es_noop
|
|
44894
44926
|
};
|
|
44895
44927
|
/* harmony default export */ var tagInput_0 = (tagInput_TagInput);
|
|
44896
44928
|
// CONCATENATED MODULE: ./cascader/index.tsx
|
|
@@ -44921,6 +44953,7 @@ tagInput_TagInput.defaultProps = {
|
|
|
44921
44953
|
|
|
44922
44954
|
|
|
44923
44955
|
|
|
44956
|
+
|
|
44924
44957
|
|
|
44925
44958
|
|
|
44926
44959
|
const cascader_prefixcls = cascader_constants_cssClasses.PREFIX;
|
|
@@ -45169,15 +45202,27 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
45169
45202
|
this.renderCustomTrigger = () => {
|
|
45170
45203
|
const {
|
|
45171
45204
|
disabled,
|
|
45172
|
-
triggerRender
|
|
45205
|
+
triggerRender,
|
|
45206
|
+
multiple,
|
|
45207
|
+
autoMergeValue
|
|
45173
45208
|
} = this.props;
|
|
45174
45209
|
const {
|
|
45175
45210
|
selectedKeys,
|
|
45176
45211
|
inputValue,
|
|
45177
|
-
inputPlaceHolder
|
|
45212
|
+
inputPlaceHolder,
|
|
45213
|
+
mergedCheckedKeys,
|
|
45214
|
+
checkedKeys
|
|
45178
45215
|
} = this.state;
|
|
45216
|
+
let realValue;
|
|
45217
|
+
|
|
45218
|
+
if (multiple) {
|
|
45219
|
+
realValue = autoMergeValue ? mergedCheckedKeys : checkedKeys;
|
|
45220
|
+
} else {
|
|
45221
|
+
realValue = [...selectedKeys][0];
|
|
45222
|
+
}
|
|
45223
|
+
|
|
45179
45224
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(trigger_0, {
|
|
45180
|
-
value:
|
|
45225
|
+
value: realValue,
|
|
45181
45226
|
inputValue: inputValue,
|
|
45182
45227
|
onChange: this.handleInputChange,
|
|
45183
45228
|
onClear: this.handleClear,
|
|
@@ -46226,12 +46271,8 @@ class collapse_Collapse extends baseComponent_BaseComponent {
|
|
|
46226
46271
|
}
|
|
46227
46272
|
|
|
46228
46273
|
get adapter() {
|
|
46229
|
-
var _this = this;
|
|
46230
|
-
|
|
46231
46274
|
return assign_default()(assign_default()({}, super.adapter), {
|
|
46232
|
-
handleChange:
|
|
46233
|
-
return _this.props.onChange(...arguments);
|
|
46234
|
-
},
|
|
46275
|
+
handleChange: (activeKey, e) => this.props.onChange(activeKey, e),
|
|
46235
46276
|
addActiveKey: activeSet => this.setState({
|
|
46236
46277
|
activeSet
|
|
46237
46278
|
})
|
|
@@ -55705,14 +55746,6 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
|
|
|
55705
55746
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
55706
55747
|
super(props);
|
|
55707
55748
|
_this = this;
|
|
55708
|
-
this.throttledAdjustList = lodash_es_throttle((e, nearestNode) => {
|
|
55709
|
-
this.foundation.adjustInfiniteList(this.list, this.wrapper, nearestNode);
|
|
55710
|
-
}, scrollItem_msPerFrame);
|
|
55711
|
-
this.debouncedSelect = lodash_es_debounce((e, nearestNode) => {
|
|
55712
|
-
this._cacheSelectedNode(nearestNode);
|
|
55713
|
-
|
|
55714
|
-
this.foundation.selectNode(nearestNode, this.list);
|
|
55715
|
-
}, scrollItem_msPerFrame * 5);
|
|
55716
55749
|
|
|
55717
55750
|
this._cacheNode = (name, node) => name && node && Object.prototype.hasOwnProperty.call(this, name) && (this[name] = node);
|
|
55718
55751
|
|
|
@@ -56078,6 +56111,14 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
|
|
|
56078
56111
|
this.scrollAnimation = null; // cache if select action comes from outside
|
|
56079
56112
|
|
|
56080
56113
|
this.foundation = new itemFoundation_ItemFoundation(this.adapter);
|
|
56114
|
+
this.throttledAdjustList = lodash_es_throttle((e, nearestNode) => {
|
|
56115
|
+
this.foundation.adjustInfiniteList(this.list, this.wrapper, nearestNode);
|
|
56116
|
+
}, scrollItem_msPerFrame);
|
|
56117
|
+
this.debouncedSelect = lodash_es_debounce((e, nearestNode) => {
|
|
56118
|
+
this._cacheSelectedNode(nearestNode);
|
|
56119
|
+
|
|
56120
|
+
this.foundation.selectNode(nearestNode, this.list);
|
|
56121
|
+
}, scrollItem_msPerFrame * 5);
|
|
56081
56122
|
}
|
|
56082
56123
|
|
|
56083
56124
|
get adapter() {
|
|
@@ -56484,7 +56525,8 @@ class Combobox_Combobox extends baseComponent_BaseComponent {
|
|
|
56484
56525
|
this.onItemChange = _ref => {
|
|
56485
56526
|
let {
|
|
56486
56527
|
type,
|
|
56487
|
-
value
|
|
56528
|
+
value,
|
|
56529
|
+
disabled
|
|
56488
56530
|
} = _ref;
|
|
56489
56531
|
// eslint-disable-next-line prefer-const
|
|
56490
56532
|
let {
|
|
@@ -57063,7 +57105,7 @@ class yearAndMonth_YearAndMonth extends baseComponent_BaseComponent {
|
|
|
57063
57105
|
className: prefix
|
|
57064
57106
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
57065
57107
|
noHorizontalPadding: false,
|
|
57066
|
-
|
|
57108
|
+
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
|
|
57067
57109
|
size: iconSize
|
|
57068
57110
|
}),
|
|
57069
57111
|
size: buttonSize,
|
|
@@ -66318,7 +66360,7 @@ class notification_NotificationList extends baseComponent_BaseComponent {
|
|
|
66318
66360
|
this.add = noticeOpts => this.foundation.addNotice(noticeOpts);
|
|
66319
66361
|
|
|
66320
66362
|
this.remove = id => {
|
|
66321
|
-
this.foundation.removeNotice(id);
|
|
66363
|
+
this.foundation.removeNotice(String(id));
|
|
66322
66364
|
};
|
|
66323
66365
|
|
|
66324
66366
|
this.destroyAll = () => this.foundation.destroyAll();
|
|
@@ -66609,6 +66651,7 @@ class resizeObserver_ReactResizeObserver extends baseComponent_BaseComponent {
|
|
|
66609
66651
|
// using findDOMNode for two reasons:
|
|
66610
66652
|
// 1. cloning to insert a ref is unwieldy and not performant.
|
|
66611
66653
|
// 2. ensure that we resolve to an actual DOM node (instead of any JSX ref instance).
|
|
66654
|
+
// eslint-disable-next-line
|
|
66612
66655
|
return Object(external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_["findDOMNode"])(this.childNode || this);
|
|
66613
66656
|
} catch (error) {
|
|
66614
66657
|
// swallow error if findDOMNode is run on unmounted component.
|
|
@@ -69899,12 +69942,14 @@ class foundation_SelectFoundation extends foundation {
|
|
|
69899
69942
|
let optionNotExist = {
|
|
69900
69943
|
value: propValue,
|
|
69901
69944
|
label: propValue,
|
|
69902
|
-
_notExist: true
|
|
69945
|
+
_notExist: true,
|
|
69946
|
+
_scrollIndex: -1
|
|
69903
69947
|
};
|
|
69904
69948
|
|
|
69905
69949
|
if (onChangeWithObject) {
|
|
69906
69950
|
optionNotExist = assign_default()(assign_default()({}, propValue), {
|
|
69907
|
-
_notExist: true
|
|
69951
|
+
_notExist: true,
|
|
69952
|
+
_scrollIndex: -1
|
|
69908
69953
|
});
|
|
69909
69954
|
}
|
|
69910
69955
|
|
|
@@ -69963,7 +70008,9 @@ class foundation_SelectFoundation extends foundation {
|
|
|
69963
70008
|
onChangeWithObject ? optionNotExist = assign_default()(assign_default()({}, propValue[i]), {
|
|
69964
70009
|
_notExist: true
|
|
69965
70010
|
}) : null;
|
|
69966
|
-
selections.set(optionNotExist.label, optionNotExist)
|
|
70011
|
+
selections.set(optionNotExist.label, assign_default()(assign_default()({}, optionNotExist), {
|
|
70012
|
+
_scrollIndex: -1
|
|
70013
|
+
}));
|
|
69967
70014
|
}
|
|
69968
70015
|
}
|
|
69969
70016
|
});
|
|
@@ -70148,7 +70195,7 @@ class foundation_SelectFoundation extends foundation {
|
|
|
70148
70195
|
this._adapter.notifyMaxLimit(assign_default()({
|
|
70149
70196
|
value,
|
|
70150
70197
|
label
|
|
70151
|
-
}, rest));
|
|
70198
|
+
}, lodash_es_omit(rest, '_scrollIndex')));
|
|
70152
70199
|
|
|
70153
70200
|
return;
|
|
70154
70201
|
} else {
|
|
@@ -70649,6 +70696,7 @@ class foundation_SelectFoundation extends foundation {
|
|
|
70649
70696
|
delete option._parentGroup;
|
|
70650
70697
|
delete option._show;
|
|
70651
70698
|
delete option._selected;
|
|
70699
|
+
delete option._scrollIndex;
|
|
70652
70700
|
|
|
70653
70701
|
if ('_keyInOptionList' in option) {
|
|
70654
70702
|
option.key = option._keyInOptionList;
|
|
@@ -70985,7 +71033,7 @@ var utils_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
70985
71033
|
|
|
70986
71034
|
|
|
70987
71035
|
|
|
70988
|
-
const generateOption = (child, parent) => {
|
|
71036
|
+
const generateOption = (child, parent, index) => {
|
|
70989
71037
|
const childProps = child.props;
|
|
70990
71038
|
|
|
70991
71039
|
if (!child || !childProps) {
|
|
@@ -70997,7 +71045,8 @@ const generateOption = (child, parent) => {
|
|
|
70997
71045
|
// Drop-down menu rendering priority label value, children, value in turn downgrade
|
|
70998
71046
|
label: childProps.label || childProps.children || childProps.value,
|
|
70999
71047
|
_show: true,
|
|
71000
|
-
_selected: false
|
|
71048
|
+
_selected: false,
|
|
71049
|
+
_scrollIndex: index
|
|
71001
71050
|
}, childProps), {
|
|
71002
71051
|
_parentGroup: parent
|
|
71003
71052
|
});
|
|
@@ -71006,8 +71055,6 @@ const generateOption = (child, parent) => {
|
|
|
71006
71055
|
};
|
|
71007
71056
|
|
|
71008
71057
|
const getOptionsFromGroup = selectChildren => {
|
|
71009
|
-
var _context;
|
|
71010
|
-
|
|
71011
71058
|
let optionGroups = [];
|
|
71012
71059
|
let options = [];
|
|
71013
71060
|
const emptyGroup = {
|
|
@@ -71017,14 +71064,16 @@ const getOptionsFromGroup = selectChildren => {
|
|
|
71017
71064
|
}; // avoid null
|
|
71018
71065
|
// eslint-disable-next-line max-len
|
|
71019
71066
|
|
|
71020
|
-
|
|
71021
|
-
|
|
71067
|
+
let childNodes = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(selectChildren);
|
|
71068
|
+
childNodes = filter_default()(childNodes).call(childNodes, childNode => childNode && childNode.props);
|
|
71022
71069
|
let type = '';
|
|
71070
|
+
let optionIndex = -1;
|
|
71023
71071
|
|
|
71024
71072
|
for_each_default()(childNodes).call(childNodes, child => {
|
|
71025
71073
|
if (child.type.isSelectOption) {
|
|
71026
71074
|
type = 'option';
|
|
71027
|
-
|
|
71075
|
+
optionIndex++;
|
|
71076
|
+
const option = generateOption(child, undefined, optionIndex);
|
|
71028
71077
|
emptyGroup.children.push(option);
|
|
71029
71078
|
options.push(option);
|
|
71030
71079
|
} else if (child.type.isSelectOptionGroup) {
|
|
@@ -71039,7 +71088,10 @@ const getOptionsFromGroup = selectChildren => {
|
|
|
71039
71088
|
|
|
71040
71089
|
children = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(children);
|
|
71041
71090
|
|
|
71042
|
-
const childrenOption = map_default()(children).call(children, option =>
|
|
71091
|
+
const childrenOption = map_default()(children).call(children, option => {
|
|
71092
|
+
optionIndex++;
|
|
71093
|
+
return generateOption(option, restGroupProps, optionIndex);
|
|
71094
|
+
});
|
|
71043
71095
|
|
|
71044
71096
|
const group = assign_default()(assign_default()({}, child.props), {
|
|
71045
71097
|
children: childrenOption,
|
|
@@ -71304,9 +71356,10 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
71304
71356
|
} = _this.props;
|
|
71305
71357
|
|
|
71306
71358
|
if (optionList && optionList.length) {
|
|
71307
|
-
options = map_default()(optionList).call(optionList, itemOpt => assign_default()({
|
|
71359
|
+
options = map_default()(optionList).call(optionList, (itemOpt, index) => assign_default()({
|
|
71308
71360
|
_show: true,
|
|
71309
|
-
_selected: false
|
|
71361
|
+
_selected: false,
|
|
71362
|
+
_scrollIndex: index
|
|
71310
71363
|
}, itemOpt));
|
|
71311
71364
|
optionGroups[0] = {
|
|
71312
71365
|
children: options,
|
|
@@ -71881,15 +71934,21 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
71881
71934
|
}
|
|
71882
71935
|
|
|
71883
71936
|
if (virtualize) {
|
|
71884
|
-
let
|
|
71937
|
+
let minItemIndex = -1;
|
|
71885
71938
|
|
|
71886
|
-
for_each_default()(selections).call(selections,
|
|
71887
|
-
const
|
|
71888
|
-
|
|
71939
|
+
for_each_default()(selections).call(selections, item => {
|
|
71940
|
+
const itemIndex = Object(lodash_es_get["a" /* default */])(item, '_scrollIndex');
|
|
71941
|
+
/* When the itemIndex is legal */
|
|
71942
|
+
|
|
71943
|
+
if (lodash_es_isNumber(itemIndex) && itemIndex >= 0) {
|
|
71944
|
+
minItemIndex = minItemIndex !== -1 && minItemIndex < itemIndex ? minItemIndex : itemIndex;
|
|
71945
|
+
}
|
|
71889
71946
|
});
|
|
71890
71947
|
|
|
71891
|
-
if (
|
|
71892
|
-
|
|
71948
|
+
if (minItemIndex !== -1) {
|
|
71949
|
+
try {
|
|
71950
|
+
this.virtualizeListRef.current.scrollToItem(minItemIndex, 'center');
|
|
71951
|
+
} catch (error) {}
|
|
71893
71952
|
}
|
|
71894
71953
|
} else {
|
|
71895
71954
|
this.foundation.updateScrollTop();
|
|
@@ -72657,6 +72716,10 @@ class popconfirmFoundation_PopConfirmFoundation extends foundation {
|
|
|
72657
72716
|
this.handleVisibleChange(false);
|
|
72658
72717
|
}
|
|
72659
72718
|
|
|
72719
|
+
handleClickOutSide(e) {
|
|
72720
|
+
this._adapter.notifyClickOutSide(e);
|
|
72721
|
+
}
|
|
72722
|
+
|
|
72660
72723
|
handleVisibleChange(visible) {
|
|
72661
72724
|
if (!this._isControlledComponent('visible')) {
|
|
72662
72725
|
this._adapter.setVisible(visible);
|
|
@@ -72710,6 +72773,8 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
|
|
|
72710
72773
|
|
|
72711
72774
|
this.handleVisibleChange = visible => this.foundation.handleVisibleChange(visible);
|
|
72712
72775
|
|
|
72776
|
+
this.handleClickOutSide = e => this.foundation.handleClickOutSide(e);
|
|
72777
|
+
|
|
72713
72778
|
this.stopImmediatePropagation = e => e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation();
|
|
72714
72779
|
|
|
72715
72780
|
this.state = {
|
|
@@ -72738,7 +72803,8 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
|
|
|
72738
72803
|
}),
|
|
72739
72804
|
notifyConfirm: e => this.props.onConfirm(e),
|
|
72740
72805
|
notifyCancel: e => this.props.onCancel(e),
|
|
72741
|
-
notifyVisibleChange: visible => this.props.onVisibleChange(visible)
|
|
72806
|
+
notifyVisibleChange: visible => this.props.onVisibleChange(visible),
|
|
72807
|
+
notifyClickOutSide: e => this.props.onClickOutSide(e)
|
|
72742
72808
|
});
|
|
72743
72809
|
}
|
|
72744
72810
|
|
|
@@ -72837,7 +72903,8 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
|
|
|
72837
72903
|
const popContent = this.renderConfirmPopCard();
|
|
72838
72904
|
const popProps = {
|
|
72839
72905
|
onVisibleChange: this.handleVisibleChange,
|
|
72840
|
-
className: popconfirm_constants_cssClasses.POPOVER
|
|
72906
|
+
className: popconfirm_constants_cssClasses.POPOVER,
|
|
72907
|
+
onClickOutSide: this.handleClickOutSide
|
|
72841
72908
|
};
|
|
72842
72909
|
|
|
72843
72910
|
if (this.isControlled('visible')) {
|
|
@@ -72868,13 +72935,14 @@ popconfirm_Popconfirm.propTypes = {
|
|
|
72868
72935
|
cancelType: prop_types_default.a.string,
|
|
72869
72936
|
onCancel: prop_types_default.a.func,
|
|
72870
72937
|
onConfirm: prop_types_default.a.func,
|
|
72871
|
-
|
|
72938
|
+
onClickOutSide: prop_types_default.a.func,
|
|
72872
72939
|
onVisibleChange: prop_types_default.a.func,
|
|
72873
72940
|
visible: prop_types_default.a.bool,
|
|
72874
72941
|
defaultVisible: prop_types_default.a.bool,
|
|
72875
72942
|
okButtonProps: prop_types_default.a.object,
|
|
72876
72943
|
cancelButtonProps: prop_types_default.a.object,
|
|
72877
72944
|
stopPropagation: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.string]),
|
|
72945
|
+
zIndex: prop_types_default.a.number,
|
|
72878
72946
|
// private
|
|
72879
72947
|
trigger: prop_types_default.a.string,
|
|
72880
72948
|
position: prop_types_default.a.string
|
|
@@ -72893,7 +72961,8 @@ popconfirm_Popconfirm.defaultProps = {
|
|
|
72893
72961
|
prefixCls: popconfirm_constants_cssClasses.PREFIX,
|
|
72894
72962
|
zIndex: popconfirm_constants_numbers.DEFAULT_Z_INDEX,
|
|
72895
72963
|
onCancel: lodash_es_noop,
|
|
72896
|
-
onConfirm: lodash_es_noop
|
|
72964
|
+
onConfirm: lodash_es_noop,
|
|
72965
|
+
onClickOutSide: lodash_es_noop
|
|
72897
72966
|
};
|
|
72898
72967
|
// CONCATENATED MODULE: ../semi-foundation/progress/constants.ts
|
|
72899
72968
|
|
|
@@ -77008,7 +77077,7 @@ const fillSteps_Steps = props => {
|
|
|
77008
77077
|
const inner = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useMemo"])(() => {
|
|
77009
77078
|
var _context;
|
|
77010
77079
|
|
|
77011
|
-
const filteredChildren = filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].toArray(children)).call(_context, c =>
|
|
77080
|
+
const filteredChildren = filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].toArray(children)).call(_context, c => /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(c));
|
|
77012
77081
|
|
|
77013
77082
|
const colStyle = direction === 'vertical' ? null : {
|
|
77014
77083
|
width: "".concat(100 / filteredChildren.length, "%")
|
|
@@ -77052,7 +77121,7 @@ const fillSteps_Steps = props => {
|
|
|
77052
77121
|
});
|
|
77053
77122
|
|
|
77054
77123
|
return content;
|
|
77055
|
-
}, [children, initial, prefixCls, direction, status, current]);
|
|
77124
|
+
}, [children, initial, prefixCls, direction, status, current, onChange]);
|
|
77056
77125
|
const wrapperCls = classnames_default()(className, {
|
|
77057
77126
|
[prefixCls]: true,
|
|
77058
77127
|
[concat_default()(_context2 = "".concat(prefixCls, "-")).call(_context2, direction)]: true
|
|
@@ -77112,7 +77181,7 @@ const basicSteps_Steps = props => {
|
|
|
77112
77181
|
const inner = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useMemo"])(() => {
|
|
77113
77182
|
var _context;
|
|
77114
77183
|
|
|
77115
|
-
const filteredChildren = filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].toArray(children)).call(_context, c =>
|
|
77184
|
+
const filteredChildren = filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].toArray(children)).call(_context, c => /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(c));
|
|
77116
77185
|
|
|
77117
77186
|
const content = map_default()(external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"]).call(external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"], filteredChildren, (child, index) => {
|
|
77118
77187
|
if (!child) {
|
|
@@ -77212,7 +77281,7 @@ const navSteps_Steps = props => {
|
|
|
77212
77281
|
const inner = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useMemo"])(() => {
|
|
77213
77282
|
var _context;
|
|
77214
77283
|
|
|
77215
|
-
const filteredChildren = filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].toArray(children)).call(_context, c =>
|
|
77284
|
+
const filteredChildren = filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].toArray(children)).call(_context, c => /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(c));
|
|
77216
77285
|
|
|
77217
77286
|
const total = filteredChildren.length;
|
|
77218
77287
|
|
|
@@ -85596,15 +85665,11 @@ class foundation_TabsFoundation extends foundation {
|
|
|
85596
85665
|
handleTabPanesChange() {
|
|
85597
85666
|
this._adapter.collectPane();
|
|
85598
85667
|
|
|
85599
|
-
|
|
85600
|
-
|
|
85601
|
-
if (typeof activeKey === 'undefined') {
|
|
85602
|
-
activeKey = this._adapter.getDefaultActiveKeyFromChildren();
|
|
85603
|
-
}
|
|
85668
|
+
this._adapter.collectActiveKey();
|
|
85669
|
+
}
|
|
85604
85670
|
|
|
85605
|
-
|
|
85606
|
-
|
|
85607
|
-
}
|
|
85671
|
+
handleTabDelete(tabKey) {
|
|
85672
|
+
this._adapter.notifyTabDelete(tabKey);
|
|
85608
85673
|
}
|
|
85609
85674
|
|
|
85610
85675
|
}
|
|
@@ -85667,9 +85732,15 @@ class TabBar_TabBar extends external_root_React_commonjs2_react_commonjs_react_a
|
|
|
85667
85732
|
|
|
85668
85733
|
this.renderTabItem = panel => {
|
|
85669
85734
|
const {
|
|
85670
|
-
size
|
|
85735
|
+
size,
|
|
85736
|
+
type,
|
|
85737
|
+
deleteTabItem
|
|
85671
85738
|
} = this.props;
|
|
85672
85739
|
const panelIcon = panel.icon ? this.renderIcon(panel.icon) : null;
|
|
85740
|
+
const closableIcon = type === 'card' && panel.closable ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, {
|
|
85741
|
+
className: "".concat(tabs_constants_cssClasses.TABS_TAB, "-icon-close"),
|
|
85742
|
+
onClick: e => deleteTabItem(panel.itemKey, e)
|
|
85743
|
+
}) : null;
|
|
85673
85744
|
let events = {};
|
|
85674
85745
|
const key = panel.itemKey;
|
|
85675
85746
|
|
|
@@ -85692,7 +85763,7 @@ class TabBar_TabBar extends external_root_React_commonjs2_react_commonjs_react_a
|
|
|
85692
85763
|
}, events, {
|
|
85693
85764
|
className: className,
|
|
85694
85765
|
key: this._getItemKey(key)
|
|
85695
|
-
}), panelIcon, panel.tab);
|
|
85766
|
+
}), panelIcon, panel.tab, closableIcon);
|
|
85696
85767
|
};
|
|
85697
85768
|
|
|
85698
85769
|
this.renderTabComponents = list => map_default()(list).call(list, panel => this.renderTabItem(panel));
|
|
@@ -85894,7 +85965,9 @@ TabBar_TabBar.propTypes = {
|
|
|
85894
85965
|
style: prop_types_default.a.object,
|
|
85895
85966
|
tabBarExtraContent: prop_types_default.a.node,
|
|
85896
85967
|
tabPosition: prop_types_default.a.oneOf(tabs_constants_strings.POSITION_MAP),
|
|
85897
|
-
type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP)
|
|
85968
|
+
type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP),
|
|
85969
|
+
closable: prop_types_default.a.bool,
|
|
85970
|
+
deleteTabItem: prop_types_default.a.func
|
|
85898
85971
|
};
|
|
85899
85972
|
/* harmony default export */ var tabs_TabBar = (TabBar_TabBar);
|
|
85900
85973
|
// CONCATENATED MODULE: ./tabs/tabs-context.ts
|
|
@@ -86140,7 +86213,8 @@ TabPane_TabPane.propTypes = {
|
|
|
86140
86213
|
disabled: prop_types_default.a.bool,
|
|
86141
86214
|
itemKey: prop_types_default.a.string,
|
|
86142
86215
|
tab: prop_types_default.a.node,
|
|
86143
|
-
icon: prop_types_default.a.node
|
|
86216
|
+
icon: prop_types_default.a.node,
|
|
86217
|
+
closable: prop_types_default.a.bool
|
|
86144
86218
|
};
|
|
86145
86219
|
/* harmony default export */ var tabs_TabPane = (TabPane_TabPane);
|
|
86146
86220
|
// CONCATENATED MODULE: ./tabs/index.tsx
|
|
@@ -86154,6 +86228,7 @@ TabPane_TabPane.propTypes = {
|
|
|
86154
86228
|
|
|
86155
86229
|
|
|
86156
86230
|
|
|
86231
|
+
|
|
86157
86232
|
var tabs_rest = undefined && undefined.__rest || function (s, e) {
|
|
86158
86233
|
var t = {};
|
|
86159
86234
|
|
|
@@ -86225,7 +86300,7 @@ class tabs_Tabs extends baseComponent_BaseComponent {
|
|
|
86225
86300
|
}
|
|
86226
86301
|
|
|
86227
86302
|
return filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(children)).call(_context, pane => {
|
|
86228
|
-
if (pane && pane.type && pane.type.isTabPane) {
|
|
86303
|
+
if ( /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(pane) && pane.type && pane.type.isTabPane) {
|
|
86229
86304
|
return pane.props.itemKey === activeKey;
|
|
86230
86305
|
}
|
|
86231
86306
|
|
|
@@ -86233,6 +86308,11 @@ class tabs_Tabs extends baseComponent_BaseComponent {
|
|
|
86233
86308
|
});
|
|
86234
86309
|
};
|
|
86235
86310
|
|
|
86311
|
+
this.deleteTabItem = (tabKey, event) => {
|
|
86312
|
+
event.stopPropagation();
|
|
86313
|
+
this.foundation.handleTabDelete(tabKey);
|
|
86314
|
+
};
|
|
86315
|
+
|
|
86236
86316
|
this.foundation = new tabs_foundation(this.adapter);
|
|
86237
86317
|
this.state = {
|
|
86238
86318
|
activeKey: this.foundation.getDefaultActiveKey(),
|
|
@@ -86265,13 +86345,15 @@ class tabs_Tabs extends baseComponent_BaseComponent {
|
|
|
86265
86345
|
tab,
|
|
86266
86346
|
icon,
|
|
86267
86347
|
disabled,
|
|
86268
|
-
itemKey
|
|
86348
|
+
itemKey,
|
|
86349
|
+
closable
|
|
86269
86350
|
} = child.props;
|
|
86270
86351
|
return {
|
|
86271
86352
|
tab,
|
|
86272
86353
|
icon,
|
|
86273
86354
|
disabled,
|
|
86274
|
-
itemKey
|
|
86355
|
+
itemKey,
|
|
86356
|
+
closable
|
|
86275
86357
|
};
|
|
86276
86358
|
}
|
|
86277
86359
|
|
|
@@ -86282,6 +86364,61 @@ class tabs_Tabs extends baseComponent_BaseComponent {
|
|
|
86282
86364
|
panes
|
|
86283
86365
|
});
|
|
86284
86366
|
},
|
|
86367
|
+
collectActiveKey: () => {
|
|
86368
|
+
let panes = [];
|
|
86369
|
+
const {
|
|
86370
|
+
tabList,
|
|
86371
|
+
children,
|
|
86372
|
+
activeKey: propsActiveKey
|
|
86373
|
+
} = this.props;
|
|
86374
|
+
|
|
86375
|
+
if (typeof propsActiveKey !== 'undefined') {
|
|
86376
|
+
return;
|
|
86377
|
+
}
|
|
86378
|
+
|
|
86379
|
+
const {
|
|
86380
|
+
activeKey
|
|
86381
|
+
} = this.state;
|
|
86382
|
+
|
|
86383
|
+
if (is_array_default()(tabList) && tabList.length) {
|
|
86384
|
+
panes = tabList;
|
|
86385
|
+
} else {
|
|
86386
|
+
var _context3;
|
|
86387
|
+
|
|
86388
|
+
panes = map_default()(_context3 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children).call(_context3, children, child => {
|
|
86389
|
+
if (child) {
|
|
86390
|
+
const {
|
|
86391
|
+
tab,
|
|
86392
|
+
icon,
|
|
86393
|
+
disabled,
|
|
86394
|
+
itemKey,
|
|
86395
|
+
closable
|
|
86396
|
+
} = child.props;
|
|
86397
|
+
return {
|
|
86398
|
+
tab,
|
|
86399
|
+
icon,
|
|
86400
|
+
disabled,
|
|
86401
|
+
itemKey,
|
|
86402
|
+
closable
|
|
86403
|
+
};
|
|
86404
|
+
}
|
|
86405
|
+
|
|
86406
|
+
return undefined;
|
|
86407
|
+
});
|
|
86408
|
+
}
|
|
86409
|
+
|
|
86410
|
+
if (find_index_default()(panes).call(panes, p => p.itemKey === activeKey) === -1) {
|
|
86411
|
+
if (panes.length > 0) {
|
|
86412
|
+
this.setState({
|
|
86413
|
+
activeKey: panes[0].itemKey
|
|
86414
|
+
});
|
|
86415
|
+
} else {
|
|
86416
|
+
this.setState({
|
|
86417
|
+
activeKey: ''
|
|
86418
|
+
});
|
|
86419
|
+
}
|
|
86420
|
+
}
|
|
86421
|
+
},
|
|
86285
86422
|
notifyTabClick: (activeKey, event) => {
|
|
86286
86423
|
this.props.onTabClick(activeKey, event);
|
|
86287
86424
|
},
|
|
@@ -86294,14 +86431,14 @@ class tabs_Tabs extends baseComponent_BaseComponent {
|
|
|
86294
86431
|
});
|
|
86295
86432
|
},
|
|
86296
86433
|
getDefaultActiveKeyFromChildren: () => {
|
|
86297
|
-
var
|
|
86434
|
+
var _context4;
|
|
86298
86435
|
|
|
86299
86436
|
const {
|
|
86300
86437
|
tabList,
|
|
86301
86438
|
children
|
|
86302
86439
|
} = this.props;
|
|
86303
86440
|
let activeKey = '';
|
|
86304
|
-
const list = tabList ? tabList : map_default()(
|
|
86441
|
+
const list = tabList ? tabList : map_default()(_context4 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(children)).call(_context4, child => /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(child) ? child.props : null);
|
|
86305
86442
|
|
|
86306
86443
|
for_each_default()(list).call(list, item => {
|
|
86307
86444
|
if (item && !activeKey && !item.disabled) {
|
|
@@ -86310,6 +86447,9 @@ class tabs_Tabs extends baseComponent_BaseComponent {
|
|
|
86310
86447
|
});
|
|
86311
86448
|
|
|
86312
86449
|
return activeKey;
|
|
86450
|
+
},
|
|
86451
|
+
notifyTabDelete: tabKey => {
|
|
86452
|
+
this.props.onTabClose && this.props.onTabClose(tabKey);
|
|
86313
86453
|
}
|
|
86314
86454
|
});
|
|
86315
86455
|
}
|
|
@@ -86325,12 +86465,12 @@ class tabs_Tabs extends baseComponent_BaseComponent {
|
|
|
86325
86465
|
}
|
|
86326
86466
|
|
|
86327
86467
|
componentDidUpdate(prevProps) {
|
|
86328
|
-
var
|
|
86468
|
+
var _context5, _context6;
|
|
86329
86469
|
|
|
86330
86470
|
// Panes state acts on tab bar, no need to compare TabPane children
|
|
86331
|
-
const prevChildrenProps = map_default()(
|
|
86471
|
+
const prevChildrenProps = map_default()(_context5 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(prevProps.children)).call(_context5, child => lodash_es_pick( /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(child) ? child.props : null, panePickKeys));
|
|
86332
86472
|
|
|
86333
|
-
const nowChildrenProps = map_default()(
|
|
86473
|
+
const nowChildrenProps = map_default()(_context6 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(this.props.children)).call(_context6, child => lodash_es_pick( /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(child) ? child.props : null, panePickKeys));
|
|
86334
86474
|
|
|
86335
86475
|
const isTabListType = this.props.tabList || prevProps.tabList;
|
|
86336
86476
|
|
|
@@ -86348,7 +86488,7 @@ class tabs_Tabs extends baseComponent_BaseComponent {
|
|
|
86348
86488
|
}
|
|
86349
86489
|
|
|
86350
86490
|
render() {
|
|
86351
|
-
var
|
|
86491
|
+
var _context7, _context8;
|
|
86352
86492
|
|
|
86353
86493
|
const _a = this.props,
|
|
86354
86494
|
{
|
|
@@ -86376,11 +86516,11 @@ class tabs_Tabs extends baseComponent_BaseComponent {
|
|
|
86376
86516
|
} = this.state;
|
|
86377
86517
|
const tabWrapperCls = classnames_default()(className, {
|
|
86378
86518
|
[tabs_constants_cssClasses.TABS]: true,
|
|
86379
|
-
[concat_default()(
|
|
86519
|
+
[concat_default()(_context7 = "".concat(tabs_constants_cssClasses.TABS, "-")).call(_context7, tabPosition)]: tabPosition
|
|
86380
86520
|
});
|
|
86381
86521
|
const tabContentCls = classnames_default()({
|
|
86382
86522
|
[tabs_constants_cssClasses.TABS_CONTENT]: true,
|
|
86383
|
-
[concat_default()(
|
|
86523
|
+
[concat_default()(_context8 = "".concat(tabs_constants_cssClasses.TABS_CONTENT, "-")).call(_context8, tabPosition)]: tabPosition
|
|
86384
86524
|
});
|
|
86385
86525
|
const tabBarProps = {
|
|
86386
86526
|
activeKey,
|
|
@@ -86392,7 +86532,8 @@ class tabs_Tabs extends baseComponent_BaseComponent {
|
|
|
86392
86532
|
style: tabBarStyle,
|
|
86393
86533
|
tabBarExtraContent,
|
|
86394
86534
|
tabPosition,
|
|
86395
|
-
type
|
|
86535
|
+
type,
|
|
86536
|
+
deleteTabItem: this.deleteTabItem
|
|
86396
86537
|
};
|
|
86397
86538
|
const tabBar = renderTabBar ? renderTabBar(tabBarProps, tabs_TabBar) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(tabs_TabBar, assign_default()({}, tabBarProps));
|
|
86398
86539
|
const content = keepDOM ? children : this.getActiveItem();
|
|
@@ -86437,7 +86578,8 @@ tabs_Tabs.propTypes = {
|
|
|
86437
86578
|
tabList: prop_types_default.a.array,
|
|
86438
86579
|
tabPaneMotion: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.object, prop_types_default.a.func]),
|
|
86439
86580
|
tabPosition: prop_types_default.a.oneOf(tabs_constants_strings.POSITION_MAP),
|
|
86440
|
-
type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP)
|
|
86581
|
+
type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP),
|
|
86582
|
+
onTabClose: prop_types_default.a.func
|
|
86441
86583
|
};
|
|
86442
86584
|
tabs_Tabs.defaultProps = {
|
|
86443
86585
|
children: [],
|
|
@@ -86449,7 +86591,8 @@ tabs_Tabs.defaultProps = {
|
|
|
86449
86591
|
size: 'large',
|
|
86450
86592
|
tabPaneMotion: true,
|
|
86451
86593
|
tabPosition: 'top',
|
|
86452
|
-
type: 'line'
|
|
86594
|
+
type: 'line',
|
|
86595
|
+
onTabClose: () => undefined
|
|
86453
86596
|
};
|
|
86454
86597
|
/* harmony default export */ var tabs_0 = (tabs_Tabs);
|
|
86455
86598
|
// EXTERNAL MODULE: ../semi-foundation/timeline/timeline.scss
|
|
@@ -92807,7 +92950,8 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
92807
92950
|
registerClickOutsideHandler: cb => {
|
|
92808
92951
|
const clickOutsideHandler = e => {
|
|
92809
92952
|
const optionInstance = this.optionsRef && this.optionsRef.current;
|
|
92810
|
-
const triggerDom = this.triggerRef && this.triggerRef.current;
|
|
92953
|
+
const triggerDom = this.triggerRef && this.triggerRef.current; // eslint-disable-next-line
|
|
92954
|
+
|
|
92811
92955
|
const optionsDom = external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.findDOMNode(optionInstance);
|
|
92812
92956
|
const target = e.target;
|
|
92813
92957
|
|
|
@@ -94737,6 +94881,7 @@ var upload = __webpack_require__("/t7F");
|
|
|
94737
94881
|
|
|
94738
94882
|
|
|
94739
94883
|
|
|
94884
|
+
|
|
94740
94885
|
const upload_prefixCls = upload_constants_cssClasses.PREFIX;
|
|
94741
94886
|
|
|
94742
94887
|
|
|
@@ -99585,8 +99730,6 @@ function useStateWithGetter(initial) {
|
|
|
99585
99730
|
|
|
99586
99731
|
|
|
99587
99732
|
|
|
99588
|
-
/* argus-disable unPkgSensitiveInfo */
|
|
99589
|
-
|
|
99590
99733
|
/* eslint-disable max-lines-per-function, react-hooks/rules-of-hooks, prefer-const, max-len */
|
|
99591
99734
|
|
|
99592
99735
|
|
|
@@ -100087,7 +100230,6 @@ function withField(Component, opts) {
|
|
|
100087
100230
|
return Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useMemo"])(() => FieldComponent, [...shouldUpdate]);
|
|
100088
100231
|
} else {
|
|
100089
100232
|
// Some Custom Component with inner state shouldn't be memo, otherwise the component will not updated when the internal state is updated
|
|
100090
|
-
// Fixed issue 328
|
|
100091
100233
|
return FieldComponent;
|
|
100092
100234
|
}
|
|
100093
100235
|
};
|
|
@@ -100153,24 +100295,8 @@ const FormSwitch = hoc_withField(switch_0, {
|
|
|
100153
100295
|
valueKey: 'checked'
|
|
100154
100296
|
});
|
|
100155
100297
|
const FormSlider = hoc_withField(slider_Slider);
|
|
100156
|
-
|
|
100157
|
-
|
|
100158
|
-
*
|
|
100159
|
-
* 1. TimePicker: The propTypes of the locale is defined as object (it is not necessary and too troublesome to write a complete shapeOf),
|
|
100160
|
-
* but the interface defines a complete type, the two cannot match, and ts will report an error, so skip it here.
|
|
100161
|
-
*
|
|
100162
|
-
* 2. Cascader: treeData { label, value } define in PropTypes.shapeOf alreaady declare isRequired, ts still throw error
|
|
100163
|
-
* 【Property is optional in type “InferProps<{ value: Validator<string | number>; label: Validator<any>; }>” but required in type CascaderData】
|
|
100164
|
-
* skip it here.
|
|
100165
|
-
* 3. TreeSelect: value same as cascader, skip it here
|
|
100166
|
-
*
|
|
100167
|
-
*/
|
|
100168
|
-
// @ts-ignore-next-line
|
|
100169
|
-
|
|
100170
|
-
const FormTimePicker = hoc_withField(timePicker_LocaleTimePicker); // @ts-ignore-next-line
|
|
100171
|
-
|
|
100172
|
-
const FormTreeSelect = hoc_withField(treeSelect_0); // @ts-ignore-next-line
|
|
100173
|
-
|
|
100298
|
+
const FormTimePicker = hoc_withField(timePicker_LocaleTimePicker);
|
|
100299
|
+
const FormTreeSelect = hoc_withField(treeSelect_0);
|
|
100174
100300
|
const FormCascader = hoc_withField(cascader_0);
|
|
100175
100301
|
const FormRating = hoc_withField(rating_Rating);
|
|
100176
100302
|
const FormAutoComplete = hoc_withField(autoComplete_0, {
|
|
@@ -100236,8 +100362,7 @@ class baseForm_Form extends baseComponent_BaseComponent {
|
|
|
100236
100362
|
this.state = {
|
|
100237
100363
|
formId: getUuidv4()
|
|
100238
100364
|
};
|
|
100239
|
-
Object(warning["a" /* default */])(
|
|
100240
|
-
props.component && props.render, '[Semi Form] You should not use <Form component> and <Form render> in ths same time; <Form render> will be ignored');
|
|
100365
|
+
Object(warning["a" /* default */])(Boolean(props.component && props.render), '[Semi Form] You should not use <Form component> and <Form render> in ths same time; <Form render> will be ignored');
|
|
100241
100366
|
Object(warning["a" /* default */])(props.component && props.children && !isEmptyChildren(props.children), '[Semi Form] You should not use <Form component> and <Form>{children}</Form> in ths same time; <Form>{children}</Form> will be ignored');
|
|
100242
100367
|
Object(warning["a" /* default */])(props.render && props.children && !isEmptyChildren(props.children), '[Semi Form] You should not use <Form render> and <Form>{children}</Form> in ths same time; <Form>{children}</Form> will be ignored');
|
|
100243
100368
|
this.submit = bind_default()(_context = this.submit).call(_context, this);
|