@hero-design/rn 8.84.2 → 8.84.3
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/.turbo/turbo-build.log +2 -2
- package/CHANGELOG.md +6 -0
- package/es/index.js +4 -3
- package/lib/index.js +3 -2
- package/package.json +1 -1
- package/src/components/BottomSheet/ScrollView.tsx +45 -45
- package/stats/8.84.2/rn-stats.html +2 -0
- package/stats/8.84.3/rn-stats.html +4842 -0
- package/types/components/BottomSheet/ScrollView.d.ts +3 -2
- package/types/components/BottomSheet/index.d.ts +2 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(node:
|
|
1
|
+
(node:3013) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
|
|
2
2
|
(Use `node --trace-warnings ...` to show where the warning was created)
|
|
3
3
|
[36m
|
|
4
4
|
[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
5
5
|
[1m[33m(!) [plugin replace] @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.[39m[22m
|
|
6
6
|
[1m[33m(!) [plugin node-resolve] preferring built-in module 'events' over local alternative at '/home/runner/work/hero-design/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning.or passing a function to 'preferBuiltins' to provide more fine-grained control over which built-in modules to prefer.[39m[22m
|
|
7
|
-
[32mcreated [1mlib/index.js, es/index.js[22m in [
|
|
7
|
+
[32mcreated [1mlib/index.js, es/index.js[22m in [1m51.4s[22m[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @hero-design/rn
|
|
2
2
|
|
|
3
|
+
## 8.84.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#3598](https://github.com/Thinkei/hero-design/pull/3598) [`b837f8d5986633709c679de6132c10b8d404c398`](https://github.com/Thinkei/hero-design/commit/b837f8d5986633709c679de6132c10b8d404c398) Thanks [@nhatle684](https://github.com/nhatle684)! - [BottomSheet.ScrollView] Add support ref
|
|
8
|
+
|
|
3
9
|
## 8.84.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as reactNative from 'react-native';
|
|
2
2
|
import { Platform, Dimensions, StyleSheet as StyleSheet$1, Animated, View, UIManager, LayoutAnimation, TouchableOpacity, Text as Text$1, Easing, useWindowDimensions, TouchableWithoutFeedback, Modal as Modal$1, Image as Image$1, Pressable, SafeAreaView, KeyboardAvoidingView, TouchableHighlight, ScrollView, FlatList, TextInput as TextInput$1, PanResponder, BackHandler, InteractionManager, Keyboard, SectionList, RefreshControl as RefreshControl$1 } from 'react-native';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import React__default, { useMemo, useEffect, useCallback, useRef, useLayoutEffect, useState, createContext,
|
|
4
|
+
import React__default, { useMemo, useEffect, useCallback, useRef, useLayoutEffect, useState, createContext, forwardRef, useContext, memo, useReducer, useImperativeHandle, isValidElement } from 'react';
|
|
5
5
|
import { createIconSet } from 'react-native-vector-icons';
|
|
6
6
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
7
7
|
import { MonthYearPickerViewIOS, MonthYearPickerDialogueAndroid } from '@hero-design/react-native-month-year-picker';
|
|
@@ -10133,7 +10133,7 @@ var Header = function Header(_ref) {
|
|
|
10133
10133
|
};
|
|
10134
10134
|
|
|
10135
10135
|
var _excluded$x = ["scrollEventThrottle"];
|
|
10136
|
-
var BottomSheetScrollView = function
|
|
10136
|
+
var BottomSheetScrollView = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
10137
10137
|
var _ref$scrollEventThrot = _ref.scrollEventThrottle,
|
|
10138
10138
|
scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
|
|
10139
10139
|
props = _objectWithoutProperties(_ref, _excluded$x);
|
|
@@ -10155,12 +10155,13 @@ var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
|
|
|
10155
10155
|
props === null || props === void 0 || (_props$onMomentumScro2 = props.onMomentumScrollEnd) === null || _props$onMomentumScro2 === void 0 || _props$onMomentumScro2.call(props, e);
|
|
10156
10156
|
}, []);
|
|
10157
10157
|
return /*#__PURE__*/React__default.createElement(ScrollView, _extends$1({}, props, {
|
|
10158
|
+
ref: ref,
|
|
10158
10159
|
onScrollBeginDrag: onScrollBeginDrag,
|
|
10159
10160
|
onMomentumScrollBegin: onMomentumScrollBegin,
|
|
10160
10161
|
onMomentumScrollEnd: onMomentumScrollEnd,
|
|
10161
10162
|
scrollEventThrottle: scrollEventThrottle
|
|
10162
10163
|
}));
|
|
10163
|
-
};
|
|
10164
|
+
});
|
|
10164
10165
|
|
|
10165
10166
|
var BottomSheet = function BottomSheet(_ref) {
|
|
10166
10167
|
var open = _ref.open,
|
package/lib/index.js
CHANGED
|
@@ -10161,7 +10161,7 @@ var Header = function Header(_ref) {
|
|
|
10161
10161
|
};
|
|
10162
10162
|
|
|
10163
10163
|
var _excluded$x = ["scrollEventThrottle"];
|
|
10164
|
-
var BottomSheetScrollView = function
|
|
10164
|
+
var BottomSheetScrollView = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
10165
10165
|
var _ref$scrollEventThrot = _ref.scrollEventThrottle,
|
|
10166
10166
|
scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
|
|
10167
10167
|
props = _objectWithoutProperties(_ref, _excluded$x);
|
|
@@ -10183,12 +10183,13 @@ var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
|
|
|
10183
10183
|
props === null || props === void 0 || (_props$onMomentumScro2 = props.onMomentumScrollEnd) === null || _props$onMomentumScro2 === void 0 || _props$onMomentumScro2.call(props, e);
|
|
10184
10184
|
}, []);
|
|
10185
10185
|
return /*#__PURE__*/React__namespace.default.createElement(reactNative.ScrollView, _extends$1({}, props, {
|
|
10186
|
+
ref: ref,
|
|
10186
10187
|
onScrollBeginDrag: onScrollBeginDrag,
|
|
10187
10188
|
onMomentumScrollBegin: onMomentumScrollBegin,
|
|
10188
10189
|
onMomentumScrollEnd: onMomentumScrollEnd,
|
|
10189
10190
|
scrollEventThrottle: scrollEventThrottle
|
|
10190
10191
|
}));
|
|
10191
|
-
};
|
|
10192
|
+
});
|
|
10192
10193
|
|
|
10193
10194
|
var BottomSheet = function BottomSheet(_ref) {
|
|
10194
10195
|
var open = _ref.open,
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext, useCallback } from 'react';
|
|
1
|
+
import React, { useContext, useCallback, forwardRef } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
NativeScrollEvent,
|
|
4
4
|
NativeSyntheticEvent,
|
|
@@ -9,49 +9,49 @@ import BottomSheetContext, {
|
|
|
9
9
|
BottomSheetContextType,
|
|
10
10
|
} from './BottomSheetContext';
|
|
11
11
|
|
|
12
|
-
const BottomSheetScrollView = (
|
|
13
|
-
scrollEventThrottle = 100,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
12
|
+
const BottomSheetScrollView = forwardRef<ScrollView, ScrollViewProps>(
|
|
13
|
+
({ scrollEventThrottle = 100, ...props }, ref): JSX.Element => {
|
|
14
|
+
const { setInternalShowDivider } =
|
|
15
|
+
useContext<BottomSheetContextType>(BottomSheetContext);
|
|
16
|
+
|
|
17
|
+
const onScrollBeginDrag = useCallback(
|
|
18
|
+
(e: NativeSyntheticEvent<NativeScrollEvent>) => {
|
|
19
|
+
setInternalShowDivider(true);
|
|
20
|
+
|
|
21
|
+
props?.onScrollBeginDrag?.(e);
|
|
22
|
+
},
|
|
23
|
+
[]
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
const onMomentumScrollBegin = useCallback(
|
|
27
|
+
(e: NativeSyntheticEvent<NativeScrollEvent>) => {
|
|
28
|
+
setInternalShowDivider(true);
|
|
29
|
+
|
|
30
|
+
props?.onMomentumScrollEnd?.(e);
|
|
31
|
+
},
|
|
32
|
+
[]
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
const onMomentumScrollEnd = useCallback(
|
|
36
|
+
(e: NativeSyntheticEvent<NativeScrollEvent>) => {
|
|
37
|
+
setInternalShowDivider(false);
|
|
38
|
+
|
|
39
|
+
props?.onMomentumScrollEnd?.(e);
|
|
40
|
+
},
|
|
41
|
+
[]
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<ScrollView
|
|
46
|
+
{...props}
|
|
47
|
+
ref={ref}
|
|
48
|
+
onScrollBeginDrag={onScrollBeginDrag}
|
|
49
|
+
onMomentumScrollBegin={onMomentumScrollBegin}
|
|
50
|
+
onMomentumScrollEnd={onMomentumScrollEnd}
|
|
51
|
+
scrollEventThrottle={scrollEventThrottle}
|
|
52
|
+
/>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
56
|
|
|
57
57
|
export default BottomSheetScrollView;
|