shineout 3.8.0-beta.16 → 3.8.0-beta.18
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/README-zh_CN.md +1 -1
- package/README.md +1 -1
- package/cjs/index.js +1 -1
- package/dist/shineout.js +167 -65
- 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 +7 -7
package/README-zh_CN.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<a href="https://www.npmjs.com/package/shineout"><img src="https://img.shields.io/npm/v/shineout.svg?style=flat-square"></a>
|
|
13
13
|
<a href="https://www.npmjs.com/package/shineout"><img src="https://img.shields.io/npm/dm/shineout.svg?style=flat-square"></a>
|
|
14
|
-
<img src="https://img.shields.io/badge/React-%3E%3D16.
|
|
14
|
+
<img src="https://img.shields.io/badge/React-%3E%3D16.14.0-green.svg?style=flat-square">
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
17
|
## ✨ 特性
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ English | [简体中文](./README-zh_CN.md)
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<a href="https://www.npmjs.com/package/shineout"><img src="https://img.shields.io/npm/v/shineout.svg?style=flat-square"></a>
|
|
13
13
|
<a href="https://www.npmjs.com/package/shineout"><img src="https://img.shields.io/npm/dm/shineout.svg?style=flat-square"></a>
|
|
14
|
-
<img src="https://img.shields.io/badge/React-%3E%3D16.
|
|
14
|
+
<img src="https://img.shields.io/badge/React-%3E%3D16.14.0-green.svg?style=flat-square">
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
17
|
## ✨ Features
|
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.8.0-beta.
|
|
525
|
+
version: '3.8.0-beta.18'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12234,7 +12234,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12234
12234
|
};
|
|
12235
12235
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12236
12236
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12237
|
-
/* harmony default export */ var version = ('3.8.0-beta.
|
|
12237
|
+
/* harmony default export */ var version = ('3.8.0-beta.18');
|
|
12238
12238
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12239
12239
|
|
|
12240
12240
|
|
|
@@ -22820,7 +22820,7 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22820
22820
|
borderRadius: src.popoverRadius,
|
|
22821
22821
|
border: "1px solid ".concat(src.popoverBorderColor),
|
|
22822
22822
|
wordWrap: 'break-word',
|
|
22823
|
-
'& $arrow': {
|
|
22823
|
+
'& > $arrow': {
|
|
22824
22824
|
'z-index': 1,
|
|
22825
22825
|
position: 'absolute',
|
|
22826
22826
|
content: '" "',
|
|
@@ -22841,7 +22841,7 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22841
22841
|
'&$hideArrow': defineProperty_default()({}, popover_cssvar, '4px'),
|
|
22842
22842
|
'&[data-soui-position^="bottom"]': {
|
|
22843
22843
|
marginTop: "calc(".concat(hideArrowGap, " - 2px)"),
|
|
22844
|
-
'& $arrow': {
|
|
22844
|
+
'& > $arrow': {
|
|
22845
22845
|
top: '0',
|
|
22846
22846
|
transform: 'translate(0, -50%) rotate(-45deg)',
|
|
22847
22847
|
left: '0',
|
|
@@ -22861,7 +22861,7 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22861
22861
|
'&[data-soui-position^="top"]': {
|
|
22862
22862
|
// marginTop: (arrowGap - 2) * -1,
|
|
22863
22863
|
marginTop: "calc((".concat(hideArrowGap, " - 2px) * -1)"),
|
|
22864
|
-
'& $arrow': {
|
|
22864
|
+
'& > $arrow': {
|
|
22865
22865
|
bottom: '0',
|
|
22866
22866
|
transform: 'translate(0, 50%) rotate(135deg)',
|
|
22867
22867
|
left: '0',
|
|
@@ -22887,7 +22887,7 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22887
22887
|
'&[dir=rtl]': {
|
|
22888
22888
|
marginLeft: "calc((".concat(hideArrowGap, " - 2px))")
|
|
22889
22889
|
},
|
|
22890
|
-
'& $arrow': {
|
|
22890
|
+
'& > $arrow': {
|
|
22891
22891
|
right: src.popoverBorderWidth,
|
|
22892
22892
|
transform: 'translate(50%, 0) rotate(45deg)',
|
|
22893
22893
|
top: '0',
|
|
@@ -22911,7 +22911,7 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22911
22911
|
'&[dir=rtl]': {
|
|
22912
22912
|
marginRight: "calc(".concat(hideArrowGap, " - 2px)")
|
|
22913
22913
|
},
|
|
22914
|
-
'& $arrow': {
|
|
22914
|
+
'& > $arrow': {
|
|
22915
22915
|
left: '0',
|
|
22916
22916
|
transform: 'translate(-50%, 0) rotate(-135deg)',
|
|
22917
22917
|
top: '0',
|
|
@@ -22930,19 +22930,19 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22930
22930
|
position: 'absolute'
|
|
22931
22931
|
}
|
|
22932
22932
|
},
|
|
22933
|
-
'&&[data-soui-position$="-left"] $arrow': {
|
|
22933
|
+
'&&[data-soui-position$="-left"] > $arrow': {
|
|
22934
22934
|
left: arrowMargin,
|
|
22935
22935
|
right: 'auto'
|
|
22936
22936
|
},
|
|
22937
|
-
'&&[data-soui-position$="-right"] $arrow': {
|
|
22937
|
+
'&&[data-soui-position$="-right"] > $arrow': {
|
|
22938
22938
|
right: arrowMargin,
|
|
22939
22939
|
left: 'auto'
|
|
22940
22940
|
},
|
|
22941
|
-
'&&[data-soui-position$="-top"] $arrow': {
|
|
22941
|
+
'&&[data-soui-position$="-top"] > $arrow': {
|
|
22942
22942
|
top: arrowMargin,
|
|
22943
22943
|
bottom: 'auto'
|
|
22944
22944
|
},
|
|
22945
|
-
'&&[data-soui-position$="-bottom"] $arrow': {
|
|
22945
|
+
'&&[data-soui-position$="-bottom"] > $arrow': {
|
|
22946
22946
|
bottom: arrowMargin,
|
|
22947
22947
|
top: 'auto'
|
|
22948
22948
|
},
|
|
@@ -26356,7 +26356,7 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
26356
26356
|
boxSizing: 'border-box',
|
|
26357
26357
|
lineHeight: src.lineHeightDynamic,
|
|
26358
26358
|
'$bordered&': {
|
|
26359
|
-
'
|
|
26359
|
+
'&:not(:last-child)::after': {
|
|
26360
26360
|
content: '""',
|
|
26361
26361
|
position: 'absolute',
|
|
26362
26362
|
zIndex: cellBaseIndex,
|
|
@@ -26700,6 +26700,9 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
26700
26700
|
color: src.tableFilterIconActiveColor
|
|
26701
26701
|
}
|
|
26702
26702
|
},
|
|
26703
|
+
filterOpened: {
|
|
26704
|
+
background: src.buttonSecondaryHoverBackgroundColor
|
|
26705
|
+
},
|
|
26703
26706
|
filterContainer: {
|
|
26704
26707
|
minWidth: '120px'
|
|
26705
26708
|
},
|
|
@@ -26712,7 +26715,19 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
26712
26715
|
filterBody: {
|
|
26713
26716
|
padding: "".concat(src.tableFilterBodyPaddingY, " ").concat(src.tableFilterBodyPaddingX),
|
|
26714
26717
|
maxHeight: '300px',
|
|
26715
|
-
overflow: 'auto'
|
|
26718
|
+
overflow: 'auto',
|
|
26719
|
+
// 特调Tree在Table filter中样式,以满足设计要求
|
|
26720
|
+
'& [class*=tree-content-wrapper]': {
|
|
26721
|
+
paddingTop: 1,
|
|
26722
|
+
paddingBottom: 1
|
|
26723
|
+
},
|
|
26724
|
+
'&& [class*=tree-checkbox]': {
|
|
26725
|
+
alignSelf: 'center'
|
|
26726
|
+
},
|
|
26727
|
+
'& [class*=tree-text]': {
|
|
26728
|
+
paddingTop: 5,
|
|
26729
|
+
paddingBottom: 5
|
|
26730
|
+
}
|
|
26716
26731
|
},
|
|
26717
26732
|
filterFooter: {
|
|
26718
26733
|
display: 'flex',
|
|
@@ -30518,20 +30533,20 @@ var usePopup = function usePopup(props) {
|
|
|
30518
30533
|
}
|
|
30519
30534
|
};
|
|
30520
30535
|
var handleMouseEnter = use_persist_fn(function (e) {
|
|
30521
|
-
var _targetEvents$onMouse, _targetRef$current;
|
|
30536
|
+
var _targetEvents$onMouse, _targetRef$current, _popupRef$current2;
|
|
30522
30537
|
targetEvents === null || targetEvents === void 0 || (_targetEvents$onMouse = targetEvents.onMouseEnter) === null || _targetEvents$onMouse === void 0 || _targetEvents$onMouse.call(targetEvents, e);
|
|
30523
30538
|
if (trigger !== 'hover') return;
|
|
30524
30539
|
var isParentContainsCurrent = (_targetRef$current = targetRef.current) === null || _targetRef$current === void 0 ? void 0 : _targetRef$current.contains(e.target);
|
|
30525
|
-
if (isParentContainsCurrent) {
|
|
30540
|
+
if (isParentContainsCurrent || popupRef !== null && popupRef !== void 0 && (_popupRef$current2 = popupRef.current) !== null && _popupRef$current2 !== void 0 && _popupRef$current2.contains(e.target)) {
|
|
30526
30541
|
handleHoverToggle(true);
|
|
30527
30542
|
}
|
|
30528
30543
|
});
|
|
30529
30544
|
var handleMouseLeave = use_persist_fn(function (e) {
|
|
30530
|
-
var _targetEvents$onMouse2, _popupRef$
|
|
30545
|
+
var _targetEvents$onMouse2, _popupRef$current3;
|
|
30531
30546
|
targetEvents === null || targetEvents === void 0 || (_targetEvents$onMouse2 = targetEvents.onMouseLeave) === null || _targetEvents$onMouse2 === void 0 || _targetEvents$onMouse2.call(targetEvents, e);
|
|
30532
30547
|
if (trigger !== 'hover') return;
|
|
30533
30548
|
// @ts-ignore
|
|
30534
|
-
if (e.relatedTarget instanceof HTMLElement && (_popupRef$
|
|
30549
|
+
if (e.relatedTarget instanceof HTMLElement && (_popupRef$current3 = popupRef.current) !== null && _popupRef$current3 !== void 0 && _popupRef$current3.contains(e.relatedTarget)) {
|
|
30535
30550
|
return;
|
|
30536
30551
|
}
|
|
30537
30552
|
handleHoverToggle(false);
|
|
@@ -35694,6 +35709,26 @@ var getCompleteFieldKeys = function getCompleteFieldKeys(fields, allFields) {
|
|
|
35694
35709
|
// 返回之前去重
|
|
35695
35710
|
return Array.from(new Set(completeFields));
|
|
35696
35711
|
};
|
|
35712
|
+
|
|
35713
|
+
/**
|
|
35714
|
+
* 将对象中的所有值设置为空, 如果值是数组,重置为空数组,如果是对象,重置为空对象,如果是基础类型,重置为undefined
|
|
35715
|
+
* @param obj 对象
|
|
35716
|
+
* @returns 空对象
|
|
35717
|
+
*/
|
|
35718
|
+
var clearValue = function clearValue(obj) {
|
|
35719
|
+
if (isArray(obj)) {
|
|
35720
|
+
return obj.map(function (item) {
|
|
35721
|
+
return clearValue(item);
|
|
35722
|
+
});
|
|
35723
|
+
}
|
|
35724
|
+
if (is_isObject(obj)) {
|
|
35725
|
+
return Object.keys(obj).reduce(function (acc, key) {
|
|
35726
|
+
acc[key] = clearValue(obj[key]);
|
|
35727
|
+
return acc;
|
|
35728
|
+
}, {});
|
|
35729
|
+
}
|
|
35730
|
+
return undefined;
|
|
35731
|
+
};
|
|
35697
35732
|
;// CONCATENATED MODULE: ../hooks/src/components/use-check/use-check.ts
|
|
35698
35733
|
|
|
35699
35734
|
|
|
@@ -36085,7 +36120,10 @@ var useInput = function useInput(params) {
|
|
|
36085
36120
|
(_otherHandlers$onFocu = otherHandlers.onFocus) === null || _otherHandlers$onFocu === void 0 || _otherHandlers$onFocu.call(otherHandlers, event);
|
|
36086
36121
|
setFocused(true);
|
|
36087
36122
|
if (autoSelect) {
|
|
36088
|
-
|
|
36123
|
+
// why requestAnimationFrame: 当在文字身体上hover后立即点击,select()与浏览器的光标定位逻辑产生竞争,有可能导致只选中的部分文本,所以需要延迟一下
|
|
36124
|
+
requestAnimationFrame(function () {
|
|
36125
|
+
event.target.select();
|
|
36126
|
+
});
|
|
36089
36127
|
}
|
|
36090
36128
|
};
|
|
36091
36129
|
};
|
|
@@ -36614,9 +36652,11 @@ function escapeRegExp() {
|
|
|
36614
36652
|
timeOfDayValues: ['上午', '下午'],
|
|
36615
36653
|
ok: '确定',
|
|
36616
36654
|
cancel: '取消',
|
|
36655
|
+
reset: '重置',
|
|
36617
36656
|
noData: '暂无数据',
|
|
36618
36657
|
selectAll: '全选',
|
|
36619
36658
|
loading: '加载中...',
|
|
36659
|
+
searchPlaceholder: '在筛选项中搜索',
|
|
36620
36660
|
rules: {
|
|
36621
36661
|
required: {
|
|
36622
36662
|
array: '{title} 不能为空',
|
|
@@ -36641,6 +36681,7 @@ function escapeRegExp() {
|
|
|
36641
36681
|
search: '搜索',
|
|
36642
36682
|
urlInvalidMsg: '图片格式不正确,请重新上传',
|
|
36643
36683
|
invalidAccept: '文件格式不正确',
|
|
36684
|
+
invalidImage: '图片格式不正确',
|
|
36644
36685
|
notFound: '未找到'
|
|
36645
36686
|
});
|
|
36646
36687
|
;// CONCATENATED MODULE: ../base/src/config/locale/en_US.ts
|
|
@@ -36679,9 +36720,11 @@ function escapeRegExp() {
|
|
|
36679
36720
|
timeOfDayValues: ['a.m.', 'p.m.'],
|
|
36680
36721
|
ok: 'Ok',
|
|
36681
36722
|
cancel: 'Cancel',
|
|
36723
|
+
reset: 'Reset',
|
|
36682
36724
|
noData: 'Data not found',
|
|
36683
36725
|
selectAll: 'Select All',
|
|
36684
36726
|
loading: 'loading...',
|
|
36727
|
+
searchPlaceholder: 'Search in filter options',
|
|
36685
36728
|
rules: {
|
|
36686
36729
|
required: {
|
|
36687
36730
|
array: 'Please select {title}',
|
|
@@ -36706,6 +36749,7 @@ function escapeRegExp() {
|
|
|
36706
36749
|
search: 'search',
|
|
36707
36750
|
urlInvalidMsg: 'Picture format is incorrect, please upload again',
|
|
36708
36751
|
invalidAccept: 'Invalid file format',
|
|
36752
|
+
invalidImage: 'Invalid image format',
|
|
36709
36753
|
notFound: 'not found'
|
|
36710
36754
|
});
|
|
36711
36755
|
;// CONCATENATED MODULE: ../base/src/config/locale/index.ts
|
|
@@ -39697,7 +39741,7 @@ var useTree = function useTree(props) {
|
|
|
39697
39741
|
(_context$value = context.value) === null || _context$value === void 0 || _context$value.forEach(function (id) {
|
|
39698
39742
|
var _ref3 = context.pathMap.get(id),
|
|
39699
39743
|
children = _ref3.children;
|
|
39700
|
-
if (children.length) {
|
|
39744
|
+
if (children && children.length) {
|
|
39701
39745
|
var noCheckedChildren = children.filter(function (cid) {
|
|
39702
39746
|
var _context$value2;
|
|
39703
39747
|
return !((_context$value2 = context.value) !== null && _context$value2 !== void 0 && _context$value2.includes(cid));
|
|
@@ -41509,7 +41553,7 @@ function getResetMore(onFilter, container, doms) {
|
|
|
41509
41553
|
var paddingLeft = parsePxToNumber(style.paddingLeft);
|
|
41510
41554
|
var paddingRight = parsePxToNumber(style.paddingRight);
|
|
41511
41555
|
var minFilterWidth = onFilter ? 16 : 0;
|
|
41512
|
-
var contentWidth = clientWidth - paddingLeft - paddingRight - minFilterWidth
|
|
41556
|
+
var contentWidth = clientWidth - paddingLeft - paddingRight - minFilterWidth;
|
|
41513
41557
|
var hideEl = items.pop();
|
|
41514
41558
|
var hideElStyle = getComputedStyle(hideEl);
|
|
41515
41559
|
var hideMargin = parsePxToNumber(hideElStyle.marginLeft) + parsePxToNumber(hideElStyle.marginRight);
|
|
@@ -42670,8 +42714,8 @@ var Cascader = function Cascader(props0) {
|
|
|
42670
42714
|
}
|
|
42671
42715
|
}, [data]);
|
|
42672
42716
|
|
|
42673
|
-
//
|
|
42674
|
-
if (openProp && !shallowEqual(value, datum.getValue())) {
|
|
42717
|
+
// 修复外部受控打开或renderOptionList做全选的场景下,从外部修改value导致的面板勾选情况没有及时同步
|
|
42718
|
+
if ((openProp || props.renderOptionList) && !shallowEqual(value, datum.getValue())) {
|
|
42675
42719
|
datum.setValue(value);
|
|
42676
42720
|
}
|
|
42677
42721
|
;
|
|
@@ -42680,9 +42724,6 @@ var Cascader = function Cascader(props0) {
|
|
|
42680
42724
|
datum.setValue(value);
|
|
42681
42725
|
if (!open) return;
|
|
42682
42726
|
updatePathByValue();
|
|
42683
|
-
if (props.renderOptionList) {
|
|
42684
|
-
updatePath();
|
|
42685
|
-
}
|
|
42686
42727
|
}, [value, open]);
|
|
42687
42728
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
42688
42729
|
if (filterText !== undefined) {
|
|
@@ -46097,7 +46138,9 @@ var useTime = function useTime(props) {
|
|
|
46097
46138
|
_props$secondStep = props.secondStep,
|
|
46098
46139
|
secondStep = _props$secondStep === void 0 ? 1 : _props$secondStep,
|
|
46099
46140
|
staticMin = props.staticMin,
|
|
46100
|
-
staticMax = props.staticMax
|
|
46141
|
+
staticMax = props.staticMax,
|
|
46142
|
+
position = props.position,
|
|
46143
|
+
rangeDate = props.rangeDate;
|
|
46101
46144
|
var min = util.resetTimeByFormat(mi, format, options);
|
|
46102
46145
|
var max = util.resetTimeByFormat(ma, format, options);
|
|
46103
46146
|
var current = props.value || util.newDate(undefined, options);
|
|
@@ -46123,7 +46166,7 @@ var useTime = function useTime(props) {
|
|
|
46123
46166
|
disabledTime = props.disabledTime;
|
|
46124
46167
|
if (disabledTime) {
|
|
46125
46168
|
var _time = util.format(date, util.TIME_FORMAT, options);
|
|
46126
|
-
if (typeof disabledTime === 'function') return disabledTime(_time);
|
|
46169
|
+
if (typeof disabledTime === 'function') return disabledTime(_time, position, rangeDate === null || rangeDate === void 0 ? void 0 : rangeDate[0], rangeDate === null || rangeDate === void 0 ? void 0 : rangeDate[1]);
|
|
46127
46170
|
return disabledTime === _time;
|
|
46128
46171
|
}
|
|
46129
46172
|
var isDis = disabled && typeof disabled === 'function' ? disabled(date) : false;
|
|
@@ -46474,7 +46517,9 @@ var Time = function Time(props) {
|
|
|
46474
46517
|
disabledTime: props.disabledTime,
|
|
46475
46518
|
hourStep: props.hourStep,
|
|
46476
46519
|
minuteStep: props.minuteStep,
|
|
46477
|
-
secondStep: props.secondStep
|
|
46520
|
+
secondStep: props.secondStep,
|
|
46521
|
+
position: props.position,
|
|
46522
|
+
rangeDate: props.rangeDate
|
|
46478
46523
|
}),
|
|
46479
46524
|
func = _useTimePick.func,
|
|
46480
46525
|
times = _useTimePick.times;
|
|
@@ -46508,6 +46553,7 @@ var Time = function Time(props) {
|
|
|
46508
46553
|
})]
|
|
46509
46554
|
});
|
|
46510
46555
|
};
|
|
46556
|
+
var shouldRenderTimes = times && times.length > 0;
|
|
46511
46557
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
46512
46558
|
onMouseEnter: props.onMouseEnter,
|
|
46513
46559
|
onMouseLeave: props.onMouseLeave,
|
|
@@ -46516,7 +46562,7 @@ var Time = function Time(props) {
|
|
|
46516
46562
|
children: [props.showTitle && /*#__PURE__*/(0,jsx_runtime.jsx)(pickerTitle, {
|
|
46517
46563
|
position: props.position,
|
|
46518
46564
|
jssStyle: props.jssStyle
|
|
46519
|
-
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
46565
|
+
}), shouldRenderTimes && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
46520
46566
|
className: styles === null || styles === void 0 ? void 0 : styles.pickerBody,
|
|
46521
46567
|
children: times.map(function (item) {
|
|
46522
46568
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(TimeScroll, {
|
|
@@ -50989,7 +51035,7 @@ var useForm = function useForm(props) {
|
|
|
50989
51035
|
var _props$onChange;
|
|
50990
51036
|
var newValue = typeof change === 'function' ? utils_immer_produce(context.value, change) : change;
|
|
50991
51037
|
context.value = newValue;
|
|
50992
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, context.value);
|
|
51038
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, deepClone(context.value));
|
|
50993
51039
|
});
|
|
50994
51040
|
var scrollToField = use_persist_fn(function (name) {
|
|
50995
51041
|
var _document;
|
|
@@ -51373,11 +51419,6 @@ var useForm = function useForm(props) {
|
|
|
51373
51419
|
// 默认值更新
|
|
51374
51420
|
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
|
|
51375
51421
|
context.removeLock = false;
|
|
51376
|
-
// 内部 onChange 改的 value, 不需要更新
|
|
51377
|
-
if (props.value === context.value) {
|
|
51378
|
-
if (!isControl) update();
|
|
51379
|
-
return;
|
|
51380
|
-
}
|
|
51381
51422
|
if (initValidate && !context.resetTime) {
|
|
51382
51423
|
var keys = Object.keys(context.validateMap).filter(function (key) {
|
|
51383
51424
|
var oldValue = deepGet(preValue || emptyObj, key);
|
|
@@ -51387,6 +51428,7 @@ var useForm = function useForm(props) {
|
|
|
51387
51428
|
validateFields(keys).catch(function () {});
|
|
51388
51429
|
}
|
|
51389
51430
|
update();
|
|
51431
|
+
if (!isControl) return;
|
|
51390
51432
|
// 默认值上位时会提前触发外部的onChange, 导致外部的多次setFormValue不能合并后生效的问题(ReactDOM.render方式渲染)
|
|
51391
51433
|
setTimeout(updateDefaultValue);
|
|
51392
51434
|
context.resetTime = 0;
|
|
@@ -51892,8 +51934,13 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
51892
51934
|
},
|
|
51893
51935
|
onInsert: function onInsert(val) {
|
|
51894
51936
|
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
51937
|
+
var insertValue = val;
|
|
51938
|
+
var valueTemplate = oldValue[i];
|
|
51939
|
+
if (insertValue === undefined) {
|
|
51940
|
+
insertValue = clearValue(deepClone(valueTemplate));
|
|
51941
|
+
}
|
|
51895
51942
|
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
51896
|
-
draft.splice(i, 0,
|
|
51943
|
+
draft.splice(i, 0, insertValue);
|
|
51897
51944
|
});
|
|
51898
51945
|
_onChange(newValue);
|
|
51899
51946
|
// context.ids.splice(i, 0, util.generateUUID());
|
|
@@ -51901,8 +51948,13 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
51901
51948
|
},
|
|
51902
51949
|
onAppend: function onAppend(val) {
|
|
51903
51950
|
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
51951
|
+
var insertValue = val;
|
|
51952
|
+
var valueTemplate = oldValue[i];
|
|
51953
|
+
if (insertValue === undefined) {
|
|
51954
|
+
insertValue = clearValue(deepClone(valueTemplate));
|
|
51955
|
+
}
|
|
51904
51956
|
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
51905
|
-
draft.splice(i + 1, 0,
|
|
51957
|
+
draft.splice(i + 1, 0, insertValue);
|
|
51906
51958
|
});
|
|
51907
51959
|
_onChange(newValue);
|
|
51908
51960
|
// context.ids.splice(i + 1, 0, util.generateUUID());
|
|
@@ -62032,7 +62084,8 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
62032
62084
|
var wrapperRef = useForkRef(scrollRef, props.wrapperRef);
|
|
62033
62085
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
62034
62086
|
isMouseDown: false,
|
|
62035
|
-
lastTableHeight: 0
|
|
62087
|
+
lastTableHeight: 0,
|
|
62088
|
+
unmounted: false
|
|
62036
62089
|
}),
|
|
62037
62090
|
context = _useRef.current;
|
|
62038
62091
|
var _props$scrollHeight = props.scrollHeight,
|
|
@@ -62141,7 +62194,7 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
62141
62194
|
|
|
62142
62195
|
// 非定高的Table但依旧采用了virtual渲染方式,需要渲染出全部的data
|
|
62143
62196
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
62144
|
-
if (!props.tableRef.current) return;
|
|
62197
|
+
if (!props.tableRef.current || context.unmounted) return;
|
|
62145
62198
|
var rootTableHeight = props.tableRef.current.clientHeight;
|
|
62146
62199
|
var container = containerRef.current;
|
|
62147
62200
|
// 判断内容滚动高度是否真的超过了容器高度
|
|
@@ -62153,6 +62206,9 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
62153
62206
|
} else {
|
|
62154
62207
|
context.lastTableHeight = rootTableHeight;
|
|
62155
62208
|
}
|
|
62209
|
+
return function () {
|
|
62210
|
+
context.unmounted = true;
|
|
62211
|
+
};
|
|
62156
62212
|
}, [paddingTop]);
|
|
62157
62213
|
if (props.isEmpty) {
|
|
62158
62214
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, scrollRoleProps), {}, {
|
|
@@ -63039,7 +63095,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
63039
63095
|
for (var i = 0; i <= index; i++) {
|
|
63040
63096
|
sum += context.cachedHeight[i] || props.rowHeight;
|
|
63041
63097
|
}
|
|
63042
|
-
return sum + props.
|
|
63098
|
+
return sum + props.theadHeight + props.tfootHeight;
|
|
63043
63099
|
};
|
|
63044
63100
|
var setRowHeight = usePersistFn(function (index, height) {
|
|
63045
63101
|
if (props.disabled) return;
|
|
@@ -63182,7 +63238,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
63182
63238
|
callback();
|
|
63183
63239
|
}
|
|
63184
63240
|
};
|
|
63185
|
-
props.scrollRef.current.scrollTop = beforeHeight;
|
|
63241
|
+
props.scrollRef.current.scrollTop = beforeHeight - props.theadHeight;
|
|
63186
63242
|
}
|
|
63187
63243
|
});
|
|
63188
63244
|
var scrollColumnByLeft = usePersistFn(function (targetLeft) {
|
|
@@ -63259,7 +63315,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
63259
63315
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
63260
63316
|
if (props.disabled) return;
|
|
63261
63317
|
setHeight(getContentHeight(props.data.length - 1));
|
|
63262
|
-
}, [props.data.length, props.
|
|
63318
|
+
}, [props.data.length, props.theadHeight, props.tfootHeight]);
|
|
63263
63319
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
63264
63320
|
if (props.disabled) return;
|
|
63265
63321
|
if (context.heightCallback) {
|
|
@@ -63648,8 +63704,11 @@ var useTableGroup = function useTableGroup(props) {
|
|
|
63648
63704
|
|
|
63649
63705
|
|
|
63650
63706
|
|
|
63707
|
+
|
|
63651
63708
|
var FilterFooter = function FilterFooter(props) {
|
|
63652
63709
|
var tableClasses = props.tableClasses;
|
|
63710
|
+
var _useConfig = useConfig(),
|
|
63711
|
+
locale = _useConfig.locale;
|
|
63653
63712
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("footer", {
|
|
63654
63713
|
className: tableClasses.filterFooter,
|
|
63655
63714
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, {
|
|
@@ -63658,18 +63717,21 @@ var FilterFooter = function FilterFooter(props) {
|
|
|
63658
63717
|
size: "small",
|
|
63659
63718
|
onClick: props.onReset,
|
|
63660
63719
|
disabled: !props.resetable,
|
|
63661
|
-
|
|
63720
|
+
mode: "outline",
|
|
63721
|
+
children: getLocale(locale, 'reset')
|
|
63662
63722
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, {
|
|
63663
63723
|
jssStyle: props.jssStyle,
|
|
63664
63724
|
size: "small",
|
|
63665
63725
|
type: "primary",
|
|
63666
63726
|
onClick: props.onConfirm,
|
|
63667
|
-
children:
|
|
63727
|
+
children: getLocale(locale, 'ok')
|
|
63668
63728
|
})]
|
|
63669
63729
|
});
|
|
63670
63730
|
};
|
|
63671
63731
|
var FilterSelect = function FilterSelect(props) {
|
|
63672
63732
|
var _props$filterInfo;
|
|
63733
|
+
var _useConfig2 = useConfig(),
|
|
63734
|
+
locale = _useConfig2.locale;
|
|
63673
63735
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
63674
63736
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
63675
63737
|
popoverVisible = _useState2[0],
|
|
@@ -63748,7 +63810,7 @@ var FilterSelect = function FilterSelect(props) {
|
|
|
63748
63810
|
jssStyle: props.jssStyle,
|
|
63749
63811
|
shape: "circle",
|
|
63750
63812
|
size: "small",
|
|
63751
|
-
className: classnames_default()(tableClasses.filterIconContainer, (currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value) && tableClasses.filterActive),
|
|
63813
|
+
className: classnames_default()(tableClasses.filterIconContainer, (currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value) && tableClasses.filterActive, popoverVisible && tableClasses.filterOpened),
|
|
63752
63814
|
style: {
|
|
63753
63815
|
border: 'none'
|
|
63754
63816
|
},
|
|
@@ -63766,13 +63828,14 @@ var FilterSelect = function FilterSelect(props) {
|
|
|
63766
63828
|
children: [(config === null || config === void 0 ? void 0 : config.search) && /*#__PURE__*/(0,jsx_runtime.jsx)("header", {
|
|
63767
63829
|
className: tableClasses.filterHeader,
|
|
63768
63830
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_input_input, {
|
|
63831
|
+
showClear: true,
|
|
63769
63832
|
value: inputText,
|
|
63770
63833
|
onChange: function onChange(v) {
|
|
63771
63834
|
if (onFilter) onFilter(v || '');
|
|
63772
63835
|
setInputText(v);
|
|
63773
63836
|
},
|
|
63774
63837
|
jssStyle: props.jssStyle,
|
|
63775
|
-
placeholder:
|
|
63838
|
+
placeholder: getLocale(locale, 'searchPlaceholder'),
|
|
63776
63839
|
className: tableClasses.filterInput,
|
|
63777
63840
|
prefix: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
63778
63841
|
className: tableClasses.filterInputIcon,
|
|
@@ -63808,6 +63871,8 @@ var FilterSelect = function FilterSelect(props) {
|
|
|
63808
63871
|
};
|
|
63809
63872
|
var FilterSearch = function FilterSearch(props) {
|
|
63810
63873
|
var _props$filterInfo2;
|
|
63874
|
+
var _useConfig3 = useConfig(),
|
|
63875
|
+
locale = _useConfig3.locale;
|
|
63811
63876
|
var tableClasses = props.tableClasses,
|
|
63812
63877
|
filter = props.filter;
|
|
63813
63878
|
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
@@ -63854,7 +63919,7 @@ var FilterSearch = function FilterSearch(props) {
|
|
|
63854
63919
|
jssStyle: props.jssStyle,
|
|
63855
63920
|
shape: "circle",
|
|
63856
63921
|
size: "small",
|
|
63857
|
-
className: classnames_default()(tableClasses.filterIconContainer, (currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value) && tableClasses.filterActive),
|
|
63922
|
+
className: classnames_default()(tableClasses.filterIconContainer, (currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value) && tableClasses.filterActive, popoverVisible && tableClasses.filterOpened),
|
|
63858
63923
|
style: {
|
|
63859
63924
|
border: 'none'
|
|
63860
63925
|
},
|
|
@@ -63873,7 +63938,7 @@ var FilterSearch = function FilterSearch(props) {
|
|
|
63873
63938
|
className: tableClasses.filterHeader,
|
|
63874
63939
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_input_input, {
|
|
63875
63940
|
jssStyle: props.jssStyle,
|
|
63876
|
-
placeholder:
|
|
63941
|
+
placeholder: getLocale(locale, 'searchPlaceholder'),
|
|
63877
63942
|
className: tableClasses.filterInput,
|
|
63878
63943
|
prefix: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
63879
63944
|
className: tableClasses.filterInputIcon,
|
|
@@ -63882,7 +63947,8 @@ var FilterSearch = function FilterSearch(props) {
|
|
|
63882
63947
|
value: tempValue,
|
|
63883
63948
|
onChange: setTempValue,
|
|
63884
63949
|
onEnterPress: onConfirm,
|
|
63885
|
-
forwardRef: inputRef
|
|
63950
|
+
forwardRef: inputRef,
|
|
63951
|
+
showClear: true
|
|
63886
63952
|
})
|
|
63887
63953
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(FilterFooter, {
|
|
63888
63954
|
jssStyle: props.jssStyle,
|
|
@@ -65061,7 +65127,8 @@ var emptyRef = {
|
|
|
65061
65127
|
};
|
|
65062
65128
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
65063
65129
|
emptyHeight: 0,
|
|
65064
|
-
|
|
65130
|
+
theadHeight: 0,
|
|
65131
|
+
tfootHeight: 0,
|
|
65065
65132
|
scrollingTimer: null
|
|
65066
65133
|
}),
|
|
65067
65134
|
context = _useRef.current;
|
|
@@ -65194,15 +65261,38 @@ var emptyRef = {
|
|
|
65194
65261
|
onChange: inputableData.onChange,
|
|
65195
65262
|
disabled: props.disabled
|
|
65196
65263
|
});
|
|
65197
|
-
(
|
|
65264
|
+
var handleTheadAndTfootHeight = usePersistFn(function () {
|
|
65198
65265
|
var _theadRef$current, _tfootRef$current;
|
|
65199
65266
|
var theadHeight = (theadRef === null || theadRef === void 0 || (_theadRef$current = theadRef.current) === null || _theadRef$current === void 0 ? void 0 : _theadRef$current.clientHeight) || 0;
|
|
65200
65267
|
var tfootHeight = ((_tfootRef$current = tfootRef.current) === null || _tfootRef$current === void 0 ? void 0 : _tfootRef$current.clientHeight) || 0;
|
|
65201
65268
|
if (props.sticky) {
|
|
65202
|
-
context.
|
|
65269
|
+
context.tfootHeight = tfootHeight;
|
|
65203
65270
|
} else {
|
|
65204
|
-
context.
|
|
65271
|
+
context.theadHeight = theadHeight;
|
|
65272
|
+
context.tfootHeight = tfootHeight;
|
|
65205
65273
|
}
|
|
65274
|
+
});
|
|
65275
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
65276
|
+
handleTheadAndTfootHeight();
|
|
65277
|
+
var cancelFunc1;
|
|
65278
|
+
if (theadRef !== null && theadRef !== void 0 && theadRef.current) {
|
|
65279
|
+
cancelFunc1 = addResizeObserver(theadRef === null || theadRef === void 0 ? void 0 : theadRef.current, handleTheadAndTfootHeight, {
|
|
65280
|
+
direction: 'y',
|
|
65281
|
+
timer: 10
|
|
65282
|
+
});
|
|
65283
|
+
}
|
|
65284
|
+
var cancelFunc2;
|
|
65285
|
+
if (tfootRef !== null && tfootRef !== void 0 && tfootRef.current) {
|
|
65286
|
+
cancelFunc2 = addResizeObserver(tfootRef === null || tfootRef === void 0 ? void 0 : tfootRef.current, handleTheadAndTfootHeight, {
|
|
65287
|
+
direction: 'y',
|
|
65288
|
+
timer: 10
|
|
65289
|
+
});
|
|
65290
|
+
}
|
|
65291
|
+
return function () {
|
|
65292
|
+
var _cancelFunc, _cancelFunc2;
|
|
65293
|
+
(_cancelFunc = cancelFunc1) === null || _cancelFunc === void 0 || _cancelFunc();
|
|
65294
|
+
(_cancelFunc2 = cancelFunc2) === null || _cancelFunc2 === void 0 || _cancelFunc2();
|
|
65295
|
+
};
|
|
65206
65296
|
}, [theadRef.current, tfootRef.current]);
|
|
65207
65297
|
var virtualInfo = use_table_virtual({
|
|
65208
65298
|
disabled: !virtual,
|
|
@@ -65215,7 +65305,8 @@ var emptyRef = {
|
|
|
65215
65305
|
innerRef: tbodyRef,
|
|
65216
65306
|
scrollLeft: props.scrollLeft,
|
|
65217
65307
|
isRtl: isRtl,
|
|
65218
|
-
|
|
65308
|
+
theadHeight: context.theadHeight,
|
|
65309
|
+
tfootHeight: context.tfootHeight
|
|
65219
65310
|
});
|
|
65220
65311
|
var syncHeaderScroll = usePersistFn(function (left) {
|
|
65221
65312
|
var _tableRef$current;
|
|
@@ -66202,36 +66293,43 @@ var TabsHeader = function TabsHeader(props) {
|
|
|
66202
66293
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
66203
66294
|
currentTabOffset = _useState2[0],
|
|
66204
66295
|
setCurrentTabOffset = _useState2[1];
|
|
66205
|
-
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(
|
|
66296
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
|
|
66297
|
+
width: 0,
|
|
66298
|
+
height: 0
|
|
66299
|
+
}),
|
|
66206
66300
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
66207
|
-
|
|
66208
|
-
|
|
66301
|
+
currentTabSize = _useState4[0],
|
|
66302
|
+
setCurrentTabSize = _useState4[1];
|
|
66209
66303
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
66210
|
-
var _currentTab$getBoundi;
|
|
66211
66304
|
if (shape !== 'line' && shape !== 'dash') return;
|
|
66212
66305
|
var currentTab = tabRef.current[active];
|
|
66213
66306
|
setCurrentTabOffset({
|
|
66214
66307
|
offsetTop: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetTop) || 0,
|
|
66215
66308
|
offsetLeft: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetLeft) || 0
|
|
66216
66309
|
});
|
|
66217
|
-
|
|
66218
|
-
|
|
66310
|
+
|
|
66311
|
+
// 使用 offsetWidth/offsetHeight 而不是 getBoundingClientRect()
|
|
66312
|
+
// 这样可以避免受到外部容器 CSS transform scale 的影响
|
|
66313
|
+
setCurrentTabSize({
|
|
66314
|
+
width: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetWidth) || 0,
|
|
66315
|
+
height: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetHeight) || 0
|
|
66316
|
+
});
|
|
66219
66317
|
}, [active, tabs]);
|
|
66220
66318
|
var renderHeaderScrollBar = function renderHeaderScrollBar() {
|
|
66221
66319
|
if (shape !== 'line' && shape !== 'dash') return;
|
|
66222
|
-
if (!
|
|
66320
|
+
if (!currentTabSize.width || !currentTabSize.height) return;
|
|
66223
66321
|
var scrollBarStyle = isVertical ? {
|
|
66224
66322
|
right: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('left') ? 0 : 'auto',
|
|
66225
66323
|
left: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('right') ? 0 : 'auto',
|
|
66226
|
-
top: currentTabOffset.offsetTop +
|
|
66227
|
-
height: shape === 'line' ?
|
|
66324
|
+
top: currentTabOffset.offsetTop + currentTabSize.height / 2,
|
|
66325
|
+
height: shape === 'line' ? currentTabSize.height : 24,
|
|
66228
66326
|
width: 2,
|
|
66229
66327
|
transform: 'translateY(-50%)'
|
|
66230
66328
|
} : {
|
|
66231
66329
|
bottom: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('top') ? 0 : 'auto',
|
|
66232
66330
|
top: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('bottom') ? 0 : 'auto',
|
|
66233
|
-
left: currentTabOffset.offsetLeft +
|
|
66234
|
-
width: shape === 'line' ?
|
|
66331
|
+
left: currentTabOffset.offsetLeft + currentTabSize.width / 2,
|
|
66332
|
+
width: shape === 'line' ? currentTabSize.width : 24,
|
|
66235
66333
|
height: 2,
|
|
66236
66334
|
transform: 'translateX(-50%)'
|
|
66237
66335
|
};
|
|
@@ -69218,6 +69316,10 @@ var useInputClick = function useInputClick() {
|
|
|
69218
69316
|
type: 'file',
|
|
69219
69317
|
style: {
|
|
69220
69318
|
display: 'none'
|
|
69319
|
+
},
|
|
69320
|
+
onClick: function onClick(event) {
|
|
69321
|
+
// 阻止程序化触发(inputRef.current.click())的input点击事件冒泡
|
|
69322
|
+
event.stopPropagation();
|
|
69221
69323
|
}
|
|
69222
69324
|
};
|
|
69223
69325
|
var wrapperProps = {
|
|
@@ -72091,7 +72193,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
72091
72193
|
|
|
72092
72194
|
|
|
72093
72195
|
/* harmony default export */ var src_0 = ({
|
|
72094
|
-
version: '3.8.0-beta.
|
|
72196
|
+
version: '3.8.0-beta.18'
|
|
72095
72197
|
});
|
|
72096
72198
|
}();
|
|
72097
72199
|
/******/ return __webpack_exports__;
|