@widergy/mobile-ui 0.39.0 → 0.39.2

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
+ ## [0.39.2](https://github.com/widergy/mobile-ui/compare/v0.39.1...v0.39.2) (2023-08-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * process tracking by logs when capturing photos ([8150040](https://github.com/widergy/mobile-ui/commit/8150040a17142f042c079668c3e4b96d0a331d5c))
7
+
8
+ ## [0.39.1](https://github.com/widergy/mobile-ui/compare/v0.39.0...v0.39.1) (2023-08-14)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add markdown in UTWorkflowContainer ([2666788](https://github.com/widergy/mobile-ui/commit/2666788a7fdfb70f3828ad29b084b1384a134767))
14
+
1
15
  # [0.39.0](https://github.com/widergy/mobile-ui/compare/v0.38.0...v0.39.0) (2023-08-11)
2
16
 
3
17
 
@@ -20,7 +20,8 @@ const Capture = ({
20
20
  sourceCameraImage,
21
21
  sourceEditImage,
22
22
  messageErrorPermissionCamera,
23
- selectionMessage
23
+ selectionMessage,
24
+ onError
24
25
  }) => {
25
26
  const isOnlyOnePicture = maxImages === 1 && images.length === 1;
26
27
  const isItPossibleToAddAnotherPhoto = isOnlyOnePicture ? false : images.length <= maxImages;
@@ -47,6 +48,7 @@ const Capture = ({
47
48
  sourceEditImage={sourceEditImage}
48
49
  messageErrorPermissionCamera={messageErrorPermissionCamera}
49
50
  selectionMessage={selectionMessage}
51
+ onError={onError}
50
52
  />
51
53
  {!!helpText && <Label style={styles.paddingText}>{helpText}</Label>}
52
54
  </Fragment>
@@ -61,17 +61,21 @@ const PhotoAlbum = ({
61
61
  };
62
62
 
63
63
  const openCamera = async () => {
64
- await requestPermission();
64
+ try {
65
+ await requestPermission();
65
66
 
66
- const response = await launchCamera({});
67
- const { didCancel, errorCode, errorMessage, assets } = response;
68
- if (didCancel || errorCode) {
69
- if (errorCode) {
70
- onUnknownCameraError(`[${errorCode}] : ${errorMessage}`);
67
+ const response = await launchCamera({});
68
+ const { didCancel, errorCode, errorMessage, assets } = response;
69
+ if (didCancel || errorCode) {
70
+ if (errorCode) {
71
+ onUnknownCameraError(`[${errorCode}] : ${errorMessage}`);
72
+ }
73
+ } else {
74
+ const { uri } = assets[0];
75
+ onPressAddAnotherPhoto({ newImage: { uri }, numberOfPhotosInTheAlbumHasExceeded });
71
76
  }
72
- } else {
73
- const { uri } = assets[0];
74
- onPressAddAnotherPhoto({ newImage: { uri }, numberOfPhotosInTheAlbumHasExceeded });
77
+ } catch (error) {
78
+ throw error;
75
79
  }
76
80
  };
77
81
 
@@ -25,7 +25,8 @@ const UTWorkflowContainer = ({
25
25
  subtitle,
26
26
  stepCounter,
27
27
  bottomHandler,
28
- hideHeader = false
28
+ hideHeader = false,
29
+ useMarkdown
29
30
  }) => {
30
31
  useEffect(() => () => onExit?.(), []);
31
32
  const theme = useTheme();
@@ -45,7 +46,13 @@ const UTWorkflowContainer = ({
45
46
  const Subtitle = React.isValidElement(subtitle) ? (
46
47
  subtitle
47
48
  ) : (
48
- <Label medium {...subtitleProps} style={themedStyles.subtitle} markdownStyles={themedStyles.markdown}>
49
+ <Label
50
+ medium
51
+ {...subtitleProps}
52
+ style={themedStyles.subtitle}
53
+ markdownStyles={themedStyles.markdown}
54
+ useMarkdown={useMarkdown}
55
+ >
49
56
  {subtitle}
50
57
  </Label>
51
58
  );
@@ -95,6 +102,7 @@ UTWorkflowContainer.propTypes = {
95
102
  subtitle: string,
96
103
  stepCounter: oneOf([func, string]),
97
104
  bottomHandler: bool,
98
- hideHeader: bool
105
+ hideHeader: bool,
106
+ useMarkdown: bool
99
107
  };
100
108
  export default UTWorkflowContainer;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@widergy/mobile-ui",
3
3
  "description": "Widergy Mobile Components",
4
4
  "author": "widergy",
5
- "version": "0.39.0",
5
+ "version": "0.39.2",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [