@widergy/mobile-ui 1.11.6 → 1.12.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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.12.1](https://github.com/widergy/mobile-ui/compare/v1.12.0...v1.12.1) (2024-06-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* utworkflow scrollable config ([#297](https://github.com/widergy/mobile-ui/issues/297)) ([c8b64a8](https://github.com/widergy/mobile-ui/commit/c8b64a8c37af6f834d1485386e4b0cfaa7d8e613))
|
|
7
|
+
|
|
8
|
+
# [1.12.0](https://github.com/widergy/mobile-ui/compare/v1.11.6...v1.12.0) (2024-06-26)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* utloading prevent unmount ([#302](https://github.com/widergy/mobile-ui/issues/302)) ([00511a9](https://github.com/widergy/mobile-ui/commit/00511a91833ff5f8ba73c74a54eb0ba612d5c3b4))
|
|
14
|
+
|
|
1
15
|
## [1.11.6](https://github.com/widergy/mobile-ui/compare/v1.11.5...v1.11.6) (2024-06-25)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1,35 +1,50 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { Fragment } from 'react';
|
|
2
2
|
import { number, string, bool } from 'prop-types';
|
|
3
|
+
import { View } from 'react-native';
|
|
3
4
|
import { ViewPropTypes } from 'deprecated-react-native-prop-types';
|
|
4
5
|
|
|
5
6
|
import Loading from '../Loading';
|
|
6
7
|
|
|
7
8
|
import styles from './styles';
|
|
8
9
|
|
|
9
|
-
const UTLoading = ({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
const UTLoading = ({
|
|
11
|
+
children,
|
|
12
|
+
color,
|
|
13
|
+
loading,
|
|
14
|
+
message,
|
|
15
|
+
messageStyle,
|
|
16
|
+
preventUnmount,
|
|
17
|
+
size,
|
|
18
|
+
style,
|
|
19
|
+
thickness
|
|
20
|
+
}) => {
|
|
21
|
+
return (
|
|
22
|
+
<Fragment>
|
|
23
|
+
{!!loading && (
|
|
24
|
+
<Loading
|
|
25
|
+
style={[styles.spinner, style]}
|
|
26
|
+
message={message}
|
|
27
|
+
color={color}
|
|
28
|
+
size={size}
|
|
29
|
+
thickness={thickness}
|
|
30
|
+
messageStyle={messageStyle}
|
|
31
|
+
/>
|
|
32
|
+
)}
|
|
33
|
+
{preventUnmount ? <View style={{ display: loading && 'none' }}>{children}</View> : !loading && children}
|
|
34
|
+
</Fragment>
|
|
22
35
|
);
|
|
36
|
+
};
|
|
23
37
|
|
|
24
38
|
UTLoading.displayName = 'UTLoading';
|
|
25
39
|
|
|
26
40
|
UTLoading.propTypes = {
|
|
27
|
-
|
|
28
|
-
messageStyle: ViewPropTypes.style,
|
|
41
|
+
color: string,
|
|
29
42
|
loading: bool,
|
|
30
43
|
message: string,
|
|
31
|
-
|
|
44
|
+
messageStyle: ViewPropTypes.style,
|
|
45
|
+
preventUnmount: bool,
|
|
32
46
|
size: number,
|
|
47
|
+
style: ViewPropTypes.style,
|
|
33
48
|
thickness: number
|
|
34
49
|
};
|
|
35
50
|
|
|
@@ -25,6 +25,7 @@ const UTWorkflowContainer = ({
|
|
|
25
25
|
onExit,
|
|
26
26
|
requiredFieldInfo,
|
|
27
27
|
returnButton,
|
|
28
|
+
scrollable = true,
|
|
28
29
|
stages,
|
|
29
30
|
stepsCount,
|
|
30
31
|
style,
|
|
@@ -42,7 +43,11 @@ const UTWorkflowContainer = ({
|
|
|
42
43
|
return (
|
|
43
44
|
<SafeAreaView style={themedStyles.container}>
|
|
44
45
|
{topbar && <UTTopbar {...{ currentStage, currentStep, stages, stepsCount, theme, topbar }} />}
|
|
45
|
-
<ScrollView
|
|
46
|
+
<ScrollView
|
|
47
|
+
contentContainerStyle={themedStyles.content}
|
|
48
|
+
keyboardShouldPersistTaps="handled"
|
|
49
|
+
scrollEnabled={scrollable}
|
|
50
|
+
>
|
|
46
51
|
{title && (
|
|
47
52
|
<UTHeader
|
|
48
53
|
{...{
|
|
@@ -86,6 +91,7 @@ UTWorkflowContainer.propTypes = {
|
|
|
86
91
|
onExit: func,
|
|
87
92
|
requiredFieldInfo: string,
|
|
88
93
|
returnButton: ActionButtonPropTypes,
|
|
94
|
+
scrollable: bool,
|
|
89
95
|
stages: StagesPropTypes,
|
|
90
96
|
stepsCount: number.isRequired,
|
|
91
97
|
subtitle: string,
|
package/package.json
CHANGED