shineout 3.9.8-beta.9 → 3.9.8
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/cjs/index.js +1 -1
- package/dist/shineout.js +139 -53
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/index.js +1 -1
- package/package.json +5 -5
package/cjs/index.js
CHANGED
|
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
522
522
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
523
523
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
524
524
|
var _default = exports.default = {
|
|
525
|
-
version: '3.9.8
|
|
525
|
+
version: '3.9.8'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -6613,7 +6613,7 @@ __webpack_require__.r(strings_namespaceObject);
|
|
|
6613
6613
|
__webpack_require__.d(strings_namespaceObject, {
|
|
6614
6614
|
capitalize: function() { return capitalize; },
|
|
6615
6615
|
getDirectionIconName: function() { return getDirectionIconName; },
|
|
6616
|
-
getRTLPosition: function() { return
|
|
6616
|
+
getRTLPosition: function() { return strings_getRTLPosition; },
|
|
6617
6617
|
removeProtocol: function() { return strings_removeProtocol; },
|
|
6618
6618
|
substitute: function() { return strings_substitute; }
|
|
6619
6619
|
});
|
|
@@ -12402,7 +12402,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12402
12402
|
};
|
|
12403
12403
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12404
12404
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12405
|
-
/* harmony default export */ var version = ('3.9.8
|
|
12405
|
+
/* harmony default export */ var version = ('3.9.8');
|
|
12406
12406
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12407
12407
|
|
|
12408
12408
|
|
|
@@ -21738,6 +21738,9 @@ var menuStyle = {
|
|
|
21738
21738
|
'$wrapper:not($wrapperVertical) $itemClosing > $itemContent &': {
|
|
21739
21739
|
transform: 'rotate(0deg)'
|
|
21740
21740
|
}
|
|
21741
|
+
},
|
|
21742
|
+
'&$expandFront > $icon': {
|
|
21743
|
+
minHeight: src.lineHeightDynamic
|
|
21741
21744
|
}
|
|
21742
21745
|
},
|
|
21743
21746
|
expandVertical: {
|
|
@@ -31100,6 +31103,26 @@ var usePopup = function usePopup(props) {
|
|
|
31100
31103
|
};
|
|
31101
31104
|
};
|
|
31102
31105
|
/* harmony default export */ var use_popup = (usePopup);
|
|
31106
|
+
;// CONCATENATED MODULE: ../hooks/src/utils/rtl.ts
|
|
31107
|
+
var oppositeMap = {
|
|
31108
|
+
left: 'right',
|
|
31109
|
+
right: 'left',
|
|
31110
|
+
'left-top': 'right-top',
|
|
31111
|
+
'left-bottom': 'right-bottom',
|
|
31112
|
+
'right-top': 'left-top',
|
|
31113
|
+
'right-bottom': 'left-bottom',
|
|
31114
|
+
'top-left': 'top-right',
|
|
31115
|
+
'top-right': 'top-left',
|
|
31116
|
+
'bottom-left': 'bottom-right',
|
|
31117
|
+
'bottom-right': 'bottom-left',
|
|
31118
|
+
top: 'top',
|
|
31119
|
+
bottom: 'bottom',
|
|
31120
|
+
auto: 'auto'
|
|
31121
|
+
};
|
|
31122
|
+
var getRTLPosition = function getRTLPosition(position, isRTL) {
|
|
31123
|
+
if (!isRTL || !position) return position;
|
|
31124
|
+
return oppositeMap[position] || position;
|
|
31125
|
+
};
|
|
31103
31126
|
;// CONCATENATED MODULE: ../hooks/src/utils/func.ts
|
|
31104
31127
|
// 节流函数
|
|
31105
31128
|
var throttle = function throttle(func, wait) {
|
|
@@ -33446,7 +33469,7 @@ var Popover = function Popover(props) {
|
|
|
33446
33469
|
open: props.visible,
|
|
33447
33470
|
defaultOpen: props.defaultVisible,
|
|
33448
33471
|
onCollapse: onVisibleChange,
|
|
33449
|
-
position: props.position,
|
|
33472
|
+
position: getRTLPosition(props.position, config.direction === 'rtl'),
|
|
33450
33473
|
trigger: trigger,
|
|
33451
33474
|
autoMode: 'popover',
|
|
33452
33475
|
priorityDirection: priorityDirection,
|
|
@@ -33897,7 +33920,7 @@ function useForkRef() {
|
|
|
33897
33920
|
|
|
33898
33921
|
|
|
33899
33922
|
|
|
33900
|
-
var animation_list_excluded = ["display", "children", "style", "onRef", "show", "duration", "type", "className", "animation", "onAnimationAfterEnter"];
|
|
33923
|
+
var animation_list_excluded = ["display", "children", "style", "onRef", "show", "duration", "type", "className", "animation", "onAnimationAfterEnter", "dir"];
|
|
33901
33924
|
|
|
33902
33925
|
|
|
33903
33926
|
|
|
@@ -33949,6 +33972,7 @@ var AnimationList = function AnimationList(props) {
|
|
|
33949
33972
|
_props$animation = props.animation,
|
|
33950
33973
|
animation = _props$animation === void 0 ? true : _props$animation,
|
|
33951
33974
|
onAnimationAfterEnter = props.onAnimationAfterEnter,
|
|
33975
|
+
dir = props.dir,
|
|
33952
33976
|
forwardProps = objectWithoutProperties_default()(props, animation_list_excluded);
|
|
33953
33977
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(undefined),
|
|
33954
33978
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
@@ -34239,7 +34263,8 @@ var AnimationList = function AnimationList(props) {
|
|
|
34239
34263
|
className: classNamePo,
|
|
34240
34264
|
"data-sheinx-animation-type": type.join(' '),
|
|
34241
34265
|
"data-sheinx-animation-duration": duration,
|
|
34242
|
-
style: wrapperStyle
|
|
34266
|
+
style: wrapperStyle,
|
|
34267
|
+
dir: dir
|
|
34243
34268
|
}, forwardProps), {}, {
|
|
34244
34269
|
children: children
|
|
34245
34270
|
}));
|
|
@@ -34369,7 +34394,7 @@ var Tooltip = function Tooltip(props) {
|
|
|
34369
34394
|
var delay = props.delay || props.mouseEnterDelay || defaultDelay;
|
|
34370
34395
|
var mouseLeaveDelay = props.mouseLeaveDelay || defaultDelay;
|
|
34371
34396
|
var _usePopup = use_popup({
|
|
34372
|
-
position: popsitionProps,
|
|
34397
|
+
position: getRTLPosition(popsitionProps, config.direction === 'rtl'),
|
|
34373
34398
|
trigger: trigger,
|
|
34374
34399
|
autoMode: 'popover',
|
|
34375
34400
|
priorityDirection: priorityDirection,
|
|
@@ -38366,7 +38391,8 @@ var input_Input = function Input(props) {
|
|
|
38366
38391
|
digits: commonProps.digits,
|
|
38367
38392
|
integerLimit: commonProps.integerLimit,
|
|
38368
38393
|
numType: commonProps.numType,
|
|
38369
|
-
trim: (_ref = (_commonProps$trim = commonProps.trim) !== null && _commonProps$trim !== void 0 ? _commonProps$trim : config.trim) !== null && _ref !== void 0 ? _ref : false
|
|
38394
|
+
trim: (_ref = (_commonProps$trim = commonProps.trim) !== null && _commonProps$trim !== void 0 ? _commonProps$trim : config.trim) !== null && _ref !== void 0 ? _ref : false,
|
|
38395
|
+
required: false
|
|
38370
38396
|
};
|
|
38371
38397
|
var inputFormatProps = use_input_format(objectSpread2_default()({
|
|
38372
38398
|
value: commonProps.value,
|
|
@@ -42429,6 +42455,7 @@ var Result = function Result(props) {
|
|
|
42429
42455
|
disabledRight = props.disabledRight,
|
|
42430
42456
|
_props$activeIndex = props.activeIndex,
|
|
42431
42457
|
activeIndex = _props$activeIndex === void 0 ? -1 : _props$activeIndex,
|
|
42458
|
+
weekShort = props.weekShort,
|
|
42432
42459
|
onClickProps = props.onClick;
|
|
42433
42460
|
var _useConfig = useConfig(),
|
|
42434
42461
|
locale = _useConfig.locale;
|
|
@@ -42490,7 +42517,7 @@ var Result = function Result(props) {
|
|
|
42490
42517
|
var className = classnames_default()(styles === null || styles === void 0 ? void 0 : styles.resultText, info.target && (styles === null || styles === void 0 ? void 0 : styles.placeholder), dis && (styles === null || styles === void 0 ? void 0 : styles.resultTextDisabled), info.index === activeIndex && (styles === null || styles === void 0 ? void 0 : styles.resultTextActive));
|
|
42491
42518
|
var formFieldId = (fieldId === null || fieldId === void 0 ? void 0 : fieldId.split(separator)) || [];
|
|
42492
42519
|
var inputValue = info.target || info.value || '';
|
|
42493
|
-
var displayValue = props.type === 'week' && inputValue ? "".concat(inputValue).concat(getLocale(locale, 'weekShort')) : inputValue;
|
|
42520
|
+
var displayValue = props.type === 'week' && inputValue && weekShort !== null ? "".concat(inputValue).concat(weekShort === undefined ? getLocale(locale, 'weekShort') : weekShort) : inputValue;
|
|
42494
42521
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
42495
42522
|
className: className,
|
|
42496
42523
|
id: formFieldId[info.index],
|
|
@@ -43562,7 +43589,6 @@ var Cascader = function Cascader(props0) {
|
|
|
43562
43589
|
var _useConfig = useConfig(),
|
|
43563
43590
|
locale = _useConfig.locale,
|
|
43564
43591
|
direction = _useConfig.direction;
|
|
43565
|
-
var isRtl = direction === 'rtl';
|
|
43566
43592
|
var jssStyle = props.jssStyle,
|
|
43567
43593
|
style = props.style,
|
|
43568
43594
|
_props$adjust = props.adjust,
|
|
@@ -43615,7 +43641,7 @@ var Cascader = function Cascader(props0) {
|
|
|
43615
43641
|
compressed = props.compressed,
|
|
43616
43642
|
compressedBound = props.compressedBound,
|
|
43617
43643
|
_props$position = props.position,
|
|
43618
|
-
positionProp = _props$position === void 0 ?
|
|
43644
|
+
positionProp = _props$position === void 0 ? 'bottom-left' : _props$position,
|
|
43619
43645
|
absolute = props.absolute,
|
|
43620
43646
|
zIndex = props.zIndex,
|
|
43621
43647
|
emptyText = props.emptyText,
|
|
@@ -43706,7 +43732,7 @@ var Cascader = function Cascader(props0) {
|
|
|
43706
43732
|
onCollapse: onCollapse,
|
|
43707
43733
|
disabled: false,
|
|
43708
43734
|
trigger: 'click',
|
|
43709
|
-
position: positionProp
|
|
43735
|
+
position: getRTLPosition(positionProp, direction === 'rtl')
|
|
43710
43736
|
}),
|
|
43711
43737
|
open = _usePopup.open,
|
|
43712
43738
|
position = _usePopup.position,
|
|
@@ -44244,6 +44270,7 @@ var Cascader = function Cascader(props0) {
|
|
|
44244
44270
|
type: "scale-y",
|
|
44245
44271
|
duration: 'fast',
|
|
44246
44272
|
style: pickerWrapperStyle,
|
|
44273
|
+
dir: direction,
|
|
44247
44274
|
children: renderPanel()
|
|
44248
44275
|
})
|
|
44249
44276
|
})]
|
|
@@ -47340,7 +47367,36 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
|
47340
47367
|
return item;
|
|
47341
47368
|
});
|
|
47342
47369
|
var isDis = isDisabledInputDate(inputValue);
|
|
47370
|
+
|
|
47371
|
+
// Check min/max constraints for inputValue
|
|
47372
|
+
var isOutOfRange = false;
|
|
47343
47373
|
if (!isDis) {
|
|
47374
|
+
for (var i = 0; i < inputValue.length; i++) {
|
|
47375
|
+
var _date = inputValue[i];
|
|
47376
|
+
if (_date) {
|
|
47377
|
+
if (type === 'week') {
|
|
47378
|
+
if (props.min && util.compareWeek(_date, props.min, 0, options) < 0) {
|
|
47379
|
+
isOutOfRange = true;
|
|
47380
|
+
break;
|
|
47381
|
+
}
|
|
47382
|
+
if (props.max && util.compareWeek(_date, props.max, 0, options) > 0) {
|
|
47383
|
+
isOutOfRange = true;
|
|
47384
|
+
break;
|
|
47385
|
+
}
|
|
47386
|
+
} else {
|
|
47387
|
+
if (props.min && util.compareDay(_date, props.min, 0, options) < 0) {
|
|
47388
|
+
isOutOfRange = true;
|
|
47389
|
+
break;
|
|
47390
|
+
}
|
|
47391
|
+
if (props.max && util.compareDay(_date, props.max, 0, options) > 0) {
|
|
47392
|
+
isOutOfRange = true;
|
|
47393
|
+
break;
|
|
47394
|
+
}
|
|
47395
|
+
}
|
|
47396
|
+
}
|
|
47397
|
+
}
|
|
47398
|
+
}
|
|
47399
|
+
if (!isDis && !isOutOfRange) {
|
|
47344
47400
|
formatValue = getFormatValueArr(inputValue);
|
|
47345
47401
|
}
|
|
47346
47402
|
}
|
|
@@ -49617,7 +49673,9 @@ var DatePicker = function DatePicker(props0) {
|
|
|
49617
49673
|
disabled = props.disabled,
|
|
49618
49674
|
size = props.size,
|
|
49619
49675
|
_props$adjust = props.adjust,
|
|
49620
|
-
adjust = _props$adjust === void 0 ? true : _props$adjust
|
|
49676
|
+
adjust = _props$adjust === void 0 ? true : _props$adjust,
|
|
49677
|
+
startOfWeek = props.startOfWeek,
|
|
49678
|
+
weekShort = props.weekShort;
|
|
49621
49679
|
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(-1),
|
|
49622
49680
|
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
49623
49681
|
activeIndex = _React$useState2[0],
|
|
@@ -49639,7 +49697,6 @@ var DatePicker = function DatePicker(props0) {
|
|
|
49639
49697
|
inputRefs: []
|
|
49640
49698
|
});
|
|
49641
49699
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$datePicker = jssStyle.datePicker) === null || _jssStyle$datePicker === void 0 ? void 0 : _jssStyle$datePicker.call(jssStyle);
|
|
49642
|
-
var isRTL = direction === 'rtl';
|
|
49643
49700
|
var dfp = 'bottom-left';
|
|
49644
49701
|
var _React$useState9 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false),
|
|
49645
49702
|
_React$useState10 = slicedToArray_default()(_React$useState9, 2),
|
|
@@ -49651,13 +49708,10 @@ var DatePicker = function DatePicker(props0) {
|
|
|
49651
49708
|
} else if (!date_picker_verticalPosition.includes(listPosition)) {
|
|
49652
49709
|
listPosition = dfp;
|
|
49653
49710
|
}
|
|
49654
|
-
if (isRTL) {
|
|
49655
|
-
if (listPosition === 'bottom-left') listPosition = 'bottom-right';else if (listPosition === 'bottom-right') listPosition = 'bottom-left';else if (listPosition === 'top-left') listPosition = 'top-right';else if (listPosition === 'top-right') listPosition = 'top-left';
|
|
49656
|
-
}
|
|
49657
49711
|
var options = {
|
|
49658
49712
|
timeZone: props.timeZone,
|
|
49659
49713
|
// 需要确保 weekStartsOn 是 number,否则后续的星期顺序计算都会出错
|
|
49660
|
-
weekStartsOn: Number(getLocale(locale, 'startOfWeek'))
|
|
49714
|
+
weekStartsOn: startOfWeek === null || startOfWeek === undefined ? Number(getLocale(locale, 'startOfWeek')) : startOfWeek
|
|
49661
49715
|
};
|
|
49662
49716
|
var inputAbleResult = useInputAble({
|
|
49663
49717
|
value: props.value,
|
|
@@ -49681,7 +49735,9 @@ var DatePicker = function DatePicker(props0) {
|
|
|
49681
49735
|
allowSingle: props.allowSingle,
|
|
49682
49736
|
defaultCurrent: props.defaultPickerValue || props.defaultRangeMonth,
|
|
49683
49737
|
formatResult: props.formatResult,
|
|
49684
|
-
onPickerChange: props.onPickerChange
|
|
49738
|
+
onPickerChange: props.onPickerChange,
|
|
49739
|
+
min: props.min,
|
|
49740
|
+
max: props.max
|
|
49685
49741
|
}),
|
|
49686
49742
|
inputArr = _useDatePickerFormat.inputArr,
|
|
49687
49743
|
resultArr = _useDatePickerFormat.resultArr,
|
|
@@ -49730,7 +49786,7 @@ var DatePicker = function DatePicker(props0) {
|
|
|
49730
49786
|
onCollapse: onCollapse,
|
|
49731
49787
|
disabled: disabledStatus === 'all',
|
|
49732
49788
|
trigger: 'click',
|
|
49733
|
-
position: listPosition
|
|
49789
|
+
position: getRTLPosition(listPosition, direction === 'rtl')
|
|
49734
49790
|
}),
|
|
49735
49791
|
open = _usePopup.open,
|
|
49736
49792
|
position = _usePopup.position,
|
|
@@ -49804,6 +49860,7 @@ var DatePicker = function DatePicker(props0) {
|
|
|
49804
49860
|
disabledLeft: disabledStatus === 'left',
|
|
49805
49861
|
disabledRight: disabledStatus === 'right',
|
|
49806
49862
|
placeholder: props.placeholder,
|
|
49863
|
+
weekShort: weekShort,
|
|
49807
49864
|
focused: focused,
|
|
49808
49865
|
open: open,
|
|
49809
49866
|
onFocus: handleFocus,
|
|
@@ -50455,6 +50512,7 @@ function _ReactUnmount() {
|
|
|
50455
50512
|
|
|
50456
50513
|
|
|
50457
50514
|
|
|
50515
|
+
|
|
50458
50516
|
var hasMask = false;
|
|
50459
50517
|
var modal_content_config = {
|
|
50460
50518
|
instanceIds: [],
|
|
@@ -50513,6 +50571,8 @@ var Modal = function Modal(props) {
|
|
|
50513
50571
|
var _props$jssStyle, _props$jssStyle$modal;
|
|
50514
50572
|
var modalClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$modal = _props$jssStyle.modal) === null || _props$jssStyle$modal === void 0 ? void 0 : _props$jssStyle$modal.call(_props$jssStyle);
|
|
50515
50573
|
var panelRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
50574
|
+
var wrapperRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
50575
|
+
var popupCtx = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(popup_context);
|
|
50516
50576
|
var isPositionX = ['left', 'right'].includes(props.position || '');
|
|
50517
50577
|
var isPositionY = ['top', 'bottom'].includes(props.position || '');
|
|
50518
50578
|
var defaultWidth = isPositionX ? 'auto' : 500;
|
|
@@ -50726,6 +50786,22 @@ var Modal = function Modal(props) {
|
|
|
50726
50786
|
}
|
|
50727
50787
|
}, [props.setInnerClose]);
|
|
50728
50788
|
|
|
50789
|
+
// 将 Modal 的 ref 注册到父 Popover 的 chain 中,防止点击 Modal 时关闭 Popover
|
|
50790
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
50791
|
+
// Modal 显示或关闭动画播放期间,都需要在 chain 中
|
|
50792
|
+
if (wrapperRef.current) {
|
|
50793
|
+
if (visible) {
|
|
50794
|
+
popupCtx.bindChild(wrapperRef);
|
|
50795
|
+
} else {
|
|
50796
|
+
popupCtx.removeChild(wrapperRef);
|
|
50797
|
+
}
|
|
50798
|
+
}
|
|
50799
|
+
return function () {
|
|
50800
|
+
// 确保清理时移除
|
|
50801
|
+
popupCtx.removeChild(wrapperRef);
|
|
50802
|
+
};
|
|
50803
|
+
}, [visible]);
|
|
50804
|
+
|
|
50729
50805
|
// render
|
|
50730
50806
|
var renderIcon = function renderIcon(isEmptyTitle) {
|
|
50731
50807
|
var iconRoot = classnames_default()(modalClasses === null || modalClasses === void 0 ? void 0 : modalClasses.headerIcon, isEmptyTitle && (modalClasses === null || modalClasses === void 0 ? void 0 : modalClasses.emptyIcon));
|
|
@@ -50854,6 +50930,7 @@ var Modal = function Modal(props) {
|
|
|
50854
50930
|
context.content = content;
|
|
50855
50931
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(FormFooterProvider, {
|
|
50856
50932
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
50933
|
+
ref: wrapperRef,
|
|
50857
50934
|
onClick: function onClick(e) {
|
|
50858
50935
|
e.stopPropagation();
|
|
50859
50936
|
},
|
|
@@ -51262,7 +51339,7 @@ var Dropdown = function Dropdown(props) {
|
|
|
51262
51339
|
var dropdownClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$dropdown = jssStyle.dropdown) === null || _jssStyle$dropdown === void 0 ? void 0 : _jssStyle$dropdown.call(jssStyle);
|
|
51263
51340
|
var config = useConfig();
|
|
51264
51341
|
var isRtl = config.direction === 'rtl';
|
|
51265
|
-
var dfp =
|
|
51342
|
+
var dfp = 'bottom-left';
|
|
51266
51343
|
var positionMap = {
|
|
51267
51344
|
'left-top': 'left-top',
|
|
51268
51345
|
'left-bottom': 'left-bottom',
|
|
@@ -51283,7 +51360,7 @@ var Dropdown = function Dropdown(props) {
|
|
|
51283
51360
|
onCollapse: props.onCollapse,
|
|
51284
51361
|
disabled: disabled,
|
|
51285
51362
|
trigger: trigger,
|
|
51286
|
-
position: props.position || dfp,
|
|
51363
|
+
position: getRTLPosition(props.position || dfp, isRtl),
|
|
51287
51364
|
autoMode: 'menu',
|
|
51288
51365
|
priorityDirection: 'vertical',
|
|
51289
51366
|
mouseLeaveDelay: 200
|
|
@@ -58845,7 +58922,7 @@ function Select(props0) {
|
|
|
58845
58922
|
createOnBlur = _props$createOnBlur === void 0 ? true : _props$createOnBlur;
|
|
58846
58923
|
var hasFilter = isFunc(props.onAdvancedFilter || onFilterProp);
|
|
58847
58924
|
var showInput = hasFilter || isFunc(onCreateProp) || onCreateProp === true;
|
|
58848
|
-
var positionProp = props.position ||
|
|
58925
|
+
var positionProp = props.position || 'bottom-left';
|
|
58849
58926
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$select = jssStyle.select) === null || _jssStyle$select === void 0 ? void 0 : _jssStyle$select.call(jssStyle);
|
|
58850
58927
|
var rootStyle = Object.assign({
|
|
58851
58928
|
width: width
|
|
@@ -58920,7 +58997,7 @@ function Select(props0) {
|
|
|
58920
58997
|
onCollapse: onCollapse,
|
|
58921
58998
|
disabled: false,
|
|
58922
58999
|
trigger: trigger,
|
|
58923
|
-
position: positionProp
|
|
59000
|
+
position: getRTLPosition(positionProp, direction === 'rtl')
|
|
58924
59001
|
}),
|
|
58925
59002
|
open = _usePopup.open,
|
|
58926
59003
|
position = _usePopup.position,
|
|
@@ -61193,6 +61270,21 @@ var MenuItem = function MenuItem(props) {
|
|
|
61193
61270
|
flexShrink: 0
|
|
61194
61271
|
}
|
|
61195
61272
|
}) : null;
|
|
61273
|
+
var frontCaret = null;
|
|
61274
|
+
if (props.frontCaret) {
|
|
61275
|
+
frontCaret = /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
61276
|
+
style: {
|
|
61277
|
+
color: props.caretColor
|
|
61278
|
+
},
|
|
61279
|
+
className: classnames_default()(classes === null || classes === void 0 ? void 0 : classes.expand, classes === null || classes === void 0 ? void 0 : classes.expandFront, (isVertical || isSubHorizontal) && (classes === null || classes === void 0 ? void 0 : classes.expandVertical), props.parentSelectable && (classes === null || classes === void 0 ? void 0 : classes.expandHover)),
|
|
61280
|
+
onClick: handleExpandClick,
|
|
61281
|
+
dir: config.direction,
|
|
61282
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
61283
|
+
className: classes === null || classes === void 0 ? void 0 : classes.icon,
|
|
61284
|
+
children: frontCaretType === 'hollow' ? icons_config.menu.CollapseArrow : icons_config.menu.FrontSolidArrowDown
|
|
61285
|
+
})
|
|
61286
|
+
});
|
|
61287
|
+
}
|
|
61196
61288
|
var item = render_render(props.renderItem, props.dataItem, props.index);
|
|
61197
61289
|
var link = props.linkKey ? getKey(props.linkKey, props.dataItem, props.index, true) : undefined;
|
|
61198
61290
|
var title = null;
|
|
@@ -61201,7 +61293,7 @@ var MenuItem = function MenuItem(props) {
|
|
|
61201
61293
|
title = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(item, {
|
|
61202
61294
|
className: mergeClass,
|
|
61203
61295
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
61204
|
-
children: [indent, iconEl, /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
61296
|
+
children: [indent, frontCaret, iconEl, /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
61205
61297
|
className: classes === null || classes === void 0 ? void 0 : classes.titleContent,
|
|
61206
61298
|
children: item.props.children
|
|
61207
61299
|
})]
|
|
@@ -61213,28 +61305,17 @@ var MenuItem = function MenuItem(props) {
|
|
|
61213
61305
|
href: link
|
|
61214
61306
|
};
|
|
61215
61307
|
title = /*#__PURE__*/(0,jsx_runtime.jsxs)("a", objectSpread2_default()(objectSpread2_default()({}, linkProps), {}, {
|
|
61216
|
-
children: [indent, iconEl, /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
61308
|
+
children: [indent, frontCaret, iconEl, /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
61217
61309
|
className: classes === null || classes === void 0 ? void 0 : classes.titleContent,
|
|
61218
61310
|
children: wrapSpan(item)
|
|
61219
61311
|
})]
|
|
61220
61312
|
}));
|
|
61221
61313
|
}
|
|
61222
61314
|
if (props.frontCaret) {
|
|
61223
|
-
return /*#__PURE__*/(0,jsx_runtime.
|
|
61315
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({}, expandAble ? customAttributes : undefined), {}, {
|
|
61224
61316
|
className: classnames_default()(classes === null || classes === void 0 ? void 0 : classes.itemContent, classes === null || classes === void 0 ? void 0 : classes.itemContentFront),
|
|
61225
61317
|
onClick: handleItemClick,
|
|
61226
|
-
children:
|
|
61227
|
-
style: {
|
|
61228
|
-
color: props.caretColor
|
|
61229
|
-
},
|
|
61230
|
-
className: classnames_default()(classes === null || classes === void 0 ? void 0 : classes.expand, classes === null || classes === void 0 ? void 0 : classes.expandFront, (isVertical || isSubHorizontal) && (classes === null || classes === void 0 ? void 0 : classes.expandVertical), props.parentSelectable && (classes === null || classes === void 0 ? void 0 : classes.expandHover)),
|
|
61231
|
-
onClick: handleExpandClick,
|
|
61232
|
-
dir: config.direction,
|
|
61233
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
61234
|
-
className: classes === null || classes === void 0 ? void 0 : classes.icon,
|
|
61235
|
-
children: frontCaretType === 'hollow' ? icons_config.menu.CollapseArrow : icons_config.menu.FrontSolidArrowDown
|
|
61236
|
-
})
|
|
61237
|
-
}), title]
|
|
61318
|
+
children: title
|
|
61238
61319
|
}));
|
|
61239
61320
|
} else {
|
|
61240
61321
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, expandAble ? customAttributes : undefined), {}, {
|
|
@@ -65008,21 +65089,21 @@ var useColumns = function useColumns(props) {
|
|
|
65008
65089
|
var scrollLeft = scrollInfo.scrollLeft;
|
|
65009
65090
|
var sum = 0;
|
|
65010
65091
|
var currentIndex = 0;
|
|
65011
|
-
for (var i = 0, len = middleColumns.length
|
|
65092
|
+
for (var i = 0, len = middleColumns.length; i < len; i++) {
|
|
65012
65093
|
var curCol = middleColumns[i];
|
|
65013
65094
|
sum += curCol.width || 100;
|
|
65014
65095
|
if (scrollLeft < sum) {
|
|
65015
65096
|
// 计算可视区域内需要渲染的列数
|
|
65016
|
-
for (var j = i + 1; j
|
|
65097
|
+
for (var j = i + 1; j < len; j++) {
|
|
65017
65098
|
var _props$scrollRef$curr;
|
|
65018
65099
|
var nextCol = middleColumns[j];
|
|
65019
65100
|
sum += nextCol.width || 100;
|
|
65020
65101
|
if (props.scrollRef.current && sum - scrollLeft >= ((_props$scrollRef$curr = props.scrollRef.current) === null || _props$scrollRef$curr === void 0 ? void 0 : _props$scrollRef$curr.clientWidth)) {
|
|
65021
65102
|
// 在原有基础上,右侧增加缓冲列
|
|
65022
|
-
var visibleCount = j - i;
|
|
65103
|
+
var visibleCount = j - i + 1;
|
|
65023
65104
|
setRenderedCount(Math.min(visibleCount + overscan * 2, len));
|
|
65024
65105
|
break;
|
|
65025
|
-
} else if (j === len) {
|
|
65106
|
+
} else if (j === len - 1) {
|
|
65026
65107
|
// 到达最后一列
|
|
65027
65108
|
var _visibleCount = j - i + 1;
|
|
65028
65109
|
setRenderedCount(Math.min(_visibleCount + overscan * 2, len));
|
|
@@ -65059,17 +65140,24 @@ var useColumns = function useColumns(props) {
|
|
|
65059
65140
|
if (col.fixed) {
|
|
65060
65141
|
return col;
|
|
65061
65142
|
}
|
|
65062
|
-
|
|
65143
|
+
// 计算当前列在 middleColumns 中的索引
|
|
65144
|
+
var middleIndex = index - leftFixedColumns.length;
|
|
65145
|
+
|
|
65146
|
+
// 如果不在可渲染范围内
|
|
65147
|
+
if (middleIndex < startIndex || middleIndex >= startIndex + renderedCount) {
|
|
65063
65148
|
var colSpan;
|
|
65064
65149
|
var colSpanWidth;
|
|
65065
|
-
|
|
65150
|
+
// 如果是可见范围后的第一列,合并后面所有隐藏的列
|
|
65151
|
+
if (middleIndex >= startIndex + renderedCount && middleIndex === startIndex + renderedCount) {
|
|
65066
65152
|
colSpan = function colSpan() {
|
|
65067
|
-
return middleColumns.length -
|
|
65153
|
+
return middleColumns.length - middleIndex;
|
|
65068
65154
|
};
|
|
65069
|
-
colSpanWidth = middleColumns.slice(
|
|
65155
|
+
colSpanWidth = middleColumns.slice(middleIndex).reduce(function (sum, c) {
|
|
65070
65156
|
return sum + (c.width || 0);
|
|
65071
65157
|
}, 0);
|
|
65072
|
-
}
|
|
65158
|
+
}
|
|
65159
|
+
// 如果是第一个中间列且前面有隐藏列,合并前面所有隐藏的列
|
|
65160
|
+
else if (middleIndex < startIndex && middleIndex === 0 && startIndex > 0) {
|
|
65073
65161
|
colSpan = function colSpan() {
|
|
65074
65162
|
return startIndex;
|
|
65075
65163
|
};
|
|
@@ -70738,8 +70826,6 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
70738
70826
|
var _useConfig = useConfig(),
|
|
70739
70827
|
locale = _useConfig.locale,
|
|
70740
70828
|
direction = _useConfig.direction;
|
|
70741
|
-
var isRtl = direction === 'rtl';
|
|
70742
|
-
var dfp = isRtl ? 'bottom-right' : 'bottom-left';
|
|
70743
70829
|
var jssStyle = props.jssStyle,
|
|
70744
70830
|
className = props.className,
|
|
70745
70831
|
size = props.size,
|
|
@@ -70767,7 +70853,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
70767
70853
|
_props$focusSelected = props.focusSelected,
|
|
70768
70854
|
focusSelected = _props$focusSelected === void 0 ? true : _props$focusSelected,
|
|
70769
70855
|
_props$position = props.position,
|
|
70770
|
-
positionProp = _props$position === void 0 ?
|
|
70856
|
+
positionProp = _props$position === void 0 ? 'bottom-left' : _props$position,
|
|
70771
70857
|
openProp = props.open,
|
|
70772
70858
|
onCollapseProp = props.onCollapse,
|
|
70773
70859
|
disabledProp = props.disabled,
|
|
@@ -70928,7 +71014,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
70928
71014
|
onCollapse: onCollapse,
|
|
70929
71015
|
disabled: false,
|
|
70930
71016
|
trigger: 'click',
|
|
70931
|
-
position: positionProp
|
|
71017
|
+
position: getRTLPosition(positionProp, direction === 'rtl')
|
|
70932
71018
|
}),
|
|
70933
71019
|
open = _usePopup.open,
|
|
70934
71020
|
position = _usePopup.position,
|
|
@@ -74189,7 +74275,7 @@ function strings_removeProtocol(url) {
|
|
|
74189
74275
|
return url;
|
|
74190
74276
|
}
|
|
74191
74277
|
}
|
|
74192
|
-
function
|
|
74278
|
+
function strings_getRTLPosition(position) {
|
|
74193
74279
|
if (!position) return position;
|
|
74194
74280
|
// position.replace('left', 'right').replace('right', 'left')
|
|
74195
74281
|
if (position.indexOf('left') !== -1) {
|
|
@@ -75145,7 +75231,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
75145
75231
|
|
|
75146
75232
|
|
|
75147
75233
|
/* harmony default export */ var src_0 = ({
|
|
75148
|
-
version: '3.9.8
|
|
75234
|
+
version: '3.9.8'
|
|
75149
75235
|
});
|
|
75150
75236
|
}();
|
|
75151
75237
|
/******/ return __webpack_exports__;
|