@douyinfe/semi-ui 2.8.0-beta.1 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/umd/semi-ui.js +49 -26
- 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/package.json +10 -10
package/dist/umd/semi-ui.js
CHANGED
|
@@ -99474,9 +99474,21 @@ function sortableHandle(WrappedComponent) {
|
|
|
99474
99474
|
_inherits(WithSortableHandle, _React$Component);
|
|
99475
99475
|
|
|
99476
99476
|
function WithSortableHandle() {
|
|
99477
|
+
var _getPrototypeOf2;
|
|
99478
|
+
|
|
99479
|
+
var _this;
|
|
99480
|
+
|
|
99477
99481
|
_classCallCheck(this, WithSortableHandle);
|
|
99478
99482
|
|
|
99479
|
-
|
|
99483
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
99484
|
+
args[_key] = arguments[_key];
|
|
99485
|
+
}
|
|
99486
|
+
|
|
99487
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(WithSortableHandle)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
99488
|
+
|
|
99489
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "wrappedInstance", Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createRef"])());
|
|
99490
|
+
|
|
99491
|
+
return _this;
|
|
99480
99492
|
}
|
|
99481
99493
|
|
|
99482
99494
|
_createClass(WithSortableHandle, [{
|
|
@@ -99489,12 +99501,12 @@ function sortableHandle(WrappedComponent) {
|
|
|
99489
99501
|
key: "getWrappedInstance",
|
|
99490
99502
|
value: function getWrappedInstance() {
|
|
99491
99503
|
browser_default()(config.withRef, 'To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableHandle() call');
|
|
99492
|
-
return this.
|
|
99504
|
+
return this.wrappedInstance.current;
|
|
99493
99505
|
}
|
|
99494
99506
|
}, {
|
|
99495
99507
|
key: "render",
|
|
99496
99508
|
value: function render() {
|
|
99497
|
-
var ref = config.withRef ?
|
|
99509
|
+
var ref = config.withRef ? this.wrappedInstance : null;
|
|
99498
99510
|
return Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"])(WrappedComponent, _extends({
|
|
99499
99511
|
ref: ref
|
|
99500
99512
|
}, this.props));
|
|
@@ -99695,6 +99707,9 @@ function _finallyRethrows(body, finalizer) {
|
|
|
99695
99707
|
|
|
99696
99708
|
return finalizer(false, value);
|
|
99697
99709
|
}
|
|
99710
|
+
var SortableContext = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createContext"])({
|
|
99711
|
+
manager: {}
|
|
99712
|
+
});
|
|
99698
99713
|
function sortableContainer(WrappedComponent) {
|
|
99699
99714
|
var _class, _temp;
|
|
99700
99715
|
|
|
@@ -99933,7 +99948,7 @@ function sortableContainer(WrappedComponent) {
|
|
|
99933
99948
|
});
|
|
99934
99949
|
}
|
|
99935
99950
|
|
|
99936
|
-
_this.listenerNode = event.touches ?
|
|
99951
|
+
_this.listenerNode = event.touches ? event.target : _this.contentWindow;
|
|
99937
99952
|
|
|
99938
99953
|
if (_isKeySorting) {
|
|
99939
99954
|
_this.listenerNode.addEventListener('wheel', _this.handleKeyEnd, true);
|
|
@@ -100018,7 +100033,7 @@ function sortableContainer(WrappedComponent) {
|
|
|
100018
100033
|
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "handleSortMove", function (event) {
|
|
100019
100034
|
var onSortMove = _this.props.onSortMove;
|
|
100020
100035
|
|
|
100021
|
-
if (typeof event.preventDefault === 'function') {
|
|
100036
|
+
if (typeof event.preventDefault === 'function' && event.cancelable) {
|
|
100022
100037
|
event.preventDefault();
|
|
100023
100038
|
}
|
|
100024
100039
|
|
|
@@ -100265,8 +100280,13 @@ function sortableContainer(WrappedComponent) {
|
|
|
100265
100280
|
return node && node.sortableInfo && !node.sortableInfo.disabled && (useDragHandle ? isSortableHandle(target) : target.sortableInfo);
|
|
100266
100281
|
});
|
|
100267
100282
|
|
|
100283
|
+
var manager = new react_sortable_hoc_esm_Manager();
|
|
100268
100284
|
react_sortable_hoc_esm_validateProps(props);
|
|
100269
|
-
_this.manager =
|
|
100285
|
+
_this.manager = manager;
|
|
100286
|
+
_this.wrappedInstance = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createRef"])();
|
|
100287
|
+
_this.sortableContextValue = {
|
|
100288
|
+
manager: manager
|
|
100289
|
+
};
|
|
100270
100290
|
_this.events = {
|
|
100271
100291
|
end: _this.handleEnd,
|
|
100272
100292
|
move: _this.handleMove,
|
|
@@ -100276,13 +100296,6 @@ function sortableContainer(WrappedComponent) {
|
|
|
100276
100296
|
}
|
|
100277
100297
|
|
|
100278
100298
|
_createClass(WithSortableContainer, [{
|
|
100279
|
-
key: "getChildContext",
|
|
100280
|
-
value: function getChildContext() {
|
|
100281
|
-
return {
|
|
100282
|
-
manager: this.manager
|
|
100283
|
-
};
|
|
100284
|
-
}
|
|
100285
|
-
}, {
|
|
100286
100299
|
key: "componentDidMount",
|
|
100287
100300
|
value: function componentDidMount() {
|
|
100288
100301
|
var _this2 = this;
|
|
@@ -100533,7 +100546,7 @@ function sortableContainer(WrappedComponent) {
|
|
|
100533
100546
|
key: "getWrappedInstance",
|
|
100534
100547
|
value: function getWrappedInstance() {
|
|
100535
100548
|
browser_default()(config.withRef, 'To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableContainer() call');
|
|
100536
|
-
return this.
|
|
100549
|
+
return this.wrappedInstance.current;
|
|
100537
100550
|
}
|
|
100538
100551
|
}, {
|
|
100539
100552
|
key: "getContainer",
|
|
@@ -100549,10 +100562,12 @@ function sortableContainer(WrappedComponent) {
|
|
|
100549
100562
|
}, {
|
|
100550
100563
|
key: "render",
|
|
100551
100564
|
value: function render() {
|
|
100552
|
-
var ref = config.withRef ?
|
|
100553
|
-
return Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"])(
|
|
100565
|
+
var ref = config.withRef ? this.wrappedInstance : null;
|
|
100566
|
+
return Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"])(SortableContext.Provider, {
|
|
100567
|
+
value: this.sortableContextValue
|
|
100568
|
+
}, Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"])(WrappedComponent, _extends({
|
|
100554
100569
|
ref: ref
|
|
100555
|
-
}, react_sortable_hoc_esm_omit(this.props, omittedProps)));
|
|
100570
|
+
}, react_sortable_hoc_esm_omit(this.props, omittedProps))));
|
|
100556
100571
|
}
|
|
100557
100572
|
}, {
|
|
100558
100573
|
key: "helperContainer",
|
|
@@ -100593,9 +100608,7 @@ function sortableContainer(WrappedComponent) {
|
|
|
100593
100608
|
}]);
|
|
100594
100609
|
|
|
100595
100610
|
return WithSortableContainer;
|
|
100596
|
-
}(external_root_React_commonjs2_react_commonjs_react_amd_react_["Component"]), _defineProperty(_class, "displayName", provideDisplayName('sortableList', WrappedComponent)), _defineProperty(_class, "defaultProps", react_sortable_hoc_esm_defaultProps), _defineProperty(_class, "propTypes", propTypes),
|
|
100597
|
-
manager: prop_types_default.a.object.isRequired
|
|
100598
|
-
}), _temp;
|
|
100611
|
+
}(external_root_React_commonjs2_react_commonjs_react_amd_react_["Component"]), _defineProperty(_class, "displayName", provideDisplayName('sortableList', WrappedComponent)), _defineProperty(_class, "defaultProps", react_sortable_hoc_esm_defaultProps), _defineProperty(_class, "propTypes", propTypes), _temp;
|
|
100599
100612
|
}
|
|
100600
100613
|
|
|
100601
100614
|
var propTypes$1 = {
|
|
@@ -100614,9 +100627,21 @@ function sortableElement(WrappedComponent) {
|
|
|
100614
100627
|
_inherits(WithSortableElement, _React$Component);
|
|
100615
100628
|
|
|
100616
100629
|
function WithSortableElement() {
|
|
100630
|
+
var _getPrototypeOf2;
|
|
100631
|
+
|
|
100632
|
+
var _this;
|
|
100633
|
+
|
|
100617
100634
|
_classCallCheck(this, WithSortableElement);
|
|
100618
100635
|
|
|
100619
|
-
|
|
100636
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
100637
|
+
args[_key] = arguments[_key];
|
|
100638
|
+
}
|
|
100639
|
+
|
|
100640
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(WithSortableElement)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
100641
|
+
|
|
100642
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "wrappedInstance", Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createRef"])());
|
|
100643
|
+
|
|
100644
|
+
return _this;
|
|
100620
100645
|
}
|
|
100621
100646
|
|
|
100622
100647
|
_createClass(WithSortableElement, [{
|
|
@@ -100677,12 +100702,12 @@ function sortableElement(WrappedComponent) {
|
|
|
100677
100702
|
key: "getWrappedInstance",
|
|
100678
100703
|
value: function getWrappedInstance() {
|
|
100679
100704
|
browser_default()(config.withRef, 'To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call');
|
|
100680
|
-
return this.
|
|
100705
|
+
return this.wrappedInstance.current;
|
|
100681
100706
|
}
|
|
100682
100707
|
}, {
|
|
100683
100708
|
key: "render",
|
|
100684
100709
|
value: function render() {
|
|
100685
|
-
var ref = config.withRef ?
|
|
100710
|
+
var ref = config.withRef ? this.wrappedInstance : null;
|
|
100686
100711
|
return Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"])(WrappedComponent, _extends({
|
|
100687
100712
|
ref: ref
|
|
100688
100713
|
}, react_sortable_hoc_esm_omit(this.props, omittedProps$1)));
|
|
@@ -100690,9 +100715,7 @@ function sortableElement(WrappedComponent) {
|
|
|
100690
100715
|
}]);
|
|
100691
100716
|
|
|
100692
100717
|
return WithSortableElement;
|
|
100693
|
-
}(external_root_React_commonjs2_react_commonjs_react_amd_react_["Component"]), _defineProperty(_class, "displayName", provideDisplayName('sortableElement', WrappedComponent)), _defineProperty(_class, "
|
|
100694
|
-
manager: prop_types_default.a.object.isRequired
|
|
100695
|
-
}), _defineProperty(_class, "propTypes", propTypes$1), _defineProperty(_class, "defaultProps", {
|
|
100718
|
+
}(external_root_React_commonjs2_react_commonjs_react_amd_react_["Component"]), _defineProperty(_class, "displayName", provideDisplayName('sortableElement', WrappedComponent)), _defineProperty(_class, "contextType", SortableContext), _defineProperty(_class, "propTypes", propTypes$1), _defineProperty(_class, "defaultProps", {
|
|
100696
100719
|
collection: 0
|
|
100697
100720
|
}), _temp;
|
|
100698
100721
|
}
|