@momo-kits/template 0.125.4-rc.6 → 0.150.1-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/TrustBanner/index.tsx +17 -10
- package/package.json +17 -18
- package/publish.sh +3 -11
package/TrustBanner/index.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2
|
+
import React, { FC, useContext, useEffect } from 'react';
|
|
3
|
+
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
4
|
+
import { TrustBannerCallbackParams, TrustBannerProps } from './types';
|
|
4
5
|
import styles from './styles';
|
|
5
6
|
import {
|
|
6
7
|
ApplicationContext,
|
|
@@ -47,7 +48,7 @@ const TrustBanner: FC<TrustBannerProps> = ({
|
|
|
47
48
|
const context = useContext<any>(MiniAppContext);
|
|
48
49
|
const {
|
|
49
50
|
theme,
|
|
50
|
-
translate = (data: {vi: string; en: string}) => {
|
|
51
|
+
translate = (data: { vi: string; en: string }) => {
|
|
51
52
|
return data.vi;
|
|
52
53
|
},
|
|
53
54
|
} = useContext(ApplicationContext);
|
|
@@ -84,7 +85,7 @@ const TrustBanner: FC<TrustBannerProps> = ({
|
|
|
84
85
|
}, []);
|
|
85
86
|
|
|
86
87
|
const _onPress = () => {
|
|
87
|
-
trackEvent?.('service_component_clicked', {...trackingParams, urlConfig});
|
|
88
|
+
trackEvent?.('service_component_clicked', { ...trackingParams, urlConfig });
|
|
88
89
|
if (urlConfig.indexOf('https') > -1) {
|
|
89
90
|
const openWebData = {
|
|
90
91
|
url: urlConfig,
|
|
@@ -98,7 +99,7 @@ const TrustBanner: FC<TrustBannerProps> = ({
|
|
|
98
99
|
|
|
99
100
|
const renderFooter = () => {
|
|
100
101
|
return (
|
|
101
|
-
<View style={
|
|
102
|
+
<View style={stylesInside.footerContainer}>
|
|
102
103
|
<View style={Styles.row}>
|
|
103
104
|
<Text typography={'action_xs_bold'} color={'#eb2f96'}>
|
|
104
105
|
{finalSubContent}
|
|
@@ -113,12 +114,12 @@ const TrustBanner: FC<TrustBannerProps> = ({
|
|
|
113
114
|
<Image
|
|
114
115
|
resizeMode={'contain'}
|
|
115
116
|
style={styles.pciImage}
|
|
116
|
-
source={{uri: pciImage}}
|
|
117
|
+
source={{ uri: pciImage }}
|
|
117
118
|
/>
|
|
118
119
|
<Image
|
|
119
120
|
resizeMode={'contain'}
|
|
120
121
|
style={styles.image}
|
|
121
|
-
source={{uri: sslImage}}
|
|
122
|
+
source={{ uri: sslImage }}
|
|
122
123
|
/>
|
|
123
124
|
</View>
|
|
124
125
|
</View>
|
|
@@ -129,7 +130,8 @@ const TrustBanner: FC<TrustBannerProps> = ({
|
|
|
129
130
|
<TouchableOpacity
|
|
130
131
|
onPress={_onPress}
|
|
131
132
|
activeOpacity={0.7}
|
|
132
|
-
style={[style, styles.container]}
|
|
133
|
+
style={[style, styles.container]}
|
|
134
|
+
>
|
|
133
135
|
<Image
|
|
134
136
|
style={styles.momoImage}
|
|
135
137
|
resizeMode={'contain'}
|
|
@@ -142,7 +144,8 @@ const TrustBanner: FC<TrustBannerProps> = ({
|
|
|
142
144
|
style={styles.message}
|
|
143
145
|
color={theme.colors.text.secondary}
|
|
144
146
|
typography={'description_default_regular'}
|
|
145
|
-
numberOfLines={2}
|
|
147
|
+
numberOfLines={2}
|
|
148
|
+
>
|
|
146
149
|
{finalContent}
|
|
147
150
|
</Text>
|
|
148
151
|
{renderFooter()}
|
|
@@ -151,4 +154,8 @@ const TrustBanner: FC<TrustBannerProps> = ({
|
|
|
151
154
|
);
|
|
152
155
|
};
|
|
153
156
|
|
|
157
|
+
const stylesInside = StyleSheet.create({
|
|
158
|
+
footerContainer: { flexDirection: 'row', justifyContent: 'space-between' },
|
|
159
|
+
});
|
|
160
|
+
|
|
154
161
|
export default TrustBanner;
|
package/package.json
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
}
|
|
2
|
+
"name": "@momo-kits/template",
|
|
3
|
+
"version": "0.150.1-beta.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "index.tsx",
|
|
6
|
+
"peerDependencies": {
|
|
7
|
+
"@momo-kits/foundation": "latest",
|
|
8
|
+
"@momo-kits/carousel": "*",
|
|
9
|
+
"react": "*",
|
|
10
|
+
"react-native": "*",
|
|
11
|
+
"@momo-platform/api": "0.1.67-rc.3"
|
|
12
|
+
},
|
|
13
|
+
"license": "MoMo",
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"registry": "https://registry.npmjs.org/"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {}
|
|
18
|
+
}
|
package/publish.sh
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
|
|
3
|
-
# Prepare dist files
|
|
4
|
-
rm -rf dist
|
|
5
|
-
mkdir dist
|
|
6
|
-
rsync -r --exclude=/dist ./* dist
|
|
7
|
-
cd dist
|
|
8
|
-
|
|
9
|
-
|
|
10
3
|
if [ "$1" == "stable" ]; then
|
|
11
4
|
npm version $(npm view @momo-kits/foundation@stable version)
|
|
12
5
|
npm version patch
|
|
@@ -14,15 +7,14 @@ if [ "$1" == "stable" ]; then
|
|
|
14
7
|
elif [ "$1" == "latest" ]; then
|
|
15
8
|
npm version $(npm view @momo-kits/foundation@latest version)
|
|
16
9
|
npm publish --tag latest --access=public
|
|
17
|
-
|
|
10
|
+
elif [ "$1" == "beta" ]; then
|
|
18
11
|
npm version $(npm view @momo-kits/template@beta version)
|
|
19
12
|
npm version prerelease --preid=beta
|
|
20
13
|
npm publish --tag beta --access=public
|
|
14
|
+
else
|
|
15
|
+
npm publish --tag alpha --access=public
|
|
21
16
|
fi
|
|
22
17
|
|
|
23
18
|
PACKAGE_NAME=$(npm pkg get name)
|
|
24
19
|
NEW_PACKAGE_VERSION=$(npm pkg get version)
|
|
25
20
|
|
|
26
|
-
# Clean up
|
|
27
|
-
cd ..
|
|
28
|
-
rm -rf dist
|