@widergy/mobile-ui 0.39.1 → 0.39.3
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.3](https://github.com/widergy/mobile-ui/compare/v0.39.2...v0.39.3) (2023-08-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* removes rates from bar ([41c180f](https://github.com/widergy/mobile-ui/commit/41c180fe71f739f923fd1dc707aaac70c719e96d))
|
|
7
|
+
|
|
8
|
+
## [0.39.2](https://github.com/widergy/mobile-ui/compare/v0.39.1...v0.39.2) (2023-08-24)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* process tracking by logs when capturing photos ([8150040](https://github.com/widergy/mobile-ui/commit/8150040a17142f042c079668c3e4b96d0a331d5c))
|
|
14
|
+
|
|
1
15
|
## [0.39.1](https://github.com/widergy/mobile-ui/compare/v0.39.0...v0.39.1) (2023-08-14)
|
|
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
|
-
|
|
64
|
+
try {
|
|
65
|
+
await requestPermission();
|
|
65
66
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
}
|
|
73
|
-
|
|
74
|
-
onPressAddAnotherPhoto({ newImage: { uri }, numberOfPhotosInTheAlbumHasExceeded });
|
|
77
|
+
} catch (error) {
|
|
78
|
+
throw error;
|
|
75
79
|
}
|
|
76
80
|
};
|
|
77
81
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { bool,
|
|
2
|
+
import { bool, number, func } from 'prop-types';
|
|
3
3
|
import { View } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import { subStageType } from '../../../../../../../../propTypes';
|
|
6
6
|
import { SUB_STAGE_MARGIN, LAST_SUB_STAGE_MARGIN } from '../../../../../../constants';
|
|
7
|
-
import Label from '../../../../../../../../../Label';
|
|
8
7
|
import { getSubStageWidth } from '../../../../../../../../../../utils/stagesGraphUtils';
|
|
9
8
|
|
|
10
9
|
import styles from './styles';
|
|
@@ -12,7 +11,6 @@ import styles from './styles';
|
|
|
12
11
|
const SubStage = ({
|
|
13
12
|
subStage,
|
|
14
13
|
isLast,
|
|
15
|
-
label,
|
|
16
14
|
index,
|
|
17
15
|
getStageColor,
|
|
18
16
|
totalSubStages,
|
|
@@ -32,18 +30,13 @@ const SubStage = ({
|
|
|
32
30
|
},
|
|
33
31
|
styles.container
|
|
34
32
|
]}
|
|
35
|
-
|
|
36
|
-
<Label h6 semibold primary>
|
|
37
|
-
{label}
|
|
38
|
-
</Label>
|
|
39
|
-
</View>
|
|
33
|
+
/>
|
|
40
34
|
);
|
|
41
35
|
};
|
|
42
36
|
|
|
43
37
|
SubStage.propTypes = {
|
|
44
38
|
subStage: subStageType,
|
|
45
39
|
isLast: bool,
|
|
46
|
-
label: string,
|
|
47
40
|
index: number,
|
|
48
41
|
getStageColor: func,
|
|
49
42
|
totalSubStages: number,
|
package/package.json
CHANGED