@momo-kits/foundation 0.102.5-optimize.1 → 0.102.5-optimize.2
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/Application/Components.tsx +9 -8
- package/Layout/Screen.tsx +3 -4
- package/package.json +45 -45
|
@@ -331,7 +331,6 @@ const HeaderRight: React.FC<any> = ({type, children, onLayout, ...props}) => {
|
|
|
331
331
|
const HeaderToolkitAction: React.FC<any> = ({
|
|
332
332
|
tintColor,
|
|
333
333
|
pinnedTool,
|
|
334
|
-
runtimeTools = [],
|
|
335
334
|
preventClose,
|
|
336
335
|
}) => {
|
|
337
336
|
const {navigator} = useContext(ApplicationContext);
|
|
@@ -368,13 +367,15 @@ const HeaderToolkitAction: React.FC<any> = ({
|
|
|
368
367
|
const onMore = () => {
|
|
369
368
|
onAction?.('onMore');
|
|
370
369
|
navigator?.maxApi?.dispatchFunction?.(
|
|
371
|
-
'
|
|
372
|
-
{
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
370
|
+
'showToolkit',
|
|
371
|
+
{
|
|
372
|
+
tools: miniContext?.toolkitConfig?.oldTools ?? [
|
|
373
|
+
'addFavorite',
|
|
374
|
+
'addShortcut',
|
|
375
|
+
'share',
|
|
376
|
+
],
|
|
377
|
+
},
|
|
378
|
+
() => {}
|
|
378
379
|
);
|
|
379
380
|
};
|
|
380
381
|
|
package/Layout/Screen.tsx
CHANGED
|
@@ -132,13 +132,12 @@ const Screen = forwardRef(
|
|
|
132
132
|
inputSearchProps,
|
|
133
133
|
inputSearchRef,
|
|
134
134
|
}: ScreenProps,
|
|
135
|
-
ref
|
|
135
|
+
ref: any
|
|
136
136
|
) => {
|
|
137
137
|
const {theme} = useContext(ApplicationContext);
|
|
138
138
|
const insets = useSafeAreaInsets();
|
|
139
139
|
const heightHeader = useHeaderHeight();
|
|
140
140
|
const animatedValue = useRef<Animated.Value>(new Animated.Value(0));
|
|
141
|
-
const scrollViewRef = useRef<any>(ref);
|
|
142
141
|
const currentTint = useRef(Colors.black_01);
|
|
143
142
|
const isTab = navigation?.instance?.getState?.()?.type === 'tab';
|
|
144
143
|
|
|
@@ -345,7 +344,7 @@ const Screen = forwardRef(
|
|
|
345
344
|
useNativeDriver: true,
|
|
346
345
|
duration: 300,
|
|
347
346
|
}).start();
|
|
348
|
-
|
|
347
|
+
ref?.scrollTo({y: 0, animated: true});
|
|
349
348
|
}
|
|
350
349
|
scrollViewProps?.onScrollEndDrag?.(e);
|
|
351
350
|
};
|
|
@@ -433,7 +432,7 @@ const Screen = forwardRef(
|
|
|
433
432
|
|
|
434
433
|
<Component
|
|
435
434
|
{...scrollViewProps}
|
|
436
|
-
ref={
|
|
435
|
+
ref={ref}
|
|
437
436
|
showsVerticalScrollIndicator={false}
|
|
438
437
|
onScroll={handleScroll}
|
|
439
438
|
onScrollEndDrag={handleScrollEnd}
|
package/package.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
}
|
|
2
|
+
"name": "@momo-kits/foundation",
|
|
3
|
+
"version": "0.102.5-optimize.2",
|
|
4
|
+
"description": "React Native Component Kits",
|
|
5
|
+
"main": "index.ts",
|
|
6
|
+
"scripts": {},
|
|
7
|
+
"keywords": [
|
|
8
|
+
"@momo-kits/foundation"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@gorhom/bottom-sheet": "2.4.1",
|
|
12
|
+
"react-native-safe-area-context": "3.1.4",
|
|
13
|
+
"react-native-linear-gradient": "2.8.3",
|
|
14
|
+
"react-native-gesture-handler": "1.10.3",
|
|
15
|
+
"react-native-modalize": "2.1.1",
|
|
16
|
+
"react-native-fast-image": "8.1.5",
|
|
17
|
+
"@react-navigation/bottom-tabs": "https://gitlab.mservice.com.vn/momo-platform/react-native-bottom-tabs.git",
|
|
18
|
+
"@react-navigation/core": "5.16.1",
|
|
19
|
+
"@react-navigation/native": "5.9.8",
|
|
20
|
+
"@react-navigation/routers": "5.7.4",
|
|
21
|
+
"lottie-react-native": "git+https://gitlab.mservice.com.vn/momo-platform/momo-lottie-react-native.git",
|
|
22
|
+
"@react-navigation/stack": "https://gitlab.mservice.com.vn/momo-platform/react-navigation-stack.git"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"react-native": "*"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@babel/core": "^7.12.9",
|
|
29
|
+
"@babel/runtime": "^7.12.5",
|
|
30
|
+
"@react-native-community/eslint-config": "^2.0.0",
|
|
31
|
+
"@types/jest": "26.0.23",
|
|
32
|
+
"@types/react-native": "0.64.4",
|
|
33
|
+
"@types/react-test-renderer": "16.9.2",
|
|
34
|
+
"@types/d3-shape": "1.3.7",
|
|
35
|
+
"babel-jest": "^26.6.3",
|
|
36
|
+
"eslint": "^7.14.0",
|
|
37
|
+
"jest": "^26.6.3",
|
|
38
|
+
"metro-react-native-babel-preset": "^0.64.0",
|
|
39
|
+
"react-test-renderer": "17.0.1",
|
|
40
|
+
"typescript": "^4.0.3",
|
|
41
|
+
"@momo-platform/versions": "4.1.11",
|
|
42
|
+
"react-scanner": "^1.1.0"
|
|
43
|
+
},
|
|
44
|
+
"author": "@momo-kits/foundation",
|
|
45
|
+
"license": "ISC"
|
|
46
|
+
}
|