@momo-kits/foundation 0.158.1-beta.1 → 0.158.1-beta.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/Application/ModalScreen.tsx +15 -23
- package/package.json +34 -34
|
@@ -28,14 +28,28 @@ const ModalScreen: React.FC<any> = props => {
|
|
|
28
28
|
const Modal: React.FC<ModalParams> = props => {
|
|
29
29
|
const { navigator } = useContext(ApplicationContext);
|
|
30
30
|
const context = useContext<any>(MiniAppContext);
|
|
31
|
-
const modalParams = useRef<any>(undefined);
|
|
32
31
|
const {
|
|
33
32
|
screen,
|
|
34
33
|
barrierDismissible,
|
|
35
34
|
modalStyle,
|
|
36
35
|
useNativeModal = false,
|
|
36
|
+
description,
|
|
37
|
+
title,
|
|
37
38
|
} = props.route.params;
|
|
38
39
|
const Component = useRef(screen).current;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Fire auto_popup_displayed tracking event on mount
|
|
43
|
+
*/
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
context.autoTracking({
|
|
46
|
+
componentName: 'Modal',
|
|
47
|
+
description,
|
|
48
|
+
title,
|
|
49
|
+
});
|
|
50
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
51
|
+
}, []);
|
|
52
|
+
|
|
39
53
|
const opacity = useRef(new Animated.Value(0)).current;
|
|
40
54
|
const scale = useRef(new Animated.Value(0.8)).current;
|
|
41
55
|
|
|
@@ -50,28 +64,6 @@ const Modal: React.FC<ModalParams> = props => {
|
|
|
50
64
|
Container = ModalRN;
|
|
51
65
|
}
|
|
52
66
|
|
|
53
|
-
if (screen != null) {
|
|
54
|
-
const screenProps = screen?.()?.props || {};
|
|
55
|
-
modalParams.current = {
|
|
56
|
-
title: screenProps?.title || '',
|
|
57
|
-
description: screenProps?.description || '',
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
useEffect(() => {
|
|
62
|
-
navigator?.maxApi?.getDataObserver?.('current_screen', (curScreen: any) => {
|
|
63
|
-
const item: any = {
|
|
64
|
-
screenName: curScreen?.screenName,
|
|
65
|
-
componentName: 'Modal',
|
|
66
|
-
...modalParams.current,
|
|
67
|
-
};
|
|
68
|
-
context?.autoTracking?.({
|
|
69
|
-
...context,
|
|
70
|
-
...item,
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
}, [context, navigator?.maxApi]);
|
|
74
|
-
|
|
75
67
|
useEffect(() => {
|
|
76
68
|
Animated.parallel([
|
|
77
69
|
Animated.timing(opacity, {
|
package/package.json
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
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
|
-
}
|
|
2
|
+
"name": "@momo-kits/foundation",
|
|
3
|
+
"version": "0.158.1-beta.3",
|
|
4
|
+
"description": "React Native Component Kits",
|
|
5
|
+
"main": "index.ts",
|
|
6
|
+
"scripts": {},
|
|
7
|
+
"keywords": [
|
|
8
|
+
"@momo-kits/foundation"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"react-native-fast-image": "git+https://oauth2:TGi6oBj-LdzsKpLXQSoH@gitlab.mservice.com.vn/momo-platform/public/react-native-fast-image.git#v8.11.0",
|
|
12
|
+
"@react-navigation/bottom-tabs": "7.4.2",
|
|
13
|
+
"@react-navigation/core": "7.12.1",
|
|
14
|
+
"@react-navigation/elements": "2.5.2",
|
|
15
|
+
"@react-navigation/native": "7.1.14",
|
|
16
|
+
"@react-navigation/routers": "7.4.1",
|
|
17
|
+
"@react-navigation/stack": "7.4.2",
|
|
18
|
+
"react-native-gesture-handler": "2.27.1",
|
|
19
|
+
"react-native-linear-gradient": "git+https://oauth2:TGi6oBj-LdzsKpLXQSoH@gitlab.mservice.com.vn/momo-platform/public/react-native-linear-gradient#v3.0.0",
|
|
20
|
+
"react-native-reanimated": "4.1.0",
|
|
21
|
+
"react-native-safe-area-context": "5.5.2",
|
|
22
|
+
"@shopify/flash-list": "2.1.0",
|
|
23
|
+
"lottie-react-native": "7.2.4"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"react-native": "*"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/color": "3.0.6"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"registry": "https://registry.npmjs.org/"
|
|
33
|
+
},
|
|
34
|
+
"license": "MoMo"
|
|
35
|
+
}
|