@widergy/mobile-ui 0.34.2 → 0.34.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,13 @@
1
+ ## [0.34.3](https://github.com/widergy/mobile-ui/compare/v0.34.2...v0.34.3) (2022-05-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * added host portal in example capture ([acda0b2](https://github.com/widergy/mobile-ui/commit/acda0b2f9caa78cf2a47622e20bec02613118b2e))
7
+ * cases of the text of selection of photos in plural contemplated ([d0f0ebc](https://github.com/widergy/mobile-ui/commit/d0f0ebc2087cb3dc3f0ce10b334906effb12ade2))
8
+ * onRequestClose added to photo application modal ([83d95f4](https://github.com/widergy/mobile-ui/commit/83d95f43a24771dc1e0aad71b70a9385465b85b6))
9
+ * pr corrections ([e58ab51](https://github.com/widergy/mobile-ui/commit/e58ab51c3138c5bcf3463df82ffe69c1ded04c96))
10
+
1
11
  ## [0.34.2](https://github.com/widergy/mobile-ui/compare/v0.34.1...v0.34.2) (2022-05-06)
2
12
 
3
13
 
@@ -19,7 +19,8 @@ const Capture = ({
19
19
  selectedMode,
20
20
  sourceCameraImage,
21
21
  sourceEditImage,
22
- messageErrorPermissionCamera
22
+ messageErrorPermissionCamera,
23
+ selectionMessage
23
24
  }) => {
24
25
  const isOnlyOnePicture = maxImages === 1 && images.length === 1;
25
26
  const isItPossibleToAddAnotherPhoto = isOnlyOnePicture ? false : images.length <= maxImages;
@@ -45,6 +46,7 @@ const Capture = ({
45
46
  sourceCameraImage={sourceCameraImage}
46
47
  sourceEditImage={sourceEditImage}
47
48
  messageErrorPermissionCamera={messageErrorPermissionCamera}
49
+ selectionMessage={selectionMessage}
48
50
  />
49
51
  {!!helpText && <Label style={styles.paddingText}>{helpText}</Label>}
50
52
  </Fragment>
@@ -18,6 +18,10 @@ const Photo = ({ image, onError, onLongPressImage, selectedImages, deletePhoto,
18
18
  setFullScreenPhotoModalVisible(false);
19
19
  deletePhoto(uri);
20
20
  };
21
+ const onCloseModal = () => {
22
+ setFullScreenPhotoModalVisible(false);
23
+ };
24
+
21
25
  return (
22
26
  <View>
23
27
  <TouchableOpacity
@@ -40,15 +44,10 @@ const Photo = ({ image, onError, onLongPressImage, selectedImages, deletePhoto,
40
44
  <Image onError={onError} source={{ uri }} style={styles.image} />
41
45
  )}
42
46
  </TouchableOpacity>
43
- <Modal animationType="fade" visible={fullScreenPhotoModalVisible}>
47
+ <Modal animationType="fade" visible={fullScreenPhotoModalVisible} onRequestClose={onCloseModal}>
44
48
  <View style={styles.modalContainer}>
45
49
  <View style={styles.headerContainerModal}>
46
- <TouchableOpacity
47
- onPress={() => {
48
- setFullScreenPhotoModalVisible(!fullScreenPhotoModalVisible);
49
- }}
50
- style={styles.backButtonHeaderModal}
51
- >
50
+ <TouchableOpacity onPress={onCloseModal} style={styles.backButtonHeaderModal}>
52
51
  <Icon name="arrowleft" type="antdesign" size={24} color="white" />
53
52
  </TouchableOpacity>
54
53
  </View>
@@ -30,7 +30,8 @@ const PhotoAlbum = ({
30
30
  isOnlyOnePicture,
31
31
  sourceCameraImage,
32
32
  sourceEditImage,
33
- messageErrorPermissionCamera
33
+ messageErrorPermissionCamera,
34
+ selectionMessage
34
35
  }) => {
35
36
  const requestPermission = async () => {
36
37
  const permissionsResponse = await PermissionsAndroid.requestMultiple([
@@ -140,7 +141,7 @@ const PhotoAlbum = ({
140
141
  <Portal>
141
142
  <View style={styles.selectedModeContainer}>
142
143
  <View style={styles.selectionLabelContainer}>
143
- <Label color="white">{`${selectedImages.length} selección`}</Label>
144
+ <Label color="white">{selectionMessage}</Label>
144
145
  </View>
145
146
  <View style={styles.buttonsContainer}>
146
147
  {isOnlyOnePicture && (
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.34.2",
5
+ "version": "0.34.3",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [