@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.
- package/Application/BottomTab/index.tsx +1 -1
- package/Application/Components/BottomSheetHelpCenter.tsx +1 -1
- package/Application/Components/HeaderExtendHeader.tsx +1 -1
- package/Application/Components/HeaderRight.tsx +1 -1
- package/Application/Components/HeaderTitle.tsx +7 -6
- package/Application/Components/SearchHeader.tsx +18 -4
- package/Application/StackScreen.tsx +4 -1
- package/Application/types.ts +2 -2
- package/Input/InputTextArea.tsx +0 -1
- package/Layout/Screen.tsx +1 -1
- package/package.json +1 -1
|
@@ -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 ||
|
|
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, {
|
|
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
|
|
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 -
|
|
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: {
|
|
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
|
-
(
|
|
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
|
-
|
|
79
|
-
<
|
|
80
|
-
|
|
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 (
|
|
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)
|
package/Application/types.ts
CHANGED
|
@@ -84,13 +84,13 @@ export type LocalizationObject = {
|
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
export type ToolGroup = {
|
|
87
|
-
title:
|
|
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:
|
|
93
|
+
name: {vi: string; en: string};
|
|
94
94
|
key: string;
|
|
95
95
|
showBadge?: boolean;
|
|
96
96
|
onPress: () => void;
|
package/Input/InputTextArea.tsx
CHANGED
|
@@ -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