@momo-kits/foundation 0.154.1-test-id.1 → 0.154.1-test.18
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/StackScreen.tsx +0 -4
- package/Image/index.tsx +1 -1
- package/Input/common.tsx +1 -2
- package/Layout/Screen.tsx +16 -50
- package/package.json +34 -34
|
@@ -86,10 +86,6 @@ const StackScreen: React.FC<any> = props => {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
const startTime = Date.now();
|
|
89
|
-
navigator?.maxApi?.setDataObserver?.('current_screen', {
|
|
90
|
-
screenName,
|
|
91
|
-
startTime,
|
|
92
|
-
});
|
|
93
89
|
|
|
94
90
|
if (!bottomTab) {
|
|
95
91
|
focusScreen = props.navigation.addListener('focus', () => {
|
package/Image/index.tsx
CHANGED
|
@@ -37,7 +37,7 @@ const Image: React.FC<ImageProps> = ({
|
|
|
37
37
|
|
|
38
38
|
let accessibilityLabel: any = `img|${getImageName(source)}`;
|
|
39
39
|
if (component?.componentId) {
|
|
40
|
-
accessibilityLabel = `${component?.componentId}|img
|
|
40
|
+
accessibilityLabel = `${component?.componentId}|img`;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* render content loading | fail | rendered
|
package/Input/common.tsx
CHANGED
package/Layout/Screen.tsx
CHANGED
|
@@ -9,9 +9,7 @@ import React, {
|
|
|
9
9
|
useContext,
|
|
10
10
|
useEffect,
|
|
11
11
|
useImperativeHandle,
|
|
12
|
-
useMemo,
|
|
13
12
|
useRef,
|
|
14
|
-
useState,
|
|
15
13
|
} from 'react';
|
|
16
14
|
import {
|
|
17
15
|
Animated,
|
|
@@ -202,7 +200,6 @@ const Screen = forwardRef(
|
|
|
202
200
|
);
|
|
203
201
|
const currentTint = useRef<string | undefined>(undefined);
|
|
204
202
|
const isTab = navigation?.instance?.getState?.()?.type === 'tab';
|
|
205
|
-
const [footerHeight, setFooterHeight] = useState(0);
|
|
206
203
|
|
|
207
204
|
let handleScroll;
|
|
208
205
|
let Component: any = View;
|
|
@@ -212,14 +209,6 @@ const Screen = forwardRef(
|
|
|
212
209
|
keyboardOffset = -Math.min(insets.bottom, 21);
|
|
213
210
|
}
|
|
214
211
|
|
|
215
|
-
// It is used to normalize the header transparent for Android
|
|
216
|
-
const normalizeHeaderTransparent = useCallback((expectedValue: boolean) => {
|
|
217
|
-
if (Platform.OS === 'android') {
|
|
218
|
-
return false;
|
|
219
|
-
}
|
|
220
|
-
return expectedValue;
|
|
221
|
-
}, []);
|
|
222
|
-
|
|
223
212
|
/**
|
|
224
213
|
* inject params for screen tracking
|
|
225
214
|
*/
|
|
@@ -244,14 +233,14 @@ const Screen = forwardRef(
|
|
|
244
233
|
case 'extended':
|
|
245
234
|
options = {
|
|
246
235
|
headerShown: true,
|
|
247
|
-
headerTransparent:
|
|
236
|
+
headerTransparent: true,
|
|
248
237
|
headerBackground: () => null,
|
|
249
238
|
headerTitle: (props: any) => <HeaderTitle {...props} />,
|
|
250
239
|
};
|
|
251
240
|
if (inputSearchProps) {
|
|
252
241
|
options = {
|
|
253
242
|
headerShown: true,
|
|
254
|
-
headerTransparent:
|
|
243
|
+
headerTransparent: true,
|
|
255
244
|
headerBackground: () => null,
|
|
256
245
|
headerTitle: (props: any) => (
|
|
257
246
|
<HeaderTitle
|
|
@@ -287,7 +276,7 @@ const Screen = forwardRef(
|
|
|
287
276
|
if (inputSearchProps) {
|
|
288
277
|
options = {
|
|
289
278
|
headerShown: true,
|
|
290
|
-
headerTransparent:
|
|
279
|
+
headerTransparent: true,
|
|
291
280
|
headerBackground: () => null,
|
|
292
281
|
headerTitle: (props: any) => (
|
|
293
282
|
<HeaderTitle
|
|
@@ -312,7 +301,6 @@ const Screen = forwardRef(
|
|
|
312
301
|
inputSearchProps,
|
|
313
302
|
navigation?.instance,
|
|
314
303
|
useShadowHeader,
|
|
315
|
-
normalizeHeaderTransparent,
|
|
316
304
|
],
|
|
317
305
|
);
|
|
318
306
|
|
|
@@ -329,7 +317,7 @@ const Screen = forwardRef(
|
|
|
329
317
|
|
|
330
318
|
options = {
|
|
331
319
|
headerTintColor: currentTint.current ?? Colors.black_17,
|
|
332
|
-
headerTransparent:
|
|
320
|
+
headerTransparent: true,
|
|
333
321
|
headerBackground: (props: any) => (
|
|
334
322
|
<HeaderBackground
|
|
335
323
|
{...props}
|
|
@@ -354,13 +342,7 @@ const Screen = forwardRef(
|
|
|
354
342
|
|
|
355
343
|
navigation?.instance?.setOptions(options);
|
|
356
344
|
},
|
|
357
|
-
[
|
|
358
|
-
normalizeHeaderTransparent,
|
|
359
|
-
gradientColor,
|
|
360
|
-
headerBackground,
|
|
361
|
-
navigation?.instance,
|
|
362
|
-
useShadowHeader,
|
|
363
|
-
],
|
|
345
|
+
[gradientColor, headerBackground, navigation?.instance, useShadowHeader],
|
|
364
346
|
);
|
|
365
347
|
|
|
366
348
|
/**
|
|
@@ -369,7 +351,7 @@ const Screen = forwardRef(
|
|
|
369
351
|
const setAnimatedSearch = useCallback(() => {
|
|
370
352
|
const options: StackNavigationOptions = {
|
|
371
353
|
headerShown: true,
|
|
372
|
-
headerTransparent:
|
|
354
|
+
headerTransparent: true,
|
|
373
355
|
headerBackground: () => null,
|
|
374
356
|
headerTitle: (props: any) => (
|
|
375
357
|
<HeaderTitle
|
|
@@ -385,7 +367,7 @@ const Screen = forwardRef(
|
|
|
385
367
|
};
|
|
386
368
|
|
|
387
369
|
navigation?.instance?.setOptions(options);
|
|
388
|
-
}, [
|
|
370
|
+
}, [navigation?.instance]);
|
|
389
371
|
|
|
390
372
|
/**
|
|
391
373
|
* export search header
|
|
@@ -581,23 +563,12 @@ const Screen = forwardRef(
|
|
|
581
563
|
}
|
|
582
564
|
};
|
|
583
565
|
|
|
584
|
-
const marginTop = useMemo(() => {
|
|
585
|
-
if (
|
|
586
|
-
Platform.OS === 'android' &&
|
|
587
|
-
(animatedHeader || inputSearchProps || headerType === 'extended')
|
|
588
|
-
) {
|
|
589
|
-
return -heightHeader;
|
|
590
|
-
}
|
|
591
|
-
return undefined;
|
|
592
|
-
}, [animatedHeader, headerType, heightHeader, inputSearchProps]);
|
|
593
|
-
|
|
594
566
|
return (
|
|
595
567
|
<View
|
|
596
568
|
style={[
|
|
597
569
|
Styles.flex,
|
|
598
570
|
{
|
|
599
571
|
backgroundColor: backgroundColor ?? theme.colors.background.default,
|
|
600
|
-
marginTop,
|
|
601
572
|
},
|
|
602
573
|
]}
|
|
603
574
|
>
|
|
@@ -640,15 +611,15 @@ const Screen = forwardRef(
|
|
|
640
611
|
</Component>
|
|
641
612
|
|
|
642
613
|
{floatingButtonProps && (
|
|
643
|
-
<
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
614
|
+
<View>
|
|
615
|
+
<FloatingButton
|
|
616
|
+
{...floatingButtonProps}
|
|
617
|
+
animatedValue={animatedValue.current}
|
|
618
|
+
bottom={
|
|
619
|
+
Footer || isTab ? 12 : Math.min(insets.bottom, 21) + Spacing.S
|
|
620
|
+
}
|
|
621
|
+
/>
|
|
622
|
+
</View>
|
|
652
623
|
)}
|
|
653
624
|
|
|
654
625
|
{Footer && (
|
|
@@ -660,11 +631,6 @@ const Screen = forwardRef(
|
|
|
660
631
|
backgroundColor: theme.colors.background.surface,
|
|
661
632
|
},
|
|
662
633
|
]}
|
|
663
|
-
onLayout={e => {
|
|
664
|
-
if (e.nativeEvent.layout.height !== footerHeight) {
|
|
665
|
-
setFooterHeight(e.nativeEvent.layout.height);
|
|
666
|
-
}
|
|
667
|
-
}}
|
|
668
634
|
>
|
|
669
635
|
<Section>{Footer}</Section>
|
|
670
636
|
</View>
|
package/package.json
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
2
|
+
"name": "@momo-kits/foundation",
|
|
3
|
+
"version": "0.154.1-test.18",
|
|
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
|
+
}
|