shineout 3.9.14-beta.9 → 3.9.14
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 +23 -13
- 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.14
|
|
525
|
+
version: '3.9.14'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12326,7 +12326,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12326
12326
|
};
|
|
12327
12327
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12328
12328
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12329
|
-
/* harmony default export */ var version = ('3.9.14
|
|
12329
|
+
/* harmony default export */ var version = ('3.9.14');
|
|
12330
12330
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12331
12331
|
|
|
12332
12332
|
|
|
@@ -42038,6 +42038,9 @@ var VirtualList = function VirtualList(props) {
|
|
|
42038
42038
|
// 数据变化的时候清空掉 preIndex, 如果之前有缓存的index, setRowHeight 会有问题
|
|
42039
42039
|
setTop(0);
|
|
42040
42040
|
setStartIndex(0);
|
|
42041
|
+
if (wrapperRef.current) {
|
|
42042
|
+
wrapperRef.current.scrollTop = 0;
|
|
42043
|
+
}
|
|
42041
42044
|
context.prevWrapperRefHeight = currentWrapperRefHeight;
|
|
42042
42045
|
return function () {
|
|
42043
42046
|
context.preIndex = null;
|
|
@@ -56324,6 +56327,7 @@ var useNumberFormat = function useNumberFormat(props) {
|
|
|
56324
56327
|
min = props.min,
|
|
56325
56328
|
max = props.max,
|
|
56326
56329
|
allowNull = props.allowNull,
|
|
56330
|
+
clearToUndefined = props.clearToUndefined,
|
|
56327
56331
|
_props$step = props.step,
|
|
56328
56332
|
step = _props$step === void 0 ? 1 : _props$step,
|
|
56329
56333
|
cancelBlurChange = props.cancelBlurChange,
|
|
@@ -56344,11 +56348,8 @@ var useNumberFormat = function useNumberFormat(props) {
|
|
|
56344
56348
|
setInternalInputValue = _React$useState2[1];
|
|
56345
56349
|
var focusedRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(false);
|
|
56346
56350
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
56347
|
-
// 将外部值转为字符串后再比较,避免 number 5 vs string "5" 的类型不匹配误判
|
|
56348
56351
|
var stringValue = getStringValue(props.value);
|
|
56349
|
-
|
|
56350
|
-
// 但当外部值被清空时(如 clearable 触发),即使聚焦也需要同步
|
|
56351
|
-
if (stringValue !== inernalInputValue && (!focusedRef.current || props.value == null || props.value === '')) {
|
|
56352
|
+
if (stringValue !== inernalInputValue && (!focusedRef.current || props.value == null)) {
|
|
56352
56353
|
setInternalInputValue(stringValue);
|
|
56353
56354
|
}
|
|
56354
56355
|
}, [props.value]);
|
|
@@ -56475,6 +56476,10 @@ var useNumberFormat = function useNumberFormat(props) {
|
|
|
56475
56476
|
var num = changeValue(-step);
|
|
56476
56477
|
if (num !== undefined) setInternalInputValue(getStringValue(num));
|
|
56477
56478
|
});
|
|
56479
|
+
var handleClear = use_persist_fn(function () {
|
|
56480
|
+
setInternalInputValue('');
|
|
56481
|
+
onChange === null || onChange === void 0 || onChange(clearToUndefined ? undefined : allowNull ? null : '');
|
|
56482
|
+
});
|
|
56478
56483
|
return objectSpread2_default()(objectSpread2_default()({}, use_input_format({
|
|
56479
56484
|
value: inernalInputValue,
|
|
56480
56485
|
type: 'number',
|
|
@@ -56488,7 +56493,8 @@ var useNumberFormat = function useNumberFormat(props) {
|
|
|
56488
56493
|
cancelBlurChange: true
|
|
56489
56494
|
})), {}, {
|
|
56490
56495
|
onPlus: handlePlus,
|
|
56491
|
-
onMinus: handleMinus
|
|
56496
|
+
onMinus: handleMinus,
|
|
56497
|
+
onClear: handleClear
|
|
56492
56498
|
});
|
|
56493
56499
|
};
|
|
56494
56500
|
/* harmony default export */ var use_input_number = (useNumberFormat);
|
|
@@ -56536,7 +56542,8 @@ var InputNumber = function InputNumber(props) {
|
|
|
56536
56542
|
value: commonProps.value,
|
|
56537
56543
|
onChange: commonProps.onChange,
|
|
56538
56544
|
disabled: !!commonProps.disabled,
|
|
56539
|
-
defaultValue: props.defaultValue
|
|
56545
|
+
defaultValue: props.defaultValue,
|
|
56546
|
+
clearToUndefined: props.clearToUndefined
|
|
56540
56547
|
}, numberFormatParams)),
|
|
56541
56548
|
onMinus = _useInputNumber.onMinus,
|
|
56542
56549
|
onPlus = _useInputNumber.onPlus,
|
|
@@ -59311,9 +59318,7 @@ function Select(props0) {
|
|
|
59311
59318
|
onClearCreatedData = _useFilter.onClearCreatedData,
|
|
59312
59319
|
rawData = _useFilter.rawData,
|
|
59313
59320
|
FilterProvider = _useFilter.FilterProvider;
|
|
59314
|
-
var
|
|
59315
|
-
var filterTextChanged = prevFilterTextRef.current !== filterText;
|
|
59316
|
-
prevFilterTextRef.current = filterText;
|
|
59321
|
+
var prevListDataLengthRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
|
|
59317
59322
|
var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(''),
|
|
59318
59323
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
59319
59324
|
absoluteListUpdateKey = _useState8[0],
|
|
@@ -59726,8 +59731,13 @@ function Select(props0) {
|
|
|
59726
59731
|
});
|
|
59727
59732
|
};
|
|
59728
59733
|
var renderList = function renderList() {
|
|
59734
|
+
var _listData$length;
|
|
59735
|
+
var listData = groupBy ? groupData : filterData;
|
|
59736
|
+
var listDataLength = (_listData$length = listData === null || listData === void 0 ? void 0 : listData.length) !== null && _listData$length !== void 0 ? _listData$length : 0;
|
|
59737
|
+
var dataGrew = listDataLength > prevListDataLengthRef.current;
|
|
59738
|
+
prevListDataLengthRef.current = listDataLength;
|
|
59729
59739
|
var listProps = {
|
|
59730
|
-
data:
|
|
59740
|
+
data: listData,
|
|
59731
59741
|
datum: datum,
|
|
59732
59742
|
value: value,
|
|
59733
59743
|
size: size,
|
|
@@ -59748,7 +59758,7 @@ function Select(props0) {
|
|
|
59748
59758
|
renderItem: renderItem,
|
|
59749
59759
|
controlType: controlType,
|
|
59750
59760
|
onLoadMore: onLoadMore,
|
|
59751
|
-
keepScrollTop:
|
|
59761
|
+
keepScrollTop: dataGrew,
|
|
59752
59762
|
isAnimationFinish: isAnimationFinish,
|
|
59753
59763
|
threshold: threshold,
|
|
59754
59764
|
onControlTypeChange: setControlType,
|
|
@@ -75760,7 +75770,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
75760
75770
|
|
|
75761
75771
|
|
|
75762
75772
|
/* harmony default export */ var src_0 = ({
|
|
75763
|
-
version: '3.9.14
|
|
75773
|
+
version: '3.9.14'
|
|
75764
75774
|
});
|
|
75765
75775
|
}();
|
|
75766
75776
|
/******/ return __webpack_exports__;
|