@momo-kits/foundation 0.157.3-beta.23 → 0.157.5-beta.1

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.
@@ -29,7 +29,6 @@ import Animated, {
29
29
  withTiming,
30
30
  } from 'react-native-reanimated';
31
31
  import layoutStyles from '../Layout/styles';
32
- import { version } from '../package.json';
33
32
 
34
33
  const BottomSheet: React.FC<BottomSheetParams> = props => {
35
34
  const { theme, navigator } = useContext(ApplicationContext);
@@ -55,40 +54,10 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
55
54
  useDivider = true,
56
55
  footerComponent,
57
56
  leftOptions,
58
- screen_name,
59
- componentName,
60
- componentLabel,
61
- description,
62
- title,
63
- } = props as BottomSheetParams;
57
+ }: BottomSheetParams = props.route.params;
64
58
 
65
59
  const translateY = useSharedValue(heightDevice);
66
60
 
67
- /**
68
- * Fire auto_popup_displayed tracking event on mount
69
- */
70
- useEffect(() => {
71
- if (typeof context?.autoTracking !== 'function') {
72
- return;
73
- }
74
-
75
- context.autoTracking({
76
- ...context,
77
- eventName: 'auto_popup_displayed',
78
- screen_name: screen_name ?? context.screenName,
79
- miniapp_version: context.miniapp_version,
80
- tracking_source: 1,
81
- app_id: context.appId,
82
- feature_code: context.feature_code,
83
- kits_version: version,
84
- component_name: componentName,
85
- component_label: componentLabel,
86
- description,
87
- title,
88
- });
89
- // eslint-disable-next-line react-hooks/exhaustive-deps
90
- }, []);
91
-
92
61
  const openAnimation = useCallback(() => {
93
62
  translateY.value = withTiming(0, {
94
63
  duration: 350,
@@ -11,13 +11,12 @@ import {
11
11
  View,
12
12
  } from 'react-native';
13
13
 
14
- import { ApplicationContext, MiniAppContext } from '../Context';
14
+ import { ApplicationContext } from '../Context';
15
15
  import { Styles } from '../Consts';
16
16
  import Navigation from './Navigation';
17
17
  import { ModalParams } from './types';
18
18
  import BottomSheet from './BottomSheet';
19
19
  import { runOnJS } from 'react-native-reanimated';
20
- import { version } from '../package.json';
21
20
 
22
21
  const ModalScreen: React.FC<any> = props => {
23
22
  if (props.route?.params?.isBottomSheet) {
@@ -28,36 +27,13 @@ const ModalScreen: React.FC<any> = props => {
28
27
 
29
28
  const Modal: React.FC<ModalParams> = props => {
30
29
  const { navigator } = useContext(ApplicationContext);
31
- const context = useContext<any>(MiniAppContext);
32
30
  const {
33
31
  screen,
34
32
  barrierDismissible,
35
33
  modalStyle,
36
34
  useNativeModal = false,
37
- description,
38
- title,
39
35
  } = props.route.params;
40
36
  const Component = useRef(screen).current;
41
-
42
- /**
43
- * Fire auto_popup_displayed tracking event on mount
44
- */
45
- useEffect(() => {
46
- context.autoTracking({
47
- eventName: 'auto_popup_displayed',
48
- screen_name: context.screenName,
49
- miniapp_version: context.miniapp_version,
50
- tracking_source: 1,
51
- app_id: context.appId,
52
- feature_code: context.feature_code,
53
- kits_version: version,
54
- componentName: 'Modal',
55
- description,
56
- title,
57
- });
58
- // eslint-disable-next-line react-hooks/exhaustive-deps
59
- }, []);
60
-
61
37
  const opacity = useRef(new Animated.Value(0)).current;
62
38
  const scale = useRef(new Animated.Value(0.8)).current;
63
39
 
@@ -185,35 +185,7 @@ export type ScreenTrackingParams = {
185
185
  value2?: any;
186
186
  };
187
187
 
188
- export type ModalTrackingProps = {
189
- /**
190
- * Optional. Screen name for auto_popup_displayed tracking event.
191
- * Falls back to the current screen's name from context if not provided.
192
- */
193
- screen_name?: string;
194
-
195
- /**
196
- * Optional. Component name for auto_popup_displayed tracking event.
197
- */
198
- componentName?: string;
199
-
200
- /**
201
- * Optional. Component label for auto_popup_displayed tracking event.
202
- */
203
- componentLabel?: string;
204
-
205
- /**
206
- * Optional. Description for auto_popup_displayed tracking event.
207
- */
208
- description?: string;
209
-
210
- /**
211
- * Optional. Title for auto_popup_displayed tracking event.
212
- */
213
- title?: string;
214
- };
215
-
216
- export type ModalParams = ModalTrackingProps & {
188
+ export type ModalParams = {
217
189
  [key: string]: any;
218
190
  screen: React.ComponentType;
219
191
  onDismiss?: () => void;
@@ -222,7 +194,7 @@ export type ModalParams = ModalTrackingProps & {
222
194
  useNativeModal?: boolean;
223
195
  };
224
196
 
225
- export type BottomSheetParams = ModalTrackingProps & {
197
+ export type BottomSheetParams = {
226
198
  [key: string]: any;
227
199
  screen: React.ComponentType;
228
200
  options: {
@@ -92,7 +92,7 @@ const PopupPromotion: React.FC<PopupPromotionProps> = ({
92
92
 
93
93
  const styles = StyleSheet.create({
94
94
  container: {
95
- aspectRatio: 0.5625, // 9:16
95
+ aspectRatio: 0.72, // 9:16
96
96
  width: '100%',
97
97
  },
98
98
  debugBaseLine: { borderWidth: 1, borderColor: Colors.green_06 },
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
1
  {
2
- "name": "@momo-kits/foundation",
3
- "version": "0.157.3-beta.23",
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
- }
2
+ "name": "@momo-kits/foundation",
3
+ "version": "0.157.5-beta.1",
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
+ }