@momo-kits/foundation 0.109.1-tracking.7 → 0.109.2-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.
@@ -101,7 +101,7 @@ const BottomTab: React.FC<BottomTabProps> = ({
101
101
  <BottomTabBar
102
102
  {...props}
103
103
  floatingButton={floatingButton}
104
- inactiveTintColor={theme.colors.text.secondary}
104
+ inactiveTintColor={theme.colors.text.hint}
105
105
  />
106
106
  )}
107
107
  tabBarOptions={{
@@ -68,7 +68,7 @@ const BottomSheetHelpCenter: React.FC<any> = ({onRequestClose}) => {
68
68
  application: {
69
69
  appId: context?.appId,
70
70
  appCode: context?.code,
71
- appName: context?.name,
71
+ appName: context?.name?.['en'],
72
72
  buildNumber: context?.buildNumber,
73
73
  },
74
74
  });
@@ -34,7 +34,7 @@ const HeaderExtendHeader: React.FC<{
34
34
  headerType = 'default',
35
35
  animatedValue,
36
36
  heightHeader,
37
- headerRightWidth = 0,
37
+ headerRightWidth = 73,
38
38
  inputSearchProps,
39
39
  inputSearchRef,
40
40
  useShadowHeader = true,
@@ -207,7 +207,7 @@ const HeaderToolkitAction: React.FC<any> = ({
207
207
  const showIconMore = tools && totalTools > 1;
208
208
  const isHaveOneTool = tools && totalTools === 1;
209
209
 
210
- if (showIconMore || (useMore && isHaveOneTool)) {
210
+ if (showIconMore || useMore) {
211
211
  iconShortcut = 'navigation_more_icon';
212
212
  shortcutOnPress = onPressIconMore;
213
213
  } else if (isHaveOneTool) {
@@ -96,7 +96,7 @@ const TitleUser: React.FC<TitleUserProps> = ({
96
96
  style={styles.headerTitleContainer}
97
97
  onPress={onPress}
98
98
  disabled={onPress === undefined}>
99
- <View style={Styles.row}>
99
+ <View style={[Styles.row, Styles.flex]}>
100
100
  <View>
101
101
  <View
102
102
  style={[
@@ -109,7 +109,7 @@ const TitleUser: React.FC<TitleUserProps> = ({
109
109
  <View style={[styles.dotAvatar, {backgroundColor: dotColor}]} />
110
110
  )}
111
111
  </View>
112
- <View style={[Styles.flex, {paddingHorizontal: 6}]}>
112
+ <View style={[Styles.flex, {marginLeft: 6}]}>
113
113
  <View style={Styles.row}>
114
114
  <Text
115
115
  typography="action_xs_bold"
@@ -192,7 +192,9 @@ const TitleJourney: React.FC<TitleJourneyProps> = ({
192
192
  onPress,
193
193
  }) => {
194
194
  return (
195
- <TouchableOpacity style={styles.headerTitleContainer} onPress={onPress}>
195
+ <TouchableOpacity
196
+ style={[styles.headerTitleContainer, {overflow: 'hidden'}]}
197
+ onPress={onPress}>
196
198
  <View style={styles.rowJourney}>
197
199
  <View style={Styles.row}>
198
200
  <Text typography="action_xs_bold" color={tintColor} numberOfLines={1}>
@@ -260,8 +262,7 @@ const styles = StyleSheet.create({
260
262
  },
261
263
  headerTitleContainer: {
262
264
  justifyContent: 'center',
263
- maxWidth: Dimensions.get('window').width - 178,
264
- overflow: 'hidden',
265
+ maxWidth: Dimensions.get('window').width - 190,
265
266
  },
266
267
  circle: {
267
268
  width: 32,
@@ -287,7 +288,7 @@ const styles = StyleSheet.create({
287
288
  borderWidth: 2,
288
289
  borderColor: Colors.black_01,
289
290
  },
290
- verifiedIcon: {marginHorizontal: Spacing.XS, width: 12, height: 12},
291
+ verifiedIcon: {width: 12, height: 12, marginLeft: Spacing.XS},
291
292
  });
292
293
 
293
294
  export {HeaderTitle, TitleCustom};
@@ -7,7 +7,16 @@ import {ApplicationContext, MiniAppContext} from '../index';
7
7
  import {Text} from '../../Text';
8
8
 
9
9
  const SearchHeader = React.forwardRef<InputRef, SearchHeaderProps>(
10
- ({animatedValue, buttonText = 'Huỷ', onPressButtonText, ...props}, ref) => {
10
+ (
11
+ {
12
+ animatedValue,
13
+ buttonText = 'Huỷ',
14
+ onPressButtonText,
15
+ showButtonText = true,
16
+ ...props
17
+ },
18
+ ref
19
+ ) => {
11
20
  const {theme, navigator} = useContext(ApplicationContext);
12
21
  const context = useContext<any>(MiniAppContext);
13
22
 
@@ -63,6 +72,9 @@ const SearchHeader = React.forwardRef<InputRef, SearchHeaderProps>(
63
72
  return true;
64
73
  };
65
74
 
75
+ const isShowButton =
76
+ context?.appId === 'vn.momo.transactionhistory' ? showButtonText : true;
77
+
66
78
  return (
67
79
  <View style={styles.container}>
68
80
  <View style={Styles.flex}>
@@ -75,9 +87,11 @@ const SearchHeader = React.forwardRef<InputRef, SearchHeaderProps>(
75
87
  />
76
88
  </Animated.View>
77
89
  </View>
78
- <TouchableOpacity onPress={goBackSafe} style={styles.searchAction}>
79
- <Text typography={'action_default_bold'}>{buttonText}</Text>
80
- </TouchableOpacity>
90
+ {isShowButton && (
91
+ <TouchableOpacity onPress={goBackSafe} style={styles.searchAction}>
92
+ <Text typography={'action_default_bold'}>{buttonText}</Text>
93
+ </TouchableOpacity>
94
+ )}
81
95
  </View>
82
96
  );
83
97
  }
@@ -137,7 +137,10 @@ const StackScreen: React.FC<ScreenParams> = props => {
137
137
  message: `${screenName} screen_load_time ${timeLoad}`,
138
138
  type: 'ERROR',
139
139
  });
140
- if (lastElement.current?.children?.current?.length > 0) {
140
+ if (
141
+ context.debugLastElement &&
142
+ lastElement.current?.children?.current?.length > 0
143
+ ) {
141
144
  Alert.alert(
142
145
  `${screenName}- load ${timeLoad}ms`,
143
146
  JSON.stringify(lastElement.current?.children?.current)
@@ -84,13 +84,13 @@ export type LocalizationObject = {
84
84
  };
85
85
 
86
86
  export type ToolGroup = {
87
- title: LocalizationObject;
87
+ title: {vi: string; en: string};
88
88
  items: Tool[];
89
89
  };
90
90
 
91
91
  export type Tool = {
92
92
  icon: string;
93
- name: LocalizationObject;
93
+ name: {vi: string; en: string};
94
94
  key: string;
95
95
  showBadge?: boolean;
96
96
  onPress: () => void;
@@ -50,7 +50,6 @@ const InputTextArea = forwardRef(
50
50
  ref
51
51
  ) => {
52
52
  const {theme} = useContext(ApplicationContext);
53
-
54
53
  const [focused, setFocused] = useState(false);
55
54
  const [inputValue, setInputValue] = useState(defaultValue ?? '');
56
55
  const inputRef = useRef<TextInput | null>(null);
package/Layout/Screen.tsx CHANGED
@@ -162,7 +162,7 @@ const Screen = forwardRef(
162
162
  headerComponent: Header,
163
163
  footerComponent: Footer,
164
164
  layoutOffset = -56,
165
- headerRightWidth = 110,
165
+ headerRightWidth = 73,
166
166
  backgroundColor,
167
167
  headerType = 'default',
168
168
  floatingButtonProps,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.109.1-tracking.7",
3
+ "version": "0.109.2-beta.1",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},