@douyinfe/semi-ui 2.15.1 → 2.16.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/avatar/__test__/avatar.test.js +3 -3
- package/button/buttonGroup.tsx +3 -2
- package/cascader/index.tsx +5 -1
- package/dist/css/semi.css +38 -5
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +330 -214
- 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/iconButton/index.tsx +3 -0
- package/lib/cjs/button/buttonGroup.d.ts +0 -2
- package/lib/cjs/button/buttonGroup.js +4 -3
- package/lib/cjs/cascader/index.d.ts +3 -0
- package/lib/cjs/cascader/index.js +5 -3
- package/lib/cjs/iconButton/index.js +3 -0
- package/lib/cjs/slider/index.d.ts +1 -1
- package/lib/cjs/slider/index.js +84 -36
- package/lib/cjs/transfer/index.d.ts +5 -0
- package/lib/cjs/transfer/index.js +7 -17
- package/lib/es/button/buttonGroup.d.ts +0 -2
- package/lib/es/button/buttonGroup.js +4 -3
- package/lib/es/cascader/index.d.ts +3 -0
- package/lib/es/cascader/index.js +5 -3
- package/lib/es/iconButton/index.js +3 -0
- package/lib/es/slider/index.d.ts +1 -1
- package/lib/es/slider/index.js +84 -36
- package/lib/es/transfer/index.d.ts +5 -0
- package/lib/es/transfer/index.js +7 -17
- package/package.json +11 -11
- package/select/_story/select.stories.tsx +1 -1
- package/slider/_story/slider.stories.js +4 -2
- package/slider/index.tsx +63 -33
- package/transfer/_story/transfer.stories.js +29 -0
- package/transfer/index.tsx +10 -10
package/dist/umd/semi-ui.js
CHANGED
|
@@ -1604,97 +1604,6 @@ function times(n, iteratee) {
|
|
|
1604
1604
|
module.exports = times;
|
|
1605
1605
|
|
|
1606
1606
|
|
|
1607
|
-
/***/ }),
|
|
1608
|
-
|
|
1609
|
-
/***/ "16Al":
|
|
1610
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1611
|
-
|
|
1612
|
-
"use strict";
|
|
1613
|
-
/**
|
|
1614
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1615
|
-
*
|
|
1616
|
-
* This source code is licensed under the MIT license found in the
|
|
1617
|
-
* LICENSE file in the root directory of this source tree.
|
|
1618
|
-
*/
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
var ReactPropTypesSecret = __webpack_require__("WbBG");
|
|
1623
|
-
|
|
1624
|
-
function emptyFunction() {}
|
|
1625
|
-
function emptyFunctionWithReset() {}
|
|
1626
|
-
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
1627
|
-
|
|
1628
|
-
module.exports = function() {
|
|
1629
|
-
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
1630
|
-
if (secret === ReactPropTypesSecret) {
|
|
1631
|
-
// It is still safe when called from React.
|
|
1632
|
-
return;
|
|
1633
|
-
}
|
|
1634
|
-
var err = new Error(
|
|
1635
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1636
|
-
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
1637
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
1638
|
-
);
|
|
1639
|
-
err.name = 'Invariant Violation';
|
|
1640
|
-
throw err;
|
|
1641
|
-
};
|
|
1642
|
-
shim.isRequired = shim;
|
|
1643
|
-
function getShim() {
|
|
1644
|
-
return shim;
|
|
1645
|
-
};
|
|
1646
|
-
// Important!
|
|
1647
|
-
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1648
|
-
var ReactPropTypes = {
|
|
1649
|
-
array: shim,
|
|
1650
|
-
bool: shim,
|
|
1651
|
-
func: shim,
|
|
1652
|
-
number: shim,
|
|
1653
|
-
object: shim,
|
|
1654
|
-
string: shim,
|
|
1655
|
-
symbol: shim,
|
|
1656
|
-
|
|
1657
|
-
any: shim,
|
|
1658
|
-
arrayOf: getShim,
|
|
1659
|
-
element: shim,
|
|
1660
|
-
elementType: shim,
|
|
1661
|
-
instanceOf: getShim,
|
|
1662
|
-
node: shim,
|
|
1663
|
-
objectOf: getShim,
|
|
1664
|
-
oneOf: getShim,
|
|
1665
|
-
oneOfType: getShim,
|
|
1666
|
-
shape: getShim,
|
|
1667
|
-
exact: getShim,
|
|
1668
|
-
|
|
1669
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
1670
|
-
resetWarningCache: emptyFunction
|
|
1671
|
-
};
|
|
1672
|
-
|
|
1673
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1674
|
-
|
|
1675
|
-
return ReactPropTypes;
|
|
1676
|
-
};
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
/***/ }),
|
|
1680
|
-
|
|
1681
|
-
/***/ "17x9":
|
|
1682
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1683
|
-
|
|
1684
|
-
/**
|
|
1685
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1686
|
-
*
|
|
1687
|
-
* This source code is licensed under the MIT license found in the
|
|
1688
|
-
* LICENSE file in the root directory of this source tree.
|
|
1689
|
-
*/
|
|
1690
|
-
|
|
1691
|
-
if (false) { var throwOnDirectAccess, ReactIs; } else {
|
|
1692
|
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
1693
|
-
// http://fb.me/prop-types-in-prod
|
|
1694
|
-
module.exports = __webpack_require__("16Al")();
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
1607
|
/***/ }),
|
|
1699
1608
|
|
|
1700
1609
|
/***/ "1EDM":
|
|
@@ -14880,26 +14789,6 @@ module.exports = function (it) {
|
|
|
14880
14789
|
};
|
|
14881
14790
|
|
|
14882
14791
|
|
|
14883
|
-
/***/ }),
|
|
14884
|
-
|
|
14885
|
-
/***/ "WbBG":
|
|
14886
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
14887
|
-
|
|
14888
|
-
"use strict";
|
|
14889
|
-
/**
|
|
14890
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
14891
|
-
*
|
|
14892
|
-
* This source code is licensed under the MIT license found in the
|
|
14893
|
-
* LICENSE file in the root directory of this source tree.
|
|
14894
|
-
*/
|
|
14895
|
-
|
|
14896
|
-
|
|
14897
|
-
|
|
14898
|
-
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
14899
|
-
|
|
14900
|
-
module.exports = ReactPropTypesSecret;
|
|
14901
|
-
|
|
14902
|
-
|
|
14903
14792
|
/***/ }),
|
|
14904
14793
|
|
|
14905
14794
|
/***/ "WbkG":
|
|
@@ -25128,8 +25017,8 @@ var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__
|
|
|
25128
25017
|
var classnames = __webpack_require__("O94r");
|
|
25129
25018
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
25130
25019
|
|
|
25131
|
-
// EXTERNAL MODULE:
|
|
25132
|
-
var prop_types = __webpack_require__("
|
|
25020
|
+
// EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/prop-types/index.js
|
|
25021
|
+
var prop_types = __webpack_require__("aWzz");
|
|
25133
25022
|
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
25134
25023
|
|
|
25135
25024
|
// CONCATENATED MODULE: ../semi-foundation/base/env.ts
|
|
@@ -38889,6 +38778,9 @@ class iconButton_IconButton extends external_root_React_commonjs2_react_commonjs
|
|
|
38889
38778
|
} else if (noHorizontalPadding === true) {
|
|
38890
38779
|
style.paddingLeft = 0;
|
|
38891
38780
|
style.paddingRight = 0;
|
|
38781
|
+
} else if (typeof noHorizontalPadding === 'string') {
|
|
38782
|
+
noHorizontalPadding === 'left' && (style.paddingLeft = 0);
|
|
38783
|
+
noHorizontalPadding === 'right' && (style.paddingRight = 0);
|
|
38892
38784
|
}
|
|
38893
38785
|
|
|
38894
38786
|
let finalChildren = null;
|
|
@@ -40088,9 +39980,10 @@ buttonGroup_ButtonGroup.propTypes = {
|
|
|
40088
39980
|
'aria-label': prop_types_default.a.string
|
|
40089
39981
|
};
|
|
40090
39982
|
buttonGroup_ButtonGroup.defaultProps = {
|
|
40091
|
-
|
|
40092
|
-
type
|
|
40093
|
-
theme
|
|
39983
|
+
// There are default values for type and theme in Button.
|
|
39984
|
+
// In order to allow users to individually customize the type and theme of the Button through the parameters of the Button in the ButtonGroup,
|
|
39985
|
+
// the default value of type and theme is not given in the ButtonGroup。
|
|
39986
|
+
size: 'default'
|
|
40094
39987
|
};
|
|
40095
39988
|
// EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/@babel/runtime-corejs3/core-js-stable/instance/keys.js
|
|
40096
39989
|
var instance_keys = __webpack_require__("BoX2");
|
|
@@ -52588,7 +52481,8 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
52588
52481
|
autoAdjustOverflow,
|
|
52589
52482
|
stopPropagation,
|
|
52590
52483
|
mouseLeaveDelay,
|
|
52591
|
-
mouseEnterDelay
|
|
52484
|
+
mouseEnterDelay,
|
|
52485
|
+
position
|
|
52592
52486
|
} = this.props;
|
|
52593
52487
|
const {
|
|
52594
52488
|
isOpen,
|
|
@@ -52599,7 +52493,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
52599
52493
|
} = this.context;
|
|
52600
52494
|
const content = this.renderContent();
|
|
52601
52495
|
const selection = this.renderSelection();
|
|
52602
|
-
const pos = direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
|
|
52496
|
+
const pos = position !== null && position !== void 0 ? position : direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
|
|
52603
52497
|
const mergedMotion = this.foundation.getMergedMotion();
|
|
52604
52498
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(popover_0, {
|
|
52605
52499
|
getPopupContainer: getPopupContainer,
|
|
@@ -52693,7 +52587,8 @@ cascader_Cascader.propTypes = {
|
|
|
52693
52587
|
disableStrictly: prop_types_default.a.bool,
|
|
52694
52588
|
leafOnly: prop_types_default.a.bool,
|
|
52695
52589
|
enableLeafClick: prop_types_default.a.bool,
|
|
52696
|
-
preventScroll: prop_types_default.a.bool
|
|
52590
|
+
preventScroll: prop_types_default.a.bool,
|
|
52591
|
+
position: prop_types_default.a.string
|
|
52697
52592
|
};
|
|
52698
52593
|
cascader_Cascader.defaultProps = {
|
|
52699
52594
|
leafOnly: false,
|
|
@@ -85101,6 +84996,7 @@ const touchEventPolyfill = (touch, touchEvent) => {
|
|
|
85101
84996
|
|
|
85102
84997
|
|
|
85103
84998
|
|
|
84999
|
+
|
|
85104
85000
|
/* eslint-disable no-param-reassign */
|
|
85105
85001
|
|
|
85106
85002
|
/* eslint-disable max-len */
|
|
@@ -85108,6 +85004,8 @@ const touchEventPolyfill = (touch, touchEvent) => {
|
|
|
85108
85004
|
/* eslint-disable no-nested-ternary */
|
|
85109
85005
|
|
|
85110
85006
|
|
|
85007
|
+
|
|
85008
|
+
|
|
85111
85009
|
class foundation_SliderFoundation extends foundation {
|
|
85112
85010
|
constructor(adapter) {
|
|
85113
85011
|
var _this;
|
|
@@ -85632,8 +85530,7 @@ class foundation_SliderFoundation extends foundation {
|
|
|
85632
85530
|
const handleMaxDom = this._adapter.getMaxHandleEl().current;
|
|
85633
85531
|
|
|
85634
85532
|
if (e.target === handleMinDom || e.target === handleMaxDom) {
|
|
85635
|
-
e
|
|
85636
|
-
e.stopPropagation();
|
|
85533
|
+
handlePrevent(e);
|
|
85637
85534
|
const touch = touchPolyfill(e.touches[0], e);
|
|
85638
85535
|
this.onHandleDown(touch, handler);
|
|
85639
85536
|
}
|
|
@@ -85697,18 +85594,203 @@ class foundation_SliderFoundation extends foundation {
|
|
|
85697
85594
|
this._adapter.setDragging([dragging[0], false]);
|
|
85698
85595
|
}
|
|
85699
85596
|
|
|
85700
|
-
this._adapter.setStateVal('isDrag', false);
|
|
85701
|
-
|
|
85597
|
+
this._adapter.setStateVal('isDrag', false);
|
|
85702
85598
|
|
|
85703
85599
|
this._adapter.onHandleLeave();
|
|
85704
85600
|
|
|
85705
85601
|
this._adapter.onHandleUpAfter();
|
|
85706
85602
|
|
|
85707
85603
|
return true;
|
|
85604
|
+
};
|
|
85605
|
+
|
|
85606
|
+
this._handleValueDecreaseWithKeyBoard = (step, handler) => {
|
|
85607
|
+
const {
|
|
85608
|
+
min,
|
|
85609
|
+
currentValue
|
|
85610
|
+
} = this.getStates();
|
|
85611
|
+
const {
|
|
85612
|
+
range
|
|
85613
|
+
} = this.getProps();
|
|
85614
|
+
|
|
85615
|
+
if (handler === 'min') {
|
|
85616
|
+
if (range) {
|
|
85617
|
+
let newMinValue = currentValue[0] - step;
|
|
85618
|
+
newMinValue = newMinValue < min ? min : newMinValue;
|
|
85619
|
+
return [newMinValue, currentValue[1]];
|
|
85620
|
+
} else {
|
|
85621
|
+
let newMinValue = currentValue - step;
|
|
85622
|
+
newMinValue = newMinValue < min ? min : newMinValue;
|
|
85623
|
+
return newMinValue;
|
|
85624
|
+
}
|
|
85625
|
+
} else {
|
|
85626
|
+
let newMaxValue = currentValue[1] - step;
|
|
85627
|
+
newMaxValue = newMaxValue < currentValue[0] ? currentValue[0] : newMaxValue;
|
|
85628
|
+
return [currentValue[0], newMaxValue];
|
|
85629
|
+
}
|
|
85630
|
+
};
|
|
85631
|
+
|
|
85632
|
+
this._handleValueIncreaseWithKeyBoard = (step, handler) => {
|
|
85633
|
+
const {
|
|
85634
|
+
max,
|
|
85635
|
+
currentValue
|
|
85636
|
+
} = this.getStates();
|
|
85637
|
+
const {
|
|
85638
|
+
range
|
|
85639
|
+
} = this.getProps();
|
|
85640
|
+
|
|
85641
|
+
if (handler === 'min') {
|
|
85642
|
+
if (range) {
|
|
85643
|
+
let newMinValue = currentValue[0] + step;
|
|
85644
|
+
newMinValue = newMinValue > currentValue[1] ? currentValue[1] : newMinValue;
|
|
85645
|
+
return [newMinValue, currentValue[1]];
|
|
85646
|
+
} else {
|
|
85647
|
+
let newMinValue = currentValue + step;
|
|
85648
|
+
newMinValue = newMinValue > max ? max : newMinValue;
|
|
85649
|
+
return newMinValue;
|
|
85650
|
+
}
|
|
85651
|
+
} else {
|
|
85652
|
+
let newMaxValue = currentValue[1] + step;
|
|
85653
|
+
newMaxValue = newMaxValue > max ? max : newMaxValue;
|
|
85654
|
+
return [currentValue[0], newMaxValue];
|
|
85655
|
+
}
|
|
85656
|
+
};
|
|
85657
|
+
|
|
85658
|
+
this._handleHomeKey = handler => {
|
|
85659
|
+
const {
|
|
85660
|
+
min,
|
|
85661
|
+
currentValue
|
|
85662
|
+
} = this.getStates();
|
|
85663
|
+
const {
|
|
85664
|
+
range
|
|
85665
|
+
} = this.getProps();
|
|
85666
|
+
|
|
85667
|
+
if (handler === 'min') {
|
|
85668
|
+
if (range) {
|
|
85669
|
+
return [min, currentValue[1]];
|
|
85670
|
+
} else {
|
|
85671
|
+
return min;
|
|
85672
|
+
}
|
|
85673
|
+
} else {
|
|
85674
|
+
return [currentValue[0], currentValue[0]];
|
|
85675
|
+
}
|
|
85676
|
+
};
|
|
85677
|
+
|
|
85678
|
+
this._handleEndKey = handler => {
|
|
85679
|
+
const {
|
|
85680
|
+
max,
|
|
85681
|
+
currentValue
|
|
85682
|
+
} = this.getStates();
|
|
85683
|
+
const {
|
|
85684
|
+
range
|
|
85685
|
+
} = this.getProps();
|
|
85686
|
+
|
|
85687
|
+
if (handler === 'min') {
|
|
85688
|
+
if (range) {
|
|
85689
|
+
return [currentValue[1], currentValue[1]];
|
|
85690
|
+
} else {
|
|
85691
|
+
return max;
|
|
85692
|
+
}
|
|
85693
|
+
} else {
|
|
85694
|
+
return [currentValue[0], max];
|
|
85695
|
+
}
|
|
85696
|
+
};
|
|
85697
|
+
|
|
85698
|
+
this.handleKeyDown = (event, handler) => {
|
|
85699
|
+
var _context;
|
|
85700
|
+
|
|
85701
|
+
const {
|
|
85702
|
+
min,
|
|
85703
|
+
max,
|
|
85704
|
+
currentValue
|
|
85705
|
+
} = this.getStates();
|
|
85706
|
+
const {
|
|
85707
|
+
step,
|
|
85708
|
+
range
|
|
85709
|
+
} = this.getProps();
|
|
85710
|
+
let outputValue;
|
|
85711
|
+
|
|
85712
|
+
switch (event.key) {
|
|
85713
|
+
case "ArrowLeft":
|
|
85714
|
+
case "ArrowDown":
|
|
85715
|
+
outputValue = this._handleValueDecreaseWithKeyBoard(step, handler);
|
|
85716
|
+
break;
|
|
85717
|
+
|
|
85718
|
+
case "ArrowRight":
|
|
85719
|
+
case "ArrowUp":
|
|
85720
|
+
outputValue = this._handleValueIncreaseWithKeyBoard(step, handler);
|
|
85721
|
+
break;
|
|
85722
|
+
|
|
85723
|
+
case "PageUp":
|
|
85724
|
+
outputValue = this._handleValueIncreaseWithKeyBoard(10 * step, handler);
|
|
85725
|
+
break;
|
|
85726
|
+
|
|
85727
|
+
case "PageDown":
|
|
85728
|
+
outputValue = this._handleValueDecreaseWithKeyBoard(10 * step, handler);
|
|
85729
|
+
break;
|
|
85730
|
+
|
|
85731
|
+
case "Home":
|
|
85732
|
+
outputValue = this._handleHomeKey(handler);
|
|
85733
|
+
break;
|
|
85734
|
+
|
|
85735
|
+
case "End":
|
|
85736
|
+
outputValue = this._handleEndKey(handler);
|
|
85737
|
+
break;
|
|
85738
|
+
|
|
85739
|
+
case 'default':
|
|
85740
|
+
break;
|
|
85741
|
+
}
|
|
85742
|
+
|
|
85743
|
+
if (includes_default()(_context = ["ArrowLeft", "ArrowDown", "ArrowRight", "ArrowUp", "PageUp", "PageDown", "Home", "End"]).call(_context, event.key)) {
|
|
85744
|
+
let update = true;
|
|
85745
|
+
|
|
85746
|
+
if (is_array_default()(currentValue)) {
|
|
85747
|
+
update = !(currentValue[0] === outputValue[0] && currentValue[1] === outputValue[1]);
|
|
85748
|
+
} else {
|
|
85749
|
+
update = currentValue !== outputValue;
|
|
85750
|
+
}
|
|
85751
|
+
|
|
85752
|
+
if (update) {
|
|
85753
|
+
this._adapter.updateCurrentValue(outputValue);
|
|
85754
|
+
|
|
85755
|
+
this._adapter.notifyChange(outputValue);
|
|
85756
|
+
}
|
|
85757
|
+
|
|
85758
|
+
handlePrevent(event);
|
|
85759
|
+
}
|
|
85708
85760
|
}; // eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
85709
85761
|
|
|
85710
85762
|
|
|
85711
|
-
this.onFocus = (e, handler) => {
|
|
85763
|
+
this.onFocus = (e, handler) => {
|
|
85764
|
+
handlePrevent(e);
|
|
85765
|
+
const {
|
|
85766
|
+
target
|
|
85767
|
+
} = e;
|
|
85768
|
+
|
|
85769
|
+
try {
|
|
85770
|
+
if (target.matches(':focus-visible')) {
|
|
85771
|
+
if (handler === 'min') {
|
|
85772
|
+
this._adapter.setStateVal('firstDotFocusVisible', true);
|
|
85773
|
+
} else {
|
|
85774
|
+
this._adapter.setStateVal('secondDotFocusVisible', true);
|
|
85775
|
+
}
|
|
85776
|
+
}
|
|
85777
|
+
} catch (error) {
|
|
85778
|
+
Object(warning["a" /* default */])(true, 'Warning: [Semi Slider] The current browser does not support the focus-visible');
|
|
85779
|
+
}
|
|
85780
|
+
};
|
|
85781
|
+
|
|
85782
|
+
this.onBlur = (e, handler) => {
|
|
85783
|
+
const {
|
|
85784
|
+
firstDotFocusVisible,
|
|
85785
|
+
secondDotFocusVisible
|
|
85786
|
+
} = this.getStates();
|
|
85787
|
+
|
|
85788
|
+
if (handler === 'min') {
|
|
85789
|
+
firstDotFocusVisible && this._adapter.setStateVal('firstDotFocusVisible', false);
|
|
85790
|
+
} else {
|
|
85791
|
+
secondDotFocusVisible && this._adapter.setStateVal('secondDotFocusVisible', false);
|
|
85792
|
+
}
|
|
85793
|
+
};
|
|
85712
85794
|
|
|
85713
85795
|
this.handleWrapClick = e => {
|
|
85714
85796
|
const {
|
|
@@ -85901,7 +85983,9 @@ class slider_Slider extends baseComponent_BaseComponent {
|
|
|
85901
85983
|
const {
|
|
85902
85984
|
chooseMovePos,
|
|
85903
85985
|
isDrag,
|
|
85904
|
-
isInRenderTree
|
|
85986
|
+
isInRenderTree,
|
|
85987
|
+
firstDotFocusVisible,
|
|
85988
|
+
secondDotFocusVisible
|
|
85905
85989
|
} = this.state;
|
|
85906
85990
|
const stylePos = vertical ? 'top' : 'left';
|
|
85907
85991
|
const percentInfo = this.foundation.getMinAndMaxPercent(this.state.currentValue);
|
|
@@ -85927,7 +86011,7 @@ class slider_Slider extends baseComponent_BaseComponent {
|
|
|
85927
86011
|
currentValue
|
|
85928
86012
|
} = this.state;
|
|
85929
86013
|
const commonAria = {
|
|
85930
|
-
'aria-label': ariaLabel,
|
|
86014
|
+
'aria-label': ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : disabled ? 'Disabled Slider' : undefined,
|
|
85931
86015
|
'aria-labelledby': ariaLabelledby,
|
|
85932
86016
|
'aria-disabled': disabled
|
|
85933
86017
|
};
|
|
@@ -85939,7 +86023,7 @@ class slider_Slider extends baseComponent_BaseComponent {
|
|
|
85939
86023
|
position: "top",
|
|
85940
86024
|
trigger: "custom",
|
|
85941
86025
|
rePosKey: minPercent,
|
|
85942
|
-
visible: isInRenderTree && tipVisible.min,
|
|
86026
|
+
visible: isInRenderTree && (tipVisible.min || firstDotFocusVisible),
|
|
85943
86027
|
className: "".concat(slider_constants_cssClasses.HANDLE, "-tooltip")
|
|
85944
86028
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", assign_default()({
|
|
85945
86029
|
onMouseOver: this.foundation.checkAndUpdateIsInRenderTreeState,
|
|
@@ -85971,20 +86055,28 @@ class slider_Slider extends baseComponent_BaseComponent {
|
|
|
85971
86055
|
onTouchEnd: e => {
|
|
85972
86056
|
this.foundation.onHandleUp(e);
|
|
85973
86057
|
},
|
|
85974
|
-
|
|
86058
|
+
onKeyDown: e => {
|
|
86059
|
+
this.foundation.handleKeyDown(e, 'min');
|
|
86060
|
+
},
|
|
86061
|
+
onFocus: e => {
|
|
86062
|
+
this.foundation.onFocus(e, 'min');
|
|
86063
|
+
},
|
|
86064
|
+
onBlur: e => {
|
|
86065
|
+
this.foundation.onBlur(e, 'min');
|
|
86066
|
+
},
|
|
85975
86067
|
role: "slider",
|
|
85976
|
-
|
|
86068
|
+
"aria-valuetext": getAriaValueText ? getAriaValueText(currentValue, 0) : ariaValueText,
|
|
86069
|
+
tabIndex: disabled ? -1 : 0
|
|
85977
86070
|
}, commonAria, {
|
|
85978
86071
|
"aria-valuenow": currentValue,
|
|
85979
86072
|
"aria-valuemax": max,
|
|
85980
|
-
"aria-valuemin": min
|
|
85981
|
-
"aria-valuetext": getAriaValueText ? getAriaValueText(currentValue) : ariaValueText
|
|
86073
|
+
"aria-valuemin": min
|
|
85982
86074
|
}))) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(tooltip_Tooltip, {
|
|
85983
86075
|
content: tipChildren.min,
|
|
85984
86076
|
position: "top",
|
|
85985
86077
|
trigger: "custom",
|
|
85986
86078
|
rePosKey: minPercent,
|
|
85987
|
-
visible: isInRenderTree && tipVisible.min,
|
|
86079
|
+
visible: isInRenderTree && (tipVisible.min || firstDotFocusVisible),
|
|
85988
86080
|
className: "".concat(slider_constants_cssClasses.HANDLE, "-tooltip")
|
|
85989
86081
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", assign_default()({
|
|
85990
86082
|
ref: this.minHanleEl,
|
|
@@ -86015,12 +86107,20 @@ class slider_Slider extends baseComponent_BaseComponent {
|
|
|
86015
86107
|
onTouchEnd: e => {
|
|
86016
86108
|
this.foundation.onHandleUp(e);
|
|
86017
86109
|
},
|
|
86018
|
-
|
|
86110
|
+
onKeyDown: e => {
|
|
86111
|
+
this.foundation.handleKeyDown(e, 'min');
|
|
86112
|
+
},
|
|
86113
|
+
onFocus: e => {
|
|
86114
|
+
this.foundation.onFocus(e, 'min');
|
|
86115
|
+
},
|
|
86116
|
+
onBlur: e => {
|
|
86117
|
+
this.foundation.onBlur(e, 'min');
|
|
86118
|
+
},
|
|
86019
86119
|
role: "slider",
|
|
86020
|
-
tabIndex: 0
|
|
86120
|
+
tabIndex: disabled ? -1 : 0
|
|
86021
86121
|
}, commonAria, {
|
|
86122
|
+
"aria-valuetext": getAriaValueText ? getAriaValueText(currentValue[0], 0) : ariaValueText,
|
|
86022
86123
|
"aria-valuenow": currentValue[0],
|
|
86023
|
-
"aria-valuetext": getAriaValueText ? getAriaValueText(currentValue[0]) : ariaValueText,
|
|
86024
86124
|
"aria-valuemax": currentValue[1],
|
|
86025
86125
|
"aria-valuemin": min
|
|
86026
86126
|
}))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(tooltip_Tooltip, {
|
|
@@ -86028,7 +86128,7 @@ class slider_Slider extends baseComponent_BaseComponent {
|
|
|
86028
86128
|
position: "top",
|
|
86029
86129
|
trigger: "custom",
|
|
86030
86130
|
rePosKey: maxPercent,
|
|
86031
|
-
visible: isInRenderTree && tipVisible.max,
|
|
86131
|
+
visible: isInRenderTree && (tipVisible.max || secondDotFocusVisible),
|
|
86032
86132
|
className: "".concat(slider_constants_cssClasses.HANDLE, "-tooltip")
|
|
86033
86133
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", assign_default()({
|
|
86034
86134
|
ref: this.maxHanleEl,
|
|
@@ -86059,12 +86159,20 @@ class slider_Slider extends baseComponent_BaseComponent {
|
|
|
86059
86159
|
onTouchEnd: e => {
|
|
86060
86160
|
this.foundation.onHandleUp(e);
|
|
86061
86161
|
},
|
|
86062
|
-
|
|
86162
|
+
onKeyDown: e => {
|
|
86163
|
+
this.foundation.handleKeyDown(e, 'max');
|
|
86164
|
+
},
|
|
86165
|
+
onFocus: e => {
|
|
86166
|
+
this.foundation.onFocus(e, 'max');
|
|
86167
|
+
},
|
|
86168
|
+
onBlur: e => {
|
|
86169
|
+
this.foundation.onBlur(e, 'max');
|
|
86170
|
+
},
|
|
86063
86171
|
role: "slider",
|
|
86064
|
-
tabIndex: 0
|
|
86172
|
+
tabIndex: disabled ? -1 : 0
|
|
86065
86173
|
}, commonAria, {
|
|
86174
|
+
"aria-valuetext": getAriaValueText ? getAriaValueText(currentValue[1], 1) : ariaValueText,
|
|
86066
86175
|
"aria-valuenow": currentValue[1],
|
|
86067
|
-
"aria-valuetext": getAriaValueText ? getAriaValueText(currentValue[1]) : ariaValueText,
|
|
86068
86176
|
"aria-valuemax": max,
|
|
86069
86177
|
"aria-valuemin": currentValue[0]
|
|
86070
86178
|
}))));
|
|
@@ -86165,6 +86273,13 @@ class slider_Slider extends baseComponent_BaseComponent {
|
|
|
86165
86273
|
return labelContent;
|
|
86166
86274
|
};
|
|
86167
86275
|
|
|
86276
|
+
this._getAriaValueText = (value, index) => {
|
|
86277
|
+
const {
|
|
86278
|
+
getAriaValueText
|
|
86279
|
+
} = this.props;
|
|
86280
|
+
return getAriaValueText ? getAriaValueText(value, index) : value;
|
|
86281
|
+
};
|
|
86282
|
+
|
|
86168
86283
|
let {
|
|
86169
86284
|
value
|
|
86170
86285
|
} = this.props;
|
|
@@ -86185,14 +86300,14 @@ class slider_Slider extends baseComponent_BaseComponent {
|
|
|
86185
86300
|
isDrag: false,
|
|
86186
86301
|
clickValue: 0,
|
|
86187
86302
|
showBoundary: false,
|
|
86188
|
-
isInRenderTree: true
|
|
86303
|
+
isInRenderTree: true,
|
|
86304
|
+
firstDotFocusVisible: false,
|
|
86305
|
+
secondDotFocusVisible: false
|
|
86189
86306
|
};
|
|
86190
86307
|
this.sliderEl = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
|
|
86191
86308
|
this.minHanleEl = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
|
|
86192
86309
|
this.maxHanleEl = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
|
|
86193
|
-
this.dragging = [false, false];
|
|
86194
|
-
// this.isDrag = false;
|
|
86195
|
-
|
|
86310
|
+
this.dragging = [false, false];
|
|
86196
86311
|
this.foundation = new foundation_SliderFoundation(this.adapter);
|
|
86197
86312
|
this.eventListenerSet = new set_default.a();
|
|
86198
86313
|
}
|
|
@@ -86259,8 +86374,7 @@ class slider_Slider extends baseComponent_BaseComponent {
|
|
|
86259
86374
|
return flag;
|
|
86260
86375
|
},
|
|
86261
86376
|
getOverallVars: () => ({
|
|
86262
|
-
dragging: this.dragging
|
|
86263
|
-
chooseMovePos: this.chooseMovePos
|
|
86377
|
+
dragging: this.dragging
|
|
86264
86378
|
}),
|
|
86265
86379
|
updateDisabled: disabled => {
|
|
86266
86380
|
this.setState({
|
|
@@ -86294,9 +86408,6 @@ class slider_Slider extends baseComponent_BaseComponent {
|
|
|
86294
86408
|
getMinHandleEl: () => this.minHanleEl,
|
|
86295
86409
|
getMaxHandleEl: () => this.maxHanleEl,
|
|
86296
86410
|
onHandleDown: e => {
|
|
86297
|
-
e.stopPropagation();
|
|
86298
|
-
e.preventDefault();
|
|
86299
|
-
|
|
86300
86411
|
this._addEventListener(document.body, 'mousemove', this.foundation.onHandleMove, false);
|
|
86301
86412
|
|
|
86302
86413
|
this._addEventListener(document.body, 'mouseup', this.foundation.onHandleUp, false);
|
|
@@ -86419,37 +86530,55 @@ class slider_Slider extends baseComponent_BaseComponent {
|
|
|
86419
86530
|
}
|
|
86420
86531
|
|
|
86421
86532
|
render() {
|
|
86533
|
+
var _context5;
|
|
86534
|
+
|
|
86535
|
+
const {
|
|
86536
|
+
disabled,
|
|
86537
|
+
currentValue,
|
|
86538
|
+
min,
|
|
86539
|
+
max
|
|
86540
|
+
} = this.state;
|
|
86541
|
+
const {
|
|
86542
|
+
vertical,
|
|
86543
|
+
verticalReverse,
|
|
86544
|
+
style,
|
|
86545
|
+
railStyle,
|
|
86546
|
+
range,
|
|
86547
|
+
className
|
|
86548
|
+
} = this.props;
|
|
86422
86549
|
const wrapperClass = classnames_default()("".concat(slider_prefixCls, "-wrapper"), {
|
|
86423
|
-
["".concat(slider_prefixCls, "-disabled")]:
|
|
86424
|
-
["".concat(slider_constants_cssClasses.VERTICAL, "-wrapper")]:
|
|
86425
|
-
["".concat(slider_prefixCls, "-reverse")]:
|
|
86426
|
-
},
|
|
86550
|
+
["".concat(slider_prefixCls, "-disabled")]: disabled,
|
|
86551
|
+
["".concat(slider_constants_cssClasses.VERTICAL, "-wrapper")]: vertical,
|
|
86552
|
+
["".concat(slider_prefixCls, "-reverse")]: vertical && verticalReverse
|
|
86553
|
+
}, className);
|
|
86427
86554
|
const boundaryClass = classnames_default()("".concat(slider_prefixCls, "-boundary"), {
|
|
86428
86555
|
["".concat(slider_prefixCls, "-boundary-show")]: this.props.showBoundary && this.state.showBoundary
|
|
86429
86556
|
});
|
|
86430
86557
|
const sliderCls = classnames_default()({
|
|
86431
|
-
["".concat(slider_prefixCls)]: !
|
|
86432
|
-
[slider_constants_cssClasses.VERTICAL]:
|
|
86558
|
+
["".concat(slider_prefixCls)]: !vertical,
|
|
86559
|
+
[slider_constants_cssClasses.VERTICAL]: vertical
|
|
86433
86560
|
});
|
|
86561
|
+
const ariaLabel = range ? concat_default()(_context5 = "Range: ".concat(this._getAriaValueText(currentValue[0], 0), " to ")).call(_context5, this._getAriaValueText(currentValue[1], 1)) : undefined;
|
|
86434
86562
|
const slider = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
86435
86563
|
className: wrapperClass,
|
|
86436
|
-
style:
|
|
86564
|
+
style: style,
|
|
86437
86565
|
ref: this.sliderEl,
|
|
86566
|
+
"aria-label": ariaLabel,
|
|
86438
86567
|
onMouseEnter: () => this.foundation.handleWrapperEnter(),
|
|
86439
86568
|
onMouseLeave: () => this.foundation.handleWrapperLeave()
|
|
86440
86569
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
86441
86570
|
className: "".concat(slider_prefixCls, "-rail"),
|
|
86442
86571
|
onClick: this.foundation.handleWrapClick,
|
|
86443
|
-
style:
|
|
86572
|
+
style: railStyle
|
|
86444
86573
|
}), this.renderTrack(), this.renderStepDot(), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", null, this.renderHandle()), this.renderLabel(), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
86445
86574
|
className: boundaryClass
|
|
86446
86575
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
86447
86576
|
className: "".concat(slider_prefixCls, "-boundary-min")
|
|
86448
|
-
},
|
|
86577
|
+
}, min), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
86449
86578
|
className: "".concat(slider_prefixCls, "-boundary-max")
|
|
86450
|
-
},
|
|
86579
|
+
}, max)));
|
|
86451
86580
|
|
|
86452
|
-
if (!
|
|
86581
|
+
if (!vertical) {
|
|
86453
86582
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
86454
86583
|
className: sliderCls
|
|
86455
86584
|
}, slider);
|
|
@@ -86502,7 +86631,8 @@ slider_Slider.propTypes = {
|
|
|
86502
86631
|
className: prop_types_default.a.string,
|
|
86503
86632
|
showBoundary: prop_types_default.a.bool,
|
|
86504
86633
|
railStyle: prop_types_default.a.object,
|
|
86505
|
-
verticalReverse: prop_types_default.a.bool
|
|
86634
|
+
verticalReverse: prop_types_default.a.bool,
|
|
86635
|
+
getAriaValueText: prop_types_default.a.func
|
|
86506
86636
|
};
|
|
86507
86637
|
slider_Slider.defaultProps = {
|
|
86508
86638
|
// allowClear: false,
|
|
@@ -106031,10 +106161,6 @@ function _nonIterableSpread() {
|
|
|
106031
106161
|
function _toConsumableArray(arr) {
|
|
106032
106162
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
106033
106163
|
}
|
|
106034
|
-
// EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/prop-types/index.js
|
|
106035
|
-
var semi_design_node_modules_prop_types = __webpack_require__("aWzz");
|
|
106036
|
-
var semi_design_node_modules_prop_types_default = /*#__PURE__*/__webpack_require__.n(semi_design_node_modules_prop_types);
|
|
106037
|
-
|
|
106038
106164
|
// CONCATENATED MODULE: /home/runner/work/semi-design/semi-design/node_modules/react-sortable-hoc/dist/react-sortable-hoc.esm.js
|
|
106039
106165
|
|
|
106040
106166
|
|
|
@@ -106552,37 +106678,37 @@ function defaultShouldCancelStart(event) {
|
|
|
106552
106678
|
}
|
|
106553
106679
|
|
|
106554
106680
|
var propTypes = {
|
|
106555
|
-
axis:
|
|
106556
|
-
contentWindow:
|
|
106557
|
-
disableAutoscroll:
|
|
106558
|
-
distance:
|
|
106559
|
-
getContainer:
|
|
106560
|
-
getHelperDimensions:
|
|
106561
|
-
helperClass:
|
|
106562
|
-
helperContainer:
|
|
106563
|
-
hideSortableGhost:
|
|
106564
|
-
keyboardSortingTransitionDuration:
|
|
106565
|
-
lockAxis:
|
|
106566
|
-
lockOffset:
|
|
106567
|
-
lockToContainerEdges:
|
|
106568
|
-
onSortEnd:
|
|
106569
|
-
onSortMove:
|
|
106570
|
-
onSortOver:
|
|
106571
|
-
onSortStart:
|
|
106572
|
-
pressDelay:
|
|
106573
|
-
pressThreshold:
|
|
106574
|
-
keyCodes:
|
|
106575
|
-
lift:
|
|
106576
|
-
drop:
|
|
106577
|
-
cancel:
|
|
106578
|
-
up:
|
|
106579
|
-
down:
|
|
106681
|
+
axis: prop_types_default.a.oneOf(['x', 'y', 'xy']),
|
|
106682
|
+
contentWindow: prop_types_default.a.any,
|
|
106683
|
+
disableAutoscroll: prop_types_default.a.bool,
|
|
106684
|
+
distance: prop_types_default.a.number,
|
|
106685
|
+
getContainer: prop_types_default.a.func,
|
|
106686
|
+
getHelperDimensions: prop_types_default.a.func,
|
|
106687
|
+
helperClass: prop_types_default.a.string,
|
|
106688
|
+
helperContainer: prop_types_default.a.oneOfType([prop_types_default.a.func, typeof HTMLElement === 'undefined' ? prop_types_default.a.any : prop_types_default.a.instanceOf(HTMLElement)]),
|
|
106689
|
+
hideSortableGhost: prop_types_default.a.bool,
|
|
106690
|
+
keyboardSortingTransitionDuration: prop_types_default.a.number,
|
|
106691
|
+
lockAxis: prop_types_default.a.string,
|
|
106692
|
+
lockOffset: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string, prop_types_default.a.arrayOf(prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string]))]),
|
|
106693
|
+
lockToContainerEdges: prop_types_default.a.bool,
|
|
106694
|
+
onSortEnd: prop_types_default.a.func,
|
|
106695
|
+
onSortMove: prop_types_default.a.func,
|
|
106696
|
+
onSortOver: prop_types_default.a.func,
|
|
106697
|
+
onSortStart: prop_types_default.a.func,
|
|
106698
|
+
pressDelay: prop_types_default.a.number,
|
|
106699
|
+
pressThreshold: prop_types_default.a.number,
|
|
106700
|
+
keyCodes: prop_types_default.a.shape({
|
|
106701
|
+
lift: prop_types_default.a.arrayOf(prop_types_default.a.number),
|
|
106702
|
+
drop: prop_types_default.a.arrayOf(prop_types_default.a.number),
|
|
106703
|
+
cancel: prop_types_default.a.arrayOf(prop_types_default.a.number),
|
|
106704
|
+
up: prop_types_default.a.arrayOf(prop_types_default.a.number),
|
|
106705
|
+
down: prop_types_default.a.arrayOf(prop_types_default.a.number)
|
|
106580
106706
|
}),
|
|
106581
|
-
shouldCancelStart:
|
|
106582
|
-
transitionDuration:
|
|
106583
|
-
updateBeforeSortStart:
|
|
106584
|
-
useDragHandle:
|
|
106585
|
-
useWindowAsScrollContainer:
|
|
106707
|
+
shouldCancelStart: prop_types_default.a.func,
|
|
106708
|
+
transitionDuration: prop_types_default.a.number,
|
|
106709
|
+
updateBeforeSortStart: prop_types_default.a.func,
|
|
106710
|
+
useDragHandle: prop_types_default.a.bool,
|
|
106711
|
+
useWindowAsScrollContainer: prop_types_default.a.bool
|
|
106586
106712
|
};
|
|
106587
106713
|
var defaultKeyCodes = {
|
|
106588
106714
|
lift: [KEYCODE.SPACE],
|
|
@@ -107529,9 +107655,9 @@ function sortableContainer(WrappedComponent) {
|
|
|
107529
107655
|
}
|
|
107530
107656
|
|
|
107531
107657
|
var propTypes$1 = {
|
|
107532
|
-
index:
|
|
107533
|
-
collection:
|
|
107534
|
-
disabled:
|
|
107658
|
+
index: prop_types_default.a.number.isRequired,
|
|
107659
|
+
collection: prop_types_default.a.oneOfType([prop_types_default.a.number, prop_types_default.a.string]),
|
|
107660
|
+
disabled: prop_types_default.a.bool
|
|
107535
107661
|
};
|
|
107536
107662
|
var omittedProps$1 = Object.keys(propTypes$1);
|
|
107537
107663
|
function sortableElement(WrappedComponent) {
|
|
@@ -108479,16 +108605,8 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
108479
108605
|
type,
|
|
108480
108606
|
showPath
|
|
108481
108607
|
} = this.props;
|
|
108482
|
-
let newItem = item;
|
|
108483
108608
|
|
|
108484
|
-
|
|
108485
|
-
newItem = assign_default()(assign_default()({}, item), {
|
|
108486
|
-
key: item._optionKey
|
|
108487
|
-
});
|
|
108488
|
-
delete newItem._optionKey;
|
|
108489
|
-
}
|
|
108490
|
-
|
|
108491
|
-
const onRemove = () => this.foundation.handleSelectOrRemove(newItem);
|
|
108609
|
+
const onRemove = () => this.foundation.handleSelectOrRemove(item);
|
|
108492
108610
|
|
|
108493
108611
|
const rightItemCls = classnames_default()({
|
|
108494
108612
|
["".concat(transfer_prefixcls, "-item")]: true,
|
|
@@ -108516,7 +108634,7 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
108516
108634
|
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
108517
108635
|
role: "listitem",
|
|
108518
108636
|
className: rightItemCls,
|
|
108519
|
-
key:
|
|
108637
|
+
key: item.key
|
|
108520
108638
|
}, draggable ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(DragHandle, null) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
108521
108639
|
className: "".concat(transfer_prefixcls, "-right-item-text")
|
|
108522
108640
|
}, label), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, {
|
|
@@ -108543,7 +108661,7 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
108543
108661
|
|
|
108544
108662
|
renderRightSortableList(selectedData) {
|
|
108545
108663
|
// when choose some items && draggable is true
|
|
108546
|
-
const SortableItem = sortableElement(
|
|
108664
|
+
const SortableItem = sortableElement(props => this.renderRightItem(props.item));
|
|
108547
108665
|
const SortableList = sortableContainer(_ref => {
|
|
108548
108666
|
let {
|
|
108549
108667
|
items
|
|
@@ -108554,14 +108672,12 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
108554
108672
|
"aria-label": "Selected list"
|
|
108555
108673
|
}, map_default()(items).call(items, (item, index) =>
|
|
108556
108674
|
/*#__PURE__*/
|
|
108557
|
-
// sortableElement will take over the property 'key', so use another '_optionKey' to pass
|
|
108558
108675
|
// @ts-ignore skip SortableItem type check
|
|
108559
|
-
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(SortableItem,
|
|
108676
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(SortableItem, {
|
|
108560
108677
|
key: item.label,
|
|
108561
|
-
index: index
|
|
108562
|
-
|
|
108563
|
-
|
|
108564
|
-
})))) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
108678
|
+
index: index,
|
|
108679
|
+
item: item
|
|
108680
|
+
}))) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
108565
108681
|
// @ts-ignore see reasons: https://github.com/clauderic/react-sortable-hoc/issues/206
|
|
108566
108682
|
;
|
|
108567
108683
|
}, {
|