@momo-kits/foundation 0.81.8-beta.2 → 0.81.9-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/Components.tsx +10 -0
- package/Application/ModalScreen.tsx +25 -0
- package/Application/NavigationContainer.tsx +1 -1
- package/Application/StackScreen.tsx +13 -1
- package/Input/Input.tsx +3 -1
- package/Input/index.tsx +2 -0
- package/Layout/Card.tsx +1 -2
- package/Layout/GridSystem.tsx +1 -2
- package/Layout/Screen.tsx +0 -1
- package/Layout/Section.tsx +1 -3
- package/Layout/index.ts +0 -1
- package/Layout/types.ts +0 -5
- package/package.json +1 -1
|
@@ -165,6 +165,16 @@ const HeaderLeft: React.FC<HeaderBackProps> = ({
|
|
|
165
165
|
const currentRoute = navigator?.ref?.current.getCurrentRoute();
|
|
166
166
|
|
|
167
167
|
if (navigator?.trackingInfo) {
|
|
168
|
+
alert(
|
|
169
|
+
JSON.stringify({
|
|
170
|
+
feature_code: navigator.trackingInfo.code,
|
|
171
|
+
app_id: navigator.trackingInfo.appId,
|
|
172
|
+
miniapp_version: navigator.trackingInfo.buildNumber,
|
|
173
|
+
screen_name: currentRoute?.params?.screen?.name ?? currentRoute?.name,
|
|
174
|
+
trigger_id: '111154000000000000',
|
|
175
|
+
icon_name: 'back',
|
|
176
|
+
}),
|
|
177
|
+
);
|
|
168
178
|
navigator?.maxApi?.trackEvent('service_icon_clicked', {
|
|
169
179
|
feature_code: navigator.trackingInfo.code,
|
|
170
180
|
app_id: navigator.trackingInfo.appId,
|
|
@@ -65,6 +65,18 @@ const Modal: React.FC<ModalParams> = props => {
|
|
|
65
65
|
screen_name = navigationRoutes[routesLength - 2]?.params?.screen?.name;
|
|
66
66
|
}
|
|
67
67
|
const error_code = (screen as Function)?.()?.props?.information;
|
|
68
|
+
alert(
|
|
69
|
+
JSON.stringify({
|
|
70
|
+
feature_code: navigator.trackingInfo.code,
|
|
71
|
+
app_id: navigator.trackingInfo.appId,
|
|
72
|
+
miniapp_version: navigator.trackingInfo.buildNumber,
|
|
73
|
+
screen_name,
|
|
74
|
+
trigger_id: '111012100000000000',
|
|
75
|
+
component_type: 'popup',
|
|
76
|
+
component_name: modalName,
|
|
77
|
+
error_code,
|
|
78
|
+
}),
|
|
79
|
+
);
|
|
68
80
|
navigator?.maxApi?.trackEvent('service_component_displayed', {
|
|
69
81
|
feature_code: navigator.trackingInfo.code,
|
|
70
82
|
app_id: navigator.trackingInfo.appId,
|
|
@@ -77,6 +89,19 @@ const Modal: React.FC<ModalParams> = props => {
|
|
|
77
89
|
});
|
|
78
90
|
|
|
79
91
|
return () => {
|
|
92
|
+
alert(
|
|
93
|
+
JSON.stringify({
|
|
94
|
+
feature_code: navigator?.trackingInfo?.code,
|
|
95
|
+
app_id: navigator?.trackingInfo?.appId,
|
|
96
|
+
miniapp_version: navigator?.trackingInfo?.buildNumber,
|
|
97
|
+
screen_name,
|
|
98
|
+
trigger_id: '111154100000000001',
|
|
99
|
+
component_type: 'popup',
|
|
100
|
+
component_name: modalName,
|
|
101
|
+
error_code,
|
|
102
|
+
icon_name: 'close',
|
|
103
|
+
}),
|
|
104
|
+
);
|
|
80
105
|
navigator?.maxApi?.trackEvent('service_icon_clicked', {
|
|
81
106
|
feature_code: navigator?.trackingInfo?.code,
|
|
82
107
|
app_id: navigator?.trackingInfo?.appId,
|
|
@@ -3,11 +3,13 @@ import {ScreenParams} from './types';
|
|
|
3
3
|
import Navigation from './Navigation';
|
|
4
4
|
import {ApplicationContext} from './index';
|
|
5
5
|
import {GridSystem} from '../Layout';
|
|
6
|
+
import {useHeaderHeight} from '@react-navigation/stack';
|
|
6
7
|
|
|
7
8
|
const StackScreen: React.FC<ScreenParams> = props => {
|
|
8
9
|
const {screen: Component, options}: ScreenParams = props.route.params;
|
|
9
10
|
const {theme, showGrid, navigator} = useContext(ApplicationContext);
|
|
10
11
|
const navigation = new Navigation(props.navigation, theme);
|
|
12
|
+
const heightHeader = useHeaderHeight();
|
|
11
13
|
|
|
12
14
|
const params = {
|
|
13
15
|
...props.route.params,
|
|
@@ -37,6 +39,16 @@ const StackScreen: React.FC<ScreenParams> = props => {
|
|
|
37
39
|
pre_screen_name =
|
|
38
40
|
navigationRoutes[routesLength - 2]?.params?.screen?.name;
|
|
39
41
|
}
|
|
42
|
+
alert(
|
|
43
|
+
JSON.stringify({
|
|
44
|
+
feature_code: navigator.trackingInfo.code,
|
|
45
|
+
app_id: navigator.trackingInfo.appId,
|
|
46
|
+
miniapp_version: navigator.trackingInfo.buildNumber,
|
|
47
|
+
screen_name: Component.name,
|
|
48
|
+
pre_screen_name,
|
|
49
|
+
trigger_id: '111378000000000000',
|
|
50
|
+
}),
|
|
51
|
+
);
|
|
40
52
|
navigator?.maxApi?.trackEvent('service_frame_displayed', {
|
|
41
53
|
feature_code: navigator.trackingInfo.code,
|
|
42
54
|
app_id: navigator.trackingInfo.appId,
|
|
@@ -50,7 +62,7 @@ const StackScreen: React.FC<ScreenParams> = props => {
|
|
|
50
62
|
|
|
51
63
|
return (
|
|
52
64
|
<>
|
|
53
|
-
<Component {...params} />
|
|
65
|
+
<Component heightHeader={heightHeader} {...params} />
|
|
54
66
|
{showGrid && <GridSystem />}
|
|
55
67
|
</>
|
|
56
68
|
);
|
package/Input/Input.tsx
CHANGED
|
@@ -35,6 +35,7 @@ const Input = forwardRef(
|
|
|
35
35
|
loading,
|
|
36
36
|
leadingIcon,
|
|
37
37
|
leadingIconColor,
|
|
38
|
+
fontWeight = 'normal',
|
|
38
39
|
style,
|
|
39
40
|
...props
|
|
40
41
|
}: InputProps,
|
|
@@ -80,6 +81,7 @@ const Input = forwardRef(
|
|
|
80
81
|
let textColor = theme.colors.text.default;
|
|
81
82
|
let placeholderColor = theme.colors.text.hint;
|
|
82
83
|
let iconTintColor = iconColor;
|
|
84
|
+
const inputTextWeight = fontWeight === 'bold' ? 'Bold' : 'Regular';
|
|
83
85
|
|
|
84
86
|
if (disabled) {
|
|
85
87
|
textColor = disabledColor;
|
|
@@ -122,7 +124,7 @@ const Input = forwardRef(
|
|
|
122
124
|
styles.input,
|
|
123
125
|
{
|
|
124
126
|
color: textColor,
|
|
125
|
-
fontFamily: `${theme.font}
|
|
127
|
+
fontFamily: `${theme.font}-${inputTextWeight}`,
|
|
126
128
|
},
|
|
127
129
|
]}
|
|
128
130
|
textBreakStrategy="highQuality"
|
package/Input/index.tsx
CHANGED
package/Layout/Card.tsx
CHANGED
|
@@ -41,7 +41,6 @@ const Card: React.FC<CardProps> = ({
|
|
|
41
41
|
const gridContext: GridContextProps = {
|
|
42
42
|
numberOfColumns,
|
|
43
43
|
gutterSize,
|
|
44
|
-
margin,
|
|
45
44
|
sizePerSpan,
|
|
46
45
|
getSizeSpan: span => {
|
|
47
46
|
return span * sizePerSpan + (span - 1) * gutterSize;
|
|
@@ -149,7 +148,7 @@ const Card: React.FC<CardProps> = ({
|
|
|
149
148
|
styles.card,
|
|
150
149
|
{
|
|
151
150
|
width: widthSection,
|
|
152
|
-
marginHorizontal:
|
|
151
|
+
marginHorizontal: margin,
|
|
153
152
|
backgroundColor: theme.colors.background.surface,
|
|
154
153
|
},
|
|
155
154
|
useShadow && Shadow.Light,
|
package/Layout/GridSystem.tsx
CHANGED
|
@@ -24,7 +24,6 @@ const GridSystem: React.FC<any> = ({
|
|
|
24
24
|
const grid: GridContextProps = {
|
|
25
25
|
numberOfColumns,
|
|
26
26
|
gutterSize,
|
|
27
|
-
margin,
|
|
28
27
|
sizePerSpan,
|
|
29
28
|
getSizeSpan: span => {
|
|
30
29
|
return span * sizePerSpan + (span - 1) * gutterSize;
|
|
@@ -46,7 +45,7 @@ const GridSystem: React.FC<any> = ({
|
|
|
46
45
|
screenGrid && insets,
|
|
47
46
|
{
|
|
48
47
|
borderColor: theme.colors.error.primary,
|
|
49
|
-
marginHorizontal:
|
|
48
|
+
marginHorizontal: margin,
|
|
50
49
|
top: Spacing.M,
|
|
51
50
|
bottom: Spacing.M,
|
|
52
51
|
},
|
package/Layout/Screen.tsx
CHANGED
package/Layout/Section.tsx
CHANGED
|
@@ -50,7 +50,6 @@ const Section: React.FC<SectionProps> = ({
|
|
|
50
50
|
const gridContext: GridContextProps = {
|
|
51
51
|
numberOfColumns,
|
|
52
52
|
gutterSize,
|
|
53
|
-
margin,
|
|
54
53
|
sizePerSpan,
|
|
55
54
|
getSizeSpan: span => {
|
|
56
55
|
return span * sizePerSpan + (span - 1) * gutterSize;
|
|
@@ -143,7 +142,6 @@ const Section: React.FC<SectionProps> = ({
|
|
|
143
142
|
value={{
|
|
144
143
|
numberOfColumns,
|
|
145
144
|
gutterSize,
|
|
146
|
-
margin,
|
|
147
145
|
sizePerSpan,
|
|
148
146
|
getSizeSpan: span => {
|
|
149
147
|
return span * sizePerSpan + (span - 1) * gutterSize;
|
|
@@ -156,7 +154,7 @@ const Section: React.FC<SectionProps> = ({
|
|
|
156
154
|
styles.protectedStyle,
|
|
157
155
|
{
|
|
158
156
|
width: widthSection,
|
|
159
|
-
marginHorizontal:
|
|
157
|
+
marginHorizontal: margin,
|
|
160
158
|
flexDirection: 'row',
|
|
161
159
|
flexWrap: 'wrap',
|
|
162
160
|
},
|
package/Layout/index.ts
CHANGED
package/Layout/types.ts
CHANGED